diff --git a/cypress/public/ui-conf.js b/cypress/public/ui-conf.js index 74f1d52..0366cc2 100644 --- a/cypress/public/ui-conf.js +++ b/cypress/public/ui-conf.js @@ -1,20 +1,20 @@ /** * Bundle builder 2.2.0/588c57d -* Created at Thu May 11 2023 13:22:01 GMT+0000 (Coordinated Universal Time) +* Created at Mon May 15 2023 11:52:05 GMT+0000 (Coordinated Universal Time) * ------------------- * Kaltura Player lib -* kaltura-ovp-player v3.14.3-canary.0-9dfd3f3 -* playkit-kaltura-cuepoints v3.0.4-canary.1-8114481 -* playkit-kava v1.5.4-canary.0-994176b -* playkit-timeline v3.0.1-canary.0-8716f82 -* playkit-ui-managers v1.3.8-canary.0-e71b379 +* kaltura-ovp-player v3.14.3-canary.0-99a98cb +* playkit-kaltura-cuepoints v3.0.5-canary.1-188a936 +* playkit-kava v1.5.4-canary.0-029a811 +* playkit-timeline v3.0.2-canary.0-e1d3c0c +* playkit-ui-managers v1.3.9-canary.0-01b272e */ var KalturaPlayer=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=324)}([function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){var r;!function(i,a){"use strict";var o="model",s="name",l="type",u="vendor",c="version",p="mobile",d="tablet",f="smarttv",h=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},g=function(e,t){return"string"==typeof e&&-1!==y(t).indexOf(y(e))},y=function(e){return e.toLowerCase()},v=function(e,t){if("string"==typeof e)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0===t?e:e.substring(0,255)},m=function(e,t){for(var n,r,i,a,o,s,l=0;l<t.length&&!o;){var u=t[l],c=t[l+1];for(n=r=0;n<u.length&&!o;)if(o=u[n++].exec(e))for(i=0;i<c.length;i++)s=o[++r],"object"==typeof(a=c[i])&&a.length>0?2===a.length?"function"==typeof a[1]?this[a[0]]=a[1].call(this,s):this[a[0]]=a[1]:3===a.length?"function"!=typeof a[1]||a[1].exec&&a[1].test?this[a[0]]=s?s.replace(a[1],a[2]):void 0:this[a[0]]=s?a[1].call(this,s,a[2]):void 0:4===a.length&&(this[a[0]]=s?a[3].call(this,s.replace(a[1],a[2])):void 0):this[a]=s||void 0;l+=2}},b=function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(g(t[n][r],e))return"?"===n?void 0:n}else if(g(t[n],e))return"?"===n?void 0:n;return e},_={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},E={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[c,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[c,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,c],[/opios[\/ ]+([\w\.]+)/i],[c,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[c,[s,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[s,c],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[c,[s,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[c,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[c,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[c,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[c,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[c,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],c],[/\bfocus\/([\w\.]+)/i],[c,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[c,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[c,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[c,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[c,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[c,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[c,[s,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],c],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],c],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,c],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,"Facebook"],c],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,c],[/\bgsa\/([\w\.]+) .*safari\//i],[c,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[c,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],c],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[c,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,c],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[c,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[c,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[c,b,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[s,c],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],c],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[c,[s,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[s,c]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",y]],[/((?:i[346]|x)86)[;\)]/i],[["architecture","ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[["architecture","arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[["architecture","armhf"]],[/windows (ce|mobile); ppc;/i],[["architecture","arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[["architecture",/ower/,"",y]],[/(sun4\w)[;\)]/i],[["architecture","sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[["architecture",y]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[o,[u,"Samsung"],[l,d]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[u,"Samsung"],[l,p]],[/\((ip(?:hone|od)[\w ]*);/i],[o,[u,"Apple"],[l,p]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[u,"Apple"],[l,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[u,"Huawei"],[l,d]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[o,[u,"Huawei"],[l,p]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[o,/_/g," "],[u,"Xiaomi"],[l,p]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[u,"Xiaomi"],[l,d]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[u,"OPPO"],[l,p]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[u,"Vivo"],[l,p]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[o,[u,"Realme"],[l,p]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[o,[u,"Motorola"],[l,p]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[u,"Motorola"],[l,d]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[u,"LG"],[l,d]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[u,"LG"],[l,p]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[u,"Lenovo"],[l,d]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[u,"Nokia"],[l,p]],[/(pixel c)\b/i],[o,[u,"Google"],[l,d]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[u,"Google"],[l,p]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[o,[u,"Sony"],[l,p]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[u,"Sony"],[l,d]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[u,"OnePlus"],[l,p]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[u,"Amazon"],[l,d]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[u,"Amazon"],[l,p]],[/(playbook);[-\w\),; ]+(rim)/i],[o,u,[l,d]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[u,"BlackBerry"],[l,p]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[u,"ASUS"],[l,d]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[u,"ASUS"],[l,p]],[/(nexus 9)/i],[o,[u,"HTC"],[l,d]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[u,[o,/_/g," "],[l,p]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[u,"Acer"],[l,d]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[u,"Meizu"],[l,p]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[u,"Sharp"],[l,p]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,o,[l,p]],[/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,o,[l,d]],[/(surface duo)/i],[o,[u,"Microsoft"],[l,d]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[u,"Fairphone"],[l,p]],[/(u304aa)/i],[o,[u,"AT&T"],[l,p]],[/\bsie-(\w*)/i],[o,[u,"Siemens"],[l,p]],[/\b(rct\w+) b/i],[o,[u,"RCA"],[l,d]],[/\b(venue[\d ]{2,7}) b/i],[o,[u,"Dell"],[l,d]],[/\b(q(?:mv|ta)\w+) b/i],[o,[u,"Verizon"],[l,d]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[u,"Barnes & Noble"],[l,d]],[/\b(tm\d{3}\w+) b/i],[o,[u,"NuVision"],[l,d]],[/\b(k88) b/i],[o,[u,"ZTE"],[l,d]],[/\b(nx\d{3}j) b/i],[o,[u,"ZTE"],[l,p]],[/\b(gen\d{3}) b.+49h/i],[o,[u,"Swiss"],[l,p]],[/\b(zur\d{3}) b/i],[o,[u,"Swiss"],[l,d]],[/\b((zeki)?tb.*\b) b/i],[o,[u,"Zeki"],[l,d]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],o,[l,d]],[/\b(ns-?\w{0,9}) b/i],[o,[u,"Insignia"],[l,d]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[u,"NextBook"],[l,d]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],o,[l,p]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],o,[l,p]],[/\b(ph-1) /i],[o,[u,"Essential"],[l,p]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[u,"Envizen"],[l,d]],[/\b(trio[-\w\. ]+) b/i],[o,[u,"MachSpeed"],[l,d]],[/\btu_(1491) b/i],[o,[u,"Rotor"],[l,d]],[/(shield[\w ]+) b/i],[o,[u,"Nvidia"],[l,d]],[/(sprint) (\w+)/i],[u,o,[l,p]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[u,"Microsoft"],[l,p]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[u,"Zebra"],[l,d]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[u,"Zebra"],[l,p]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,o,[l,"console"]],[/droid.+; (shield) bui/i],[o,[u,"Nvidia"],[l,"console"]],[/(playstation [345portablevi]+)/i],[o,[u,"Sony"],[l,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[u,"Microsoft"],[l,"console"]],[/smart-tv.+(samsung)/i],[u,[l,f]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[u,"Samsung"],[l,f]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,"LG"],[l,f]],[/(apple) ?tv/i],[u,[o,"Apple TV"],[l,f]],[/crkey/i],[[o,"Chromecast"],[u,"Google"],[l,f]],[/droid.+aft(\w)( bui|\))/i],[o,[u,"Amazon"],[l,f]],[/\(dtv[\);].+(aquos)/i],[o,[u,"Sharp"],[l,f]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,v],[o,v],[l,f]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,f]],[/((pebble))app/i],[u,o,[l,"wearable"]],[/droid.+; (glass) \d/i],[o,[u,"Google"],[l,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[o,[u,"Zebra"],[l,"wearable"]],[/(quest( 2)?)/i],[o,[u,"Facebook"],[l,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[l,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[o,[l,p]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[l,d]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,d]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,p]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[c,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[c,[s,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[s,c],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[c,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,c],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[c,b,_]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[c,b,_]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[c,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[c,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[c,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,c],[/\(bb(10);/i],[c,[s,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[c,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[c,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[c,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[c,[s,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],c],[/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[s,c],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],c],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,c]]},k=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof k))return new k(e,t).getResult();var n=e||(void 0!==i&&i.navigator&&i.navigator.userAgent?i.navigator.userAgent:""),r=t?function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2==0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n}(E,t):E;return this.getBrowser=function(){var e,t={name:void 0,version:void 0};return m.call(t,n,r.browser),t.major="string"==typeof(e=t.version)?e.replace(/[^\d\.]/g,"").split(".")[0]:void 0,t},this.getCPU=function(){var e={architecture:void 0};return m.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return m.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return m.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return m.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n="string"==typeof e&&e.length>255?v(e,255):e,this},this.setUA(n),this};k.VERSION="1.0.2",k.BROWSER=h([s,c,"major"]),k.CPU=h(["architecture"]),k.DEVICE=h([o,u,l,"console",p,f,d,"wearable","embedded"]),k.ENGINE=k.OS=h([s,c]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=k),t.UAParser=k):n(4)?void 0===(r=function(){return k}.call(t,n,t,e))||(e.exports=r):void 0!==i&&(i.UAParser=k);var T=void 0!==i&&(i.jQuery||i.Zepto);if(T&&!T.ua){var A=new k;T.ua=A.getResult(),T.ua.get=function(){return A.getUA()},T.ua.set=function(e){A.setUA(e);var t=A.getResult();for(var n in t)T.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t,n){var r,i; /*! * js-logger - http://github.com/jonnyreeves/js-logger * Jonny Reeves, http://jonnyreeves.co.uk/ * js-logger may be freely distributed under the MIT license. - */!function(a){"use strict";var o,s={VERSION:"1.6.0"},l={},u=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t<n.length;t++)for(e in n[t])!(e in r)&&n[t].hasOwnProperty(e)&&(r[e]=n[t][e]);return r},p=function(e,t){return{value:e,name:t}};s.TRACE=p(1,"TRACE"),s.DEBUG=p(2,"DEBUG"),s.INFO=p(3,"INFO"),s.TIME=p(4,"TIME"),s.WARN=p(5,"WARN"),s.ERROR=p(8,"ERROR"),s.OFF=p(99,"OFF");var d=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};d.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},trace:function(){this.invoke(s.TRACE,arguments)},debug:function(){this.invoke(s.DEBUG,arguments)},info:function(){this.invoke(s.INFO,arguments)},warn:function(){this.invoke(s.WARN,arguments)},error:function(){this.invoke(s.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"end"])},invoke:function(e,t){o&&this.enabledFor(e)&&o(t,c({level:e},this.context))}};var f,h=new d({filterLevel:s.OFF});(f=s).enabledFor=u(h,h.enabledFor),f.trace=u(h,h.trace),f.debug=u(h,h.debug),f.time=u(h,h.time),f.timeEnd=u(h,h.timeEnd),f.info=u(h,h.info),f.warn=u(h,h.warn),f.error=u(h,h.error),f.log=f.info,s.setHandler=function(e){o=e},s.setLevel=function(e){for(var t in h.setLevel(e),l)l.hasOwnProperty(t)&&l[t].setLevel(e)},s.getLevel=function(){return h.getLevel()},s.get=function(e){return l[e]||(l[e]=new d(c({name:e},h.context)))},s.createDefaultHandler=function(e){(e=e||{}).formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var a,o=console.log;i.level===s.TIME?(a=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(a):t[a]=(new Date).getTime():console.timeEnd?console.timeEnd(a):n(o,[a+": "+((new Date).getTime()-t[a])+"ms"])):(i.level===s.WARN&&console.warn?o=console.warn:i.level===s.ERROR&&console.error?o=console.error:i.level===s.INFO&&console.info?o=console.info:i.level===s.DEBUG&&console.debug?o=console.debug:i.level===s.TRACE&&console.trace&&(o=console.trace),e.formatter(r,i),n(o,r))}},s.useDefaults=function(e){s.setLevel(e&&e.defaultLevel||s.DEBUG),s.setHandler(s.createDefaultHandler(e))},void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i)}()},function(e){e.exports=JSON.parse('{"heartbeatTimeout":30000}')},function(e){e.exports=JSON.parse('{"a":"data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE="}')},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){var r=n(6),i=n(7);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]),r(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],i=0;i<e.length;i++){var s=e[i],l=t.base?s[0]+t.base:s[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var p=o(c),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(a[p].references++,a[p].updater(d)):a.push({identifier:c,updater:g(d,t),references:1}),r.push(c)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,c=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function d(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,h=0;function g(e,t){var n,r,i;if(t.singleton){var a=h++;n=f||(f=l(t)),r=p.bind(null,n,a,!1),i=p.bind(null,n,a,!0)}else n=l(t),r=d.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=o(n[r]);a[i].references--}for(var l=s(e,t),u=0;u<n.length;u++){var c=o(n[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=l}}}},function(e,t,n){(t=n(8)(!1)).push([e.i,".playkit-container {\n position: relative;\n width: 100%;\n height: 100%;\n color: #fff;\n outline: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.playkit-engine {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n object-fit: contain;\n}\n\n.playkit-engine video::-webkit-media-controls-panel,\n.playkit-engine video::-webkit-media-controls-panel-container,\n.playkit-engine video::-webkit-media-controls-start-playback-button,\n.playkit-engine video::-webkit-media-controls-play-button {\n display: none;\n -webkit-appearance: none;\n}\n\n.playkit-poster {\n position: absolute;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-size: contain;\n background-position: center center;\n background-repeat: no-repeat;\n background-color: #000;\n pointer-events: none;\n}\n\n.playkit-subtitles {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n pointer-events: none;\n margin-bottom: 5px;\n}\n\n.playkit-black-cover {\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: black;\n pointer-events: none;\n}\n\n.playkit-size-iframe {\n width: 100%;\n height: 100%;\n position: absolute;\n border: 0;\n z-index: -100;\n}\n\n.playkit-in-browser-fullscreen-mode {\n width: 100% !important;\n height: 100% !important;\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n /*added for blocking element with fixed position which could be on the top of the player */\n z-index: 999999 !important;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(n=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"loadPlayer",(function(){return Bn})),n.d(t,"registerMediaSourceAdapter",(function(){return Lt})),n.d(t,"BaseMediaSourceAdapter",(function(){return yt})),n.d(t,"BaseMiddleware",(function(){return rt})),n.d(t,"Track",(function(){return re})),n.d(t,"VideoTrack",(function(){return ae})),n.d(t,"AudioTrack",(function(){return oe})),n.d(t,"TextTrack",(function(){return $e})),n.d(t,"ImageTrack",(function(){return pt})),n.d(t,"TextStyle",(function(){return ye})),n.d(t,"Cue",(function(){return Be})),n.d(t,"TimedMetadata",(function(){return Mt})),n.d(t,"createTextTrackCue",(function(){return Nt})),n.d(t,"createTimedMetadata",(function(){return Ut})),n.d(t,"Utils",(function(){return r})),n.d(t,"utils",(function(){return r})),n.d(t,"Error",(function(){return L})),n.d(t,"FakeEvent",(function(){return m})),n.d(t,"FakeEventTarget",(function(){return C})),n.d(t,"EventManager",(function(){return D})),n.d(t,"VERSION",(function(){return Fn})),n.d(t,"NAME",(function(){return jn})),n.d(t,"Env",(function(){return g})),n.d(t,"State",(function(){return Z})),n.d(t,"getCapabilities",(function(){return Vn})),n.d(t,"setCapabilities",(function(){return Hn})),n.d(t,"EngineDecoratorProvider",(function(){return Nn})),n.d(t,"registerEngine",(function(){return Zt})),n.d(t,"unRegisterEngine",(function(){return Jt})),n.d(t,"AdBreakType",(function(){return on})),n.d(t,"AdTagType",(function(){return sn})),n.d(t,"AdEventType",(function(){return z})),n.d(t,"filterTracksByRestriction",(function(){return mt})),n.d(t,"Html5EventType",(function(){return W})),n.d(t,"CustomEventType",(function(){return Y})),n.d(t,"EventType",(function(){return q})),n.d(t,"StateType",(function(){return J})),n.d(t,"TrackType",(function(){return Qe})),n.d(t,"EngineType",(function(){return Je})),n.d(t,"MediaType",(function(){return et})),n.d(t,"StreamType",(function(){return Ze})),n.d(t,"AbrMode",(function(){return tt})),n.d(t,"LogLevelType",(function(){return E})),n.d(t,"CorsType",(function(){return nt})),n.d(t,"DrmScheme",(function(){return bt})),n.d(t,"MimeType",(function(){return Un})),n.d(t,"RequestType",(function(){return ut})),n.d(t,"ScreenOrientationType",(function(){return ot})),n.d(t,"AutoPlayType",(function(){return mn})),n.d(t,"ThumbnailInfo",(function(){return ft})),n.d(t,"getLogger",(function(){return S})),n.d(t,"LogLevel",(function(){return _})),n.d(t,"getLogLevel",(function(){return A})),n.d(t,"setLogLevel",(function(){return w})),n.d(t,"setLogHandler",(function(){return k}));var r={};n.r(r),n.d(r,"Number",(function(){return N})),n.d(r,"String",(function(){return U})),n.d(r,"Object",(function(){return F})),n.d(r,"Generator",(function(){return j})),n.d(r,"Dom",(function(){return B})),n.d(r,"Http",(function(){return V})),n.d(r,"VERSION",(function(){return H})),n.d(r,"ResizeWatcher",(function(){return ln})),n.d(r,"MultiMap",(function(){return v})),n.d(r,"binarySearch",(function(){return cn}));var i=n(0),a=n.n(i),o=/^.*(web0s).*(smarttv).*$/i,s=/^.*(smart-tv).*(tizen).*$/i,l=/^.*(vidaa).*(smarttv).*$/i,u=[[s],[[a.a.BROWSER.NAME,"SAMSUNG_TV_BROWSER"],[a.a.BROWSER.MAJOR,""],[a.a.BROWSER.VERSION,""]]],c=[[o],[a.a.OS.NAME],[l],[a.a.OS.NAME]],p=[[o],[[a.a.DEVICE.VENDOR,"LG"],[a.a.DEVICE.TYPE,a.a.DEVICE.SMARTTV]],[s],[[a.a.DEVICE.VENDOR,"SAMSUNG"],[a.a.DEVICE.TYPE,a.a.DEVICE.SMARTTV]],[l],[[a.a.DEVICE.VENDOR,"HISENSE"],[a.a.DEVICE.TYPE,a.a.DEVICE.SMARTTV]],[/^.*(smart-tv|smarttv).*$/i],[[a.a.DEVICE.TYPE,a.a.DEVICE.SMARTTV]]],d=[[/(edg)\/((\d+)?[\w.]+)/i],[[a.a.BROWSER.NAME,"Edge"],a.a.BROWSER.VERSION,a.a.BROWSER.MAJOR]],f=[].concat(d,u),h=new a.a(void 0,{browser:f,device:p,os:c}).getResult();h.isConsole=h.device.type===a.a.DEVICE.CONSOLE,h.isSmartTV=h.device.type===a.a.DEVICE.SMARTTV,h.isMobile=h.device.type===a.a.DEVICE.MOBILE,h.isTablet=h.device.type===a.a.DEVICE.TABLET,h.isWearable=h.device.type===a.a.DEVICE.WEARABLE,h.isEmbedded=h.device.type===a.a.DEVICE.EMBEDDED,h.isIPadOS="Mac OS"===h.os.name&&"ontouchend"in document,h.isSafari=h.browser.name.includes("Safari"),h.isIOS="iOS"===h.os.name,h.isMacOS="Mac OS"===h.os.name;var g=h;function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=function(){function e(){this._map=new Map}var t=e.prototype;return t.push=function(e,t){if(this._map.has(e)){var n=this._map.get(e);Array.isArray(n)&&(n.push(t),this._map.set(e,n))}else this._map.set(e,[t])},t.set=function(e,t){this._map.set(e,t)},t.has=function(e){return this._map.has(e)},t.get=function(e){var t=this._map.get(e);return t?t.slice():[]},t.getAll=function(){for(var e,t=[],n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._map.values());!(e=n()).done;){var r=e.value;t=t.concat(r)}return t},t.remove=function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n)){for(var r=0;r<n.length;++r)n[r]==t&&(n.splice(r,1),--r);0===n.length&&this._map.delete(e)}}},t.keys=function(){return this._map.keys()},t.clear=function(){this._map.clear()},e}(),m=function(){function e(e,t){this.bubbles=!1,this.cancelable=!1,this.defaultPrevented=!1,this.timeStamp=window.performance?window.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.currentTarget=null,this.target=null,this.stopped=!1,this.payload=t}var t=e.prototype;return t.preventDefault=function(){},t.stopImmediatePropagation=function(){this.stopped=!0},t.stopPropagation=function(){},e}(),b=n(1),_={DEBUG:b.DEBUG,INFO:b.INFO,TIME:b.TIME,WARN:b.WARN,ERROR:b.ERROR,OFF:b.OFF},E={};function k(e){b.setHandler((function(t,n){return e(t,n)}))}function T(e){return e?b.get(e):b}function A(e){return T(e).getLevel()}function w(e,t){T(t).setLevel(e)}Object.keys(_).forEach((function(e){E[e]=e})),b.useDefaults({defaultLevel:b.ERROR});var S=T,C=function(){function e(){this._listeners=new v,this.dispatchTarget=this,this.__logger=S("FakeEventTarget")}var t=e.prototype;return t.addEventListener=function(e,t){this._listeners.push(e,t)},t.removeEventListener=function(e,t){this._listeners.remove(e,t)},t.dispatchEvent=function(e){for(var t=this._listeners.get(e.type)||[],n=0;n<t.length;++n){e.target=this.dispatchTarget,e.currentTarget=this.dispatchTarget;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(t){this.__logger.error("Error occurred when handling event: "+e.type+".",t)}if(e.stopped)break}return e.defaultPrevented},e}();function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var I=function(){function e(){this._bindingMap=new v}var t=e.prototype;return t.destroy=function(){return this.removeAll(),this._bindingMap=null,Promise.resolve()},t.listenOnce=function(e,t,n,r){var i=this;this.listen(e,t,(function r(a){i.unlisten(e,t,r),n.call(i,a)}),r)},t.listen=function(e,t,n,r){var i=new P(e,t,n,r);this._bindingMap&&this._bindingMap.push(t,i)},t.unlisten=function(e,t,n){if(this._bindingMap)for(var r=this._bindingMap.get(t),i=0;i<r.length;++i){var a=r[i];a.target!==e||a.listener!==n&&n||(a.unlisten(),this._bindingMap&&this._bindingMap.remove(t,a))}},t.removeAll=function(){if(this._bindingMap){for(var e,t=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._bindingMap.getAll());!(e=t()).done;)e.value.unlisten();this._bindingMap&&this._bindingMap.clear()}},e}(),P=function(){function e(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.options=r,this.target.addEventListener(t,n,!1)}return e.prototype.unlisten=function(){this.target&&(this.target.removeEventListener(this.type,this.listener,this.options),this.target=null,this.listener=null,this.options=null)},e}(),D=I,R={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,LIVE_MANIFEST_REFRESH_ERROR:1008,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_CREATE_TEXT_CUE:2009,DASH_ADAPTER_ERROR_PARSE_ISSUE:2010,UNKNOWN_FILE_TYPE:2011,UNKNOWN_LANGUAGE:2012,INVALID_VTT_THUMBNAILS_FILE:2013,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,HLS_FATAL_MEDIA_ERROR:3018,HLS_FRAG_PARSING_ERROR:3019,HLS_BUFFER_APPEND_ISSUE:3020,HLS_BUFFER_APPENDING_ISSUE:3021,NATIVE_ADAPTER_LOAD_FAILED:3022,HLS_BUFFER_STALLED_ERROR:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_LIVE_CONTENT_NOT_SUPPORTED:4029,HLSJS_CANNOT_PARSE:4030,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,BAD_FAIRPLAY_RESPONSE:6015,COULD_NOT_CREATE_MEDIA_KEYS:6016,COULD_NOT_CREATE_KEY_SESSION:6017,LOAD_INTERRUPTED:7e3,BITRATE_SWITCH_ISSUE:7001,LOAD_FAILED:7002,RUNTIME_ERROR_NOT_REGISTERED_PLUGIN:7003,RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED:7004,RUNTIME_ERROR_NOT_VALID_HANDLER:7005,NO_SOURCE_PROVIDED:7006,NO_ENGINE_FOUND_TO_PLAY_THE_SOURCE:7007,ENTER_PICTURE_IN_PICTURE_FAILED:7008,EXIT_PICTURE_IN_PICTURE_FAILED:7009,PLUGIN_LOAD_FAILED:7010,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,CONTENT_UNSUPPORTED_BY_BROWSER:9009,CANNOT_ADD_ITEM:9010,DOWNLOAD_FAILED:9011,COULD_NOT_GET_INFO_FROM_MEDIA_PROVIDER:9012,ENTRY_DOES_NOT_EXIST:9013,PAUSE_FAILED:9014,RESUME_FAILED:9015,RENEW_LICENSE_FAILED:9016,ENTRY_ALREADY_EXISTS:9017,REMOVE_FAILED:9018,CAST_LOAD_MEDIA_FAILED:10001,CAST_CUSTOM_MESSAGE_PARSING_ERROR:10002,CAST_EDIT_TRACKS_INFO_ERROR:10003,VR_NOT_SUPPORTED:11e3};function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.assign(R,{XML_PARSING_ERROR:8100,VAST_SCHEMA_VALIDATION_ERROR:8101,VAST_RESPONSE_VERSION_NOT_SUPPORTED:8102,TRAFFICKING_ERROR:8200,VAST_UNEXPECTED_LINEARITY:8201,VAST_UNEXPECTED_DURATION_ERROR:8202,VAST_UNEXPECTED_SIZE_ERROR:8203,VAST_WRAPPER_ERROR:8300,VAST_URI_ERROR:8301,VAST_TOO_MANY_REDIRECTS:8302,NO_ADS_VAST_RESPONSE:8303,GENERAL_LINEAR_ERROR:8400,FILE_NOT_FOUND:8401,VAST_MEDIA_LOAD_TIMEOUT:8402,MEDIA_FILE_NOT_FOUND:8403,MEDIA_FILE_DISPLAY_ERROR:8405,MEZZANINE_FILE_NOT_PROVIDED:8406,MEZZANINE_DOWNLOADED_FOR_THE_FIRST_TIME:8407,VAST_RESPONSE_AD_REJECTED:8408,CREATIVE_WAS_NOT_EXECUTED:8409,CODE_REFERENCED_NOT_EXECUTED:8410,GENERAL_NON_LINEAR_AD_ERROR:8500,NON_LINEAR_CREATIVE_DIMENSIONS_NOT_ALIGN_ERROR:8501,NON_LINEAR_FETCH_ERROR:8502,NON_LINEAR_RESOURCE_NOT_FOUND:8503,GENERAL_COMPANION_ADS_ERROR:8600,COMPANION_DIMENSIONS_NOT_FIT:8601,COMPANION_CANNOT_BE_DISPLAY:8602,COMPANION_CANNOT_BE_FETCHED:8603,COMPANION_TYPE_NOT_FOUND:8604,AD_UNDEFINED_ERROR:8900,GENERAL_VPAID_ERROR:8901});var L=function e(t,n,r,i){void 0===i&&(i={}),this.severity=t,this.category=n,this.code=r,this.data=i,A("Error")!==_.OFF&&e._logger.error("Category:"+n+" | Code:"+r+" |",i)};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}O(L,"Severity",{RECOVERABLE:1,CRITICAL:2}),O(L,"Category",{NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,ADS:8,STORAGE:9,CAST:10,VR:11}),O(L,"Code",R),O(L,"_logger",S("Error"));var N={isNumber:function(e){return Number(e)===e},isInt:function(e){return this.isNumber(e)&&e%1==0},isFloat:function(e){return this.isNumber(e)&&e%1!=0}},U={capitlize:function(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)},endsWith:function(e,t){return"string"==typeof e&&"string"==typeof t&&-1!=e.indexOf(t,e.length-t.length)}},F={merge:function(e){for(var t,n={},r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(t=r()).done;){var i=t.value;Object.assign(n,i)}return n},isObject:function(e){return e&&"object"==typeof e&&!Array.isArray(e)},isClassInstance:function(e){return e&&e.constructor&&e.constructor.name&&"Object"!==e.constructor.name},mergeDeep:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;var i=n.shift();if(this.isObject(e)&&this.isObject(i))for(var a in i){var o,s;this.isObject(i[a])&&!this.isClassInstance(i[a])?(e[a]||Object.assign(e,((o={})[a]={},o)),this.mergeDeep(e[a],i[a])):Object.assign(e,((s={})[a]=i[a],s))}return this.mergeDeep.apply(this,[e].concat(n))},copyDeep:function(e){var t,n=this;return Array.isArray(e)?(t=e.length>0?e.slice(0):[]).forEach((function(e,r){("object"==typeof e&&e!=={}||Array.isArray(e)&&e.length>0)&&(t[r]=n.copyDeep(e))})):null!==e&&"object"==typeof e?e.clone&&"function"==typeof e.clone?t=e.clone():(t=Object.assign({__proto__:e.__proto__},e),Object.keys(t).forEach((function(e){("object"==typeof t[e]&&t[e]!=={}||Array.isArray(t[e])&&t[e].length>0)&&(t[e]=n.copyDeep(t[e]))}))):t=e,t},isEmptyObject:function(e){for(var t in e)if(window.Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},getPropertyPath:function(e,t){return t.split(".").reduce((function(e,t){return null==e?e:e[t]}),e)},hasPropertyPath:function(e,t){if(!t)return!1;for(var n=t.split("."),r=0;r<n.length;r++){var i=n[r];if(!e||!window.Object.prototype.hasOwnProperty.call(e,i))return!1;e=e[i]}return!0},createPropertyPath:function(e,t,n){void 0===n&&(n=null);for(var r=t.split("."),i=e;r.length>1;){var a=r,o=a[0];r=a.slice(1),void 0===i[o]&&(i[o]={}),i=i[o]}return i[r[0]]=n,e},deletePropertyPath:function(e,t){if(e&&t){for(var n=t.split("."),r=0;r<n.length-1;r++)if(void 0===(e=e[n[r]]))return;delete e[n.pop()]}},defer:function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},bind:function(e,t){return function(){t.apply(e,arguments)}}},j={uniqueId:function(e){var t=2+(!e||e<0?0:e-2);return"_"+Math.random().toString(36).substr(2,t)},guid:function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}},B={addClassName:function(e,t){e&&(e.classList?e.classList.add(t):B.hasClassName(e,t)||(e.className+=t))},removeClassName:function(e,t){e&&(e.classList?e.classList.remove(t):B.hasClassName(e,t)&&(e.className=e.className.replace(new RegExp("(\\s|^)"+t+"(\\s|$)")," ").replace(/^\s+|\s+$/g,"")))},hasClassName:function(e,t){return e&&e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},setAttribute:function(e,t,n){e.setAttribute(t,n)},removeAttribute:function(e,t){e.removeAttribute(t)},setStyle:function(e,t,n){void 0!==e.style.getPropertyValue(t)&&e.style.setProperty(t,n)},appendChild:function(e,t){e&&t&&e.appendChild&&e.appendChild(t)},removeChild:function(e,t){e&&t&&e.removeChild&&e.removeChild(t)},prependTo:function(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},getElementById:function(e){return document.getElementById(e)},getElementsByTagName:function(e){return document.getElementsByTagName(e)},createElement:function(e){return document.createElement(e)},loadStyleSheetAsync:function(e){var t=this;return new Promise((function(n,r){var i=!1,a=t.createElement("link");a.type="text/css",a.rel="stylesheet",a.href=e,a.async=!0,a.onload=a.onreadystatechange=function(){i||this.readyState&&"complete"!==this.readyState||(i=!0,n(this))},a.onerror=a.onabort=r,B.appendChild(document.head,a)}))},loadScriptAsync:function(e){var t=this;return new Promise((function(n,r){var i=!1,a=document.getElementsByTagName("script")[0],o=t.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.onload=o.onreadystatechange=function(){i||this.readyState&&"complete"!==this.readyState||(i=!0,n(this))},o.onerror=o.onabort=r,a&&a.parentNode&&a.parentNode.insertBefore(o,a)}))},getElementBySelector:function(e){try{return document.querySelector(e)}catch(e){return}},insertBefore:function(e,t,n){try{return e.insertBefore(t,n)}catch(e){return null}}},V={protocol:/^(https?:)/i.test(document.location.protocol)?document.location.protocol:"https:",execute:function(e,t,n,r,i,a){void 0===n&&(n="POST");var o=new XMLHttpRequest;return new Promise((function(s,l){o.onreadystatechange=function(){if(4===o.readyState)if(200===o.status)try{var e=JSON.parse(o.responseText);s(e)}catch(e){s(o.responseText)}else l(o.responseText)},o.open(n,e),r&&r.forEach((function(e,t){o.setRequestHeader(t,e)})),i&&(o.timeout=i),a&&(o.ontimeout=function(e){a(),l(e)}),o.send(t)}))},jsonp:function(e,t,n){var r,i=(n=n||{}).timeout?n.timeout:5e3,a=document.createElement("script"),o="jsonpcallback"+Math.round(Date.now()+1000001*Math.random()),s=e,l=function(){a&&a.parentNode&&a.parentNode.removeChild(a),window[o]=function(){},r&&clearTimeout(r)};return new Promise((function(n,u){i&&(r=setTimeout((function(){l(),u(new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.TIMEOUT,e))}),i)),window[o]=function(r){var i=t(r,e);l(),n(i)},s.match(/\?/)?s+="&responseFormat=jsonp&callback="+o:s+="?responseFormat=jsonp&callback="+o,a.type="text/javascript",a.src=s,document.getElementsByTagName("head")[0].appendChild(a)}))},convertHeadersToDictionary:function(e){var t={};try{e.trim().split(/[\r\n]+/).forEach((function(e){var n=e.split(": "),r=n.shift().toLowerCase(),i=n.join(": ");t[r]=i}))}catch(e){}return t}},H={compare:function(e,t,n){void 0===n&&(n={});var r=(n=F.merge([{lexicographical:!1,zeroExtend:!0},n])).lexicographical,i=n.zeroExtend,a=(e||"0").split("."),o=(t||"0").split("."),s=function(e){return(r?/^\d+[A-Za-zαß]*$/:/^\d+[A-Za-zαß]?$/).test(e)},l=function(e){return e.map((function(e){var t=/[A-Za-zαß]/.exec(e);return Number(t?e.replace(t[0],"."+e.charCodeAt(t.index)):e)}))};if(!a.every(s)||!o.every(s))return NaN;if(i){for(;a.length<o.length;)a.push("0");for(;o.length<a.length;)o.push("0")}r||(a=l(a),o=l(o));for(var u=0;u<a.length;++u){if(o.length===u)return 1;if(a[u]!==o[u])return a[u]>o[u]?1:-1}return a.length!==o.length?-1:0}};function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var G=function(){function e(){this._createEl()}var t,n,r=e.prototype;return r.setSrc=function(e){e&&(this._posterUrl=e,B.setStyle(this._el,"background-image",'url("'+this._posterUrl+'")'),this.hide())},r.getElement=function(){return this._el},r._createEl=function(){if(!this._el){var e=this._el=B.createElement("div");B.setAttribute(e,"id",j.uniqueId(5)),B.setAttribute(e,"tabindex","-1")}},r._removeEl=function(){this._el&&B.removeChild(this._el.parentNode,this._el)},r.show=function(){B.setStyle(this._el,"display","")},r.hide=function(){B.setStyle(this._el,"display","none")},r.reset=function(){this._posterUrl="",B.setStyle(this._el,"background-image","")},r.destroy=function(){this.reset(),this._removeEl()},t=e,(n=[{key:"src",get:function(){return this._posterUrl}}])&&K(t.prototype,n),e}(),z={AD_CAN_SKIP:"adcanskip",AD_MANIFEST_LOADED:"admanifestloaded",AD_LOADED:"adloaded",AD_STARTED:"adstarted",AD_RESUMED:"adresumed",AD_PAUSED:"adpaused",AD_CLICKED:"adclicked",AD_SKIPPED:"adskipped",AD_COMPLETED:"adcompleted",AD_ERROR:"aderror",ADS_COMPLETED:"adscompleted",ALL_ADS_COMPLETED:"alladscompleted",AD_BREAK_START:"adbreakstart",AD_BREAK_END:"adbreakend",AD_FIRST_QUARTILE:"adfirstquartile",AD_MIDPOINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",USER_CLOSED_AD:"userclosedad",AD_VOLUME_CHANGED:"advolumechanged",AD_MUTED:"admuted",AD_PROGRESS:"adprogress",AD_BUFFERING:"adbuffering",AD_WATERFALLING:"adwaterfalling",AD_WATERFALLING_FAILED:"adwaterfallingfailed",AD_AUTOPLAY_FAILED:"adautoplayfailed"},W={ABORT:"abort",CAN_PLAY:"canplay",CAN_PLAY_THROUGH:"canplaythrough",DURATION_CHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",ERROR:"error",LOADED_DATA:"loadeddata",LOADED_METADATA:"loadedmetadata",LOAD_START:"loadstart",PAUSE:"pause",PLAY:"play",PLAYING:"playing",PROGRESS:"progress",RATE_CHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIME_UPDATE:"timeupdate",VOLUME_CHANGE:"volumechange",WAITING:"waiting",ENTER_PICTURE_IN_PICTURE:"enterpictureinpicture",LEAVE_PICTURE_IN_PICTURE:"leavepictureinpicture",PRESENTATION_MODE_CHANGED:"webkitpresentationmodechanged"},Y={MEDIA_LOADED:"medialoaded",PLAYER_RESET:"playerreset",PLAYER_DESTROY:"playerdestroy",ENTER_FULLSCREEN:"enterfullscreen",EXIT_FULLSCREEN:"exitfullscreen",PLAY_FAILED:"playfailed",AUTOPLAY_FAILED:"autoplayfailed",FALLBACK_TO_MUTED_AUTOPLAY:"fallbacktomutedautoplay",CHANGE_SOURCE_STARTED:"changesourcestarted",CHANGE_SOURCE_ENDED:"changesourceended",MUTE_CHANGE:"mutechange",VIDEO_TRACK_CHANGED:"videotrackchanged",AUDIO_TRACK_CHANGED:"audiotrackchanged",TEXT_TRACK_CHANGED:"texttrackchanged",IMAGE_TRACK_CHANGED:"imagetrackchanged",TEXT_TRACK_ADDED:"texttrackadded",TEXT_CUE_CHANGED:"textcuechanged",TRACKS_CHANGED:"trackschanged",ABR_MODE_CHANGED:"abrmodechanged",PLAYER_STATE_CHANGED:"playerstatechanged",PLAYBACK_START:"playbackstart",FIRST_PLAY:"firstplay",FIRST_PLAYING:"firstplaying",PLAYBACK_ENDED:"playbackended",SOURCE_SELECTED:"sourceselected",TEXT_STYLE_CHANGED:"textstylechanged",MEDIA_RECOVERED:"mediarecovered",VR_STEREO_MODE_CHANGED:"vrstereomodechanged",FPS_DROP:"fpsdrop",BOOKMARK_ERROR:"bookmarkerror",CONCURRENCY_LIMIT:"concurrencylimit",RESIZE:"resize",TIMED_METADATA:"timedmetadata",TIMED_METADATA_CHANGE:"timedmetadatachange",TIMED_METADATA_ADDED:"timedmetadataadded",FRAG_LOADED:"fragloaded",MANIFEST_LOADED:"manifestloaded",USER_GESTURE:"usergesture",DRM_LICENSE_LOADED:"drmlicenseloaded",SOURCE_URL_SWITCHED:"sourceurlswitched"},q=F.merge([W,Y,z]);function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var $=function(){function e(){}var t,n;return t=e,(n=[{key:"language",get:function(){var e;return(e=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.userLanguage?navigator.userLanguage:navigator.language)&&e.match("-")&&(e=e.split("-")[0]),e}}])&&X(t,n),e}();function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Z=function(){function e(e){this.type=e,this._duration=0,this._timestamp=Date.now()/1e3}var t,n;return t=e,(n=[{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e-this._timestamp}}])&&Q(t.prototype,n),e}(),J={IDLE:"idle",LOADING:"loading",PLAYING:"playing",PAUSED:"paused",BUFFERING:"buffering"};function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var te=function(){function e(e){var t,n,r,i,a,o,s,l,u,c=this;s=this,l="_transitions",(o={})[J.IDLE]=((t={})[W.LOAD_START]=function(){return c._updateState(J.LOADING)},t[W.PLAY]=function(){return c._updateState(J.BUFFERING)},t[W.SEEKED]=function(){return c._updateState(J.PAUSED)},t),o[J.LOADING]=((n={})[W.LOADED_METADATA]=function(){return c._updateState(J.PAUSED)},n[W.ERROR]=function(e){return e.payload.severity===L.Severity.CRITICAL&&c._updateState(J.IDLE)},n[W.SEEKED]=function(){c._prevState&&c._prevState.type===J.PLAYING&&c._updateState(J.PLAYING)},n),o[J.PAUSED]=((r={})[W.PLAY]=function(){return c._updateState(J.PLAYING)},r[W.PLAYING]=function(){return c._updateState(J.PLAYING)},r[W.ENDED]=function(){return c._updateState(J.IDLE)},r),o[J.PLAYING]=((i={})[W.PAUSE]=function(){return c._updateState(J.PAUSED)},i[W.WAITING]=function(){c._player.seeking?c._updateState(J.LOADING):(c._updateState(J.BUFFERING),c._lastWaitingTime=c._player.currentTime)},i[W.ENDED]=function(){return c._updateState(J.IDLE)},i[W.ERROR]=function(e){return e.payload.severity===L.Severity.CRITICAL&&c._updateState(J.IDLE)},i),o[J.BUFFERING]=((a={})[W.PLAYING]=function(){return c._updateState(J.PLAYING)},a[W.PAUSE]=function(){return c._updateState(J.PAUSED)},a[W.TIME_UPDATE]=function(){"IE"===g.browser.name&&c._player.currentTime!==c._lastWaitingTime&&c._prevState&&c._prevState.type===J.PLAYING&&(c._lastWaitingTime=null,c._updateState(J.PLAYING))},a),u=o,l in s?Object.defineProperty(s,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[l]=u,this._player=e,this._logger=S("StateManager"),this._eventManager=new D,this._history=[],this._prevState=null,this._curState=new Z(J.IDLE),this._attachListeners()}var t,n,r=e.prototype;return r._attachListeners=function(){this._eventManager.listen(this._player,W.ERROR,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.ENDED,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.PLAY,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.LOAD_START,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.PLAYING,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.LOADED_METADATA,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.PAUSE,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.WAITING,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.SEEKED,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.TIME_UPDATE,this._doTransition.bind(this))},r._doTransition=function(e){(e.type!==W.TIME_UPDATE||this._curState===J.BUFFERING&&e.type===W.TIME_UPDATE)&&this._logger.debug("Do transition request",e.type);var t=this._transitions[this._curState.type];"function"==typeof t[e.type]&&t[e.type](e)},r._updateState=function(e){this._curState.type!==e&&(this._curState.duration=Date.now()/1e3,this._history.push(this._curState),this._prevState=this._curState,this._curState=new Z(e),this._logger.debug("Switch player state: from "+this._prevState.type+" to "+this._curState.type),this._dispatchEvent())},r._dispatchEvent=function(){var e=new m(Y.PLAYER_STATE_CHANGED,{oldState:this._prevState,newState:this._curState});this._player.dispatchEvent(e)},r.destroy=function(){this._history=[],this._eventManager.destroy()},r.reset=function(){this._history=[]},t=e,(n=[{key:"currentState",get:function(){return this._curState}},{key:"previousState",get:function(){return this._prevState}},{key:"history",get:function(){return this._history}}])&&ee(t.prototype,n),e}();function ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var re=function(){var e,t;function n(e){void 0===e&&(e={}),this._id=e.id,this._active=e.active,this._label=e.label,this._language=e.language,this._index=e.index,this._available="boolean"!=typeof e.available||e.available,this.clone=n.clone.bind(null,this)}return n.langComparer=function(e,t,n,r){try{return e=e.toLowerCase(),t=t.toLowerCase(),n&&(n=n.toLowerCase()),r?e===t||n===t:!!e&&(e.startsWith(t)||t.startsWith(e))}catch(e){return!1}},n.clone=function(e){return Object.assign(Object.create(Object.getPrototypeOf(e)),e)},e=n,(t=[{key:"id",get:function(){return this._id}},{key:"active",get:function(){return this._active},set:function(e){this._active=e}},{key:"label",get:function(){return this._label},set:function(e){this._label=e}},{key:"language",get:function(){return this._language}},{key:"index",get:function(){return this._index},set:function(e){this._index=e}},{key:"available",get:function(){return this._available},set:function(e){this._available=e}}])&&ne(e.prototype,t),n}();function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ae=function(e){var t,n,r,i;function a(t){var n;return void 0===t&&(t={}),(n=e.call(this,t)||this)._bandwidth=t.bandwidth,n._width=t.width,n._height=t.height,n._label=t.label?t.label:n._height?n._height+"p":void 0,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r=a,(i=[{key:"bandwidth",get:function(){return this._bandwidth}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}}])&&ie(r.prototype,i),a}(re),oe=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(re);function se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ue={"":!0,up:!0};function ce(e){return"number"==typeof e&&e>=0&&e<=100}var pe,de=function(){function e(){le(this,"_width",100),le(this,"_lines",3),le(this,"_regionAnchorX",0),le(this,"_regionAnchorY",100),le(this,"_viewportAnchorX",0),le(this,"_viewportAnchorY",100),le(this,"_scroll","")}var t,n;return t=e,(n=[{key:"width",get:function(){return this._width},set:function(e){if(!ce(e))throw new Error("Width must be between 0 and 100.");this._width=e}},{key:"scroll",get:function(){return this._scroll},set:function(e){var t=function(e){return"string"==typeof e&&!!ue[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");this._scroll=t}},{key:"viewportAnchorY",get:function(){return this._viewportAnchorY},set:function(e){if(!ce(e))throw new Error("ViewportAnchorY must be between 0 and 100.");this._viewportAnchorY=e}},{key:"viewportAnchorX",get:function(){return this._viewportAnchorX},set:function(e){if(!ce(e))throw new Error("ViewportAnchorX must be between 0 and 100.");this._viewportAnchorX=e}},{key:"regionAnchorX",get:function(){return this._regionAnchorX},set:function(e){if(!ce(e))throw new Error("RegionAnchorY must be between 0 and 100.");this._regionAnchorX=e}},{key:"lines",get:function(){return this._lines},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");this._lines=e}},{key:"regionAnchorY",get:function(){return this._regionAnchorY},set:function(e){if(!ce(e))throw new Error("RegionAnchorX must be between 0 and 100.");this._regionAnchorY=e}}])&&se(t.prototype,n),e}();function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}pe="undefined"!=typeof window&&window.VTTRegion?window.VTTRegion:de;var ge=function(){function e(){he(this,"_fontSizeIndex",2),he(this,"fontFamily",e.FontFamily.SANS_SERIF),he(this,"fontColor",e.StandardColors.WHITE),he(this,"fontOpacity",e.StandardOpacities.OPAQUE),he(this,"backgroundColor",e.StandardColors.BLACK),he(this,"backgroundOpacity",e.StandardOpacities.OPAQUE),he(this,"fontEdge",e.EdgeStyles.NONE)}e.toRGBA=function(e,t){return"rgba("+e.concat(t).join(",")+")"},e.fromJson=function(t){var n=function(e,t){return null!=e?e:t},r=new e;return r.fontEdge=n(t.fontEdge,r.fontEdge),r.fontSize=n(t.fontSize,r.fontSize),r.fontScale=n(t.fontScale,r.fontScale),r.fontColor=n(t.fontColor,r.fontColor),r.fontOpacity=n(t.fontOpacity,r.fontOpacity),r.backgroundColor=n(t.backgroundColor,r.backgroundColor),r.backgroundOpacity=n(t.backgroundOpacity,r.backgroundOpacity),r.fontFamily=n(t.fontFamily,r.fontFamily),r},e.toJson=function(e){return{fontEdge:e.fontEdge,fontSize:e.fontSize,fontScale:e.fontScale,fontColor:e.fontColor,fontOpacity:e.fontOpacity,backgroundColor:e.backgroundColor,backgroundOpacity:e.backgroundOpacity,fontFamily:e.fontFamily}};var t,n,r=e.prototype;return r.getTextShadow=function(){for(var t=[],n=0;n<this.fontEdge.length;n++){var r=this.fontEdge[n].slice(0,3),i=this.fontEdge[n].slice(3,6);t.push(e.toRGBA(r,this.fontOpacity)+" "+i.join("px ")+"px")}return t.join(",")},r.toCSS=function(){var t=[];return t.push("font-family: "+this.fontFamily),t.push("color: "+e.toRGBA(this.fontColor,this.fontOpacity)),t.push("background-color: "+e.toRGBA(this.backgroundColor,this.backgroundOpacity)),t.push("text-shadow: "+this.getTextShadow()),t.join("!important; ")},r.clone=function(){return e.fromJson(e.toJson(this))},r.isEqual=function(t){return JSON.stringify(e.toJson(this))===JSON.stringify(e.toJson(t))},t=e,(n=[{key:"fontSize",set:function(t){var n=e.FontSizes.findIndex((function(e){return e.label===t}));-1!==n&&(this._fontSizeIndex=n)},get:function(){return e.FontSizes[this._fontSizeIndex].label}},{key:"fontScale",set:function(t){var n=e.FontSizes.findIndex((function(e){return e.value===t}));-1!==n&&(this._fontSizeIndex=n)},get:function(){return e.FontSizes[this._fontSizeIndex].value}},{key:"implicitFontScale",get:function(){return.25*e.FontSizes[this._fontSizeIndex].value+1}}])&&fe(t.prototype,n),e}();he(ge,"FontFamily",{ARIAL:"Arial",HELVETICA:"Helvetica",VERDANA:"Verdana",SANS_SERIF:"sans-serif"}),he(ge,"StandardColors",{WHITE:[255,255,255],BLACK:[0,0,0],RED:[255,0,0],GREEN:[0,255,0],BLUE:[0,0,255],YELLOW:[255,255,0],MAGENTA:[255,0,255],CYAN:[0,255,255]}),he(ge,"StandardOpacities",{OPAQUE:1,SEMI_HIGH:.75,SEMI_LOW:.25,TRANSPARENT:0}),he(ge,"EdgeStyles",{NONE:[],RAISED:[[34,34,34,1,1,0],[34,34,34,2,2,0],[34,34,34,3,3,0]],DEPRESSED:[[204,204,204,1,1,0],[204,204,204,0,1,0],[34,34,34,-1,-1,0],[34,34,34,0,-1,0]],UNIFORM:[[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4]],DROP:[[34,34,34,2,2,3],[34,34,34,2,2,4],[34,34,34,2,2,5]]}),he(ge,"FontSizes",[{value:-2,label:"50%"},{value:-1,label:"75%"},{value:0,label:"100%"},{value:2,label:"200%"},{value:3,label:"300%"},{value:4,label:"400%"}]);var ye=ge;function ve(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}var me={"&":"&","<":"<",">":">","‎":"","‏":""," ":" "},be={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},_e={v:"title",lang:"lang"},Ee={rt:"ruby"};function ke(){this.values=Oe(null)}function Te(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}function Ae(e,t,n){var r=e;function i(){var t=ve(e);if(null===t)throw new Le(Le.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.substr(0,3))throw new Le(Le.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),a(),t.endTime=i(),a(),function(e,t){var r=new ke;Te(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line",t.line||"auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}t.position=r.get("position",t.position||"auto"),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}function we(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]+>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return me[e]}function i(e){for(var t;t=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(t[0],r);return e}function a(e,t){return!Ee[t.localName]||Ee[t.localName]===e.localName}function o(t,n){var r=be[t];if(!r)return null;var i=e.document.createElement(r),a=_e[t];return a&&n&&(i[a]=n.trim()),i}for(var s,l=e.document.createElement("div"),u=l,c=[];null!==(s=n());)if("<"!==s[0])u.appendChild(e.document.createTextNode(i(s)));else{if("/"===s[1]){c.length&&c[c.length-1]===s.substr(2).replace(">","")&&(c.pop(),u=u.parentNode);continue}var p=ve(s.substr(1,s.length-2)),d=void 0;if(p){d=e.document.createProcessingInstruction("timestamp",p),u.appendChild(d);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=o(f[1],f[3])))continue;if(!a(u,d))continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),c.push(f[1]),u.appendChild(d),u=d}return l}ke.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var Se=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Ce(e){for(var t=0;t<Se.length;t++){var n=Se[t];if(e>=n[0]&&e<=n[1])return!0}return!1}var xe=function(e){var t,n;function r(t,n,r){var i;i=e.call(this)||this;var a="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent);"undefined"!=typeof WebVTTSet&&(WebVTTSet.fontSet,WebVTTSet.backgroundSet,WebVTTSet.edgeSet),i.cue=n,i.cueDiv=we(t,n.text);var o={color:r.color,backgroundColor:r.backgroundColor,textShadow:r.textShadow,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};a||(o.writingMode=""===n.vertical?"horizontal-tb":"lr"===n.vertical?"vertical-lr":"vertical-rl",o.unicodeBidi="plaintext"),i.applyStyles(o,i.cueDiv),i.div=t.document.createElement("div"),o={textAlign:"middle"===n.align?"center":n.align,font:r.font,whiteSpace:"pre-line",position:"absolute"},a||(o.direction=function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(Ce(n.charCodeAt(a)))return"rtl";return"ltr"}(i.cueDiv),o.writingMode=""===n.vertical?"horizontal-tb":"lr"===n.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),i.applyStyles(o),i.div.appendChild(i.cueDiv);var s=0;switch(n.positionAlign||n.align){case"start":case"left":case"line-left":s=n.position;break;case"center":s=n.position-n.size/2;break;case"end":case"right":case"line-right":s=n.position-n.size}return""===n.vertical?i.applyStyles({left:i.formatStyle(s,"%"),width:i.formatStyle(Math.min(n.size,100-s)||n.size,"%")}):i.applyStyles({top:i.formatStyle(s,"%"),height:i.formatStyle(Math.min(n.size,100-s)||n.size,"%")}),i.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})},i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(function(){function e(){}var t=e.prototype;return t.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},t.formatStyle=function(e,t){return 0===e?0:e+t},e}()),Ie=function(){function e(e){var t,n,r,i;if(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"overlaps",(function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top})),e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=t||e.lineHeight||13}var t=e.prototype;return t.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},t.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},t.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},t.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},t.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},t.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},e.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},e}();function Pe(e,t,n,r){var i=new Ie(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)n[i].mode===$e.MODE.SHOWING&&r++;return-1*++r}(a),s=[];if(a.snapToLines){var l;switch(a.vertical){case"":s=["+y","-y"],l="height";break;case"rl":s=["+x","-x"],l="width";break;case"lr":s=["-x","+x"],l="width"}var u=i.lineHeight,c=u*Math.round(o),p=n[l]+u,d=s[0];Math.abs(c)>p&&(c=c<0?-1:1,c*=Math.ceil(p/u)*u),o<0&&(c+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(d,c)}else{var f=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":o-=f/2;break;case"end":o-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new Ie(t)}var h=function(e,t){for(var i,a=new Ie(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var l=e.intersectPercentage(n);o>l&&(i=new Ie(e),o=l),e=new Ie(a)}return i||a}(i,s);t.move(h.toCSSCompatValues(n))}var De=function(e,t){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]},Re=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Oe=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function Le(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Le.prototype=Oe(Error.prototype),Le.prototype.constructor=Le,Le.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},De.prototype={reportOrThrowError:function(e){if(!(e instanceof Le))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){Te(e,(function(e,n){switch(e){case"Region":!function(e){var n=new ke;if(Te(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new ke;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new pe;r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var a=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Le(Le.Errors.BadSignature);t.state="HEADER"}for(var o=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(o?o=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new Be(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{Ae(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var s=-1!==i.indexOf("--\x3e");if(!i||s&&(o=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new Le(Le.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}};var Ue={"":!0,lr:!0,rl:!0},Fe={start:!0,center:!0,end:!0,left:!0,right:!0};function je(e){return"string"==typeof e&&!!Fe[e.toLowerCase()]&&e.toLowerCase()}var Be,Ve,He,Ke=function(){function e(e,t,n){Ne(this,"hasBeenReset",!1),Ne(this,"displayState",void 0),Ne(this,"_id",""),Ne(this,"_pauseOnExit",!1),Ne(this,"_region",null),Ne(this,"_vertical",""),Ne(this,"_snapToLines",!0),Ne(this,"_line","auto"),Ne(this,"_lineAlign","start"),Ne(this,"_position",50),Ne(this,"_positionAlign","center"),Ne(this,"_size",50),Ne(this,"_align","center"),this._startTime=e,this._endTime=t,this._text=n}var t,n,r=e.prototype;return r.resetCue=function(){this.hasBeenReset=!0},r.getCueAsHTML=function(){return function(e,t){return e&&t?we(e,t):null}(window,this.text)},t=e,(n=[{key:"id",get:function(){return this._id},set:function(e){this._id=""+e}},{key:"pauseOnExit",get:function(){return this._pauseOnExit},set:function(e){this._pauseOnExit=e}},{key:"startTime",get:function(){return this._startTime},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");this._startTime=e,this.resetCue()}},{key:"endTime",get:function(){return this._endTime},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");this._endTime=e,this.resetCue()}},{key:"text",get:function(){return this._text},set:function(e){this._text=""+e,this.resetCue()}},{key:"region",get:function(){return this._region},set:function(e){this._region=e,this.resetCue()}},{key:"vertical",get:function(){return this._vertical},set:function(e){var t=function(e){return"string"==typeof e&&!!Ue[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._vertical=t,this.resetCue())}},{key:"snapToLines",get:function(){return this._snapToLines},set:function(e){this._snapToLines=e,this.resetCue()}},{key:"line",get:function(){return this._line},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");this._line=e,this.resetCue()}},{key:"lineAlign",get:function(){return this._lineAlign},set:function(e){var t=je(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._lineAlign=t,this.resetCue())}},{key:"position",get:function(){return this._position},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");this._position=e,this.resetCue()}},{key:"positionAlign",get:function(){return this._positionAlign},set:function(e){var t=je(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._positionAlign=t,this.resetCue())}},{key:"size",get:function(){return this._size},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");this._size=e,this.resetCue()}},{key:"align",get:function(){return this._align},set:function(e){var t=je(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._align=t,this.resetCue())}}])&&Me(t.prototype,n),e}();function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Be="undefined"!=typeof window&&window.VTTCue?window.VTTCue:Ke;var We,Ye,qe=(He=Ve=function(e){var t,n,r,i;function a(t){var n;return void 0===t&&(t={}),(n=e.call(this,t)||this)._label=n.label||n.language,n._kind=t.kind,n._external=t.external,n._index=a._generateIndex(),n._default=t.default||!1,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a._generateIndex=function(){return a._tracksCount++},a.reset=function(){a._tracksCount=0},r=a,(i=[{key:"kind",get:function(){return this._kind}},{key:"external",get:function(){return this._external}},{key:"default",get:function(){return this._default}}])&&ze(r.prototype,i),a}(re),(Ye="_tracksCount")in(We=Ve)?Object.defineProperty(We,Ye,{value:0,enumerable:!0,configurable:!0,writable:!0}):We[Ye]=0,He);function Xe(e){for(var t,n=[],r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ge(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(t=r()).done;){var i=t.value;if(window.VTTCue&&i instanceof window.VTTCue||window.DataCue&&i instanceof window.DataCue)n.push(i);else if(window.TextTrackCue&&i instanceof window.TextTrackCue)try{n.push(new Be(i.startTime,i.endTime,i.text))}catch(e){new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.UNABLE_TO_CREATE_TEXT_CUE,e)}}return n}qe.MODE={DISABLED:"disabled",SHOWING:"showing",HIDDEN:"hidden"},qe.KIND={METADATA:"metadata",SUBTITLES:"subtitles",CAPTIONS:"captions"},qe.EXTERNAL_TRACK_ID="playkit-external-track",qe.isMetaDataTrack=function(e){return e&&e.kind===qe.KIND.METADATA},qe.isNativeTextTrack=function(e){return e&&[qe.KIND.SUBTITLES,qe.KIND.CAPTIONS].includes(e.kind)},qe.isExternalTrack=function(e){return e&&[e.language,e.label].includes(qe.EXTERNAL_TRACK_ID)};var $e=qe,Qe=Object.freeze({VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image"}),Ze={DASH:"dash",HLS:"hls",PROGRESSIVE:"progressive",IMAGE:"image"},Je={HTML5:"html5",FLASH:"flash",SILVERLIGHT:"silverlight",CAST:"cast",YOUTUBE:"youtube",IMAGE:"image"},et={VOD:"Vod",LIVE:"Live",AUDIO:"Audio",IMAGE:"Image",UNKNOWN:"Unknown"},tt={MANUAL:"manual",AUTO:"auto"},nt={ANONYMOUS:"anonymous",USE_CREDENTIALS:"use-credentials"},rt=function(){function e(){}return e.prototype.callNext=function(e){e&&e()},e}(),it=function(){function e(e){this._actions=e,this._middlewares=new v,this._logger=S("Middleware")}var t=e.prototype;return t.use=function(e){for(var t in this._actions){var n=this._actions[t];"function"==typeof e[n]&&(this._logger.debug("Register <"+e.id+"> for action "+n),this._middlewares.push(n,e[n].bind(e)))}},t.run=function(e,t){var n=this;this._logger.debug("Start middleware chain for action "+e);for(var r=this._middlewares.get(e),i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this._executeMiddleware(r,(function(){n._logger.debug("Finish middleware chain for action "+e),t.apply(void 0,arguments)}),a)},t._executeMiddleware=function(e,t,n){var r=n,i=function(e,t,n){var i;(null==t?void 0:t.length)&&(r=t),(null==(i=r)?void 0:i.length)?e.apply(void 0,r.concat([n])):e(n)};e.reduceRight((function(e,t){return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];i(t,r,e)}}),(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];i(t,n)}))()},e}(),at=function(){function e(){this._middleware=new it(e.Actions)}var t=e.prototype;return t.use=function(e){this._middleware.use(e)},t.load=function(t){this._middleware.run(e.Actions.LOAD,t)},t.play=function(t){this._middleware.run(e.Actions.PLAY,t)},t.pause=function(t){this._middleware.run(e.Actions.PAUSE,t)},t.setCurrentTime=function(t,n){this._middleware.run(e.Actions.SET_CURRENT_TIME,n,t)},e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(at,"Actions",{LOAD:"load",PLAY:"play",PAUSE:"pause",SET_CURRENT_TIME:"setCurrentTime"});var ot={NONE:"none",ANY:"any",NATURAL:"natural",LANDSCAPE:"landscape",PORTRAIT:"portrait",PORTRAIT_PRIMARY:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary",LANDSCAPE_PRIMARY:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary"},st={log:{level:"ERROR"},text:{enableCEA708Captions:!0,useNativeTextTrack:!1,forceCenter:!1,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es"},playback:{audioLanguage:"",textLanguage:"",volume:1,playsinline:!0,preload:"none",autoplay:!1,loop:!1,autopause:!1,allowMutedAutoPlay:!0,muted:!1,pictureInPicture:!0,options:{html5:{hls:{},dash:{},native:{}}},preferNative:{hls:!1,dash:!1},inBrowserFullscreen:!1,screenLockOrientionMode:ot.NONE,playAdsWithMSE:!1,streamPriority:[{engine:"html5",format:"hls"},{engine:"html5",format:"dash"},{engine:"html5",format:"progressive"},{engine:"flash",format:"hls"}]},streaming:{forceBreakStall:!1},abr:{enabled:!0,fpsDroppedFramesInterval:5e3,fpsDroppedMonitoringThreshold:.2,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,restrictions:{minHeight:0,maxHeight:1/0,minWidth:0,maxWidth:1/0,minBitrate:0,maxBitrate:1/0}},drm:{keySystem:""},network:{maxStaleLevelReloads:20}},lt={options:{},metadata:{}},ut=(n(5),{MANIFEST:0,SEGMENT:1,LICENSE:2});function ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pt=function(e){var t,n,r,i;function a(t){var n;n=e.call(this,t)||this;var r=t.url,i=t.width,a=t.height,o=t.duration,s=t.rows,l=t.cols,u=t.customData;return n._url=r,n._width=i,n._height=a,n._duration=o,n._customData=u,n._rows=s||1,n._cols=l||1,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r=a,(i=[{key:"url",get:function(){return this._url}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"duration",get:function(){return this._duration}},{key:"rows",get:function(){return this._rows}},{key:"cols",get:function(){return this._cols}},{key:"customData",get:function(){return this._customData}},{key:"sliceWidth",get:function(){return this._width/this._cols}},{key:"sliceHeight",get:function(){return this._height/this._rows}}])&&ct(r.prototype,i),a}(re);function dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ft=function(){function e(e){var t=e.url,n=e.width,r=e.height,i=e.x,a=e.y;this._url=t,this._width=n,this._height=r,this._x=i,this._y=a}var t,n;return t=e,(n=[{key:"url",get:function(){return this._url}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}}])&&dt(t.prototype,n),e}();function ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yt=function(e){var t,n;function r(t,n,r){var i;return void 0===r&&(r={}),gt(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i=e.call(this)||this),"_capabilities",{fpsControl:!1}),i._videoElement=t,i._sourceObj=n,i._config=r,i._onDurationChanged=function(){i.isLive()&&i._videoElement.paused&&i._trigger(W.TIME_UPDATE)},i._eventManager=new D,i._handleLiveTimeUpdate(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.isSupported=function(){return!0},r.isMSESupported=function(){var e=window.MediaSource||window.WebKitMediaSource;return!!e&&"function"==typeof e.isTypeSupported};var i,a,o=r.prototype;return o.destroy=function(){return this._sourceObj=null,this._config={},this.disableNativeTextTracks(),this._videoElement.removeEventListener(W.DURATION_CHANGE,this._onDurationChanged),this._eventManager.destroy(),Promise.resolve()},o._onTrackChanged=function(e){e instanceof ae?(r._logger.debug("Video track changed",e),this._trigger(Y.VIDEO_TRACK_CHANGED,{selectedVideoTrack:e})):e instanceof oe?(r._logger.debug("Audio track changed",e),this._trigger(Y.AUDIO_TRACK_CHANGED,{selectedAudioTrack:e})):e instanceof $e?(r._logger.debug("Text track changed",e),this._trigger(Y.TEXT_TRACK_CHANGED,{selectedTextTrack:e})):e instanceof pt&&(r._logger.debug("Image track changed",e),this._trigger(Y.IMAGE_TRACK_CHANGED,{selectedImageTrack:e}))},o._trigger=function(e,t){this.dispatchEvent(new m(e,t))},r.canPlayType=function(e,t){return r._throwNotImplementedError("static canPlayType")},o.load=function(){return r._throwNotImplementedError("load")},o.selectVideoTrack=function(e){return r._throwNotImplementedError("selectVideoTrack")},o.selectAudioTrack=function(e){r._throwNotImplementedError("selectAudioTrack")},o.selectTextTrack=function(e){r._throwNotImplementedError("selectTextTrack")},o.selectImageTrack=function(e){},o.hideTextTrack=function(){r._throwNotImplementedError("hideTextTrack")},o.enableAdaptiveBitrate=function(){r._throwNotImplementedError("enableAdaptiveBitrate")},o.isAdaptiveBitrateEnabled=function(){return r._throwNotImplementedError("isAdaptiveBitrateEnabled")},o.applyABRRestriction=function(e){return r._throwNotImplementedError("applyABRRestriction")},o._getLiveEdge=function(){return r._throwNotImplementedError("_getLiveEdge")},o.seekToLiveEdge=function(){r._throwNotImplementedError("seekToLiveEdge")},o.isLive=function(){return r._throwNotImplementedError("isLive")},o.isOnLiveEdge=function(){return this.liveDuration-this._videoElement.currentTime<=2*this.getSegmentDuration()},o.setMaxBitrate=function(e){},o.attachMediaSource=function(){},o.detachMediaSource=function(){},o._handleLiveTimeUpdate=function(){this._videoElement.addEventListener(W.DURATION_CHANGE,this._onDurationChanged)},o.disableNativeTextTracks=function(){Array.from(this._videoElement.textTracks).forEach((function(e){$e.isNativeTextTrack(e)&&!$e.isExternalTrack(e)&&(e.mode=$e.MODE.DISABLED)}))},o.handleMediaError=function(e){return!1},o.getStartTimeOfDvrWindow=function(){return r._throwNotImplementedError("getStartTimeOfDvrWindow")},o.getThumbnail=function(e){return null},o.getSegmentDuration=function(){return r._throwNotImplementedError("getSegmentDuration")},r._throwNotImplementedError=function(e){throw new L(L.Severity.CRITICAL,L.Category.PLAYER,L.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,e)},o.getDrmInfo=function(){return null},i=r,(a=[{key:"liveDuration",get:function(){return r._throwNotImplementedError("liveDuration")}},{key:"src",get:function(){return this._loadPromise&&this._sourceObj?this._sourceObj.url:""},set:function(e){!this._loadPromise&&this._sourceObj&&(this._sourceObj.url=e)}},{key:"capabilities",get:function(){return this._capabilities}},{key:"targetBuffer",get:function(){return NaN}}])&&ht(i.prototype,a),r}(C);function vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mt(e,t){var n=function(e,t){var n=function(e,t,n){return e>=(t||0)&&e<=(n||1/0)},r=t.maxHeight,i=t.minHeight,a=t.maxWidth,o=t.minWidth;if(0!==i||0!==o||r!==1/0||a!==1/0)return e.filter((function(e){return n(e.height,i,r)})).filter((function(e){return n(e.width,o,a)}));var s=t.maxBitrate,l=t.minBitrate;return 0!==l||s!==1/0?e.filter((function(e){return n(e.bandwidth,l,s)})):e}(e,t);return n.length?n:[]}gt(yt,"id","BaseAdapter"),gt(yt,"getLogger",S),gt(yt,"_logger",yt.getLogger(yt.id));var bt={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"},_t=S("FairPlay"),Et=function(){function e(){}return e.isConfigured=function(e,t){return bt.FAIRPLAY===t.keySystem&&!!e.find((function(e){return e.scheme===t.keySystem}))},e.canPlayDrm=function(e){var t=e.some((function(e){return e.scheme===bt.FAIRPLAY}))&&!!window.WebKitMediaKeys;return _t.debug("Can play DRM scheme of: "+bt.FAIRPLAY+" is "+t.toString()),t},e.setDrmPlayback=function(e,t){_t.debug("Sets drm playback");var n=t.find((function(e){return e.scheme===bt.FAIRPLAY}));n&&(e.licenseUrl=n.licenseUrl,e.certificate=n.certificate)},e}(),kt=n(2);function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var At={NEED_KEY:"webkitneedkey",KEY_MESSAGE:"webkitkeymessage",KEY_ADDED:"webkitkeyadded",KEY_ERROR:"webkitkeyerror"},wt=function(){function e(t,n,r,i){var a=this;Tt(this,"_logger",S("FairPlayDrmHandler")),Tt(this,"_retryLicenseRequest",4),Tt(this,"_defaultConfig",{licenseUrl:"",certificate:"",network:{responseFilter:function(t,n){var r={};try{var i=new DataView(n.data),o=(new TextDecoder).decode(i).trim();r=JSON.parse(o)}catch(e){return void a._onError(L.Code.BAD_FAIRPLAY_RESPONSE,{error:e,responseText:n.data})}var s=e._validateResponse(r);s.valid?n.data=e._base64DecodeUint8Array(r.ckc):a._onError(L.Code.BAD_FAIRPLAY_RESPONSE,s)}}}),this._config=F.mergeDeep({},this._defaultConfig,n),this._errorCallback=r,this._drmResponseCallback=i,this._videoElement=t,this._onWebkitNeedKeyHandler=function(e){return a._onWebkitNeedKey(e)},this._eventManager=new D,this._eventManager.listen(this._videoElement,At.NEED_KEY,this._onWebkitNeedKeyHandler)}var t=e.prototype;return t._onWebkitNeedKey=function(t){var n=this;this._logger.debug("Webkit need key triggered");var r=t.target,i=t.initData,a=e._extractContentId(i),o=e._base64DecodeUint8Array(this._config.certificate);if(i=e._concatInitDataIdAndCertificate(i,a,o),!r.webkitKeys){var s=this._selectKeySystem();this._logger.debug("Sets media keys"),r.webkitSetMediaKeys(new window.WebKitMediaKeys(s))}r.webkitKeys||this._onError(L.Code.COULD_NOT_CREATE_MEDIA_KEYS),this._logger.debug("Creates session"),this._keySession=r.webkitKeys.createSession("video/mp4",i),this._keySession||this._onError(L.Code.COULD_NOT_CREATE_KEY_SESSION),this._keySession.contentId=a,this._eventManager.listen(this._keySession,At.KEY_MESSAGE,(function(e){return n._onWebkitKeyMessage(e)})),this._eventManager.listen(this._keySession,At.KEY_ADDED,(function(){return n._onWebkitKeyAdded()})),this._eventManager.listen(this._keySession,At.KEY_ERROR,(function(e){return n._onWebkitKeyError(e)}))},t.getDrmInfo=function(){var e=this._config;return{certificate:e.certificate,licenseUrl:e.licenseUrl,scheme:bt.FAIRPLAY}},t.destroy=function(){this._eventManager.destroy(),this._keySession.close(),this._keySession=null},t._onWebkitKeyMessage=function(t){var n=this;this._logger.debug("Webkit key message triggered");var r=t.message,i=new XMLHttpRequest;i.responseType="arraybuffer",this._eventManager.listenOnce(i,"load",(function(e){return n._licenseRequestLoaded(e)}));var a,o={url:this._config.licenseUrl,body:e._base64EncodeUint8Array(r),headers:{}},s=this._config.network.requestFilter;if(s){this._logger.debug("Apply request filter");try{a=s(ut.LICENSE,o)}catch(e){a=Promise.reject(e)}}(a=a||Promise.resolve(o)).then((function(e){i.open("POST",e.url,!0);var t=!0;e.headers&&Object.entries(e.headers).forEach((function(e){var n=e[0],r=e[1];"string"==typeof r&&i.setRequestHeader(n,r),t&&(t="content-type"!==n.toLowerCase())})),"boolean"==typeof e.withCredentials&&(i.withCredentials=e.withCredentials),t&&i.setRequestHeader("Content-type","application/json"),n._logger.debug("Ready for license request"),i.onerror=function(){n._onError(L.Code.LICENSE_REQUEST_FAILED,{status:i.status,responseText:i.responseText})},n._licenseRequestTime=Date.now(),i.send(e.body)})).catch((function(e){n._errorCallback(new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.REQUEST_FILTER_ERROR,e)),n.destroy()}))},t._onWebkitKeyAdded=function(){this._logger.debug("Decryption key was added to session")},t._onWebkitKeyError=function(e){this._logger.error("A decryption key error was encountered",e),this._retryLicenseRequest<=0&&this._onError(L.Code.LICENSE_REQUEST_FAILED,e.target.error),this._retryLicenseRequest--},t._licenseRequestLoaded=function(e){var t=this;this._logger.debug("License request loaded");var n=e.target;if(n.status>299)this._onError(L.Code.LICENSE_REQUEST_FAILED,{status:n.status,error:n.responseText});else{if(this._drmResponseCallback){var r=Date.now()-this._licenseRequestTime;this._drmResponseCallback({licenseTime:r/1e3,scheme:bt.FAIRPLAY})}var i,a=n.responseURL,o=n.response,s={url:a,originalUrl:this._config.licenseUrl,data:o,headers:V.convertHeadersToDictionary(n.getAllResponseHeaders())};this._logger.debug("Apply response filter");try{i=this._config.network.responseFilter(ut.LICENSE,s)}catch(e){i=Promise.reject(e)}(i=i||Promise.resolve(s)).then((function(e){t._keySession.update(e.data)})).catch((function(e){t._errorCallback(new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.RESPONSE_FILTER_ERROR,e)),t.destroy()}))}},t._onError=function(e,t){this._errorCallback(new L(L.Severity.CRITICAL,L.Category.DRM,e,t))},e._validateResponse=function(e){return e.message&&e.message.indexOf("error")>0||null===e.reference||500===e.status_code?{valid:!1,details:"internal server error"}:""===e.ckc?{valid:!1,details:"ckc is missing"}:{valid:!0}},t._selectKeySystem=function(){var e=null;return window.WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4")?e="com.apple.fps.1_0":this._logger.warn("Key System not supported"),e},e._extractContentId=function(t){var n=document.createElement("a");return n.href=e._arrayToString(t),n.hostname},e._arrayToString=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},e._base64DecodeUint8Array=function(e){for(var t=window.atob(e),n=t.length,r=new Uint8Array(new ArrayBuffer(n)),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r},e._concatInitDataIdAndCertificate=function(t,n,r){"string"==typeof n&&(n=e._stringToArray(n));var i=0,a=new ArrayBuffer(t.byteLength+4+n.byteLength+4+r.byteLength),o=new DataView(a);new Uint8Array(a,i,t.byteLength).set(t),i+=t.byteLength,o.setUint32(i,n.byteLength,!0),i+=4;var s=new Uint8Array(a,i,n.byteLength);return s.set(n),i+=s.byteLength,o.setUint32(i,r.byteLength,!0),i+=4,new Uint8Array(a,i,r.byteLength).set(r),new Uint8Array(a,0,a.byteLength)},e._stringToArray=function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),r=0,i=e.length;r<i;r++)n[r]=e.charCodeAt(r);return n},e._base64EncodeUint8Array=function(e){for(var t,n,r,i,a,o,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;c<e.length;)i=(t=e[c++])>>2,a=(3&t)<<4|(n=c<e.length?e[c++]:Number.NaN)>>4,o=(15&n)<<2|(r=c<e.length?e[c++]:Number.NaN)>>6,s=63&r,isNaN(n)?o=s=64:isNaN(r)&&(s=64),u+=l.charAt(i)+l.charAt(a)+l.charAt(o)+l.charAt(s);return u},e}();function St(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function It(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Tt(wt,"WebkitEvents",At),wt.WebkitEvents=At;var Dt=function(e){var t,n;function r(t,n,i){var a;return r._logger.debug("Creating adapter"),Pt(It(a=e.call(this,t,n,i)||this),"_lastTimeUpdate",0),Pt(It(a),"_waitingEventTriggered",!1),Pt(It(a),"_segmentDuration",0),Pt(It(a),"_mediaErrorRecoveryAttempts",0),Pt(It(a),"_lastTimeDetach",NaN),Pt(It(a),"_startTimeAttach",NaN),Pt(It(a),"_nativeTextTracksMap",{}),Pt(It(a),"_captionsHidden",!1),a._config=F.mergeDeep({},kt,a._config),a._progressiveSources=i.progressiveSources,a._liveEdge=0,a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.canPlayType=function(e){var t=!1;return"string"==typeof e&&(t=!!r.TEST_VIDEO.canPlayType(e.toLowerCase())),r._logger.debug("canPlayType result for mimeType:"+e+" is "+t.toString()),t},r.canPlayDrm=function(e,t){r._drmProtocol=null;for(var n,i=St(r._drmProtocols);!(n=i()).done;){var a=n.value;if(a.isConfigured(e,t)){r._drmProtocol=a;break}}if(!r._drmProtocol)for(var o,s=St(r._drmProtocols);!(o=s()).done;){var l=o.value;l.canPlayDrm(e)&&(r._drmProtocol=l)}return!!r._drmProtocol},r.createAdapter=function(e,t,n){r._logger.debug("createAdapter");var i={displayTextTrack:!1,progressiveSources:[]};if(F.hasPropertyPath(n,"text.useNativeTextTrack")&&(i.displayTextTrack=F.getPropertyPath(n,"text.useNativeTextTrack")),F.hasPropertyPath(n,"sources.progressive")&&(i.progressiveSources=F.getPropertyPath(n,"sources.progressive")),F.hasPropertyPath(n,"text")&&(i.enableCEA708Captions=n.text.enableCEA708Captions,i.captionsTextTrack1Label=n.text.captionsTextTrack1Label,i.captionsTextTrack1LanguageCode=n.text.captionsTextTrack1LanguageCode,i.captionsTextTrack2Label=n.text.captionsTextTrack2Label,i.captionsTextTrack2LanguageCode=n.text.captionsTextTrack2LanguageCode),F.hasPropertyPath(n,"playback")&&F.hasPropertyPath(n.playback,"options.html5.native")&&F.mergeDeep(i,n.playback.options.html5.native),F.hasPropertyPath(n,"abr")){var a=n.abr;a.restrictions&&F.createPropertyPath(i,"abr.restrictions",a.restrictions)}return i.network=n.network,new this(e,t,i)};var i,a,o=r.prototype;return o._dispatchErrorCallback=function(e){this._trigger(W.ERROR,e)},o._dispatchDRMLicenseLoaded=function(e){this._trigger(Y.DRM_LICENSE_LOADED,e)},o._maybeSetDrmPlayback=function(){var e=this;if(r._drmProtocol&&this._sourceObj&&this._sourceObj.drmData){var t={licenseUrl:"",certificate:"",network:this._config.network};r._drmProtocol.setDrmPlayback(t,this._sourceObj.drmData),this._drmHandler=new wt(this._videoElement,t,(function(t){return e._dispatchErrorCallback(t)}),(function(t){return e._dispatchDRMLicenseLoaded(t)}))}},o._setProgressiveSource=function(){var e=function(e,t,n){var r=null;if(n&&e){for(var i,a=[],o=1/0,s=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return vt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(i=s()).done;){var l=i.value,u=Math.abs(l.width-t);u<o?(o=u,a=[l]):u===o&&a.push(l)}for(var c=t/n,p=a,d=1/0,f=0,h=a;f<h.length;f++){var g=h[f];if(g.height){var y=Math.abs(g.width/g.height-c);y<d?(d=y,p=[g]):y===d&&p.push(g)}}for(var v=0,m=0,b=p;m<b.length;m++){var _=b[m];(_.bandwidth>v||!_.bandwidth)&&(v=_.bandwidth||v,r=_)}}return r}(this._progressiveSources,this._videoElement.offsetWidth,this._videoElement.offsetHeight);e&&(this._sourceObj=e)},o._isProgressivePlayback=function(){return!!this._sourceObj&&r._progressiveMimeTypes.includes(this._sourceObj.mimetype.toLowerCase())},o.load=function(e){var t=this;return this._wasCurrentTimeSetSuccessfully=!1,this._maybeSetDrmPlayback(),this._loadPromise||(this._loadPromise=new Promise((function(n,r){t._lastTimeUpdate=e||0;var i=t._startTimeAttach||e||0;t._loadPromiseReject=r,t._eventManager.listenOnce(t._videoElement,W.LOADED_DATA,(function(){return t._onLoadedData(n,i)})),t._eventManager.listenOnce(t._videoElement,W.PLAYING,(function(){return t._onPlaying(i)})),t._eventManager.listen(t._videoElement,W.TIME_UPDATE,(function(){return t._onTimeUpdate()})),t._eventManager.listen(t._videoElement,W.PLAY,(function(){return t._resetHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.PAUSE,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.ENDED,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.ABORT,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.SEEKED,(function(){return t._syncCurrentTime()})),t._eventManager.listen(t._videoElement,W.WAITING,(function(){return t._waitingEventTriggered=!0})),t._eventManager.listen(t._videoElement,W.PLAYING,(function(){return t._waitingEventTriggered=!1})),t._eventManager.listen(window,"focus",(function(){setTimeout((function(){g.isIOS&&(t._videoElement.currentTime=t._videoElement.currentTime>.1?t._videoElement.currentTime-.1:0),t._syncCurrentTime()}),1e3)})),t._isProgressivePlayback()&&t._setProgressiveSource(),t._sourceObj&&t._sourceObj.url?t._setSrc().then((function(){t._trigger(Y.ABR_MODE_CHANGED,{mode:t._isProgressivePlayback()?"manual":"auto"}),t._videoElement.load()})):t._videoElement.load()}))),this._loadPromise},o._handleDecodeError=function(e){var t=this;r._logger.debug("handleDecodeError",e);var n=this._videoElement.currentTime,i=this._getActivePKAudioTrack(),a=this._getActivePKTextTrack();this._videoElement.load(),this._eventManager.listenOnce(this._videoElement,W.PLAYING,(function(){t._mediaErrorRecoveryAttempts=0})),this._eventManager.listenOnce(this._videoElement,W.CAN_PLAY,(function(){r._logger.debug("CAN_PLAY"),t._videoElement.currentTime=n,t._videoElement.play(),t._videoElement.pause(),i&&t.selectAudioTrack(i),a?t.selectTextTrack(a):t.disableNativeTextTracks()}))},o.handleMediaError=function(e){return this._loadPromiseReject?(this._loadPromiseReject(new L(L.Severity.CRITICAL,L.Category.MEDIA,L.Code.NATIVE_ADAPTER_LOAD_FAILED,e)),!0):!!(e&&e.code===window.MediaError.MEDIA_ERR_DECODE&&(this._mediaErrorRecoveryAttempts++,this._mediaErrorRecoveryAttempts<=3))&&(this._handleDecodeError(e),!0)},o.attachMediaSource=function(){this._startTimeAttach=this._lastTimeDetach,this._lastTimeDetach=NaN},o.detachMediaSource=function(){this._lastTimeDetach=this._videoElement.currentTime,this._videoElement&&this._videoElement.src&&(B.setAttribute(this._videoElement,"src",""),B.removeAttribute(this._videoElement,"src")),this._loadPromise=null},o._setSrc=function(){var e,t=this,n={url:this._sourceObj?this._sourceObj.url:"",body:null,headers:{}};if("function"==typeof F.getPropertyPath(this._config,"network.requestFilter"))try{r._logger.debug("Apply request filter"),e=this._config.network.requestFilter(ut.MANIFEST,n)}catch(t){e=Promise.reject(t)}return(e=e||Promise.resolve(n)).then((function(e){t._videoElement.src=e.url})).catch((function(e){t._trigger(W.ERROR,new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.REQUEST_FILTER_ERROR,e))})),e},o._onPlaying=function(e){this.isLive()&&this._setStartTime(e)},o._onLoadedData=function(e,t){var n=this,i=function(){n._playerTracks=n._getParsedTracks(),n._addNativeAudioTrackChangeListener(),n._addNativeTextTrackChangeListener(),n._addNativeTextTrackAddedListener(),r._logger.debug("The source has been loaded successfully"),n._loadPromiseReject=null,e({tracks:n._playerTracks}),n.isLive()&&n._handleLiveDurationChange()};this.isLive()||this._setStartTime(t),this._videoElement.textTracks.length>0?i():this._eventManager.listenOnce(this._videoElement,W.CAN_PLAY,i.bind(this)),this._startTimeAttach=NaN},o._setStartTime=function(e){e&&e>-1&&(this._videoElement.currentTime=e),this._wasCurrentTimeSetSuccessfully=!0},o._onTimeUpdate=function(){this._videoElement.paused||(this._videoElement.currentTime>this._lastTimeUpdate?(this._waitingEventTriggered&&(this._waitingEventTriggered=!1,this._trigger(W.PLAYING)),this._resetHeartbeatTimeout()):this._videoElement.currentTime<this._lastTimeUpdate?this._syncCurrentTime():(this._waitingEventTriggered=!0,this._trigger(W.WAITING))),this._handleVideoTracksChange()},o._syncCurrentTime=function(){this._lastTimeUpdate=this._videoElement.currentTime},o._resetHeartbeatTimeout=function(){var e=this;this._lastTimeUpdate=this._videoElement.currentTime,this._clearHeartbeatTimeout(),this._heartbeatTimeoutId=setTimeout((function(){e._clearHeartbeatTimeout(),e._trigger(W.ERROR,new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.TIMEOUT,"The player exceeded max buffer time of "+e._config.heartbeatTimeout+" ms. No progress has been done during this time."))}),this._config.heartbeatTimeout)},o._clearHeartbeatTimeout=function(){this._heartbeatTimeoutId&&(clearTimeout(this._heartbeatTimeoutId),this._heartbeatTimeoutId=null)},o._handleVideoTracksChange=function(){if(!this._isProgressivePlayback()){var e=this._videoElement,t=e.videoHeight,n=e.videoWidth,r=e.videoTracks;if(!this._videoDimensions||t!==this._videoDimensions.videoHeight||n!==this._videoDimensions.videoWidth){this._videoDimensions={videoHeight:t,videoWidth:n};var i={language:"",height:t,width:n,active:!0,index:Array.from(r).findIndex((function(e){return e.selected}))};this._onTrackChanged(new ae(i))}}},o.destroy=function(){var t=this;return r._logger.debug("destroy"),new Promise((function(n,r){e.prototype.destroy.call(t).then((function(){t._drmHandler&&t._drmHandler.destroy(),t._waitingEventTriggered=!1,t._progressiveSources=[],t._loadPromise=null,t._nativeTextTracksMap={},t._loadPromiseReject=null,t._liveEdge=0,t._lastTimeUpdate=0,t._lastTimeDetach=NaN,t._startTimeAttach=NaN,t._videoDimensions=null,t._clearHeartbeatTimeout(),t._liveDurationChangeInterval&&(clearInterval(t._liveDurationChangeInterval),t._liveDurationChangeInterval=null),n()}),(function(){return r}))}))},o._getParsedTracks=function(){var e=this._getParsedVideoTracks(),t=this._getParsedAudioTracks(),n=this._getParsedTextTracks();return e.concat(t).concat(n)},o._getParsedVideoTracks=function(){return this._isProgressivePlayback()?this._getParsedProgressiveVideoTracks():this._getParsedAdaptiveVideoTracks()},o._getParsedProgressiveVideoTracks=function(){var e=this._progressiveSources,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,bandwidth:e[n].bandwidth,width:e[n].width,height:e[n].height,active:!!this._sourceObj&&e[n].id===this._sourceObj.id,index:n};t.push(new ae(r))}return t},o._getParsedAdaptiveVideoTracks=function(){var e=this._videoElement.videoTracks,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].selected,label:e[n].label,language:e[n].language,index:n};t.push(new ae(r))}return t},o._getParsedAudioTracks=function(){var e=this._videoElement.audioTracks,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].enabled,label:e[n].label,language:e[n].language,index:n};t.push(new oe(r))}return t},o._getParsedTextTracks=function(){var e=[this._config.captionsTextTrack1Label,this._config.captionsTextTrack2Label],t=[this._config.captionsTextTrack1LanguageCode,this._config.captionsTextTrack2LanguageCode],n=this._videoElement.textTracks,r=[];if(n){for(var i=0;i<n.length;i++)if(!$e.isExternalTrack(n[i])){var a={kind:n[i].kind,active:n[i].mode===$e.MODE.SHOWING,label:n[i].label,language:n[i].language,available:!0};if(a.kind===$e.KIND.SUBTITLES){var o=new $e(a);r.push(o),this._nativeTextTracksMap[o.index]=n[i]}else if(a.kind===$e.KIND.CAPTIONS&&this._config.enableCEA708Captions){a.label=a.label||e.shift(),a.language=a.language||t.shift(),a.available=this._captionsHidden;var s=new $e(a);r.push(s),this._nativeTextTracksMap[s.index]=n[i]}}this._captionsHidden||this._maybeShow708Captions()}return r},o._maybeShow708Captions=function(){var e=this,t=Array.from(this._videoElement.textTracks).filter((function(e){return e.kind===$e.KIND.CAPTIONS})),n=t.find((function(e){return e.mode===$e.MODE.SHOWING||e.mode===$e.MODE.HIDDEN}))||t[0];n&&(n.mode=$e.MODE.HIDDEN,this._captionsHidden=!0,this._eventManager.listenOnce(n,"cuechange",(function(){e._getPKTextTracks().forEach((function(e){return(e.available=!0)&&(e.mode=$e.MODE.DISABLED)})),e._trigger(Y.TRACKS_CHANGED,{tracks:e._playerTracks})})))},o.selectVideoTrack=function(e){this._isProgressivePlayback()?this._selectProgressiveVideoTrack(e):this.selectAdaptiveVideoTrack(e)},o._selectProgressiveVideoTrack=function(e){var t=this,n=this._progressiveSources;if(e instanceof ae&&n&&n[e.index]){var r=this._videoElement.currentTime,i=this._videoElement.paused;e.active=!0,this._sourceObj=n[e.index],this._eventManager.listenOnce(this._videoElement,W.LOADED_DATA,(function(){"Android Browser"===g.browser.name?(t._eventManager.listenOnce(t._videoElement,W.DURATION_CHANGE,(function(){t._videoElement.currentTime=r})),t._eventManager.listenOnce(t._videoElement,W.SEEKED,(function(){t._onTrackChanged(e),i&&t._videoElement.pause()})),t._videoElement.play()):(t._eventManager.listenOnce(t._videoElement,W.SEEKED,(function(){t._onTrackChanged(e)})),t._videoElement.currentTime=r,i||t._videoElement.play())})),this._setSrc()}},o.selectAdaptiveVideoTrack=function(e){var t=this._videoElement.videoTracks;e instanceof ae&&t&&t[e.index]&&(this._disableVideoTracks(),t[e.index].selected=!0,this._onTrackChanged(e))},o.selectAudioTrack=function(e){r._logger.debug("selectAudioTrack");var t=this._videoElement.audioTracks;e instanceof oe&&t&&t[e.index]&&(this._removeNativeAudioTrackChangeListener(),this._switchAudioTrack(e.index),this._onTrackChanged(e),this._addNativeAudioTrackChangeListener())},o._removeNativeAudioTrackChangeListener=function(){this._videoElement.audioTracks&&this._eventManager.unlisten(this._videoElement.audioTracks,"change")},o._addNativeAudioTrackChangeListener=function(){var e=this;this._videoElement.audioTracks&&this._eventManager.listen(this._videoElement.audioTracks,"change",(function(){return e._onNativeAudioTrackChange()}))},o._getPKAudioTracks=function(){return this._playerTracks.filter((function(e){return e instanceof oe}))},o._getActivePKAudioTrack=function(){return this._getPKAudioTracks().find((function(e){return!0===e.active}))},o._onNativeAudioTrackChange=function(){var e=this,t=function(){for(var t=0;t<e._videoElement.audioTracks.length;t++)if(e._videoElement.audioTracks[t].enabled)return t;return-1}(),n=this._getActivePKAudioTrack(),i=n?n.index:-1;if(t!==i){var a=this._getPKAudioTracks().find((function(e){return e.index===t}));a&&(r._logger.debug("Native selection of track, update the player audio track ("+i+" -> "+t+")"),this._onTrackChanged(a))}},o.selectTextTrack=function(e){if(e instanceof $e&&$e.isNativeTextTrack(e)){this._removeNativeTextTrackChangeListener();var t=this._nativeTextTracksMap[e.index];t&&(this.disableNativeTextTracks(),t.mode=this._getDisplayTextTrackModeString(),this._onTrackChanged(e),this._addNativeTextTrackChangeListener())}},o._removeNativeTextTrackChangeListener=function(){this._videoElement.textTracks&&this._eventManager.unlisten(this._videoElement.textTracks,"change")},o._addNativeTextTrackChangeListener=function(){var e=this;this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"change",(function(){return e._onNativeTextTrackChange()}))},o._getPKTextTracks=function(){return this._playerTracks.filter((function(e){return e instanceof $e}))},o._getActivePKTextTrack=function(){return this._getPKTextTracks().find((function(e){return!0===e.active}))},o._onNativeTextTrackChange=function(){var e=this,t=this._getPKTextTracks(),n=t.find((function(e){return"off"===e.language})),i=function(){for(var t in e._nativeTextTracksMap)if(e._getDisplayTextTrackModeString()===e._nativeTextTracksMap[t].mode)return Number(t);return-1}(),a=this._getActivePKTextTrack(),o=a?a.index:-1;if(i!==o)if(-1==i)n&&(r._logger.debug("Native selection of track, update the player text track ("+o+" -> off)"),this._onTrackChanged(n));else{var s=t.find((function(e){return e.index===i}));s&&(r._logger.debug("Native selection of track, update the player text track ("+o+" -> "+i+")"),this._onTrackChanged(s))}},o._getDisplayTextTrackModeString=function(){return this._config.displayTextTrack?$e.MODE.SHOWING:$e.MODE.HIDDEN},o._addNativeTextTrackAddedListener=function(){var e=this;!this._config.displayTextTrack&&this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"addtrack",(function(){return e._onNativeTextTrackAdded()}))},o._onNativeTextTrackAdded=function(){this._playerTracks=this._getParsedTracks(),this._trigger(Y.TRACKS_CHANGED,{tracks:this._playerTracks})},o.hideTextTrack=function(){this.disableNativeTextTracks()},o.enableAdaptiveBitrate=function(){r._logger.warn("Enabling adaptive bitrate is not supported for native playback")},o.isAdaptiveBitrateEnabled=function(){return!this._isProgressivePlayback()},o.applyABRRestriction=function(e){F.createPropertyPath(this._config,"abr.restrictions",e),this._maybeApplyAbrRestrictions(e)},o._maybeApplyAbrRestrictions=function(e){if(this._isProgressivePlayback()){var t=mt(this._playerTracks.filter((function(e){return e instanceof ae})),e);!t.find((function(e){return e.active}))&&t.length?this.selectVideoTrack(t[0]):r._logger.warn("Invalid restrictions, there are not tracks within the restriction range")}},o._disableVideoTracks=function(){var e=this._videoElement.videoTracks;if(e)for(var t=0;t<e.length;t++)e[t].selected=!1},o._switchAudioTrack=function(e){r._logger.debug("_switchAudioTracks");var t=this._videoElement.audioTracks;if(t)for(var n=0;n<t.length;n++)t[n].enabled=n==e},o._getLiveEdge=function(){return this._videoElement.seekable.length?this._videoElement.seekable.end(this._videoElement.seekable.length-1):this._videoElement.buffered.length?this._videoElement.buffered.end(this._videoElement.buffered.length-1):this._videoElement.duration},o.seekToLiveEdge=function(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}},o.getSegmentDuration=function(){return this._segmentDuration},o.isLive=function(){return this._videoElement.duration===1/0},o.isOnLiveEdge=function(){return!!this._wasCurrentTimeSetSuccessfully&&e.prototype.isOnLiveEdge.call(this)},o._handleLiveDurationChange=function(){var e=this;this._liveDurationChangeInterval=setInterval((function(){e._calculateSegmentDuration();var t=e._getLiveEdge();e._liveEdge!==t&&(e._liveEdge=t,e._videoElement.dispatchEvent(new window.Event(W.DURATION_CHANGE)))}),1e3)},o._calculateSegmentDuration=function(){if(0===this._videoElement.seekable.start(0)){var e=this._videoElement,t=e.buffered,n=e.seekable;t.length&&n.length&&(this._segmentDuration=(t.end(t.length-1)-n.end(n.length-1))/3)}else{var r=this._getLiveEdge();this._liveEdge&&this._liveEdge!==r&&(this._segmentDuration=r-this._liveEdge)}},o.getStartTimeOfDvrWindow=function(){return this.isLive()&&this._videoElement.seekable.length?this._videoElement.seekable.start(0):0},o.getDrmInfo=function(){return this._drmHandler?this._drmHandler.getDrmInfo():null},i=r,(a=[{key:"liveDuration",get:function(){return this._getLiveEdge()}}])&&xt(i.prototype,a),r}(yt);function Rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Pt(Dt,"id","NativeAdapter"),Pt(Dt,"_logger",yt.getLogger(Dt.id)),Pt(Dt,"TEST_VIDEO",B.createElement("video")),Pt(Dt,"_drmProtocols",[Et]),Pt(Dt,"_drmProtocol",null),Pt(Dt,"_progressiveMimeTypes",["video/mp4","audio/mp3"]);var Ot=function(){function e(){}return e.register=function(t){t&&(e._mediaSourceAdapters.includes(t)?e._logger.debug("Adapter <"+t.id+"> is already registered, do not register again"):(e._logger.debug("Adapter <"+t.id+"> has been registered successfully"),e._mediaSourceAdapters.push(t)))},e.unRegister=function(t){var n=e._mediaSourceAdapters.indexOf(t);n>-1&&(e._logger.debug("Unregistered <"+t.id+"> adapter"),e._mediaSourceAdapters.splice(n,1))},e.canPlaySource=function(t,n,r){void 0===n&&(n=!0),e._orderMediaSourceAdapters(n);var i=e._mediaSourceAdapters;if(t&&t.mimetype)for(var a=0;a<i.length;a++)if(i[a].canPlayType(t.mimetype)&&(!t.drmData||i[a].canPlayDrm(t.drmData,r)))return e._selectedAdapter=i[a],e._logger.debug("Selected adapter is <"+e._selectedAdapter.id+">"),!0;return!1},e._orderMediaSourceAdapters=function(t){e._mediaSourceAdapters=e._mediaSourceAdapters.filter((function(e){return"NativeAdapter"!==e.id})),t?e._mediaSourceAdapters.unshift(Dt):e._mediaSourceAdapters.push(Dt)},e.getMediaSourceAdapter=function(t,n,r){return t&&n&&r?(e._selectedAdapter||e.canPlaySource(n,!0,r.drm),e._selectedAdapter?e._selectedAdapter.createAdapter(t,n,r):null):null},e.destroy=function(){e._selectedAdapter=null},e}();Rt(Ot,"_logger",S("MediaSourceProvider")),Rt(Ot,"_mediaSourceAdapters",[Dt]),Rt(Ot,"_selectedAdapter",null);var Lt=Ot.register,Mt=function(e,t,n,r,i){this.startTime=e,this.endTime=t,this.id=n,this.type=r,this.metadata=i};function Nt(e){try{var t=e.startTime,n=e.endTime,r=e.id,i=e.type,a=e.metadata,o={};window.VTTCue?o=new window.VTTCue(t,n,""):window.TextTrackCue&&(o=new window.TextTrackCue(t,n,""));var s={key:i,data:a};return o.id=r,o.value=s,o}catch(e){return null}}function Ut(e){if(e){var t=e.startTime,n=e.endTime,r=e.id;if(Ft(e)){var i=Ft(e),a=i.type,o=i.metadata;return new Mt(t,n,r,a,o)}}return null}function Ft(e){if(e){var t=e.type,n=e.value,r=e.track;if(n){var i=n.key,a=n.data,o="org.id3"===t||"id3"===(r&&r.label),s=Object.values(Mt.TYPE).find((function(e){return e===i}));return s||(s=o?Mt.TYPE.ID3:Mt.TYPE.CUSTOM),{type:s,metadata:o||!a?n:a}}}return null}Mt.TYPE={ID3:"id3",EMSG:"emsg",CUE_POINT:"cuepoint",CUSTOM:"custom"};var jt,Bt,Vt=n(3);function Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kt=(Bt=jt=function(){function e(){}return e.runCapability=function(){e._capabilities.autoplay||"boolean"==typeof e._capabilities.autoplay&&"boolean"==typeof e._capabilities.mutedAutoPlay?e._playPromiseResult=Promise.resolve(e._capabilities):(e._vid||(e._vid=B.createElement("video"),e._vid.src=Vt.a,e._vid.setAttribute("playsinline","")),e._playPromiseResult=new Promise((function(t){e._setMuted(!1),e._getPlayPromise().then((function(){return t({autoplay:!0,mutedAutoPlay:!0})})).catch((function(){e._setMuted(!0),e._getPlayPromise().then((function(){return t({autoplay:!1,mutedAutoPlay:!0})})).catch((function(){return t({autoplay:!1,mutedAutoPlay:!1})}))}))})))},e.getCapability=function(){return e._playPromiseResult.then((function(t){var n;return t.autoplay?n=Promise.resolve(t):(e.runCapability(),n=e._playPromiseResult),n.then((function(t){return F.mergeDeep(t,e._capabilities)}))}))},e.setCapabilities=function(t){e._logger.debug("Set player capabilities",t);var n=t.autoplay,r=t.mutedAutoPlay;"boolean"==typeof n&&(e._capabilities.autoplay=n),"boolean"==typeof r&&(e._capabilities.mutedAutoPlay=r)},e._getPlayPromise=function(){return e._vid.play()||e._forcePromiseReturnValue()},e._setMuted=function(t){t?(e._vid.muted=!0,e._vid.setAttribute("muted","")):(e._vid.muted=!1,e._vid.removeAttribute("muted"))},e._forcePromiseReturnValue=function(){return new Promise((function(t,n){e._vid.addEventListener(W.ERROR,(function(){n()}));var r=setTimeout((function(){e._logger.debug("Timeout 500 ms has been reached"),n()}),500);!0===e._vid.paused?(clearTimeout(r),n()):(clearTimeout(r),t())}))},e}(),Ht(jt,"_logger",S("Html5AutoPlayCapability")),Ht(jt,"_capabilities",{}),Bt);function Gt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wt=function(e){var t,n;function r(t,n,i){var a;return zt(Gt(a=e.call(this)||this),"_droppedFramesInterval",null),zt(Gt(a),"_lastDroppedFrames",0),zt(Gt(a),"_lastDecodedFrames",0),zt(Gt(a),"_lastTime",0),zt(Gt(a),"_currentBitrate",0),a._eventManager=new D,a._mediaSourceAdapter=t,a._config=n,a._videoElement=i,a._mediaSourceAdapter.capabilities.fpsControl?(a._eventManager.listen(a._mediaSourceAdapter,Y.FPS_DROP,(function(e){return a._triggerFPSDrop(e.payload.data)})),Gt(a)):(-1===a._getDroppedAndDecodedFrames()[0]?r._logger.debug("Dropped frame watcher is not supported"):a._config.capLevelOnFPSDrop?(r._logger.debug("Initialized capLevelOnFPSDrop = true"),a._init()):r._logger.debug("Not Initialized"),a)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._init=function(){var e=this;this._eventManager.listen(this._mediaSourceAdapter,Y.VIDEO_TRACK_CHANGED,(function(t){return e._currentBitrate=t.payload.selectedVideoTrack.bandwidth})),this._droppedFramesInterval=setInterval((function(){return e._checkFPS()}),this._config.fpsDroppedFramesInterval)},i._triggerFPSDrop=function(e){this.dispatchEvent(new m(Y.FPS_DROP,e))},i._getDroppedAndDecodedFrames=function(){if("function"==typeof this._videoElement.getVideoPlaybackQuality){var e=this._videoElement.getVideoPlaybackQuality();return[e.droppedVideoFrames,e.totalVideoFrames]}return"number"==typeof this._videoElement.webkitDroppedFrameCount&&"number"==typeof this._videoElement.webkitDecodedFrameCount?[this._videoElement.webkitDroppedFrameCount,this._videoElement.webkitDecodedFrameCount]:[-1,-1]},i._checkFPS=function(){var e=this._getDroppedAndDecodedFrames(),t=e[0],n=e[1];try{var i=performance.now();if(n){if(this._lastTime){var a=i-this._lastTime,o=t-this._lastDroppedFrames,s=n-this._lastDecodedFrames,l=1e3*o/a;l>0&&(r._logger.debug("checkFPS : droppedFPS/decodedFPS:"+l/(1e3*s/a)),o>this._config.fpsDroppedMonitoringThreshold*s&&(this._mediaSourceAdapter.setMaxBitrate(this._currentBitrate-1),this._triggerFPSDrop({currentDropped:o,currentDecoded:s,totalDroppedFrames:l})))}this._lastTime=i,this._lastDroppedFrames=t,this._lastDecodedFrames=n}}catch(e){r._logger.error("Error occur while trying to check dropFrames: ",e)}},i.destroy=function(){this._droppedFramesInterval&&clearInterval(this._droppedFramesInterval),this._droppedFramesInterval=null,this._eventManager.destroy()},r}(C);function Yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}zt(Wt,"_logger",S("droppedFramesWatcher"));var Xt=function(e){var t,n;function r(t,n,r){var i;return qt(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i=e.call(this)||this),"_reset",!1),i._eventManager=new D,i._canLoadMediaSourceAdapterPromise=Promise.resolve(),i._createVideoElement(r),i._init(t,n),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.isSupported=function(){try{var e=B.createElement("video");return e.volume=.5,!!e.canPlayType}catch(e){return!1}},r.createEngine=function(e,t,n){return new this(e,t,n)},r.canPlaySource=function(e,t,n){return Ot.canPlaySource(e,t,n)},r.runCapabilities=function(){r._capabilities.forEach((function(e){return e.runCapability()}))},r.getCapabilities=function(){var e=[];return r._capabilities.forEach((function(t){return e.push(t.getCapability())})),Promise.all(e).then((function(e){var t,n={};return e.forEach((function(e){return Object.assign(n,e)})),(t={})[r.id]=n,t}))},r.setCapabilities=function(e){r._capabilities.forEach((function(t){return t.setCapabilities(e)}))},r.prepareVideoElement=function(e){if(!r.videoElementStore[e]){r._logger.debug("Create the video element for playing "+e);var t=B.createElement("video");r.videoElementStore[e]=t}r._logger.debug("Prepare the video element for playing "+e),r.videoElementStore[e].load()};var i,a,o=r.prototype;return o.restore=function(e,t){this.reset(),this._init(e,t)},o.reset=function(){var e=this;this._reset||(this._reset=!0,this._eventManager.removeAll(),this._droppedFramesWatcher&&(this._droppedFramesWatcher.destroy(),this._droppedFramesWatcher=null),this._canLoadMediaSourceAdapterPromise=new Promise((function(t,n){var r=e._mediaSourceAdapter?e._mediaSourceAdapter.destroy():Promise.resolve();e._el&&e._el.src?r.then((function(){B.setAttribute(e._el,"src",""),B.removeAttribute(e._el,"src"),t()}),n):r.then(t,n)})),this._mediaSourceAdapter=null)},o.destroy=function(){this.detach(),this._el&&(this.pause(),B.removeAttribute(this._el,"src"),B.removeChild(this._el.parentNode,this._el)),this._eventManager.destroy(),Ot.destroy(),this._droppedFramesWatcher&&(this._droppedFramesWatcher.destroy(),this._droppedFramesWatcher=null),this._mediaSourceAdapter&&(this._mediaSourceAdapter.destroy(),this._mediaSourceAdapter=null)},o.attachMediaSource=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.attachMediaSource()},o.detachMediaSource=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.detachMediaSource()},o.attach=function(){var e=this;Object.keys(W).forEach((function(t){[W.ERROR,W.WAITING].includes(W[t])||e._eventManager.listen(e._el,W[t],(function(){return e.dispatchEvent(new m(W[t]))}))})),this._eventManager.listen(this._el,W.ERROR,(function(){return e._handleVideoError()})),this._eventManager.listen(this._el,W.WAITING,(function(){return e._handleWaiting()})),this._handleMetadataTrackEvents(),this._eventManager.listen(this._el.textTracks,"addtrack",(function(t){$e.isNativeTextTrack(t.track)&&e.dispatchEvent(new m(Y.TEXT_TRACK_ADDED,{track:t.track}))}));var t=this._mediaSourceAdapter;t&&(this._eventManager.listen(t,Y.VIDEO_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.AUDIO_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.TEXT_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.IMAGE_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.ABR_MODE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.TEXT_CUE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.TRACKS_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.FRAG_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.DRM_LICENSE_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.MANIFEST_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,W.ERROR,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,W.TIME_UPDATE,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,W.PLAYING,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,W.WAITING,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.MEDIA_RECOVERED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.TIMED_METADATA_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,"hlsFragParsingMetadata",(function(t){return e.dispatchEvent(t)})),this._droppedFramesWatcher&&this._eventManager.listen(this._droppedFramesWatcher,Y.FPS_DROP,(function(t){return e.dispatchEvent(t)})))},o.detach=function(){var e=this;Object.keys(W).forEach((function(t){e._eventManager.unlisten(e._el,W[t])})),this._mediaSourceAdapter&&(this._eventManager.unlisten(this._mediaSourceAdapter,Y.VIDEO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,Y.AUDIO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,Y.TEXT_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,Y.TEXT_CUE_CHANGED))},o.getVideoElement=function(){return this._el},o.selectVideoTrack=function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectVideoTrack(e)},o.selectAudioTrack=function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectAudioTrack(e)},o.selectTextTrack=function(e){this._removeCueChangeListeners(),this._mediaSourceAdapter&&this._mediaSourceAdapter.selectTextTrack(e),this.resetAllCues(),this._addCueChangeListener()},o.selectImageTrack=function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectImageTrack(e)},o.hideTextTrack=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.hideTextTrack(),this._removeCueChangeListeners()},o.enableAdaptiveBitrate=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.enableAdaptiveBitrate()},o.isAdaptiveBitrateEnabled=function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isAdaptiveBitrateEnabled()},o.applyABRRestriction=function(e){if(this._mediaSourceAdapter)return this._mediaSourceAdapter.applyABRRestriction(e)},o.seekToLiveEdge=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.seekToLiveEdge()},o.isOnLiveEdge=function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isOnLiveEdge()},o.getStartTimeOfDvrWindow=function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.getStartTimeOfDvrWindow():0},o.isLive=function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isLive()},o.play=function(){var e=this,t=this._el.play();return t&&t.catch((function(t){return e.dispatchEvent(new m(Y.PLAY_FAILED,{error:t}))})),t},o.pause=function(){return this._el.pause()},o.load=function(e){var t=this;return this._el.load(),this._canLoadMediaSourceAdapterPromise.then((function(){return t._mediaSourceAdapter?t._mediaSourceAdapter.load(e):Promise.resolve({})})).catch((function(e){return t.dispatchEvent(new m(W.ERROR,e)),Promise.reject(e)}))},o.enterPictureInPicture=function(){var e=this;try{document.pictureInPictureEnabled&&"function"==typeof this._el.requestPictureInPicture?this._el.requestPictureInPicture().catch((function(t){e.dispatchEvent(new m(W.ERROR,new L(L.Severity.RECOVERABLE,L.Category.PLAYER,L.Code.ENTER_PICTURE_IN_PICTURE_FAILED,t)))})):"function"==typeof this._el.webkitSetPresentationMode&&(this._el.webkitSetPresentationMode("picture-in-picture"),setTimeout((function(){return e.dispatchEvent(new m(W.ENTER_PICTURE_IN_PICTURE))}),0))}catch(e){this.dispatchEvent(new m(W.ERROR,new L(L.Severity.RECOVERABLE,L.Category.PLAYER,L.Code.ENTER_PICTURE_IN_PICTURE_FAILED,e)))}},o.exitPictureInPicture=function(){var e=this;try{document.pictureInPictureEnabled&&"function"==typeof document.exitPictureInPicture&&this._el===document.pictureInPictureElement?document.exitPictureInPicture().catch((function(t){e.dispatchEvent(new m(W.ERROR,new L(L.Severity.RECOVERABLE,L.Category.PLAYER,L.Code.EXIT_PICTURE_IN_PICTURE_FAILED,t)))})):"function"==typeof this._el.webkitSetPresentationMode&&this._el.webkitSetPresentationMode("inline")}catch(e){this.dispatchEvent(new m(W.ERROR,new L(L.Severity.RECOVERABLE,L.Category.PLAYER,L.Code.EXIT_PICTURE_IN_PICTURE_FAILED,e)))}},o.isPictureInPictureSupported=function(){return"function"==typeof this._el.webkitSupportsPresentationMode?this._el.webkitSupportsPresentationMode("picture-in-picture"):!!document.pictureInPictureEnabled},o.getThumbnail=function(e){if(this._mediaSourceAdapter)return this._mediaSourceAdapter.getThumbnail(e)},o._init=function(e,t){this._config=t,this._reset=!1,this._loadMediaSourceAdapter(e),this.attach()},o._createVideoElement=function(e){this._el=r.videoElementStore[e]||B.createElement("video"),this._el.id=j.uniqueId(5),this._el.controls=!1},o._loadMediaSourceAdapter=function(e){this._mediaSourceAdapter=Ot.getMediaSourceAdapter(this.getVideoElement(),e,this._config),this._mediaSourceAdapter&&(this._droppedFramesWatcher=new Wt(this._mediaSourceAdapter,this._config.abr,this._el))},o._addCueChangeListener=function(){var e=this,t=Array.from(this._el.textTracks).find((function(e){return $e.isNativeTextTrack(e)&&e.mode!==$e.MODE.DISABLED}));t&&this._eventManager.listen(t,"cuechange",(function(t){return e._onCueChange(t)}))},o._removeCueChangeListeners=function(){var e=this;Array.from(this._el.textTracks).filter((function(e){return!$e.isMetaDataTrack(e)})).forEach((function(t){e._eventManager.unlisten(t,"cuechange")}))},o._onCueChange=function(e){var t=Xe(e.currentTarget.activeCues);this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:t}))},o.resetAllCues=function(){var e=Array.from(this._el.textTracks).find((function(e){return $e.isNativeTextTrack(e)&&e.mode!==$e.MODE.DISABLED}));if(e)for(var t=0;t<e.cues.length;t++)e.cues[t].hasBeenReset=!0},o._handleVideoError=function(){if(this._el.error){var e=this._el.error.code;if(e!==window.MediaError.MEDIA_ERR_ABORTED){var t=this._getMsExtendedError(),n=this._el.error.message;if(this._mediaSourceAdapter&&!this._mediaSourceAdapter.handleMediaError(this._el.error)){var r=new L(L.Severity.CRITICAL,L.Category.MEDIA,L.Code.VIDEO_ERROR,{code:e,extended:t,message:n});this.dispatchEvent(new m(W.ERROR,r))}}}},o._handleWaiting=function(){var e=this,t=!1;this._eventManager.listenOnce(this._el,W.PLAYING,(function(){return t=!0})),setTimeout((function(){t||e.dispatchEvent(new m(W.WAITING))}),200)},o._getMsExtendedError=function(){var e=this._el.error.msExtendedCode;return e&&(e<0&&(e+=Math.pow(2,32)),e=e.toString(16)),e},o._handleMetadataTrackEvents=function(){var e=this,t=function(t){t.mode=$e.MODE.HIDDEN,e._eventManager.listen(t,"cuechange",(function(){var t=[];Array.from(e._el.textTracks).forEach((function(e){$e.isMetaDataTrack(e)&&(t=t.concat(Xe(e.activeCues)))})),t=t.sort((function(e,t){return e.startTime-t.startTime})),e.dispatchEvent(new m(Y.TIMED_METADATA,{cues:t})),e.dispatchEvent(new m(Y.TIMED_METADATA_CHANGE,{cues:t.map((function(e){return Ut(e)}))}))}))};Array.from(this._el.textTracks).forEach((function(e){$e.isMetaDataTrack(e)&&t(e)})),this._eventManager.listen(this._el.textTracks,"addtrack",(function(e){$e.isMetaDataTrack(e.track)&&t(e.track)})),this._eventManager.listen(this._el.textTracks,"change",(function(){Array.from(e._el.textTracks).forEach((function(e){$e.isMetaDataTrack(e)&&e.mode!==$e.MODE.HIDDEN&&(e.mode=$e.MODE.HIDDEN)}))}))},o.addTextTrack=function(e,t,n){return this._el.addTextTrack(e,t,n)},o.getNativeTextTracks=function(){return Array.from(this._el.textTracks)},o.getDrmInfo=function(){var e;return null==(e=this._mediaSourceAdapter)?void 0:e.getDrmInfo()},i=r,(a=[{key:"id",get:function(){return r.id}},{key:"src",set:function(e){this._mediaSourceAdapter&&(this._mediaSourceAdapter.src=e)},get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.src:""}},{key:"currentTime",get:function(){return this._el?this._el.currentTime:0},set:function(e){this._el&&(this._el.currentTime=e)}},{key:"duration",get:function(){return this._el.duration}},{key:"liveDuration",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.liveDuration:-1}},{key:"volume",set:function(e){this._el.volume=e},get:function(){return this._el.volume}},{key:"paused",get:function(){return this._el.paused}},{key:"seeking",get:function(){return this._el.seeking}},{key:"seekable",get:function(){return this._el.seekable}},{key:"played",get:function(){return this._el.played}},{key:"buffered",get:function(){return this._el.buffered}},{key:"muted",set:function(e){this._el.muted=e},get:function(){return this._el.muted}},{key:"defaultMuted",get:function(){return this._el.defaultMuted}},{key:"poster",set:function(e){this._el.poster=e},get:function(){return this._el.poster}},{key:"preload",set:function(e){this._el.preload=e},get:function(){return this._el.preload}},{key:"autoplay",set:function(e){this._el.autoplay=e},get:function(){return this._el.autoplay}},{key:"loop",set:function(e){this._el.loop=e},get:function(){return this._el.loop}},{key:"controls",set:function(e){this._el.controls=e},get:function(){return this._el.controls}},{key:"playbackRate",set:function(e){this._el.playbackRate=e},get:function(){return this._el.playbackRate}},{key:"defaultPlaybackRate",set:function(e){this._el.defaultPlaybackRate=e},get:function(){return this._el.defaultPlaybackRate}},{key:"ended",get:function(){return this._el.ended}},{key:"error",get:function(){return this._el.error}},{key:"networkState",get:function(){return this._el.networkState}},{key:"readyState",get:function(){return this._el.readyState}},{key:"videoHeight",get:function(){return this._el.videoHeight}},{key:"videoWidth",get:function(){return this._el.videoWidth}},{key:"playsinline",set:function(e){e?this._el.setAttribute("playsinline",""):this._el.removeAttribute("playsinline")},get:function(){return""===this._el.getAttribute("playsinline")}},{key:"crossOrigin",set:function(e){"string"==typeof e?this._el.setAttribute("crossorigin",e):this._el.removeAttribute("crossorigin")},get:function(){return this._el.getAttribute("crossorigin")}},{key:"playbackRates",get:function(){return r.PLAYBACK_RATES}},{key:"isInPictureInPicture",get:function(){return!!document.pictureInPictureElement&&null!=document.pictureInPictureElement&&this._el===document.pictureInPictureElement||!!this._el.webkitPresentationMode&&"picture-in-picture"===this._el.webkitPresentationMode}},{key:"targetBuffer",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.targetBuffer:NaN}},{key:"availableBuffer",get:function(){var e=0;if(this.buffered)for(var t=0;t<this.buffered.length;t++)this.buffered.start(t)<=this._el.currentTime&&this._el.currentTime<=this.buffered.end(t)&&(e=this.buffered.end(t)-this._el.currentTime);return e}}])&&Yt(i.prototype,a),r}(C);function $t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}qt(Xt,"_logger",S("Html5")),qt(Xt,"_capabilities",[Kt]),qt(Xt,"id","html5"),qt(Xt,"videoElementStore",{}),qt(Xt,"PLAYBACK_RATES",[.5,1,1.5,2]);var Qt=function(){function e(){}return e.register=function(t,n){t&&!e._engineProviders[t]?(e._logger.debug("Engine <"+t+"> has been registered successfully"),e._engineProviders[t]=n):e._logger.debug("Engine <"+t+"> is already registered, do not register again")},e.unRegister=function(t){e._engineProviders[t]&&(e._logger.debug("Unregistered <"+t+"> Engine"),delete e._engineProviders[t])},e.getEngines=function(){return Object.keys(e._engineProviders).map((function(t){return e._engineProviders[t]}))},e.destroy=function(){e._engineProviders={}},e}();$t(Qt,"_logger",S("EngineProvider")),$t(Qt,"_engineProviders",{}),Xt.isSupported()&&Qt.register(Xt.id,Xt);var Zt=Qt.register,Jt=Qt.unRegister;function en(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nn="srt",rn="vtt",an=function(e){var t,n;function r(t){var n;return tn(en(n=e.call(this)||this),"_externalCueIndex",0),tn(en(n),"_textTrackModel",{}),tn(en(n),"_activeTextCues",[]),tn(en(n),"_isTextTrackActive",!1),tn(en(n),"_lastTimeUpdate",0),n._player=t,n._eventManager=new D,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.hideTextTrack=function(){this._player.config.text.useNativeTextTrack?(this._removeCueChangeListeners(),this._resetExternalNativeTextTrack()):this._isTextTrackActive&&(this._eventManager.unlisten(this._player,W.TIME_UPDATE),this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:[]})),this._resetCurrentTrack())},i.getExternalTracks=function(e){var t=this,n=this._player.sources.captions;if(!n)return[];this._player.config.text.useNativeTextTrack&&this._addNativeTextTrack();var r=e.filter((function(e){return e instanceof $e})),i=[];return n.forEach((function(e){if(e.language){var n=t._createTextTrack(e);t._maybeAddTrack(n,e,r,i)}else{var a=new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.UNKNOWN_LANGUAGE,{caption:e});t.dispatchEvent(new m(W.ERROR,a))}})),i},i._maybeAddTrack=function(e,t,n,i){var a=n.find((function(e){return e.available&&re.langComparer(t.language,e.language)}));a?r._logger.warn("duplicated language, taking the inband option. Language: ",a.language):(i.push(e),this._updateTextTracksModel(t))},i._createTextTrack=function(e){return new $e({active:!!e.default,kind:$e.KIND.SUBTITLES,label:e.label,language:e.language,external:!0})},i._updateTextTracksModel=function(e){this._textTrackModel[e.language]={cuesStatus:1,cues:[],url:e.url,type:e.type}},i.selectTextTrack=function(e){var t=this;this._textTrackModel[e.language]&&(3===this._textTrackModel[e.language].cuesStatus?this._selectTextTrack(e):1===this._textTrackModel[e.language].cuesStatus&&this._downloadAndParseCues(e).then((function(){t._textTrackModel[e.language].cuesStatus=3,t._selectTextTrack(e)})).catch((function(e){return t.dispatchEvent(new m(W.ERROR,e))})))},i._selectTextTrack=function(e){this.hideTextTrack(),this._player.config.text.useNativeTextTrack?(this._addCuesToNativeTextTrack(this._textTrackModel[e.language].cues),this._addCueChangeListener()):this._setTextTrack(e),e.active=!0,this.dispatchEvent(new m(Y.TEXT_TRACK_CHANGED,{selectedTextTrack:e}))},i.resetAllCues=function(){for(var e in this._textTrackModel)this._textTrackModel[e].cues.forEach((function(e){e.hasBeenReset=!0}))},i._addCueChangeListener=function(){var e=this,t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return $e.isNativeTextTrack(e)&&e.mode===$e.MODE.SHOWING}));n&&this._eventManager.listen(n,"cuechange",(function(t){return e._onCueChange(t)}))}},i._removeCueChangeListeners=function(){var e=this._player.getVideoElement();if(e&&e.textTracks)for(var t=0;t<e.textTracks.length;t++)this._eventManager.unlisten(e.textTracks[t],"cuechange")},i._onCueChange=function(e){var t=Xe(e.currentTarget.activeCues);this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:t}))},i.reset=function(){this._resetCurrentTrack(),this._textTrackModel={},this._resetExternalNativeTextTrack(),this._eventManager.removeAll()},i.destroy=function(){this._textTrackModel={},this._eventManager.destroy(),this._activeTextCues=[]},i._resetCurrentTrack=function(){this._activeTextCues=[],this._isTextTrackActive=!1,this._maybeSetExternalCueIndex()},i._getCuesString=function(e){var t=this;return new Promise((function(n,r){var i=t._textTrackModel[e.language],a=i.type||t._getFileType(i.url);[nn,rn].includes(a)||(t._textTrackModel[e.language].cuesStatus=1,r(new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.UNKNOWN_FILE_TYPE,{captionType:a}))),V.execute(i.url,{},"GET").then((function(e){n(a===nn?t._convertSrtToVtt(e):e)})).catch((function(){t._textTrackModel[e.language].cuesStatus=1,r(new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.HTTP_ERROR,{url:i.url}))}))}))},i._parseCues=function(e){return new Promise((function(t,n){var i=new De(window,Re()),a=[];i.oncue=function(e){return a.push(e)},i.onflush=function(){r._logger.debug("finished parsing external cues"),t(a)},i.parse(e),i.flush(),i.onparsingerror((function(e){return n(e)}))}))},i._convertSrtToVtt=function(e){return"WEBVTT\n\n"+e.replace(/(\d\d:\d\d:\d\d),(\d\d\d) --> (\d\d:\d\d:\d\d),(\d\d\d)/g,(function(e,t,n,r,i){return t+"."+n+" --\x3e "+r+"."+i}))},i._downloadAndParseCues=function(e){var t=this;return this._textTrackModel[e.language].cuesStatus=2,new Promise((function(n,r){t._getCuesString(e).then((function(e){return t._parseCues(e)})).then((function(r){t._textTrackModel[e.language].cues=r,n()})).catch((function(e){return r(e)}))}))},i._getFileType=function(e){return e.split(/[#?]/)[0].split(".").pop().trim()},i._handleCaptionOnTimeUpdate=function(e){var t=this._player.currentTime;if(t){var n=!1;this._hadSeeked()&&(this._activeTextCues=[],n=this._maybeSetExternalCueIndex());var r=this._maybeRemoveActiveCues(),i=this._maybeAddToActiveCues(e);(n||i||r)&&this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._lastTimeUpdate=t}},i._hadSeeked=function(){return!!this._player.currentTime&&Math.abs(this._player.currentTime-this._lastTimeUpdate)>1},i._maybeRemoveActiveCues=function(){var e=this._player.currentTime;if(!e)return!1;var t=this._activeTextCues.filter((function(t){return t.startTime<e&&e<t.endTime})),n=this._activeTextCues.length!==t.length;return this._activeTextCues=t,n},i._maybeAddToActiveCues=function(e){var t=this._player.currentTime;if(!t)return!1;for(var n=!1,r=this._textTrackModel[e.language].cues;this._externalCueIndex<r.length&&t>r[this._externalCueIndex].startTime;)t<r[this._externalCueIndex].endTime&&this._activeTextCues.push(r[this._externalCueIndex]),this._externalCueIndex++,n=!0;return n},i._maybeSetExternalCueIndex=function(){var e=this._player._getTextTracks().find((function(e){return e.active&&e.external}));if(e&&e.external){for(var t=this._textTrackModel[e.language]?this._textTrackModel[e.language].cues:[],n=0;n<t.length&&!(t[n].startTime<this._player.currentTime&&this._player.currentTime<t[n].endTime)&&!(t[n].endTime>this._player.currentTime&&t[n].startTime>this._player.currentTime);n++);return this._externalCueIndex=n,!0}return!1},i._resetExternalNativeTextTrack=function(){var e=this._player.getVideoElement();if(e&&e.textTracks){var t=Array.from(e.textTracks).find((function(e){return!!e&&$e.isExternalTrack(e)}));t&&(t.cues&&Object.values(t.cues).forEach((function(e){return t.removeCue(e)})),t.mode=$e.MODE.DISABLED)}},i._addCuesToNativeTextTrack=function(e){var t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return!!e&&$e.isExternalTrack(e)}));n&&(n.mode=$e.MODE.SHOWING,void 0===window.VTTCue?this._convertCues(e).forEach((function(e){return n.addCue(e)})):e.forEach((function(e){return n.addCue(e)})))}},i._convertCues=function(e){return e.map((function(e){return new window.TextTrackCue(e.startTime,e.endTime,e.text)}))},i._addNativeTextTrack=function(){var e=this._player.getVideoElement();e&&e.textTracks&&(Array.from(e.textTracks).findIndex((function(e){return!!e&&$e.isExternalTrack(e)}))>-1?this._resetExternalNativeTextTrack():e.addTextTrack($e.KIND.SUBTITLES,$e.EXTERNAL_TRACK_ID,$e.EXTERNAL_TRACK_ID))},i._setTextTrack=function(e){var t=this;this._player.config.text.useNativeTextTrack||(this._isTextTrackActive=!0,r._logger.debug("External text track changed",e),this._activeTextCues=[],this._externalCueIndex=0,this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._eventManager.listen(this._player,W.TIME_UPDATE,(function(){return t._handleCaptionOnTimeUpdate(e)})))},r}(C);tn(an,"_logger",S("ExternalCaptionsHandler"));var on={PRE:"preroll",MID:"midroll",POST:"postroll",OVERLAY:"overlay"},sn={VAST:"vast",VMAP:"vmap"},ln=function(e){var t,n;function r(){return e.call(this)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){this._observer&&this._observer.disconnect(),this._observer=null,this._el=null},i.init=function(e){this._observer||(this._el=e,window.ResizeObserver?this._createNativeObserver():this._createIframeObserver(),this._el instanceof HTMLElement&&this._observer&&this._observer.observe(this._el))},i._createNativeObserver=function(){var e=this;this._observer=new window.ResizeObserver((function(t){t.forEach((function(){e._triggerResize()}))}))},i._createIframeObserver=function(){this._observer=new un(this._triggerResize.bind(this))},i._triggerResize=function(){this.dispatchEvent(new m(Y.RESIZE))},r}(C),un=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_observersStore",{}),this._onChangeCallback=e}var t=e.prototype;return t.observe=function(e){var t=this,n=this._createIframe(),r=e.getAttribute("id");this._observersStore[r]=n,e.appendChild(n),n.contentWindow.onresize=function(){return t._onChangeCallback()}},t.disconnect=function(){for(var e in this._observersStore){var t=document.getElementById(e),n=this._observersStore[e];n.onresize=null,t&&(t.removeChild(n),delete this._observersStore[t.getAttribute("id")])}},t._createIframe=function(){var e=document.createElement("iframe");return e.className="playkit-size-iframe",e},e}();function cn(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=function(){return 1}),0===e.length||1===e.length&&0!==t(e[0]))return null;var n=Math.floor(e.length/2);return 0===t(e[n])?e[n]:t(e[n])>0?cn(e.slice(0,n),t):cn(e.slice(n+1),t)}function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dn=function(){function e(e){pn(this,"_isElementInFullscreen",!1),pn(this,"_isScreenLocked",!1),pn(this,"_isScreenOrientationSupport",!!screen&&!!screen.orientation&&"function"==typeof screen.orientation.unlock&&"function"==typeof screen.orientation.lock),pn(this,"_isFullscreenEventDispatched",!1),this._player=e,this._isInBrowserFullscreen=!1,this._eventManager=new D}var t=e.prototype;return t._isNativeDocumentFullscreen=function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)},t._isIOSFullscreen=function(){var e="function"==typeof this._player.getVideoElement?this._player.getVideoElement():null;return"iOS"===this._player.env.os.name&&!!e&&("fullscreen"===e.webkitPresentationMode||!e.webkitPresentationMode&&e.webkitDisplayingFullscreen)},t.isFullscreen=function(){return this._isNativeDocumentFullscreen()&&this._isElementInFullscreen||this._isIOSFullscreen()||this._isInBrowserFullscreen},t.enterFullscreen=function(e){if(!this.isFullscreen()){this.registerFullScreenEvents();var t=e&&B.getElementById(e),n=this._player.config.playback;if(t||(t=this._player.getView()),"iOS"===this._player.env.os.name)if(n.inBrowserFullscreen&&n.playsinline||this._player._engineType===Je.YOUTUBE)this._enterInBrowserFullscreen(t);else{var r=this._player.getVideoElement();r&&"function"==typeof r.webkitEnterFullScreen&&(this._player.isInPictureInPicture()?(setTimeout((function(){return r.webkitEnterFullScreen()}),1e3),this._player.exitPictureInPicture()):r.webkitEnterFullScreen())}else this._requestFullscreen(t)}},t.exitFullscreen=function(){if(this.isFullscreen())if("iOS"===this._player.env.os.name)if(this._isInBrowserFullscreen||this._player._engineType===Je.YOUTUBE)this._exitInBrowserFullscreen();else{var e=this._player.getVideoElement();e&&"function"==typeof e.webkitExitFullscreen&&e.webkitExitFullscreen()}else this._requestExitFullscreen()},t._nativeEnterFullScreen=function(e){return"function"==typeof e.requestFullscreen?e.requestFullscreen():"function"==typeof e.mozRequestFullScreen?e.mozRequestFullScreen():"function"==typeof e.webkitRequestFullScreen?e.webkitRequestFullScreen():"function"==typeof e.msRequestFullscreen?e.msRequestFullscreen():void 0},t._requestFullscreen=function(e){var t=this;this._player.isInPictureInPicture()&&this._player.exitPictureInPicture(),Promise.resolve(this._nativeEnterFullScreen(e)).then((function(){t._isElementInFullscreen=!0;var e=F.getPropertyPath(t._player,"config.playback.screenLockOrientionMode"),n=e!==ot.NONE&&Object.values(ot).includes(e);t._isScreenOrientationSupport&&n&&screen.orientation.lock(e).then((function(){return t._isScreenLocked=!0})).catch((function(){return t._isScreenLocked=!1}))}),(function(){}))},t._nativeExitFullScreen=function(){return"function"==typeof document.exitFullscreen?document.exitFullscreen():"function"==typeof document.webkitExitFullscreen?document.webkitExitFullscreen():"function"==typeof document.mozCancelFullScreen?document.mozCancelFullScreen():"function"==typeof document.msExitFullscreen?document.msExitFullscreen():void 0},t._requestExitFullscreen=function(){var e=this;Promise.resolve(this._nativeExitFullScreen()).then((function(){e._isElementInFullscreen=!1,e._isScreenOrientationSupport&&e._isScreenLocked&&(screen.orientation.unlock(),e._isScreenLocked=!1)}),(function(){}))},t._enterInBrowserFullscreen=function(e){this._player.isInPictureInPicture()&&this._player.exitPictureInPicture(),B.addClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!0,this._fullscreenEnterHandler(),this._player.dispatchEvent(new m(this._player.Event.RESIZE))},t._exitInBrowserFullscreen=function(){var e=B.getElementBySelector(".playkit-in-browser-fullscreen-mode");e&&B.removeClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!1,this._fullscreenExitHandler(),this._player.dispatchEvent(new m(this._player.Event.RESIZE))},t.registerFullScreenEvents=function(){var e=this;"iOS"===this._player.env.os.name?this._handleIosFullscreen():(this._eventManager.listen(document,"webkitfullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"mozfullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"fullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"MSFullscreenChange",(function(){return e._fullscreenChangeHandler()})))},t._handleIosFullscreen=function(){var e=this,t=function(){var t=e._player.getVideoElement();t&&(e._eventManager.listen(t,"webkitbeginfullscreen",(function(){return e._fullscreenEnterHandler()})),e._eventManager.listen(t,"webkitendfullscreen",(function(){return e._fullscreenExitHandler()})))};this._player.getVideoElement()?t():this._eventManager.listenOnce(this._player,this._player.Event.SOURCE_SELECTED,(function(){return t()}))},t._fullscreenChangeHandler=function(){this.isFullscreen()?this._fullscreenEnterHandler():this._fullscreenExitHandler()},t._fullscreenEnterHandler=function(){this.isFullscreen()&&!this._isFullscreenEventDispatched&&(this._isFullscreenEventDispatched=!0,this._player.dispatchEvent(new m(this._player.Event.ENTER_FULLSCREEN)))},t._fullscreenExitHandler=function(){!this.isFullscreen()&&this._isFullscreenEventDispatched&&(this._isFullscreenEventDispatched=!1,this._eventManager.removeAll(),this._player.dispatchEvent(new m(this._player.Event.EXIT_FULLSCREEN)))},t.destroy=function(){this._eventManager.destroy()},e}();function fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hn=function(){function e(){fn(this,"_decoratorProviders",new Map),fn(this,"_logger",S("EngineDecoratorManager"))}var t=e.prototype;return t.register=function(e){this._decoratorProviders.has(e.getName())?this._logger.warn("decorator already registered for "+e.getName()):this._decoratorProviders.set(e.getName(),e)},t.createDecorators=function(e,t){return this._logger.debug("decorators created for "+Array.from(this._decoratorProviders.keys()).toString()),Array.from(this._decoratorProviders.values(),(function(n){return n.getEngineDecorator(e,t)}))},t.destroy=function(){this._logger.debug("decorators destroyed"),this._decoratorProviders.clear()},e}();function gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var vn=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._eventManager=new D,r._pluginDecorators=n.createDecorators(t,e.prototype.dispatchEvent.bind(yn(r))),Object.values(q).forEach((function(e){return r._eventManager.listen(t,e,(function(e){return r.dispatchEvent(e)}))})),new Proxy(t,{get:function(e,t){"destroy"===t&&r._destroy();var n,i=r._pluginDecorators.find((function(e){return e.active}));return(n="addEventListener"===t||"removeEventListener"===t?yn(r):i&&t in i?i:e)[t]&&"function"==typeof n[t].bind?n[t].bind(n):n[t]},set:function(e,t,n){var i=r._pluginDecorators.find((function(e){return t in e&&e.active}));return i&&t in i?i[t]=n:e[t]=n,!0}})||yn(r)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.dispatchEvent=function(t){var n=this._pluginDecorators.find((function(e){return e.active}));return n&&n.dispatchEvent?n.dispatchEvent(t):e.prototype.dispatchEvent.call(this,t)},o._destroy=function(){this._pluginDecorators=[],this._eventManager.destroy()},i=r,(a=[{key:"active",get:function(){return!0}}])&&gn(i.prototype,a),r}(C),mn={TRUE:!0,FALSE:!1,IN_VIEW:"inview"};function bn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _n(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function En(){return(En=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function kn(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Tn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){kn(a,r,i,o,s,"next",e)}function s(e){kn(a,r,i,o,s,"throw",e)}o(void 0)}))}}function An(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wn=/#wh=/i,Sn=/#xywh=/i,Cn=new RegExp("^/[^/].+"),xn=function(e){var t,n;function r(){var t;return An(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call(this)||this),"_cues",[]),t._eventManager=new D,t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.load=function(){var e=Tn(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return r._logger.debug("start loading the vtt thumbnails"),e.next=5,this._downloadAndParseCues(t);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),i.getThumbnail=function(e){var t=this._findCue(e,this._cues);if(t){var n=t.size,r=t.coordinates,i=En({url:t.imgUrl},n=n||this._naturalImgSize,r=r||{x:0,y:0});return new ft(i)}return null},i.isUsingVttThumbnails=function(){var e;return!!(null==(e=this._cues)?void 0:e.length)},i._downloadAndParseCues=function(){var e=Tn(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._downloadVttFile(t);case 3:return n=e.sent,e.next=6,this._processVtt(n);case 6:return r=e.sent,e.next=9,this._formatIntoThumbnailCues(r,t);case 9:this._cues=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),this.dispatchEvent(new m(W.ERROR,e.t0));case 15:case"end":return e.stop()}}),e,this,[[0,12]])})));return function(t){return e.apply(this,arguments)}}(),i._downloadVttFile=function(){var e=Tn(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,V.execute(t.vttUrl,{},"GET");case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.HTTP_ERROR,e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),i._processVtt=function(){var e=Tn(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var i=new De(window,Re()),a=[];i.oncue=function(e){return a.push(e)},i.onflush=function(){r._logger.debug("finished parsing thumbnails cues"),e(a)},i.parse(t),i.flush(),i.onparsingerror((function(e){return n(e)}))})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i._formatIntoThumbnailCues=function(){var e=Tn(regeneratorRuntime.mark((function e(t,n){var r,i,a,o,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.validateThumbnailsVTTFormat(t)){e.next=4;break}throw new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"invalid thumbnail vtt format",vttUrl:n.vttUrl});case 4:return r=this._extractCueMetadata(t[0],n),e.next=7,this.validateImgUrl(r.imgUrl);case 7:if(e.sent){e.next=11;break}throw new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"failed loading the image - invalid image url",imgUrl:r.imgUrl});case 11:return e.next=13,this.extractImgNaturalDimensions(r.imgUrl);case 13:for(this._naturalImgSize=e.sent,i=[],a=bn(t);!(o=a()).done;)s=o.value,l=this._extractCueMetadata(s,n),i.push(l);return e.abrupt("return",i);case 17:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),i.validateThumbnailsVTTFormat=function(e){return e.length&&e[0]instanceof Be},i.extractImgNaturalDimensions=function(e){var t=this;return new Promise((function(n){var r=new Image;r.src=e,t._eventManager.listenOnce(r,"load",(function(){n({height:r.naturalHeight,width:r.naturalWidth})})),t._eventManager.listenOnce(r,"error",(function(){return n(null)}))}))},i.validateImgUrl=function(e){var t=this;return new Promise((function(n){var r=new Image;r.src=e,t._eventManager.listenOnce(r,"load",(function(){n(!0)})),t._eventManager.listenOnce(r,"error",(function(){return n(!1)}))}))},i._extractCueMetadata=function(e,t){var n,i=e.startTime,a=e.endTime,o=e.text,s=t.vttUrl.substring(0,t.vttUrl.lastIndexOf("/")),l=wn.test(o),u=Sn.test(o),c=!1,p=null,d=null;if(l)n=o.split(wn)[0],r._logger.warn('vtt thumbnails in "'+wn+'" form - is supported but the width and height options are ignored and The images will be displayed in their natural dimensions'),c=void 0!==n;else if(u){var f=o.split(Sn);n=f[0];var h=f[1].split(",").map(Number),g=h[0],y=h[1],v=h[2],m=h[3];p={x:g,y:y},d={width:v,height:m},c=[g,y,v,m,n].every((function(e){return void 0!==e}))}else n=o,c=!!o;if(0!==n.indexOf("http://")&&0!==n.indexOf("https://")&&(n=s+"/"+(n=Cn.test(n)?n.substring(1):n)),c)return{startTime:i,endTime:a,imgUrl:n,size:d,coordinates:p};throw new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"error while parsing the vtt cues - invalid cue",parsedCue:{startTime:i,endTime:a,options:o}})},i._findCue=function(e,t){for(var n=0,r=t.length-1;n<=r;){var i=Math.floor((n+r)/2),a=t[i];if(e>=a.startTime&&e<a.endTime)return t[i];e<a.startTime?r=i-1:n=i+1}return null},i.reset=function(){this._cues=[],this._eventManager.removeAll(),this._naturalImgSize={}},i.destroy=function(){this.reset(),this._eventManager.destroy()},r}(C);function In(){return(In=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function On(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}An(xn,"_logger",S("ExternalThumbnailsHandler"));var Ln="off",Mn=function(e){var t,n;function r(t){var n;return void 0===t&&(t={}),On(Rn(n=e.call(this)||this),"_sources",{}),On(Rn(n),"_activeTextCues",[]),On(Rn(n),"_textDisplaySettings",{}),On(Rn(n),"_playbackAttributesState",{muted:void 0,volume:void 0,rate:void 0,videoTrack:void 0,audioLanguage:"",textLanguage:""}),On(Rn(n),"_hasUserInteracted",!1),On(Rn(n),"_isOnLiveEdge",!1),On(Rn(n),"_shouldLoadAfterAttach",!1),n._setConfigLogLevel(t),n._playerId=j.uniqueId(5),n._prepareVideoElement(),r.runCapabilities(),n._env=g,n._tracks=[],n._firstPlay=!0,n._loadingMedia=!1,n._loading=!1,n._playbackStart=!1,n._firstPlaying=!1,n._reset=!0,n._destroyed=!1,n._fallbackToMutedAutoPlay=!1,n._config=r._defaultConfig,n._sources=F.copyDeep(lt),n._eventManager=new D,n._posterManager=new G,n._stateManager=new te(Rn(n)),n._resizeWatcher=new ln,n._playbackMiddleware=new at,n._textStyle=new ye,n._createReadyPromise(),n._createPlayerContainer(),n._appendDomElements(),n._externalCaptionsHandler=new an(Rn(n)),n._externalThumbnailsHandler=new xn,n._fullscreenController=new dn(Rn(n)),n.configure(t),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.runCapabilities=function(){r._logger.debug("Running player capabilities"),Qt.getEngines().forEach((function(e){return e.runCapabilities()}))},r.getCapabilities=function(e){r._logger.debug("Get player capabilities",e);var t=[];return Qt.getEngines().forEach((function(e){return t.push(e.getCapabilities())})),Promise.all(t).then((function(t){var n={};return t.forEach((function(e){return Object.assign(n,e)})),e?n[e]:n}))},r.setCapabilities=function(e,t){r._logger.debug("Set player capabilities",e,t);var n=Qt.getEngines().find((function(t){return t.id===e}));n&&n.setCapabilities(t)};var i,a,o,s=r.prototype;return s.configure=function(e){void 0===e&&(e={}),this._setConfigLogLevel(e),F.mergeDeep(this._config,e),this._applyTextTrackConfig(e),this._applyABRRestriction(e)},s.setSourcesMetadata=function(e){this._sources&&(this._sources.metadata||(this._sources.metadata={}),F.mergeDeep(this._sources.metadata,e))},s.setSources=function(e){this._hasSources(e)?(this.reset(),F.mergeDeep(this._sources,e),this._resizeWatcher.init(B.getElementById(this._playerId)),r._logger.debug("Change source started"),this.dispatchEvent(new m(Y.CHANGE_SOURCE_STARTED)),this._reset=!1,this._selectEngineByPriority()?(this.dispatchEvent(new m(Y.SOURCE_SELECTED,{selectedSource:this._sources[this._streamType]})),this._attachMedia(),this._handlePlaybackOptions(),this._posterManager.setSrc(this._sources.poster),this._handleDimensions(),this._handlePreload(),this._handleAutoPlay(),r._logger.debug("Change source ended"),this.dispatchEvent(new m(Y.CHANGE_SOURCE_ENDED))):(r._logger.warn("No playable engines was found to play the given sources"),this.dispatchEvent(new m(W.ERROR,new L(L.Severity.CRITICAL,L.Category.PLAYER,L.Code.NO_ENGINE_FOUND_TO_PLAY_THE_SOURCE,"No Engine Found To Play The Source"))))):F.mergeDeep(this._sources,e)},s.ready=function(){return this._readyPromise?this._readyPromise:Promise.resolve()},s.load=function(){var e=this;this.src?r._logger.debug("The source has already been loaded. load request ignored"):this._playbackMiddleware.load((function(){e._engine?e._load():e._eventManager.listenOnce(e,Y.SOURCE_SELECTED,(function(){return e._load()}))}))},s.play=function(e){var t=this;e&&e.programmatic?this._autoPlay():(this._playbackStart||(this._playbackStart=!0,this.dispatchEvent(new m(Y.PLAYBACK_START)),this.src||this._prepareVideoElement(),this.load()),this._engine?this._playbackMiddleware.play((function(){return t._play()})):this._loadingMedia?this._playbackMiddleware.play((function(){return t._playAfterAsyncMiddleware()})):this.dispatchEvent(new m(W.ERROR,new L(L.Severity.CRITICAL,L.Category.PLAYER,L.Code.NO_SOURCE_PROVIDED,"No Source Provided"))))},s.pause=function(){this._engine&&this._playbackMiddleware.pause(this._pause.bind(this))},s.getView=function(){return this._el},s.getVideoElement=function(){if(this._engine)return this._engine.getVideoElement()},s.reset=function(e){void 0===e&&(e=!1),this._reset||(this.pause(),this._externalCaptionsHandler.reset(),this._externalThumbnailsHandler.reset(),this._posterManager.reset(),this._stateManager.reset(),this._sources=F.copyDeep(lt),this._activeTextCues=[],this._updateTextDisplay([]),this._tracks=[],$e.reset(),this._resetStateFlags(),this._engineType="",this._streamType="",this._pendingSelectedVideoTrack=null,this._engine&&this._engine.reset(),this.showBlackCover(),this._reset=!0,this.dispatchEvent(new m(Y.PLAYER_RESET,{isChangeMedia:e})),this._eventManager.removeAll(),this._resizeWatcher.init(B.getElementById(this._playerId)),this._createReadyPromise(),this._isOnLiveEdge=!1,this._shouldLoadAfterAttach=!1)},s.destroy=function(){this._destroyed||(this._externalCaptionsHandler.destroy(),this._posterManager.destroy(),this._stateManager.destroy(),this._fullscreenController.destroy(),this._activeTextCues=[],this._textDisplaySettings={},this._config={},this._tracks=[],this._engineType="",this._streamType="",this._readyPromise=null,this._pendingSelectedVideoTrack=null,this._resetStateFlags(),this._playbackAttributesState={},this._engine&&this._engine.destroy(),this._engineDecoratorManager&&this._engineDecoratorManager.destroy(),this._resizeWatcher.destroy(),this._el&&B.removeChild(this._el.parentNode,this._el),this._destroyed=!0,this.dispatchEvent(new m(Y.PLAYER_DESTROY)),this._eventManager.destroy())},s.hideBlackCover=function(){this._blackCoverEl&&(this._blackCoverEl.style.visibility="hidden")},s.showBlackCover=function(){this._blackCoverEl&&(this._blackCoverEl.style.visibility="visible")},s.attachMediaSource=function(){var e=this;this._engine&&(this._shouldLoadAfterAttach=!0,this._engine.attachMediaSource(),this._eventManager.listenOnce(this,W.CAN_PLAY,(function(){"number"==typeof e._playbackAttributesState.rate&&(e.playbackRate=e._playbackAttributesState.rate)})))},s.detachMediaSource=function(){this._engine&&(this.pause(),this.hideTextTrack(),this._shouldLoadAfterAttach=!1,this._createReadyPromise(),this._engine.detachMediaSource())},s.registerEngineDecoratorProvider=function(e){this._engineDecoratorManager||(this._engineDecoratorManager=new hn),e&&this._engineDecoratorManager.register(e)},s._getTargetElement=function(){return B.getElementById(this._config.targetId)},s.isLive=function(){return!(this._sources.type===et.VOD||!(this._sources.type===et.LIVE||this._engine&&this._engine.isLive()))},s.isAudio=function(){return this._sources.type===et.AUDIO},s.isOnLiveEdge=function(){return this._engine&&"function"==typeof this._engine.isOnLiveEdge?this._engine.isOnLiveEdge():this._isOnLiveEdge},s.isDvr=function(){return this.isLive()&&this._sources.dvr},s.seekToLiveEdge=function(){this._engine&&this.isLive()&&(this._engine.seekToLiveEdge(),this._isOnLiveEdge=!0)},s.getStartTimeOfDvrWindow=function(){return this._engine?this._engine.getStartTimeOfDvrWindow():0},s.getTracks=function(e){switch(e){case Qe.VIDEO:return F.copyDeep(this._getVideoTracks());case Qe.AUDIO:return F.copyDeep(this._getAudioTracks());case Qe.TEXT:return F.copyDeep(this._getTextTracks());case Qe.IMAGE:return F.copyDeep(this._getImageTracks());default:return F.copyDeep(this._tracks)}},s.getActiveTracks=function(){return F.copyDeep({video:this._getVideoTracks().find((function(e){return e.active})),audio:this._getAudioTracks().find((function(e){return e.active})),text:this._getTextTracks().find((function(e){return e.active}))})},s.selectTrack=function(e){this._engine&&(e instanceof ae?(this._playbackAttributesState.videoTrack=e,this._stateManager.currentState.type===J.IDLE?this._pendingSelectedVideoTrack=e:this._engine.selectVideoTrack(e)):e instanceof oe?this._engine.selectAudioTrack(e):e instanceof $e?(this._resetTextDisplay(),e.language===Ln?(this.hideTextTrack(),this._externalCaptionsHandler.hideTextTrack(),this._playbackAttributesState.textLanguage=Ln):e.external?(this._engine.hideTextTrack(),this._externalCaptionsHandler.selectTextTrack(e)):(this._externalCaptionsHandler.hideTextTrack(),this._engine.selectTextTrack(e))):e instanceof pt&&this._engine.selectImageTrack(e))},s.hideTextTrack=function(){if(this._engine){this._engine.hideTextTrack(),this._resetTextDisplay();var e=this._getTextTracks(),t=e.find((function(e){return!0===e.active}));t&&t.external&&this._externalCaptionsHandler.hideTextTrack(),e.map((function(e){return e.active=!1}));var n=e.find((function(e){return e.language===Ln}));n&&(n.active=!0,this.dispatchEvent(new m(Y.TEXT_TRACK_CHANGED,{selectedTextTrack:n}))),this._playbackAttributesState.textLanguage=Ln}},s.showTextTrack=function(){var e=this._getTextTracks(),t=this._playbackAttributesState.textLanguage!==Ln&&this._playbackAttributesState.textLanguage||this._getLanguage(e,"auto",e.find((function(e){return e.default})));this._setDefaultTrack(e,t)},s.addTextTrack=function(e,t,n){if(this._engine&&"function"==typeof this._engine.addTextTrack)return this._engine.addTextTrack(e,t,n)},s.getNativeTextTracks=function(){return this._engine&&"function"==typeof this._engine.getNativeTextTracks?this._engine.getNativeTextTracks():[]},s.enableAdaptiveBitrate=function(){this._engine&&this._engine.enableAdaptiveBitrate(),this._playbackAttributesState.videoTrack=void 0},s.isAdaptiveBitrateEnabled=function(){return!!this._engine&&this._engine.isAdaptiveBitrateEnabled()},s._applyABRRestriction=function(e){if(F.hasPropertyPath(e,"abr.restrictions")&&this._engine&&this._tracks.length){var t=this._config.abr.restrictions,n=mt(this._tracks.filter((function(e){return e instanceof ae})),t);if(n.length){var i=this._tracks.filter((function(e){return e instanceof ae&&e.available}));(i.length!==n.length||!i.every((function(e,t){return e.bandwidth===n[t].bandwidth})))&&(this._engine.applyABRRestriction(t),this._tracks.forEach((function(e){!n.includes(e)&&e instanceof ae?(e.available=!1,e.active=!1):e.available=!0})),this.getActiveTracks().video||(n[0].active=!0),this.dispatchEvent(new m(Y.TRACKS_CHANGED,{tracks:this._tracks.filter((function(e){return e.available}))})))}else r._logger.warn("Invalid restriction, Nothing has changed values do not meet the restriction")}},s._applyTextTrackConfig=function(e){if(F.hasPropertyPath(e,"text.textTrackDisplaySetting")||F.getPropertyPath(e,"text.forceCenter")){var t={};F.hasPropertyPath(this._config,"text.textTrackDisplaySetting")&&(t=F.mergeDeep(t,this._config.text.textTrackDisplaySetting)),F.getPropertyPath(this._config,"text.forceCenter")&&(t=F.mergeDeep(t,{position:"auto",align:"center",size:"100"})),this.setTextDisplaySettings(t)}try{F.hasPropertyPath(e,"text.textStyle")&&(this.textStyle=ye.fromJson(this._config.text.textStyle))}catch(e){r._logger.warn(e)}},s.getThumbnail=function(e){return this._externalThumbnailsHandler.isUsingVttThumbnails()?this._externalThumbnailsHandler.getThumbnail(e):this._engine?this._engine.getThumbnail(e):null},s.setTextDisplaySettings=function(e){this._textDisplaySettings=F.mergeDeep(this._textDisplaySettings,e),this._updateCueDisplaySettings();for(var t=0;t<this._activeTextCues.length;t++)this._activeTextCues[t].hasBeenReset=!0;this._updateTextDisplay(this._activeTextCues)},s.isFullscreen=function(){return this._fullscreenController.isFullscreen()},s.notifyEnterFullscreen=function(){this.isFullscreen()&&this.dispatchEvent(new m(Y.ENTER_FULLSCREEN))},s.notifyExitFullscreen=function(){this.isFullscreen()||this.dispatchEvent(new m(Y.EXIT_FULLSCREEN))},s.enterFullscreen=function(e){this._fullscreenController.enterFullscreen(e)},s.exitFullscreen=function(){this._fullscreenController.exitFullscreen()},s.enterPictureInPicture=function(){this.isFullscreen()&&this.exitFullscreen(),this._engine&&!this._engine.isInPictureInPicture&&this._engine.enterPictureInPicture()},s.exitPictureInPicture=function(){this._engine&&this._engine.isInPictureInPicture&&this._engine.exitPictureInPicture()},s.isInPictureInPicture=function(){return!!this._engine&&this._engine.isInPictureInPicture},s.isPictureInPictureSupported=function(){return!!this._config.playback.pictureInPicture&&this._engine.isPictureInPictureSupported()},s.isVr=function(){return!!this._sources.vr},s.getLogLevel=function(e){return A(e)},s.setLogLevel=function(e,t){w(e,t)},s.getDrmInfo=function(){var e;return null==(e=this._engine)?void 0:e.getDrmInfo()},s._resetTextDisplay=function(){this._activeTextCues=[],this._updateTextDisplay([])},s._prepareVideoElement=function(){var e=this;Qt.getEngines().forEach((function(t){t.prepareVideoElement(e._playerId)}))},s._setConfigLogLevel=function(e){e.log&&e.log.level&&_[e.log.level]&&w(_[e.log.level]),e.log&&"function"==typeof e.log.handler&&k(e.log.handler)},s._hasSources=function(e){return!!e&&!!Object.values(Ze).find((function(t){return e[t]&&e[t].length>0}))},s._createPlayerContainer=function(){var e=this._el=B.createElement("div");B.addClassName(e,"playkit-container"),B.setAttribute(e,"id",this._playerId),B.setAttribute(e,"tabindex","-1")},s._appendEngineEl=function(){if(this._el){var e=this._engine.getVideoElement();B.addClassName(e,"playkit-engine");var t="playkit-engine-"+this._engine.id;B.addClassName(e,t),B.prependTo(e,this._el),"youtube"===this._engine.id&&(this._el.style.zIndex=1)}},s._appendDomElements=function(){this._blackCoverEl=B.createElement("div"),B.addClassName(this._blackCoverEl,"playkit-black-cover"),B.appendChild(this._el,this._blackCoverEl);var e=this._posterManager.getElement();B.addClassName(e,"playkit-poster"),B.appendChild(this._el,e),this._textDisplayEl=B.createElement("div"),B.addClassName(this._textDisplayEl,"playkit-subtitles"),B.appendChild(this._el,this._textDisplayEl)},s._createReadyPromise=function(){var e=this;this._readyPromise=new Promise((function(t,n){e._eventManager.listenOnce(e,Y.TRACKS_CHANGED,(function(){e.dispatchEvent(new m(Y.MEDIA_LOADED)),t()})),e._eventManager.listen(e,W.ERROR,(function(e){e.payload.severity===L.Severity.CRITICAL&&n()}))})).catch((function(){}))},s._selectEngineByPriority=function(){for(var e,t=this,n=this._config.playback.streamPriority,i=this._config.playback.preferNative,a=this._sources,o=function(){var n=e.value,o="string"==typeof n.engine?n.engine.toLowerCase():"",s="string"==typeof n.format?n.format.toLowerCase():"",l=Qt.getEngines().find((function(e){return e.id===o}));if(l){var u=a[s];if(u&&u.length>0){var c=u[0];if(l.canPlaySource(c,i[s],t._config.drm))return r._logger.debug("Source selected: ",u),t._loadEngine(l,c),t._engineType=o,t._streamType=s,{v:!0}}}},s=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(n);!(e=s()).done;){var l=o();if("object"==typeof l)return l.v}return!1},s._loadEngine=function(e,t){this._engine?this._engine.id===e.id?this._engine.restore(t,In({},this._config,{sources:this._sources})):(this._engine.destroy(),this._createEngine(e,t),this._appendEngineEl()):(this._createEngine(e,t),this._appendEngineEl())},s._createEngine=function(e,t){var n=e.createEngine(t,In({},this._config,{sources:this._sources}),this._playerId);this._engine=this._engineDecoratorManager?new vn(n,this._engineDecoratorManager):n},s._attachMedia=function(){var e=this;if(this._engine){Object.keys(W).forEach((function(t){e._eventManager.listen(e._engine,W[t],(function(t){return e.dispatchEvent(t)}))})),this._eventManager.listen(this._engine,W.SEEKING,(function(){e.isLive()&&(e._isOnLiveEdge=!(!e.duration||!e.currentTime)&&e.currentTime>=e.duration-1&&!e.paused)})),this._eventManager.listen(this._engine,W.SEEKED,(function(){var t=e._env.browser.name;"Edge"!==t&&"IE"!==t||e._removeTextCuePatch()})),this._eventManager.listen(this._engine,Y.MEDIA_RECOVERED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.IMAGE_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TEXT_TRACK_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.VIDEO_TRACK_CHANGED,(function(t){return e._markActiveTrack(t.payload.selectedVideoTrack),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.AUDIO_TRACK_CHANGED,(function(t){e.ready().then((function(){return e._playbackAttributesState.audioLanguage=t.payload.selectedAudioTrack.language})),e._markActiveTrack(t.payload.selectedAudioTrack),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._engine,Y.TRACKS_CHANGED,(function(t){return e._onTracksChanged(t)})),this._eventManager.listen(this._engine,Y.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._engine,Y.ABR_MODE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TIMED_METADATA,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TIMED_METADATA_CHANGE,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TIMED_METADATA_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.PLAY_FAILED,(function(t){e._onPlayFailed(t),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.FPS_DROP,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.FRAG_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.DRM_LICENSE_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.MANIFEST_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.MEDIA_RECOVERED,(function(){return e._handleRecovered()})),this._eventManager.listen(this,W.PLAY,this._onPlay.bind(this)),this._eventManager.listen(this,W.PAUSE,this._onPause.bind(this)),this._eventManager.listen(this,W.PLAYING,this._onPlaying.bind(this)),this._eventManager.listen(this,W.ENDED,this._onEnded.bind(this)),this._eventManager.listen(this,Y.MUTE_CHANGE,(function(){e._playbackAttributesState.muted=e.muted})),this._eventManager.listen(this,W.VOLUME_CHANGE,(function(){e._playbackAttributesState.volume=e.volume})),this._eventManager.listen(this,W.RATE_CHANGE,(function(){e._playbackAttributesState.rate=e.playbackRate})),this._eventManager.listen(this,Y.ENTER_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this,Y.EXIT_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this._resizeWatcher,Y.RESIZE,(function(t){e._resetTextCuesAndReposition(),e.dispatchEvent(t)})),this._eventManager.listen(this._externalCaptionsHandler,Y.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._externalCaptionsHandler,Y.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._externalCaptionsHandler,W.ERROR,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._externalThumbnailsHandler,W.ERROR,(function(t){return e.dispatchEvent(t)}));var t=B.getElementBySelector("#"+this.config.targetId);t&&this._eventManager.listen(t,"click",(function(){e._hasUserInteracted=!0,e.dispatchEvent(new m(Y.USER_GESTURE))}),{capture:!0})}},s._handleRecovered=function(){this._stateManager.currentState.type===J.PLAYING&&this.play()},s._onTextTrackChanged=function(e){var t=this;this.ready().then((function(){return t._playbackAttributesState.textLanguage=e.payload.selectedTextTrack.language})),this._markActiveTrack(e.payload.selectedTextTrack),this.dispatchEvent(e)},s._resetTextCuesAndReposition=function(){this._engine.resetAllCues(),this._externalCaptionsHandler.resetAllCues(),this._updateTextDisplay([]);for(var e=0;e<this._activeTextCues.length;e++)this._activeTextCues[e].hasBeenReset=!0;this._updateTextDisplay(this._activeTextCues)},s._removeTextCuePatch=function(){var e=this,t=this._activeTextCues.filter((function(t){var n=t._endTime,r=t._startTime,i=e.currentTime;if(i<n&&i>r)return t}));this._updateTextDisplay(t)},s._handlePlaybackOptions=function(){if(this._config.playback=this._config.playback||{},"boolean"==typeof this._playbackAttributesState.muted?this.muted=this._playbackAttributesState.muted:"boolean"==typeof this._config.playback.muted&&(this.muted=this._config.playback.muted),"number"==typeof this._playbackAttributesState.volume?this.volume=this._playbackAttributesState.volume:"number"==typeof this._config.playback.volume&&(this.volume=this._config.playback.volume),"boolean"==typeof this._config.playback.playsinline&&(this.playsinline=this._config.playback.playsinline),"string"==typeof this._config.playback.crossOrigin&&(this.crossOrigin=this._config.playback.crossOrigin),Array.isArray(this._config.playback.playbackRates)){var e=this._config.playback.playbackRates.filter((function(e,t,n){return e>0&&e<=16&&n.indexOf(e)===t})).sort((function(e,t){return e-t}));e&&(this._playbackRates=e)}},s._handlePreload=function(){"auto"!==this._config.playback.preload||this._config.playback.autoplay||this.load()},s._autoPlay=function(){var e=this,t=this._config.playback.allowMutedAutoPlay;r.getCapabilities(this.engineType).then((function(r){r.autoplay?n():r.mutedAutoPlay?e.muted&&!e._fallbackToMutedAutoPlay?i():t?a():o():o()}));var n=function(){r._logger.debug("Start autoplay"),e._fallbackToMutedAutoPlay&&(e._fallbackToMutedAutoPlay=!1,e.muted=!1),e.play()},i=function(){r._logger.debug("Start muted autoplay"),e.play()},a=function(){r._logger.debug("Fallback to muted autoplay"),e._fallbackToMutedAutoPlay=!0,e.muted=!0,e.dispatchEvent(new m(Y.FALLBACK_TO_MUTED_AUTOPLAY)),e.play()},o=function(){r._logger.warn("Autoplay failed, pause player"),e._posterManager.show(),e.load(),e.dispatchEvent(new m(Y.AUTOPLAY_FAILED))}},s._handleAutoPlay=function(){(this.isAudio()||this._config.playback.autoplay!==mn.TRUE)&&this._posterManager.show(),this._config.playback.autoplay===mn.TRUE&&this._autoPlay()},s._playAfterAsyncMiddleware=function(){var e=this;this._engine?this._play():this._eventManager.listenOnce(this,Y.SOURCE_SELECTED,(function(){return e._play()}))},s._load=function(){var e=this;if(this._engine&&!this.src&&!this._loading){this._loading=!0;var t=this._sources.startTime;this._engine.load(t).then((function(n){e.isLive()&&(-1===t||Number(t)>=Number(e.duration))&&(e._isOnLiveEdge=!0),e._updateTracks(n.tracks),e.dispatchEvent(new m(Y.TRACKS_CHANGED,{tracks:e._tracks})),e._externalThumbnailsHandler.load(e.sources.thumbnails)})).finally((function(){e._loading=!1,e._reset=!1}))}},s._handleDimensions=function(){var e=this.config.dimensions;F.isObject(e)&&!F.isEmptyObject(e)&&(this.dimensions=e)},s._play=function(){var e=this;this._shouldLoadAfterAttach&&(this._load(),this._shouldLoadAfterAttach=!1),this.ready().then((function(){e._shouldPlayerSeekToLiveEdge()&&e.seekToLiveEdge(),e._engine.play()}))},s._shouldPlayerSeekToLiveEdge=function(){if(this.isLive()){var e=!this.isDvr()||"number"==typeof this.currentTime&&this.currentTime<0;return this._firstPlay?!!this.src&&!this.isOnLiveEdge():e}return!1},s._pause=function(){this._engine.pause()},s._setCurrentTime=function(e){if(this._engine&&N.isNumber(e)){var t=e;e<0&&(t=0);var n=this.isLive()?this._engine.duration:this._engine.duration-.1;t>n&&(t=n),this._engine.currentTime=t}},s._onPause=function(){this._isOnLiveEdge=!1},s._onPlay=function(){this._firstPlay&&(this._firstPlay=!1,this.dispatchEvent(new m(Y.FIRST_PLAY)),this.hideBlackCover(),"number"==typeof this._playbackAttributesState.rate&&(this.playbackRate=this._playbackAttributesState.rate))},s._onPlaying=function(){this._firstPlaying||(this._firstPlaying=!0,this.isAudio()||this._posterManager.hide(),this.dispatchEvent(new m(Y.FIRST_PLAYING))),this._engine&&this._pendingSelectedVideoTrack&&(this._engine.selectVideoTrack(this._pendingSelectedVideoTrack),this._pendingSelectedVideoTrack=null)},s._onPlayFailed=function(e){this._firstPlay&&this._config.playback.autoplay&&(this._posterManager.show(),this.dispatchEvent(new m(Y.AUTOPLAY_FAILED,e.payload)))},s._onEnded=function(){this.paused||this._pause()},s._resetStateFlags=function(){this._loading=!1,this._firstPlay=!0,this._loadingMedia=!1,this._playbackStart=!1,this._firstPlaying=!1},s._calcRatio=function(e,t){if(void 0!==t.ratio&&(this._aspectRatio=t.ratio),this._aspectRatio){var n=this._aspectRatio.split(":").map((function(e){return Number(e)})),r=n[0],i=n[1];if(t.width||!t.width&&!t.height){var a=i/r*e.clientWidth;e.style.height=a+"px"}else if(t.height&&!t.width){var o=r/i*e.clientHeight;e.style.width=o+"px"}}},s._onTracksChanged=function(e){this._updateTracks(e.payload.tracks),this.dispatchEvent(e)},s._updateTracks=function(e){r._logger.debug("Tracks changed",e),this._tracks=e.concat(this._externalCaptionsHandler.getExternalTracks(e)),this._applyABRRestriction(this._config),this._addTextTrackOffOption(),this._maybeSetTracksLabels(),this._setDefaultTracks()},s._getTracksByType=function(e){return this._tracks.reduce((function(t,n){return n instanceof e&&n.available&&t.push(n),t}),[])},s._getImageTracks=function(){return this._getTracksByType(pt)},s._getTextTracks=function(){return this._getTracksByType($e)},s._getVideoTracks=function(){return this._getTracksByType(ae)},s._getAudioTracks=function(){return this._getTracksByType(oe)},s._markActiveTrack=function(e){var t;if(e instanceof ae?t=this._getVideoTracks():e instanceof oe?t=this._getAudioTracks():e instanceof $e&&(t=this._getTextTracks()),t)for(var n=0;n<t.length;n++)t[n].active=e.index===t[n].index},s._onCueChange=function(e){r._logger.debug("Text cue changed",e.payload.cues);try{this._activeTextCues=e.payload.cues.filter((function(e,t,n){var r=n[t-1];return!r||!(e.startTime===r.startTime&&e.endTime===r.endTime&&e.text.trim()===r.text.trim())}))}catch(t){this._activeTextCues=e.payload.cues}this._updateCueDisplaySettings(),this._updateTextDisplay(this._activeTextCues),this.dispatchEvent(e)},s._updateCueDisplaySettings=function(){for(var e=this._activeTextCues,t=this._textDisplaySettings,n=0;n<e.length;n++){var r=e[n];for(var i in t)t[i]&&(r[i]=t[i])}},s._updateTextDisplay=function(e){this._config.text.useNativeTextTrack||this._config.text.useShakaTextTrackDisplay||function(e,t,n,r){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var a=[],o=Ie.getSimpleBoxPosition(i),s=o.height<o.width?o.height:o.width,l={font:Math.round(.058*s*100)/100*1*r.implicitFontScale+"px "+r.fontFamily,color:ye.toRGBA(r.fontColor,r.fontOpacity),backgroundColor:ye.toRGBA(r.backgroundColor,r.backgroundOpacity),textShadow:r.getTextShadow()};!function(){for(var n,r,s=0;s<t.length;s++)r=t[s],n=new xe(e,r,l),i.appendChild(n.div),Pe(0,n,o,a),r.displayState=n.div,a.push(Ie.getSimpleBoxPosition(n))}()}else for(var u=0;u<t.length;u++)i.appendChild(t[u].displayState)}(window,e,this._textDisplayEl,this._textStyle)},s._addTextTrackOffOption=function(){var e=this._getTextTracks();e&&e.length&&this._tracks.push(new $e({active:!1,kind:$e.KIND.SUBTITLES,label:"Off",language:Ln}))},s._setDefaultTracks=function(){var e=this.getActiveTracks(),t=this._getTextTracks().find((function(e){return e.default})),n=this.config.playback,r=this._getTextTracks().find((function(e){return $e.langComparer(Ln,e.language)})),i=this._getLanguage(this._getTextTracks(),n.textLanguage,t),a=this._playbackAttributesState.textLanguage&&this._playbackAttributesState.textLanguage!==Ln?this._playbackAttributesState.textLanguage:i,o=this._playbackAttributesState.audioLanguage||this._getLanguage(this._getAudioTracks(),n.audioLanguage,e.audio);a===n.textLanguage?this._setDefaultTrack(this._getTextTracks(),a,r,n.additionalTextLanguage):this._setDefaultTrack(this._getTextTracks(),a,r),o===n.audioLanguage?this._setDefaultTrack(this._getAudioTracks(),o,e.audio,n.additionalAudioLanguage):this._setDefaultTrack(this._getAudioTracks(),o,e.audio),this._setDefaultVideoTrack()},s._getLanguage=function(e,t,n){var r=t;if("auto"===r){var i=e.find((function(e){return re.langComparer($.language,e.language)}));i?r=i.language:n&&n.language!==Ln?r=n.language:e&&e.length>0&&(r=e[0].language)}return r},s._setDefaultTrack=function(e,t,n,r){var i=this,a=function(e){i.selectTrack(e),i._markActiveTrack(e)},o=e.find((function(e){return re.langComparer(t,e.language,r,!0)}));if(o)a(o);else{var s=e.find((function(e){return re.langComparer(t,e.language,r,!1)}));s?a(s):n&&!n.active&&this.selectTrack(n)}},s._setDefaultVideoTrack=function(){var e=this,t=this._getVideoTracks().sort((function(e,t){return t.bandwidth-e.bandwidth})),n=t.find((function(t){var n;return t.label&&t.label===(null==(n=e._playbackAttributesState.videoTrack)?void 0:n.label)}));n||(n=t.find((function(t){var n;return t.height&&t.height===(null==(n=e._playbackAttributesState.videoTrack)?void 0:n.height)}))),n&&this.selectTrack(n)},s._maybeSetTracksLabels=function(){var e=this._config.customLabels;if(e)for(var t in e){if(!Object.prototype.hasOwnProperty.call(e,t))return;switch(t){case"qualities":this._setTracksCustomLabels(this._getVideoTracks(),e[t]);break;case"audio":this._setTracksCustomLabels(this._getAudioTracks(),e[t]);break;case"captions":this._setTracksCustomLabels(this._getTextTracks(),e[t])}}},s._setTracksCustomLabels=function(e,t){e.forEach((function(e){var n=t(F.copyDeep(e));n&&(e.label=n)}))},i=r,o=[{key:"_defaultConfig",get:function(){return F.copyDeep(st)}}],(a=[{key:"videoHeight",get:function(){return this._engine?this._engine.videoHeight:null}},{key:"videoWidth",get:function(){return this._engine?this._engine.videoWidth:null}},{key:"buffered",get:function(){return this._engine?this._engine.buffered:null}},{key:"stats",get:function(){var e={targetBuffer:NaN,availableBuffer:NaN};return this._engine&&(e.targetBuffer=this._engine.targetBuffer,e.availableBuffer=this._engine.availableBuffer),e}},{key:"currentTime",set:function(e){this._playbackMiddleware.setCurrentTime(e,this._setCurrentTime.bind(this))},get:function(){return this._engine?this._engine.currentTime:null}},{key:"duration",get:function(){return this._engine?this._engine.duration:null}},{key:"liveDuration",get:function(){return this._engine?this._engine.liveDuration:null}},{key:"volume",set:function(e){if(this._engine&&(N.isFloat(e)||0===e||1===e)){var t=e;t<0&&(t=0),t>1&&(t=1),this._engine.volume=t}},get:function(){return this._engine?this._engine.volume:null}},{key:"paused",get:function(){return this._engine?this._engine.paused:null}},{key:"seeking",get:function(){return this._engine?this._engine.seeking:null}},{key:"playsinline",set:function(e){this._engine&&(this._engine.playsinline=e)},get:function(){return this._engine?this._engine.playsinline:null}},{key:"muted",set:function(e){this._engine&&(this._engine.muted=e,this.dispatchEvent(new m(Y.MUTE_CHANGE,{mute:e})),!1===e&&(this._fallbackToMutedAutoPlay=e))},get:function(){return this._engine?this._engine.muted:null}},{key:"src",get:function(){return this._engine?this._engine.src:null}},{key:"dimensions",set:function(e){var t=this._getTargetElement();if(!e||F.isEmptyObject(e))this._aspectRatio=null,t.style.width=null,t.style.height=null;else{var n=F.mergeDeep(this.dimensions,e),r=n.height,i=n.width;t.style.width="number"==typeof i?i+"px":i,t.style.height="number"==typeof r?r+"px":r,this._calcRatio(t,e)}},get:function(){return{width:this._el.clientWidth,height:this._el.clientHeight}}},{key:"poster",get:function(){return this._posterManager.src}},{key:"playbackRate",set:function(e){this._engine&&(this._engine.playbackRate=e)},get:function(){return this._engine?this._engine.playbackRate:null}},{key:"playbackRates",get:function(){return this._playbackRates?this._playbackRates:this._engine?this._engine.playbackRates:[]}},{key:"defaultPlaybackRate",get:function(){return this._engine?this._engine.defaultPlaybackRate:1}},{key:"engineType",get:function(){return this._engineType}},{key:"streamType",get:function(){return this._streamType}},{key:"env",get:function(){return this._env}},{key:"config",get:function(){return F.mergeDeep({},this._config)}},{key:"sources",get:function(){return F.mergeDeep({},this._sources)}},{key:"hasUserInteracted",get:function(){return this._hasUserInteracted}},{key:"loadingMedia",set:function(e){this._loadingMedia=e}},{key:"crossOrigin",set:function(e){this._engine&&(this._engine.crossOrigin=e)},get:function(){return this._engine?this._engine.crossOrigin:null}},{key:"ended",get:function(){return this._engine?this._engine.ended:null}},{key:"playbackMiddleware",get:function(){return this._playbackMiddleware}},{key:"posterManager",get:function(){return this._posterManager}},{key:"textDisplaySetting",get:function(){return F.copyDeep(this._textDisplaySettings)}},{key:"textStyle",set:function(e){if(!(e instanceof ye))throw new Error("Style must be instance of TextStyle");var t=B.getElementBySelector("."+this._playerId+".playkit-subtitles-style");t||(t=B.createElement("style"),B.addClassName(t,this._playerId),B.addClassName(t,"playkit-subtitles-style"),B.appendChild(document.head,t));for(var n=t.sheet;n.cssRules.length;)n.deleteRule(0);try{this._textStyle=e,this._config.text.useNativeTextTrack?n.insertRule("#"+this._playerId+" video.playkit-engine::cue { "+e.toCSS()+" }",0):this._engine&&(this._engine.resetAllCues(),this._externalCaptionsHandler.resetAllCues(),this._updateTextDisplay(this._activeTextCues)),this.dispatchEvent(new m(Y.TEXT_STYLE_CHANGED))}catch(e){r._logger.error(e.message)}},get:function(){return this._textStyle.clone()}},{key:"Event",get:function(){return q}},{key:"TextStyle",get:function(){return ye}},{key:"State",get:function(){return J}},{key:"Track",get:function(){return Qe}},{key:"LogLevelType",get:function(){return E}},{key:"LogLevel",get:function(){return _}},{key:"AbrMode",get:function(){return tt}},{key:"MediaType",get:function(){return et}},{key:"StreamType",get:function(){return Ze}},{key:"EngineType",get:function(){return Je}},{key:"CorsType",get:function(){return nt}},{key:"AdBreakType",get:function(){return on}},{key:"AdTagType",get:function(){return sn}},{key:"Error",get:function(){return L}}])&&Dn(i.prototype,a),o&&Dn(i,o),r}(C);On(Mn,"_logger",S("Player"));var Nn=function(){function e(e){this._name=e.getName(),this._getEngineDecorator=e.getEngineDecorator.bind(e)}var t=e.prototype;return t.getEngineDecorator=function(e,t){return this._getEngineDecorator(e,t)},t.getName=function(){return this._name},e}(),Un={HLS:["application/x-mpegurl","application/vnd.apple.mpegurl"],DASH:["application/dash+xml"],PROGRESSIVE:["video/mp4"],SMOOTH_STREAMING:["application/vnd.ms-sstr+xml"]},Fn="0.82.3-canary.0-f0d3180",jn="@playkit-js/playkit-js";function Bn(e){return new Mn(e||{})}var Vn=Mn.getCapabilities,Hn=Mn.setCapabilities;t.default=Bn}])},function(e,t,n){var r=n(2),i=n(8),a=n(16),o=n(12),s=n(19),l=function(e,t,n){var u,c,p,d,f=e&l.F,h=e&l.G,g=e&l.S,y=e&l.P,v=e&l.B,m=h?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?i:i[t]||(i[t]={}),_=b.prototype||(b.prototype={});for(u in h&&(n=t),n)p=((c=!f&&m&&void 0!==m[u])?m:n)[u],d=v&&c?s(p,r):y&&"function"==typeof p?s(Function.call,p):p,m&&o(m,u,p,e&l.U),b[u]!=p&&a(b,u,d),y&&_[u]!=p&&(_[u]=p)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(51)("wks"),i=n(31),a=n(2).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){var r=n(21),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(3)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(4),i=n(93),a=n(28),o=Object.defineProperty;t.f=n(9)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(26);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(2),i=n(16),a=n(15),o=n(31)("src"),s=n(130),l=(""+s).split("toString");n(8).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(a(n,o)||i(n,o,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t,n){var r=n(1),i=n(3),a=n(26),o=/"/g,s=function(e,t,n,r){var i=String(a(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(o,""")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){var r=n(13),i=n(14);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]),r(i,{attributes:{id:"@playkit-js/playkit-js-ui"},insert:"head",singleton:!1}),e.exports=i.locals||{}},function(e,t,n){"use strict";e.exports=n(10)},function(e,t,n){"use strict";var r=n(1),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=f(n);i&&i!==h&&e(t,i,r)}var o=c(n);p&&(o=o.concat(p(n)));for(var s=l(t),g=l(n),y=0;y<o.length;++y){var v=o[y];if(!(a[v]||r&&r[v]||g&&g[v]||s&&s[v])){var m=d(n,v);try{u(t,v,m)}catch(e){}}}}return t}},function(e,t,n){"use strict";(function(e,r){var i,a=n(5);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var o=Object(a.a)(i);t.a=o}).call(this,n(11),n(12)(e))},function(e,t,n){e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e){e.exports=JSON.parse('{"en":{"controls":{"play":"Play","pause":"Pause","language":"Language","settings":"Settings","fullscreen":"Fullscreen","fullscreenExit":"Exit fullscreen","rewind":"Seek backwards","forward":"Seek forward","vrStereo":"vrStereo","closedCaptionsOn":"Disable Captions","closedCaptionsOff":"Enable Captions","live":"Live","mute":"Mute","unmute":"Unmute","next":"Next","prev":"Prev","startOver":"Start over","pictureInPicture":"Picture in picture","pictureInPictureExit":"Exit picture in picture","pictureInPictureExpand":"Expand","logo":"Logo","seekBarSlider":"Seek slider"},"unmute":{"unmute":"Unmute"},"volume":{"muted_click_to_unmute":"Muted. Click to unmute","volume_click_to_mute":"{{vol}}% volume. Click to mute","ten_percent":"ten percent","twenty_percent":"twenty percent","thirty_percent":"thirty percent","fourty_percent":"forty percent","fifty_percent":"fifty percent","sixty_percent":"sixty percent","seventy_percent":"seventy percent","eighty_percent":"eighty percent","ninety_percent":"ninety percent","one_hundred_percent":"one hundred percent"},"copy":{"button":"Copy URL"},"settings":{"title":"Settings","audio":"Audio","quality":"Quality","speed":"Speed","speedNormal":"Normal","qualityAuto":"Auto","advancedAudioDescription":"Advanced Audio Description"},"captions":{"captions":"Captions","advanced_captions_settings":"Advanced captions settings"},"overlay":{"close":"Close"},"error":{"default_error":"Something went wrong","default_session_text":"Session ID","retry":"Retry"},"ads":{"ad_notice":"Advertisement","learn_more":"Learn more","skip_ad":"Skip ad","skip_in":"Skip in"},"cvaa":{"title":"Advanced captions settings","sample_caption_tag":"Sample {{number}}","sample_custom_caption_tag":"Custom captions","set_custom_caption":"Set custom caption","edit_caption":"Edit caption","size_label":"Size","font_color_label":"Font color","font_family_label":"Font family","font_style_label":"Font style","font_opacity_label":"Font opacity","background_color_label":"Background color","background_opacity_label":"Background opacity","apply":"Apply","caption_preview":"This is your caption preview"},"cast":{"play_on_tv":"Play on TV","disconnect_from_tv":"Disconnect from TV","status":{"connecting_to":"Connecting to","connected_to":"Connected to","playing_on":"Playing on"}},"playlist":{"prev":"Previous","next":"Next","up_next":"Up Next","up_next_in":"Up next in","cancel":"Cancel"},"pictureInPicture":{"overlay_text":"Playing in Picture In Picture mode"}}}')},function(e,t,n){e.exports=n(8)()},function(e,t,n){"use strict";var r=n(9);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict"; + */!function(a){"use strict";var o,s={VERSION:"1.6.0"},l={},u=function(e,t){return function(){return t.apply(e,arguments)}},c=function(){var e,t,n=arguments,r=n[0];for(t=1;t<n.length;t++)for(e in n[t])!(e in r)&&n[t].hasOwnProperty(e)&&(r[e]=n[t][e]);return r},p=function(e,t){return{value:e,name:t}};s.TRACE=p(1,"TRACE"),s.DEBUG=p(2,"DEBUG"),s.INFO=p(3,"INFO"),s.TIME=p(4,"TIME"),s.WARN=p(5,"WARN"),s.ERROR=p(8,"ERROR"),s.OFF=p(99,"OFF");var d=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};d.prototype={setLevel:function(e){e&&"value"in e&&(this.context.filterLevel=e)},getLevel:function(){return this.context.filterLevel},enabledFor:function(e){var t=this.context.filterLevel;return e.value>=t.value},trace:function(){this.invoke(s.TRACE,arguments)},debug:function(){this.invoke(s.DEBUG,arguments)},info:function(){this.invoke(s.INFO,arguments)},warn:function(){this.invoke(s.WARN,arguments)},error:function(){this.invoke(s.ERROR,arguments)},time:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"start"])},timeEnd:function(e){"string"==typeof e&&e.length>0&&this.invoke(s.TIME,[e,"end"])},invoke:function(e,t){o&&this.enabledFor(e)&&o(t,c({level:e},this.context))}};var f,h=new d({filterLevel:s.OFF});(f=s).enabledFor=u(h,h.enabledFor),f.trace=u(h,h.trace),f.debug=u(h,h.debug),f.time=u(h,h.time),f.timeEnd=u(h,h.timeEnd),f.info=u(h,h.info),f.warn=u(h,h.warn),f.error=u(h,h.error),f.log=f.info,s.setHandler=function(e){o=e},s.setLevel=function(e){for(var t in h.setLevel(e),l)l.hasOwnProperty(t)&&l[t].setLevel(e)},s.getLevel=function(){return h.getLevel()},s.get=function(e){return l[e]||(l[e]=new d(c({name:e},h.context)))},s.createDefaultHandler=function(e){(e=e||{}).formatter=e.formatter||function(e,t){t.name&&e.unshift("["+t.name+"]")};var t={},n=function(e,t){Function.prototype.apply.call(e,console,t)};return"undefined"==typeof console?function(){}:function(r,i){r=Array.prototype.slice.call(r);var a,o=console.log;i.level===s.TIME?(a=(i.name?"["+i.name+"] ":"")+r[0],"start"===r[1]?console.time?console.time(a):t[a]=(new Date).getTime():console.timeEnd?console.timeEnd(a):n(o,[a+": "+((new Date).getTime()-t[a])+"ms"])):(i.level===s.WARN&&console.warn?o=console.warn:i.level===s.ERROR&&console.error?o=console.error:i.level===s.INFO&&console.info?o=console.info:i.level===s.DEBUG&&console.debug?o=console.debug:i.level===s.TRACE&&console.trace&&(o=console.trace),e.formatter(r,i),n(o,r))}},s.useDefaults=function(e){s.setLevel(e&&e.defaultLevel||s.DEBUG),s.setHandler(s.createDefaultHandler(e))},void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i)}()},function(e){e.exports=JSON.parse('{"heartbeatTimeout":30000}')},function(e){e.exports=JSON.parse('{"a":"data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADengAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcAAAAsJtb292AAAAbG12aGQAAAAAAAAAAAAAAAAAAAPoAAAALwABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAB7HRyYWsAAABcdGtoZAAAAAMAAAAAAAAAAAAAAAIAAAAAAAAALwAAAAAAAAAAAAAAAQEAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAAC8AAAAAAAEAAAAAAWRtZGlhAAAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE="}')},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){var r=n(6),i=n(7);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]),r(i,{insert:"head",singleton:!1}),e.exports=i.locals||{}},function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],i=0;i<e.length;i++){var s=e[i],l=t.base?s[0]+t.base:s[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var p=o(c),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(a[p].references++,a[p].updater(d)):a.push({identifier:c,updater:g(d,t),references:1}),r.push(c)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,c=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function d(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,h=0;function g(e,t){var n,r,i;if(t.singleton){var a=h++;n=f||(f=l(t)),r=p.bind(null,n,a,!1),i=p.bind(null,n,a,!0)}else n=l(t),r=d.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=o(n[r]);a[i].references--}for(var l=s(e,t),u=0;u<n.length;u++){var c=o(n[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=l}}}},function(e,t,n){(t=n(8)(!1)).push([e.i,".playkit-container {\n position: relative;\n width: 100%;\n height: 100%;\n color: #fff;\n outline: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.playkit-engine {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n object-fit: contain;\n}\n\n.playkit-engine video::-webkit-media-controls-panel,\n.playkit-engine video::-webkit-media-controls-panel-container,\n.playkit-engine video::-webkit-media-controls-start-playback-button,\n.playkit-engine video::-webkit-media-controls-play-button {\n display: none;\n -webkit-appearance: none;\n}\n\n.playkit-poster {\n position: absolute;\n display: block;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n background-size: contain;\n background-position: center center;\n background-repeat: no-repeat;\n background-color: #000;\n pointer-events: none;\n}\n\n.playkit-subtitles {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n pointer-events: none;\n margin-bottom: 5px;\n}\n\n.playkit-black-cover {\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: black;\n pointer-events: none;\n}\n\n.playkit-size-iframe {\n width: 100%;\n height: 100%;\n position: absolute;\n border: 0;\n z-index: -100;\n}\n\n.playkit-in-browser-fullscreen-mode {\n width: 100% !important;\n height: 100% !important;\n position: fixed !important;\n top: 0 !important;\n left: 0 !important;\n /*added for blocking element with fixed position which could be on the top of the player */\n z-index: 999999 !important;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(n=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"loadPlayer",(function(){return Bn})),n.d(t,"registerMediaSourceAdapter",(function(){return Lt})),n.d(t,"BaseMediaSourceAdapter",(function(){return yt})),n.d(t,"BaseMiddleware",(function(){return rt})),n.d(t,"Track",(function(){return re})),n.d(t,"VideoTrack",(function(){return ae})),n.d(t,"AudioTrack",(function(){return oe})),n.d(t,"TextTrack",(function(){return $e})),n.d(t,"ImageTrack",(function(){return pt})),n.d(t,"TextStyle",(function(){return ye})),n.d(t,"Cue",(function(){return Be})),n.d(t,"TimedMetadata",(function(){return Mt})),n.d(t,"createTextTrackCue",(function(){return Nt})),n.d(t,"createTimedMetadata",(function(){return Ut})),n.d(t,"Utils",(function(){return r})),n.d(t,"utils",(function(){return r})),n.d(t,"Error",(function(){return L})),n.d(t,"FakeEvent",(function(){return m})),n.d(t,"FakeEventTarget",(function(){return C})),n.d(t,"EventManager",(function(){return D})),n.d(t,"VERSION",(function(){return Fn})),n.d(t,"NAME",(function(){return jn})),n.d(t,"Env",(function(){return g})),n.d(t,"State",(function(){return Z})),n.d(t,"getCapabilities",(function(){return Vn})),n.d(t,"setCapabilities",(function(){return Hn})),n.d(t,"EngineDecoratorProvider",(function(){return Nn})),n.d(t,"registerEngine",(function(){return Zt})),n.d(t,"unRegisterEngine",(function(){return Jt})),n.d(t,"AdBreakType",(function(){return on})),n.d(t,"AdTagType",(function(){return sn})),n.d(t,"AdEventType",(function(){return z})),n.d(t,"filterTracksByRestriction",(function(){return mt})),n.d(t,"Html5EventType",(function(){return W})),n.d(t,"CustomEventType",(function(){return Y})),n.d(t,"EventType",(function(){return q})),n.d(t,"StateType",(function(){return J})),n.d(t,"TrackType",(function(){return Qe})),n.d(t,"EngineType",(function(){return Je})),n.d(t,"MediaType",(function(){return et})),n.d(t,"StreamType",(function(){return Ze})),n.d(t,"AbrMode",(function(){return tt})),n.d(t,"LogLevelType",(function(){return E})),n.d(t,"CorsType",(function(){return nt})),n.d(t,"DrmScheme",(function(){return bt})),n.d(t,"MimeType",(function(){return Un})),n.d(t,"RequestType",(function(){return ut})),n.d(t,"ScreenOrientationType",(function(){return ot})),n.d(t,"AutoPlayType",(function(){return mn})),n.d(t,"ThumbnailInfo",(function(){return ft})),n.d(t,"getLogger",(function(){return S})),n.d(t,"LogLevel",(function(){return _})),n.d(t,"getLogLevel",(function(){return A})),n.d(t,"setLogLevel",(function(){return w})),n.d(t,"setLogHandler",(function(){return k}));var r={};n.r(r),n.d(r,"Number",(function(){return N})),n.d(r,"String",(function(){return U})),n.d(r,"Object",(function(){return F})),n.d(r,"Generator",(function(){return j})),n.d(r,"Dom",(function(){return B})),n.d(r,"Http",(function(){return V})),n.d(r,"VERSION",(function(){return H})),n.d(r,"ResizeWatcher",(function(){return ln})),n.d(r,"MultiMap",(function(){return v})),n.d(r,"binarySearch",(function(){return cn}));var i=n(0),a=n.n(i),o=/^.*(web0s).*(smarttv).*$/i,s=/^.*(smart-tv).*(tizen).*$/i,l=/^.*(vidaa).*(smarttv).*$/i,u=[[s],[[a.a.BROWSER.NAME,"SAMSUNG_TV_BROWSER"],[a.a.BROWSER.MAJOR,""],[a.a.BROWSER.VERSION,""]]],c=[[o],[a.a.OS.NAME],[l],[a.a.OS.NAME]],p=[[o],[[a.a.DEVICE.VENDOR,"LG"],[a.a.DEVICE.TYPE,a.a.DEVICE.SMARTTV]],[s],[[a.a.DEVICE.VENDOR,"SAMSUNG"],[a.a.DEVICE.TYPE,a.a.DEVICE.SMARTTV]],[l],[[a.a.DEVICE.VENDOR,"HISENSE"],[a.a.DEVICE.TYPE,a.a.DEVICE.SMARTTV]],[/^.*(smart-tv|smarttv).*$/i],[[a.a.DEVICE.TYPE,a.a.DEVICE.SMARTTV]]],d=[[/(edg)\/((\d+)?[\w.]+)/i],[[a.a.BROWSER.NAME,"Edge"],a.a.BROWSER.VERSION,a.a.BROWSER.MAJOR]],f=[].concat(d,u),h=new a.a(void 0,{browser:f,device:p,os:c}).getResult();h.isConsole=h.device.type===a.a.DEVICE.CONSOLE,h.isSmartTV=h.device.type===a.a.DEVICE.SMARTTV,h.isMobile=h.device.type===a.a.DEVICE.MOBILE,h.isTablet=h.device.type===a.a.DEVICE.TABLET,h.isWearable=h.device.type===a.a.DEVICE.WEARABLE,h.isEmbedded=h.device.type===a.a.DEVICE.EMBEDDED,h.isIPadOS="Mac OS"===h.os.name&&"ontouchend"in document,h.isSafari=h.browser.name.includes("Safari"),h.isIOS="iOS"===h.os.name,h.isMacOS="Mac OS"===h.os.name;var g=h;function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=function(){function e(){this._map=new Map}var t=e.prototype;return t.push=function(e,t){if(this._map.has(e)){var n=this._map.get(e);Array.isArray(n)&&(n.push(t),this._map.set(e,n))}else this._map.set(e,[t])},t.set=function(e,t){this._map.set(e,t)},t.has=function(e){return this._map.has(e)},t.get=function(e){var t=this._map.get(e);return t?t.slice():[]},t.getAll=function(){for(var e,t=[],n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._map.values());!(e=n()).done;){var r=e.value;t=t.concat(r)}return t},t.remove=function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n)){for(var r=0;r<n.length;++r)n[r]==t&&(n.splice(r,1),--r);0===n.length&&this._map.delete(e)}}},t.keys=function(){return this._map.keys()},t.clear=function(){this._map.clear()},e}(),m=function(){function e(e,t){this.bubbles=!1,this.cancelable=!1,this.defaultPrevented=!1,this.timeStamp=window.performance?window.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.currentTarget=null,this.target=null,this.stopped=!1,this.payload=t}var t=e.prototype;return t.preventDefault=function(){},t.stopImmediatePropagation=function(){this.stopped=!0},t.stopPropagation=function(){},e}(),b=n(1),_={DEBUG:b.DEBUG,INFO:b.INFO,TIME:b.TIME,WARN:b.WARN,ERROR:b.ERROR,OFF:b.OFF},E={};function k(e){b.setHandler((function(t,n){return e(t,n)}))}function T(e){return e?b.get(e):b}function A(e){return T(e).getLevel()}function w(e,t){T(t).setLevel(e)}Object.keys(_).forEach((function(e){E[e]=e})),b.useDefaults({defaultLevel:b.ERROR});var S=T,C=function(){function e(){this._listeners=new v,this.dispatchTarget=this,this.__logger=S("FakeEventTarget")}var t=e.prototype;return t.addEventListener=function(e,t){this._listeners.push(e,t)},t.removeEventListener=function(e,t){this._listeners.remove(e,t)},t.dispatchEvent=function(e){for(var t=this._listeners.get(e.type)||[],n=0;n<t.length;++n){e.target=this.dispatchTarget,e.currentTarget=this.dispatchTarget;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(t){this.__logger.error("Error occurred when handling event: "+e.type+".",t)}if(e.stopped)break}return e.defaultPrevented},e}();function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var I=function(){function e(){this._bindingMap=new v}var t=e.prototype;return t.destroy=function(){return this.removeAll(),this._bindingMap=null,Promise.resolve()},t.listenOnce=function(e,t,n,r){var i=this;this.listen(e,t,(function r(a){i.unlisten(e,t,r),n.call(i,a)}),r)},t.listen=function(e,t,n,r){var i=new P(e,t,n,r);this._bindingMap&&this._bindingMap.push(t,i)},t.unlisten=function(e,t,n){if(this._bindingMap)for(var r=this._bindingMap.get(t),i=0;i<r.length;++i){var a=r[i];a.target!==e||a.listener!==n&&n||(a.unlisten(),this._bindingMap&&this._bindingMap.remove(t,a))}},t.removeAll=function(){if(this._bindingMap){for(var e,t=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._bindingMap.getAll());!(e=t()).done;)e.value.unlisten();this._bindingMap&&this._bindingMap.clear()}},e}(),P=function(){function e(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.options=r,this.target.addEventListener(t,n,!1)}return e.prototype.unlisten=function(){this.target&&(this.target.removeEventListener(this.type,this.listener,this.options),this.target=null,this.listener=null,this.options=null)},e}(),D=I,R={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,LIVE_MANIFEST_REFRESH_ERROR:1008,INVALID_TEXT_HEADER:2e3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_CREATE_TEXT_CUE:2009,DASH_ADAPTER_ERROR_PARSE_ISSUE:2010,UNKNOWN_FILE_TYPE:2011,UNKNOWN_LANGUAGE:2012,INVALID_VTT_THUMBNAILS_FILE:2013,BUFFER_READ_OUT_OF_BOUNDS:3e3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,HLS_FATAL_MEDIA_ERROR:3018,HLS_FRAG_PARSING_ERROR:3019,HLS_BUFFER_APPEND_ISSUE:3020,HLS_BUFFER_APPENDING_ISSUE:3021,NATIVE_ADAPTER_LOAD_FAILED:3022,HLS_BUFFER_STALLED_ERROR:3023,UNABLE_TO_GUESS_MANIFEST_TYPE:4e3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_LIVE_CONTENT_NOT_SUPPORTED:4029,HLSJS_CANNOT_PARSE:4030,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6e3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,BAD_FAIRPLAY_RESPONSE:6015,COULD_NOT_CREATE_MEDIA_KEYS:6016,COULD_NOT_CREATE_KEY_SESSION:6017,LOAD_INTERRUPTED:7e3,BITRATE_SWITCH_ISSUE:7001,LOAD_FAILED:7002,RUNTIME_ERROR_NOT_REGISTERED_PLUGIN:7003,RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED:7004,RUNTIME_ERROR_NOT_VALID_HANDLER:7005,NO_SOURCE_PROVIDED:7006,NO_ENGINE_FOUND_TO_PLAY_THE_SOURCE:7007,ENTER_PICTURE_IN_PICTURE_FAILED:7008,EXIT_PICTURE_IN_PICTURE_FAILED:7009,PLUGIN_LOAD_FAILED:7010,CAST_API_UNAVAILABLE:8e3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9e3,INDEXED_DB_ERROR:9001,OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,CONTENT_UNSUPPORTED_BY_BROWSER:9009,CANNOT_ADD_ITEM:9010,DOWNLOAD_FAILED:9011,COULD_NOT_GET_INFO_FROM_MEDIA_PROVIDER:9012,ENTRY_DOES_NOT_EXIST:9013,PAUSE_FAILED:9014,RESUME_FAILED:9015,RENEW_LICENSE_FAILED:9016,ENTRY_ALREADY_EXISTS:9017,REMOVE_FAILED:9018,CAST_LOAD_MEDIA_FAILED:10001,CAST_CUSTOM_MESSAGE_PARSING_ERROR:10002,CAST_EDIT_TRACKS_INFO_ERROR:10003,VR_NOT_SUPPORTED:11e3};function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Object.assign(R,{XML_PARSING_ERROR:8100,VAST_SCHEMA_VALIDATION_ERROR:8101,VAST_RESPONSE_VERSION_NOT_SUPPORTED:8102,TRAFFICKING_ERROR:8200,VAST_UNEXPECTED_LINEARITY:8201,VAST_UNEXPECTED_DURATION_ERROR:8202,VAST_UNEXPECTED_SIZE_ERROR:8203,VAST_WRAPPER_ERROR:8300,VAST_URI_ERROR:8301,VAST_TOO_MANY_REDIRECTS:8302,NO_ADS_VAST_RESPONSE:8303,GENERAL_LINEAR_ERROR:8400,FILE_NOT_FOUND:8401,VAST_MEDIA_LOAD_TIMEOUT:8402,MEDIA_FILE_NOT_FOUND:8403,MEDIA_FILE_DISPLAY_ERROR:8405,MEZZANINE_FILE_NOT_PROVIDED:8406,MEZZANINE_DOWNLOADED_FOR_THE_FIRST_TIME:8407,VAST_RESPONSE_AD_REJECTED:8408,CREATIVE_WAS_NOT_EXECUTED:8409,CODE_REFERENCED_NOT_EXECUTED:8410,GENERAL_NON_LINEAR_AD_ERROR:8500,NON_LINEAR_CREATIVE_DIMENSIONS_NOT_ALIGN_ERROR:8501,NON_LINEAR_FETCH_ERROR:8502,NON_LINEAR_RESOURCE_NOT_FOUND:8503,GENERAL_COMPANION_ADS_ERROR:8600,COMPANION_DIMENSIONS_NOT_FIT:8601,COMPANION_CANNOT_BE_DISPLAY:8602,COMPANION_CANNOT_BE_FETCHED:8603,COMPANION_TYPE_NOT_FOUND:8604,AD_UNDEFINED_ERROR:8900,GENERAL_VPAID_ERROR:8901});var L=function e(t,n,r,i){void 0===i&&(i={}),this.severity=t,this.category=n,this.code=r,this.data=i,A("Error")!==_.OFF&&e._logger.error("Category:"+n+" | Code:"+r+" |",i)};function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}O(L,"Severity",{RECOVERABLE:1,CRITICAL:2}),O(L,"Category",{NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,ADS:8,STORAGE:9,CAST:10,VR:11}),O(L,"Code",R),O(L,"_logger",S("Error"));var N={isNumber:function(e){return Number(e)===e},isInt:function(e){return this.isNumber(e)&&e%1==0},isFloat:function(e){return this.isNumber(e)&&e%1!=0}},U={capitlize:function(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)},endsWith:function(e,t){return"string"==typeof e&&"string"==typeof t&&-1!=e.indexOf(t,e.length-t.length)}},F={merge:function(e){for(var t,n={},r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return M(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(t=r()).done;){var i=t.value;Object.assign(n,i)}return n},isObject:function(e){return e&&"object"==typeof e&&!Array.isArray(e)},isClassInstance:function(e){return e&&e.constructor&&e.constructor.name&&"Object"!==e.constructor.name},mergeDeep:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;var i=n.shift();if(this.isObject(e)&&this.isObject(i))for(var a in i){var o,s;this.isObject(i[a])&&!this.isClassInstance(i[a])?(e[a]||Object.assign(e,((o={})[a]={},o)),this.mergeDeep(e[a],i[a])):Object.assign(e,((s={})[a]=i[a],s))}return this.mergeDeep.apply(this,[e].concat(n))},copyDeep:function(e){var t,n=this;return Array.isArray(e)?(t=e.length>0?e.slice(0):[]).forEach((function(e,r){("object"==typeof e&&e!=={}||Array.isArray(e)&&e.length>0)&&(t[r]=n.copyDeep(e))})):null!==e&&"object"==typeof e?e.clone&&"function"==typeof e.clone?t=e.clone():(t=Object.assign({__proto__:e.__proto__},e),Object.keys(t).forEach((function(e){("object"==typeof t[e]&&t[e]!=={}||Array.isArray(t[e])&&t[e].length>0)&&(t[e]=n.copyDeep(t[e]))}))):t=e,t},isEmptyObject:function(e){for(var t in e)if(window.Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},getPropertyPath:function(e,t){return t.split(".").reduce((function(e,t){return null==e?e:e[t]}),e)},hasPropertyPath:function(e,t){if(!t)return!1;for(var n=t.split("."),r=0;r<n.length;r++){var i=n[r];if(!e||!window.Object.prototype.hasOwnProperty.call(e,i))return!1;e=e[i]}return!0},createPropertyPath:function(e,t,n){void 0===n&&(n=null);for(var r=t.split("."),i=e;r.length>1;){var a=r,o=a[0];r=a.slice(1),void 0===i[o]&&(i[o]={}),i=i[o]}return i[r[0]]=n,e},deletePropertyPath:function(e,t){if(e&&t){for(var n=t.split("."),r=0;r<n.length-1;r++)if(void 0===(e=e[n[r]]))return;delete e[n.pop()]}},defer:function(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n},bind:function(e,t){return function(){t.apply(e,arguments)}}},j={uniqueId:function(e){var t=2+(!e||e<0?0:e-2);return"_"+Math.random().toString(36).substr(2,t)},guid:function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}},B={addClassName:function(e,t){e&&(e.classList?e.classList.add(t):B.hasClassName(e,t)||(e.className+=t))},removeClassName:function(e,t){e&&(e.classList?e.classList.remove(t):B.hasClassName(e,t)&&(e.className=e.className.replace(new RegExp("(\\s|^)"+t+"(\\s|$)")," ").replace(/^\s+|\s+$/g,"")))},hasClassName:function(e,t){return e&&e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},setAttribute:function(e,t,n){e.setAttribute(t,n)},removeAttribute:function(e,t){e.removeAttribute(t)},setStyle:function(e,t,n){void 0!==e.style.getPropertyValue(t)&&e.style.setProperty(t,n)},appendChild:function(e,t){e&&t&&e.appendChild&&e.appendChild(t)},removeChild:function(e,t){e&&t&&e.removeChild&&e.removeChild(t)},prependTo:function(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},getElementById:function(e){return document.getElementById(e)},getElementsByTagName:function(e){return document.getElementsByTagName(e)},createElement:function(e){return document.createElement(e)},loadStyleSheetAsync:function(e){var t=this;return new Promise((function(n,r){var i=!1,a=t.createElement("link");a.type="text/css",a.rel="stylesheet",a.href=e,a.async=!0,a.onload=a.onreadystatechange=function(){i||this.readyState&&"complete"!==this.readyState||(i=!0,n(this))},a.onerror=a.onabort=r,B.appendChild(document.head,a)}))},loadScriptAsync:function(e){var t=this;return new Promise((function(n,r){var i=!1,a=document.getElementsByTagName("script")[0],o=t.createElement("script");o.type="text/javascript",o.src=e,o.async=!0,o.onload=o.onreadystatechange=function(){i||this.readyState&&"complete"!==this.readyState||(i=!0,n(this))},o.onerror=o.onabort=r,a&&a.parentNode&&a.parentNode.insertBefore(o,a)}))},getElementBySelector:function(e){try{return document.querySelector(e)}catch(e){return}},insertBefore:function(e,t,n){try{return e.insertBefore(t,n)}catch(e){return null}}},V={protocol:/^(https?:)/i.test(document.location.protocol)?document.location.protocol:"https:",execute:function(e,t,n,r,i,a){void 0===n&&(n="POST");var o=new XMLHttpRequest;return new Promise((function(s,l){o.onreadystatechange=function(){if(4===o.readyState)if(200===o.status)try{var e=JSON.parse(o.responseText);s(e)}catch(e){s(o.responseText)}else l(o.responseText)},o.open(n,e),r&&r.forEach((function(e,t){o.setRequestHeader(t,e)})),i&&(o.timeout=i),a&&(o.ontimeout=function(e){a(),l(e)}),o.send(t)}))},jsonp:function(e,t,n){var r,i=(n=n||{}).timeout?n.timeout:5e3,a=document.createElement("script"),o="jsonpcallback"+Math.round(Date.now()+1000001*Math.random()),s=e,l=function(){a&&a.parentNode&&a.parentNode.removeChild(a),window[o]=function(){},r&&clearTimeout(r)};return new Promise((function(n,u){i&&(r=setTimeout((function(){l(),u(new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.TIMEOUT,e))}),i)),window[o]=function(r){var i=t(r,e);l(),n(i)},s.match(/\?/)?s+="&responseFormat=jsonp&callback="+o:s+="?responseFormat=jsonp&callback="+o,a.type="text/javascript",a.src=s,document.getElementsByTagName("head")[0].appendChild(a)}))},convertHeadersToDictionary:function(e){var t={};try{e.trim().split(/[\r\n]+/).forEach((function(e){var n=e.split(": "),r=n.shift().toLowerCase(),i=n.join(": ");t[r]=i}))}catch(e){}return t}},H={compare:function(e,t,n){void 0===n&&(n={});var r=(n=F.merge([{lexicographical:!1,zeroExtend:!0},n])).lexicographical,i=n.zeroExtend,a=(e||"0").split("."),o=(t||"0").split("."),s=function(e){return(r?/^\d+[A-Za-zαß]*$/:/^\d+[A-Za-zαß]?$/).test(e)},l=function(e){return e.map((function(e){var t=/[A-Za-zαß]/.exec(e);return Number(t?e.replace(t[0],"."+e.charCodeAt(t.index)):e)}))};if(!a.every(s)||!o.every(s))return NaN;if(i){for(;a.length<o.length;)a.push("0");for(;o.length<a.length;)o.push("0")}r||(a=l(a),o=l(o));for(var u=0;u<a.length;++u){if(o.length===u)return 1;if(a[u]!==o[u])return a[u]>o[u]?1:-1}return a.length!==o.length?-1:0}};function K(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var G=function(){function e(){this._createEl()}var t,n,r=e.prototype;return r.setSrc=function(e){e&&(this._posterUrl=e,B.setStyle(this._el,"background-image",'url("'+this._posterUrl+'")'),this.hide())},r.getElement=function(){return this._el},r._createEl=function(){if(!this._el){var e=this._el=B.createElement("div");B.setAttribute(e,"id",j.uniqueId(5)),B.setAttribute(e,"tabindex","-1")}},r._removeEl=function(){this._el&&B.removeChild(this._el.parentNode,this._el)},r.show=function(){B.setStyle(this._el,"display","")},r.hide=function(){B.setStyle(this._el,"display","none")},r.reset=function(){this._posterUrl="",B.setStyle(this._el,"background-image","")},r.destroy=function(){this.reset(),this._removeEl()},t=e,(n=[{key:"src",get:function(){return this._posterUrl}}])&&K(t.prototype,n),e}(),z={AD_CAN_SKIP:"adcanskip",AD_MANIFEST_LOADED:"admanifestloaded",AD_LOADED:"adloaded",AD_STARTED:"adstarted",AD_RESUMED:"adresumed",AD_PAUSED:"adpaused",AD_CLICKED:"adclicked",AD_SKIPPED:"adskipped",AD_COMPLETED:"adcompleted",AD_ERROR:"aderror",ADS_COMPLETED:"adscompleted",ALL_ADS_COMPLETED:"alladscompleted",AD_BREAK_START:"adbreakstart",AD_BREAK_END:"adbreakend",AD_FIRST_QUARTILE:"adfirstquartile",AD_MIDPOINT:"admidpoint",AD_THIRD_QUARTILE:"adthirdquartile",USER_CLOSED_AD:"userclosedad",AD_VOLUME_CHANGED:"advolumechanged",AD_MUTED:"admuted",AD_PROGRESS:"adprogress",AD_BUFFERING:"adbuffering",AD_WATERFALLING:"adwaterfalling",AD_WATERFALLING_FAILED:"adwaterfallingfailed",AD_AUTOPLAY_FAILED:"adautoplayfailed"},W={ABORT:"abort",CAN_PLAY:"canplay",CAN_PLAY_THROUGH:"canplaythrough",DURATION_CHANGE:"durationchange",EMPTIED:"emptied",ENDED:"ended",ERROR:"error",LOADED_DATA:"loadeddata",LOADED_METADATA:"loadedmetadata",LOAD_START:"loadstart",PAUSE:"pause",PLAY:"play",PLAYING:"playing",PROGRESS:"progress",RATE_CHANGE:"ratechange",SEEKED:"seeked",SEEKING:"seeking",STALLED:"stalled",SUSPEND:"suspend",TIME_UPDATE:"timeupdate",VOLUME_CHANGE:"volumechange",WAITING:"waiting",ENTER_PICTURE_IN_PICTURE:"enterpictureinpicture",LEAVE_PICTURE_IN_PICTURE:"leavepictureinpicture",PRESENTATION_MODE_CHANGED:"webkitpresentationmodechanged"},Y={MEDIA_LOADED:"medialoaded",PLAYER_RESET:"playerreset",PLAYER_DESTROY:"playerdestroy",ENTER_FULLSCREEN:"enterfullscreen",EXIT_FULLSCREEN:"exitfullscreen",PLAY_FAILED:"playfailed",AUTOPLAY_FAILED:"autoplayfailed",FALLBACK_TO_MUTED_AUTOPLAY:"fallbacktomutedautoplay",CHANGE_SOURCE_STARTED:"changesourcestarted",CHANGE_SOURCE_ENDED:"changesourceended",MUTE_CHANGE:"mutechange",VIDEO_TRACK_CHANGED:"videotrackchanged",AUDIO_TRACK_CHANGED:"audiotrackchanged",TEXT_TRACK_CHANGED:"texttrackchanged",IMAGE_TRACK_CHANGED:"imagetrackchanged",TEXT_TRACK_ADDED:"texttrackadded",TEXT_CUE_CHANGED:"textcuechanged",TRACKS_CHANGED:"trackschanged",ABR_MODE_CHANGED:"abrmodechanged",PLAYER_STATE_CHANGED:"playerstatechanged",PLAYBACK_START:"playbackstart",FIRST_PLAY:"firstplay",FIRST_PLAYING:"firstplaying",PLAYBACK_ENDED:"playbackended",SOURCE_SELECTED:"sourceselected",TEXT_STYLE_CHANGED:"textstylechanged",MEDIA_RECOVERED:"mediarecovered",VR_STEREO_MODE_CHANGED:"vrstereomodechanged",FPS_DROP:"fpsdrop",BOOKMARK_ERROR:"bookmarkerror",CONCURRENCY_LIMIT:"concurrencylimit",RESIZE:"resize",TIMED_METADATA:"timedmetadata",TIMED_METADATA_CHANGE:"timedmetadatachange",TIMED_METADATA_ADDED:"timedmetadataadded",FRAG_LOADED:"fragloaded",MANIFEST_LOADED:"manifestloaded",USER_GESTURE:"usergesture",DRM_LICENSE_LOADED:"drmlicenseloaded",SOURCE_URL_SWITCHED:"sourceurlswitched"},q=F.merge([W,Y,z]);function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var $=function(){function e(){}var t,n;return t=e,(n=[{key:"language",get:function(){var e;return(e=navigator.languages&&navigator.languages.length?navigator.languages[0]:navigator.userLanguage?navigator.userLanguage:navigator.language)&&e.match("-")&&(e=e.split("-")[0]),e}}])&&X(t,n),e}();function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Z=function(){function e(e){this.type=e,this._duration=0,this._timestamp=Date.now()/1e3}var t,n;return t=e,(n=[{key:"duration",get:function(){return this._duration},set:function(e){this._duration=e-this._timestamp}}])&&Q(t.prototype,n),e}(),J={IDLE:"idle",LOADING:"loading",PLAYING:"playing",PAUSED:"paused",BUFFERING:"buffering"};function ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var te=function(){function e(e){var t,n,r,i,a,o,s,l,u,c=this;s=this,l="_transitions",(o={})[J.IDLE]=((t={})[W.LOAD_START]=function(){return c._updateState(J.LOADING)},t[W.PLAY]=function(){return c._updateState(J.BUFFERING)},t[W.SEEKED]=function(){return c._updateState(J.PAUSED)},t),o[J.LOADING]=((n={})[W.LOADED_METADATA]=function(){return c._updateState(J.PAUSED)},n[W.ERROR]=function(e){return e.payload.severity===L.Severity.CRITICAL&&c._updateState(J.IDLE)},n[W.SEEKED]=function(){c._prevState&&c._prevState.type===J.PLAYING&&c._updateState(J.PLAYING)},n),o[J.PAUSED]=((r={})[W.PLAY]=function(){return c._updateState(J.PLAYING)},r[W.PLAYING]=function(){return c._updateState(J.PLAYING)},r[W.ENDED]=function(){return c._updateState(J.IDLE)},r),o[J.PLAYING]=((i={})[W.PAUSE]=function(){return c._updateState(J.PAUSED)},i[W.WAITING]=function(){c._player.seeking?c._updateState(J.LOADING):(c._updateState(J.BUFFERING),c._lastWaitingTime=c._player.currentTime)},i[W.ENDED]=function(){return c._updateState(J.IDLE)},i[W.ERROR]=function(e){return e.payload.severity===L.Severity.CRITICAL&&c._updateState(J.IDLE)},i),o[J.BUFFERING]=((a={})[W.PLAYING]=function(){return c._updateState(J.PLAYING)},a[W.PAUSE]=function(){return c._updateState(J.PAUSED)},a[W.TIME_UPDATE]=function(){"IE"===g.browser.name&&c._player.currentTime!==c._lastWaitingTime&&c._prevState&&c._prevState.type===J.PLAYING&&(c._lastWaitingTime=null,c._updateState(J.PLAYING))},a),u=o,l in s?Object.defineProperty(s,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[l]=u,this._player=e,this._logger=S("StateManager"),this._eventManager=new D,this._history=[],this._prevState=null,this._curState=new Z(J.IDLE),this._attachListeners()}var t,n,r=e.prototype;return r._attachListeners=function(){this._eventManager.listen(this._player,W.ERROR,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.ENDED,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.PLAY,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.LOAD_START,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.PLAYING,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.LOADED_METADATA,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.PAUSE,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.WAITING,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.SEEKED,this._doTransition.bind(this)),this._eventManager.listen(this._player,W.TIME_UPDATE,this._doTransition.bind(this))},r._doTransition=function(e){(e.type!==W.TIME_UPDATE||this._curState===J.BUFFERING&&e.type===W.TIME_UPDATE)&&this._logger.debug("Do transition request",e.type);var t=this._transitions[this._curState.type];"function"==typeof t[e.type]&&t[e.type](e)},r._updateState=function(e){this._curState.type!==e&&(this._curState.duration=Date.now()/1e3,this._history.push(this._curState),this._prevState=this._curState,this._curState=new Z(e),this._logger.debug("Switch player state: from "+this._prevState.type+" to "+this._curState.type),this._dispatchEvent())},r._dispatchEvent=function(){var e=new m(Y.PLAYER_STATE_CHANGED,{oldState:this._prevState,newState:this._curState});this._player.dispatchEvent(e)},r.destroy=function(){this._history=[],this._eventManager.destroy()},r.reset=function(){this._history=[]},t=e,(n=[{key:"currentState",get:function(){return this._curState}},{key:"previousState",get:function(){return this._prevState}},{key:"history",get:function(){return this._history}}])&&ee(t.prototype,n),e}();function ne(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var re=function(){var e,t;function n(e){void 0===e&&(e={}),this._id=e.id,this._active=e.active,this._label=e.label,this._language=e.language,this._index=e.index,this._available="boolean"!=typeof e.available||e.available,this.clone=n.clone.bind(null,this)}return n.langComparer=function(e,t,n,r){try{return e=e.toLowerCase(),t=t.toLowerCase(),n&&(n=n.toLowerCase()),r?e===t||n===t:!!e&&(e.startsWith(t)||t.startsWith(e))}catch(e){return!1}},n.clone=function(e){return Object.assign(Object.create(Object.getPrototypeOf(e)),e)},e=n,(t=[{key:"id",get:function(){return this._id}},{key:"active",get:function(){return this._active},set:function(e){this._active=e}},{key:"label",get:function(){return this._label},set:function(e){this._label=e}},{key:"language",get:function(){return this._language}},{key:"index",get:function(){return this._index},set:function(e){this._index=e}},{key:"available",get:function(){return this._available},set:function(e){this._available=e}}])&&ne(e.prototype,t),n}();function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ae=function(e){var t,n,r,i;function a(t){var n;return void 0===t&&(t={}),(n=e.call(this,t)||this)._bandwidth=t.bandwidth,n._width=t.width,n._height=t.height,n._label=t.label?t.label:n._height?n._height+"p":void 0,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r=a,(i=[{key:"bandwidth",get:function(){return this._bandwidth}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}}])&&ie(r.prototype,i),a}(re),oe=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(re);function se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function le(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ue={"":!0,up:!0};function ce(e){return"number"==typeof e&&e>=0&&e<=100}var pe,de=function(){function e(){le(this,"_width",100),le(this,"_lines",3),le(this,"_regionAnchorX",0),le(this,"_regionAnchorY",100),le(this,"_viewportAnchorX",0),le(this,"_viewportAnchorY",100),le(this,"_scroll","")}var t,n;return t=e,(n=[{key:"width",get:function(){return this._width},set:function(e){if(!ce(e))throw new Error("Width must be between 0 and 100.");this._width=e}},{key:"scroll",get:function(){return this._scroll},set:function(e){var t=function(e){return"string"==typeof e&&!!ue[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");this._scroll=t}},{key:"viewportAnchorY",get:function(){return this._viewportAnchorY},set:function(e){if(!ce(e))throw new Error("ViewportAnchorY must be between 0 and 100.");this._viewportAnchorY=e}},{key:"viewportAnchorX",get:function(){return this._viewportAnchorX},set:function(e){if(!ce(e))throw new Error("ViewportAnchorX must be between 0 and 100.");this._viewportAnchorX=e}},{key:"regionAnchorX",get:function(){return this._regionAnchorX},set:function(e){if(!ce(e))throw new Error("RegionAnchorY must be between 0 and 100.");this._regionAnchorX=e}},{key:"lines",get:function(){return this._lines},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");this._lines=e}},{key:"regionAnchorY",get:function(){return this._regionAnchorY},set:function(e){if(!ce(e))throw new Error("RegionAnchorX must be between 0 and 100.");this._regionAnchorY=e}}])&&se(t.prototype,n),e}();function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function he(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}pe="undefined"!=typeof window&&window.VTTRegion?window.VTTRegion:de;var ge=function(){function e(){he(this,"_fontSizeIndex",2),he(this,"fontFamily",e.FontFamily.SANS_SERIF),he(this,"fontColor",e.StandardColors.WHITE),he(this,"fontOpacity",e.StandardOpacities.OPAQUE),he(this,"backgroundColor",e.StandardColors.BLACK),he(this,"backgroundOpacity",e.StandardOpacities.OPAQUE),he(this,"fontEdge",e.EdgeStyles.NONE)}e.toRGBA=function(e,t){return"rgba("+e.concat(t).join(",")+")"},e.fromJson=function(t){var n=function(e,t){return null!=e?e:t},r=new e;return r.fontEdge=n(t.fontEdge,r.fontEdge),r.fontSize=n(t.fontSize,r.fontSize),r.fontScale=n(t.fontScale,r.fontScale),r.fontColor=n(t.fontColor,r.fontColor),r.fontOpacity=n(t.fontOpacity,r.fontOpacity),r.backgroundColor=n(t.backgroundColor,r.backgroundColor),r.backgroundOpacity=n(t.backgroundOpacity,r.backgroundOpacity),r.fontFamily=n(t.fontFamily,r.fontFamily),r},e.toJson=function(e){return{fontEdge:e.fontEdge,fontSize:e.fontSize,fontScale:e.fontScale,fontColor:e.fontColor,fontOpacity:e.fontOpacity,backgroundColor:e.backgroundColor,backgroundOpacity:e.backgroundOpacity,fontFamily:e.fontFamily}};var t,n,r=e.prototype;return r.getTextShadow=function(){for(var t=[],n=0;n<this.fontEdge.length;n++){var r=this.fontEdge[n].slice(0,3),i=this.fontEdge[n].slice(3,6);t.push(e.toRGBA(r,this.fontOpacity)+" "+i.join("px ")+"px")}return t.join(",")},r.toCSS=function(){var t=[];return t.push("font-family: "+this.fontFamily),t.push("color: "+e.toRGBA(this.fontColor,this.fontOpacity)),t.push("background-color: "+e.toRGBA(this.backgroundColor,this.backgroundOpacity)),t.push("text-shadow: "+this.getTextShadow()),t.join("!important; ")},r.clone=function(){return e.fromJson(e.toJson(this))},r.isEqual=function(t){return JSON.stringify(e.toJson(this))===JSON.stringify(e.toJson(t))},t=e,(n=[{key:"fontSize",set:function(t){var n=e.FontSizes.findIndex((function(e){return e.label===t}));-1!==n&&(this._fontSizeIndex=n)},get:function(){return e.FontSizes[this._fontSizeIndex].label}},{key:"fontScale",set:function(t){var n=e.FontSizes.findIndex((function(e){return e.value===t}));-1!==n&&(this._fontSizeIndex=n)},get:function(){return e.FontSizes[this._fontSizeIndex].value}},{key:"implicitFontScale",get:function(){return.25*e.FontSizes[this._fontSizeIndex].value+1}}])&&fe(t.prototype,n),e}();he(ge,"FontFamily",{ARIAL:"Arial",HELVETICA:"Helvetica",VERDANA:"Verdana",SANS_SERIF:"sans-serif"}),he(ge,"StandardColors",{WHITE:[255,255,255],BLACK:[0,0,0],RED:[255,0,0],GREEN:[0,255,0],BLUE:[0,0,255],YELLOW:[255,255,0],MAGENTA:[255,0,255],CYAN:[0,255,255]}),he(ge,"StandardOpacities",{OPAQUE:1,SEMI_HIGH:.75,SEMI_LOW:.25,TRANSPARENT:0}),he(ge,"EdgeStyles",{NONE:[],RAISED:[[34,34,34,1,1,0],[34,34,34,2,2,0],[34,34,34,3,3,0]],DEPRESSED:[[204,204,204,1,1,0],[204,204,204,0,1,0],[34,34,34,-1,-1,0],[34,34,34,0,-1,0]],UNIFORM:[[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4]],DROP:[[34,34,34,2,2,3],[34,34,34,2,2,4],[34,34,34,2,2,5]]}),he(ge,"FontSizes",[{value:-2,label:"50%"},{value:-1,label:"75%"},{value:0,label:"100%"},{value:2,label:"200%"},{value:3,label:"300%"},{value:4,label:"400%"}]);var ye=ge;function ve(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}var me={"&":"&","<":"<",">":">","‎":"","‏":""," ":" "},be={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},_e={v:"title",lang:"lang"},Ee={rt:"ruby"};function ke(){this.values=Oe(null)}function Te(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}function Ae(e,t,n){var r=e;function i(){var t=ve(e);if(null===t)throw new Le(Le.Errors.BadTimeStamp,"Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.substr(0,3))throw new Le(Le.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),a(),t.endTime=i(),a(),function(e,t){var r=new ke;Te(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),r.percent(e,a[0]),2===a.length&&r.alt("positionAlign",a[1],["start","center","end"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical",""),t.line=r.get("line",t.line||"auto"),t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100);try{t.align=r.get("align","center")}catch(e){t.align=r.get("align","middle")}t.position=r.get("position",t.position||"auto"),t.positionAlign=r.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}function we(e,t){function n(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]+>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function r(e){return me[e]}function i(e){for(var t;t=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(t[0],r);return e}function a(e,t){return!Ee[t.localName]||Ee[t.localName]===e.localName}function o(t,n){var r=be[t];if(!r)return null;var i=e.document.createElement(r),a=_e[t];return a&&n&&(i[a]=n.trim()),i}for(var s,l=e.document.createElement("div"),u=l,c=[];null!==(s=n());)if("<"!==s[0])u.appendChild(e.document.createTextNode(i(s)));else{if("/"===s[1]){c.length&&c[c.length-1]===s.substr(2).replace(">","")&&(c.pop(),u=u.parentNode);continue}var p=ve(s.substr(1,s.length-2)),d=void 0;if(p){d=e.document.createProcessingInstruction("timestamp",p),u.appendChild(d);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(d=o(f[1],f[3])))continue;if(!a(u,d))continue;f[2]&&(d.className=f[2].substr(1).replace("."," ")),c.push(f[1]),u.appendChild(d),u=d}return l}ke.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var Se=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function Ce(e){for(var t=0;t<Se.length;t++){var n=Se[t];if(e>=n[0]&&e<=n[1])return!0}return!1}var xe=function(e){var t,n;function r(t,n,r){var i;i=e.call(this)||this;var a="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent);"undefined"!=typeof WebVTTSet&&(WebVTTSet.fontSet,WebVTTSet.backgroundSet,WebVTTSet.edgeSet),i.cue=n,i.cueDiv=we(t,n.text);var o={color:r.color,backgroundColor:r.backgroundColor,textShadow:r.textShadow,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};a||(o.writingMode=""===n.vertical?"horizontal-tb":"lr"===n.vertical?"vertical-lr":"vertical-rl",o.unicodeBidi="plaintext"),i.applyStyles(o,i.cueDiv),i.div=t.document.createElement("div"),o={textAlign:"middle"===n.align?"center":n.align,font:r.font,whiteSpace:"pre-line",position:"absolute"},a||(o.direction=function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function r(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function i(e){if(!e||!e.length)return null;var t=e.pop(),n=t.textContent||t.innerText;if(n){var a=n.match(/^.*(\n|\r)/);return a?(e.length=0,a[0]):n}return"ruby"===t.tagName?i(e):t.childNodes?(r(e,t),i(e)):void 0}for(r(t,e);n=i(t);)for(var a=0;a<n.length;a++)if(Ce(n.charCodeAt(a)))return"rtl";return"ltr"}(i.cueDiv),o.writingMode=""===n.vertical?"horizontal-tb":"lr"===n.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),i.applyStyles(o),i.div.appendChild(i.cueDiv);var s=0;switch(n.positionAlign||n.align){case"start":case"left":case"line-left":s=n.position;break;case"center":s=n.position-n.size/2;break;case"end":case"right":case"line-right":s=n.position-n.size}return""===n.vertical?i.applyStyles({left:i.formatStyle(s,"%"),width:i.formatStyle(Math.min(n.size,100-s)||n.size,"%")}):i.applyStyles({top:i.formatStyle(s,"%"),height:i.formatStyle(Math.min(n.size,100-s)||n.size,"%")}),i.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})},i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(function(){function e(){}var t=e.prototype;return t.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},t.formatStyle=function(e,t){return 0===e?0:e+t},e}()),Ie=function(){function e(e){var t,n,r,i;if(function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"overlaps",(function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top})),e.div){n=e.div.offsetHeight,r=e.div.offsetWidth,i=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||i,this.height=e.height||n,this.bottom=e.bottom||i+(e.height||n),this.width=e.width||r,this.lineHeight=t||e.lineHeight||13}var t=e.prototype;return t.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},t.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},t.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},t.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},t.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},t.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},e.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,n=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,r=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||r,height:e.height||t,bottom:e.bottom||r+(e.height||t),width:e.width||n}},e}();function Pe(e,t,n,r){var i=new Ie(t),a=t.cue,o=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,n=t.textTrackList,r=0,i=0;i<n.length&&n[i]!==t;i++)n[i].mode===$e.MODE.SHOWING&&r++;return-1*++r}(a),s=[];if(a.snapToLines){var l;switch(a.vertical){case"":s=["+y","-y"],l="height";break;case"rl":s=["+x","-x"],l="width";break;case"lr":s=["-x","+x"],l="width"}var u=i.lineHeight,c=u*Math.round(o),p=n[l]+u,d=s[0];Math.abs(c)>p&&(c=c<0?-1:1,c*=Math.ceil(p/u)*u),o<0&&(c+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(d,c)}else{var f=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":o-=f/2;break;case"end":o-=f}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(o,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(o,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(o,"%")})}s=["+y","-x","+x","-y"],i=new Ie(t)}var h=function(e,t){for(var i,a=new Ie(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(r);)e.move(t[s]);if(e.within(n))return e;var l=e.intersectPercentage(n);o>l&&(i=new Ie(e),o=l),e=new Ie(a)}return i||a}(i,s);t.move(h.toCSSCompatValues(n))}var De=function(e,t){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]},Re=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Oe=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function Le(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function Me(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Le.prototype=Oe(Error.prototype),Le.prototype.constructor=Le,Le.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},De.prototype={reportOrThrowError:function(e){if(!(e instanceof Le))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t=this;function n(){for(var e=t.buffer,n=0;n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),r}function r(e){Te(e,(function(e,n){switch(e){case"Region":!function(e){var n=new ke;if(Te(e,(function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var r=t.split(",");if(2!==r.length)break;var i=new ke;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;n.set(e+"X",i.get("x")),n.set(e+"Y",i.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var r=new pe;r.width=n.get("width",100),r.lines=n.get("lines",3),r.regionAnchorX=n.get("regionanchorX",0),r.regionAnchorY=n.get("regionanchorY",100),r.viewportAnchorX=n.get("viewportanchorX",0),r.viewportAnchorY=n.get("viewportanchorY",100),r.scroll=n.get("scroll",""),t.onregion&&t.onregion(r),t.regionList.push({id:n.get("id"),region:r})}}(n)}}),/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var i;if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var a=(i=n()).match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Le(Le.Errors.BadSignature);t.state="HEADER"}for(var o=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(o?o=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new Be(0,0,""),t.state="CUE",-1===i.indexOf("--\x3e")){t.cue.id=i;continue}case"CUE":try{Ae(i,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var s=-1!==i.indexOf("--\x3e");if(!i||s&&(o=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+="\n"),t.cue.text+=i;continue;case"BADCUE":i||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new Le(Le.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}};var Ue={"":!0,lr:!0,rl:!0},Fe={start:!0,center:!0,end:!0,left:!0,right:!0};function je(e){return"string"==typeof e&&!!Fe[e.toLowerCase()]&&e.toLowerCase()}var Be,Ve,He,Ke=function(){function e(e,t,n){Ne(this,"hasBeenReset",!1),Ne(this,"displayState",void 0),Ne(this,"_id",""),Ne(this,"_pauseOnExit",!1),Ne(this,"_region",null),Ne(this,"_vertical",""),Ne(this,"_snapToLines",!0),Ne(this,"_line","auto"),Ne(this,"_lineAlign","start"),Ne(this,"_position",50),Ne(this,"_positionAlign","center"),Ne(this,"_size",50),Ne(this,"_align","center"),this._startTime=e,this._endTime=t,this._text=n}var t,n,r=e.prototype;return r.resetCue=function(){this.hasBeenReset=!0},r.getCueAsHTML=function(){return function(e,t){return e&&t?we(e,t):null}(window,this.text)},t=e,(n=[{key:"id",get:function(){return this._id},set:function(e){this._id=""+e}},{key:"pauseOnExit",get:function(){return this._pauseOnExit},set:function(e){this._pauseOnExit=e}},{key:"startTime",get:function(){return this._startTime},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");this._startTime=e,this.resetCue()}},{key:"endTime",get:function(){return this._endTime},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");this._endTime=e,this.resetCue()}},{key:"text",get:function(){return this._text},set:function(e){this._text=""+e,this.resetCue()}},{key:"region",get:function(){return this._region},set:function(e){this._region=e,this.resetCue()}},{key:"vertical",get:function(){return this._vertical},set:function(e){var t=function(e){return"string"==typeof e&&!!Ue[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._vertical=t,this.resetCue())}},{key:"snapToLines",get:function(){return this._snapToLines},set:function(e){this._snapToLines=e,this.resetCue()}},{key:"line",get:function(){return this._line},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");this._line=e,this.resetCue()}},{key:"lineAlign",get:function(){return this._lineAlign},set:function(e){var t=je(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._lineAlign=t,this.resetCue())}},{key:"position",get:function(){return this._position},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");this._position=e,this.resetCue()}},{key:"positionAlign",get:function(){return this._positionAlign},set:function(e){var t=je(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._positionAlign=t,this.resetCue())}},{key:"size",get:function(){return this._size},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");this._size=e,this.resetCue()}},{key:"align",get:function(){return this._align},set:function(e){var t=je(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._align=t,this.resetCue())}}])&&Me(t.prototype,n),e}();function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Be="undefined"!=typeof window&&window.VTTCue?window.VTTCue:Ke;var We,Ye,qe=(He=Ve=function(e){var t,n,r,i;function a(t){var n;return void 0===t&&(t={}),(n=e.call(this,t)||this)._label=n.label||n.language,n._kind=t.kind,n._external=t.external,n._index=a._generateIndex(),n._default=t.default||!1,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a._generateIndex=function(){return a._tracksCount++},a.reset=function(){a._tracksCount=0},r=a,(i=[{key:"kind",get:function(){return this._kind}},{key:"external",get:function(){return this._external}},{key:"default",get:function(){return this._default}}])&&ze(r.prototype,i),a}(re),(Ye="_tracksCount")in(We=Ve)?Object.defineProperty(We,Ye,{value:0,enumerable:!0,configurable:!0,writable:!0}):We[Ye]=0,He);function Xe(e){for(var t,n=[],r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ge(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ge(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(t=r()).done;){var i=t.value;if(window.VTTCue&&i instanceof window.VTTCue||window.DataCue&&i instanceof window.DataCue)n.push(i);else if(window.TextTrackCue&&i instanceof window.TextTrackCue)try{n.push(new Be(i.startTime,i.endTime,i.text))}catch(e){new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.UNABLE_TO_CREATE_TEXT_CUE,e)}}return n}qe.MODE={DISABLED:"disabled",SHOWING:"showing",HIDDEN:"hidden"},qe.KIND={METADATA:"metadata",SUBTITLES:"subtitles",CAPTIONS:"captions"},qe.EXTERNAL_TRACK_ID="playkit-external-track",qe.isMetaDataTrack=function(e){return e&&e.kind===qe.KIND.METADATA},qe.isNativeTextTrack=function(e){return e&&[qe.KIND.SUBTITLES,qe.KIND.CAPTIONS].includes(e.kind)},qe.isExternalTrack=function(e){return e&&[e.language,e.label].includes(qe.EXTERNAL_TRACK_ID)};var $e=qe,Qe=Object.freeze({VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image"}),Ze={DASH:"dash",HLS:"hls",PROGRESSIVE:"progressive",IMAGE:"image"},Je={HTML5:"html5",FLASH:"flash",SILVERLIGHT:"silverlight",CAST:"cast",YOUTUBE:"youtube",IMAGE:"image"},et={VOD:"Vod",LIVE:"Live",AUDIO:"Audio",IMAGE:"Image",UNKNOWN:"Unknown"},tt={MANUAL:"manual",AUTO:"auto"},nt={ANONYMOUS:"anonymous",USE_CREDENTIALS:"use-credentials"},rt=function(){function e(){}return e.prototype.callNext=function(e){e&&e()},e}(),it=function(){function e(e){this._actions=e,this._middlewares=new v,this._logger=S("Middleware")}var t=e.prototype;return t.use=function(e){for(var t in this._actions){var n=this._actions[t];"function"==typeof e[n]&&(this._logger.debug("Register <"+e.id+"> for action "+n),this._middlewares.push(n,e[n].bind(e)))}},t.run=function(e,t){var n=this;this._logger.debug("Start middleware chain for action "+e);for(var r=this._middlewares.get(e),i=arguments.length,a=new Array(i>2?i-2:0),o=2;o<i;o++)a[o-2]=arguments[o];this._executeMiddleware(r,(function(){n._logger.debug("Finish middleware chain for action "+e),t.apply(void 0,arguments)}),a)},t._executeMiddleware=function(e,t,n){var r=n,i=function(e,t,n){var i;(null==t?void 0:t.length)&&(r=t),(null==(i=r)?void 0:i.length)?e.apply(void 0,r.concat([n])):e(n)};e.reduceRight((function(e,t){return function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];i(t,r,e)}}),(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];i(t,n)}))()},e}(),at=function(){function e(){this._middleware=new it(e.Actions)}var t=e.prototype;return t.use=function(e){this._middleware.use(e)},t.load=function(t){this._middleware.run(e.Actions.LOAD,t)},t.play=function(t){this._middleware.run(e.Actions.PLAY,t)},t.pause=function(t){this._middleware.run(e.Actions.PAUSE,t)},t.setCurrentTime=function(t,n){this._middleware.run(e.Actions.SET_CURRENT_TIME,n,t)},e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(at,"Actions",{LOAD:"load",PLAY:"play",PAUSE:"pause",SET_CURRENT_TIME:"setCurrentTime"});var ot={NONE:"none",ANY:"any",NATURAL:"natural",LANDSCAPE:"landscape",PORTRAIT:"portrait",PORTRAIT_PRIMARY:"portrait-primary",PORTRAIT_SECONDARY:"portrait-secondary",LANDSCAPE_PRIMARY:"landscape-primary",LANDSCAPE_SECONDARY:"landscape-secondary"},st={log:{level:"ERROR"},text:{enableCEA708Captions:!0,useNativeTextTrack:!1,forceCenter:!1,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es"},playback:{audioLanguage:"",textLanguage:"",volume:1,playsinline:!0,preload:"none",autoplay:!1,loop:!1,autopause:!1,allowMutedAutoPlay:!0,muted:!1,pictureInPicture:!0,options:{html5:{hls:{},dash:{},native:{}}},preferNative:{hls:!1,dash:!1},inBrowserFullscreen:!1,screenLockOrientionMode:ot.NONE,playAdsWithMSE:!1,streamPriority:[{engine:"html5",format:"hls"},{engine:"html5",format:"dash"},{engine:"html5",format:"progressive"},{engine:"flash",format:"hls"}]},streaming:{forceBreakStall:!1},abr:{enabled:!0,fpsDroppedFramesInterval:5e3,fpsDroppedMonitoringThreshold:.2,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,restrictions:{minHeight:0,maxHeight:1/0,minWidth:0,maxWidth:1/0,minBitrate:0,maxBitrate:1/0}},drm:{keySystem:""},network:{maxStaleLevelReloads:20}},lt={options:{},metadata:{}},ut=(n(5),{MANIFEST:0,SEGMENT:1,LICENSE:2});function ct(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pt=function(e){var t,n,r,i;function a(t){var n;n=e.call(this,t)||this;var r=t.url,i=t.width,a=t.height,o=t.duration,s=t.rows,l=t.cols,u=t.customData;return n._url=r,n._width=i,n._height=a,n._duration=o,n._customData=u,n._rows=s||1,n._cols=l||1,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r=a,(i=[{key:"url",get:function(){return this._url}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"duration",get:function(){return this._duration}},{key:"rows",get:function(){return this._rows}},{key:"cols",get:function(){return this._cols}},{key:"customData",get:function(){return this._customData}},{key:"sliceWidth",get:function(){return this._width/this._cols}},{key:"sliceHeight",get:function(){return this._height/this._rows}}])&&ct(r.prototype,i),a}(re);function dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ft=function(){function e(e){var t=e.url,n=e.width,r=e.height,i=e.x,a=e.y;this._url=t,this._width=n,this._height=r,this._x=i,this._y=a}var t,n;return t=e,(n=[{key:"url",get:function(){return this._url}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"x",get:function(){return this._x}},{key:"y",get:function(){return this._y}}])&&dt(t.prototype,n),e}();function ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yt=function(e){var t,n;function r(t,n,r){var i;return void 0===r&&(r={}),gt(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i=e.call(this)||this),"_capabilities",{fpsControl:!1}),i._videoElement=t,i._sourceObj=n,i._config=r,i._onDurationChanged=function(){i.isLive()&&i._videoElement.paused&&i._trigger(W.TIME_UPDATE)},i._eventManager=new D,i._handleLiveTimeUpdate(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.isSupported=function(){return!0},r.isMSESupported=function(){var e=window.MediaSource||window.WebKitMediaSource;return!!e&&"function"==typeof e.isTypeSupported};var i,a,o=r.prototype;return o.destroy=function(){return this._sourceObj=null,this._config={},this.disableNativeTextTracks(),this._videoElement.removeEventListener(W.DURATION_CHANGE,this._onDurationChanged),this._eventManager.destroy(),Promise.resolve()},o._onTrackChanged=function(e){e instanceof ae?(r._logger.debug("Video track changed",e),this._trigger(Y.VIDEO_TRACK_CHANGED,{selectedVideoTrack:e})):e instanceof oe?(r._logger.debug("Audio track changed",e),this._trigger(Y.AUDIO_TRACK_CHANGED,{selectedAudioTrack:e})):e instanceof $e?(r._logger.debug("Text track changed",e),this._trigger(Y.TEXT_TRACK_CHANGED,{selectedTextTrack:e})):e instanceof pt&&(r._logger.debug("Image track changed",e),this._trigger(Y.IMAGE_TRACK_CHANGED,{selectedImageTrack:e}))},o._trigger=function(e,t){this.dispatchEvent(new m(e,t))},r.canPlayType=function(e,t){return r._throwNotImplementedError("static canPlayType")},o.load=function(){return r._throwNotImplementedError("load")},o.selectVideoTrack=function(e){return r._throwNotImplementedError("selectVideoTrack")},o.selectAudioTrack=function(e){r._throwNotImplementedError("selectAudioTrack")},o.selectTextTrack=function(e){r._throwNotImplementedError("selectTextTrack")},o.selectImageTrack=function(e){},o.hideTextTrack=function(){r._throwNotImplementedError("hideTextTrack")},o.enableAdaptiveBitrate=function(){r._throwNotImplementedError("enableAdaptiveBitrate")},o.isAdaptiveBitrateEnabled=function(){return r._throwNotImplementedError("isAdaptiveBitrateEnabled")},o.applyABRRestriction=function(e){return r._throwNotImplementedError("applyABRRestriction")},o._getLiveEdge=function(){return r._throwNotImplementedError("_getLiveEdge")},o.seekToLiveEdge=function(){r._throwNotImplementedError("seekToLiveEdge")},o.isLive=function(){return r._throwNotImplementedError("isLive")},o.isOnLiveEdge=function(){return this.liveDuration-this._videoElement.currentTime<=2*this.getSegmentDuration()},o.setMaxBitrate=function(e){},o.attachMediaSource=function(){},o.detachMediaSource=function(){},o._handleLiveTimeUpdate=function(){this._videoElement.addEventListener(W.DURATION_CHANGE,this._onDurationChanged)},o.disableNativeTextTracks=function(){Array.from(this._videoElement.textTracks).forEach((function(e){$e.isNativeTextTrack(e)&&!$e.isExternalTrack(e)&&(e.mode=$e.MODE.DISABLED)}))},o.handleMediaError=function(e){return!1},o.getStartTimeOfDvrWindow=function(){return r._throwNotImplementedError("getStartTimeOfDvrWindow")},o.getThumbnail=function(e){return null},o.getSegmentDuration=function(){return r._throwNotImplementedError("getSegmentDuration")},r._throwNotImplementedError=function(e){throw new L(L.Severity.CRITICAL,L.Category.PLAYER,L.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,e)},o.getDrmInfo=function(){return null},i=r,(a=[{key:"liveDuration",get:function(){return r._throwNotImplementedError("liveDuration")}},{key:"src",get:function(){return this._loadPromise&&this._sourceObj?this._sourceObj.url:""},set:function(e){!this._loadPromise&&this._sourceObj&&(this._sourceObj.url=e)}},{key:"capabilities",get:function(){return this._capabilities}},{key:"targetBuffer",get:function(){return NaN}}])&&ht(i.prototype,a),r}(C);function vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mt(e,t){var n=function(e,t){var n=function(e,t,n){return e>=(t||0)&&e<=(n||1/0)},r=t.maxHeight,i=t.minHeight,a=t.maxWidth,o=t.minWidth;if(0!==i||0!==o||r!==1/0||a!==1/0)return e.filter((function(e){return n(e.height,i,r)})).filter((function(e){return n(e.width,o,a)}));var s=t.maxBitrate,l=t.minBitrate;return 0!==l||s!==1/0?e.filter((function(e){return n(e.bandwidth,l,s)})):e}(e,t);return n.length?n:[]}gt(yt,"id","BaseAdapter"),gt(yt,"getLogger",S),gt(yt,"_logger",yt.getLogger(yt.id));var bt={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"},_t=S("FairPlay"),Et=function(){function e(){}return e.isConfigured=function(e,t){return bt.FAIRPLAY===t.keySystem&&!!e.find((function(e){return e.scheme===t.keySystem}))},e.canPlayDrm=function(e){var t=e.some((function(e){return e.scheme===bt.FAIRPLAY}))&&!!window.WebKitMediaKeys;return _t.debug("Can play DRM scheme of: "+bt.FAIRPLAY+" is "+t.toString()),t},e.setDrmPlayback=function(e,t){_t.debug("Sets drm playback");var n=t.find((function(e){return e.scheme===bt.FAIRPLAY}));n&&(e.licenseUrl=n.licenseUrl,e.certificate=n.certificate)},e}(),kt=n(2);function Tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var At={NEED_KEY:"webkitneedkey",KEY_MESSAGE:"webkitkeymessage",KEY_ADDED:"webkitkeyadded",KEY_ERROR:"webkitkeyerror"},wt=function(){function e(t,n,r,i){var a=this;Tt(this,"_logger",S("FairPlayDrmHandler")),Tt(this,"_retryLicenseRequest",4),Tt(this,"_defaultConfig",{licenseUrl:"",certificate:"",network:{responseFilter:function(t,n){var r={};try{var i=new DataView(n.data),o=(new TextDecoder).decode(i).trim();r=JSON.parse(o)}catch(e){return void a._onError(L.Code.BAD_FAIRPLAY_RESPONSE,{error:e,responseText:n.data})}var s=e._validateResponse(r);s.valid?n.data=e._base64DecodeUint8Array(r.ckc):a._onError(L.Code.BAD_FAIRPLAY_RESPONSE,s)}}}),this._config=F.mergeDeep({},this._defaultConfig,n),this._errorCallback=r,this._drmResponseCallback=i,this._videoElement=t,this._onWebkitNeedKeyHandler=function(e){return a._onWebkitNeedKey(e)},this._eventManager=new D,this._eventManager.listen(this._videoElement,At.NEED_KEY,this._onWebkitNeedKeyHandler)}var t=e.prototype;return t._onWebkitNeedKey=function(t){var n=this;this._logger.debug("Webkit need key triggered");var r=t.target,i=t.initData,a=e._extractContentId(i),o=e._base64DecodeUint8Array(this._config.certificate);if(i=e._concatInitDataIdAndCertificate(i,a,o),!r.webkitKeys){var s=this._selectKeySystem();this._logger.debug("Sets media keys"),r.webkitSetMediaKeys(new window.WebKitMediaKeys(s))}r.webkitKeys||this._onError(L.Code.COULD_NOT_CREATE_MEDIA_KEYS),this._logger.debug("Creates session"),this._keySession=r.webkitKeys.createSession("video/mp4",i),this._keySession||this._onError(L.Code.COULD_NOT_CREATE_KEY_SESSION),this._keySession.contentId=a,this._eventManager.listen(this._keySession,At.KEY_MESSAGE,(function(e){return n._onWebkitKeyMessage(e)})),this._eventManager.listen(this._keySession,At.KEY_ADDED,(function(){return n._onWebkitKeyAdded()})),this._eventManager.listen(this._keySession,At.KEY_ERROR,(function(e){return n._onWebkitKeyError(e)}))},t.getDrmInfo=function(){var e=this._config;return{certificate:e.certificate,licenseUrl:e.licenseUrl,scheme:bt.FAIRPLAY}},t.destroy=function(){this._eventManager.destroy(),this._keySession.close(),this._keySession=null},t._onWebkitKeyMessage=function(t){var n=this;this._logger.debug("Webkit key message triggered");var r=t.message,i=new XMLHttpRequest;i.responseType="arraybuffer",this._eventManager.listenOnce(i,"load",(function(e){return n._licenseRequestLoaded(e)}));var a,o={url:this._config.licenseUrl,body:e._base64EncodeUint8Array(r),headers:{}},s=this._config.network.requestFilter;if(s){this._logger.debug("Apply request filter");try{a=s(ut.LICENSE,o)}catch(e){a=Promise.reject(e)}}(a=a||Promise.resolve(o)).then((function(e){i.open("POST",e.url,!0);var t=!0;e.headers&&Object.entries(e.headers).forEach((function(e){var n=e[0],r=e[1];"string"==typeof r&&i.setRequestHeader(n,r),t&&(t="content-type"!==n.toLowerCase())})),"boolean"==typeof e.withCredentials&&(i.withCredentials=e.withCredentials),t&&i.setRequestHeader("Content-type","application/json"),n._logger.debug("Ready for license request"),i.onerror=function(){n._onError(L.Code.LICENSE_REQUEST_FAILED,{status:i.status,responseText:i.responseText})},n._licenseRequestTime=Date.now(),i.send(e.body)})).catch((function(e){n._errorCallback(new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.REQUEST_FILTER_ERROR,e)),n.destroy()}))},t._onWebkitKeyAdded=function(){this._logger.debug("Decryption key was added to session")},t._onWebkitKeyError=function(e){this._logger.error("A decryption key error was encountered",e),this._retryLicenseRequest<=0&&this._onError(L.Code.LICENSE_REQUEST_FAILED,e.target.error),this._retryLicenseRequest--},t._licenseRequestLoaded=function(e){var t=this;this._logger.debug("License request loaded");var n=e.target;if(n.status>299)this._onError(L.Code.LICENSE_REQUEST_FAILED,{status:n.status,error:n.responseText});else{if(this._drmResponseCallback){var r=Date.now()-this._licenseRequestTime;this._drmResponseCallback({licenseTime:r/1e3,scheme:bt.FAIRPLAY})}var i,a=n.responseURL,o=n.response,s={url:a,originalUrl:this._config.licenseUrl,data:o,headers:V.convertHeadersToDictionary(n.getAllResponseHeaders())};this._logger.debug("Apply response filter");try{i=this._config.network.responseFilter(ut.LICENSE,s)}catch(e){i=Promise.reject(e)}(i=i||Promise.resolve(s)).then((function(e){t._keySession.update(e.data)})).catch((function(e){t._errorCallback(new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.RESPONSE_FILTER_ERROR,e)),t.destroy()}))}},t._onError=function(e,t){this._errorCallback(new L(L.Severity.CRITICAL,L.Category.DRM,e,t))},e._validateResponse=function(e){return e.message&&e.message.indexOf("error")>0||null===e.reference||500===e.status_code?{valid:!1,details:"internal server error"}:""===e.ckc?{valid:!1,details:"ckc is missing"}:{valid:!0}},t._selectKeySystem=function(){var e=null;return window.WebKitMediaKeys.isTypeSupported("com.apple.fps.1_0","video/mp4")?e="com.apple.fps.1_0":this._logger.warn("Key System not supported"),e},e._extractContentId=function(t){var n=document.createElement("a");return n.href=e._arrayToString(t),n.hostname},e._arrayToString=function(e){return String.fromCharCode.apply(null,new Uint16Array(e.buffer))},e._base64DecodeUint8Array=function(e){for(var t=window.atob(e),n=t.length,r=new Uint8Array(new ArrayBuffer(n)),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r},e._concatInitDataIdAndCertificate=function(t,n,r){"string"==typeof n&&(n=e._stringToArray(n));var i=0,a=new ArrayBuffer(t.byteLength+4+n.byteLength+4+r.byteLength),o=new DataView(a);new Uint8Array(a,i,t.byteLength).set(t),i+=t.byteLength,o.setUint32(i,n.byteLength,!0),i+=4;var s=new Uint8Array(a,i,n.byteLength);return s.set(n),i+=s.byteLength,o.setUint32(i,r.byteLength,!0),i+=4,new Uint8Array(a,i,r.byteLength).set(r),new Uint8Array(a,0,a.byteLength)},e._stringToArray=function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),r=0,i=e.length;r<i;r++)n[r]=e.charCodeAt(r);return n},e._base64EncodeUint8Array=function(e){for(var t,n,r,i,a,o,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",c=0;c<e.length;)i=(t=e[c++])>>2,a=(3&t)<<4|(n=c<e.length?e[c++]:Number.NaN)>>4,o=(15&n)<<2|(r=c<e.length?e[c++]:Number.NaN)>>6,s=63&r,isNaN(n)?o=s=64:isNaN(r)&&(s=64),u+=l.charAt(i)+l.charAt(a)+l.charAt(o)+l.charAt(s);return u},e}();function St(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ct(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function Ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function It(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Tt(wt,"WebkitEvents",At),wt.WebkitEvents=At;var Dt=function(e){var t,n;function r(t,n,i){var a;return r._logger.debug("Creating adapter"),Pt(It(a=e.call(this,t,n,i)||this),"_lastTimeUpdate",0),Pt(It(a),"_waitingEventTriggered",!1),Pt(It(a),"_segmentDuration",0),Pt(It(a),"_mediaErrorRecoveryAttempts",0),Pt(It(a),"_lastTimeDetach",NaN),Pt(It(a),"_startTimeAttach",NaN),Pt(It(a),"_nativeTextTracksMap",{}),Pt(It(a),"_captionsHidden",!1),a._config=F.mergeDeep({},kt,a._config),a._progressiveSources=i.progressiveSources,a._liveEdge=0,a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.canPlayType=function(e){var t=!1;return"string"==typeof e&&(t=!!r.TEST_VIDEO.canPlayType(e.toLowerCase())),r._logger.debug("canPlayType result for mimeType:"+e+" is "+t.toString()),t},r.canPlayDrm=function(e,t){r._drmProtocol=null;for(var n,i=St(r._drmProtocols);!(n=i()).done;){var a=n.value;if(a.isConfigured(e,t)){r._drmProtocol=a;break}}if(!r._drmProtocol)for(var o,s=St(r._drmProtocols);!(o=s()).done;){var l=o.value;l.canPlayDrm(e)&&(r._drmProtocol=l)}return!!r._drmProtocol},r.createAdapter=function(e,t,n){r._logger.debug("createAdapter");var i={displayTextTrack:!1,progressiveSources:[]};if(F.hasPropertyPath(n,"text.useNativeTextTrack")&&(i.displayTextTrack=F.getPropertyPath(n,"text.useNativeTextTrack")),F.hasPropertyPath(n,"sources.progressive")&&(i.progressiveSources=F.getPropertyPath(n,"sources.progressive")),F.hasPropertyPath(n,"text")&&(i.enableCEA708Captions=n.text.enableCEA708Captions,i.captionsTextTrack1Label=n.text.captionsTextTrack1Label,i.captionsTextTrack1LanguageCode=n.text.captionsTextTrack1LanguageCode,i.captionsTextTrack2Label=n.text.captionsTextTrack2Label,i.captionsTextTrack2LanguageCode=n.text.captionsTextTrack2LanguageCode),F.hasPropertyPath(n,"playback")&&F.hasPropertyPath(n.playback,"options.html5.native")&&F.mergeDeep(i,n.playback.options.html5.native),F.hasPropertyPath(n,"abr")){var a=n.abr;a.restrictions&&F.createPropertyPath(i,"abr.restrictions",a.restrictions)}return i.network=n.network,new this(e,t,i)};var i,a,o=r.prototype;return o._dispatchErrorCallback=function(e){this._trigger(W.ERROR,e)},o._dispatchDRMLicenseLoaded=function(e){this._trigger(Y.DRM_LICENSE_LOADED,e)},o._maybeSetDrmPlayback=function(){var e=this;if(r._drmProtocol&&this._sourceObj&&this._sourceObj.drmData){var t={licenseUrl:"",certificate:"",network:this._config.network};r._drmProtocol.setDrmPlayback(t,this._sourceObj.drmData),this._drmHandler=new wt(this._videoElement,t,(function(t){return e._dispatchErrorCallback(t)}),(function(t){return e._dispatchDRMLicenseLoaded(t)}))}},o._setProgressiveSource=function(){var e=function(e,t,n){var r=null;if(n&&e){for(var i,a=[],o=1/0,s=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return vt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(i=s()).done;){var l=i.value,u=Math.abs(l.width-t);u<o?(o=u,a=[l]):u===o&&a.push(l)}for(var c=t/n,p=a,d=1/0,f=0,h=a;f<h.length;f++){var g=h[f];if(g.height){var y=Math.abs(g.width/g.height-c);y<d?(d=y,p=[g]):y===d&&p.push(g)}}for(var v=0,m=0,b=p;m<b.length;m++){var _=b[m];(_.bandwidth>v||!_.bandwidth)&&(v=_.bandwidth||v,r=_)}}return r}(this._progressiveSources,this._videoElement.offsetWidth,this._videoElement.offsetHeight);e&&(this._sourceObj=e)},o._isProgressivePlayback=function(){return!!this._sourceObj&&r._progressiveMimeTypes.includes(this._sourceObj.mimetype.toLowerCase())},o.load=function(e){var t=this;return this._wasCurrentTimeSetSuccessfully=!1,this._maybeSetDrmPlayback(),this._loadPromise||(this._loadPromise=new Promise((function(n,r){t._lastTimeUpdate=e||0;var i=t._startTimeAttach||e||0;t._loadPromiseReject=r,t._eventManager.listenOnce(t._videoElement,W.LOADED_DATA,(function(){return t._onLoadedData(n,i)})),t._eventManager.listenOnce(t._videoElement,W.PLAYING,(function(){return t._onPlaying(i)})),t._eventManager.listen(t._videoElement,W.TIME_UPDATE,(function(){return t._onTimeUpdate()})),t._eventManager.listen(t._videoElement,W.PLAY,(function(){return t._resetHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.PAUSE,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.ENDED,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.ABORT,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,W.SEEKED,(function(){return t._syncCurrentTime()})),t._eventManager.listen(t._videoElement,W.WAITING,(function(){return t._waitingEventTriggered=!0})),t._eventManager.listen(t._videoElement,W.PLAYING,(function(){return t._waitingEventTriggered=!1})),t._eventManager.listen(window,"focus",(function(){setTimeout((function(){g.isIOS&&(t._videoElement.currentTime=t._videoElement.currentTime>.1?t._videoElement.currentTime-.1:0),t._syncCurrentTime()}),1e3)})),t._isProgressivePlayback()&&t._setProgressiveSource(),t._sourceObj&&t._sourceObj.url?t._setSrc().then((function(){t._trigger(Y.ABR_MODE_CHANGED,{mode:t._isProgressivePlayback()?"manual":"auto"}),t._videoElement.load()})):t._videoElement.load()}))),this._loadPromise},o._handleDecodeError=function(e){var t=this;r._logger.debug("handleDecodeError",e);var n=this._videoElement.currentTime,i=this._getActivePKAudioTrack(),a=this._getActivePKTextTrack();this._videoElement.load(),this._eventManager.listenOnce(this._videoElement,W.PLAYING,(function(){t._mediaErrorRecoveryAttempts=0})),this._eventManager.listenOnce(this._videoElement,W.CAN_PLAY,(function(){r._logger.debug("CAN_PLAY"),t._videoElement.currentTime=n,t._videoElement.play(),t._videoElement.pause(),i&&t.selectAudioTrack(i),a?t.selectTextTrack(a):t.disableNativeTextTracks()}))},o.handleMediaError=function(e){return this._loadPromiseReject?(this._loadPromiseReject(new L(L.Severity.CRITICAL,L.Category.MEDIA,L.Code.NATIVE_ADAPTER_LOAD_FAILED,e)),!0):!!(e&&e.code===window.MediaError.MEDIA_ERR_DECODE&&(this._mediaErrorRecoveryAttempts++,this._mediaErrorRecoveryAttempts<=3))&&(this._handleDecodeError(e),!0)},o.attachMediaSource=function(){this._startTimeAttach=this._lastTimeDetach,this._lastTimeDetach=NaN},o.detachMediaSource=function(){this._lastTimeDetach=this._videoElement.currentTime,this._videoElement&&this._videoElement.src&&(B.setAttribute(this._videoElement,"src",""),B.removeAttribute(this._videoElement,"src")),this._loadPromise=null},o._setSrc=function(){var e,t=this,n={url:this._sourceObj?this._sourceObj.url:"",body:null,headers:{}};if("function"==typeof F.getPropertyPath(this._config,"network.requestFilter"))try{r._logger.debug("Apply request filter"),e=this._config.network.requestFilter(ut.MANIFEST,n)}catch(t){e=Promise.reject(t)}return(e=e||Promise.resolve(n)).then((function(e){t._videoElement.src=e.url})).catch((function(e){t._trigger(W.ERROR,new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.REQUEST_FILTER_ERROR,e))})),e},o._onPlaying=function(e){this.isLive()&&this._setStartTime(e)},o._onLoadedData=function(e,t){var n=this,i=function(){n._playerTracks=n._getParsedTracks(),n._addNativeAudioTrackChangeListener(),n._addNativeTextTrackChangeListener(),n._addNativeTextTrackAddedListener(),r._logger.debug("The source has been loaded successfully"),n._loadPromiseReject=null,e({tracks:n._playerTracks}),n.isLive()&&n._handleLiveDurationChange()};this.isLive()||this._setStartTime(t),this._videoElement.textTracks.length>0?i():this._eventManager.listenOnce(this._videoElement,W.CAN_PLAY,i.bind(this)),this._startTimeAttach=NaN},o._setStartTime=function(e){e&&e>-1&&(this._videoElement.currentTime=e),this._wasCurrentTimeSetSuccessfully=!0},o._onTimeUpdate=function(){this._videoElement.paused||(this._videoElement.currentTime>this._lastTimeUpdate?(this._waitingEventTriggered&&(this._waitingEventTriggered=!1,this._trigger(W.PLAYING)),this._resetHeartbeatTimeout()):this._videoElement.currentTime<this._lastTimeUpdate?this._syncCurrentTime():(this._waitingEventTriggered=!0,this._trigger(W.WAITING))),this._handleVideoTracksChange()},o._syncCurrentTime=function(){this._lastTimeUpdate=this._videoElement.currentTime},o._resetHeartbeatTimeout=function(){var e=this;this._lastTimeUpdate=this._videoElement.currentTime,this._clearHeartbeatTimeout(),this._heartbeatTimeoutId=setTimeout((function(){e._clearHeartbeatTimeout(),e._trigger(W.ERROR,new L(L.Severity.CRITICAL,L.Category.NETWORK,L.Code.TIMEOUT,"The player exceeded max buffer time of "+e._config.heartbeatTimeout+" ms. No progress has been done during this time."))}),this._config.heartbeatTimeout)},o._clearHeartbeatTimeout=function(){this._heartbeatTimeoutId&&(clearTimeout(this._heartbeatTimeoutId),this._heartbeatTimeoutId=null)},o._handleVideoTracksChange=function(){if(!this._isProgressivePlayback()){var e=this._videoElement,t=e.videoHeight,n=e.videoWidth,r=e.videoTracks;if(!this._videoDimensions||t!==this._videoDimensions.videoHeight||n!==this._videoDimensions.videoWidth){this._videoDimensions={videoHeight:t,videoWidth:n};var i={language:"",height:t,width:n,active:!0,index:Array.from(r).findIndex((function(e){return e.selected}))};this._onTrackChanged(new ae(i))}}},o.destroy=function(){var t=this;return r._logger.debug("destroy"),new Promise((function(n,r){e.prototype.destroy.call(t).then((function(){t._drmHandler&&t._drmHandler.destroy(),t._waitingEventTriggered=!1,t._progressiveSources=[],t._loadPromise=null,t._nativeTextTracksMap={},t._loadPromiseReject=null,t._liveEdge=0,t._lastTimeUpdate=0,t._lastTimeDetach=NaN,t._startTimeAttach=NaN,t._videoDimensions=null,t._clearHeartbeatTimeout(),t._liveDurationChangeInterval&&(clearInterval(t._liveDurationChangeInterval),t._liveDurationChangeInterval=null),n()}),(function(){return r}))}))},o._getParsedTracks=function(){var e=this._getParsedVideoTracks(),t=this._getParsedAudioTracks(),n=this._getParsedTextTracks();return e.concat(t).concat(n)},o._getParsedVideoTracks=function(){return this._isProgressivePlayback()?this._getParsedProgressiveVideoTracks():this._getParsedAdaptiveVideoTracks()},o._getParsedProgressiveVideoTracks=function(){var e=this._progressiveSources,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,bandwidth:e[n].bandwidth,width:e[n].width,height:e[n].height,active:!!this._sourceObj&&e[n].id===this._sourceObj.id,index:n};t.push(new ae(r))}return t},o._getParsedAdaptiveVideoTracks=function(){var e=this._videoElement.videoTracks,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].selected,label:e[n].label,language:e[n].language,index:n};t.push(new ae(r))}return t},o._getParsedAudioTracks=function(){var e=this._videoElement.audioTracks,t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].enabled,label:e[n].label,language:e[n].language,index:n};t.push(new oe(r))}return t},o._getParsedTextTracks=function(){var e=[this._config.captionsTextTrack1Label,this._config.captionsTextTrack2Label],t=[this._config.captionsTextTrack1LanguageCode,this._config.captionsTextTrack2LanguageCode],n=this._videoElement.textTracks,r=[];if(n){for(var i=0;i<n.length;i++)if(!$e.isExternalTrack(n[i])){var a={kind:n[i].kind,active:n[i].mode===$e.MODE.SHOWING,label:n[i].label,language:n[i].language,available:!0};if(a.kind===$e.KIND.SUBTITLES){var o=new $e(a);r.push(o),this._nativeTextTracksMap[o.index]=n[i]}else if(a.kind===$e.KIND.CAPTIONS&&this._config.enableCEA708Captions){a.label=a.label||e.shift(),a.language=a.language||t.shift(),a.available=this._captionsHidden;var s=new $e(a);r.push(s),this._nativeTextTracksMap[s.index]=n[i]}}this._captionsHidden||this._maybeShow708Captions()}return r},o._maybeShow708Captions=function(){var e=this,t=Array.from(this._videoElement.textTracks).filter((function(e){return e.kind===$e.KIND.CAPTIONS})),n=t.find((function(e){return e.mode===$e.MODE.SHOWING||e.mode===$e.MODE.HIDDEN}))||t[0];n&&(n.mode=$e.MODE.HIDDEN,this._captionsHidden=!0,this._eventManager.listenOnce(n,"cuechange",(function(){e._getPKTextTracks().forEach((function(e){return(e.available=!0)&&(e.mode=$e.MODE.DISABLED)})),e._trigger(Y.TRACKS_CHANGED,{tracks:e._playerTracks})})))},o.selectVideoTrack=function(e){this._isProgressivePlayback()?this._selectProgressiveVideoTrack(e):this.selectAdaptiveVideoTrack(e)},o._selectProgressiveVideoTrack=function(e){var t=this,n=this._progressiveSources;if(e instanceof ae&&n&&n[e.index]){var r=this._videoElement.currentTime,i=this._videoElement.paused;e.active=!0,this._sourceObj=n[e.index],this._eventManager.listenOnce(this._videoElement,W.LOADED_DATA,(function(){"Android Browser"===g.browser.name?(t._eventManager.listenOnce(t._videoElement,W.DURATION_CHANGE,(function(){t._videoElement.currentTime=r})),t._eventManager.listenOnce(t._videoElement,W.SEEKED,(function(){t._onTrackChanged(e),i&&t._videoElement.pause()})),t._videoElement.play()):(t._eventManager.listenOnce(t._videoElement,W.SEEKED,(function(){t._onTrackChanged(e)})),t._videoElement.currentTime=r,i||t._videoElement.play())})),this._setSrc()}},o.selectAdaptiveVideoTrack=function(e){var t=this._videoElement.videoTracks;e instanceof ae&&t&&t[e.index]&&(this._disableVideoTracks(),t[e.index].selected=!0,this._onTrackChanged(e))},o.selectAudioTrack=function(e){r._logger.debug("selectAudioTrack");var t=this._videoElement.audioTracks;e instanceof oe&&t&&t[e.index]&&(this._removeNativeAudioTrackChangeListener(),this._switchAudioTrack(e.index),this._onTrackChanged(e),this._addNativeAudioTrackChangeListener())},o._removeNativeAudioTrackChangeListener=function(){this._videoElement.audioTracks&&this._eventManager.unlisten(this._videoElement.audioTracks,"change")},o._addNativeAudioTrackChangeListener=function(){var e=this;this._videoElement.audioTracks&&this._eventManager.listen(this._videoElement.audioTracks,"change",(function(){return e._onNativeAudioTrackChange()}))},o._getPKAudioTracks=function(){return this._playerTracks.filter((function(e){return e instanceof oe}))},o._getActivePKAudioTrack=function(){return this._getPKAudioTracks().find((function(e){return!0===e.active}))},o._onNativeAudioTrackChange=function(){var e=this,t=function(){for(var t=0;t<e._videoElement.audioTracks.length;t++)if(e._videoElement.audioTracks[t].enabled)return t;return-1}(),n=this._getActivePKAudioTrack(),i=n?n.index:-1;if(t!==i){var a=this._getPKAudioTracks().find((function(e){return e.index===t}));a&&(r._logger.debug("Native selection of track, update the player audio track ("+i+" -> "+t+")"),this._onTrackChanged(a))}},o.selectTextTrack=function(e){if(e instanceof $e&&$e.isNativeTextTrack(e)){this._removeNativeTextTrackChangeListener();var t=this._nativeTextTracksMap[e.index];t&&(this.disableNativeTextTracks(),t.mode=this._getDisplayTextTrackModeString(),this._onTrackChanged(e),this._addNativeTextTrackChangeListener())}},o._removeNativeTextTrackChangeListener=function(){this._videoElement.textTracks&&this._eventManager.unlisten(this._videoElement.textTracks,"change")},o._addNativeTextTrackChangeListener=function(){var e=this;this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"change",(function(){return e._onNativeTextTrackChange()}))},o._getPKTextTracks=function(){return this._playerTracks.filter((function(e){return e instanceof $e}))},o._getActivePKTextTrack=function(){return this._getPKTextTracks().find((function(e){return!0===e.active}))},o._onNativeTextTrackChange=function(){var e=this,t=this._getPKTextTracks(),n=t.find((function(e){return"off"===e.language})),i=function(){for(var t in e._nativeTextTracksMap)if(e._getDisplayTextTrackModeString()===e._nativeTextTracksMap[t].mode)return Number(t);return-1}(),a=this._getActivePKTextTrack(),o=a?a.index:-1;if(i!==o)if(-1==i)n&&(r._logger.debug("Native selection of track, update the player text track ("+o+" -> off)"),this._onTrackChanged(n));else{var s=t.find((function(e){return e.index===i}));s&&(r._logger.debug("Native selection of track, update the player text track ("+o+" -> "+i+")"),this._onTrackChanged(s))}},o._getDisplayTextTrackModeString=function(){return this._config.displayTextTrack?$e.MODE.SHOWING:$e.MODE.HIDDEN},o._addNativeTextTrackAddedListener=function(){var e=this;!this._config.displayTextTrack&&this._videoElement.textTracks&&this._eventManager.listen(this._videoElement.textTracks,"addtrack",(function(){return e._onNativeTextTrackAdded()}))},o._onNativeTextTrackAdded=function(){this._playerTracks=this._getParsedTracks(),this._trigger(Y.TRACKS_CHANGED,{tracks:this._playerTracks})},o.hideTextTrack=function(){this.disableNativeTextTracks()},o.enableAdaptiveBitrate=function(){r._logger.warn("Enabling adaptive bitrate is not supported for native playback")},o.isAdaptiveBitrateEnabled=function(){return!this._isProgressivePlayback()},o.applyABRRestriction=function(e){F.createPropertyPath(this._config,"abr.restrictions",e),this._maybeApplyAbrRestrictions(e)},o._maybeApplyAbrRestrictions=function(e){if(this._isProgressivePlayback()){var t=mt(this._playerTracks.filter((function(e){return e instanceof ae})),e);!t.find((function(e){return e.active}))&&t.length?this.selectVideoTrack(t[0]):r._logger.warn("Invalid restrictions, there are not tracks within the restriction range")}},o._disableVideoTracks=function(){var e=this._videoElement.videoTracks;if(e)for(var t=0;t<e.length;t++)e[t].selected=!1},o._switchAudioTrack=function(e){r._logger.debug("_switchAudioTracks");var t=this._videoElement.audioTracks;if(t)for(var n=0;n<t.length;n++)t[n].enabled=n==e},o._getLiveEdge=function(){return this._videoElement.seekable.length?this._videoElement.seekable.end(this._videoElement.seekable.length-1):this._videoElement.buffered.length?this._videoElement.buffered.end(this._videoElement.buffered.length-1):this._videoElement.duration},o.seekToLiveEdge=function(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}},o.getSegmentDuration=function(){return this._segmentDuration},o.isLive=function(){return this._videoElement.duration===1/0},o.isOnLiveEdge=function(){return!!this._wasCurrentTimeSetSuccessfully&&e.prototype.isOnLiveEdge.call(this)},o._handleLiveDurationChange=function(){var e=this;this._liveDurationChangeInterval=setInterval((function(){e._calculateSegmentDuration();var t=e._getLiveEdge();e._liveEdge!==t&&(e._liveEdge=t,e._videoElement.dispatchEvent(new window.Event(W.DURATION_CHANGE)))}),1e3)},o._calculateSegmentDuration=function(){if(0===this._videoElement.seekable.start(0)){var e=this._videoElement,t=e.buffered,n=e.seekable;t.length&&n.length&&(this._segmentDuration=(t.end(t.length-1)-n.end(n.length-1))/3)}else{var r=this._getLiveEdge();this._liveEdge&&this._liveEdge!==r&&(this._segmentDuration=r-this._liveEdge)}},o.getStartTimeOfDvrWindow=function(){return this.isLive()&&this._videoElement.seekable.length?this._videoElement.seekable.start(0):0},o.getDrmInfo=function(){return this._drmHandler?this._drmHandler.getDrmInfo():null},i=r,(a=[{key:"liveDuration",get:function(){return this._getLiveEdge()}}])&&xt(i.prototype,a),r}(yt);function Rt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Pt(Dt,"id","NativeAdapter"),Pt(Dt,"_logger",yt.getLogger(Dt.id)),Pt(Dt,"TEST_VIDEO",B.createElement("video")),Pt(Dt,"_drmProtocols",[Et]),Pt(Dt,"_drmProtocol",null),Pt(Dt,"_progressiveMimeTypes",["video/mp4","audio/mp3"]);var Ot=function(){function e(){}return e.register=function(t){t&&(e._mediaSourceAdapters.includes(t)?e._logger.debug("Adapter <"+t.id+"> is already registered, do not register again"):(e._logger.debug("Adapter <"+t.id+"> has been registered successfully"),e._mediaSourceAdapters.push(t)))},e.unRegister=function(t){var n=e._mediaSourceAdapters.indexOf(t);n>-1&&(e._logger.debug("Unregistered <"+t.id+"> adapter"),e._mediaSourceAdapters.splice(n,1))},e.canPlaySource=function(t,n,r){void 0===n&&(n=!0),e._orderMediaSourceAdapters(n);var i=e._mediaSourceAdapters;if(t&&t.mimetype)for(var a=0;a<i.length;a++)if(i[a].canPlayType(t.mimetype)&&(!t.drmData||i[a].canPlayDrm(t.drmData,r)))return e._selectedAdapter=i[a],e._logger.debug("Selected adapter is <"+e._selectedAdapter.id+">"),!0;return!1},e._orderMediaSourceAdapters=function(t){e._mediaSourceAdapters=e._mediaSourceAdapters.filter((function(e){return"NativeAdapter"!==e.id})),t?e._mediaSourceAdapters.unshift(Dt):e._mediaSourceAdapters.push(Dt)},e.getMediaSourceAdapter=function(t,n,r){return t&&n&&r?(e._selectedAdapter||e.canPlaySource(n,!0,r.drm),e._selectedAdapter?e._selectedAdapter.createAdapter(t,n,r):null):null},e.destroy=function(){e._selectedAdapter=null},e}();Rt(Ot,"_logger",S("MediaSourceProvider")),Rt(Ot,"_mediaSourceAdapters",[Dt]),Rt(Ot,"_selectedAdapter",null);var Lt=Ot.register,Mt=function(e,t,n,r,i){this.startTime=e,this.endTime=t,this.id=n,this.type=r,this.metadata=i};function Nt(e){try{var t=e.startTime,n=e.endTime,r=e.id,i=e.type,a=e.metadata,o={};window.VTTCue?o=new window.VTTCue(t,n,""):window.TextTrackCue&&(o=new window.TextTrackCue(t,n,""));var s={key:i,data:a};return o.id=r,o.value=s,o}catch(e){return null}}function Ut(e){if(e){var t=e.startTime,n=e.endTime,r=e.id;if(Ft(e)){var i=Ft(e),a=i.type,o=i.metadata;return new Mt(t,n,r,a,o)}}return null}function Ft(e){if(e){var t=e.type,n=e.value,r=e.track;if(n){var i=n.key,a=n.data,o="org.id3"===t||"id3"===(r&&r.label),s=Object.values(Mt.TYPE).find((function(e){return e===i}));return s||(s=o?Mt.TYPE.ID3:Mt.TYPE.CUSTOM),{type:s,metadata:o||!a?n:a}}}return null}Mt.TYPE={ID3:"id3",EMSG:"emsg",CUE_POINT:"cuepoint",CUSTOM:"custom"};var jt,Bt,Vt=n(3);function Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Kt=(Bt=jt=function(){function e(){}return e.runCapability=function(){e._capabilities.autoplay||"boolean"==typeof e._capabilities.autoplay&&"boolean"==typeof e._capabilities.mutedAutoPlay?e._playPromiseResult=Promise.resolve(e._capabilities):(e._vid||(e._vid=B.createElement("video"),e._vid.src=Vt.a,e._vid.setAttribute("playsinline","")),e._playPromiseResult=new Promise((function(t){e._setMuted(!1),e._getPlayPromise().then((function(){return t({autoplay:!0,mutedAutoPlay:!0})})).catch((function(){e._setMuted(!0),e._getPlayPromise().then((function(){return t({autoplay:!1,mutedAutoPlay:!0})})).catch((function(){return t({autoplay:!1,mutedAutoPlay:!1})}))}))})))},e.getCapability=function(){return e._playPromiseResult.then((function(t){var n;return t.autoplay?n=Promise.resolve(t):(e.runCapability(),n=e._playPromiseResult),n.then((function(t){return F.mergeDeep(t,e._capabilities)}))}))},e.setCapabilities=function(t){e._logger.debug("Set player capabilities",t);var n=t.autoplay,r=t.mutedAutoPlay;"boolean"==typeof n&&(e._capabilities.autoplay=n),"boolean"==typeof r&&(e._capabilities.mutedAutoPlay=r)},e._getPlayPromise=function(){return e._vid.play()||e._forcePromiseReturnValue()},e._setMuted=function(t){t?(e._vid.muted=!0,e._vid.setAttribute("muted","")):(e._vid.muted=!1,e._vid.removeAttribute("muted"))},e._forcePromiseReturnValue=function(){return new Promise((function(t,n){e._vid.addEventListener(W.ERROR,(function(){n()}));var r=setTimeout((function(){e._logger.debug("Timeout 500 ms has been reached"),n()}),500);!0===e._vid.paused?(clearTimeout(r),n()):(clearTimeout(r),t())}))},e}(),Ht(jt,"_logger",S("Html5AutoPlayCapability")),Ht(jt,"_capabilities",{}),Bt);function Gt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Wt=function(e){var t,n;function r(t,n,i){var a;return zt(Gt(a=e.call(this)||this),"_droppedFramesInterval",null),zt(Gt(a),"_lastDroppedFrames",0),zt(Gt(a),"_lastDecodedFrames",0),zt(Gt(a),"_lastTime",0),zt(Gt(a),"_currentBitrate",0),a._eventManager=new D,a._mediaSourceAdapter=t,a._config=n,a._videoElement=i,a._mediaSourceAdapter.capabilities.fpsControl?(a._eventManager.listen(a._mediaSourceAdapter,Y.FPS_DROP,(function(e){return a._triggerFPSDrop(e.payload.data)})),Gt(a)):(-1===a._getDroppedAndDecodedFrames()[0]?r._logger.debug("Dropped frame watcher is not supported"):a._config.capLevelOnFPSDrop?(r._logger.debug("Initialized capLevelOnFPSDrop = true"),a._init()):r._logger.debug("Not Initialized"),a)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._init=function(){var e=this;this._eventManager.listen(this._mediaSourceAdapter,Y.VIDEO_TRACK_CHANGED,(function(t){return e._currentBitrate=t.payload.selectedVideoTrack.bandwidth})),this._droppedFramesInterval=setInterval((function(){return e._checkFPS()}),this._config.fpsDroppedFramesInterval)},i._triggerFPSDrop=function(e){this.dispatchEvent(new m(Y.FPS_DROP,e))},i._getDroppedAndDecodedFrames=function(){if("function"==typeof this._videoElement.getVideoPlaybackQuality){var e=this._videoElement.getVideoPlaybackQuality();return[e.droppedVideoFrames,e.totalVideoFrames]}return"number"==typeof this._videoElement.webkitDroppedFrameCount&&"number"==typeof this._videoElement.webkitDecodedFrameCount?[this._videoElement.webkitDroppedFrameCount,this._videoElement.webkitDecodedFrameCount]:[-1,-1]},i._checkFPS=function(){var e=this._getDroppedAndDecodedFrames(),t=e[0],n=e[1];try{var i=performance.now();if(n){if(this._lastTime){var a=i-this._lastTime,o=t-this._lastDroppedFrames,s=n-this._lastDecodedFrames,l=1e3*o/a;l>0&&(r._logger.debug("checkFPS : droppedFPS/decodedFPS:"+l/(1e3*s/a)),o>this._config.fpsDroppedMonitoringThreshold*s&&(this._mediaSourceAdapter.setMaxBitrate(this._currentBitrate-1),this._triggerFPSDrop({currentDropped:o,currentDecoded:s,totalDroppedFrames:l})))}this._lastTime=i,this._lastDroppedFrames=t,this._lastDecodedFrames=n}}catch(e){r._logger.error("Error occur while trying to check dropFrames: ",e)}},i.destroy=function(){this._droppedFramesInterval&&clearInterval(this._droppedFramesInterval),this._droppedFramesInterval=null,this._eventManager.destroy()},r}(C);function Yt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}zt(Wt,"_logger",S("droppedFramesWatcher"));var Xt=function(e){var t,n;function r(t,n,r){var i;return qt(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(i=e.call(this)||this),"_reset",!1),i._eventManager=new D,i._canLoadMediaSourceAdapterPromise=Promise.resolve(),i._createVideoElement(r),i._init(t,n),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.isSupported=function(){try{var e=B.createElement("video");return e.volume=.5,!!e.canPlayType}catch(e){return!1}},r.createEngine=function(e,t,n){return new this(e,t,n)},r.canPlaySource=function(e,t,n){return Ot.canPlaySource(e,t,n)},r.runCapabilities=function(){r._capabilities.forEach((function(e){return e.runCapability()}))},r.getCapabilities=function(){var e=[];return r._capabilities.forEach((function(t){return e.push(t.getCapability())})),Promise.all(e).then((function(e){var t,n={};return e.forEach((function(e){return Object.assign(n,e)})),(t={})[r.id]=n,t}))},r.setCapabilities=function(e){r._capabilities.forEach((function(t){return t.setCapabilities(e)}))},r.prepareVideoElement=function(e){if(!r.videoElementStore[e]){r._logger.debug("Create the video element for playing "+e);var t=B.createElement("video");r.videoElementStore[e]=t}r._logger.debug("Prepare the video element for playing "+e),r.videoElementStore[e].load()};var i,a,o=r.prototype;return o.restore=function(e,t){this.reset(),this._init(e,t)},o.reset=function(){var e=this;this._reset||(this._reset=!0,this._eventManager.removeAll(),this._droppedFramesWatcher&&(this._droppedFramesWatcher.destroy(),this._droppedFramesWatcher=null),this._canLoadMediaSourceAdapterPromise=new Promise((function(t,n){var r=e._mediaSourceAdapter?e._mediaSourceAdapter.destroy():Promise.resolve();e._el&&e._el.src?r.then((function(){B.setAttribute(e._el,"src",""),B.removeAttribute(e._el,"src"),t()}),n):r.then(t,n)})),this._mediaSourceAdapter=null)},o.destroy=function(){this.detach(),this._el&&(this.pause(),B.removeAttribute(this._el,"src"),B.removeChild(this._el.parentNode,this._el)),this._eventManager.destroy(),Ot.destroy(),this._droppedFramesWatcher&&(this._droppedFramesWatcher.destroy(),this._droppedFramesWatcher=null),this._mediaSourceAdapter&&(this._mediaSourceAdapter.destroy(),this._mediaSourceAdapter=null)},o.attachMediaSource=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.attachMediaSource()},o.detachMediaSource=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.detachMediaSource()},o.attach=function(){var e=this;Object.keys(W).forEach((function(t){[W.ERROR,W.WAITING].includes(W[t])||e._eventManager.listen(e._el,W[t],(function(){return e.dispatchEvent(new m(W[t]))}))})),this._eventManager.listen(this._el,W.ERROR,(function(){return e._handleVideoError()})),this._eventManager.listen(this._el,W.WAITING,(function(){return e._handleWaiting()})),this._handleMetadataTrackEvents(),this._eventManager.listen(this._el.textTracks,"addtrack",(function(t){$e.isNativeTextTrack(t.track)&&e.dispatchEvent(new m(Y.TEXT_TRACK_ADDED,{track:t.track}))}));var t=this._mediaSourceAdapter;t&&(this._eventManager.listen(t,Y.VIDEO_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.AUDIO_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.TEXT_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.IMAGE_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.ABR_MODE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.TEXT_CUE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.TRACKS_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.FRAG_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.DRM_LICENSE_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.MANIFEST_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,W.ERROR,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,W.TIME_UPDATE,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,W.PLAYING,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,W.WAITING,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.MEDIA_RECOVERED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,Y.TIMED_METADATA_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,"hlsFragParsingMetadata",(function(t){return e.dispatchEvent(t)})),this._droppedFramesWatcher&&this._eventManager.listen(this._droppedFramesWatcher,Y.FPS_DROP,(function(t){return e.dispatchEvent(t)})))},o.detach=function(){var e=this;Object.keys(W).forEach((function(t){e._eventManager.unlisten(e._el,W[t])})),this._mediaSourceAdapter&&(this._eventManager.unlisten(this._mediaSourceAdapter,Y.VIDEO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,Y.AUDIO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,Y.TEXT_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,Y.TEXT_CUE_CHANGED))},o.getVideoElement=function(){return this._el},o.selectVideoTrack=function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectVideoTrack(e)},o.selectAudioTrack=function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectAudioTrack(e)},o.selectTextTrack=function(e){this._removeCueChangeListeners(),this._mediaSourceAdapter&&this._mediaSourceAdapter.selectTextTrack(e),this.resetAllCues(),this._addCueChangeListener()},o.selectImageTrack=function(e){this._mediaSourceAdapter&&this._mediaSourceAdapter.selectImageTrack(e)},o.hideTextTrack=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.hideTextTrack(),this._removeCueChangeListeners()},o.enableAdaptiveBitrate=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.enableAdaptiveBitrate()},o.isAdaptiveBitrateEnabled=function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isAdaptiveBitrateEnabled()},o.applyABRRestriction=function(e){if(this._mediaSourceAdapter)return this._mediaSourceAdapter.applyABRRestriction(e)},o.seekToLiveEdge=function(){this._mediaSourceAdapter&&this._mediaSourceAdapter.seekToLiveEdge()},o.isOnLiveEdge=function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isOnLiveEdge()},o.getStartTimeOfDvrWindow=function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.getStartTimeOfDvrWindow():0},o.isLive=function(){return!!this._mediaSourceAdapter&&this._mediaSourceAdapter.isLive()},o.play=function(){var e=this,t=this._el.play();return t&&t.catch((function(t){return e.dispatchEvent(new m(Y.PLAY_FAILED,{error:t}))})),t},o.pause=function(){return this._el.pause()},o.load=function(e){var t=this;return this._el.load(),this._canLoadMediaSourceAdapterPromise.then((function(){return t._mediaSourceAdapter?t._mediaSourceAdapter.load(e):Promise.resolve({})})).catch((function(e){return t.dispatchEvent(new m(W.ERROR,e)),Promise.reject(e)}))},o.enterPictureInPicture=function(){var e=this;try{document.pictureInPictureEnabled&&"function"==typeof this._el.requestPictureInPicture?this._el.requestPictureInPicture().catch((function(t){e.dispatchEvent(new m(W.ERROR,new L(L.Severity.RECOVERABLE,L.Category.PLAYER,L.Code.ENTER_PICTURE_IN_PICTURE_FAILED,t)))})):"function"==typeof this._el.webkitSetPresentationMode&&(this._el.webkitSetPresentationMode("picture-in-picture"),setTimeout((function(){return e.dispatchEvent(new m(W.ENTER_PICTURE_IN_PICTURE))}),0))}catch(e){this.dispatchEvent(new m(W.ERROR,new L(L.Severity.RECOVERABLE,L.Category.PLAYER,L.Code.ENTER_PICTURE_IN_PICTURE_FAILED,e)))}},o.exitPictureInPicture=function(){var e=this;try{document.pictureInPictureEnabled&&"function"==typeof document.exitPictureInPicture&&this._el===document.pictureInPictureElement?document.exitPictureInPicture().catch((function(t){e.dispatchEvent(new m(W.ERROR,new L(L.Severity.RECOVERABLE,L.Category.PLAYER,L.Code.EXIT_PICTURE_IN_PICTURE_FAILED,t)))})):"function"==typeof this._el.webkitSetPresentationMode&&this._el.webkitSetPresentationMode("inline")}catch(e){this.dispatchEvent(new m(W.ERROR,new L(L.Severity.RECOVERABLE,L.Category.PLAYER,L.Code.EXIT_PICTURE_IN_PICTURE_FAILED,e)))}},o.isPictureInPictureSupported=function(){return"function"==typeof this._el.webkitSupportsPresentationMode?this._el.webkitSupportsPresentationMode("picture-in-picture"):!!document.pictureInPictureEnabled},o.getThumbnail=function(e){if(this._mediaSourceAdapter)return this._mediaSourceAdapter.getThumbnail(e)},o._init=function(e,t){this._config=t,this._reset=!1,this._loadMediaSourceAdapter(e),this.attach()},o._createVideoElement=function(e){this._el=r.videoElementStore[e]||B.createElement("video"),this._el.id=j.uniqueId(5),this._el.controls=!1},o._loadMediaSourceAdapter=function(e){this._mediaSourceAdapter=Ot.getMediaSourceAdapter(this.getVideoElement(),e,this._config),this._mediaSourceAdapter&&(this._droppedFramesWatcher=new Wt(this._mediaSourceAdapter,this._config.abr,this._el))},o._addCueChangeListener=function(){var e=this,t=Array.from(this._el.textTracks).find((function(e){return $e.isNativeTextTrack(e)&&e.mode!==$e.MODE.DISABLED}));t&&this._eventManager.listen(t,"cuechange",(function(t){return e._onCueChange(t)}))},o._removeCueChangeListeners=function(){var e=this;Array.from(this._el.textTracks).filter((function(e){return!$e.isMetaDataTrack(e)})).forEach((function(t){e._eventManager.unlisten(t,"cuechange")}))},o._onCueChange=function(e){var t=Xe(e.currentTarget.activeCues);this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:t}))},o.resetAllCues=function(){var e=Array.from(this._el.textTracks).find((function(e){return $e.isNativeTextTrack(e)&&e.mode!==$e.MODE.DISABLED}));if(e)for(var t=0;t<e.cues.length;t++)e.cues[t].hasBeenReset=!0},o._handleVideoError=function(){if(this._el.error){var e=this._el.error.code;if(e!==window.MediaError.MEDIA_ERR_ABORTED){var t=this._getMsExtendedError(),n=this._el.error.message;if(this._mediaSourceAdapter&&!this._mediaSourceAdapter.handleMediaError(this._el.error)){var r=new L(L.Severity.CRITICAL,L.Category.MEDIA,L.Code.VIDEO_ERROR,{code:e,extended:t,message:n});this.dispatchEvent(new m(W.ERROR,r))}}}},o._handleWaiting=function(){var e=this,t=!1;this._eventManager.listenOnce(this._el,W.PLAYING,(function(){return t=!0})),setTimeout((function(){t||e.dispatchEvent(new m(W.WAITING))}),200)},o._getMsExtendedError=function(){var e=this._el.error.msExtendedCode;return e&&(e<0&&(e+=Math.pow(2,32)),e=e.toString(16)),e},o._handleMetadataTrackEvents=function(){var e=this,t=function(t){t.mode=$e.MODE.HIDDEN,e._eventManager.listen(t,"cuechange",(function(){var t=[];Array.from(e._el.textTracks).forEach((function(e){$e.isMetaDataTrack(e)&&(t=t.concat(Xe(e.activeCues)))})),t=t.sort((function(e,t){return e.startTime-t.startTime})),e.dispatchEvent(new m(Y.TIMED_METADATA,{cues:t})),e.dispatchEvent(new m(Y.TIMED_METADATA_CHANGE,{cues:t.map((function(e){return Ut(e)}))}))}))};Array.from(this._el.textTracks).forEach((function(e){$e.isMetaDataTrack(e)&&t(e)})),this._eventManager.listen(this._el.textTracks,"addtrack",(function(e){$e.isMetaDataTrack(e.track)&&t(e.track)})),this._eventManager.listen(this._el.textTracks,"change",(function(){Array.from(e._el.textTracks).forEach((function(e){$e.isMetaDataTrack(e)&&e.mode!==$e.MODE.HIDDEN&&(e.mode=$e.MODE.HIDDEN)}))}))},o.addTextTrack=function(e,t,n){return this._el.addTextTrack(e,t,n)},o.getNativeTextTracks=function(){return Array.from(this._el.textTracks)},o.getDrmInfo=function(){var e;return null==(e=this._mediaSourceAdapter)?void 0:e.getDrmInfo()},i=r,(a=[{key:"id",get:function(){return r.id}},{key:"src",set:function(e){this._mediaSourceAdapter&&(this._mediaSourceAdapter.src=e)},get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.src:""}},{key:"currentTime",get:function(){return this._el?this._el.currentTime:0},set:function(e){this._el&&(this._el.currentTime=e)}},{key:"duration",get:function(){return this._el.duration}},{key:"liveDuration",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.liveDuration:-1}},{key:"volume",set:function(e){this._el.volume=e},get:function(){return this._el.volume}},{key:"paused",get:function(){return this._el.paused}},{key:"seeking",get:function(){return this._el.seeking}},{key:"seekable",get:function(){return this._el.seekable}},{key:"played",get:function(){return this._el.played}},{key:"buffered",get:function(){return this._el.buffered}},{key:"muted",set:function(e){this._el.muted=e},get:function(){return this._el.muted}},{key:"defaultMuted",get:function(){return this._el.defaultMuted}},{key:"poster",set:function(e){this._el.poster=e},get:function(){return this._el.poster}},{key:"preload",set:function(e){this._el.preload=e},get:function(){return this._el.preload}},{key:"autoplay",set:function(e){this._el.autoplay=e},get:function(){return this._el.autoplay}},{key:"loop",set:function(e){this._el.loop=e},get:function(){return this._el.loop}},{key:"controls",set:function(e){this._el.controls=e},get:function(){return this._el.controls}},{key:"playbackRate",set:function(e){this._el.playbackRate=e},get:function(){return this._el.playbackRate}},{key:"defaultPlaybackRate",set:function(e){this._el.defaultPlaybackRate=e},get:function(){return this._el.defaultPlaybackRate}},{key:"ended",get:function(){return this._el.ended}},{key:"error",get:function(){return this._el.error}},{key:"networkState",get:function(){return this._el.networkState}},{key:"readyState",get:function(){return this._el.readyState}},{key:"videoHeight",get:function(){return this._el.videoHeight}},{key:"videoWidth",get:function(){return this._el.videoWidth}},{key:"playsinline",set:function(e){e?this._el.setAttribute("playsinline",""):this._el.removeAttribute("playsinline")},get:function(){return""===this._el.getAttribute("playsinline")}},{key:"crossOrigin",set:function(e){"string"==typeof e?this._el.setAttribute("crossorigin",e):this._el.removeAttribute("crossorigin")},get:function(){return this._el.getAttribute("crossorigin")}},{key:"playbackRates",get:function(){return r.PLAYBACK_RATES}},{key:"isInPictureInPicture",get:function(){return!!document.pictureInPictureElement&&null!=document.pictureInPictureElement&&this._el===document.pictureInPictureElement||!!this._el.webkitPresentationMode&&"picture-in-picture"===this._el.webkitPresentationMode}},{key:"targetBuffer",get:function(){return this._mediaSourceAdapter?this._mediaSourceAdapter.targetBuffer:NaN}},{key:"availableBuffer",get:function(){var e=0;if(this.buffered)for(var t=0;t<this.buffered.length;t++)this.buffered.start(t)<=this._el.currentTime&&this._el.currentTime<=this.buffered.end(t)&&(e=this.buffered.end(t)-this._el.currentTime);return e}}])&&Yt(i.prototype,a),r}(C);function $t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}qt(Xt,"_logger",S("Html5")),qt(Xt,"_capabilities",[Kt]),qt(Xt,"id","html5"),qt(Xt,"videoElementStore",{}),qt(Xt,"PLAYBACK_RATES",[.5,1,1.5,2]);var Qt=function(){function e(){}return e.register=function(t,n){t&&!e._engineProviders[t]?(e._logger.debug("Engine <"+t+"> has been registered successfully"),e._engineProviders[t]=n):e._logger.debug("Engine <"+t+"> is already registered, do not register again")},e.unRegister=function(t){e._engineProviders[t]&&(e._logger.debug("Unregistered <"+t+"> Engine"),delete e._engineProviders[t])},e.getEngines=function(){return Object.keys(e._engineProviders).map((function(t){return e._engineProviders[t]}))},e.destroy=function(){e._engineProviders={}},e}();$t(Qt,"_logger",S("EngineProvider")),$t(Qt,"_engineProviders",{}),Xt.isSupported()&&Qt.register(Xt.id,Xt);var Zt=Qt.register,Jt=Qt.unRegister;function en(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var nn="srt",rn="vtt",an=function(e){var t,n;function r(t){var n;return tn(en(n=e.call(this)||this),"_externalCueIndex",0),tn(en(n),"_textTrackModel",{}),tn(en(n),"_activeTextCues",[]),tn(en(n),"_isTextTrackActive",!1),tn(en(n),"_lastTimeUpdate",0),n._player=t,n._eventManager=new D,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.hideTextTrack=function(){this._player.config.text.useNativeTextTrack?(this._removeCueChangeListeners(),this._resetExternalNativeTextTrack()):this._isTextTrackActive&&(this._eventManager.unlisten(this._player,W.TIME_UPDATE),this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:[]})),this._resetCurrentTrack())},i.getExternalTracks=function(e){var t=this,n=this._player.sources.captions;if(!n)return[];this._player.config.text.useNativeTextTrack&&this._addNativeTextTrack();var r=e.filter((function(e){return e instanceof $e})),i=[];return n.forEach((function(e){if(e.language){var n=t._createTextTrack(e);t._maybeAddTrack(n,e,r,i)}else{var a=new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.UNKNOWN_LANGUAGE,{caption:e});t.dispatchEvent(new m(W.ERROR,a))}})),i},i._maybeAddTrack=function(e,t,n,i){var a=n.find((function(e){return e.available&&re.langComparer(t.language,e.language)}));a?r._logger.warn("duplicated language, taking the inband option. Language: ",a.language):(i.push(e),this._updateTextTracksModel(t))},i._createTextTrack=function(e){return new $e({active:!!e.default,kind:$e.KIND.SUBTITLES,label:e.label,language:e.language,external:!0})},i._updateTextTracksModel=function(e){this._textTrackModel[e.language]={cuesStatus:1,cues:[],url:e.url,type:e.type}},i.selectTextTrack=function(e){var t=this;this._textTrackModel[e.language]&&(3===this._textTrackModel[e.language].cuesStatus?this._selectTextTrack(e):1===this._textTrackModel[e.language].cuesStatus&&this._downloadAndParseCues(e).then((function(){t._textTrackModel[e.language].cuesStatus=3,t._selectTextTrack(e)})).catch((function(e){return t.dispatchEvent(new m(W.ERROR,e))})))},i._selectTextTrack=function(e){this.hideTextTrack(),this._player.config.text.useNativeTextTrack?(this._addCuesToNativeTextTrack(this._textTrackModel[e.language].cues),this._addCueChangeListener()):this._setTextTrack(e),e.active=!0,this.dispatchEvent(new m(Y.TEXT_TRACK_CHANGED,{selectedTextTrack:e}))},i.resetAllCues=function(){for(var e in this._textTrackModel)this._textTrackModel[e].cues.forEach((function(e){e.hasBeenReset=!0}))},i._addCueChangeListener=function(){var e=this,t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return $e.isNativeTextTrack(e)&&e.mode===$e.MODE.SHOWING}));n&&this._eventManager.listen(n,"cuechange",(function(t){return e._onCueChange(t)}))}},i._removeCueChangeListeners=function(){var e=this._player.getVideoElement();if(e&&e.textTracks)for(var t=0;t<e.textTracks.length;t++)this._eventManager.unlisten(e.textTracks[t],"cuechange")},i._onCueChange=function(e){var t=Xe(e.currentTarget.activeCues);this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:t}))},i.reset=function(){this._resetCurrentTrack(),this._textTrackModel={},this._resetExternalNativeTextTrack(),this._eventManager.removeAll()},i.destroy=function(){this._textTrackModel={},this._eventManager.destroy(),this._activeTextCues=[]},i._resetCurrentTrack=function(){this._activeTextCues=[],this._isTextTrackActive=!1,this._maybeSetExternalCueIndex()},i._getCuesString=function(e){var t=this;return new Promise((function(n,r){var i=t._textTrackModel[e.language],a=i.type||t._getFileType(i.url);[nn,rn].includes(a)||(t._textTrackModel[e.language].cuesStatus=1,r(new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.UNKNOWN_FILE_TYPE,{captionType:a}))),V.execute(i.url,{},"GET").then((function(e){n(a===nn?t._convertSrtToVtt(e):e)})).catch((function(){t._textTrackModel[e.language].cuesStatus=1,r(new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.HTTP_ERROR,{url:i.url}))}))}))},i._parseCues=function(e){return new Promise((function(t,n){var i=new De(window,Re()),a=[];i.oncue=function(e){return a.push(e)},i.onflush=function(){r._logger.debug("finished parsing external cues"),t(a)},i.parse(e),i.flush(),i.onparsingerror((function(e){return n(e)}))}))},i._convertSrtToVtt=function(e){return"WEBVTT\n\n"+e.replace(/(\d\d:\d\d:\d\d),(\d\d\d) --> (\d\d:\d\d:\d\d),(\d\d\d)/g,(function(e,t,n,r,i){return t+"."+n+" --\x3e "+r+"."+i}))},i._downloadAndParseCues=function(e){var t=this;return this._textTrackModel[e.language].cuesStatus=2,new Promise((function(n,r){t._getCuesString(e).then((function(e){return t._parseCues(e)})).then((function(r){t._textTrackModel[e.language].cues=r,n()})).catch((function(e){return r(e)}))}))},i._getFileType=function(e){return e.split(/[#?]/)[0].split(".").pop().trim()},i._handleCaptionOnTimeUpdate=function(e){var t=this._player.currentTime;if(t){var n=!1;this._hadSeeked()&&(this._activeTextCues=[],n=this._maybeSetExternalCueIndex());var r=this._maybeRemoveActiveCues(),i=this._maybeAddToActiveCues(e);(n||i||r)&&this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._lastTimeUpdate=t}},i._hadSeeked=function(){return!!this._player.currentTime&&Math.abs(this._player.currentTime-this._lastTimeUpdate)>1},i._maybeRemoveActiveCues=function(){var e=this._player.currentTime;if(!e)return!1;var t=this._activeTextCues.filter((function(t){return t.startTime<e&&e<t.endTime})),n=this._activeTextCues.length!==t.length;return this._activeTextCues=t,n},i._maybeAddToActiveCues=function(e){var t=this._player.currentTime;if(!t)return!1;for(var n=!1,r=this._textTrackModel[e.language].cues;this._externalCueIndex<r.length&&t>r[this._externalCueIndex].startTime;)t<r[this._externalCueIndex].endTime&&this._activeTextCues.push(r[this._externalCueIndex]),this._externalCueIndex++,n=!0;return n},i._maybeSetExternalCueIndex=function(){var e=this._player._getTextTracks().find((function(e){return e.active&&e.external}));if(e&&e.external){for(var t=this._textTrackModel[e.language]?this._textTrackModel[e.language].cues:[],n=0;n<t.length&&!(t[n].startTime<this._player.currentTime&&this._player.currentTime<t[n].endTime)&&!(t[n].endTime>this._player.currentTime&&t[n].startTime>this._player.currentTime);n++);return this._externalCueIndex=n,!0}return!1},i._resetExternalNativeTextTrack=function(){var e=this._player.getVideoElement();if(e&&e.textTracks){var t=Array.from(e.textTracks).find((function(e){return!!e&&$e.isExternalTrack(e)}));t&&(t.cues&&Object.values(t.cues).forEach((function(e){return t.removeCue(e)})),t.mode=$e.MODE.DISABLED)}},i._addCuesToNativeTextTrack=function(e){var t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return!!e&&$e.isExternalTrack(e)}));n&&(n.mode=$e.MODE.SHOWING,void 0===window.VTTCue?this._convertCues(e).forEach((function(e){return n.addCue(e)})):e.forEach((function(e){return n.addCue(e)})))}},i._convertCues=function(e){return e.map((function(e){return new window.TextTrackCue(e.startTime,e.endTime,e.text)}))},i._addNativeTextTrack=function(){var e=this._player.getVideoElement();e&&e.textTracks&&(Array.from(e.textTracks).findIndex((function(e){return!!e&&$e.isExternalTrack(e)}))>-1?this._resetExternalNativeTextTrack():e.addTextTrack($e.KIND.SUBTITLES,$e.EXTERNAL_TRACK_ID,$e.EXTERNAL_TRACK_ID))},i._setTextTrack=function(e){var t=this;this._player.config.text.useNativeTextTrack||(this._isTextTrackActive=!0,r._logger.debug("External text track changed",e),this._activeTextCues=[],this._externalCueIndex=0,this.dispatchEvent(new m(Y.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._eventManager.listen(this._player,W.TIME_UPDATE,(function(){return t._handleCaptionOnTimeUpdate(e)})))},r}(C);tn(an,"_logger",S("ExternalCaptionsHandler"));var on={PRE:"preroll",MID:"midroll",POST:"postroll",OVERLAY:"overlay"},sn={VAST:"vast",VMAP:"vmap"},ln=function(e){var t,n;function r(){return e.call(this)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){this._observer&&this._observer.disconnect(),this._observer=null,this._el=null},i.init=function(e){this._observer||(this._el=e,window.ResizeObserver?this._createNativeObserver():this._createIframeObserver(),this._el instanceof HTMLElement&&this._observer&&this._observer.observe(this._el))},i._createNativeObserver=function(){var e=this;this._observer=new window.ResizeObserver((function(t){t.forEach((function(){e._triggerResize()}))}))},i._createIframeObserver=function(){this._observer=new un(this._triggerResize.bind(this))},i._triggerResize=function(){this.dispatchEvent(new m(Y.RESIZE))},r}(C),un=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_observersStore",{}),this._onChangeCallback=e}var t=e.prototype;return t.observe=function(e){var t=this,n=this._createIframe(),r=e.getAttribute("id");this._observersStore[r]=n,e.appendChild(n),n.contentWindow.onresize=function(){return t._onChangeCallback()}},t.disconnect=function(){for(var e in this._observersStore){var t=document.getElementById(e),n=this._observersStore[e];n.onresize=null,t&&(t.removeChild(n),delete this._observersStore[t.getAttribute("id")])}},t._createIframe=function(){var e=document.createElement("iframe");return e.className="playkit-size-iframe",e},e}();function cn(e,t){if(void 0===e&&(e=[]),void 0===t&&(t=function(){return 1}),0===e.length||1===e.length&&0!==t(e[0]))return null;var n=Math.floor(e.length/2);return 0===t(e[n])?e[n]:t(e[n])>0?cn(e.slice(0,n),t):cn(e.slice(n+1),t)}function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dn=function(){function e(e){pn(this,"_isElementInFullscreen",!1),pn(this,"_isScreenLocked",!1),pn(this,"_isScreenOrientationSupport",!!screen&&!!screen.orientation&&"function"==typeof screen.orientation.unlock&&"function"==typeof screen.orientation.lock),pn(this,"_isFullscreenEventDispatched",!1),this._player=e,this._isInBrowserFullscreen=!1,this._eventManager=new D}var t=e.prototype;return t._isNativeDocumentFullscreen=function(){return!!(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)},t._isIOSFullscreen=function(){var e="function"==typeof this._player.getVideoElement?this._player.getVideoElement():null;return"iOS"===this._player.env.os.name&&!!e&&("fullscreen"===e.webkitPresentationMode||!e.webkitPresentationMode&&e.webkitDisplayingFullscreen)},t.isFullscreen=function(){return this._isNativeDocumentFullscreen()&&this._isElementInFullscreen||this._isIOSFullscreen()||this._isInBrowserFullscreen},t.enterFullscreen=function(e){if(!this.isFullscreen()){this.registerFullScreenEvents();var t=e&&B.getElementById(e),n=this._player.config.playback;if(t||(t=this._player.getView()),"iOS"===this._player.env.os.name)if(n.inBrowserFullscreen&&n.playsinline||this._player._engineType===Je.YOUTUBE)this._enterInBrowserFullscreen(t);else{var r=this._player.getVideoElement();r&&"function"==typeof r.webkitEnterFullScreen&&(this._player.isInPictureInPicture()?(setTimeout((function(){return r.webkitEnterFullScreen()}),1e3),this._player.exitPictureInPicture()):r.webkitEnterFullScreen())}else this._requestFullscreen(t)}},t.exitFullscreen=function(){if(this.isFullscreen())if("iOS"===this._player.env.os.name)if(this._isInBrowserFullscreen||this._player._engineType===Je.YOUTUBE)this._exitInBrowserFullscreen();else{var e=this._player.getVideoElement();e&&"function"==typeof e.webkitExitFullscreen&&e.webkitExitFullscreen()}else this._requestExitFullscreen()},t._nativeEnterFullScreen=function(e){return"function"==typeof e.requestFullscreen?e.requestFullscreen():"function"==typeof e.mozRequestFullScreen?e.mozRequestFullScreen():"function"==typeof e.webkitRequestFullScreen?e.webkitRequestFullScreen():"function"==typeof e.msRequestFullscreen?e.msRequestFullscreen():void 0},t._requestFullscreen=function(e){var t=this;this._player.isInPictureInPicture()&&this._player.exitPictureInPicture(),Promise.resolve(this._nativeEnterFullScreen(e)).then((function(){t._isElementInFullscreen=!0;var e=F.getPropertyPath(t._player,"config.playback.screenLockOrientionMode"),n=e!==ot.NONE&&Object.values(ot).includes(e);t._isScreenOrientationSupport&&n&&screen.orientation.lock(e).then((function(){return t._isScreenLocked=!0})).catch((function(){return t._isScreenLocked=!1}))}),(function(){}))},t._nativeExitFullScreen=function(){return"function"==typeof document.exitFullscreen?document.exitFullscreen():"function"==typeof document.webkitExitFullscreen?document.webkitExitFullscreen():"function"==typeof document.mozCancelFullScreen?document.mozCancelFullScreen():"function"==typeof document.msExitFullscreen?document.msExitFullscreen():void 0},t._requestExitFullscreen=function(){var e=this;Promise.resolve(this._nativeExitFullScreen()).then((function(){e._isElementInFullscreen=!1,e._isScreenOrientationSupport&&e._isScreenLocked&&(screen.orientation.unlock(),e._isScreenLocked=!1)}),(function(){}))},t._enterInBrowserFullscreen=function(e){this._player.isInPictureInPicture()&&this._player.exitPictureInPicture(),B.addClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!0,this._fullscreenEnterHandler(),this._player.dispatchEvent(new m(this._player.Event.RESIZE))},t._exitInBrowserFullscreen=function(){var e=B.getElementBySelector(".playkit-in-browser-fullscreen-mode");e&&B.removeClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!1,this._fullscreenExitHandler(),this._player.dispatchEvent(new m(this._player.Event.RESIZE))},t.registerFullScreenEvents=function(){var e=this;"iOS"===this._player.env.os.name?this._handleIosFullscreen():(this._eventManager.listen(document,"webkitfullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"mozfullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"fullscreenchange",(function(){return e._fullscreenChangeHandler()})),this._eventManager.listen(document,"MSFullscreenChange",(function(){return e._fullscreenChangeHandler()})))},t._handleIosFullscreen=function(){var e=this,t=function(){var t=e._player.getVideoElement();t&&(e._eventManager.listen(t,"webkitbeginfullscreen",(function(){return e._fullscreenEnterHandler()})),e._eventManager.listen(t,"webkitendfullscreen",(function(){return e._fullscreenExitHandler()})))};this._player.getVideoElement()?t():this._eventManager.listenOnce(this._player,this._player.Event.SOURCE_SELECTED,(function(){return t()}))},t._fullscreenChangeHandler=function(){this.isFullscreen()?this._fullscreenEnterHandler():this._fullscreenExitHandler()},t._fullscreenEnterHandler=function(){this.isFullscreen()&&!this._isFullscreenEventDispatched&&(this._isFullscreenEventDispatched=!0,this._player.dispatchEvent(new m(this._player.Event.ENTER_FULLSCREEN)))},t._fullscreenExitHandler=function(){!this.isFullscreen()&&this._isFullscreenEventDispatched&&(this._isFullscreenEventDispatched=!1,this._eventManager.removeAll(),this._player.dispatchEvent(new m(this._player.Event.EXIT_FULLSCREEN)))},t.destroy=function(){this._eventManager.destroy()},e}();function fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var hn=function(){function e(){fn(this,"_decoratorProviders",new Map),fn(this,"_logger",S("EngineDecoratorManager"))}var t=e.prototype;return t.register=function(e){this._decoratorProviders.has(e.getName())?this._logger.warn("decorator already registered for "+e.getName()):this._decoratorProviders.set(e.getName(),e)},t.createDecorators=function(e,t){return this._logger.debug("decorators created for "+Array.from(this._decoratorProviders.keys()).toString()),Array.from(this._decoratorProviders.values(),(function(n){return n.getEngineDecorator(e,t)}))},t.destroy=function(){this._logger.debug("decorators destroyed"),this._decoratorProviders.clear()},e}();function gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var vn=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._eventManager=new D,r._pluginDecorators=n.createDecorators(t,e.prototype.dispatchEvent.bind(yn(r))),Object.values(q).forEach((function(e){return r._eventManager.listen(t,e,(function(e){return r.dispatchEvent(e)}))})),new Proxy(t,{get:function(e,t){"destroy"===t&&r._destroy();var n,i=r._pluginDecorators.find((function(e){return e.active}));return(n="addEventListener"===t||"removeEventListener"===t?yn(r):i&&t in i?i:e)[t]&&"function"==typeof n[t].bind?n[t].bind(n):n[t]},set:function(e,t,n){var i=r._pluginDecorators.find((function(e){return t in e&&e.active}));return i&&t in i?i[t]=n:e[t]=n,!0}})||yn(r)}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.dispatchEvent=function(t){var n=this._pluginDecorators.find((function(e){return e.active}));return n&&n.dispatchEvent?n.dispatchEvent(t):e.prototype.dispatchEvent.call(this,t)},o._destroy=function(){this._pluginDecorators=[],this._eventManager.destroy()},i=r,(a=[{key:"active",get:function(){return!0}}])&&gn(i.prototype,a),r}(C),mn={TRUE:!0,FALSE:!1,IN_VIEW:"inview"};function bn(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return _n(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function _n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function En(){return(En=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function kn(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Tn(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){kn(a,r,i,o,s,"next",e)}function s(e){kn(a,r,i,o,s,"throw",e)}o(void 0)}))}}function An(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wn=/#wh=/i,Sn=/#xywh=/i,Cn=new RegExp("^/[^/].+"),xn=function(e){var t,n;function r(){var t;return An(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call(this)||this),"_cues",[]),t._eventManager=new D,t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.load=function(){var e=Tn(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:return r._logger.debug("start loading the vtt thumbnails"),e.next=5,this._downloadAndParseCues(t);case 5:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),i.getThumbnail=function(e){var t=this._findCue(e,this._cues);if(t){var n=t.size,r=t.coordinates,i=En({url:t.imgUrl},n=n||this._naturalImgSize,r=r||{x:0,y:0});return new ft(i)}return null},i.isUsingVttThumbnails=function(){var e;return!!(null==(e=this._cues)?void 0:e.length)},i._downloadAndParseCues=function(){var e=Tn(regeneratorRuntime.mark((function e(t){var n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._downloadVttFile(t);case 3:return n=e.sent,e.next=6,this._processVtt(n);case 6:return r=e.sent,e.next=9,this._formatIntoThumbnailCues(r,t);case 9:this._cues=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),this.dispatchEvent(new m(W.ERROR,e.t0));case 15:case"end":return e.stop()}}),e,this,[[0,12]])})));return function(t){return e.apply(this,arguments)}}(),i._downloadVttFile=function(){var e=Tn(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,V.execute(t.vttUrl,{},"GET");case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.HTTP_ERROR,e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),i._processVtt=function(){var e=Tn(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var i=new De(window,Re()),a=[];i.oncue=function(e){return a.push(e)},i.onflush=function(){r._logger.debug("finished parsing thumbnails cues"),e(a)},i.parse(t),i.flush(),i.onparsingerror((function(e){return n(e)}))})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),i._formatIntoThumbnailCues=function(){var e=Tn(regeneratorRuntime.mark((function e(t,n){var r,i,a,o,s,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.validateThumbnailsVTTFormat(t)){e.next=4;break}throw new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"invalid thumbnail vtt format",vttUrl:n.vttUrl});case 4:return r=this._extractCueMetadata(t[0],n),e.next=7,this.validateImgUrl(r.imgUrl);case 7:if(e.sent){e.next=11;break}throw new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"failed loading the image - invalid image url",imgUrl:r.imgUrl});case 11:return e.next=13,this.extractImgNaturalDimensions(r.imgUrl);case 13:for(this._naturalImgSize=e.sent,i=[],a=bn(t);!(o=a()).done;)s=o.value,l=this._extractCueMetadata(s,n),i.push(l);return e.abrupt("return",i);case 17:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),i.validateThumbnailsVTTFormat=function(e){return e.length&&e[0]instanceof Be},i.extractImgNaturalDimensions=function(e){var t=this;return new Promise((function(n){var r=new Image;r.src=e,t._eventManager.listenOnce(r,"load",(function(){n({height:r.naturalHeight,width:r.naturalWidth})})),t._eventManager.listenOnce(r,"error",(function(){return n(null)}))}))},i.validateImgUrl=function(e){var t=this;return new Promise((function(n){var r=new Image;r.src=e,t._eventManager.listenOnce(r,"load",(function(){n(!0)})),t._eventManager.listenOnce(r,"error",(function(){return n(!1)}))}))},i._extractCueMetadata=function(e,t){var n,i=e.startTime,a=e.endTime,o=e.text,s=t.vttUrl.substring(0,t.vttUrl.lastIndexOf("/")),l=wn.test(o),u=Sn.test(o),c=!1,p=null,d=null;if(l)n=o.split(wn)[0],r._logger.warn('vtt thumbnails in "'+wn+'" form - is supported but the width and height options are ignored and The images will be displayed in their natural dimensions'),c=void 0!==n;else if(u){var f=o.split(Sn);n=f[0];var h=f[1].split(",").map(Number),g=h[0],y=h[1],v=h[2],m=h[3];p={x:g,y:y},d={width:v,height:m},c=[g,y,v,m,n].every((function(e){return void 0!==e}))}else n=o,c=!!o;if(0!==n.indexOf("http://")&&0!==n.indexOf("https://")&&(n=s+"/"+(n=Cn.test(n)?n.substring(1):n)),c)return{startTime:i,endTime:a,imgUrl:n,size:d,coordinates:p};throw new L(L.Severity.RECOVERABLE,L.Category.TEXT,L.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"error while parsing the vtt cues - invalid cue",parsedCue:{startTime:i,endTime:a,options:o}})},i._findCue=function(e,t){for(var n=0,r=t.length-1;n<=r;){var i=Math.floor((n+r)/2),a=t[i];if(e>=a.startTime&&e<a.endTime)return t[i];e<a.startTime?r=i-1:n=i+1}return null},i.reset=function(){this._cues=[],this._eventManager.removeAll(),this._naturalImgSize={}},i.destroy=function(){this.reset(),this._eventManager.destroy()},r}(C);function In(){return(In=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function On(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}An(xn,"_logger",S("ExternalThumbnailsHandler"));var Ln="off",Mn=function(e){var t,n;function r(t){var n;return void 0===t&&(t={}),On(Rn(n=e.call(this)||this),"_sources",{}),On(Rn(n),"_activeTextCues",[]),On(Rn(n),"_textDisplaySettings",{}),On(Rn(n),"_playbackAttributesState",{muted:void 0,volume:void 0,rate:void 0,videoTrack:void 0,audioLanguage:"",textLanguage:""}),On(Rn(n),"_hasUserInteracted",!1),On(Rn(n),"_isOnLiveEdge",!1),On(Rn(n),"_shouldLoadAfterAttach",!1),n._setConfigLogLevel(t),n._playerId=j.uniqueId(5),n._prepareVideoElement(),r.runCapabilities(),n._env=g,n._tracks=[],n._firstPlay=!0,n._loadingMedia=!1,n._loading=!1,n._playbackStart=!1,n._firstPlaying=!1,n._reset=!0,n._destroyed=!1,n._fallbackToMutedAutoPlay=!1,n._config=r._defaultConfig,n._sources=F.copyDeep(lt),n._eventManager=new D,n._posterManager=new G,n._stateManager=new te(Rn(n)),n._resizeWatcher=new ln,n._playbackMiddleware=new at,n._textStyle=new ye,n._createReadyPromise(),n._createPlayerContainer(),n._appendDomElements(),n._externalCaptionsHandler=new an(Rn(n)),n._externalThumbnailsHandler=new xn,n._fullscreenController=new dn(Rn(n)),n.configure(t),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.runCapabilities=function(){r._logger.debug("Running player capabilities"),Qt.getEngines().forEach((function(e){return e.runCapabilities()}))},r.getCapabilities=function(e){r._logger.debug("Get player capabilities",e);var t=[];return Qt.getEngines().forEach((function(e){return t.push(e.getCapabilities())})),Promise.all(t).then((function(t){var n={};return t.forEach((function(e){return Object.assign(n,e)})),e?n[e]:n}))},r.setCapabilities=function(e,t){r._logger.debug("Set player capabilities",e,t);var n=Qt.getEngines().find((function(t){return t.id===e}));n&&n.setCapabilities(t)};var i,a,o,s=r.prototype;return s.configure=function(e){void 0===e&&(e={}),this._setConfigLogLevel(e),F.mergeDeep(this._config,e),this._applyTextTrackConfig(e),this._applyABRRestriction(e)},s.setSourcesMetadata=function(e){this._sources&&(this._sources.metadata||(this._sources.metadata={}),F.mergeDeep(this._sources.metadata,e))},s.setSources=function(e){this._hasSources(e)?(this.reset(),F.mergeDeep(this._sources,e),this._resizeWatcher.init(B.getElementById(this._playerId)),r._logger.debug("Change source started"),this.dispatchEvent(new m(Y.CHANGE_SOURCE_STARTED)),this._reset=!1,this._selectEngineByPriority()?(this.dispatchEvent(new m(Y.SOURCE_SELECTED,{selectedSource:this._sources[this._streamType]})),this._attachMedia(),this._handlePlaybackOptions(),this._posterManager.setSrc(this._sources.poster),this._handleDimensions(),this._handlePreload(),this._handleAutoPlay(),r._logger.debug("Change source ended"),this.dispatchEvent(new m(Y.CHANGE_SOURCE_ENDED))):(r._logger.warn("No playable engines was found to play the given sources"),this.dispatchEvent(new m(W.ERROR,new L(L.Severity.CRITICAL,L.Category.PLAYER,L.Code.NO_ENGINE_FOUND_TO_PLAY_THE_SOURCE,"No Engine Found To Play The Source"))))):F.mergeDeep(this._sources,e)},s.ready=function(){return this._readyPromise?this._readyPromise:Promise.resolve()},s.load=function(){var e=this;this.src?r._logger.debug("The source has already been loaded. load request ignored"):this._playbackMiddleware.load((function(){e._engine?e._load():e._eventManager.listenOnce(e,Y.SOURCE_SELECTED,(function(){return e._load()}))}))},s.play=function(e){var t=this;e&&e.programmatic?this._autoPlay():(this._playbackStart||(this._playbackStart=!0,this.dispatchEvent(new m(Y.PLAYBACK_START)),this.src||this._prepareVideoElement(),this.load()),this._engine?this._playbackMiddleware.play((function(){return t._play()})):this._loadingMedia?this._playbackMiddleware.play((function(){return t._playAfterAsyncMiddleware()})):this.dispatchEvent(new m(W.ERROR,new L(L.Severity.CRITICAL,L.Category.PLAYER,L.Code.NO_SOURCE_PROVIDED,"No Source Provided"))))},s.pause=function(){this._engine&&this._playbackMiddleware.pause(this._pause.bind(this))},s.getView=function(){return this._el},s.getVideoElement=function(){if(this._engine)return this._engine.getVideoElement()},s.reset=function(e){void 0===e&&(e=!1),this._reset||(this.pause(),this._externalCaptionsHandler.reset(),this._externalThumbnailsHandler.reset(),this._posterManager.reset(),this._stateManager.reset(),this._sources=F.copyDeep(lt),this._activeTextCues=[],this._updateTextDisplay([]),this._tracks=[],$e.reset(),this._resetStateFlags(),this._engineType="",this._streamType="",this._pendingSelectedVideoTrack=null,this._engine&&this._engine.reset(),this.showBlackCover(),this._reset=!0,this.dispatchEvent(new m(Y.PLAYER_RESET,{isChangeMedia:e})),this._eventManager.removeAll(),this._resizeWatcher.init(B.getElementById(this._playerId)),this._createReadyPromise(),this._isOnLiveEdge=!1,this._shouldLoadAfterAttach=!1)},s.destroy=function(){this._destroyed||(this._externalCaptionsHandler.destroy(),this._posterManager.destroy(),this._stateManager.destroy(),this._fullscreenController.destroy(),this._activeTextCues=[],this._textDisplaySettings={},this._config={},this._tracks=[],this._engineType="",this._streamType="",this._readyPromise=null,this._pendingSelectedVideoTrack=null,this._resetStateFlags(),this._playbackAttributesState={},this._engine&&this._engine.destroy(),this._engineDecoratorManager&&this._engineDecoratorManager.destroy(),this._resizeWatcher.destroy(),this._el&&B.removeChild(this._el.parentNode,this._el),this._destroyed=!0,this.dispatchEvent(new m(Y.PLAYER_DESTROY)),this._eventManager.destroy())},s.hideBlackCover=function(){this._blackCoverEl&&(this._blackCoverEl.style.visibility="hidden")},s.showBlackCover=function(){this._blackCoverEl&&(this._blackCoverEl.style.visibility="visible")},s.attachMediaSource=function(){var e=this;this._engine&&(this._shouldLoadAfterAttach=!0,this._engine.attachMediaSource(),this._eventManager.listenOnce(this,W.CAN_PLAY,(function(){"number"==typeof e._playbackAttributesState.rate&&(e.playbackRate=e._playbackAttributesState.rate)})))},s.detachMediaSource=function(){this._engine&&(this.pause(),this.hideTextTrack(),this._shouldLoadAfterAttach=!1,this._createReadyPromise(),this._engine.detachMediaSource())},s.registerEngineDecoratorProvider=function(e){this._engineDecoratorManager||(this._engineDecoratorManager=new hn),e&&this._engineDecoratorManager.register(e)},s._getTargetElement=function(){return B.getElementById(this._config.targetId)},s.isLive=function(){return!(this._sources.type===et.VOD||!(this._sources.type===et.LIVE||this._engine&&this._engine.isLive()))},s.isAudio=function(){return this._sources.type===et.AUDIO},s.isOnLiveEdge=function(){return this._engine&&"function"==typeof this._engine.isOnLiveEdge?this._engine.isOnLiveEdge():this._isOnLiveEdge},s.isDvr=function(){return this.isLive()&&this._sources.dvr},s.seekToLiveEdge=function(){this._engine&&this.isLive()&&(this._engine.seekToLiveEdge(),this._isOnLiveEdge=!0)},s.getStartTimeOfDvrWindow=function(){return this._engine?this._engine.getStartTimeOfDvrWindow():0},s.getTracks=function(e){switch(e){case Qe.VIDEO:return F.copyDeep(this._getVideoTracks());case Qe.AUDIO:return F.copyDeep(this._getAudioTracks());case Qe.TEXT:return F.copyDeep(this._getTextTracks());case Qe.IMAGE:return F.copyDeep(this._getImageTracks());default:return F.copyDeep(this._tracks)}},s.getActiveTracks=function(){return F.copyDeep({video:this._getVideoTracks().find((function(e){return e.active})),audio:this._getAudioTracks().find((function(e){return e.active})),text:this._getTextTracks().find((function(e){return e.active}))})},s.selectTrack=function(e){this._engine&&(e instanceof ae?(this._playbackAttributesState.videoTrack=e,this._stateManager.currentState.type===J.IDLE?this._pendingSelectedVideoTrack=e:this._engine.selectVideoTrack(e)):e instanceof oe?this._engine.selectAudioTrack(e):e instanceof $e?(this._resetTextDisplay(),e.language===Ln?(this.hideTextTrack(),this._externalCaptionsHandler.hideTextTrack(),this._playbackAttributesState.textLanguage=Ln):e.external?(this._engine.hideTextTrack(),this._externalCaptionsHandler.selectTextTrack(e)):(this._externalCaptionsHandler.hideTextTrack(),this._engine.selectTextTrack(e))):e instanceof pt&&this._engine.selectImageTrack(e))},s.hideTextTrack=function(){if(this._engine){this._engine.hideTextTrack(),this._resetTextDisplay();var e=this._getTextTracks(),t=e.find((function(e){return!0===e.active}));t&&t.external&&this._externalCaptionsHandler.hideTextTrack(),e.map((function(e){return e.active=!1}));var n=e.find((function(e){return e.language===Ln}));n&&(n.active=!0,this.dispatchEvent(new m(Y.TEXT_TRACK_CHANGED,{selectedTextTrack:n}))),this._playbackAttributesState.textLanguage=Ln}},s.showTextTrack=function(){var e=this._getTextTracks(),t=this._playbackAttributesState.textLanguage!==Ln&&this._playbackAttributesState.textLanguage||this._getLanguage(e,"auto",e.find((function(e){return e.default})));this._setDefaultTrack(e,t)},s.addTextTrack=function(e,t,n){if(this._engine&&"function"==typeof this._engine.addTextTrack)return this._engine.addTextTrack(e,t,n)},s.getNativeTextTracks=function(){return this._engine&&"function"==typeof this._engine.getNativeTextTracks?this._engine.getNativeTextTracks():[]},s.enableAdaptiveBitrate=function(){this._engine&&this._engine.enableAdaptiveBitrate(),this._playbackAttributesState.videoTrack=void 0},s.isAdaptiveBitrateEnabled=function(){return!!this._engine&&this._engine.isAdaptiveBitrateEnabled()},s._applyABRRestriction=function(e){if(F.hasPropertyPath(e,"abr.restrictions")&&this._engine&&this._tracks.length){var t=this._config.abr.restrictions,n=mt(this._tracks.filter((function(e){return e instanceof ae})),t);if(n.length){var i=this._tracks.filter((function(e){return e instanceof ae&&e.available}));(i.length!==n.length||!i.every((function(e,t){return e.bandwidth===n[t].bandwidth})))&&(this._engine.applyABRRestriction(t),this._tracks.forEach((function(e){!n.includes(e)&&e instanceof ae?(e.available=!1,e.active=!1):e.available=!0})),this.getActiveTracks().video||(n[0].active=!0),this.dispatchEvent(new m(Y.TRACKS_CHANGED,{tracks:this._tracks.filter((function(e){return e.available}))})))}else r._logger.warn("Invalid restriction, Nothing has changed values do not meet the restriction")}},s._applyTextTrackConfig=function(e){if(F.hasPropertyPath(e,"text.textTrackDisplaySetting")||F.getPropertyPath(e,"text.forceCenter")){var t={};F.hasPropertyPath(this._config,"text.textTrackDisplaySetting")&&(t=F.mergeDeep(t,this._config.text.textTrackDisplaySetting)),F.getPropertyPath(this._config,"text.forceCenter")&&(t=F.mergeDeep(t,{position:"auto",align:"center",size:"100"})),this.setTextDisplaySettings(t)}try{F.hasPropertyPath(e,"text.textStyle")&&(this.textStyle=ye.fromJson(this._config.text.textStyle))}catch(e){r._logger.warn(e)}},s.getThumbnail=function(e){return this._externalThumbnailsHandler.isUsingVttThumbnails()?this._externalThumbnailsHandler.getThumbnail(e):this._engine?this._engine.getThumbnail(e):null},s.setTextDisplaySettings=function(e){this._textDisplaySettings=F.mergeDeep(this._textDisplaySettings,e),this._updateCueDisplaySettings();for(var t=0;t<this._activeTextCues.length;t++)this._activeTextCues[t].hasBeenReset=!0;this._updateTextDisplay(this._activeTextCues)},s.isFullscreen=function(){return this._fullscreenController.isFullscreen()},s.notifyEnterFullscreen=function(){this.isFullscreen()&&this.dispatchEvent(new m(Y.ENTER_FULLSCREEN))},s.notifyExitFullscreen=function(){this.isFullscreen()||this.dispatchEvent(new m(Y.EXIT_FULLSCREEN))},s.enterFullscreen=function(e){this._fullscreenController.enterFullscreen(e)},s.exitFullscreen=function(){this._fullscreenController.exitFullscreen()},s.enterPictureInPicture=function(){this.isFullscreen()&&this.exitFullscreen(),this._engine&&!this._engine.isInPictureInPicture&&this._engine.enterPictureInPicture()},s.exitPictureInPicture=function(){this._engine&&this._engine.isInPictureInPicture&&this._engine.exitPictureInPicture()},s.isInPictureInPicture=function(){return!!this._engine&&this._engine.isInPictureInPicture},s.isPictureInPictureSupported=function(){return!!this._config.playback.pictureInPicture&&this._engine.isPictureInPictureSupported()},s.isVr=function(){return!!this._sources.vr},s.getLogLevel=function(e){return A(e)},s.setLogLevel=function(e,t){w(e,t)},s.getDrmInfo=function(){var e;return null==(e=this._engine)?void 0:e.getDrmInfo()},s._resetTextDisplay=function(){this._activeTextCues=[],this._updateTextDisplay([])},s._prepareVideoElement=function(){var e=this;Qt.getEngines().forEach((function(t){t.prepareVideoElement(e._playerId)}))},s._setConfigLogLevel=function(e){e.log&&e.log.level&&_[e.log.level]&&w(_[e.log.level]),e.log&&"function"==typeof e.log.handler&&k(e.log.handler)},s._hasSources=function(e){return!!e&&!!Object.values(Ze).find((function(t){return e[t]&&e[t].length>0}))},s._createPlayerContainer=function(){var e=this._el=B.createElement("div");B.addClassName(e,"playkit-container"),B.setAttribute(e,"id",this._playerId),B.setAttribute(e,"tabindex","-1")},s._appendEngineEl=function(){if(this._el){var e=this._engine.getVideoElement();B.addClassName(e,"playkit-engine");var t="playkit-engine-"+this._engine.id;B.addClassName(e,t),B.prependTo(e,this._el),"youtube"===this._engine.id&&(this._el.style.zIndex=1)}},s._appendDomElements=function(){this._blackCoverEl=B.createElement("div"),B.addClassName(this._blackCoverEl,"playkit-black-cover"),B.appendChild(this._el,this._blackCoverEl);var e=this._posterManager.getElement();B.addClassName(e,"playkit-poster"),B.appendChild(this._el,e),this._textDisplayEl=B.createElement("div"),B.addClassName(this._textDisplayEl,"playkit-subtitles"),B.appendChild(this._el,this._textDisplayEl)},s._createReadyPromise=function(){var e=this;this._readyPromise=new Promise((function(t,n){e._eventManager.listenOnce(e,Y.TRACKS_CHANGED,(function(){e.dispatchEvent(new m(Y.MEDIA_LOADED)),t()})),e._eventManager.listen(e,W.ERROR,(function(e){e.payload.severity===L.Severity.CRITICAL&&n()}))})).catch((function(){}))},s._selectEngineByPriority=function(){for(var e,t=this,n=this._config.playback.streamPriority,i=this._config.playback.preferNative,a=this._sources,o=function(){var n=e.value,o="string"==typeof n.engine?n.engine.toLowerCase():"",s="string"==typeof n.format?n.format.toLowerCase():"",l=Qt.getEngines().find((function(e){return e.id===o}));if(l){var u=a[s];if(u&&u.length>0){var c=u[0];if(l.canPlaySource(c,i[s],t._config.drm))return r._logger.debug("Source selected: ",u),t._loadEngine(l,c),t._engineType=o,t._streamType=s,{v:!0}}}},s=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Pn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(n);!(e=s()).done;){var l=o();if("object"==typeof l)return l.v}return!1},s._loadEngine=function(e,t){this._engine?this._engine.id===e.id?this._engine.restore(t,In({},this._config,{sources:this._sources})):(this._engine.destroy(),this._createEngine(e,t),this._appendEngineEl()):(this._createEngine(e,t),this._appendEngineEl())},s._createEngine=function(e,t){var n=e.createEngine(t,In({},this._config,{sources:this._sources}),this._playerId);this._engine=this._engineDecoratorManager?new vn(n,this._engineDecoratorManager):n},s._attachMedia=function(){var e=this;if(this._engine){Object.keys(W).forEach((function(t){e._eventManager.listen(e._engine,W[t],(function(t){return e.dispatchEvent(t)}))})),this._eventManager.listen(this._engine,W.SEEKING,(function(){e.isLive()&&(e._isOnLiveEdge=!(!e.duration||!e.currentTime)&&e.currentTime>=e.duration-1&&!e.paused)})),this._eventManager.listen(this._engine,W.SEEKED,(function(){var t=e._env.browser.name;"Edge"!==t&&"IE"!==t||e._removeTextCuePatch()})),this._eventManager.listen(this._engine,Y.MEDIA_RECOVERED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.IMAGE_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TEXT_TRACK_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.VIDEO_TRACK_CHANGED,(function(t){return e._markActiveTrack(t.payload.selectedVideoTrack),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.AUDIO_TRACK_CHANGED,(function(t){e.ready().then((function(){return e._playbackAttributesState.audioLanguage=t.payload.selectedAudioTrack.language})),e._markActiveTrack(t.payload.selectedAudioTrack),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._engine,Y.TRACKS_CHANGED,(function(t){return e._onTracksChanged(t)})),this._eventManager.listen(this._engine,Y.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._engine,Y.ABR_MODE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TIMED_METADATA,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TIMED_METADATA_CHANGE,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.TIMED_METADATA_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.PLAY_FAILED,(function(t){e._onPlayFailed(t),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.FPS_DROP,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.FRAG_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.DRM_LICENSE_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.MANIFEST_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,Y.MEDIA_RECOVERED,(function(){return e._handleRecovered()})),this._eventManager.listen(this,W.PLAY,this._onPlay.bind(this)),this._eventManager.listen(this,W.PAUSE,this._onPause.bind(this)),this._eventManager.listen(this,W.PLAYING,this._onPlaying.bind(this)),this._eventManager.listen(this,W.ENDED,this._onEnded.bind(this)),this._eventManager.listen(this,Y.MUTE_CHANGE,(function(){e._playbackAttributesState.muted=e.muted})),this._eventManager.listen(this,W.VOLUME_CHANGE,(function(){e._playbackAttributesState.volume=e.volume})),this._eventManager.listen(this,W.RATE_CHANGE,(function(){e._playbackAttributesState.rate=e.playbackRate})),this._eventManager.listen(this,Y.ENTER_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this,Y.EXIT_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this._resizeWatcher,Y.RESIZE,(function(t){e._resetTextCuesAndReposition(),e.dispatchEvent(t)})),this._eventManager.listen(this._externalCaptionsHandler,Y.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._externalCaptionsHandler,Y.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._externalCaptionsHandler,W.ERROR,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._externalThumbnailsHandler,W.ERROR,(function(t){return e.dispatchEvent(t)}));var t=B.getElementBySelector("#"+this.config.targetId);t&&this._eventManager.listen(t,"click",(function(){e._hasUserInteracted=!0,e.dispatchEvent(new m(Y.USER_GESTURE))}),{capture:!0})}},s._handleRecovered=function(){this._stateManager.currentState.type===J.PLAYING&&this.play()},s._onTextTrackChanged=function(e){var t=this;this.ready().then((function(){return t._playbackAttributesState.textLanguage=e.payload.selectedTextTrack.language})),this._markActiveTrack(e.payload.selectedTextTrack),this.dispatchEvent(e)},s._resetTextCuesAndReposition=function(){this._engine.resetAllCues(),this._externalCaptionsHandler.resetAllCues(),this._updateTextDisplay([]);for(var e=0;e<this._activeTextCues.length;e++)this._activeTextCues[e].hasBeenReset=!0;this._updateTextDisplay(this._activeTextCues)},s._removeTextCuePatch=function(){var e=this,t=this._activeTextCues.filter((function(t){var n=t._endTime,r=t._startTime,i=e.currentTime;if(i<n&&i>r)return t}));this._updateTextDisplay(t)},s._handlePlaybackOptions=function(){if(this._config.playback=this._config.playback||{},"boolean"==typeof this._playbackAttributesState.muted?this.muted=this._playbackAttributesState.muted:"boolean"==typeof this._config.playback.muted&&(this.muted=this._config.playback.muted),"number"==typeof this._playbackAttributesState.volume?this.volume=this._playbackAttributesState.volume:"number"==typeof this._config.playback.volume&&(this.volume=this._config.playback.volume),"boolean"==typeof this._config.playback.playsinline&&(this.playsinline=this._config.playback.playsinline),"string"==typeof this._config.playback.crossOrigin&&(this.crossOrigin=this._config.playback.crossOrigin),Array.isArray(this._config.playback.playbackRates)){var e=this._config.playback.playbackRates.filter((function(e,t,n){return e>0&&e<=16&&n.indexOf(e)===t})).sort((function(e,t){return e-t}));e&&(this._playbackRates=e)}},s._handlePreload=function(){"auto"!==this._config.playback.preload||this._config.playback.autoplay||this.load()},s._autoPlay=function(){var e=this,t=this._config.playback.allowMutedAutoPlay;r.getCapabilities(this.engineType).then((function(r){r.autoplay?n():r.mutedAutoPlay?e.muted&&!e._fallbackToMutedAutoPlay?i():t?a():o():o()}));var n=function(){r._logger.debug("Start autoplay"),e._fallbackToMutedAutoPlay&&(e._fallbackToMutedAutoPlay=!1,e.muted=!1),e.play()},i=function(){r._logger.debug("Start muted autoplay"),e.play()},a=function(){r._logger.debug("Fallback to muted autoplay"),e._fallbackToMutedAutoPlay=!0,e.muted=!0,e.dispatchEvent(new m(Y.FALLBACK_TO_MUTED_AUTOPLAY)),e.play()},o=function(){r._logger.warn("Autoplay failed, pause player"),e._posterManager.show(),e.load(),e.dispatchEvent(new m(Y.AUTOPLAY_FAILED))}},s._handleAutoPlay=function(){(this.isAudio()||this._config.playback.autoplay!==mn.TRUE)&&this._posterManager.show(),this._config.playback.autoplay===mn.TRUE&&this._autoPlay()},s._playAfterAsyncMiddleware=function(){var e=this;this._engine?this._play():this._eventManager.listenOnce(this,Y.SOURCE_SELECTED,(function(){return e._play()}))},s._load=function(){var e=this;if(this._engine&&!this.src&&!this._loading){this._loading=!0;var t=this._sources.startTime;this._engine.load(t).then((function(n){e.isLive()&&(-1===t||Number(t)>=Number(e.duration))&&(e._isOnLiveEdge=!0),e._updateTracks(n.tracks),e.dispatchEvent(new m(Y.TRACKS_CHANGED,{tracks:e._tracks})),e._externalThumbnailsHandler.load(e.sources.thumbnails)})).finally((function(){e._loading=!1,e._reset=!1}))}},s._handleDimensions=function(){var e=this.config.dimensions;F.isObject(e)&&!F.isEmptyObject(e)&&(this.dimensions=e)},s._play=function(){var e=this;this._shouldLoadAfterAttach&&(this._load(),this._shouldLoadAfterAttach=!1),this.ready().then((function(){e._shouldPlayerSeekToLiveEdge()&&e.seekToLiveEdge(),e._engine.play()}))},s._shouldPlayerSeekToLiveEdge=function(){if(this.isLive()){var e=!this.isDvr()||"number"==typeof this.currentTime&&this.currentTime<0;return this._firstPlay?!!this.src&&!this.isOnLiveEdge():e}return!1},s._pause=function(){this._engine.pause()},s._setCurrentTime=function(e){if(this._engine&&N.isNumber(e)){var t=e;e<0&&(t=0);var n=this.isLive()?this._engine.duration:this._engine.duration-.1;t>n&&(t=n),this._engine.currentTime=t}},s._onPause=function(){this._isOnLiveEdge=!1},s._onPlay=function(){this._firstPlay&&(this._firstPlay=!1,this.dispatchEvent(new m(Y.FIRST_PLAY)),this.hideBlackCover(),"number"==typeof this._playbackAttributesState.rate&&(this.playbackRate=this._playbackAttributesState.rate))},s._onPlaying=function(){this._firstPlaying||(this._firstPlaying=!0,this.isAudio()||this._posterManager.hide(),this.dispatchEvent(new m(Y.FIRST_PLAYING))),this._engine&&this._pendingSelectedVideoTrack&&(this._engine.selectVideoTrack(this._pendingSelectedVideoTrack),this._pendingSelectedVideoTrack=null)},s._onPlayFailed=function(e){this._firstPlay&&this._config.playback.autoplay&&(this._posterManager.show(),this.dispatchEvent(new m(Y.AUTOPLAY_FAILED,e.payload)))},s._onEnded=function(){this.paused||this._pause()},s._resetStateFlags=function(){this._loading=!1,this._firstPlay=!0,this._loadingMedia=!1,this._playbackStart=!1,this._firstPlaying=!1},s._calcRatio=function(e,t){if(void 0!==t.ratio&&(this._aspectRatio=t.ratio),this._aspectRatio){var n=this._aspectRatio.split(":").map((function(e){return Number(e)})),r=n[0],i=n[1];if(t.width||!t.width&&!t.height){var a=i/r*e.clientWidth;e.style.height=a+"px"}else if(t.height&&!t.width){var o=r/i*e.clientHeight;e.style.width=o+"px"}}},s._onTracksChanged=function(e){this._updateTracks(e.payload.tracks),this.dispatchEvent(e)},s._updateTracks=function(e){r._logger.debug("Tracks changed",e),this._tracks=e.concat(this._externalCaptionsHandler.getExternalTracks(e)),this._applyABRRestriction(this._config),this._addTextTrackOffOption(),this._maybeSetTracksLabels(),this._setDefaultTracks()},s._getTracksByType=function(e){return this._tracks.reduce((function(t,n){return n instanceof e&&n.available&&t.push(n),t}),[])},s._getImageTracks=function(){return this._getTracksByType(pt)},s._getTextTracks=function(){return this._getTracksByType($e)},s._getVideoTracks=function(){return this._getTracksByType(ae)},s._getAudioTracks=function(){return this._getTracksByType(oe)},s._markActiveTrack=function(e){var t;if(e instanceof ae?t=this._getVideoTracks():e instanceof oe?t=this._getAudioTracks():e instanceof $e&&(t=this._getTextTracks()),t)for(var n=0;n<t.length;n++)t[n].active=e.index===t[n].index},s._onCueChange=function(e){r._logger.debug("Text cue changed",e.payload.cues);try{this._activeTextCues=e.payload.cues.filter((function(e,t,n){var r=n[t-1];return!r||!(e.startTime===r.startTime&&e.endTime===r.endTime&&e.text.trim()===r.text.trim())}))}catch(t){this._activeTextCues=e.payload.cues}this._updateCueDisplaySettings(),this._updateTextDisplay(this._activeTextCues),this.dispatchEvent(e)},s._updateCueDisplaySettings=function(){for(var e=this._activeTextCues,t=this._textDisplaySettings,n=0;n<e.length;n++){var r=e[n];for(var i in t)t[i]&&(r[i]=t[i])}},s._updateTextDisplay=function(e){this._config.text.useNativeTextTrack||this._config.text.useShakaTextTrackDisplay||function(e,t,n,r){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var i=e.document.createElement("div");if(i.style.position="absolute",i.style.left="0",i.style.right="0",i.style.top="0",i.style.bottom="0",i.style.margin="1.5%",n.appendChild(i),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var a=[],o=Ie.getSimpleBoxPosition(i),s=o.height<o.width?o.height:o.width,l={font:Math.round(.058*s*100)/100*1*r.implicitFontScale+"px "+r.fontFamily,color:ye.toRGBA(r.fontColor,r.fontOpacity),backgroundColor:ye.toRGBA(r.backgroundColor,r.backgroundOpacity),textShadow:r.getTextShadow()};!function(){for(var n,r,s=0;s<t.length;s++)r=t[s],n=new xe(e,r,l),i.appendChild(n.div),Pe(0,n,o,a),r.displayState=n.div,a.push(Ie.getSimpleBoxPosition(n))}()}else for(var u=0;u<t.length;u++)i.appendChild(t[u].displayState)}(window,e,this._textDisplayEl,this._textStyle)},s._addTextTrackOffOption=function(){var e=this._getTextTracks();e&&e.length&&this._tracks.push(new $e({active:!1,kind:$e.KIND.SUBTITLES,label:"Off",language:Ln}))},s._setDefaultTracks=function(){var e=this.getActiveTracks(),t=this._getTextTracks().find((function(e){return e.default})),n=this.config.playback,r=this._getTextTracks().find((function(e){return $e.langComparer(Ln,e.language)})),i=this._getLanguage(this._getTextTracks(),n.textLanguage,t),a=this._playbackAttributesState.textLanguage&&this._playbackAttributesState.textLanguage!==Ln?this._playbackAttributesState.textLanguage:i,o=this._playbackAttributesState.audioLanguage||this._getLanguage(this._getAudioTracks(),n.audioLanguage,e.audio);a===n.textLanguage?this._setDefaultTrack(this._getTextTracks(),a,r,n.additionalTextLanguage):this._setDefaultTrack(this._getTextTracks(),a,r),o===n.audioLanguage?this._setDefaultTrack(this._getAudioTracks(),o,e.audio,n.additionalAudioLanguage):this._setDefaultTrack(this._getAudioTracks(),o,e.audio),this._setDefaultVideoTrack()},s._getLanguage=function(e,t,n){var r=t;if("auto"===r){var i=e.find((function(e){return re.langComparer($.language,e.language)}));i?r=i.language:n&&n.language!==Ln?r=n.language:e&&e.length>0&&(r=e[0].language)}return r},s._setDefaultTrack=function(e,t,n,r){var i=this,a=function(e){i.selectTrack(e),i._markActiveTrack(e)},o=e.find((function(e){return re.langComparer(t,e.language,r,!0)}));if(o)a(o);else{var s=e.find((function(e){return re.langComparer(t,e.language,r,!1)}));s?a(s):n&&!n.active&&this.selectTrack(n)}},s._setDefaultVideoTrack=function(){var e=this,t=this._getVideoTracks().sort((function(e,t){return t.bandwidth-e.bandwidth})),n=t.find((function(t){var n;return t.label&&t.label===(null==(n=e._playbackAttributesState.videoTrack)?void 0:n.label)}));n||(n=t.find((function(t){var n;return t.height&&t.height===(null==(n=e._playbackAttributesState.videoTrack)?void 0:n.height)}))),n&&this.selectTrack(n)},s._maybeSetTracksLabels=function(){var e=this._config.customLabels;if(e)for(var t in e){if(!Object.prototype.hasOwnProperty.call(e,t))return;switch(t){case"qualities":this._setTracksCustomLabels(this._getVideoTracks(),e[t]);break;case"audio":this._setTracksCustomLabels(this._getAudioTracks(),e[t]);break;case"captions":this._setTracksCustomLabels(this._getTextTracks(),e[t])}}},s._setTracksCustomLabels=function(e,t){e.forEach((function(e){var n=t(F.copyDeep(e));n&&(e.label=n)}))},i=r,o=[{key:"_defaultConfig",get:function(){return F.copyDeep(st)}}],(a=[{key:"videoHeight",get:function(){return this._engine?this._engine.videoHeight:null}},{key:"videoWidth",get:function(){return this._engine?this._engine.videoWidth:null}},{key:"buffered",get:function(){return this._engine?this._engine.buffered:null}},{key:"stats",get:function(){var e={targetBuffer:NaN,availableBuffer:NaN};return this._engine&&(e.targetBuffer=this._engine.targetBuffer,e.availableBuffer=this._engine.availableBuffer),e}},{key:"currentTime",set:function(e){this._playbackMiddleware.setCurrentTime(e,this._setCurrentTime.bind(this))},get:function(){return this._engine?this._engine.currentTime:null}},{key:"duration",get:function(){return this._engine?this._engine.duration:null}},{key:"liveDuration",get:function(){return this._engine?this._engine.liveDuration:null}},{key:"volume",set:function(e){if(this._engine&&(N.isFloat(e)||0===e||1===e)){var t=e;t<0&&(t=0),t>1&&(t=1),this._engine.volume=t}},get:function(){return this._engine?this._engine.volume:null}},{key:"paused",get:function(){return this._engine?this._engine.paused:null}},{key:"seeking",get:function(){return this._engine?this._engine.seeking:null}},{key:"playsinline",set:function(e){this._engine&&(this._engine.playsinline=e)},get:function(){return this._engine?this._engine.playsinline:null}},{key:"muted",set:function(e){this._engine&&(this._engine.muted=e,this.dispatchEvent(new m(Y.MUTE_CHANGE,{mute:e})),!1===e&&(this._fallbackToMutedAutoPlay=e))},get:function(){return this._engine?this._engine.muted:null}},{key:"src",get:function(){return this._engine?this._engine.src:null}},{key:"dimensions",set:function(e){var t=this._getTargetElement();if(!e||F.isEmptyObject(e))this._aspectRatio=null,t.style.width=null,t.style.height=null;else{var n=F.mergeDeep(this.dimensions,e),r=n.height,i=n.width;t.style.width="number"==typeof i?i+"px":i,t.style.height="number"==typeof r?r+"px":r,this._calcRatio(t,e)}},get:function(){return{width:this._el.clientWidth,height:this._el.clientHeight}}},{key:"poster",get:function(){return this._posterManager.src}},{key:"playbackRate",set:function(e){this._engine&&(this._engine.playbackRate=e)},get:function(){return this._engine?this._engine.playbackRate:null}},{key:"playbackRates",get:function(){return this._playbackRates?this._playbackRates:this._engine?this._engine.playbackRates:[]}},{key:"defaultPlaybackRate",get:function(){return this._engine?this._engine.defaultPlaybackRate:1}},{key:"engineType",get:function(){return this._engineType}},{key:"streamType",get:function(){return this._streamType}},{key:"env",get:function(){return this._env}},{key:"config",get:function(){return F.mergeDeep({},this._config)}},{key:"sources",get:function(){return F.mergeDeep({},this._sources)}},{key:"hasUserInteracted",get:function(){return this._hasUserInteracted}},{key:"loadingMedia",set:function(e){this._loadingMedia=e}},{key:"crossOrigin",set:function(e){this._engine&&(this._engine.crossOrigin=e)},get:function(){return this._engine?this._engine.crossOrigin:null}},{key:"ended",get:function(){return this._engine?this._engine.ended:null}},{key:"playbackMiddleware",get:function(){return this._playbackMiddleware}},{key:"posterManager",get:function(){return this._posterManager}},{key:"textDisplaySetting",get:function(){return F.copyDeep(this._textDisplaySettings)}},{key:"textStyle",set:function(e){if(!(e instanceof ye))throw new Error("Style must be instance of TextStyle");var t=B.getElementBySelector("."+this._playerId+".playkit-subtitles-style");t||(t=B.createElement("style"),B.addClassName(t,this._playerId),B.addClassName(t,"playkit-subtitles-style"),B.appendChild(document.head,t));for(var n=t.sheet;n.cssRules.length;)n.deleteRule(0);try{this._textStyle=e,this._config.text.useNativeTextTrack?n.insertRule("#"+this._playerId+" video.playkit-engine::cue { "+e.toCSS()+" }",0):this._engine&&(this._engine.resetAllCues(),this._externalCaptionsHandler.resetAllCues(),this._updateTextDisplay(this._activeTextCues)),this.dispatchEvent(new m(Y.TEXT_STYLE_CHANGED))}catch(e){r._logger.error(e.message)}},get:function(){return this._textStyle.clone()}},{key:"Event",get:function(){return q}},{key:"TextStyle",get:function(){return ye}},{key:"State",get:function(){return J}},{key:"Track",get:function(){return Qe}},{key:"LogLevelType",get:function(){return E}},{key:"LogLevel",get:function(){return _}},{key:"AbrMode",get:function(){return tt}},{key:"MediaType",get:function(){return et}},{key:"StreamType",get:function(){return Ze}},{key:"EngineType",get:function(){return Je}},{key:"CorsType",get:function(){return nt}},{key:"AdBreakType",get:function(){return on}},{key:"AdTagType",get:function(){return sn}},{key:"Error",get:function(){return L}}])&&Dn(i.prototype,a),o&&Dn(i,o),r}(C);On(Mn,"_logger",S("Player"));var Nn=function(){function e(e){this._name=e.getName(),this._getEngineDecorator=e.getEngineDecorator.bind(e)}var t=e.prototype;return t.getEngineDecorator=function(e,t){return this._getEngineDecorator(e,t)},t.getName=function(){return this._name},e}(),Un={HLS:["application/x-mpegurl","application/vnd.apple.mpegurl"],DASH:["application/dash+xml"],PROGRESSIVE:["video/mp4"],SMOOTH_STREAMING:["application/vnd.ms-sstr+xml"]},Fn="0.82.3-canary.0-60212bf",jn="@playkit-js/playkit-js";function Bn(e){return new Mn(e||{})}var Vn=Mn.getCapabilities,Hn=Mn.setCapabilities;t.default=Bn}])},function(e,t,n){var r=n(2),i=n(8),a=n(16),o=n(12),s=n(19),l=function(e,t,n){var u,c,p,d,f=e&l.F,h=e&l.G,g=e&l.S,y=e&l.P,v=e&l.B,m=h?r:g?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?i:i[t]||(i[t]={}),_=b.prototype||(b.prototype={});for(u in h&&(n=t),n)p=((c=!f&&m&&void 0!==m[u])?m:n)[u],d=v&&c?s(p,r):y&&"function"==typeof p?s(Function.call,p):p,m&&o(m,u,p,e&l.U),b[u]!=p&&a(b,u,d),y&&_[u]!=p&&(_[u]=p)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(5);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(51)("wks"),i=n(31),a=n(2).Symbol,o="function"==typeof a;(e.exports=function(e){return r[e]||(r[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=r},function(e,t,n){var r=n(21),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(3)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(4),i=n(93),a=n(28),o=Object.defineProperty;t.f=n(9)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(26);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(2),i=n(16),a=n(15),o=n(31)("src"),s=n(130),l=(""+s).split("toString");n(8).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var u="function"==typeof n;u&&(a(n,"name")||i(n,"name",t)),e[t]!==n&&(u&&(a(n,o)||i(n,o,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[o]||s.call(this)}))},function(e,t,n){var r=n(1),i=n(3),a=n(26),o=/"/g,s=function(e,t,n,r){var i=String(a(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(r).replace(o,""")+'"'),s+">"+i+"</"+t+">"};e.exports=function(e,t){var n={};n[e]=t(s),r(r.P+r.F*i((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=16)}([function(e,t,n){var r=n(13),i=n(14);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]),r(i,{attributes:{id:"@playkit-js/playkit-js-ui"},insert:"head",singleton:!1}),e.exports=i.locals||{}},function(e,t,n){"use strict";e.exports=n(10)},function(e,t,n){"use strict";var r=n(1),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?o:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=o;var u=Object.defineProperty,c=Object.getOwnPropertyNames,p=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var i=f(n);i&&i!==h&&e(t,i,r)}var o=c(n);p&&(o=o.concat(p(n)));for(var s=l(t),g=l(n),y=0;y<o.length;++y){var v=o[y];if(!(a[v]||r&&r[v]||g&&g[v]||s&&s[v])){var m=d(n,v);try{u(t,v,m)}catch(e){}}}}return t}},function(e,t,n){"use strict";(function(e,r){var i,a=n(5);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var o=Object(a.a)(i);t.a=o}).call(this,n(11),n(12)(e))},function(e,t,n){e.exports=function(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e){e.exports=JSON.parse('{"en":{"controls":{"play":"Play","pause":"Pause","language":"Language","settings":"Settings","fullscreen":"Fullscreen","fullscreenExit":"Exit fullscreen","rewind":"Seek backwards","forward":"Seek forward","vrStereo":"vrStereo","closedCaptionsOn":"Disable Captions","closedCaptionsOff":"Enable Captions","live":"Live","mute":"Mute","unmute":"Unmute","next":"Next","prev":"Prev","startOver":"Start over","pictureInPicture":"Picture in picture","pictureInPictureExit":"Exit picture in picture","pictureInPictureExpand":"Expand","logo":"Logo","seekBarSlider":"Seek slider"},"unmute":{"unmute":"Unmute"},"volume":{"muted_click_to_unmute":"Muted. Click to unmute","volume_click_to_mute":"{{vol}}% volume. Click to mute","ten_percent":"ten percent","twenty_percent":"twenty percent","thirty_percent":"thirty percent","fourty_percent":"forty percent","fifty_percent":"fifty percent","sixty_percent":"sixty percent","seventy_percent":"seventy percent","eighty_percent":"eighty percent","ninety_percent":"ninety percent","one_hundred_percent":"one hundred percent"},"copy":{"button":"Copy URL"},"settings":{"title":"Settings","audio":"Audio","quality":"Quality","speed":"Speed","speedNormal":"Normal","qualityAuto":"Auto","advancedAudioDescription":"Advanced Audio Description"},"captions":{"captions":"Captions","advanced_captions_settings":"Advanced captions settings"},"overlay":{"close":"Close"},"error":{"default_error":"Something went wrong","default_session_text":"Session ID","retry":"Retry"},"ads":{"ad_notice":"Advertisement","learn_more":"Learn more","skip_ad":"Skip ad","skip_in":"Skip in"},"cvaa":{"title":"Advanced captions settings","sample_caption_tag":"Sample {{number}}","sample_custom_caption_tag":"Custom captions","set_custom_caption":"Set custom caption","edit_caption":"Edit caption","size_label":"Size","font_color_label":"Font color","font_family_label":"Font family","font_style_label":"Font style","font_opacity_label":"Font opacity","background_color_label":"Background color","background_opacity_label":"Background opacity","apply":"Apply","caption_preview":"This is your caption preview"},"cast":{"play_on_tv":"Play on TV","disconnect_from_tv":"Disconnect from TV","status":{"connecting_to":"Connecting to","connected_to":"Connected to","playing_on":"Playing on"}},"playlist":{"prev":"Previous","next":"Next","up_next":"Up Next","up_next_in":"Up next in","cancel":"Cancel"},"pictureInPicture":{"overlay_text":"Playing in Picture In Picture mode"}}}')},function(e,t,n){e.exports=n(8)()},function(e,t,n){"use strict";var r=n(9);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict"; /** @license React v16.13.1 * react-is.production.min.js * @@ -22,7 +22,7 @@ var KalturaPlayer=function(e){var t={};function n(r){if(t[r])return t[r].exports * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case p:case d:case o:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case v:case y:case u:return e;default:return t}}case a:return t}}}function T(e){return k(e)===d}t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=u,t.Element=i,t.ForwardRef=f,t.Fragment=o,t.Lazy=v,t.Memo=y,t.Portal=a,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return T(e)||k(e)===p},t.isConcurrentMode=T,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===v},t.isMemo=function(e){return k(e)===y},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===s},t.isSuspense=function(e){return k(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===s||e===h||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===b||e.$$typeof===_||e.$$typeof===E||e.$$typeof===m)},t.typeOf=k},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],i=0;i<e.length;i++){var s=e[i],l=t.base?s[0]+t.base:s[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var p=o(c),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(a[p].references++,a[p].updater(d)):a.push({identifier:c,updater:g(d,t),references:1}),r.push(c)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,c=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function d(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,h=0;function g(e,t){var n,r,i;if(t.singleton){var a=h++;n=f||(f=l(t)),r=p.bind(null,n,a,!1),i=p.bind(null,n,a,!0)}else n=l(t),r=d.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=o(n[r]);a[i].references--}for(var l=s(e,t),u=0;u<n.length;u++){var c=o(n[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=l}}}},function(e,t,n){(t=n(15)(!1)).push([e.i,".playkit-player{--playkit-primary-hsl-hue: 215deg;--playkit-secondary-hsl-hue: 40deg;--playkit-success-hsl-hue: 136deg;--playkit-danger-hsl-hue: 355deg;--playkit-warning-hsl-hue: 21deg;--playkit-primary-hsl-saturation: 100%;--playkit-secondary-hsl-saturation: 100%;--playkit-success-hsl-saturation: 100%;--playkit-danger-hsl-saturation: 100%;--playkit-warning-hsl-saturation: 100%;--playkit-primary-hsl-lightness: 50%;--playkit-secondary-hsl-lightness: 50%;--playkit-success-hsl-lightness: 50%;--playkit-danger-hsl-lightness: 50%;--playkit-warning-hsl-lightness: 50%;--playkit-primary-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-primary-hsl-saturation) var(--playkit-primary-hsl-lightness));--playkit-primary-darker-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-primary-hsl-saturation) calc(var(--playkit-primary-hsl-lightness) - 15%));--playkit-primary-brighter-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-primary-hsl-saturation) calc(var(--playkit-primary-hsl-lightness) + 15%));--playkit-primary-text-contrast-color: #ffffff;--playkit-secondary-color: hsl(var(--playkit-secondary-hsl-hue) var(--playkit-secondary-hsl-saturation) var(--playkit-secondary-hsl-lightness));--playkit-secondary-darker-color: hsl(var(--playkit-secondary-hsl-hue) var(--playkit-secondary-hsl-saturation) calc(var(--playkit-secondary-hsl-lightness) - 15%));--playkit-secondary-brighter-color: hsl(var(--playkit-secondary-hsl-hue) var(--playkit-secondary-hsl-saturation) calc(var(--playkit-secondary-hsl-lightness) + 15%));--playkit-secondary-text-contrast-color: #ffffff;--playkit-success-color: hsl(var(--playkit-success-hsl-hue) var(--playkit-success-hsl-saturation) var(--playkit-success-hsl-lightness));--playkit-success-darker-color: hsl(var(--playkit-success-hsl-hue) var(--playkit-success-hsl-saturation) calc(var(--playkit-success-hsl-lightness) - 15%));--playkit-success-brighter-color: hsl(var(--playkit-success-hsl-hue) var(--playkit-success-hsl-saturation) calc(var(--playkit-success-hsl-lightness) + 15%));--playkit-success-text-contrast-color: #ffffff;--playkit-danger-color: hsl(var(--playkit-danger-hsl-hue) var(--playkit-danger-hsl-saturation) var(--playkit-danger-hsl-lightness));--playkit-danger-darker-color: hsl(var(--playkit-danger-hsl-hue) var(--playkit-danger-hsl-saturation) calc(var(--playkit-danger-hsl-lightness) - 15%));--playkit-danger-brighter-color: hsl(var(--playkit-danger-hsl-hue) var(--playkit-danger-hsl-saturation) calc(var(--playkit-danger-hsl-lightness) + 15%));--playkit-danger-text-contrast-color: #ffffff;--playkit-warning-color: hsl(var(--playkit-warning-hsl-hue) var(--playkit-warning-hsl-saturation) var(--playkit-warning-hsl-lightness));--playkit-warning-darker-color: hsl(var(--playkit-warning-hsl-hue) var(--playkit-warning-hsl-saturation) calc(var(--playkit-warning-hsl-lightness) - 15%));--playkit-warning-brighter-color: hsl(var(--playkit-warning-hsl-hue) var(--playkit-warning-hsl-saturation) calc(var(--playkit-warning-hsl-lightness) + 15%));--playkit-warning-text-contrast-color: #ffffff;--playkit-tone-1-color: #ffffff;--playkit-tone-2-color: #cccccc;--playkit-tone-3-color: #999999;--playkit-tone-4-color: #888888;--playkit-tone-5-color: #666666;--playkit-tone-6-color: #444444;--playkit-tone-7-color: #222222;--playkit-tone-8-color: #000000;--playkit-live-color: #e12536;--playkit-player-background-color: #000000;--playkit-tab-focus-color: var(--playkit-primary-color);--playkit-tooltip-background-color: var(--playkit-tone-1-color);--playkit-tooltip-color: var(--playkit-tone-7-color);--playkit-ads-color: var(--playkit-secondary-color)}.playkit-row{display:block}.playkit-row:after{content:\"\";clear:both;display:block}.playkit-d-inline-block{display:inline-block}.playkit-mobile-hidden-select{display:block;opacity:0;position:absolute;top:0;left:0px;width:100%;height:100%}.playkit-font-size-base,.playkit-ad-notice{font-size:15px}.playkit-player .playkit-form-group{margin:10px 0;position:relative;max-width:100%}.playkit-player .playkit-form-group.playkit-has-error .playkit-form-control{border-color:var(--playkit-danger-color)}.playkit-player .playkit-form-group.playkit-has-error .playkit-form-control:focus{border-color:#fff}.playkit-player .playkit-form-group.playkit-has-icon .playkit-form-control{padding-left:34px}.playkit-player .playkit-form-group .playkit-icon{position:absolute;top:2px;left:2px;width:32px;height:32px;fill:rgba(255,255,255,.4)}.playkit-player .playkit-form-control{height:32px;width:100%;min-width:72px;border:2px solid rgba(255,255,255,.2);border-radius:4px;background-color:rgba(0,0,0,.4);font-size:15px;line-height:18px;color:#fff;padding:8px 10px;text-overflow:ellipsis}.playkit-player .playkit-form-control::-webkit-input-placeholder{color:rgba(255,255,255,.6)}.playkit-player .playkit-form-control:focus{background-color:#fff;border-color:#fff;color:var(--playkit-tone-7-color)}.playkit-player .playkit-form-control:focus::-webkit-input-placeholder{color:var(--playkit-tone-2-color)}.playkit-player .playkit-form-control:focus+.playkit-icon{fill:var(--playkit-tone-3-color)}.playkit-player textarea.playkit-form-control{min-height:72px}.playkit-player select{font-size:15px;color:#fff;-webkit-appearance:none;border:0;background:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFFFFF' viewBox='0 0 1024 1024'><path d='M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z' /></svg>\") no-repeat;background-size:16px;background-position:100% center;background-repeat:no-repeat;padding-right:24px}.playkit-checkbox{font-size:15px;position:relative}.playkit-checkbox input{display:none}.playkit-checkbox label:before{height:16px;width:16px;border:1px solid rgba(255,255,255,.2);border-radius:4px;background-color:rgba(0,0,0,.4);margin-right:8px;display:inline-block;content:\"\";vertical-align:middle}.playkit-checkbox input:checked+label:before{content:\"✔\";text-align:center;font-size:14px}.playkit-form-group-row{font-size:15px;margin:24px 0}.playkit-form-group-row:after{clear:both;content:\" \";display:block}.playkit-form-group-row label{float:left;color:rgba(244,244,244,.8)}.playkit-form-group-row .playkit-dropdown{float:right}.playkit-btn{text-decoration:none;height:36px;border-radius:18px;color:#fff;line-height:36px;font-weight:bold;cursor:pointer;display:inline-block;padding:0 24px}.playkit-btn.playkit-btn-block{display:block}.playkit-btn.playkit-btn-dark-transparent{background-color:rgba(0,0,0,.5);border:2px solid rgba(255,255,255,.2);line-height:32px}.playkit-btn.playkit-btn-dark-transparent:hover{color:#fff;border:2px solid rgba(255,255,255,.4)}.playkit-btn.playkit-btn-branded{background-color:var(--playkit-primary-color)}.playkit-btn.playkit-btn-branded:hover{color:#fff}.playkit-btn-rounded{height:36px;width:36px;min-width:36px;min-height:36px;border-radius:18px;background-color:rgba(0,0,0,.4);display:inline-block;padding:2px}.playkit-player button:focus{outline:none}.playkit-btn-borderless{display:flex;flex-direction:row;justify-content:center;align-items:center;border-radius:4px;border:none;padding:8px 12px 8px 8px;width:82px;height:40px;background-color:rgba(0,0,0,0);cursor:pointer}.playkit-btn-borderless.playkit-only-icon{padding:4px;width:40px;height:40px}.playkit-btn-borderless.playkit-only-label{padding:8px;width:50px;height:40px}.playkit-btn-borderless i{width:32px;height:32px}.playkit-btn-borderless label{color:var(--playkit-tone-1-color)}.playkit-btn-borderless:hover{background-color:var(--playkit-tone-4-color)}.playkit-player.playkit-size-sm .playkit-btn-borderless,.playkit-player.playkit-size-xs .playkit-btn-borderless{height:32px}.playkit-player.playkit-size-sm .playkit-btn-borderless i,.playkit-player.playkit-size-xs .playkit-btn-borderless i{width:24px;height:24px}.playkit-player.playkit-size-sm .playkit-btn-borderless.playkit-only-icon,.playkit-player.playkit-size-xs .playkit-btn-borderless.playkit-only-icon{padding:4px;width:32px;height:32px}.playkit-player.playkit-size-sm .playkit-btn-borderless.playkit-only-label,.playkit-player.playkit-size-xs .playkit-btn-borderless.playkit-only-label{padding:8px;width:50px;height:32px}.playkit-icon{display:inline-block;font-size:0;width:100%;height:100%;margin:0 auto;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.playkit-badge-icon:after{content:\"\";position:absolute;height:16px;width:16px;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.playkit-player{--playkit-icon-vr-stereo-full-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M864 255.996c53.019 0 96 42.981 96 96v384.004c0 53.019-42.981 96-96 96h-219.764c-33.721 0-64.97-17.693-82.319-46.608l-49.917-83.195-49.917 83.195c-17.349 28.916-48.598 46.608-82.319 46.608h-219.764c-53.019 0-96-42.981-96-96v-384.003c0-53.019 42.981-96 96-96h704zM304 624c44.183 0 80-35.817 80-80s-35.817-80-80-80c-44.183 0-80 35.817-80 80s35.817 80 80 80zM720 624c44.183 0 80-35.817 80-80s-35.817-80-80-80c-44.183 0-80 35.817-80 80s35.817 80 80 80z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-chromecast-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-HD-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M3.73939861,5 L2,5 L2,11 L3.73939861,11 L3.73918396,8.56940659 L5.96845644,8.56940659 L5.9691596,11 L7.69930609,11 L7.69930609,5 L5.9691596,5 L5.96845644,7.32457143 L3.73918396,7.32457143 L3.73939861,5 Z M10.849653,5 L8.65690054,5 L8.65690054,11 L10.8774094,11 L11.1387878,10.9921562 C11.5670397,10.9660102 11.9583976,10.8744992 12.3128614,10.7176232 L12.3128614,10.7176232 L12.4919044,10.6311813 L12.686671,10.5199596 C13.0639309,10.2858264 13.3675515,9.98155416 13.5975328,9.60714286 C13.827514,9.23273155 13.9589319,8.81088809 13.9917864,8.34161247 L13.9917864,8.34161247 L14,8.10302198 L14,7.9010989 L13.9917864,7.66145717 C13.9589319,7.19033135 13.827514,6.76815149 13.5975328,6.39491758 C13.3292213,5.95947802 12.9583655,5.61813187 12.4849653,5.37087912 C12.0791937,5.15894819 11.6207417,5.03784481 11.1096093,5.00756896 L11.1096093,5.00756896 L10.849653,5 Z M10.849653,6.24862637 C11.154973,6.24862637 11.4101773,6.30906593 11.615266,6.42994505 C11.8203547,6.55082418 11.9745567,6.73282967 12.077872,6.97596154 C12.1605243,7.17046703 12.2101157,7.40497253 12.2266461,7.67947802 L12.2266461,7.67947802 L12.232845,7.89285714 L12.232845,8.10302198 L12.2265536,8.31796703 C12.2097764,8.59445055 12.1594449,8.83049451 12.075559,9.0260989 C11.9707016,9.2706044 11.8180416,9.4532967 11.617579,9.57417582 C11.4572089,9.67087912 11.2672321,9.7289011 11.0476484,9.74824176 L11.0476484,9.74824176 L10.8774094,9.75549451 L10.3957366,9.75600879 L10.3957366,6.24937143 Z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-4K-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M6.52117789,5 L4.77853973,5 L4.7778117,5.01381978 L2,8.80769231 L2.10649455,9.76785714 L4.7778117,9.76866813 L4.77853973,11 L6.52117789,11 L6.52063574,9.76866813 L7.19402985,9.76785714 L7.19402985,8.5728022 L6.52063574,8.57362637 L6.52117789,5 Z M9.81282775,5 L7.99273901,5 L7.99273901,11 L9.81282775,11 L9.8119758,9.5061978 L10.4712352,8.88589011 L11.8313836,11 L13.9806374,11 L11.6856603,7.6629978 L14,5 L11.7587737,5 L10.3549818,6.78434066 L9.8119758,7.5229011 L9.81282775,5 Z M4.7778117,7.01905934 L4.7778117,8.57362637 L3.65066559,8.5728022 L4.69624849,7.13873626 L4.7778117,7.01905934 Z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-8K-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M4.5,5 C4.04427083,5 3.6389974,5.06279225 3.28417969,5.18837675 C2.92936198,5.31396126 2.65104167,5.499666 2.44921875,5.74549098 C2.24739583,5.99131597 2.14648438,6.29458918 2.14648438,6.65531062 C2.14648438,6.96259185 2.24820964,7.23112892 2.45166016,7.46092184 C2.58729384,7.61411712 2.75692636,7.74445187 2.96055773,7.85192607 L2.96055773,7.85192607 L3.07972656,7.90981323 L3.04817708,7.92134269 L2.87890625,8.000668 C2.71614583,8.08483634 2.57291667,8.18353373 2.44921875,8.29676019 L2.44921875,8.29676019 L2.33203125,8.41482966 L2.24394133,8.52320968 C2.08131378,8.74602266 2,9.00515316 2,9.3006012 C2,9.67735471 2.10986328,9.99131597 2.32958984,10.242485 C2.54931641,10.493654 2.84879557,10.6826987 3.22802734,10.8096192 C3.60725911,10.9365397 4.03613281,11 4.51464844,11 C4.99641927,11 5.42366536,10.9365397 5.79638672,10.8096192 C6.16910807,10.6826987 6.46289063,10.493654 6.67773438,10.242485 C6.89257813,9.99131597 7,9.67735471 7,9.3006012 C7,8.95591182 6.89176432,8.66065464 6.67529297,8.41482966 L6.67529297,8.41482966 L6.56041124,8.29676019 C6.3983742,8.14579158 6.20089157,8.02065242 5.96796332,7.92134269 L5.96796332,7.92134269 L5.94,7.911 L6.06141493,7.85192607 L6.20532227,7.76703407 C6.29701063,7.70758183 6.38019929,7.64241446 6.45488824,7.57153195 L6.45488824,7.57153195 L6.56054688,7.46092184 L6.65155707,7.3427967 C6.78945132,7.14054034 6.85839844,6.91137831 6.85839844,6.65531062 C6.85839844,6.29458918 6.75830078,5.99131597 6.55810547,5.74549098 C6.35791016,5.499666 6.08121745,5.31396126 5.72802734,5.18837675 C5.37483724,5.06279225 4.96549479,5 4.5,5 Z M9.8178888,5 L8,5 L8,11 L9.8178888,11 L9.81771088,9.5061978 L10.4751832,8.88673407 L11.8340048,11 L13.9806608,11 L11.6891307,7.6629978 L14,5 L11.7614827,5 L10.3593876,6.78434066 L9.81771088,7.5229011 L9.8178888,5 Z M4.50488281,8.51903808 C4.6546224,8.51903808 4.78401693,8.54375418 4.89306641,8.59318637 C5.00211589,8.64261857 5.0867513,8.71543086 5.14697266,8.81162325 C5.20719401,8.90781563 5.23730469,9.02805611 5.23730469,9.17234469 C5.23730469,9.30861723 5.20800781,9.4261857 5.14941406,9.5250501 C5.09082031,9.6239145 5.0069987,9.7007348 4.89794922,9.75551102 C4.78889974,9.81028724 4.66113281,9.83767535 4.51464844,9.83767535 C4.36490885,9.83767535 4.23388672,9.81028724 4.12158203,9.75551102 C4.00927734,9.7007348 3.92220052,9.6239145 3.86035156,9.5250501 C3.7985026,9.4261857 3.76757812,9.30861723 3.76757812,9.17234469 C3.76757812,9.02805611 3.7985026,8.90781563 3.86035156,8.81162325 C3.92220052,8.71543086 4.00846354,8.64261857 4.11914062,8.59318637 C4.22981771,8.54375418 4.35839844,8.51903808 4.50488281,8.51903808 Z M4.5,6.16232465 C4.63671875,6.16232465 4.74902344,6.18570474 4.83691406,6.23246493 C4.92480469,6.27922512 4.99072266,6.34535738 5.03466797,6.43086172 C5.07861328,6.51636607 5.10058594,6.62057448 5.10058594,6.74348697 C5.10058594,6.86372745 5.08024089,6.96993988 5.03955078,7.06212425 C4.99886068,7.15430862 4.93538411,7.22645291 4.84912109,7.27855711 C4.76285807,7.33066132 4.65136719,7.35671343 4.51464844,7.35671343 C4.37792969,7.35671343 4.2648112,7.33066132 4.17529297,7.27855711 C4.08577474,7.22645291 4.01985677,7.15430862 3.97753906,7.06212425 C3.93522135,6.96993988 3.9140625,6.86372745 3.9140625,6.74348697 C3.9140625,6.62057448 3.93522135,6.51636607 3.97753906,6.43086172 C4.01985677,6.34535738 4.08496094,6.27922512 4.17285156,6.23246493 C4.26074219,6.18570474 4.36979167,6.16232465 4.5,6.16232465 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-maximize{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M800 269.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E %3Cpath fill='%23fff' d='M224 754.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3C/svg%3E\")}.playkit-icon-minimize{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M672 306.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3Cpath fill='%23fff' d='M352 717.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E%3C/svg%3E\")}.playkit-icon-play{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M796.806 461.202c44.919 28.075 44.739 73.706 0 101.668l-459.472 287.171c-44.919 28.075-81.334 7.915-81.334-45.305v-585.4c0-53.096 36.595-73.266 81.334-45.305l459.472 287.171z' /%3E%3C/svg%3E\")}.playkit-icon-pause{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M256 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314zM640 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314z' /%3E%3C/svg%3E\")}.playkit-icon-volume-base{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M128 416v192h96v-192h-96zM64 383.853c0-17.592 14.012-31.853 32.094-31.853h159.813c17.725 0 32.094 14.581 32.094 31.853v256.295c0 17.592-14.012 31.853-32.094 31.853h-159.813c-17.725 0-32.094-14.581-32.094-31.853v-256.295z' /%3E%3Cpath fill='%23fff' d='M288 634.342l160 88.889v-422.462l-160 88.889v244.684zM224 352l231.787-128.771c31.046-17.248 56.213-2.487 56.213 32.476v512.589c0 35.184-25.054 49.786-56.213 32.476l-231.787-128.771v-320z' /%3E%3C/svg%3E\")}.playkit-icon-volume-waves{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M802.017 837.177c82.359-86.627 129.183-201.774 129.183-324.26 0-123.976-47.976-240.409-132.127-327.329-12.293-12.697-32.552-13.025-45.249-0.732s-13.025 32.552-0.732 45.249c72.692 75.084 114.109 175.597 114.109 282.812 0 105.928-40.422 205.331-111.566 280.162-12.177 12.808-11.666 33.063 1.143 45.24s33.063 11.666 45.24-1.143z' /%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z' /%3E%3C/svg%3E\")}.playkit-icon-volume-wave{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z'/%3E%3C/svg%3E\")}.playkit-icon-volume-mute{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M768 466.745l-67.986-67.986c-12.213-12.213-32.654-12.393-45.151 0.104-12.584 12.584-12.543 32.711-0.104 45.151l67.986 67.986-67.986 67.986c-12.213 12.213-12.393 32.654 0.104 45.151 12.584 12.584 32.711 12.543 45.151 0.104l67.986-67.986 67.986 67.986c12.213 12.213 32.654 12.393 45.151-0.104 12.584-12.584 12.543-32.711 0.104-45.151l-67.986-67.986 67.986-67.986c12.213-12.213 12.393-32.654-0.104-45.151-12.584-12.584-32.711-12.543-45.151-0.104l-67.986 67.986z' /%3E%3C/svg%3E\")}.playkit-icon-close{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M573.162 512l214.269-214.269c16.772-16.772 16.688-44.071-0.202-60.96-17.007-17.007-44.182-16.98-60.96-0.202l-214.269 214.269-214.269-214.269c-16.772-16.772-44.071-16.688-60.96 0.202-17.007 17.007-16.98 44.182-0.202 60.96l214.269 214.269-214.269 214.269c-16.772 16.772-16.688 44.071 0.202 60.96 17.007 17.007 44.182 16.98 60.96 0.202l214.269-214.269 214.269 214.269c16.772 16.772 44.071 16.688 60.96-0.202 17.007-17.007 16.98-44.182 0.202-60.96l-214.269-214.269z' /%3E%3C/svg%3E\")}.playkit-icon-settings{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M803.451 546.033c2.552-22.107 2.552-44.408 0.246-64.81-1.084-6.208-6.499-10.721-12.535-10.671-30.286 0.533-57.727-17.773-68.866-45.941s-3.64-60.291 18.795-80.593c3.935-3.569 4.416-9.583 0.92-13.959-13.595-17.35-29.146-33.073-46.311-46.83-4.23-3.38-10.359-2.886-14.783 1.966-14.421 14.721-34.212 22.938-54.434 22.761-9.009 0.041-17.942-1.652-26.865-5.212-28.414-11.992-46.226-40.546-44.49-71.542 0.335-5.319-3.547-9.972-8.785-10.588-21.926-2.538-44.068-2.595-65.961-0.176-5.349 0.6-9.341 5.207-9.175 10.514 1.027 30.384-16.802 58.251-45.764 70.431-8.238 3.138-16.993 4.701-25.207 4.609-20.599 0.206-40.395-7.982-55.482-23.363-2.014-2.187-4.849-3.435-7.553-3.445-2.441 0.015-4.811 0.83-6.513 2.139-17.541 13.798-33.455 29.547-47.262 46.729-3.418 4.337-2.922 10.575 0.97 14.162 22.816 20.692 30.19 53.479 17.807 83.351-13.035 27.396-41.135 44.394-71.446 43.222-5.112-0.197-9.499 3.606-10.086 9.179-2.673 22.023-2.673 44.289-0.212 64.867 1.080 6.27 6.559 10.824 13.309 10.737l2.225 0.006c28.935 0.604 54.726 18.391 65.634 45.374 11.22 28.205 3.921 60.407-18.565 81.204-3.866 3.509-4.341 9.418-0.895 13.742 13.545 17.354 29.027 33.106 46.042 46.867 4.303 3.449 10.547 2.954 14.986-1.907 14.414-14.76 34.226-23.001 54.43-22.82 9.070-0.052 18.063 1.668 27.041 5.299 28.19 12.071 45.891 40.41 44.347 71.468-0.342 5.312 3.536 9.962 8.802 10.578 21.915 2.548 44.049 2.605 65.929 0.176 5.364-0.604 9.364-5.227 9.191-10.598-0.997-30.358 16.84-58.183 45.452-70.201 8.263-3.256 17.070-4.908 25.521-4.865 20.676-0.206 40.533 8.070 55.398 23.38 2.039 2.195 4.898 3.446 7.673 3.455 2.268-0.011 4.468-0.776 6.321-2.228 17.625-13.724 33.599-29.444 47.415-46.611 3.426-4.348 2.928-10.6-0.863-14.097-22.358-20.082-30.057-51.85-19.372-79.939s37.55-46.71 67.745-46.857h5.229c5.12-0.026 9.413-3.875 9.996-8.962zM861.733 552.735c-3.961 34.572-33.157 60.748-68.129 60.926h-5.235c-5.803 0.028-10.991 3.624-13.054 9.048s-0.577 11.558 4.020 15.69c26.602 24.519 29.853 65.381 7.275 94.034-16.847 20.934-36.063 39.845-57.197 56.302-12.034 9.427-26.861 14.584-42.368 14.658-19.254-0.051-37.623-8.090-50.269-21.718-3.221-3.315-7.66-5.165-12.712-5.118-1.425-0.007-2.839 0.258-3.554 0.532-5.581 2.346-9.136 7.892-8.937 13.966 1.152 35.958-25.509 66.771-61.307 70.804-26.332 2.923-52.909 2.854-79.246-0.208-36.286-4.245-62.897-36.157-60.576-72.186 0.304-6.123-3.235-11.788-8.302-13.964-1.328-0.536-2.748-0.808-4.606-0.8-4.651-0.041-9.118 1.817-11.635 4.367-24.544 27.036-65.886 30.311-94.481 7.394-20.587-16.65-39.207-35.595-55.308-56.226-22.552-28.277-19.261-69.208 7.317-93.334 4.474-4.138 5.939-10.604 3.748-16.115-2.052-5.076-6.932-8.442-11.794-8.55-36.436 0.464-66.759-24.741-72.949-60.89-3.243-26.718-3.243-53.731-0.055-79.964 3.744-35.827 34.642-62.605 70.642-61.219 6.877 0.266 13.251-3.59 15.584-8.401 2.309-5.59 0.861-12.028-3.789-16.247-26.603-24.51-29.856-65.368-7.293-93.994 16.767-20.868 35.856-39.76 57.129-56.491 12.099-9.322 26.921-14.42 42.463-14.513 19.308 0.059 37.717 8.166 50.145 21.684 3.263 3.322 7.737 5.172 12.994 5.126 1.471 0.015 2.933-0.245 3.363-0.39 5.601-2.359 9.165-7.93 8.957-14.077-1.126-35.941 25.542-66.721 61.322-70.731 26.322-2.909 52.889-2.84 79.251 0.212 36.244 4.265 62.828 36.125 60.546 72.343-0.339 6.047 3.159 11.654 8.186 13.782 1.381 0.55 2.855 0.829 4.726 0.823 4.663 0.040 9.142-1.819 11.615-4.312 24.439-26.99 65.656-30.312 94.137-7.557 20.721 16.607 39.456 35.549 55.655 56.225 22.667 28.35 19.38 69.439-7.531 93.846-4.33 3.918-5.776 10.112-3.628 15.542s7.438 8.96 13.543 8.854c34.999-0.298 65.076 24.766 71.337 60.925 3.065 26.552 3.065 53.368 0 79.92zM511.956 589.951c43.215-0.108 78.137-35.17 78.072-78.385 0-31.732-19.132-60.334-48.461-72.448s-63.068-5.35-85.461 17.133c-22.393 22.483-29.022 56.249-16.791 85.529s40.909 48.298 72.641 48.171zM512.146 648.617c-55.438 0.221-105.58-33.029-126.965-84.224s-9.796-110.233 29.358-149.543c39.153-39.31 98.144-51.136 149.424-29.956s84.731 71.189 84.732 126.627c0.114 75.549-60.999 136.907-136.548 137.096z' /%3E%3C/svg%3E\")}.playkit-icon-check{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\")}.playkit-icon-check-active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\")}.playkit-icon-language{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c159.058 0 288-128.942 288-288s-128.942-288-288-288c-159.058 0-288 128.942-288 288s128.942 288 288 288zM512 864c-194.404 0-352-157.596-352-352s157.596-352 352-352c194.404 0 352 157.596 352 352s-157.596 352-352 352z' /%3E%3Cpath fill='%23fff' d='M441.231 173.324c-76.632 84.62-121.231 207.208-121.231 338.676 0 134.304 46.556 259.282 126.083 343.936l46.646-43.82c-68.041-72.429-108.728-181.651-108.728-300.116 0-116.001 39.001-223.203 104.669-295.716l-47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M584.297 173.324c76.632 84.62 121.231 207.208 121.231 338.676 0 134.304-46.556 259.282-126.083 343.936l-46.646-43.82c68.041-72.429 108.728-181.651 108.728-300.116 0-116.001-39.001-223.203-104.669-295.716l47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M840.432 419.786c-81.65-22.637-200.551-35.786-328.432-35.786-128.056 0-247.103 13.185-328.758 35.876l17.136 61.663c75.47-20.972 188.938-33.539 311.622-33.539 122.521 0 235.854 12.533 311.334 33.459l17.099-61.674z' /%3E%3Cpath fill='%23fff' d='M840.432 605.754c-81.65 22.637-200.551 35.786-328.432 35.786-128.056 0-247.103-13.185-328.758-35.876l17.136-61.663c75.47 20.972 188.938 33.539 311.622 33.539 122.521 0 235.854-12.533 311.334-33.459l17.099 61.674z' /%3E%3Cpath fill='%23fff' d='M480 192h64v640h-64v-640z' /%3E%3C/svg%3E\")}.playkit-icon-quality{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M159.904 192h288.234c17.277 0 31.862 14.323 31.862 31.992 0 17.792-14.261 31.993-31.853 31.994l-288.147 0.014v544.174c-0.017-0.18 704-0.174 704-0.174v-128.006c0-17.795 14.327-31.994 32-31.994 17.796 0 32 14.34 32 32.029v128.145c0 35.25-28.639 63.826-63.904 63.826h-704.192c-35.293 0-63.904-28.875-63.904-63.826v-544.348c0-35.25 28.639-63.826 63.904-63.826zM501.818 378.182c108.449 0 196.364-87.915 196.364-196.364 0-29.091 43.636-29.091 43.636 0 0 108.449 87.915 196.364 196.364 196.364 29.091 0 29.091 43.636 0 43.636-108.449 0-196.364 87.915-196.364 196.364 0 29.091-43.636 29.091-43.636 0 0-108.449-87.915-196.364-196.364-196.364-29.091 0-29.091-43.636 0-43.636z' /%3E%3C/svg%3E\")}.playkit-icon-captions{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M160 771.213c-0.017-0.172 704-0.166 704-0.166v-518.261c0.017 0.172-704 0.166-704 0.166v518.261zM96 252.787c0-33.572 28.639-60.787 63.904-60.787h704.192c35.293 0 63.904 27.5 63.904 60.787v518.427c0 33.572-28.639 60.787-63.904 60.787h-704.192c-35.293 0-63.904-27.5-63.904-60.787v-518.427z' /%3E%3Cpath fill='%23fff' d='M490.583 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412zM767.219 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412z' /%3E%3C/svg%3E\")}.playkit-icon-speed{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 832c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM480.239 643.971c-0.158-1.272-0.239-2.566-0.239-3.876v-192.19c0-17.621 14.204-31.905 32-31.905 17.673 0 32 14.497 32 31.905v192.19c0 1.313-0.079 2.607-0.232 3.878 55.325 14.128 96.232 64.301 96.232 124.027 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-59.729 40.91-109.903 96.239-124.029zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z' /%3E%3C/svg%3E\")}.playkit-icon-speed-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM401.852 670.758c-1.056-0.826-2.077-1.728-3.055-2.706l-113.005-113.005c-12.533-12.533-12.65-32.737-0.066-45.321 12.497-12.497 32.536-12.719 45.321 0.066l113.005 113.005c0.976 0.976 1.876 1.998 2.701 3.059 19.106-11.343 41.416-17.855 65.248-17.855 70.692 0 128 57.308 128 128s-57.308 128-128 128c-70.692 0-128-57.308-128-128 0-23.829 6.511-46.137 17.852-65.242zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\")}.playkit-icon-speed-up{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM546.516 612.708c0.524-1.23 1.129-2.446 1.819-3.64l79.906-138.402c8.862-15.35 28.348-20.692 43.76-11.794 15.305 8.837 20.707 28.135 11.666 43.794l-79.906 138.402c-0.693 1.201-1.451 2.34-2.268 3.416 23.761 23.238 38.508 55.655 38.508 91.516 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 11.959 0 23.535 1.64 34.516 4.708zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\")}.playkit-icon-audio{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M768 625.124v-354.531l-352 135.385v330.022c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124v-241.124c0-13.241 8.155-25.114 20.513-29.867l416-160c20.96-8.062 43.487 7.41 43.487 29.867v512c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124zM288 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM704 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64z' /%3E%3C/svg%3E\")}.playkit-icon-arrow-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z' /%3E%3C/svg%3E\")}.playkit-icon-start-over{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M255.271 339.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z' /%3E%3C/svg%3E\")}.playkit-icon-seek-end{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M742.494 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'/%3E%3C/svg%3E\")}.playkit-icon-rewind{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' opacity='0.5' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M816.068 431.974c-20.553-78.699-71.369-149.456-147.375-193.338-139.923-80.785-316.040-42.095-410.222 84.418l89.738-4.499c20.299-1.018 37.579 14.613 38.596 34.911s-14.613 37.579-34.911 38.596l-159.799 8.011c-16.335 0.819-31.25-9.242-36.61-24.694l-52.434-151.164c-6.66-19.202 3.506-40.167 22.708-46.828s40.167 3.506 46.828 22.708l27.226 78.49c116.254-155.703 333.248-203.244 505.682-103.69 91.184 52.645 152.976 136.648 179.618 230.523l-69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-rewind-10{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M413.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM596.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM529.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-forward{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' opacity='0.5' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M207.932 431.974c20.553-78.699 71.369-149.456 147.375-193.338 139.923-80.785 316.040-42.095 410.222 84.418l-89.738-4.499c-20.299-1.018-37.579 14.613-38.596 34.911s14.613 37.579 34.911 38.596l159.799 8.011c16.335 0.819 31.25-9.242 36.61-24.694l52.434-151.164c6.66-19.202-3.506-40.167-22.708-46.828s-40.167 3.506-46.828 22.708l-27.226 78.49c-116.254-155.703-333.248-203.244-505.682-103.69-91.184 52.645-152.976 136.648-179.618 230.523l69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-forward-10{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M365.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM548.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM481.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-vr-stereo{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M864 255.996c53.019 0 96 42.981 96 96v384.004c0 53.019-42.981 96-96 96h-219.764c-33.721 0-64.97-17.693-82.319-46.608l-49.917-83.195-49.917 83.195c-17.349 28.916-48.598 46.608-82.319 46.608h-219.764c-53.019 0-96-42.981-96-96v-384.003c0-53.019 42.981-96 96-96h704zM128 351.997v384.003c0 17.673 14.327 32 32 32h219.764c11.24 0 21.657-5.898 27.44-15.536l49.917-83.195c5.405-9.008 12.944-16.547 21.952-21.952 30.309-18.185 69.622-8.357 87.807 21.952l49.917 83.195c5.783 9.639 16.199 15.536 27.44 15.536h219.764c17.673 0 32-14.327 32-32v-384.004c0-17.673-14.327-32-32-32h-704c-17.673 0-32 14.327-32 32zM304 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80zM720 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-vr-stereo-full{background-image:var(--playkit-icon-vr-stereo-full-url)}.playkit-icon-chromecast{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-chromecast-brand{background-image:var(--playkit-icon-chromecast-url)}.playkit-icon-next{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M640 549.333l-264.982 154.573c-30.386 17.725-55.018 3.388-55.018-32.094v-319.625c0-35.45 24.605-49.835 55.018-32.094l264.982 154.573v-154.448c0-17.794 14.204-32.219 32-32.219 17.673 0 32 14.398 32 32.219v383.562c0 17.794-14.204 32.219-32 32.219-17.673 0-32-14.398-32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-prev{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M384 549.333l264.982 154.573c30.386 17.725 55.018 3.388 55.018-32.094v-319.625c0-35.45-24.605-49.835-55.018-32.094l-264.982 154.573v-154.448c0-17.794-14.204-32.219-32-32.219-17.673 0-32 14.398-32 32.219v383.562c0 17.794 14.204 32.219 32 32.219 17.673 0 32-14.398 32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-picture-in-picture-start{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M224 256c-17.673 0-32 14.327-32 32v448c0 17.673 14.327 32 32 32h576c17.673 0 32-14.327 32-32v-448c0-17.673-14.327-32-32-32h-576zM224 192h576c53.019 0 96 42.981 96 96v448c0 53.019-42.981 96-96 96h-576c-53.019 0-96-42.981-96-96v-448c0-53.019 42.981-96 96-96z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M544 512h192c17.673 0 32 14.327 32 32v128c0 17.673-14.327 32-32 32h-192c-17.673 0-32-14.327-32-32v-128c0-17.673 14.327-32 32-32z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-picture-in-picture-stop{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M800 192c51.126 0 92.917 39.965 95.837 90.359l0.163 5.641v448c0 51.126-39.965 92.917-90.359 95.837l-5.641 0.163h-576c-51.126 0-92.917-39.965-95.837-90.359l-0.163-5.641v-64c0-17.673 14.327-32 32-32 16.411 0 29.936 12.353 31.785 28.268l0.215 3.732v64c0 16.411 12.353 29.936 28.268 31.785l3.732 0.215h576c16.411 0 29.936-12.353 31.785-28.268l0.215-3.732v-448c0-16.411-12.353-29.936-28.268-31.785l-3.732-0.215h-192c-17.673 0-32-14.327-32-32 0-16.411 12.353-29.936 28.268-31.785l3.732-0.215h192z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M416 192c17.673 0 32 14.327 32 32 0 16.411-12.353 29.936-28.268 31.785l-3.732 0.215-178.752-0.032 202.711 202.736c12.497 12.497 12.497 32.758 0 45.255-11.535 11.535-29.687 12.423-42.24 2.662l-3.015-2.662-202.704-202.679v178.72c0 16.411-12.353 29.936-28.268 31.785l-3.732 0.215c-16.411 0-29.936-12.353-31.785-28.268l-0.215-3.732v-256l0.005-0.588c0.014-0.757 0.054-1.514 0.122-2.268l-0.127 2.856c0-1.62 0.12-3.212 0.353-4.767 0.083-0.544 0.182-1.101 0.295-1.656 0.141-0.705 0.307-1.399 0.495-2.084 0.14-0.5 0.288-0.992 0.449-1.482 0.204-0.629 0.434-1.262 0.684-1.885 0.227-0.568 0.466-1.121 0.722-1.669 0.311-0.661 0.644-1.314 0.998-1.954 0.212-0.388 0.439-0.779 0.676-1.166 0.503-0.818 1.040-1.614 1.61-2.382 0.174-0.238 0.351-0.47 0.532-0.7 1.588-2.021 3.42-3.854 5.45-5.446l-2.891 2.563c1.133-1.133 2.329-2.163 3.578-3.090 0.774-0.571 1.569-1.108 2.389-1.609 0.386-0.239 0.777-0.466 1.171-0.685 0.633-0.348 1.285-0.681 1.951-0.993 0.544-0.255 1.098-0.495 1.656-0.718 0.632-0.253 1.265-0.483 1.907-0.694 0.476-0.154 0.969-0.302 1.464-0.438 0.69-0.192 1.384-0.359 2.086-0.502 0.557-0.111 1.115-0.209 1.674-0.293 0.327-0.051 0.672-0.097 1.019-0.137l0.876-0.088c0.755-0.067 1.511-0.108 2.268-0.122l0.588-0.005h256z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-advanced-audio-description{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 24 24' width='24' height='24' fill-rule='nonzero'%3E%3Cpath d='M6.647 12.958h1.547V10.81l-1.547 2.147ZM12.226 10.408c.99 0 1.787.717 1.787 1.595 0 .881-.798 1.598-1.787 1.598h-.467v-3.193h.467Z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.536 4C2.688 4 2 4.68 2 5.52v12.96c0 .832.688 1.52 1.536 1.52h16.928c.848 0 1.536-.68 1.536-1.52V5.52C22 4.688 21.312 4 20.464 4H3.536Zm15.335 5h.826c.83.87 1.303 1.982 1.303 3.14a4.504 4.504 0 0 1-1.033 2.837h-.792c.745-.793 1.165-1.792 1.165-2.838 0-1.178-.537-2.311-1.47-3.139ZM8.185 15h1.47V9.004H7.819L3 15h2.158l.566-.793h2.461V15Zm4.223-.003c1.851 0 3.357-1.343 3.357-2.994 0-1.657-1.49-2.997-3.341-2.997h-2.075v5.993h2.059v-.002ZM18.008 9h-.826c.932.828 1.47 1.961 1.47 3.14 0 1.045-.421 2.044-1.166 2.837h.787a4.48 4.48 0 0 0 1.038-2.838c0-1.157-.472-2.27-1.303-3.139Zm-2.515 0h.82c.837.87 1.304 1.982 1.304 3.14a4.474 4.474 0 0 1-1.033 2.837h-.787c.74-.793 1.16-1.792 1.16-2.838 0-1.178-.532-2.311-1.464-3.139Z' fill='%23fff'/%3E%3C/svg%3E\")}.playkit-icon-quality-hd:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M3.73939861,5 L2,5 L2,11 L3.73939861,11 L3.73918396,8.56940659 L5.96845644,8.56940659 L5.9691596,11 L7.69930609,11 L7.69930609,5 L5.9691596,5 L5.96845644,7.32457143 L3.73918396,7.32457143 L3.73939861,5 Z M10.849653,5 L8.65690054,5 L8.65690054,11 L10.8774094,11 L11.1387878,10.9921562 C11.5670397,10.9660102 11.9583976,10.8744992 12.3128614,10.7176232 L12.3128614,10.7176232 L12.4919044,10.6311813 L12.686671,10.5199596 C13.0639309,10.2858264 13.3675515,9.98155416 13.5975328,9.60714286 C13.827514,9.23273155 13.9589319,8.81088809 13.9917864,8.34161247 L13.9917864,8.34161247 L14,8.10302198 L14,7.9010989 L13.9917864,7.66145717 C13.9589319,7.19033135 13.827514,6.76815149 13.5975328,6.39491758 C13.3292213,5.95947802 12.9583655,5.61813187 12.4849653,5.37087912 C12.0791937,5.15894819 11.6207417,5.03784481 11.1096093,5.00756896 L11.1096093,5.00756896 L10.849653,5 Z M10.849653,6.24862637 C11.154973,6.24862637 11.4101773,6.30906593 11.615266,6.42994505 C11.8203547,6.55082418 11.9745567,6.73282967 12.077872,6.97596154 C12.1605243,7.17046703 12.2101157,7.40497253 12.2266461,7.67947802 L12.2266461,7.67947802 L12.232845,7.89285714 L12.232845,8.10302198 L12.2265536,8.31796703 C12.2097764,8.59445055 12.1594449,8.83049451 12.075559,9.0260989 C11.9707016,9.2706044 11.8180416,9.4532967 11.617579,9.57417582 C11.4572089,9.67087912 11.2672321,9.7289011 11.0476484,9.74824176 L11.0476484,9.74824176 L10.8774094,9.75549451 L10.3957366,9.75600879 L10.3957366,6.24937143 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-hd-active:after{background-image:var(--playkit-icon-quality-HD-active-url)}.playkit-icon-quality-4k:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M6.52117789,5 L4.77853973,5 L4.7778117,5.01381978 L2,8.80769231 L2.10649455,9.76785714 L4.7778117,9.76866813 L4.77853973,11 L6.52117789,11 L6.52063574,9.76866813 L7.19402985,9.76785714 L7.19402985,8.5728022 L6.52063574,8.57362637 L6.52117789,5 Z M9.81282775,5 L7.99273901,5 L7.99273901,11 L9.81282775,11 L9.8119758,9.5061978 L10.4712352,8.88589011 L11.8313836,11 L13.9806374,11 L11.6856603,7.6629978 L14,5 L11.7587737,5 L10.3549818,6.78434066 L9.8119758,7.5229011 L9.81282775,5 Z M4.7778117,7.01905934 L4.7778117,8.57362637 L3.65066559,8.5728022 L4.69624849,7.13873626 L4.7778117,7.01905934 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-4k-active:after{background-image:var(--playkit-icon-quality-4K-active-url)}.playkit-icon-quality-8k:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M4.5,5 C4.04427083,5 3.6389974,5.06279225 3.28417969,5.18837675 C2.92936198,5.31396126 2.65104167,5.499666 2.44921875,5.74549098 C2.24739583,5.99131597 2.14648438,6.29458918 2.14648438,6.65531062 C2.14648438,6.96259185 2.24820964,7.23112892 2.45166016,7.46092184 C2.58729384,7.61411712 2.75692636,7.74445187 2.96055773,7.85192607 L2.96055773,7.85192607 L3.07972656,7.90981323 L3.04817708,7.92134269 L2.87890625,8.000668 C2.71614583,8.08483634 2.57291667,8.18353373 2.44921875,8.29676019 L2.44921875,8.29676019 L2.33203125,8.41482966 L2.24394133,8.52320968 C2.08131378,8.74602266 2,9.00515316 2,9.3006012 C2,9.67735471 2.10986328,9.99131597 2.32958984,10.242485 C2.54931641,10.493654 2.84879557,10.6826987 3.22802734,10.8096192 C3.60725911,10.9365397 4.03613281,11 4.51464844,11 C4.99641927,11 5.42366536,10.9365397 5.79638672,10.8096192 C6.16910807,10.6826987 6.46289063,10.493654 6.67773438,10.242485 C6.89257813,9.99131597 7,9.67735471 7,9.3006012 C7,8.95591182 6.89176432,8.66065464 6.67529297,8.41482966 L6.67529297,8.41482966 L6.56041124,8.29676019 C6.3983742,8.14579158 6.20089157,8.02065242 5.96796332,7.92134269 L5.96796332,7.92134269 L5.94,7.911 L6.06141493,7.85192607 L6.20532227,7.76703407 C6.29701063,7.70758183 6.38019929,7.64241446 6.45488824,7.57153195 L6.45488824,7.57153195 L6.56054688,7.46092184 L6.65155707,7.3427967 C6.78945132,7.14054034 6.85839844,6.91137831 6.85839844,6.65531062 C6.85839844,6.29458918 6.75830078,5.99131597 6.55810547,5.74549098 C6.35791016,5.499666 6.08121745,5.31396126 5.72802734,5.18837675 C5.37483724,5.06279225 4.96549479,5 4.5,5 Z M9.8178888,5 L8,5 L8,11 L9.8178888,11 L9.81771088,9.5061978 L10.4751832,8.88673407 L11.8340048,11 L13.9806608,11 L11.6891307,7.6629978 L14,5 L11.7614827,5 L10.3593876,6.78434066 L9.81771088,7.5229011 L9.8178888,5 Z M4.50488281,8.51903808 C4.6546224,8.51903808 4.78401693,8.54375418 4.89306641,8.59318637 C5.00211589,8.64261857 5.0867513,8.71543086 5.14697266,8.81162325 C5.20719401,8.90781563 5.23730469,9.02805611 5.23730469,9.17234469 C5.23730469,9.30861723 5.20800781,9.4261857 5.14941406,9.5250501 C5.09082031,9.6239145 5.0069987,9.7007348 4.89794922,9.75551102 C4.78889974,9.81028724 4.66113281,9.83767535 4.51464844,9.83767535 C4.36490885,9.83767535 4.23388672,9.81028724 4.12158203,9.75551102 C4.00927734,9.7007348 3.92220052,9.6239145 3.86035156,9.5250501 C3.7985026,9.4261857 3.76757812,9.30861723 3.76757812,9.17234469 C3.76757812,9.02805611 3.7985026,8.90781563 3.86035156,8.81162325 C3.92220052,8.71543086 4.00846354,8.64261857 4.11914062,8.59318637 C4.22981771,8.54375418 4.35839844,8.51903808 4.50488281,8.51903808 Z M4.5,6.16232465 C4.63671875,6.16232465 4.74902344,6.18570474 4.83691406,6.23246493 C4.92480469,6.27922512 4.99072266,6.34535738 5.03466797,6.43086172 C5.07861328,6.51636607 5.10058594,6.62057448 5.10058594,6.74348697 C5.10058594,6.86372745 5.08024089,6.96993988 5.03955078,7.06212425 C4.99886068,7.15430862 4.93538411,7.22645291 4.84912109,7.27855711 C4.76285807,7.33066132 4.65136719,7.35671343 4.51464844,7.35671343 C4.37792969,7.35671343 4.2648112,7.33066132 4.17529297,7.27855711 C4.08577474,7.22645291 4.01985677,7.15430862 3.97753906,7.06212425 C3.93522135,6.96993988 3.9140625,6.86372745 3.9140625,6.74348697 C3.9140625,6.62057448 3.93522135,6.51636607 3.97753906,6.43086172 C4.01985677,6.34535738 4.08496094,6.27922512 4.17285156,6.23246493 C4.26074219,6.18570474 4.36979167,6.16232465 4.5,6.16232465 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-8k-active:after{background-image:var(--playkit-icon-quality-8K-active-url)}.playkit-icon-closed-captions-on{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M15.114 18.545c0.144-0.275 0.217-0.533 0.217-0.774 0-0.204-0.078-0.395-0.234-0.575s-0.353-0.27-0.59-0.27c-0.199 0-0.367 0.061-0.504 0.185s-0.265 0.294-0.384 0.511c-0.213 0.369-0.458 0.644-0.735 0.824s-0.61 0.27-0.998 0.27c-0.289 0-0.554-0.056-0.796-0.167s-0.447-0.275-0.618-0.49c-0.171-0.215-0.301-0.476-0.391-0.781s-0.135-0.64-0.135-1.005c0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27s0.505 0.45 0.742 0.81c0.133 0.185 0.252 0.318 0.359 0.401s0.24 0.124 0.401 0.124c0.246 0 0.456-0.081 0.629-0.242s0.259-0.357 0.259-0.59c0-0.227-0.077-0.472-0.231-0.735s-0.377-0.51-0.668-0.742c-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 1.174 0.336 2.111 1.009 2.809s1.608 1.048 2.806 1.048c0.564 0 1.070-0.076 1.52-0.227s0.823-0.352 1.119-0.6c0.296-0.249 0.516-0.51 0.661-0.785z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M23.759 18.545c0.145-0.275 0.217-0.533 0.217-0.774 0-0.204-0.078-0.395-0.234-0.575s-0.353-0.27-0.59-0.27c-0.199 0-0.367 0.061-0.504 0.185s-0.265 0.294-0.384 0.511c-0.213 0.369-0.458 0.644-0.735 0.824s-0.61 0.27-0.998 0.27c-0.289 0-0.554-0.056-0.796-0.167s-0.448-0.275-0.618-0.49c-0.17-0.215-0.301-0.476-0.391-0.781s-0.135-0.64-0.135-1.005c0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27s0.506 0.45 0.742 0.81c0.133 0.185 0.252 0.318 0.359 0.401s0.24 0.124 0.401 0.124c0.246 0 0.456-0.081 0.629-0.242s0.259-0.357 0.259-0.59c0-0.227-0.077-0.472-0.231-0.735s-0.377-0.51-0.668-0.742c-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 1.174 0.336 2.111 1.009 2.809s1.608 1.048 2.806 1.048c0.564 0 1.070-0.076 1.52-0.227s0.823-0.352 1.119-0.6 0.516-0.51 0.661-0.785z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M3 7.9c0-1.049 0.895-1.9 1.997-1.9h22.006c1.103 0 1.997 0.859 1.997 1.9v16.201c0 1.049-0.895 1.9-1.997 1.9h-22.006c-1.103 0-1.997-0.859-1.997-1.9v-16.201zM5 24.1c-0.001-0.005 22-0.005 22-0.005v-16.196c0 0.005-22 0.005-22 0.005v16.196z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-closed-captions-off{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M30.133 6.838l-1.143 0.863c0.007 0.065 0.011 0.131 0.011 0.198v16.201c0 1.049-0.895 1.9-1.997 1.9h-22.006c-0.080 0-0.159-0.005-0.236-0.013l-1.128 0.851c-0.463 0.349-1.121 0.257-1.471-0.206s-0.257-1.121 0.206-1.471l26.5-20c0.463-0.349 1.121-0.257 1.471 0.206s0.257 1.121-0.206 1.471zM27 9.202l-4.619 3.486c0.222 0.109 0.421 0.233 0.596 0.373 0.291 0.232 0.514 0.479 0.668 0.742s0.231 0.508 0.231 0.735c0 0.232-0.086 0.429-0.259 0.59s-0.382 0.242-0.629 0.242c-0.161 0-0.295-0.041-0.401-0.124s-0.226-0.217-0.359-0.401c-0.237-0.36-0.484-0.63-0.742-0.81-0.164-0.114-0.357-0.193-0.578-0.234l-2.249 1.697c-0.045 0.237-0.068 0.495-0.068 0.774 0 0.365 0.045 0.7 0.135 1.005s0.22 0.566 0.391 0.781c0.171 0.215 0.377 0.379 0.618 0.49s0.507 0.167 0.796 0.167c0.388 0 0.721-0.090 0.998-0.27s0.522-0.455 0.735-0.824c0.118-0.218 0.246-0.388 0.384-0.511s0.305-0.185 0.504-0.185c0.237 0 0.433 0.090 0.59 0.27s0.234 0.372 0.234 0.575c0 0.241-0.072 0.5-0.217 0.774s-0.365 0.536-0.661 0.785-0.669 0.449-1.119 0.6c-0.45 0.152-0.957 0.227-1.52 0.227-1.198 0-2.133-0.349-2.806-1.048-0.536-0.557-0.858-1.265-0.967-2.123l-1.382 1.043c-0.033 0.165-0.096 0.337-0.19 0.516-0.145 0.275-0.365 0.536-0.661 0.785s-0.669 0.449-1.119 0.6c-0.246 0.083-0.508 0.143-0.788 0.18l-5.283 3.987c5.615-0.003 19.737-0.003 19.737-0.003v-14.893z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M4.997 6h19.546l-2.492 1.903c-6.487 0.002-17.051 0.002-17.051 0.002v13.019l-2 1.527v-14.551c0-1.049 0.895-1.9 1.997-1.9z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M12.841 14.034c0.179 0.125 0.353 0.293 0.521 0.504l1.399-1.068c-0.121-0.141-0.264-0.277-0.428-0.409-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 0.77 0.144 1.437 0.433 2.002l1.598-1.22c-0.056-0.252-0.085-0.522-0.085-0.81 0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27z'%3E%3C/path%3E%3C/svg%3E\")}@keyframes playkit-openDropmenu{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.playkit-dropdown{position:relative;font-size:15px}.playkit-dropdown .playkit-label-badge{position:relative}.playkit-dropdown .playkit-label-badge:after{top:-5px;right:-18px}.playkit-dropdown.playkit-active .playkit-dropdown-menu{display:block;opacity:1}.playkit-dropdown.playkit-active .playkit-dropdown-button .playkit-icon-arrow-down{transform:rotate(180deg)}.playkit-dropdown .playkit-dropdown-button{font-weight:bold;line-height:18px;color:#fff;cursor:pointer;padding-left:20px;display:flex}.playkit-dropdown .playkit-dropdown-button .playkit-icon{width:16px;height:16px;vertical-align:middle;margin-left:6px;transition:150ms transform;will-change:transform}.playkit-dropdown .playkit-dropdown-button>.playkit-label-badge.playkit-badge-icon{margin-right:13px}.playkit-dropdown-menu{display:block;opacity:1;position:absolute;background-color:#333;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border-radius:4px;padding:6px 0;z-index:5;animation:playkit-openDropmenu 100ms ease-out forwards;max-height:220px;overflow-y:auto;font-size:15px;text-align:left;font-weight:normal}.playkit-dropdown-menu.playkit-top{margin-bottom:10px;bottom:100%}.playkit-dropdown-menu.playkit-bottom{margin-top:10px;top:100%}.playkit-dropdown-menu.playkit-right{left:0}.playkit-dropdown-menu.playkit-left{right:0}.playkit-dropdown-menu.playkit-stick-bottom{bottom:-95px;margin:5px 0}.playkit-dropdown-menu .playkit-dropdown-menu-item{display:flex;justify-content:space-between;align-items:center;padding:2px 10px 2px 16px;white-space:nowrap;min-height:30px;cursor:pointer}.playkit-dropdown-menu .playkit-dropdown-menu-item:hover{color:#fff}.playkit-dropdown-menu .playkit-dropdown-menu-item.playkit-active .playkit-menu-icon-container{opacity:1}.playkit-dropdown-menu .playkit-dropdown-menu-item .playkit-icon-check-active{display:inline-block;margin-left:16px;vertical-align:middle;width:24px;height:24px}.playkit-dropdown-menu .playkit-dropdown-menu-item .playkit-menu-icon-container{opacity:0}.playkit-dropdown-menu .playkit-dropdown-menu-item>.playkit-label-badge.playkit-badge-icon{margin-right:5px}.playkit-player .playkit-control-button{width:32px;height:32px;background:rgba(0,0,0,0);display:inline-block;opacity:.8;border:none;padding:0;cursor:pointer}.playkit-player .playkit-control-button.playkit-button-badge{position:relative}.playkit-player .playkit-control-button.playkit-button-badge:after{top:-4px;right:-1px}.playkit-player .playkit-control-button i{width:32px;height:32px}.playkit-player .playkit-control-button.playkit-active{opacity:1}.playkit-player .playkit-control-button:disabled{opacity:.4;cursor:default}.playkit-player .playkit-control-button.playkit-control-button-rounded{width:36px;height:36px;padding:2px}.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled):hover{opacity:1}.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled).playkit-control-button-rounded:hover{background-color:rgba(0,0,0,.4);border-radius:18px}.playkit-player .playkit-control-button-container{display:inline-block;position:relative;vertical-align:top}.playkit-player.playkit-touch .playkit-player .playkit-control-button-container{position:static}.playkit-player.playkit-touch .playkit-control-button{position:relative}.playkit-player.playkit-state-idle .playkit-no-idle-control{display:none}.playkit-rotate{-moz-animation:playkit-spin .3s 1 linear;-o-animation:playkit-spin .3s 1 linear;-webkit-animation:playkit-spin .3s 1 linear;animation:playkit-spin .3s 1 linear}.playkit-reverse-rotate{-moz-animation:playkit-reverse-spin .3s 1 linear;-o-animation:playkit-reverse-spin .3s 1 linear;-webkit-animation:playkit-reverse-spin .3s 1 linear;animation:playkit-reverse-spin .3s 1 linear}@-webkit-keyframes playkit-spin{0%{-webkit-transform:rotate(359deg)}100%{-webkit-transform:rotate(0deg)}}@-moz-keyframes playkit-spin{0%{-moz-transform:rotate(359deg)}100%{-moz-transform:rotate(0deg)}}@-o-keyframes playkit-spin{0%{-o-transform:rotate(359deg)}100%{-o-transform:rotate(0deg)}}@-ms-keyframes playkit-spin{0%{-ms-transform:rotate(359deg)}100%{-ms-transform:rotate(0deg)}}@keyframes playkit-spin{0%{transform:rotate(359deg)}100%{transform:rotate(0deg)}}@-webkit-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-moz-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-o-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-ms-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.playkit-upper-bar-icon{width:36px;height:36px;border-radius:4px;padding:2px;cursor:pointer;color:var(--playkit-tone-1-color);display:flex;align-items:center;justify-content:center;opacity:.8;border:none;background-color:rgba(0,0,0,0);margin:0 4px}.playkit-upper-bar-icon:hover{background-color:var(--playkit-tone-4-color);opacity:1}.playkit-upper-bar-icon:active{background-color:var(--playkit-tone-6-color);opacity:1}.playkit-upper-bar-icon:disabled{opacity:.4}.playkit-player a{font-size:15px;line-height:18px;cursor:pointer;--primary-hover-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-hsl-saturation) calc(var(--playkit-hsl-lightness) - 10%))}.playkit-player a:hover{color:var(--primary-hover-color)}.playkit-player a:active{opacity:.7}.playkit-emptyUrl a{cursor:auto;pointer-events:none}.playkit-player{overflow:hidden;user-select:none;width:100%;height:100%;position:relative;outline:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:none;font-family:Lato,Helvetica Neue,Segoe UI,sans-serif}.playkit-player:-webkit-full-screen{width:100%;height:100%;max-width:none}.playkit-player *{box-sizing:border-box;outline:none}.playkit-player ::selection{background-color:rgba(0,0,0,.1)}.playkit-player video{width:100%;left:0}.playkit-player video::-webkit-media-controls-panel-container,.playkit-player video::-webkit-media-controls{display:none !important;-webkit-appearance:none}.playkit-player video::-webkit-media-controls-start-playback-button{display:none !important;-webkit-appearance:none}.playkit-player .playkit-player-gui{overflow:hidden;font-size:0}.playkit-player .playkit-player-gui label{margin-bottom:0}.playkit-player .overlay-portal{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.playkit-player.playkit-overlay-active .overlay-portal{z-index:11;pointer-events:initial}.playkit-player.playkit-nav *:focus{outline:1px solid var(--playkit-tab-focus-color) !important}.playkit-player [id^=\"playkit-ads-container\"]{transition:transform 100ms}.playkit-player [id^=\"playkit-ads-container\"][data-adtype=\"overlay\"]{z-index:1}.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-hover [id^=\"playkit-ads-container\"],.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-paused [id^=\"playkit-ads-container\"],.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-idle [id^=\"playkit-ads-container\"]{transform:translateY(-60px);-webkit-transform:translateY(-60px);-ms-transform:translateY(-60px)}.playkit-player.playkit-pre-playback,.playkit-player.playkit-casting,.playkit-player.playkit-metadata-loaded.playkit-hover,.playkit-player.playkit-state-paused,.playkit-player.playkit-state-idle,.playkit-player.playkit-ad-break,.playkit-player.playkit-menu-active,.playkit-player.playkit-overlay-active{cursor:auto}.playkit-player video::-webkit-media-text-track-container{max-height:none}.playkit-player.playkit-iOS video::-webkit-media-text-track-container{position:absolute;top:0;bottom:0;left:0;right:0}.playkit-player.playkit-state-paused video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle video::-webkit-media-text-track-container,.playkit-player.playkit-hover video::-webkit-media-text-track-container{padding:0 0 50px 0}.playkit-player.playkit-state-paused.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-state-paused.playkit-iOS video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle.playkit-iOS video::-webkit-media-text-track-container,.playkit-player.playkit-hover.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-hover.playkit-iOS video::-webkit-media-text-track-container{padding:initial;max-height:calc(100% - 50px)}.playkit-player.playkit-state-paused.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display,.playkit-player.playkit-state-idle.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display,.playkit-player.playkit-hover.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display{transform:translateY(-50px);-webkit-transform:translateY(-50px);-ms-transform:translateY(-50px)}.playkit-player.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-container{max-height:none}.playkit-player.playkit-overlay-active .playkit-subtitles{visibility:hidden}.playkit-player .playkit-subtitles{top:50px;transform:translateY(0px);-webkit-transform:translateY(0px);-ms-transform:translateY(0px);transition:ease-in 100ms}.playkit-player:not(.playkit-overlay-active).playkit-state-paused .playkit-subtitles,.playkit-player:not(.playkit-overlay-active).playkit-state-idle .playkit-subtitles,.playkit-player:not(.playkit-overlay-active).playkit-hover .playkit-subtitles{transform:translateY(-50px);-webkit-transform:translateY(-50px);-ms-transform:translateY(-50px)}.playkit-player:not(.playkit-overlay-active).playkit-fullscreen.playkit-iOS .playkit-subtitles{transform:translateY(0px);-webkit-transform:translateY(0px);-ms-transform:translateY(0px)}.playkit-video-player{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--playkit-player-background-color);transition:all 500ms;transition-property:left,right,bottom,top,width,height;display:flex}.playkit-overlay-active .playkit-video-player{filter:blur(16px)}@keyframes playkit-openOverlay{from{opacity:0}to{opacity:1}}.playkit-overlay{position:absolute;width:100%;height:100%;display:none;opacity:0;animation:playkit-openOverlay 100ms ease-in-out forwards;z-index:11}.playkit-overlay.playkit-active{display:block;opacity:1}.playkit-overlay .playkit-overlay-contents{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:4;text-align:center;color:#fff;padding:60px 20px 30px 20px;overflow-y:auto}.playkit-overlay .playkit-title{font-size:24px;font-weight:bold;line-height:29px;margin-bottom:60px}.playkit-overlay .playkit-close-overlay{position:absolute;top:48px;right:48px;z-index:5;cursor:pointer}.playkit-overlay .playkit-close-overlay .playkit-icon-close{width:24px;height:24px}.playkit-overlay .playkit-overlay-screen{display:none}.playkit-overlay .playkit-overlay-screen.playkit-active{display:block}.playkit-player.playkit-size-md .playkit-overlay .playkit-overlay-contents{padding:36px 20px}.playkit-player.playkit-size-md .playkit-overlay .playkit-close-overlay{top:38px}.playkit-player.playkit-size-md .playkit-overlay .playkit-title{margin-bottom:24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-overlay-contents,.playkit-player.playkit-size-xs .playkit-overlay .playkit-overlay-contents{padding:16px 24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-close-overlay,.playkit-player.playkit-size-xs .playkit-overlay .playkit-close-overlay{top:15px;right:24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-title,.playkit-player.playkit-size-xs .playkit-overlay .playkit-title{font-size:20px;line-height:19px;margin-bottom:24px}@keyframes playkit-openSmartContainer{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes playkit-closeSmartContainer{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(10px)}}.playkit-player:not(.playkit-touch) .playkit-smart-container{background-color:#222;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border-radius:4px;position:absolute;right:0px;min-width:193px;font-size:15px;z-index:10;display:block;animation:playkit-openSmartContainer 100ms ease-out forwards}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-leaving{animation:playkit-closeSmartContainer 100ms ease-out forwards}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top{bottom:100%;margin-bottom:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top:before{display:block;content:\" \";position:absolute;bottom:-6px;left:0;width:100%;height:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-bottom{top:100%;margin-top:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-right{left:0px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-left{right:0px}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item{margin:16px;color:rgba(244,244,244,.8);white-space:nowrap;display:flex;justify-content:space-between}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon{display:none}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select{align-self:flex-end}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown span:not(.playkit-badge-icon){overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select{text-align-last:right}.playkit-player.playkit-touch .playkit-smart-container-item,.playkit-player.playkit-size-sm .playkit-smart-container-item,.playkit-player.playkit-size-xs .playkit-smart-container-item{width:300px;max-width:100%;margin:16px auto;color:rgba(244,244,244,.8);white-space:nowrap;text-align:left;display:flex;justify-content:space-between}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label{font-size:16px;color:rgba(255,255,255,.8);margin-right:20px}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon{width:24px;height:24px;display:inline-block;vertical-align:middle;margin-right:16px}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select{align-self:flex-end}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select{text-align-last:right;min-width:1px;line-height:24px}.playkit-player.playkit-touch.playkit-Windows select option,.playkit-player.playkit-size-sm.playkit-Windows select option,.playkit-player.playkit-size-xs.playkit-Windows select option{color:#000;background-color:#fff}.playkit-overlay.playkit-cvaa-overlay .playkit-sample{border:2px solid rgba(255,255,255,.2);border-radius:4px;font-size:16px;font-weight:bold;line-height:36px;text-align:center;padding:0 31px;display:inline-block;margin:0 12px;position:relative}.playkit-overlay.playkit-cvaa-overlay .playkit-sample:not(.playkit-custom){cursor:pointer}.playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-black-bg{background-color:#000}.playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-yellow-text{color:#faff00}.playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick{height:16px;width:16px;border-radius:8px;background-color:var(--playkit-primary-color);position:absolute;top:-5px;right:-5px}.playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick .playkit-icon{vertical-align:top}.playkit-overlay.playkit-cvaa-overlay .playkit-sample span{font-size:16px !important;line-height:1;vertical-align:middle}.playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa{margin-top:50px;height:40px;width:400px;max-width:100%;border:2px solid rgba(255,255,255,.2);border-radius:4px;font-size:16px;font-weight:bold;line-height:38px;text-align:center;display:inline-block;color:#fff;text-decoration:none;cursor:pointer}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied{margin-top:50px}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied a{color:var(--playkit-primary-brighter-color)}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form{width:300px;max-width:100%;margin:0 auto}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a{color:#fff;line-height:36px;text-decoration:none}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:hover,.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:focus{text-decoration:underline}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form .playkit-slider{float:right;width:100px;margin-top:5px}.playkit-overlay.playkit-cvaa-overlay .playkit-preview-container{width:100%;text-align:center;font-size:16px}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample{width:30%;margin:2.33%;padding:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:first-child{margin-left:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:last-child{margin-right:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-custom{width:auto;padding:0 10px}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa,.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied{margin-top:20px}.playkit-font-size,.playkit-font-color,.playkit-font-family,.playkit-font-style,.playkit-font-opacity,.playkit-background-color,.playkit-background-opacity{background:initial}.playkit-loading-backdrop{position:absolute;top:50%;left:50%;transition:100ms opacity;opacity:0;z-index:5}.playkit-loading-backdrop.playkit-show{opacity:1}.playkit-loading-backdrop.playkit-show .playkit-spinner-container{display:block}.playkit-loading-backdrop .playkit-spinner-container{display:none;position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button{transition:400ms transform}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-pause{transition:400ms opacity;opacity:0;display:none}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-play{transition:400ms opacity;opacity:1;display:block}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing{transform:rotate(360deg)}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-pause{opacity:1;display:block}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-play{opacity:0;display:none}.playkit-control-button-container.playkit-control-volume,.playkit-control-button-container.playkit-volume-control{display:inline-block !important}.playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-volume-control-bar,.playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar{display:block !important}.playkit-control-button-container.playkit-control-volume.playkit-is-muted .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-waves{opacity:0;-webkit-transform:translateX(-5px);-ms-transform:translateX(-5px);transform:translateX(-5px)}.playkit-control-button-container.playkit-control-volume.playkit-is-muted .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-mute{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.playkit-control-button-container.playkit-control-volume.playkit-dragging-active .playkit-volume-control-bar,.playkit-control-button-container.playkit-volume-control.playkit-dragging-active .playkit-volume-control-bar{display:block}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves{-webkit-transform:translateX(0px);-ms-transform:translateX(0px);transform:translateX(0px)}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute{opacity:1;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-waves,.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute{transition:300ms transform,300ms opacity}.playkit-control-button-container.playkit-control-volume i,.playkit-control-button-container.playkit-volume-control i{position:absolute;top:0;left:0}.playkit-volume-control-bar{position:absolute;z-index:2;bottom:38px;left:0;height:112px;width:34px;border-radius:4px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);background-color:#333;padding:6px;display:none}.playkit-volume-control-bar:before{position:absolute;width:34px;height:14px;bottom:-8px;left:0;content:\" \";display:block}.playkit-volume-control-bar .playkit-bar{background-color:#424242;height:100%;position:relative;cursor:pointer}.playkit-volume-control-bar .playkit-progress{position:absolute;bottom:0;left:0;width:100%;border-radius:0 0 2px 2px;background-color:var(--playkit-primary-color)}.playkit-player.playkit-smart-container-open .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-player.playkit-smart-container-open .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-size-ty .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-size-ty .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-touch .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-touch .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button{transition:100ms transform;transform:scale(1)}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize{display:block}.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover{transform:scale(1.1)}.playkit-player .playkit-seek-bar{padding:12px 0 12px 0;cursor:pointer;position:relative}.playkit-player .playkit-seek-bar:hover .playkit-time-preview,.playkit-player .playkit-seek-bar:hover .playkit-frame-preview:not(.playkit-hide-frame-preview),.playkit-player .playkit-seek-bar.playkit-hover .playkit-time-preview,.playkit-player .playkit-seek-bar.playkit-hover .playkit-frame-preview:not(.playkit-hide-frame-preview){display:block}.playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-scrubber,.playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-scrubber{transform:scale(1)}.playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-virtual-progress,.playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-virtual-progress{display:block}.playkit-player .playkit-seek-bar.playkit-ad-break{cursor:initial}.playkit-player .playkit-seek-bar.playkit-ad-break .playkit-progress-bar .playkit-progress{background-color:var(--playkit-ads-color)}.playkit-player .playkit-seek-bar.playkit-live .playkit-progress-bar .playkit-progress{background-color:var(--playkit-live-color)}.playkit-player .playkit-seek-bar .playkit-progress-bar{width:100%;height:4px;background-color:rgba(255,255,255,.3);border-radius:2px;position:absolute;transition:height 200ms ease,transform 200ms ease}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-progress{position:absolute;top:0;left:0;height:100%;border-radius:inherit;background-color:var(--playkit-primary-color)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress{display:none}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-buffered,.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress{position:absolute;top:0;left:0;height:100%;border-radius:inherit}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-buffered{background-color:rgba(255,255,255,.3)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress-indicator{width:1px;height:100%;background-color:var(--playkit-tone-1-color);float:right}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber{position:absolute;cursor:pointer;display:block;top:-6px;right:-8px;border-radius:8px;height:16px;width:16px;background-color:var(--playkit-tone-1-color);box-shadow:0 0 31px 0 rgba(0,0,0,.3);transform:scale(0);transition:100ms transform;z-index:1;pointer-events:none}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber:active{opacity:1;cursor:grabbing}.playkit-player .playkit-seek-bar .playkit-frame-preview{position:absolute;bottom:20px;left:0}.playkit-player .playkit-seek-bar .playkit-time-preview{position:absolute;bottom:26px;left:0;height:22px;min-width:48px;padding:0 3px;text-align:center;border-radius:3px;background-color:rgba(0,0,0,.7);font-size:13px;font-weight:bold;line-height:22px;color:#fff;z-index:1;pointer-events:none}.playkit-player .playkit-seek-bar .playkit-time-preview,.playkit-player .playkit-seek-bar .playkit-frame-preview{display:none}.playkit-player .playkit-seek-bar .playkit-non-sticky:hover{display:none}.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar:hover .playkit-progress-bar,.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar{height:8px;border-radius:4px;transform:translateY(-2px)}.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar:hover .playkit-progress-bar .playkit-scrubber,.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-scrubber{top:-4px}.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress,.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-time-preview,.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-frame-preview{display:none}.playkit-player.playkit-size-ty .playkit-seek-bar{padding:12px 0;cursor:pointer;position:relative;float:left;width:calc(100% - 45px);margin:1px 0}.playkit-player.playkit-size-ty .playkit-seek-bar .playkit-frame-preview{display:none}.playkit-player.playkit-size-ty .playkit-seek-bar .playkit-time-preview{bottom:16px}.playkit-frame-preview .playkit-frame-preview-img-container{border:2px solid rgba(255,255,255,.2);border-radius:4px}.playkit-frame-preview .playkit-frame-preview-img-container .playkit-frame-preview-img{background-size:auto 100%;width:100%;height:100%;position:relative}.playkit-player .playkit-time-display{display:inline-block;line-height:32px;vertical-align:top;font-size:14px;padding:0 23px;font-weight:bold}.playkit-touch .playkit-time-display{padding-left:0}.playkit-player.playkit-size-md .playkit-time-display{padding:0 12px}.playkit-player.playkit-size-xs .playkit-time-display,.playkit-player.playkit-size-sm .playkit-time-display{padding:0 12px 0 0}.playkit-player .playkit-video-playing-title{font-size:15px;font-weight:bold;line-height:18px;padding:6px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.playkit-player .playkit-bottom-bar{background:linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);color:#fff;visibility:hidden;height:auto;max-height:0;transition:100ms max-height ease-in-out,100ms visibility ease-in-out,0ms padding linear 100ms;width:100%;margin-top:auto;bottom:0;left:0;z-index:1;pointer-events:auto;position:relative;padding:0}.playkit-player .playkit-bottom-bar.playkit-hide{display:none}.playkit-player .playkit-bottom-bar .playkit-left-controls{float:left;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-left-controls .playkit-control-button-container:first-child{margin-left:0px}.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area{position:relative;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-right-controls{float:right;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-right-controls .playkit-control-button-container:last-child{margin-right:0px}.playkit-player .playkit-bottom-bar .playkit-control-button-container{margin:0 6px}.playkit-player.playkit-size-ty .playkit-left-controls{display:none}.playkit-player.playkit-size-ty .playkit-control-button-container{display:none;margin:0}.playkit-player.playkit-size-xs .playkit-left-controls .playkit-control-button-container{display:none}.playkit-player.playkit-size-xs .playkit-control-button-container,.playkit-player.playkit-size-sm .playkit-control-button-container{margin:0 3px}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-bottom-bar{visibility:visible;padding:0 16px 4px;max-height:60px;transition:100ms max-height ease-in-out,100ms visibility ease-in-out}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break{max-height:92px}.playkit-player.playkit-size-sm .playkit-bottom-bar{padding:0 8px 4px}.playkit-player.playkit-size-sm .playkit-bottom-bar .playkit-time-display{padding-left:0}.playkit-player .playkit-bottom-bar .playkit-left-controls>*,.playkit-player .playkit-bottom-bar .playkit-right-controls>*,.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area>*{pointer-events:auto}.playkit-player .playkit-top-bar{background:linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);color:#fff;visibility:hidden;position:relative;height:auto;min-height:60px;max-height:60px;margin-top:-60px;transition:100ms visibility ease-in-out,100ms margin-top ease-in-out,100ms min-height ease-in-out;width:100%;top:0;left:0;z-index:1;pointer-events:auto}.playkit-player .playkit-top-bar .playkit-top-bar-area{position:absolute;top:0;left:0;height:calc(100% - 28px);width:calc(100% - 32px);margin:14px 16px;pointer-events:none}.playkit-player .playkit-top-bar .playkit-top-bar-area:empty{margin:0;height:0;width:0}.playkit-player .playkit-top-bar.playkit-disabled{pointer-events:none}.playkit-player .playkit-top-bar.playkit-hide{display:none}.playkit-player .playkit-top-bar .playkit-left-controls{float:left;text-align:left;min-width:0;margin:14px 0 14px 16px;pointer-events:none}.playkit-player .playkit-top-bar .playkit-left-controls:empty{margin:0}.playkit-player .playkit-top-bar .playkit-right-controls{float:right;text-align:left;margin:14px 16px 14px 0;pointer-events:none}.playkit-player .playkit-top-bar .playkit-right-controls:empty{margin:0}.playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container{margin:0 6px}.playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container:last-child{margin-right:0}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-top-bar{visibility:visible;margin-top:0;min-height:16px}.playkit-player .playkit-top-bar .playkit-left-controls>*,.playkit-player .playkit-top-bar .playkit-right-controls>*,.playkit-player .playkit-top-bar .playkit-top-bar-area>*{pointer-events:auto}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-left-controls{margin:14px 0 14px 8px}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-left-controls:empty{margin:0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-right-controls{margin:14px 8px 14px 0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-right-controls:empty{margin:0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-top-bar-area{width:calc(100% - 16px);margin:14px 8px}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-top-bar-area:empty{margin:0}@keyframes playkit-overlayActionIconIn{0%{opacity:0;transform:scale(0)}10%{opacity:.1;transform:scale(0.1)}20%{opacity:.3;transform:scale(0.2)}30%{opacity:.5;transform:scale(0.3)}40%{opacity:.7;transform:scale(0.4)}50%{opacity:.9;transform:scale(0.5)}60%{opacity:.9;transform:scale(0.5)}70%{opacity:.9;transform:scale(0.5)}75%{opacity:.9;transform:scale(0.5)}80%{opacity:1;transform:scale(0.5)}85%{opacity:1;transform:scale(0.5)}90%{opacity:1;transform:scale(0.5)}93%{opacity:.7;transform:scale(0.5)}95%{opacity:.5;transform:scale(0.5)}98%{opacity:.2;transform:scale(0.5)}100%{opacity:0;transform:scale(0.5)}}.playkit-overlay-action .playkit-icon{width:144px;height:144px;position:absolute;top:50%;left:50%;margin:-72px 0 0 -72px;opacity:0}.playkit-player:not(.playkit-touch):not(.playkit-size-sm) .playkit-overlay-action.playkit-in .playkit-icon{animation:playkit-overlayActionIconIn 300ms linear forwards}.playkit-pre-playback-play-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button{z-index:1;position:absolute;top:50%;left:50%;height:108px;width:108px;border:2px solid rgba(255,255,255,.2);background-color:rgba(0,0,0,.5);transform:translate(-50%, -50%);-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);border-radius:54px;padding:20px;cursor:pointer}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:hover{border:2px solid rgba(255,255,255,.4)}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:active{opacity:.7;transform:scale(1) translate(-50%, -50%)}.playkit-pre-playback .playkit-bottom-bar,.playkit-pre-playback .playkit-top-bar{opacity:0;display:none}.playkit-player.playkit-size-ty .playkit-pre-playback-play-button{width:75px;height:75px;padding:12px}.playkit-player.playkit-size-xs .playkit-pre-playback-play-button{width:85px;height:85px;padding:15px}.playkit-player .playkit-btn-skip-ad{font-weight:lighter;position:absolute;bottom:60px;right:16px;line-height:36px}.playkit-player .playkit-skip-ad{color:#fff;font-size:20px;font-weight:lighter;line-height:24px;text-shadow:0 0 6px rgba(0,0,0,.6);position:absolute;bottom:66px;right:16px}.playkit-row{display:block}.playkit-row:after{content:\"\";clear:both;display:block}.playkit-d-inline-block{display:inline-block}.playkit-mobile-hidden-select{display:block;opacity:0;position:absolute;top:0;left:0px;width:100%;height:100%}.playkit-font-size-base,.playkit-ad-notice{font-size:15px}.playkit-ad-notice{pointer-events:none}.playkit-live-tag{display:inline-block;background-color:var(--playkit-live-color);color:#fff;border-radius:4px;padding:3px 4px;margin:5px 10px;text-transform:uppercase;font-size:15px;cursor:default}.playkit-live-tag.playkit-non-live-playhead{background-color:#666;cursor:pointer}.playkit-player.playkit-size-sm .playkit-live-tag{margin-left:0}.playkit-interactive-area .playkit-unmute-button-container{top:0;left:0}.playkit-unmute-button-container{display:inline-block;position:absolute;top:16px;left:16px;z-index:15}.playkit-unmute-button-container a{color:#fff}.playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button{max-width:64px}.playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button span{transform:translateX(10px);opacity:0}.playkit-btn.playkit-unmute-button{font-size:15px;max-width:200px;transition:max-width 200ms;padding:0 16px;white-space:nowrap}.playkit-btn.playkit-unmute-button span{transform:translateX(0px);opacity:1;transition:transform 100ms,opacity 100ms;display:inline-block;color:#fff}.playkit-btn.playkit-unmute-button.playkit-has-top-bar{transition:100ms transform}.playkit-unmute-icon-container{width:32px;height:32px;display:inline-block;vertical-align:top;position:relative;margin-right:3px}.playkit-unmute-icon-container i{position:absolute;top:0;left:0}.playkit-player.playkit-hover .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-state-paused .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-state-idle .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-menu-active .playkit-unmute-button-container.playkit-has-top-bar{transform:translateY(32px)}.playkit-overlay.playkit-error-overlay{background-color:var(--playkit-tone-7-color);font-size:0em}.playkit-overlay-contents .playkit-error-overlay{padding-top:20px}.playkit-error-overlay{position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column;height:100%}.playkit-error-overlay .playkit-copy-url-row{display:flex;margin-bottom:10px}.playkit-error-overlay .playkit-svg-container{flex:4;display:flex;justify-content:space-around;flex-flow:column}.playkit-error-overlay .playkit-headline{color:var(--playkit-tone-1-color);font-size:18px;margin:10px 0 14px 0;flex:1}.playkit-error-overlay .playkit-error-session{font-size:14px;color:var(--playkit-tone-2-color);margin:auto;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.playkit-error-overlay .playkit-control-button-container{flex:5}.playkit-error-overlay .playkit-retry-btn{height:36px;width:auto;min-width:120px;padding:0 8px;border:2px solid var(--playkit-tone-7-color);border-radius:18px;background-color:#000;color:var(--playkit-tone-1-color);font-size:15px;font-weight:bold;line-height:32px;cursor:pointer}.playkit-error-overlay .playkit-error-text{height:0px;visibility:hidden}.playkit-link-options-container{width:auto}.playkit-link-options-container .playkit-copy-url-row .playkit-input-copy-url{margin:0}.playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url{margin-left:8px;height:32px;width:32px}.playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url .playkit-icon{height:24px;width:24px;margin-top:-3px}.playkit-slider{height:8px;border-radius:4px;background-color:rgba(255,255,255,.2)}.playkit-slider .playkit-progress{background-color:var(--playkit-primary-color);height:8px;border-radius:4px;position:relative}.playkit-slider .playkit-progress .playkit-handle{height:12px;width:12px;border-radius:5px;background-color:#fff;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);position:absolute;right:0;top:0px;transform:translate3d(6px, -2px, 0);cursor:pointer}.playkit-player .playkit-learn-more{font-weight:lighter}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button{transition:100ms transform;transform:scale(1)}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize{display:block}.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover{transform:scale(1.1)}.playkit-player .playkit-watermark{position:absolute;transition:visibility 0s 1s,opacity 1s linear,transform ease-out 100ms}.playkit-player .playkit-watermark.playkit-hide-watermark{visibility:hidden;opacity:0}.playkit-player .playkit-watermark.playkit-top{top:0}.playkit-player .playkit-watermark.playkit-bottom{bottom:0}.playkit-player .playkit-watermark.playkit-right{right:0}.playkit-player .playkit-watermark.playkit-left{left:0}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button .playkit-icon-vr-stereo-full{display:none}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo{display:none}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo-full{display:block}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button .playkit-icon-closed-captions-on{display:none}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button.playkit-cc-on .playkit-icon-closed-captions-off{display:none}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button.playkit-cc-on .playkit-icon-closed-captions-on{display:block}.playkit-player .playkit-cast-button{display:block;width:28px;height:30px;background-color:rgba(255,255,255,0);border:none;cursor:pointer;--connected-color: var(--playkit-tone-2-color);--disconnected-color: var(--playkit-tone-2-color)}.playkit-player .playkit-cast-button:hover{--connected-color: #ffffffff;--disconnected-color: #ffffffff}.playkit-player .playkit-cast-button.playkit-cast-button-active{--connected-color: rgba(1, 172, 205, 0.8)}.playkit-player .playkit-cast-button.playkit-cast-button-active:hover{--connected-color: var(--playkit-primary-color)}.playkit-player .playkit-cast-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.playkit-player .playkit-cast-overlay .playkit-cast-poster{all:inherit;background-size:contain;background:#000 no-repeat center center}.playkit-player .playkit-cast-overlay .playkit-cast-poster.playkit-has-poster{background-color:#000}.playkit-player .playkit-cast-overlay .playkit-cast-black-cover{all:inherit;background:linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, 0) 100%)}.playkit-player .playkit-cast-box .playkit-cast-icon{position:absolute;bottom:0;left:46px;height:128px}.playkit-player .playkit-cast-box .playkit-cast-icon .playkit-icon{width:30px;height:22px;color:rgba(255,255,255,.6);opacity:.6}.playkit-player .playkit-cast-box .playkit-cast-connecting-spinner{height:21px;width:21px;-webkit-animation:playkit-spin .9s infinite linear;border:3px solid rgba(255,255,255,.4);border-top-color:rgba(255,255,255,.8);border-radius:100%}.playkit-player .playkit-cast-box .playkit-cast-text{position:absolute;bottom:0;left:89px;height:128px;font-weight:lighter}.playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-status{display:inline-block;margin-top:3px;font-size:16px;color:rgba(255,255,255,.6);float:left;font-weight:inherit}.playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-device{left:0;display:inline-block;font-weight:inherit;font-size:25px;color:#fff;line-height:40px}@keyframes playkit-castOnTVAnimation{0%{opacity:0;transform:rotateY(70deg)}33%{opacity:.3;transform:rotateY(50deg)}66%{opacity:.6;transform:rotateY(30deg)}100%{opacity:1;transform:rotateY(0)}}.playkit-player .playkit-cast-on-tv-button-container{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.playkit-player .playkit-cast-on-tv-button-container span{font-weight:lighter;color:#fff}.playkit-player .playkit-cast-on-tv-button-container.playkit-show-cast-on-tv{animation:playkit-castOnTVAnimation 300ms linear forwards}.playkit-player .playkit-btn.playkit-cast-on-tv-button{font-size:15px;max-width:200px;transition:max-width 200ms;padding:0 16px;white-space:nowrap;position:absolute;bottom:0;transform:translate(-50%, -50%);left:50%}.playkit-player .playkit-btn.playkit-cast-on-tv-button span{transform:translateX(0px);opacity:1;transition:transform 100ms,opacity 100ms;display:inline-block}.playkit-player .playkit-cast-on-tv-icon-container{width:32px;height:32px;display:inline-block;vertical-align:top;position:relative;margin-right:3px}.playkit-player .playkit-cast-on-tv-icon-container i{position:absolute;top:0;left:0}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview{position:absolute;bottom:35px;width:280px;height:72px;display:flex;border-radius:4px;box-shadow:0px 0px 0px 1px rgba(0,0,0,.2),0px 8px 60px -16px rgba(0,0,0,.2);opacity:0;transition:400ms opacity;pointer-events:none}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview:hover{opacity:0 !important}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-img{width:128px;height:inherit;border-radius:4px 0 0 4px;background-size:contain;background-repeat:round}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text{width:152px;height:inherit;padding:8px;background-color:rgba(0,0,0,.7);border-radius:0 4px 4px 0}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-title{font-size:14px;font-weight:400;margin-bottom:3px;opacity:.7}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-name{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}.playkit-control-button-container.playkit-control-playlist-button:hover .playkit-poster-preview{opacity:1}.playkit-icon-picture-in-picture-stop{display:none}.playkit-is-in-picture-in-picture .playkit-icon-picture-in-picture-start{display:none}.playkit-is-in-picture-in-picture .playkit-icon-picture-in-picture-stop{display:block}.playkit-player-gui>.playkit-playback-controls,.playkit-center-playback-controls{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);white-space:nowrap;z-index:1}.playkit-bottom-bar .playkit-playback-controls{display:inline}.playkit-player.playkit-size-sm.playkit-state-idle .playkit-control-playlist-button,.playkit-player.playkit-size-xs.playkit-state-idle .playkit-control-playlist-button,.playkit-player.playkit-touch.playkit-state-idle .playkit-control-playlist-button{display:none}.playkit-player.playkit-size-sm:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls{display:none}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls{display:block}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button{width:auto;height:auto;padding:0 16px;-webkit-filter:drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5));filter:drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5))}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon{width:64px;height:64px}.playkit-player.playkit-overlay-active .playkit-gui-area .playkit-playback-controls{opacity:0;visibility:hidden}@keyframes playkit-slideIn{0%{right:-160px}100%{right:0}}.playkit-player .playkit-playlist-countdown{display:flex;height:72px;position:absolute;right:0;bottom:0;border-radius:4px;transition:opacity 400ms,bottom 300ms;cursor:pointer;box-shadow:0px 0px 0px 1px rgba(0,0,0,.2),0px 8px 60px -16px rgba(0,0,0,.2)}.playkit-player .playkit-playlist-countdown.playkit-slideIn{right:-160px;animation:playkit-slideIn 500ms 500ms forwards}.playkit-player .playkit-playlist-countdown.playkit-hidden{pointer-events:none;opacity:0}.playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{width:0}.playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content{opacity:0}.playkit-player .playkit-playlist-countdown.playkit-canceled{bottom:-50px;opacity:0}.playkit-player .playkit-playlist-countdown:hover .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{background-color:#000}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-poster{width:128px;height:inherit;border-radius:4px 0 0 4px;background-size:contain;background-repeat:round}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:152px;height:inherit}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{width:inherit;border-radius:0 4px 3px 0;background-color:rgba(0,0,0,.7);height:inherit;transition:width 500ms 1000ms}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content{width:inherit;transition:opacity 300ms 1200ms}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{width:100%;padding:10px;font-size:14px;font-weight:400;text-align:left;color:#fff;float:left;line-height:initial}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{margin-bottom:12px;opacity:.7}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title .playkit-playlist-countdown-time-left{display:inline;margin-left:4px}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{position:absolute;top:5px;right:5px;width:24px;height:24px}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel *{width:inherit;height:inherit}.playkit-player.playkit-size-md .playkit-playlist-countdown{height:54px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-poster{width:96px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:152px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{padding:8px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{margin-bottom:4px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{top:3px;right:3px}.playkit-player.playkit-size-sm .playkit-playlist-countdown,.playkit-player.playkit-size-xs .playkit-playlist-countdown,.playkit-player.playkit-size-ty .playkit-playlist-countdown{z-index:1;height:36px;margin:8px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-poster,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-poster,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-poster{display:none}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:108px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{transition:width 500ms;border-radius:2px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{width:90%;padding:3px 0 0 4px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{font-size:12px;margin-bottom:0}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name{font-size:12px;font-weight:400}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{top:0;right:0}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay{position:absolute;width:100%;height:100%;background-color:rgba(0,0,0,.5)}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content{position:relative;top:50%;transform:translateY(-50%)}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text{position:absolute;width:100%;top:-90px;font-size:15px;color:#fff;padding:4px 8px 12px 8px;text-align:center}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-title{padding:4px;font-weight:100}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name{padding:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{position:relative;margin:auto;width:384px}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio{width:100%;padding-top:56%}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster{position:absolute;top:0;left:0;bottom:0;right:0;border:2px solid rgba(255,255,255,.2);border-radius:4px;cursor:pointer}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img{height:100%;border-radius:3px;background-size:contain;background-repeat:round}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:64px;height:64px}.playkit-player.playkit-state-idle.playkit-size-lg .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:37.5%}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text{top:-58px}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name{padding:0}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:42%}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:32px}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster{border:0}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img{display:none}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon{width:32px;height:32px}.playkit-picture-in-picture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster{all:inherit;background-size:contain;background:#000 no-repeat center center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster.playkit-has-poster{background-color:#000}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster .playkit-dark-layer{background-color:rgba(0,0,0,.4);position:absolute;top:0;left:0;width:100%;height:100%}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control{position:absolute;display:flex;flex-direction:column;height:100%}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control::after{content:\"\";flex:3}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control::before{content:\"\";flex:1}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-text{color:var(--playkit-tone-1-color);font-size:18px;white-space:nowrap;overflow:hidden}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-button{height:36px;width:120px;border:2px solid var(--playkit-tone-6-color);border-radius:18px;background-color:var(--playkit-tone-7-color);color:var(--playkit-tone-1-color);font-size:15px;font-weight:bold;line-height:30px;cursor:pointer;margin-top:20px;align-self:center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-button:hover{background-color:var(--playkit-tone-6-color)}.playkit-copy-url-row .playkit-input-copy-url{margin:0}.playkit-copy-url-row .playkit-btn-copy-url{margin:0 8px}.playkit-copy-url-row .playkit-btn-copy-url .playkit-icon{height:24px;width:24px;margin-top:-3px;display:none}.playkit-copy-url-row .playkit-btn-copy-url .playkit-icon-copy{display:block}.playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-copy{display:none}.playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-check{display:block}.playkit-IE.playkit-player .playkit-tooltip .playkit-tooltip-label{white-space:nowrap}.playkit-player .playkit-tooltip{position:relative;display:inline-block;height:100%;width:100%}.playkit-player .playkit-tooltip .playkit-tooltip-label{visibility:hidden;background-color:var(--playkit-tooltip-background-color);color:var(--playkit-tooltip-color);text-align:center;padding:4px 6px;border-radius:4px;position:absolute;line-height:normal;font-weight:bold;font-size:13px;opacity:0;transition:opacity 1s;width:max-content;display:table}.playkit-player .playkit-tooltip .playkit-tooltip-label:after{content:\"\";position:absolute;border-width:5px;border-style:solid;border-radius:3px;color:var(--playkit-tooltip-background-color);z-index:-1}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top{bottom:calc(100% + 10px);left:50%;transform:translate(-50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top:after{bottom:-4px;left:50%;transform:translate(-50%) rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-left{bottom:calc(100% + 10px);left:50%;transform:translate(-100%);margin-left:16px}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-left:after{bottom:-4px;right:0;margin-right:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-right{bottom:calc(100% + 10px);left:50%;transform:translate(-16px)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-right:after{bottom:-4px;left:0;margin-left:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom{top:calc(100% + 10px);left:50%;transform:translate(-50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom:after{top:-4px;left:50%;margin-left:-5px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-right{top:calc(100% + 10px);left:50%;transform:translate(-16px)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-right:after{top:-4px;left:0;margin-left:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-left{top:calc(100% + 10px);transform:translate(-100%);left:50%;margin-left:16px}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-left:after{top:-4px;right:0;margin-right:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-left{top:50%;right:calc(100% + 10px);transform:translate(0, -50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-left:after{top:50%;left:100%;margin-left:-6px;margin-top:-5px;transform:rotate(135deg) skew(10deg, 10deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-right{top:50%;left:calc(100% + 10px);transform:translate(0, -50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-right:after{top:50%;right:100%;margin-top:-5px;margin-right:-6px;transform:rotate(135deg) skew(10deg, 10deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-show{visibility:visible;opacity:1}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-hide{transition:opacity .15s ease-in-out}.playkit-side-panel{position:absolute;overflow:hidden;transition:all 500ms;transition-property:left,right,bottom,top,opacity;z-index:1}.playkit-vertical-side-panel{height:100%}.playkit-horizontal-side-panel{height:0;left:0;right:0}.playkit-side-panel-content{width:100%;height:100%}.playkit-player.playkit-overlay-active .playkit-interactive-area{filter:blur(16px)}.playkit-interactive-area{pointer-events:none;position:relative;top:0;margin:16px;transition:margin 100ms ease-in-out;flex:1}.playkit-player.playkit-size-sm .playkit-interactive-area{margin:8px}.playkit-player.playkit-casting:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-state-paused:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-state-idle:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-ad-break:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-menu-active:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area{margin:0px 8px}.playkit-player.playkit-casting .playkit-interactive-area,.playkit-player.playkit-metadata-loaded.playkit-hover .playkit-interactive-area,.playkit-player.playkit-state-paused .playkit-interactive-area,.playkit-player.playkit-state-idle .playkit-interactive-area,.playkit-player.playkit-ad-break .playkit-interactive-area,.playkit-player.playkit-menu-active .playkit-interactive-area{margin:0px 16px}.playkit-video-area{pointer-events:none;transition:all 500ms;transition-property:left,right,bottom,top,width,height}.playkit-gui-area{pointer-events:none;transition:all 500ms;transition-property:left,right,bottom,top;display:flex;flex-flow:column nowrap}@keyframes playkit-kaltura-spinner{0%{transform:rotate(0deg) scale(0.7);opacity:1}70%{transform:rotate(360deg) scale(0.7);opacity:1}82%{transform:rotate(360deg) scale(0);opacity:0}87%{transform:rotate(360deg) scale(0.9);opacity:1}100%{transform:rotate(360deg) scale(0.7);opacity:1}}.playkit-spinner{width:100px;height:100px;position:relative;animation:playkit-kaltura-spinner 2.5s infinite}.playkit-spinner span{width:8px;height:8px;background-color:#fff;display:block;border-radius:8px;position:absolute;top:50%;left:50%;margin-top:-4px;margin-left:-4px}.playkit-spinner span:nth-child(1){transform:rotate(45deg) translateX(-25px) translateY(-25px);background-color:#da1f26}.playkit-spinner span:nth-child(2){transform:rotate(90deg) translateX(-25px) translateY(-25px);background-color:#06a885}.playkit-spinner span:nth-child(3){transform:rotate(135deg) translateX(-25px) translateY(-25px);background-color:#009344}.playkit-spinner span:nth-child(4){transform:rotate(180deg) translateX(-25px) translateY(-25px);background-color:#f8a61a}.playkit-spinner span:nth-child(5){transform:rotate(225deg) translateX(-25px) translateY(-25px);background-color:#1b4a97}.playkit-spinner span:nth-child(6){transform:rotate(270deg) translateX(-25px) translateY(-25px);background-color:#00abcc}.playkit-spinner span:nth-child(7){transform:rotate(315deg) translateX(-25px) translateY(-25px);background-color:#b1d238}.playkit-spinner span:nth-child(8){transform:rotate(360deg) translateX(-25px) translateY(-25px);background-color:#fcd203}.playkit-switch{position:relative;display:inline-block;width:32px;height:16px}.playkit-switch .playkit-toggle-input{opacity:0;width:0;height:0}.playkit-switch .playkit-toggle-input:checked+.playkit-slider{background-color:#2196f3}.playkit-switch .playkit-toggle-input:focus+.playkit-slider{box-shadow:0 0 1px #2196f3}.playkit-switch .playkit-toggle-input:checked+.playkit-slider:before{transform:translateX(14px);-webkit-transform:translateX(14px);-ms-transform:translateX(14px)}.playkit-switch .playkit-slider{height:100%;position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:34px}.playkit-switch .playkit-slider:before{position:absolute;content:\"\";height:12px;width:12px;left:3px;top:2px;background-color:#fff;-webkit-transition:.3s;transition:.3s;border-radius:50%}",""]),t.locals={primaryColor:"var(--playkit-primary-color)",primaryDarkerColor:"var(--playkit-primary-darker-color)",primaryBrighterColor:"var(--playkit-primary-brighter-color)",primaryTextContrastColor:"var(--playkit-primary-text-contrast-color)",secondaryColor:"var(--playkit-secondary-color)",secondaryDarkerColor:"var(--playkit-secondary-darker-color)",secondaryBrighterColor:"var(--playkit-secondary-brighter-color)",secondaryTextContrastColor:"var(--playkit-secondary-text-contrast-color)",successDarkerColor:"var(--playkit-success-darker-color)",successBrighterColor:"var(--playkit-success-brighter-color)",successTextContrastColor:"var(--playkit-success-text-contrast-color)",dangerColor:"var(--playkit-danger-color)",dangerDarkerColor:"var(--playkit-danger-darker-color)",dangerBrighterColor:"var(--playkit-danger-brighter-color)","danger-text-contrast-color":"var(--playkit-danger-text-contrast-color)",dangerTextContrastColor:"var(--playkit-danger-text-contrast-color)",warningColor:"var(--playkit-warning-color)",warningDarkerColor:"var(--playkit-warning-darker-color)",warningBrighterColor:"var(--playkit-warning-brighter-color)",warningTextContrastColor:"var(--playkit-warning-text-contrast-color)",tone1Color:"var(--playkit-tone-1-color)",tone2Color:"var(--playkit-tone-2-color)",tone3Color:"var(--playkit-tone-3-color)",tone4Color:"var(--playkit-tone-4-color)",tone5Color:"var(--playkit-tone-5-color)",tone6Color:"var(--playkit-tone-6-color)",tone7Color:"var(--playkit-tone-7-color)",tone8Color:"var(--playkit-tone-8-color)",liveColor:"var(--playkit-live-color)",playerBackgroundColor:"var(--playkit-player-background-color)",tabFocusColor:"var(--playkit-tab-focus-color)",tooltipBackgroundColor:"var(--playkit-tooltip-background-color)",tooltipColor:"var(--playkit-tooltip-color)",adsColor:"var(--playkit-ads-color)",progressBarHeight:"4px",progressBarBorderRadius:"2px",defaultTransitionTime:"500",bottomBarMaxHeight:"60",brandColor:"#006bff",white:"#fff",player:"playkit-player",row:"playkit-row","d-inline-block":"playkit-d-inline-block",dInlineBlock:"playkit-d-inline-block","mobile-hidden-select":"playkit-mobile-hidden-select",mobileHiddenSelect:"playkit-mobile-hidden-select","font-size-base":"playkit-font-size-base",fontSizeBase:"playkit-font-size-base","ad-notice":"playkit-ad-notice",adNotice:"playkit-ad-notice","form-group":"playkit-form-group",formGroup:"playkit-form-group","has-error":"playkit-has-error",hasError:"playkit-has-error","form-control":"playkit-form-control",formControl:"playkit-form-control","has-icon":"playkit-has-icon",hasIcon:"playkit-has-icon",icon:"playkit-icon",checkbox:"playkit-checkbox","form-group-row":"playkit-form-group-row",formGroupRow:"playkit-form-group-row",dropdown:"playkit-dropdown",btn:"playkit-btn","btn-block":"playkit-btn-block",btnBlock:"playkit-btn-block","btn-dark-transparent":"playkit-btn-dark-transparent",btnDarkTransparent:"playkit-btn-dark-transparent","btn-branded":"playkit-btn-branded",btnBranded:"playkit-btn-branded","btn-rounded":"playkit-btn-rounded",btnRounded:"playkit-btn-rounded","btn-borderless":"playkit-btn-borderless",btnBorderless:"playkit-btn-borderless","only-icon":"playkit-only-icon",onlyIcon:"playkit-only-icon","only-label":"playkit-only-label",onlyLabel:"playkit-only-label","size-sm":"playkit-size-sm",sizeSm:"playkit-size-sm","size-xs":"playkit-size-xs",sizeXs:"playkit-size-xs","badge-icon":"playkit-badge-icon",badgeIcon:"playkit-badge-icon","icon-maximize":"playkit-icon-maximize",iconMaximize:"playkit-icon-maximize","icon-minimize":"playkit-icon-minimize",iconMinimize:"playkit-icon-minimize","icon-play":"playkit-icon-play",iconPlay:"playkit-icon-play","icon-pause":"playkit-icon-pause",iconPause:"playkit-icon-pause","icon-volume-base":"playkit-icon-volume-base",iconVolumeBase:"playkit-icon-volume-base","icon-volume-waves":"playkit-icon-volume-waves",iconVolumeWaves:"playkit-icon-volume-waves","icon-volume-wave":"playkit-icon-volume-wave",iconVolumeWave:"playkit-icon-volume-wave","icon-volume-mute":"playkit-icon-volume-mute",iconVolumeMute:"playkit-icon-volume-mute","icon-close":"playkit-icon-close",iconClose:"playkit-icon-close","icon-settings":"playkit-icon-settings",iconSettings:"playkit-icon-settings","icon-check":"playkit-icon-check",iconCheck:"playkit-icon-check","icon-check-active":"playkit-icon-check-active",iconCheckActive:"playkit-icon-check-active","icon-language":"playkit-icon-language",iconLanguage:"playkit-icon-language","icon-quality":"playkit-icon-quality",iconQuality:"playkit-icon-quality","icon-captions":"playkit-icon-captions",iconCaptions:"playkit-icon-captions","icon-speed":"playkit-icon-speed",iconSpeed:"playkit-icon-speed","icon-speed-down":"playkit-icon-speed-down",iconSpeedDown:"playkit-icon-speed-down","icon-speed-up":"playkit-icon-speed-up",iconSpeedUp:"playkit-icon-speed-up","icon-audio":"playkit-icon-audio",iconAudio:"playkit-icon-audio","icon-arrow-down":"playkit-icon-arrow-down",iconArrowDown:"playkit-icon-arrow-down","icon-start-over":"playkit-icon-start-over",iconStartOver:"playkit-icon-start-over","icon-seek-end":"playkit-icon-seek-end",iconSeekEnd:"playkit-icon-seek-end","icon-rewind":"playkit-icon-rewind",iconRewind:"playkit-icon-rewind","icon-rewind-10":"playkit-icon-rewind-10",iconRewind10:"playkit-icon-rewind-10","icon-forward":"playkit-icon-forward",iconForward:"playkit-icon-forward","icon-forward-10":"playkit-icon-forward-10",iconForward10:"playkit-icon-forward-10","icon-vr-stereo":"playkit-icon-vr-stereo",iconVrStereo:"playkit-icon-vr-stereo","icon-vr-stereo-full":"playkit-icon-vr-stereo-full",iconVrStereoFull:"playkit-icon-vr-stereo-full","icon-chromecast":"playkit-icon-chromecast",iconChromecast:"playkit-icon-chromecast","icon-chromecast-brand":"playkit-icon-chromecast-brand",iconChromecastBrand:"playkit-icon-chromecast-brand","icon-next":"playkit-icon-next",iconNext:"playkit-icon-next","icon-prev":"playkit-icon-prev",iconPrev:"playkit-icon-prev","icon-picture-in-picture-start":"playkit-icon-picture-in-picture-start",iconPictureInPictureStart:"playkit-icon-picture-in-picture-start","icon-picture-in-picture-stop":"playkit-icon-picture-in-picture-stop",iconPictureInPictureStop:"playkit-icon-picture-in-picture-stop","icon-advanced-audio-description":"playkit-icon-advanced-audio-description",iconAdvancedAudioDescription:"playkit-icon-advanced-audio-description","icon-quality-hd":"playkit-icon-quality-hd",iconQualityHd:"playkit-icon-quality-hd","icon-quality-hd-active":"playkit-icon-quality-hd-active",iconQualityHdActive:"playkit-icon-quality-hd-active","icon-quality-4k":"playkit-icon-quality-4k",iconQuality4K:"playkit-icon-quality-4k","icon-quality-4k-active":"playkit-icon-quality-4k-active",iconQuality4KActive:"playkit-icon-quality-4k-active","icon-quality-8k":"playkit-icon-quality-8k",iconQuality8K:"playkit-icon-quality-8k","icon-quality-8k-active":"playkit-icon-quality-8k-active",iconQuality8KActive:"playkit-icon-quality-8k-active","icon-closed-captions-on":"playkit-icon-closed-captions-on",iconClosedCaptionsOn:"playkit-icon-closed-captions-on","icon-closed-captions-off":"playkit-icon-closed-captions-off",iconClosedCaptionsOff:"playkit-icon-closed-captions-off","label-badge":"playkit-label-badge",labelBadge:"playkit-label-badge",active:"playkit-active","dropdown-menu":"playkit-dropdown-menu",dropdownMenu:"playkit-dropdown-menu","dropdown-button":"playkit-dropdown-button",dropdownButton:"playkit-dropdown-button",openDropmenu:"playkit-openDropmenu",top:"playkit-top",bottom:"playkit-bottom",right:"playkit-right",left:"playkit-left","stick-bottom":"playkit-stick-bottom",stickBottom:"playkit-stick-bottom","dropdown-menu-item":"playkit-dropdown-menu-item",dropdownMenuItem:"playkit-dropdown-menu-item","menu-icon-container":"playkit-menu-icon-container",menuIconContainer:"playkit-menu-icon-container","control-button":"playkit-control-button",controlButton:"playkit-control-button","button-badge":"playkit-button-badge",buttonBadge:"playkit-button-badge","control-button-rounded":"playkit-control-button-rounded",controlButtonRounded:"playkit-control-button-rounded",touch:"playkit-touch","control-button-container":"playkit-control-button-container",controlButtonContainer:"playkit-control-button-container","state-idle":"playkit-state-idle",stateIdle:"playkit-state-idle","no-idle-control":"playkit-no-idle-control",noIdleControl:"playkit-no-idle-control",rotate:"playkit-rotate",spin:"playkit-spin","reverse-rotate":"playkit-reverse-rotate",reverseRotate:"playkit-reverse-rotate","reverse-spin":"playkit-reverse-spin",reverseSpin:"playkit-reverse-spin","upper-bar-icon":"playkit-upper-bar-icon",upperBarIcon:"playkit-upper-bar-icon",emptyUrl:"playkit-emptyUrl","player-gui":"playkit-player-gui",playerGui:"playkit-player-gui","overlay-active":"playkit-overlay-active",overlayActive:"playkit-overlay-active",nav:"playkit-nav","ad-break":"playkit-ad-break",adBreak:"playkit-ad-break","metadata-loaded":"playkit-metadata-loaded",metadataLoaded:"playkit-metadata-loaded",hover:"playkit-hover","state-paused":"playkit-state-paused",statePaused:"playkit-state-paused","pre-playback":"playkit-pre-playback",prePlayback:"playkit-pre-playback",casting:"playkit-casting","menu-active":"playkit-menu-active",menuActive:"playkit-menu-active",iOS:"playkit-iOS",iOs:"playkit-iOS",Safari:"playkit-Safari",safari:"playkit-Safari",fullscreen:"playkit-fullscreen","video-player":"playkit-video-player",videoPlayer:"playkit-video-player",overlay:"playkit-overlay",openOverlay:"playkit-openOverlay","overlay-contents":"playkit-overlay-contents",overlayContents:"playkit-overlay-contents",title:"playkit-title","close-overlay":"playkit-close-overlay",closeOverlay:"playkit-close-overlay","overlay-screen":"playkit-overlay-screen",overlayScreen:"playkit-overlay-screen","size-md":"playkit-size-md",sizeMd:"playkit-size-md","smart-container":"playkit-smart-container",smartContainer:"playkit-smart-container",openSmartContainer:"playkit-openSmartContainer",leaving:"playkit-leaving",closeSmartContainer:"playkit-closeSmartContainer","smart-container-item":"playkit-smart-container-item",smartContainerItem:"playkit-smart-container-item","select-menu-item":"playkit-select-menu-item",selectMenuItem:"playkit-select-menu-item","label-icon":"playkit-label-icon",labelIcon:"playkit-label-icon",Windows:"playkit-Windows",windows:"playkit-Windows","cvaa-overlay":"playkit-cvaa-overlay",cvaaOverlay:"playkit-cvaa-overlay",sample:"playkit-sample",custom:"playkit-custom","black-bg":"playkit-black-bg",blackBg:"playkit-black-bg","yellow-text":"playkit-yellow-text",yellowText:"playkit-yellow-text","active-tick":"playkit-active-tick",activeTick:"playkit-active-tick","button-save-cvaa":"playkit-button-save-cvaa",buttonSaveCvaa:"playkit-button-save-cvaa","custom-captions-applied":"playkit-custom-captions-applied",customCaptionsApplied:"playkit-custom-captions-applied","custom-caption-form":"playkit-custom-caption-form",customCaptionForm:"playkit-custom-caption-form",slider:"playkit-slider","preview-container":"playkit-preview-container",previewContainer:"playkit-preview-container","font-size":"playkit-font-size",fontSize:"playkit-font-size","font-color":"playkit-font-color",fontColor:"playkit-font-color","font-family":"playkit-font-family",fontFamily:"playkit-font-family","font-style":"playkit-font-style",fontStyle:"playkit-font-style","font-opacity":"playkit-font-opacity",fontOpacity:"playkit-font-opacity","background-color":"playkit-background-color",backgroundColor:"playkit-background-color","background-opacity":"playkit-background-opacity",backgroundOpacity:"playkit-background-opacity","loading-backdrop":"playkit-loading-backdrop",loadingBackdrop:"playkit-loading-backdrop",show:"playkit-show","spinner-container":"playkit-spinner-container",spinnerContainer:"playkit-spinner-container","control-play-pause":"playkit-control-play-pause",controlPlayPause:"playkit-control-play-pause","is-playing":"playkit-is-playing",isPlaying:"playkit-is-playing","control-volume":"playkit-control-volume",controlVolume:"playkit-control-volume","volume-control":"playkit-volume-control",volumeControl:"playkit-volume-control","volume-control-bar":"playkit-volume-control-bar",volumeControlBar:"playkit-volume-control-bar","is-muted":"playkit-is-muted",isMuted:"playkit-is-muted","dragging-active":"playkit-dragging-active",draggingActive:"playkit-dragging-active",bar:"playkit-bar",progress:"playkit-progress","smart-container-open":"playkit-smart-container-open",smartContainerOpen:"playkit-smart-container-open","control-volume-bar":"playkit-control-volume-bar",controlVolumeBar:"playkit-control-volume-bar","size-ty":"playkit-size-ty",sizeTy:"playkit-size-ty","control-fullscreen":"playkit-control-fullscreen",controlFullscreen:"playkit-control-fullscreen","is-fullscreen":"playkit-is-fullscreen",isFullscreen:"playkit-is-fullscreen","seek-bar":"playkit-seek-bar",seekBar:"playkit-seek-bar","time-preview":"playkit-time-preview",timePreview:"playkit-time-preview","frame-preview":"playkit-frame-preview",framePreview:"playkit-frame-preview","hide-frame-preview":"playkit-hide-frame-preview",hideFramePreview:"playkit-hide-frame-preview","progress-bar":"playkit-progress-bar",progressBar:"playkit-progress-bar",scrubber:"playkit-scrubber","virtual-progress":"playkit-virtual-progress",virtualProgress:"playkit-virtual-progress",live:"playkit-live",buffered:"playkit-buffered","virtual-progress-indicator":"playkit-virtual-progress-indicator",virtualProgressIndicator:"playkit-virtual-progress-indicator","non-sticky":"playkit-non-sticky",nonSticky:"playkit-non-sticky","frame-preview-img-container":"playkit-frame-preview-img-container",framePreviewImgContainer:"playkit-frame-preview-img-container","frame-preview-img":"playkit-frame-preview-img",framePreviewImg:"playkit-frame-preview-img","time-display":"playkit-time-display",timeDisplay:"playkit-time-display","video-playing-title":"playkit-video-playing-title",videoPlayingTitle:"playkit-video-playing-title","bottom-bar":"playkit-bottom-bar",bottomBar:"playkit-bottom-bar",hide:"playkit-hide","left-controls":"playkit-left-controls",leftControls:"playkit-left-controls","bottom-bar-area":"playkit-bottom-bar-area",bottomBarArea:"playkit-bottom-bar-area","right-controls":"playkit-right-controls",rightControls:"playkit-right-controls","line-break":"playkit-line-break",lineBreak:"playkit-line-break","top-bar":"playkit-top-bar",topBar:"playkit-top-bar","top-bar-area":"playkit-top-bar-area",topBarArea:"playkit-top-bar-area",disabled:"playkit-disabled","overlay-action":"playkit-overlay-action",overlayAction:"playkit-overlay-action",in:"playkit-in",overlayActionIconIn:"playkit-overlayActionIconIn","pre-playback-play-overlay":"playkit-pre-playback-play-overlay",prePlaybackPlayOverlay:"playkit-pre-playback-play-overlay","pre-playback-play-button":"playkit-pre-playback-play-button",prePlaybackPlayButton:"playkit-pre-playback-play-button","btn-skip-ad":"playkit-btn-skip-ad",btnSkipAd:"playkit-btn-skip-ad","skip-ad":"playkit-skip-ad",skipAd:"playkit-skip-ad","live-tag":"playkit-live-tag",liveTag:"playkit-live-tag","non-live-playhead":"playkit-non-live-playhead",nonLivePlayhead:"playkit-non-live-playhead","interactive-area":"playkit-interactive-area",interactiveArea:"playkit-interactive-area","unmute-button-container":"playkit-unmute-button-container",unmuteButtonContainer:"playkit-unmute-button-container","show-icon-only":"playkit-show-icon-only",showIconOnly:"playkit-show-icon-only","unmute-button":"playkit-unmute-button",unmuteButton:"playkit-unmute-button","has-top-bar":"playkit-has-top-bar",hasTopBar:"playkit-has-top-bar","unmute-icon-container":"playkit-unmute-icon-container",unmuteIconContainer:"playkit-unmute-icon-container","error-overlay":"playkit-error-overlay",errorOverlay:"playkit-error-overlay","copy-url-row":"playkit-copy-url-row",copyUrlRow:"playkit-copy-url-row","svg-container":"playkit-svg-container",svgContainer:"playkit-svg-container",headline:"playkit-headline","error-session":"playkit-error-session",errorSession:"playkit-error-session","retry-btn":"playkit-retry-btn",retryBtn:"playkit-retry-btn","error-text":"playkit-error-text",errorText:"playkit-error-text","link-options-container":"playkit-link-options-container",linkOptionsContainer:"playkit-link-options-container","input-copy-url":"playkit-input-copy-url",inputCopyUrl:"playkit-input-copy-url","btn-copy-url":"playkit-btn-copy-url",btnCopyUrl:"playkit-btn-copy-url",handle:"playkit-handle","learn-more":"playkit-learn-more",learnMore:"playkit-learn-more",watermark:"playkit-watermark","hide-watermark":"playkit-hide-watermark",hideWatermark:"playkit-hide-watermark","control-vr-stereo":"playkit-control-vr-stereo",controlVrStereo:"playkit-control-vr-stereo","vr-stereo-mode":"playkit-vr-stereo-mode",vrStereoMode:"playkit-vr-stereo-mode","control-closed-captions":"playkit-control-closed-captions",controlClosedCaptions:"playkit-control-closed-captions","cc-on":"playkit-cc-on",ccOn:"playkit-cc-on","cast-button":"playkit-cast-button",castButton:"playkit-cast-button","cast-button-active":"playkit-cast-button-active",castButtonActive:"playkit-cast-button-active","cast-overlay":"playkit-cast-overlay",castOverlay:"playkit-cast-overlay","cast-poster":"playkit-cast-poster",castPoster:"playkit-cast-poster","has-poster":"playkit-has-poster",hasPoster:"playkit-has-poster","cast-black-cover":"playkit-cast-black-cover",castBlackCover:"playkit-cast-black-cover","cast-box":"playkit-cast-box",castBox:"playkit-cast-box","cast-icon":"playkit-cast-icon",castIcon:"playkit-cast-icon","cast-connecting-spinner":"playkit-cast-connecting-spinner",castConnectingSpinner:"playkit-cast-connecting-spinner","cast-text":"playkit-cast-text",castText:"playkit-cast-text","cast-status":"playkit-cast-status",castStatus:"playkit-cast-status","cast-device":"playkit-cast-device",castDevice:"playkit-cast-device","cast-on-tv-button-container":"playkit-cast-on-tv-button-container",castOnTvButtonContainer:"playkit-cast-on-tv-button-container","show-cast-on-tv":"playkit-show-cast-on-tv",showCastOnTv:"playkit-show-cast-on-tv",castOnTVAnimation:"playkit-castOnTVAnimation",castOnTvAnimation:"playkit-castOnTVAnimation","cast-on-tv-button":"playkit-cast-on-tv-button",castOnTvButton:"playkit-cast-on-tv-button","cast-on-tv-icon-container":"playkit-cast-on-tv-icon-container",castOnTvIconContainer:"playkit-cast-on-tv-icon-container","control-playlist-button":"playkit-control-playlist-button",controlPlaylistButton:"playkit-control-playlist-button","poster-preview":"playkit-poster-preview",posterPreview:"playkit-poster-preview","poster-preview-img":"playkit-poster-preview-img",posterPreviewImg:"playkit-poster-preview-img","poster-preview-text":"playkit-poster-preview-text",posterPreviewText:"playkit-poster-preview-text","poster-preview-text-title":"playkit-poster-preview-text-title",posterPreviewTextTitle:"playkit-poster-preview-text-title","poster-preview-text-name":"playkit-poster-preview-text-name",posterPreviewTextName:"playkit-poster-preview-text-name","is-in-picture-in-picture":"playkit-is-in-picture-in-picture",isInPictureInPicture:"playkit-is-in-picture-in-picture","playback-controls":"playkit-playback-controls",playbackControls:"playkit-playback-controls","center-playback-controls":"playkit-center-playback-controls",centerPlaybackControls:"playkit-center-playback-controls","gui-area":"playkit-gui-area",guiArea:"playkit-gui-area","playlist-countdown":"playkit-playlist-countdown",playlistCountdown:"playkit-playlist-countdown",slideIn:"playkit-slideIn",hidden:"playkit-hidden","playlist-countdown-content-placeholder":"playkit-playlist-countdown-content-placeholder",playlistCountdownContentPlaceholder:"playkit-playlist-countdown-content-placeholder","playlist-countdown-content-background":"playkit-playlist-countdown-content-background",playlistCountdownContentBackground:"playkit-playlist-countdown-content-background","playlist-countdown-content":"playkit-playlist-countdown-content",playlistCountdownContent:"playkit-playlist-countdown-content",canceled:"playkit-canceled","playlist-countdown-poster":"playkit-playlist-countdown-poster",playlistCountdownPoster:"playkit-playlist-countdown-poster","playlist-countdown-text":"playkit-playlist-countdown-text",playlistCountdownText:"playkit-playlist-countdown-text","playlist-countdown-text-title":"playkit-playlist-countdown-text-title",playlistCountdownTextTitle:"playkit-playlist-countdown-text-title","playlist-countdown-time-left":"playkit-playlist-countdown-time-left",playlistCountdownTimeLeft:"playkit-playlist-countdown-time-left","playlist-countdown-text-name":"playkit-playlist-countdown-text-name",playlistCountdownTextName:"playkit-playlist-countdown-text-name","playlist-countdown-cancel":"playkit-playlist-countdown-cancel",playlistCountdownCancel:"playkit-playlist-countdown-cancel","playlist-next-screen-overlay":"playkit-playlist-next-screen-overlay",playlistNextScreenOverlay:"playkit-playlist-next-screen-overlay","playlist-next-screen-content":"playkit-playlist-next-screen-content",playlistNextScreenContent:"playkit-playlist-next-screen-content","playlist-next-screen-text":"playkit-playlist-next-screen-text",playlistNextScreenText:"playkit-playlist-next-screen-text","playlist-next-screen-text-title":"playkit-playlist-next-screen-text-title",playlistNextScreenTextTitle:"playkit-playlist-next-screen-text-title","playlist-next-screen-text-name":"playkit-playlist-next-screen-text-name",playlistNextScreenTextName:"playkit-playlist-next-screen-text-name","playlist-next-screen-poster-placeholder":"playkit-playlist-next-screen-poster-placeholder",playlistNextScreenPosterPlaceholder:"playkit-playlist-next-screen-poster-placeholder","playlist-next-screen-poster-aspect-ratio":"playkit-playlist-next-screen-poster-aspect-ratio",playlistNextScreenPosterAspectRatio:"playkit-playlist-next-screen-poster-aspect-ratio","playlist-next-screen-poster":"playkit-playlist-next-screen-poster",playlistNextScreenPoster:"playkit-playlist-next-screen-poster","playlist-next-screen-poster-img":"playkit-playlist-next-screen-poster-img",playlistNextScreenPosterImg:"playkit-playlist-next-screen-poster-img","size-lg":"playkit-size-lg",sizeLg:"playkit-size-lg","picture-in-picture-overlay":"playkit-picture-in-picture-overlay",pictureInPictureOverlay:"playkit-picture-in-picture-overlay","picture-in-picture-poster":"playkit-picture-in-picture-poster",pictureInPicturePoster:"playkit-picture-in-picture-poster","dark-layer":"playkit-dark-layer",darkLayer:"playkit-dark-layer","picture-in-picture-control":"playkit-picture-in-picture-control",pictureInPictureControl:"playkit-picture-in-picture-control","picture-in-picture-text":"playkit-picture-in-picture-text",pictureInPictureText:"playkit-picture-in-picture-text","picture-in-picture-button":"playkit-picture-in-picture-button",pictureInPictureButton:"playkit-picture-in-picture-button","icon-copy":"playkit-icon-copy",iconCopy:"playkit-icon-copy",copied:"playkit-copied",IE:"playkit-IE",ie:"playkit-IE",tooltip:"playkit-tooltip","tooltip-label":"playkit-tooltip-label",tooltipLabel:"playkit-tooltip-label","tooltip-top":"playkit-tooltip-top",tooltipTop:"playkit-tooltip-top","tooltip-top-left":"playkit-tooltip-top-left",tooltipTopLeft:"playkit-tooltip-top-left","tooltip-top-right":"playkit-tooltip-top-right",tooltipTopRight:"playkit-tooltip-top-right","tooltip-bottom":"playkit-tooltip-bottom",tooltipBottom:"playkit-tooltip-bottom","tooltip-bottom-right":"playkit-tooltip-bottom-right",tooltipBottomRight:"playkit-tooltip-bottom-right","tooltip-bottom-left":"playkit-tooltip-bottom-left",tooltipBottomLeft:"playkit-tooltip-bottom-left","tooltip-left":"playkit-tooltip-left",tooltipLeft:"playkit-tooltip-left","tooltip-right":"playkit-tooltip-right",tooltipRight:"playkit-tooltip-right","side-panel":"playkit-side-panel",sidePanel:"playkit-side-panel","vertical-side-panel":"playkit-vertical-side-panel",verticalSidePanel:"playkit-vertical-side-panel","horizontal-side-panel":"playkit-horizontal-side-panel",horizontalSidePanel:"playkit-horizontal-side-panel","side-panel-content":"playkit-side-panel-content",sidePanelContent:"playkit-side-panel-content","video-area":"playkit-video-area",videoArea:"playkit-video-area",spinner:"playkit-spinner","kaltura-spinner":"playkit-kaltura-spinner",kalturaSpinner:"playkit-kaltura-spinner",switch:"playkit-switch","toggle-input":"playkit-toggle-input",toggleInput:"playkit-toggle-input"},e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(n=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"Event",(function(){return T})),n.d(t,"EventType",(function(){return ff})),n.d(t,"h",(function(){return N})),n.d(t,"createPortal",(function(){return Xe})),n.d(t,"preact",(function(){return r})),n.d(t,"redux",(function(){return a})),n.d(t,"preacti18n",(function(){return o})),n.d(t,"preactHooks",(function(){return i})),n.d(t,"style",(function(){return pr.a})),n.d(t,"Reducers",(function(){return k})),n.d(t,"Presets",(function(){return E})),n.d(t,"Components",(function(){return _})),n.d(t,"Utils",(function(){return m})),n.d(t,"reducers",(function(){return k})),n.d(t,"presets",(function(){return E})),n.d(t,"components",(function(){return _})),n.d(t,"utils",(function(){return m})),n.d(t,"UIManager",(function(){return df})),n.d(t,"VERSION",(function(){return hf})),n.d(t,"NAME",(function(){return gf})),n.d(t,"SidePanelPositions",(function(){return Jn})),n.d(t,"SidePanelModes",(function(){return er})),n.d(t,"ReservedPresetNames",(function(){return tr})),n.d(t,"ReservedPresetAreas",(function(){return nr}));var r={};n.r(r),n.d(r,"render",(function(){return ne})),n.d(r,"hydrate",(function(){return re})),n.d(r,"createElement",(function(){return N})),n.d(r,"h",(function(){return N})),n.d(r,"Fragment",(function(){return j})),n.d(r,"createRef",(function(){return F})),n.d(r,"isValidElement",(function(){return w})),n.d(r,"Component",(function(){return B})),n.d(r,"cloneElement",(function(){return ie})),n.d(r,"createContext",(function(){return ae})),n.d(r,"toChildArray",(function(){return W})),n.d(r,"__u",(function(){return ee})),n.d(r,"options",(function(){return A}));var i={};n.r(i),n.d(i,"useState",(function(){return ye})),n.d(i,"useReducer",(function(){return ve})),n.d(i,"useEffect",(function(){return me})),n.d(i,"useLayoutEffect",(function(){return be})),n.d(i,"useRef",(function(){return _e})),n.d(i,"useImperativeHandle",(function(){return Ee})),n.d(i,"useMemo",(function(){return ke})),n.d(i,"useCallback",(function(){return Te})),n.d(i,"useContext",(function(){return Ae})),n.d(i,"useDebugValue",(function(){return we})),n.d(i,"useErrorBoundary",(function(){return Se}));var a={};n.r(a),n.d(a,"Provider",(function(){return ut})),n.d(a,"connectAdvanced",(function(){return Tt})),n.d(a,"ReactReduxContext",(function(){return at})),n.d(a,"connect",(function(){return $t})),n.d(a,"batch",(function(){return rt})),n.d(a,"useDispatch",(function(){return tn})),n.d(a,"createDispatchHook",(function(){return en})),n.d(a,"useSelector",(function(){return an})),n.d(a,"createSelectorHook",(function(){return rn})),n.d(a,"useStore",(function(){return Jt})),n.d(a,"createStoreHook",(function(){return Zt})),n.d(a,"shallowEqual",(function(){return wt}));var o={};n.r(o),n.d(o,"default",(function(){return wn})),n.d(o,"IntlProvider",(function(){return pn})),n.d(o,"Localizer",(function(){return En})),n.d(o,"MarkupText",(function(){return kn})),n.d(o,"Text",(function(){return bn})),n.d(o,"intl",(function(){return dn})),n.d(o,"withText",(function(){return An}));var s={};n.r(s),n.d(s,"types",(function(){return Qn})),n.d(s,"SidePanelOrientation",(function(){return Zn})),n.d(s,"SidePanelPositions",(function(){return Jn})),n.d(s,"SidePanelModes",(function(){return er})),n.d(s,"ReservedPresetNames",(function(){return tr})),n.d(s,"ReservedPresetAreas",(function(){return nr})),n.d(s,"initialState",(function(){return ar})),n.d(s,"default",(function(){return or})),n.d(s,"actions",(function(){return sr}));var l={};n.r(l),n.d(l,"types",(function(){return gr})),n.d(l,"initialState",(function(){return yr})),n.d(l,"default",(function(){return vr})),n.d(l,"actions",(function(){return mr}));var u={};n.r(u),n.d(u,"types",(function(){return _r})),n.d(u,"initialState",(function(){return Er})),n.d(u,"default",(function(){return kr})),n.d(u,"actions",(function(){return Tr}));var c={};n.r(c),n.d(c,"types",(function(){return Fi})),n.d(c,"initialState",(function(){return ji})),n.d(c,"default",(function(){return Bi})),n.d(c,"actions",(function(){return Vi}));var p={};n.r(p),n.d(p,"types",(function(){return Ki})),n.d(p,"initialState",(function(){return Gi})),n.d(p,"default",(function(){return zi})),n.d(p,"actions",(function(){return Wi}));var d={};n.r(d),n.d(d,"types",(function(){return qi})),n.d(d,"initialState",(function(){return Xi})),n.d(d,"default",(function(){return $i})),n.d(d,"actions",(function(){return Qi}));var f={};n.r(f),n.d(f,"types",(function(){return Ji})),n.d(f,"initialState",(function(){return ea})),n.d(f,"default",(function(){return ta})),n.d(f,"actions",(function(){return na}));var h={};n.r(h),n.d(h,"types",(function(){return ia})),n.d(h,"initialState",(function(){return aa})),n.d(h,"default",(function(){return oa})),n.d(h,"actions",(function(){return sa}));var g={};n.r(g),n.d(g,"types",(function(){return ua})),n.d(g,"initialState",(function(){return ca})),n.d(g,"default",(function(){return pa})),n.d(g,"actions",(function(){return da}));var y={};n.r(y),n.d(y,"types",(function(){return ha})),n.d(y,"initialState",(function(){return ga})),n.d(y,"default",(function(){return ya})),n.d(y,"actions",(function(){return va}));var v={};n.r(v),n.d(v,"types",(function(){return ka})),n.d(v,"initialState",(function(){return Ta})),n.d(v,"default",(function(){return Aa})),n.d(v,"actions",(function(){return wa}));var m={};n.r(m),n.d(m,"bindActions",(function(){return ur})),n.d(m,"KeyMap",(function(){return Ln})),n.d(m,"getLogger",(function(){return Dn})),n.d(m,"withKeyboardA11y",(function(){return Va})),n.d(m,"toHHMMSS",(function(){return Ha})),n.d(m,"toSecondsFromHHMMSS",(function(){return Ka})),n.d(m,"formatOnlyNumbersInput",(function(){return Ga}));var b={};n.r(b),n.d(b,"isPlayingAdOrPlayback",(function(){return ko}));var _={};n.r(_),n.d(_,"AdLearnMore",(function(){return Nl})),n.d(_,"AdSkip",(function(){return jl})),n.d(_,"AdNotice",(function(){return Bl})),n.d(_,"BaseComponent",(function(){return Zl})),n.d(_,"BottomBar",(function(){return tu})),n.d(_,"CVAAOverlay",(function(){return Mu})),n.d(_,"DropDown",(function(){return yu})),n.d(_,"EngineConnector",(function(){return Ra})),n.d(_,"ErrorOverlay",(function(){return Ju})),n.d(_,"EventDispatcherProvider",(function(){return Jr})),n.d(_,"withEventDispatcher",(function(){return fi})),n.d(_,"Keyboard",(function(){return Ss})),n.d(_,"withKeyboardEvent",(function(){return Fs})),n.d(_,"KeyboardEventProvider",(function(){return Ps})),n.d(_,"Icon",(function(){return _o})),n.d(_,"IconType",(function(){return vo})),n.d(_,"IconState",(function(){return bo})),n.d(_,"BadgeType",(function(){return mo})),n.d(_,"LiveTag",(function(){return nc})),n.d(_,"Loading",(function(){return no})),n.d(_,"Menu",(function(){return pu})),n.d(_,"Overlay",(function(){return ju})),n.d(_,"OverlayAction",(function(){return Io})),n.d(_,"OverlayPortal",(function(){return sc})),n.d(_,"PlayerProvider",(function(){return Ar})),n.d(_,"withPlayer",(function(){return Sr})),n.d(_,"PrePlaybackPlayOverlay",(function(){return Ko})),n.d(_,"SeekBarLivePlaybackContainer",(function(){return cc})),n.d(_,"SeekBarPlaybackContainer",(function(){return Od})),n.d(_,"withLogger",(function(){return jn})),n.d(_,"Shell",(function(){return ki})),n.d(_,"PLAYER_SIZE",(function(){return Ei})),n.d(_,"Slider",(function(){return _u})),n.d(_,"SmartContainer",(function(){return fc})),n.d(_,"SmartContainerItem",(function(){return hc})),n.d(_,"TimeDisplay",(function(){return yc})),n.d(_,"TimeDisplayAdsContainer",(function(){return bc})),n.d(_,"TimeDisplayPlaybackContainer",(function(){return kc})),n.d(_,"Tooltip",(function(){return Oo})),n.d(_,"ToolTipType",(function(){return Ro})),n.d(_,"TopBar",(function(){return Sc})),n.d(_,"UnmuteIndication",(function(){return Rc})),n.d(_,"VideoPlayer",(function(){return Ma})),n.d(_,"Watermark",(function(){return Nc})),n.d(_,"Logo",(function(){return Bc})),n.d(_,"CastOverlay",(function(){return Wc})),n.d(_,"CastBeforePlay",(function(){return ep})),n.d(_,"CastAfterPlay",(function(){return ip})),n.d(_,"PlaylistButton",(function(){return dp})),n.d(_,"PrevNext",(function(){return op})),n.d(_,"PlaylistNextScreen",(function(){return Ep})),n.d(_,"PictureInPicture",(function(){return wp})),n.d(_,"PlaybackControls",(function(){return Sp})),n.d(_,"CopyButton",(function(){return Wu})),n.d(_,"ButtonControl",(function(){return ts})),n.d(_,"Button",(function(){return Bo})),n.d(_,"ToggleSwitch",(function(){return Op})),n.d(_,"AudioMenu",(function(){return Bp})),n.d(_,"CaptionsMenu",(function(){return Xp})),n.d(_,"SpeedMenu",(function(){return nd})),n.d(_,"QualityMenu",(function(){return sd})),n.d(_,"HeightResolution",(function(){return rd})),n.d(_,"getLabelBadgeType",(function(){return id})),n.d(_,"AdvancedAudioDescToggle",(function(){return pd})),n.d(_,"PlayerArea",(function(){return qn})),n.d(_,"withPlayerPreset",(function(){return Ni})),n.d(_,"Remove",(function(){return Hn})),n.d(_,"VideoArea",(function(){return bd})),n.d(_,"GuiArea",(function(){return oo})),n.d(_,"InteractiveArea",(function(){return _d})),n.d(_,"KeyboardControl",(function(){return Ss})),n.d(_,"Cast",(function(){return qs})),n.d(_,"CastControl",(function(){return qs})),n.d(_,"Fullscreen",(function(){return rl})),n.d(_,"FullscreenControl",(function(){return rl})),n.d(_,"PlayPause",(function(){return ll})),n.d(_,"PlayPauseControl",(function(){return ll})),n.d(_,"Rewind",(function(){return ps})),n.d(_,"RewindControl",(function(){return ps})),n.d(_,"Forward",(function(){return ms})),n.d(_,"ForwardControl",(function(){return ms})),n.d(_,"SeekBar",(function(){return Id})),n.d(_,"SeekBarControl",(function(){return Id})),n.d(_,"Settings",(function(){return ml})),n.d(_,"SettingsControl",(function(){return ml})),n.d(_,"Volume",(function(){return Sl})),n.d(_,"VolumeControl",(function(){return Sl})),n.d(_,"VrStereo",(function(){return Pl})),n.d(_,"VrStereoControl",(function(){return Pl})),n.d(_,"ClosedCaptions",(function(){return Rl})),n.d(_,"ClosedCaptionsControl",(function(){return Rl}));var E={};n.r(E),n.d(E,"idleUI",(function(){return lo})),n.d(E,"playbackUI",(function(){return Gd})),n.d(E,"adsUI",(function(){return qd})),n.d(E,"errorUI",(function(){return $d})),n.d(E,"liveUI",(function(){return Jd})),n.d(E,"imgUI",(function(){return nf}));var k={};n.r(k),n.d(k,"config",(function(){return l})),n.d(k,"cvaa",(function(){return f})),n.d(k,"engine",(function(){return u})),n.d(k,"getters",(function(){return b})),n.d(k,"loading",(function(){return d})),n.d(k,"overlayAction",(function(){return g})),n.d(k,"playlist",(function(){return y})),n.d(k,"seekbar",(function(){return c})),n.d(k,"setting",(function(){return h})),n.d(k,"shell",(function(){return s})),n.d(k,"volume",(function(){return p})),n.d(k,"overlay",(function(){return v}));var T={};n.r(T),n.d(T,"withEventManager",(function(){return Br})),n.d(T,"EventType",(function(){return On}));var A,w,S,C,x,I,P,D={},R=[],O=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function L(e,t){for(var n in t)e[n]=t[n];return e}function M(e){var t=e.parentNode;t&&t.removeChild(e)}function N(e,t,n){var r,i=arguments,a={};for(r in t)"key"!==r&&"ref"!==r&&(a[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(a.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===a[r]&&(a[r]=e.defaultProps[r]);return U(e,a,t&&t.key,t&&t.ref,null)}function U(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(a.__v=a),A.vnode&&A.vnode(a),a}function F(){return{current:null}}function j(e){return e.children}function B(e,t){this.props=e,this.context=t}function V(e,t){if(null==t)return e.__?V(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?V(e):null}function H(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return H(e)}}function K(e){(!e.__d&&(e.__d=!0)&&S.push(e)&&!G.__r++||x!==A.debounceRendering)&&((x=A.debounceRendering)||C)(G)}function G(){for(var e;G.__r=S.length;)e=S.sort((function(e,t){return e.__v.__b-t.__v.__b})),S=[],e.some((function(e){var t,n,r,i,a,o,s;e.__d&&(o=(a=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=L({},a)).__v=r,i=Q(s,a,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==o?V(a):o),Z(n,a),i!=o&&H(a)))}))}function z(e,t,n,r,i,a,o,s,l,u){var c,p,d,f,h,g,y,v=r&&r.__k||R,m=v.length;for(l==D&&(l=null!=o?o[0]:m?V(r,0):null),n.__k=[],c=0;c<t.length;c++)if(null!=(f=n.__k[c]=null==(f=t[c])||"boolean"==typeof f?null:"string"==typeof f||"number"==typeof f?U(null,f,null,null,f):Array.isArray(f)?U(j,{children:f},null,null,null):null!=f.__e||null!=f.__c?U(f.type,f.props,f.key,null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(d=v[c])||d&&f.key==d.key&&f.type===d.type)v[c]=void 0;else for(p=0;p<m;p++){if((d=v[p])&&f.key==d.key&&f.type===d.type){v[p]=void 0;break}d=null}h=Q(e,f,d=d||D,i,a,o,s,l,u),(p=f.ref)&&d.ref!=p&&(y||(y=[]),d.ref&&y.push(d.ref,null,f),y.push(p,f.__c||h,f)),null!=h?(null==g&&(g=h),l=Y(e,f,d,v,o,h,l),"option"==n.type?e.value="":"function"==typeof n.type&&(n.__d=l)):l&&d.__e==l&&l.parentNode!=e&&(l=V(d))}if(n.__e=g,null!=o&&"function"!=typeof n.type)for(c=o.length;c--;)null!=o[c]&&M(o[c]);for(c=m;c--;)null!=v[c]&&ee(v[c],v[c]);if(y)for(c=0;c<y.length;c++)J(y[c],y[++c],y[++c])}function W(e){return null==e||"boolean"==typeof e?[]:Array.isArray(e)?R.concat.apply([],e.map(W)):[e]}function Y(e,t,n,r,i,a,o){var s,l,u;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(i==n||a!=o||null==a.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(a),s=null;else{for(l=o,u=0;(l=l.nextSibling)&&u<r.length;u+=2)if(l==a)break e;e.insertBefore(a,o),s=o}return void 0!==s?s:a.nextSibling}function q(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===O.test(t)?n+"px":null==n?"":n}function X(e,t,n,r,i){var a,o,s,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(a=e.style,"string"==typeof n)a.cssText=n;else{if("string"==typeof r&&(a.cssText="",r=null),r)for(l in r)n&&l in n||q(a,l,"");if(n)for(u in n)r&&n[u]===r[u]||q(a,u,n[u])}else"o"===t[0]&&"n"===t[1]?(o=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,$,o),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,$,o)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function $(e){this.l[e.type](A.event?A.event(e):e)}function Q(e,t,n,r,i,a,o,s,l){var u,c,p,d,f,h,g,y,v,m,b,_=t.type;if(void 0!==t.constructor)return null;(u=A.__b)&&u(t);try{e:if("function"==typeof _){if(y=t.props,v=(u=_.contextType)&&r[u.__c],m=u?v?v.props.value:u.__:r,n.__c?g=(c=t.__c=n.__c).__=c.__E:("prototype"in _&&_.prototype.render?t.__c=c=new _(y,m):(t.__c=c=new B(y,m),c.constructor=_,c.render=te),v&&v.sub(c),c.props=y,c.state||(c.state={}),c.context=m,c.__n=r,p=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=_.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=L({},c.__s)),L(c.__s,_.getDerivedStateFromProps(y,c.__s))),d=c.props,f=c.state,p)null==_.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==_.getDerivedStateFromProps&&y!==d&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(y,m),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(y,c.__s,m)||t.__v===n.__v){c.props=y,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,c.__h.length&&o.push(c),function e(t,n,r){var i,a;for(i=0;i<t.__k.length;i++)(a=t.__k[i])&&(a.__=t,a.__e&&("function"==typeof a.type&&a.__k.length>1&&e(a,n,r),n=Y(r,a,a,t.__k,null,a.__e,n),"function"==typeof t.type&&(t.__d=n)))}(t,s,e);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(y,c.__s,m),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(d,f,h)}))}c.context=m,c.props=y,c.state=c.__s,(u=A.__r)&&u(t),c.__d=!1,c.__v=t,c.__P=e,u=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=L(L({},r),c.getChildContext())),p||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(d,f)),b=null!=u&&u.type==j&&null==u.key?u.props.children:u,z(e,Array.isArray(b)?b:[b],t,n,r,i,a,o,s,l),c.base=t.__e,c.__h.length&&o.push(c),g&&(c.__E=c.__=null),c.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,a,o,s){var l,u,c,p,d,f=n.props,h=t.props;if(i="svg"===t.type||i,null!=a)for(l=0;l<a.length;l++)if(null!=(u=a[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,a[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,h.is&&{is:h.is}),a=null,s=!1}if(null===t.type)f!==h&&e.data!=h&&(e.data=h);else{if(null!=a&&(a=R.slice.call(e.childNodes)),c=(f=n.props||D).dangerouslySetInnerHTML,p=h.dangerouslySetInnerHTML,!s){if(null!=a)for(f={},d=0;d<e.attributes.length;d++)f[e.attributes[d].name]=e.attributes[d].value;(p||c)&&(p&&c&&p.__html==c.__html||(e.innerHTML=p&&p.__html||""))}(function(e,t,n,r,i){var a;for(a in n)"children"===a||"key"===a||a in t||X(e,a,null,n[a],r);for(a in t)i&&"function"!=typeof t[a]||"children"===a||"key"===a||"value"===a||"checked"===a||n[a]===t[a]||X(e,a,t[a],n[a],r)})(e,h,f,i,s),p?t.__k=[]:(l=t.props.children,z(e,Array.isArray(l)?l:[l],t,n,r,"foreignObject"!==t.type&&i,a,o,D,s)),s||("value"in h&&void 0!==(l=h.value)&&l!==e.value&&X(e,"value",l,f.value,!1),"checked"in h&&void 0!==(l=h.checked)&&l!==e.checked&&X(e,"checked",l,f.checked,!1))}return e}(n.__e,t,n,r,i,a,o,l);(u=A.diffed)&&u(t)}catch(e){t.__v=null,A.__e(e,t,n)}return t.__e}function Z(e,t){A.__c&&A.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){A.__e(e,t.__v)}}))}function J(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){A.__e(e,n)}}function ee(e,t,n){var r,i,a;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||J(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){A.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&ee(r[a],t,n);null!=i&&M(i)}function te(e,t,n){return this.constructor(e,n)}function ne(e,t,n){var r,i,a;A.__&&A.__(e,t),i=(r=n===I)?null:n&&n.__k||t.__k,e=N(j,null,[e]),a=[],Q(t,(r?t:n||t).__k=e,i||D,D,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:t.childNodes.length?R.slice.call(t.childNodes):null,a,n||D,r),Z(a,e)}function re(e,t){ne(e,t,I)}function ie(e,t){var n,r;for(r in t=L(L({},e.props),t),arguments.length>2&&(t.children=R.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return U(e.type,n,t.key||e.key,t.ref||e.ref,null)}function ae(e){var t={},n={__c:"__cC"+P++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,K(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}A={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return K(n.__E=n)}catch(t){e=t}throw e}},w=function(e){return null!=e&&void 0===e.constructor},B.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=L({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&L(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),K(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),K(this))},B.prototype.render=j,S=[],C="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,G.__r=0,I=D,P=0;var oe,se,le,ue=0,ce=[],pe=A.__r,de=A.diffed,fe=A.__c,he=A.unmount;function ge(e,t){A.__h&&A.__h(se,e,ue||t),ue=0;var n=se.__H||(se.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ye(e){return ue=1,ve(Re,e)}function ve(e,t,n){var r=ge(oe++,2);return r.t=e,r.__c||(r.__c=se,r.__=[n?n(t):Re(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}]),r.__}function me(e,t){var n=ge(oe++,3);!A.__s&&De(n.__H,t)&&(n.__=e,n.__H=t,se.__H.__h.push(n))}function be(e,t){var n=ge(oe++,4);!A.__s&&De(n.__H,t)&&(n.__=e,n.__H=t,se.__h.push(n))}function _e(e){return ue=5,ke((function(){return{current:e}}),[])}function Ee(e,t,n){ue=6,be((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function ke(e,t){var n=ge(oe++,7);return De(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function Te(e,t){return ue=8,ke((function(){return e}),t)}function Ae(e){var t=se.context[e.__c],n=ge(oe++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(se)),t.props.value):e.__}function we(e,t){A.useDebugValue&&A.useDebugValue(t?t(e):e)}function Se(e){var t=ge(oe++,10),n=ye();return t.__=e,se.componentDidCatch||(se.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Ce(){ce.some((function(e){if(e.__P)try{e.__H.__h.forEach(Ie),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(t){return e.__H.__h=[],A.__e(t,e.__v),!0}})),ce=[]}A.__r=function(e){pe&&pe(e),oe=0;var t=(se=e.__c).__H;t&&(t.__h.forEach(Ie),t.__h.forEach(Pe),t.__h=[])},A.diffed=function(e){de&&de(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==ce.push(t)&&le===A.requestAnimationFrame||((le=A.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),xe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);xe&&(t=requestAnimationFrame(n))})(Ce))},A.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ie),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],A.__e(n,e.__v)}})),fe&&fe(e,t)},A.unmount=function(e){he&&he(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Ie)}catch(e){A.__e(e,t.__v)}};var xe="function"==typeof requestAnimationFrame;function Ie(e){"function"==typeof e.u&&e.u()}function Pe(e){e.u=e.__()}function De(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function Re(e,t){return"function"==typeof t?t(e):t}function Oe(e,t){for(var n in t)e[n]=t[n];return e}function Le(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}var Me=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return Le(this.props,e)||Le(this.state,t)},r}(B),Ne=A.__b;A.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ne&&Ne(e)};var Ue="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fe(e){function t(t,n){var r=Oe({},t);return delete r.ref,e(r,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=Ue,t.render=t,t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var je=function(e,t){return e?W(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},Be={map:je,forEach:je,count:function(e){return e?W(e).length:0},only:function(e){if(1!==(e=W(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:W},Ve=A.__e;function He(e){return e&&((e=Oe({},e)).__c=null,e.__k=e.__k&&e.__k.map(He)),e}function Ke(){this.__u=0,this.o=null,this.__b=null}function Ge(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function ze(){this.i=null,this.l=null}A.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return r.__c(e,t.__c);Ve(e,t,n)},(Ke.prototype=new B).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=Ge(n.__v),i=!1,a=function(){i||(i=!0,r?r(o):o())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){a(),t.__c&&t.__c()};var o=function(){var e;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(a,a)},Ke.prototype.render=function(e,t){return this.__b&&(this.__v.__k&&(this.__v.__k[0]=He(this.__b)),this.__b=null),[N(j,null,t.u?null:e.children),t.u&&e.fallback]};var We=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(ze.prototype=new B).u=function(e){var t=this,n=Ge(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),We(t,e,r)):i()};n?n(a):a()}},ze.prototype.render=function(e){this.i=null,this.l=new Map;var t=W(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},ze.prototype.componentDidUpdate=ze.prototype.componentDidMount=function(){var e=this;e.l.forEach((function(t,n){We(e,n,t)}))};var Ye=function(){function e(){}var t=e.prototype;return t.getChildContext=function(){return this.props.context},t.render=function(e){return e.children},e}();function qe(e){var t=this,n=e.container,r=N(Ye,{context:t.context},e.vnode);return t.s&&t.s!==n&&(t.v.parentNode&&t.s.removeChild(t.v),ee(t.h),t.p=!1),e.vnode?t.p?(n.__k=t.__k,ne(r,n),t.__k=n.__k):(t.v=document.createTextNode(""),re("",n),n.appendChild(t.v),t.p=!0,t.s=n,ne(r,n,t.v),t.__k=t.v.__k):t.p&&(t.v.parentNode&&t.s.removeChild(t.v),ee(t.h)),t.h=r,t.componentWillUnmount=function(){t.v.parentNode&&t.s.removeChild(t.v),ee(t.h)},null}function Xe(e,t){return N(qe,{vnode:e,container:t})}var $e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;B.prototype.isReactComponent={};var Qe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ze=A.event;function Je(e,t){e["UNSAFE_"+t]&&!e[t]&&Object.defineProperty(e,t,{configurable:!1,get:function(){return this["UNSAFE_"+t]},set:function(e){this["UNSAFE_"+t]=e}})}A.event=function(e){Ze&&(e=Ze(e)),e.persist=function(){};var t=!1,n=!1,r=e.stopPropagation;e.stopPropagation=function(){r.call(e),t=!0};var i=e.preventDefault;return e.preventDefault=function(){i.call(e),n=!0},e.isPropagationStopped=function(){return t},e.isDefaultPrevented=function(){return n},e.nativeEvent=e};var et={configurable:!0,get:function(){return this.class}},tt=A.vnode;function nt(e){return!!e&&e.$$typeof===Qe}A.vnode=function(e){e.$$typeof=Qe;var t=e.type,n=e.props;if(t){if(n.class!=n.className&&(et.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",et)),"function"!=typeof t){var r,i,a;for(a in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===t&&(W(n.children).forEach((function(e){-1!=n.value.indexOf(e.props.value)&&(e.props.selected=!0)})),delete n.value),n)if(r=$e.test(a))break;if(r)for(a in i=e.props={},n)i[$e.test(a)?a.replace(/[A-Z0-9]/,"-$&").toLowerCase():a]=n[a]}!function(t){var n=e.type,r=e.props;if(r&&"string"==typeof n){var i={};for(var a in r)/^on(Ani|Tra|Tou)/.test(a)&&(r[a.toLowerCase()]=r[a],delete r[a]),i[a.toLowerCase()]=a;if(i.ondoubleclick&&(r.ondblclick=r[i.ondoubleclick],delete r[i.ondoubleclick]),i.onbeforeinput&&(r.onbeforeinput=r[i.onbeforeinput],delete r[i.onbeforeinput]),i.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var o=i.oninput||"oninput";r[o]||(r[o]=r[i.onchange],delete r[i.onchange])}}}(),"function"==typeof t&&!t.m&&t.prototype&&(Je(t.prototype,"componentWillMount"),Je(t.prototype,"componentWillReceiveProps"),Je(t.prototype,"componentWillUpdate"),t.m=!0)}tt&&tt(e)};var rt=function(e,t){return e(t)},it={useState:ye,useReducer:ve,useEffect:me,useLayoutEffect:be,useRef:_e,useImperativeHandle:Ee,useMemo:ke,useCallback:Te,useContext:Ae,useDebugValue:we,version:"16.8.0",Children:Be,render:function(e,t,n){if(null==t.__k)for(;t.firstChild;)t.removeChild(t.firstChild);return ne(e,t),"function"==typeof n&&n(),e?e.__c:null},hydrate:function(e,t,n){return re(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(ne(null,e),!0)},createPortal:Xe,createElement:N,createContext:ae,createFactory:function(e){return N.bind(null,e)},cloneElement:function(e){return nt(e)?ie.apply(null,arguments):e},createRef:F,Fragment:j,isValidElement:nt,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:B,PureComponent:Me,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Le(this.props,e)}function r(t){return this.shouldComponentUpdate=n,N(e,t)}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(e.displayName||e.name)+")",r.t=!0,r},forwardRef:Fe,unstable_batchedUpdates:rt,StrictMode:j,Suspense:Ke,SuspenseList:ze,lazy:function(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return N(n,i)}return i.displayName="Lazy",i.t=!0,i}},at=(n(7),it.createContext(null)),ot=function(e){e()},st={notify:function(){}},lt=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=st,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=ot,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=st)},e}(),ut=function(e){var t=e.store,n=e.context,r=e.children,i=ke((function(){var e=new lt(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),a=ke((function(){return t.getState()}),[t]);me((function(){var e=i.subscription;return e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[i,a]);var o=n||at;return it.createElement(o.Provider,{value:i},r)};function ct(){return(ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pt(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var dt=n(2),ft=n.n(dt),ht=n(1),gt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?be:me,yt=[],vt=[null,null];function mt(e,t){var n=e[1];return[t.payload,n+1]}function bt(e,t,n){gt((function(){return e.apply(void 0,t)}),n)}function _t(e,t,n,r,i,a,o){e.current=r,t.current=i,n.current=!1,a.current&&(a.current=null,o())}function Et(e,t,n,r,i,a,o,s,l,u){if(e){var c=!1,p=null,d=function(){if(!c){var e,n,d=t.getState();try{e=r(d,i.current)}catch(e){n=e,p=e}n||(p=null),e===a.current?o.current||l():(a.current=e,s.current=e,o.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=d,n.trySubscribe(),d(),function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}}var kt=function(){return[null,0]};function Tt(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,i=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,a=n.methodName,o=void 0===a?"connectAdvanced":a,s=n.renderCountProp,l=void 0===s?void 0:s,u=n.shouldHandleStateChanges,c=void 0===u||u,p=n.storeKey,d=void 0===p?"store":p,f=(n.withRef,n.forwardRef),h=void 0!==f&&f,g=n.context,y=void 0===g?at:g,v=pt(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),m=y;return function(t){var n=t.displayName||t.name||"Component",r=i(n),a=ct({},v,{getDisplayName:i,methodName:o,renderCountProp:l,shouldHandleStateChanges:c,storeKey:d,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure,u=s?ke:function(e){return e()};function p(n){var r=ke((function(){var e=n.reactReduxForwardedRef,t=pt(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),i=r[0],o=r[1],s=r[2],l=ke((function(){return i&&i.Consumer&&Object(ht.isContextConsumer)(it.createElement(i.Consumer,null))?i:m}),[i,m]),p=Ae(l),d=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(p)&&Boolean(p.store);var f=d?n.store:p.store,h=ke((function(){return function(t){return e(t.dispatch,a)}(f)}),[f]),g=ke((function(){if(!c)return vt;var e=new lt(f,d?null:p.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[f,d,p]),y=g[0],v=g[1],b=ke((function(){return d?p:ct({},p,{subscription:y})}),[d,p,y]),_=ve(mt,yt,kt),E=_[0][0],k=_[1];if(E&&E.error)throw E.error;var T=_e(),A=_e(s),w=_e(),S=_e(!1),C=u((function(){return w.current&&s===A.current?w.current:h(f.getState(),s)}),[f,E,s]);bt(_t,[A,T,S,s,C,w,v]),bt(Et,[c,f,y,h,A,T,S,w,v,k],[f,y,h]);var x=ke((function(){return it.createElement(t,ct({},C,{ref:o}))}),[o,t,C]);return ke((function(){return c?it.createElement(l.Provider,{value:b},x):x}),[l,x,b])}var f=s?it.memo(p):p;if(f.WrappedComponent=t,f.displayName=r,h){var g=it.forwardRef((function(e,t){return it.createElement(f,ct({},e,{reactReduxForwardedRef:t}))}));return g.displayName=r,g.WrappedComponent=t,ft()(g,t)}return ft()(f,t)}}function At(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function wt(e,t){if(At(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!At(e[n[i]],t[n[i]]))return!1;return!0}var St=n(3),Ct=function(){return Math.random().toString(36).substring(7).split("").join(".")},xt={INIT:"@@redux/INIT"+Ct(),REPLACE:"@@redux/REPLACE"+Ct(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ct()}};function It(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Pt(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(Pt)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var i=e,a=t,o=[],s=o,l=!1;function u(){s===o&&(s=o.slice())}function c(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function p(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return u(),s.push(e),function(){if(t){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,u();var n=s.indexOf(e);s.splice(n,1),o=null}}}function d(e){if(!It(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,a=i(a,e)}finally{l=!1}for(var t=o=s,n=0;n<t.length;n++)(0,t[n])();return e}function f(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");i=e,d({type:xt.REPLACE})}function h(){var e,t=p;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[St.a]=function(){return this},e}return d({type:xt.INIT}),(r={dispatch:d,subscribe:p,getState:c,replaceReducer:f})[St.a]=h,r}function Dt(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function Rt(e,t){return function(){return t(e.apply(this,arguments))}}function Ot(e,t){if("function"==typeof e)return Rt(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var i=e[r];"function"==typeof i&&(n[r]=Rt(i,t))}return n}function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(n,!0).forEach((function(t){Lt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ut(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function Ft(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function jt(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Bt(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=jt(e);var i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=jt(i),i=r(t,n)),i},r}}var Vt=[function(e){return"function"==typeof e?Bt(e):void 0},function(e){return e?void 0:Ft((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?Ft((function(t){return Ot(e,t)})):void 0}],Ht=[function(e){return"function"==typeof e?Bt(e):void 0},function(e){return e?void 0:Ft((function(){return{}}))}];function Kt(e,t,n){return ct({},n,{},e,{},t)}var Gt=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,a=n.areMergedPropsEqual,o=!1;return function(t,n,s){var l=e(t,n,s);return o?i&&a(l,r)||(r=l):(o=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return Kt}}];function zt(e,t,n,r){return function(i,a){return n(e(i,a),t(r,a),a)}}function Wt(e,t,n,r,i){var a,o,s,l,u,c=i.areStatesEqual,p=i.areOwnPropsEqual,d=i.areStatePropsEqual,f=!1;function h(i,f){var h,g,y=!p(f,o),v=!c(i,a);return a=i,o=f,y&&v?(s=e(a,o),t.dependsOnOwnProps&&(l=t(r,o)),u=n(s,l,o)):y?(e.dependsOnOwnProps&&(s=e(a,o)),t.dependsOnOwnProps&&(l=t(r,o)),u=n(s,l,o)):v?(h=e(a,o),g=!d(h,s),s=h,g&&(u=n(s,l,o)),u):u}return function(i,c){return f?h(i,c):(s=e(a=i,o=c),l=t(r,o),u=n(s,l,o),f=!0,u)}}function Yt(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,a=pt(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,a),s=r(e,a),l=i(e,a);return(a.pure?Wt:zt)(o,s,l,e,a)}function qt(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Xt(e,t){return e===t}var $t=function(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Tt:n,i=t.mapStateToPropsFactories,a=void 0===i?Ht:i,o=t.mapDispatchToPropsFactories,s=void 0===o?Vt:o,l=t.mergePropsFactories,u=void 0===l?Gt:l,c=t.selectorFactory,p=void 0===c?Yt:c;return function(e,t,n,i){void 0===i&&(i={});var o=i,l=o.pure,c=void 0===l||l,d=o.areStatesEqual,f=void 0===d?Xt:d,h=o.areOwnPropsEqual,g=void 0===h?wt:h,y=o.areStatePropsEqual,v=void 0===y?wt:y,m=o.areMergedPropsEqual,b=void 0===m?wt:m,_=pt(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=qt(e,a,"mapStateToProps"),k=qt(t,s,"mapDispatchToProps"),T=qt(n,u,"mergeProps");return r(p,ct({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:k,initMergeProps:T,pure:c,areStatesEqual:f,areOwnPropsEqual:g,areStatePropsEqual:v,areMergedPropsEqual:b},_))}}();function Qt(){return Ae(at)}function Zt(e){void 0===e&&(e=at);var t=e===at?Qt:function(){return Ae(e)};return function(){return t().store}}var Jt=Zt();function en(e){void 0===e&&(e=at);var t=e===at?Jt:Zt(e);return function(){return t().dispatch}}var tn=en(),nn=function(e,t){return e===t};function rn(e){void 0===e&&(e=at);var t=e===at?Qt:function(){return Ae(e)};return function(e,n){void 0===n&&(n=nn);var r=t(),i=function(e,t,n,r){var i,a=ve((function(e){return e+1}),0)[1],o=ke((function(){return new lt(n,r)}),[n,r]),s=_e(),l=_e(),u=_e(),c=_e(),p=n.getState();try{i=e!==l.current||p!==u.current||s.current?e(p):c.current}catch(e){throw s.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+s.current.stack+"\n\n"),e}return gt((function(){l.current=e,u.current=p,c.current=i,s.current=void 0})),gt((function(){function e(){try{var e=l.current(n.getState());if(t(e,c.current))return;c.current=e}catch(e){s.current=e}a()}return o.onStateChange=e,o.trySubscribe(),e(),function(){return o.tryUnsubscribe()}}),[n,o]),i}(e,n,r.store,r.subscription);return we(i),i}}var an=rn();ot=rt;var on=n(4),sn=n.n(on);function ln(e){return null!=e}function un(e,t){for(var n in t)e[n]=t[n];return e}var cn=/[?&#]intl=show/,pn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getChildContext=function(){var e=this.props,t=e.scope,n=e.definition,r=e.mark,i=un({},this.context.intl||{});return t&&(i.scope=t),n&&(i.dictionary=function e(t,n){var r=un({},t);for(var i in n)n.hasOwnProperty(i)&&(t[i]&&n[i]&&"object"==typeof t[i]&&"object"==typeof n[i]?r[i]=e(t[i],n[i]):r[i]=t[i]||n[i]);return r}(i.dictionary||{},n)),(r||"undefined"!=typeof location&&String(location).match(cn))&&(i.mark=!0),{intl:i}},t.prototype.render=function(e){return e.children},t}(B);function dn(e,t){if(arguments.length<2)return t=e,function(e){return dn(e,t)};function n(n){return N(pn,t||{},N(e,n))}return n.getWrappedComponent=e&&e.getWrappedComponent||function(){return e},n}var fn,hn={};function gn(e,t){return fn=t||hn,e&&e.replace(/\{\{([\w.-]+)\}\}/g,yn)}function yn(e,t){for(var n=t.split("."),r=fn,i=0;i<n.length;i++)if(null==(r=r[n[i]]))return"";return"string"==typeof r&&r.match(/\{\{/)&&(r=gn(r,fn)),r}function vn(e,t,n,r,i,a){t&&(e=t+"."+e);var o=n&&sn()(n,e);return(i||0===i)&&o&&"object"==typeof o&&(o=o.splice?o[i]||o[0]:0===i&&ln(o.none)?o.none:1===i&&ln(o.one||o.singular)?o.one||o.singular:o.some||o.many||o.plural||o.other||o),o&&gn(o,r)||a||null}function mn(e,t){var n=e.value,r=e.id,i=t.intl;if(i&&i.mark){var a="dictionary"+(i&&i.scope?"."+i.scope:"")+"."+r;return N("mark",{style:{background:n?sn()(i,a)?"rgba(119,231,117,.5)":"rgba(229,226,41,.5)":"rgba(228,147,51,.5)"},title:r},n)}return n}function bn(e,t){var n=e.id,r=e.children,i=e.plural,a=e.fields,o=t.intl;return N(mn,{id:n,value:vn(n,o&&o.scope,o&&o.dictionary,a,i,r)})}function _n(e,t,n){var r={};for(var i in t=t||{},e=function(e){if("string"==typeof(e=e||{})&&(e=e.split(",")),"join"in e){for(var t={},n=0;n<e.length;n++){var r=e[n].trim();r&&(t[r.split(".").pop()]=r)}return t}return e}(e))if(e.hasOwnProperty(i)&&e[i]){var a=e[i];n||"string"!=typeof a?a.type===bn&&(a=un({fallback:a.props.children},a.props),r[i]=vn(a.id,t.scope,t.dictionary,a.fields,a.plural,a.fallback)):r[i]=vn(a,t.scope,t.dictionary)}return r}function En(e,t){var n=e.children,r=t.intl;return n&&n.length?n.map((function(e){return ie(e,_n(e.props,r,!0))})):n&&ie(n,_n(n.props,r,!0))}function kn(e){return N(En,null,N(Tn,{html:N(bn,e),id:e.id}))}function Tn(e){var t=e.html,n=e.id,r=t?"string"==typeof t?N("span",{dangerouslySetInnerHTML:{__html:t}}):N("span",null,t):t;return N(mn,{id:n,value:r})}function An(e){return function(t){function n(n,r){var i=_n("function"==typeof e?e(n,r):e,r.intl);return N(t,un(un({},n),i))}return n.getWrappedComponent=t&&t.getWrappedComponent||function(){return t},n}}dn.intl=dn,dn.IntlProvider=pn,dn.Text=bn,dn.MarkupText=kn,dn.Localizer=En,dn.withText=An;var wn=dn;function Sn(e){return e&&"object"==typeof e&&!Array.isArray(e)}function Cn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;var i=n.shift();if(Sn(e)&&Sn(i))for(var a in i){var o,s;Sn(i[a])?(e[a]||Object.assign(e,((o={})[a]={},o)),Cn(e[a],i[a])):Object.assign(e,((s={})[a]=i[a],s))}return Cn.apply(void 0,[e].concat(n))}var xn={get:function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}}},In={};function Pn(e){return xn.get(e)}var Dn=Pn,Rn="playkit-ui",On={UI_CLICKED:Rn+"-uiclicked",UI_VISIBILITY_CHANGED:Rn+"-uivisibilitychanged",GUI_RESIZE:Rn+"-guiresize",PLAYER_RESIZE:Rn+"-playerresize",VIDEO_RESIZE:Rn+"-videoresize",UI_PRESET_CHANGE:Rn+"-uipresetchange",USER_CLICKED_PLAY:Rn+"-userclickedplay",USER_CLICKED_PAUSE:Rn+"-userclickedpause",USER_CLICKED_REWIND:Rn+"-userclickedrewind",USER_CLICKED_FORWARD:Rn+"-userclickedforward",USER_CLICKED_LIVE_TAG:Rn+"-userclickedlivetag",USER_CLICKED_MUTE:Rn+"-userclickedmute",USER_CLICKED_UNMUTE:Rn+"-userclickedunmute",USER_CLICKED_ADVANCED_AUDIO_DESCRIPTION:Rn+"-userclickedadvancedaudiodescription",USER_CHANGED_VOLUME:Rn+"-userchangedvolume",USER_SELECTED_CAPTION_TRACK:Rn+"-userselectedcaptiontrack",USER_SHOWED_CAPTIONS:Rn+"-usershowedcaptions",USER_HID_CAPTIONS:Rn+"-userhidcaptions",USER_SELECTED_AUDIO_TRACK:Rn+"-userselectedaudiotrack",USER_SELECTED_QUALITY_TRACK:Rn+"-userselectedqualitytrack",USER_ENTERED_FULL_SCREEN:Rn+"-userenteredfullscreen",USER_EXITED_FULL_SCREEN:Rn+"-userexitedfullscreen",USER_ENTERED_PICTURE_IN_PICTURE:Rn+"-userenteredpictureinpicture",USER_EXITED_PICTURE_IN_PICTURE:Rn+"-userexitedpictureinpicture",USER_SELECTED_CAPTIONS_STYLE:Rn+"-userselectedcaptionsstyle",USER_SELECTED_SPEED:Rn+"-userselectedspeed",USER_SEEKED:Rn+"-userseeked",RESIZE:Rn+"-resize"},Ln={TAB:9,ENTER:13,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,P:80,C:67,F:70,M:77,SEMI_COLON:186,COMMA:188,PERIOD:190};function Mn(){return(Mn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Nn,Un,Fn,jn=function(e){return function(t){return function(n){var r,i;function a(){var t;return(t=n.call(this)||this).logger=Dn("UI "+e),t.logger.debug("Initialized"),t}return i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,a.prototype.render=function(){return N(t,Mn({},this.props,{logger:this.logger}))},a}(B)}};function Bn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hn="remove";function Kn(e,t){return e[t]=e[t]||{before:[],after:[],replace:null},e[t]}var Gn,zn,Wn,Yn={playerAreaComponents:null,hasPositionedComponents:!1,presetComponentsOnlyMode:!0},qn=jn("PlayerArea")(Nn=$t((function(e){return{activePresetName:e.shell.activePresetName}}))((Fn=Un=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vn(Bn(t=e.call.apply(e,[this].concat(r))||this),"_updateAreaComponents",(function(e){var n=t.props,r=n.activePresetName,i=n.name;t.props.logger.debug("Player area '"+i+"' in preset '"+r+"' - update children components");var a={},o={appendedComponents:[],positionedComponentMap:a},s=!1;e.forEach((function(e){e.beforeComponent?(Kn(a,e.beforeComponent).before.push(e),s=!0):e.afterComponent?(Kn(a,e.afterComponent).after.push(e),s=!0):e.replaceComponent?(Kn(a,e.replaceComponent).replace=e,s=!0):o.appendedComponents.push(e)})),t.setState({playerAreaComponents:o,hasPositionedComponents:s,presetComponentsOnlyMode:!1})})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e,t){return e.shouldUpdate||this.state.playerAreaComponents!==t.playerAreaComponents||e.activePresetName!==this.props.activePresetName},i.componentDidUpdate=function(e){e.activePresetName!==this.props.activePresetName&&this._registerListener()},i._unregisterListener=function(){this.props.logger.debug("Player area '"+this.props.name+"' - unregister to changes"),"function"==typeof this._unregisterListenerCallback&&(this._unregisterListenerCallback(),this._unregisterListenerCallback=null)},i._registerListener=function(){var e=this.props,t=e.activePresetName,n=e.name;this._unregisterListener(),t&&n&&(this.props.logger.debug("Player area '"+n+"' in preset '"+t+"' - register to changes"),this._unregisterListenerCallback=this.context.playerAreaComponentsStore.listen(t,n,this._updateAreaComponents))},i.componentDidMount=function(){this.props.logger.debug("Player area '"+this.props.name+"' - handle did mount"),this.setState(Yn),this._registerListener(),this._actualChildren=[]},i.componentWillUpdate=function(e){var t=e.children;this._actualChildren=t&&t.type===j?t.props.children:t},i.componentWillUnmount=function(){var e=this.props.name;this.props.logger.debug("Player area '"+e+"' - handle will unmount"),this._unregisterListener()},i._renderUIComponent=function(e){return e.get?N(e.get,e.props):null},i.renderContent=function(e){return N(j,null,e)},i._getPositionedComponents=function(e){var t=this,n=this.state.playerAreaComponents,r=[];return W(e).forEach((function(e){if("div"===e.type||e.type===j)return e.props.children=t._getPositionedComponents(e.props.children),void r.push(e);var i,a=(i=e)&&i.type?i.type.displayName:null;if(a){var o=n.positionedComponentMap[a];if(o){var s=o.replace,l=o.before,u=o.after;if(s){if(s.get===Hn)return;return"string"!=typeof s.get&&(s.props=s.props||{},s.props.replacedComponentProps=e.props),void r.push(t._renderUIComponent(s))}l.length&&l.forEach((function(e){r.push(t._renderUIComponent(e))})),r.push(e),u.length&&u.forEach((function(e){r.push(t._renderUIComponent(e))}))}else r.push(e)}else r.push(e)})),r},i.render=function(){var e,t=this,n=this.props.show,r=this.state,i=r.playerAreaComponents,a=r.hasPositionedComponents;if(r.presetComponentsOnlyMode)return this.renderContent(this._actualChildren);if(!i||!n)return null;var o,s=[];a?s=this._getPositionedComponents(this._actualChildren):(o=s).push.apply(o,W(this._actualChildren));var l=i.appendedComponents.map((function(e){return t._renderUIComponent(e)})),u=s.length;return(e=s).splice.apply(e,[u,0].concat(l)),this.renderContent(s)},r}(B),Vn(Un,"defaultProps",{show:!0}),Nn=Fn))||Nn)||Nn,Xn=function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(e[n[i]]!==t[n[i]])return!1;return!0};function $n(){return($n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Qn={ADD_PLAYER_CLASS:"shell/ADD_PLAYER_CLASS",REMOVE_PLAYER_CLASS:"shell/REMOVE_PLAYER_CLASS",UPDATE_IS_MOBILE:"shell/UPDATE_IS_MOBILE",UPDATE_PLAYER_SIZE:"shell/UPDATE_PLAYER_SIZE",UPDATE_IS_SMALL_SIZE:"shell/UPDATE_IS_SMALL_SIZE",UPDATE_GUI_CLIENT_RECT:"shell/UPDATE_GUI_CLIENT_RECT",UPDATE_PLAYER_CLIENT_RECT:"shell/UPDATE_PLAYER_CLIENT_RECT",UPDATE_VIDEO_CLIENT_RECT:"shell/UPDATE_VIDEO_CLIENT_RECT",UPDATE_DOCUMENT_WIDTH:"shell/UPDATE_DOCUMENT_WIDTH",UPDATE_PLAYER_HOVER_STATE:"shell/UPDATE_PLAYER_HOVER_STATE",UPDATE_PLAYER_NAV_STATE:"shell/UPDATE_PLAYER_NAV_STATE",UPDATE_SMART_CONTAINER_OPEN:"shell/UPDATE_SMART_CONTAINER_OPEN",UPDATE_ACTIVE_PRESET_NAME:"shell/UPDATE_ACTIVE_PRESET_NAME",UPDATE_SIDE_PANEL_MODE:"shell/UPDATE_SIDE_PANEL_MODE",UPDATE_SIDE_PANEL_SIZE:"shell/UPDATE_SIDE_PANEL_SIZE",UPDATE_PRESET_SETTINGS:"shell/UPDATE_PRESET_SETTINGS",UPDATE_LAYOUT_STYLES:"shell/UPDATE_LAYOUT_STYLES"},Zn={VERTICAL:"vertical",HORIZONTAL:"horizontal"},Jn={LEFT:"left",TOP:"top",BOTTOM:"bottom",RIGHT:"right"},er={ALONGSIDE:"alongside",HIDDEN:"hidden",OVER:"over"},tr={Playback:"Playback",Live:"Live",Ads:"Ads",Error:"Error",Idle:"Idle"},nr={PlayerArea:"PlayerArea",PresetArea:"PresetArea",InteractiveArea:"InteractiveArea",VideoArea:"VideoArea",GuiArea:"GuiArea",TopBar:"TopBar",BottomBar:"BottomBar",PresetFloating:"PresetFloating",TopBarLeftControls:"TopBarLeftControls",TopBarRightControls:"TopBarRightControls",BottomBarLeftControls:"BottomBarLeftControls",BottomBarRightControls:"BottomBarRightControls",SidePanelTop:"SidePanelTop",SidePanelLeft:"SidePanelLeft",SidePanelRight:"SidePanelRight",SidePanelBottom:"SidePanelBottom",SeekBar:"SeekBar",LoadingSpinner:"LoadingSpinner"},rr={x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0},ir={position:"absolute",left:0,right:0,top:0,bottom:0},ar={playerClasses:[],guiClientRect:rr,playerClientRect:rr,videoClientRect:rr,layoutStyles:{video:ir,gui:ir,sidePanels:(Gn={},Gn[Jn.LEFT]={},Gn[Jn.RIGHT]={},Gn[Jn.TOP]={},Gn[Jn.BOTTOM]={},Gn)},playerHover:!1,playerNav:!1,smartContainerOpen:!1,activePresetName:"",sidePanelsModes:(zn={},zn[Jn.LEFT]=er.HIDDEN,zn[Jn.RIGHT]=er.HIDDEN,zn[Jn.TOP]=er.HIDDEN,zn[Jn.BOTTOM]=er.HIDDEN,zn),sidePanelsSizes:(Wn={},Wn[Zn.VERTICAL]={min:240,max:480,ratio:.33},Wn[Zn.HORIZONTAL]={min:144,max:288,ratio:.33},Wn),presetSettings:{allowSidePanels:!1,allowPlayerArea:!1}},or=function(e,t){var n;switch(void 0===e&&(e=ar),t.type){case Qn.ADD_PLAYER_CLASS:return e.playerClasses.includes(t.className)?e:$n({},e,{playerClasses:[].concat(e.playerClasses,[t.className])});case Qn.REMOVE_PLAYER_CLASS:return $n({},e,{playerClasses:e.playerClasses.filter((function(e){return e!==t.className}))});case Qn.UPDATE_IS_MOBILE:return $n({},e,{isMobile:t.isMobile});case Qn.UPDATE_PLAYER_SIZE:return $n({},e,{playerSize:t.playerSize});case Qn.UPDATE_IS_SMALL_SIZE:return $n({},e,{isSmallSize:t.isSmallSize});case Qn.UPDATE_GUI_CLIENT_RECT:return $n({},e,{guiClientRect:t.guiClientRect});case Qn.UPDATE_PLAYER_CLIENT_RECT:return $n({},e,{playerClientRect:t.playerClientRect});case Qn.UPDATE_LAYOUT_STYLES:var r,i=e.layoutStyles,a=i.sidePanels,o=i.video,s=i.gui,l=t.layoutStyles,u=l.sidePanels,c=l.video,p=l.gui;return $n({},e,{layoutStyles:{sidePanels:(r={},r[Jn.LEFT]=Xn(a[Jn.LEFT],u[Jn.LEFT])?a[Jn.LEFT]:u[Jn.LEFT],r[Jn.RIGHT]=Xn(a[Jn.RIGHT],u[Jn.RIGHT])?a[Jn.RIGHT]:u[Jn.RIGHT],r[Jn.TOP]=Xn(a[Jn.TOP],u[Jn.TOP])?a[Jn.TOP]:u[Jn.TOP],r[Jn.BOTTOM]=Xn(a[Jn.BOTTOM],u[Jn.BOTTOM])?a[Jn.BOTTOM]:u[Jn.BOTTOM],r),video:Xn(o,c)?o:c,gui:Xn(s,p)?s:p}});case Qn.UPDATE_VIDEO_CLIENT_RECT:return $n({},e,{videoClientRect:t.videoClientRect});case Qn.UPDATE_DOCUMENT_WIDTH:return $n({},e,{documentWidth:t.documentWidth});case Qn.UPDATE_PLAYER_HOVER_STATE:return $n({},e,{playerHover:t.hover});case Qn.UPDATE_PLAYER_NAV_STATE:return $n({},e,{playerNav:t.nav});case Qn.UPDATE_SMART_CONTAINER_OPEN:return $n({},e,{smartContainerOpen:t.open});case Qn.UPDATE_ACTIVE_PRESET_NAME:return $n({},e,{activePresetName:t.activePresetName});case Qn.UPDATE_SIDE_PANEL_MODE:return $n({},e,{sidePanelsModes:$n({},e.sidePanelsModes,(n={},n[t.position]=t.sidePanelMode,n))});case Qn.UPDATE_SIDE_PANEL_SIZE:var d,f=t.options,h=f.ratio,g=f.min,y=f.max,v=e.sidePanelsSizes[t.orientation],m={ratio:"number"==typeof h&&h<=1?h:v.ratio,min:"number"==typeof g?g:v.min,max:"number"==typeof y?y:v.max};return $n({},e,{sidePanelsSizes:$n({},e.sidePanelsSizes,(d={},d[t.orientation]=m,d))});case Qn.UPDATE_PRESET_SETTINGS:return $n({},e,{presetSettings:$n({},{allowSidePanels:!1,allowPlayerArea:!1},t.presetSettings||{})});default:return e}},sr={addPlayerClass:function(e){return{type:Qn.ADD_PLAYER_CLASS,className:e}},removePlayerClass:function(e){return{type:Qn.REMOVE_PLAYER_CLASS,className:e}},updateIsMobile:function(e){return{type:Qn.UPDATE_IS_MOBILE,isMobile:e}},updatePlayerSize:function(e){return{type:Qn.UPDATE_PLAYER_SIZE,playerSize:e}},updateIsSmallSize:function(e){return{type:Qn.UPDATE_IS_SMALL_SIZE,isSmallSize:e}},updateGuiClientRect:function(e){return{type:Qn.UPDATE_GUI_CLIENT_RECT,guiClientRect:e}},updatePlayerClientRect:function(e){return{type:Qn.UPDATE_PLAYER_CLIENT_RECT,playerClientRect:e}},updateVideoClientRect:function(e){return{type:Qn.UPDATE_VIDEO_CLIENT_RECT,videoClientRect:e}},updateDocumentWidth:function(e){return{type:Qn.UPDATE_DOCUMENT_WIDTH,documentWidth:e}},updatePlayerHoverState:function(e){return{type:Qn.UPDATE_PLAYER_HOVER_STATE,hover:e}},updatePlayerNavState:function(e){return{type:Qn.UPDATE_PLAYER_NAV_STATE,nav:e}},updateSmartContainerOpen:function(e){return{type:Qn.UPDATE_SMART_CONTAINER_OPEN,open:e}},updateActivePresetName:function(e){return{type:Qn.UPDATE_ACTIVE_PRESET_NAME,activePresetName:e}},updateSidePanelMode:function(e,t){return{type:Qn.UPDATE_SIDE_PANEL_MODE,position:e,sidePanelMode:t}},updateSidePanelSize:function(e,t){return{type:Qn.UPDATE_SIDE_PANEL_SIZE,orientation:e,options:t}},updatePresetSettings:function(e){return{type:Qn.UPDATE_PRESET_SETTINGS,presetSettings:e}},updateLayoutStyles:function(e){return{type:Qn.UPDATE_LAYOUT_STYLES,layoutStyles:e}}};function lr(){return(lr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ur(e){return function(t){return lr({},Ot(e,t))}}var cr=n(0),pr=n.n(cr);function dr(e,t,n){var r=n.config.components&&n.config.components[e];return r?Cn(t,r):t}function fr(e,t,n){return n.componentAlias===e?Cn(t,n.config):t}function hr(){return(hr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gr={UPDATE:"config/UPDATE",UPDATE_COMPONENT:"config/UPDATE_COMPONENT",RESET:"config/RESET"},yr={forceTouchUI:!1,showCCButton:!0,settings:{showAudioMenu:!0,showCaptionsMenu:!0,showQualityMenu:!0,showSpeedMenu:!0,showAdvancedAudioDescToggle:!1,showAdvancedCaptionsMenu:!0},hoverTimeout:3e3,components:{watermark:{},seekbar:{},vrStereo:{},logo:{},fullscreen:{},sidePanels:{}}},vr=function(e,t){switch(void 0===e&&(e=yr),t.type){case gr.UPDATE:return hr({},e,Cn({},e,t.config));case gr.UPDATE_COMPONENT:var n;return hr({},e,{components:hr({},e.components,(n={},n[t.componentAlias]=Cn({},e.components[t.componentAlias],t.config),n))});default:return e}},mr={updateConfig:function(e){return{type:gr.UPDATE,config:e}},updateComponentConfig:function(e,t){return{type:gr.UPDATE_COMPONENT,componentAlias:e,config:t}}};function br(){return(br=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _r={UPDATE_PLAYER_STATE:"engine/UPDATE_PLAYER_STATE",UPDATE_PRE_PLAYBACK:"engine/UPDATE_PRE_PLAYBACK",UPDATE_IS_PLAYING:"engine/UPDATE_IS_PLAYING",UPDATE_IS_PAUSED:"engine/UPDATE_IS_PAUSED",UPDATE_IS_SEEKING:"engine/UPDATE_IS_SEEKING",UPDATE_LAST_SEEK_POINT:"engine/UPDATE_LAST_SEEK_POINT",UPDATE_IS_CHANGING_SOURCE:"engine/UPDATE_IS_CHANGING_SOURCE",UPDATE_IS_ENDED:"engine/UPDATE_IS_ENDED",UPDATE_IS_PLAYBACK_STARTED:"engine/UPDATE_IS_PLAYBACK_STARTED",UPDATE_IS_PLAYBACK_ENDED:"engine/UPDATE_IS_PLAYBACK_ENDED",UPDATE_CURRENT_TIME:"engine/UPDATE_CURRENT_TIME",UPDATE_DURATION:"engine/UPDATE_DURATION",UPDATE_VOLUME:"engine/UPDATE_VOLUME",UPDATE_MUTED:"engine/UPDATE_MUTED",UPDATE_METADATA_LOADING_STATUS:"engine/UPDATE_METADATA_LOADING_STATUS",UPDATE_DATA_LOADING_STATUS:"engine/UPDATE_DATA_LOADING_STATUS",UPDATE_AUDIO_TRACKS:"engine/UPDATE_AUDIO_TRACKS",UPDATE_VIDEO_TRACKS:"engine/UPDATE_VIDEO_TRACKS",UPDATE_TEXT_TRACKS:"engine/UPDATE_TEXT_TRACKS",UPDATE_AD_BREAK:"engine/UPDATE_AD_BREAK",UPDATE_AD_BREAK_PROGRESS:"engine/UPDATE_AD_BREAK_PROGRESS",UPDATE_AD_BREAK_COMPLETED:"engine/UPDATE_AD_BREAK_COMPLETED",UPDATE_AD_IS_PLAYING:"engine/UPDATE_AD_IS_PLAYING",UPDATE_AD_SKIP_TIME_OFFSET:"engine/UPDATE_AD_SKIP_TIME_OFFSET",UPDATE_AD_SKIPPABLE_STATE:"engine/UPDATE_AD_SKIPPABLE_STATE",UPDATE_AD_URL:"engine/UPDATE_AD_URL",UPDATE_AD_IS_LINEAR:"engine/UPDATE_AD_IS_LINEAR",UPDATE_AD_IS_BUMPER:"engine/UPDATE_AD_IS_BUMPER",UPDATE_AD_CONTENT_TYPE:"engine/UPDATE_AD_CONTENT_TYPE",UPDATE_PLAYER_POSTER:"engine/UPDATE_PLAYER_POSTER",UPDATE_IS_LIVE:"engine/UPDATE_IS_LIVE",UPDATE_IS_DVR:"engine/UPDATE_IS_DVR",UPDATE_IS_IMG:"engine/UPDATE_IS_IMG",UPDATE_ERROR:"engine/ERROR",UPDATE_IS_IDLE:"engine/UPDATE_IS_IDLE",UPDATE_FALLBACK_TO_MUTED_AUTOPLAY:"engine/UPDATE_FALLBACK_TO_MUTED_AUTOPLAY",UPDATE_IS_VR:"engine/UPDATE_IS_VR",UPDATE_VR_STEREO_MODE:"engine/UPDATE_VR_STEREO_MODE",UPDATE_IS_CASTING:"engine/UPDATE_IS_CASTING",UPDATE_CAST_SESSION:"engine/UPDATE_CAST_SESSION",UPDATE_IS_CAST_AVAILABLE:"engine/UPDATE_IS_CAST_AVAILABLE",UPDATE_PLAYLIST:"engine/UPDATE_PLAYLIST",UPDATE_PICTURE_IN_PICTURE_SUPPORTED:"engine/UPDATE_PICTURE_IN_PICTURE_SUPPORTED",UPDATE_PICTURE_IN_PICTURE_MODE:"engine/UPDATE_PICTURE_IN_PICTURE_MODE",UPDATE_FULLSCREEN:"engine/UPDATE_FULLSCREEN"},Er={isIdle:!1,isPlaying:!1,isPaused:!1,isSeeking:!1,isEnded:!1,isPlaybackStarted:!1,isPlaybackEnded:!1,isChangingSource:!1,prePlayback:!0,metadataLoaded:!1,dataLoaded:!1,playerState:{previousState:"",currentState:""},fallbackToMutedAutoPlay:!1,poster:"",currentTime:0,lastSeekPoint:0,duration:0,volume:1,muted:!1,videoTracks:[],audioTracks:[],textTracks:[],adIsLinear:!1,adBreak:!1,adIsPlaying:!1,adSkipTimeOffset:0,adSkippableState:!1,adIsBumper:!1,adContentType:null,isLive:!1,isDvr:!1,isImg:!1,adProgress:{currentTime:0,duration:0},adUrl:"",hasError:!1,isVr:!1,vrStereoMode:!1,isCasting:!1,castSession:null,isCastAvailable:!1,pictureInPictureSupported:!1,isInPictureInPicture:!1,playlist:null,fullscreen:!1},kr=function(e,t){switch(void 0===e&&(e=Er),t.type){case gr.UPDATE:return dr("engine",e,t);case gr.UPDATE_COMPONENT:return fr("engine",e,t);case _r.UPDATE_ERROR:return br({},e,{hasError:t.hasError});case _r.UPDATE_PLAYER_STATE:return br({},e,{playerState:t.playerState});case _r.UPDATE_PRE_PLAYBACK:return br({},e,{prePlayback:t.prePlayback});case _r.UPDATE_IS_PLAYING:return br({},e,{isPlaying:t.isPlaying});case _r.UPDATE_IS_PAUSED:return br({},e,{isPaused:t.isPaused});case _r.UPDATE_IS_SEEKING:return br({},e,{isSeeking:t.isSeeking});case _r.UPDATE_LAST_SEEK_POINT:return br({},e,{lastSeekPoint:t.lastSeekPoint});case _r.UPDATE_IS_ENDED:return br({},e,{isEnded:t.isEnded});case _r.UPDATE_IS_PLAYBACK_STARTED:return br({},e,{isPlaybackStarted:t.isPlaybackStarted});case _r.UPDATE_IS_PLAYBACK_ENDED:return br({},e,{isPlaybackEnded:t.isPlaybackEnded});case _r.UPDATE_CURRENT_TIME:return br({},e,{currentTime:t.currentTime});case _r.UPDATE_DURATION:return br({},e,{duration:t.duration});case _r.UPDATE_VOLUME:return br({},e,{volume:t.volume});case _r.UPDATE_MUTED:return br({},e,{muted:t.muted});case _r.UPDATE_METADATA_LOADING_STATUS:return br({},e,{metadataLoaded:t.metadataLoaded});case _r.UPDATE_DATA_LOADING_STATUS:return br({},e,{dataLoaded:t.dataLoaded});case _r.UPDATE_AUDIO_TRACKS:return br({},e,{audioTracks:t.tracks});case _r.UPDATE_VIDEO_TRACKS:return br({},e,{videoTracks:t.tracks});case _r.UPDATE_TEXT_TRACKS:return br({},e,{textTracks:t.tracks});case _r.UPDATE_AD_BREAK:return br({},e,{adBreak:t.adBreak});case _r.UPDATE_AD_BREAK_PROGRESS:return br({},e,{adProgress:t.adProgress});case _r.UPDATE_AD_BREAK_COMPLETED:return br({},e,{adProgress:{currentTime:e.adProgress.duration,duration:e.adProgress.duration}});case _r.UPDATE_AD_IS_PLAYING:return br({},e,{adIsPlaying:t.adIsPlaying});case _r.UPDATE_AD_IS_LINEAR:return br({},e,{adIsLinear:t.adIsLinear});case _r.UPDATE_AD_SKIP_TIME_OFFSET:return br({},e,{adSkipTimeOffset:t.adSkipTimeOffset});case _r.UPDATE_AD_SKIPPABLE_STATE:return br({},e,{adSkippableState:t.adSkippableState});case _r.UPDATE_AD_URL:return br({},e,{adUrl:t.adUrl});case _r.UPDATE_AD_IS_BUMPER:return br({},e,{adIsBumper:t.adIsBumper});case _r.UPDATE_AD_CONTENT_TYPE:return br({},e,{adContentType:t.adContentType});case _r.UPDATE_PLAYER_POSTER:return br({},e,{poster:t.poster});case _r.UPDATE_IS_LIVE:return br({},e,{isLive:t.isLive});case _r.UPDATE_IS_DVR:return br({},e,{isDvr:t.isDvr});case _r.UPDATE_IS_IMG:return br({},e,{isImg:t.isImg});case _r.UPDATE_IS_IDLE:return br({},e,{isIdle:t.IsIdle});case _r.UPDATE_FALLBACK_TO_MUTED_AUTOPLAY:return br({},e,{fallbackToMutedAutoPlay:t.fallback});case _r.UPDATE_IS_VR:return br({},e,{isVr:t.isVr});case _r.UPDATE_VR_STEREO_MODE:return br({},e,{vrStereoMode:t.vrStereoMode});case _r.UPDATE_IS_CASTING:return br({},e,{isCasting:t.isCasting});case _r.UPDATE_CAST_SESSION:return br({},e,{castSession:t.castSession});case _r.UPDATE_IS_CAST_AVAILABLE:return br({},e,{isCastAvailable:t.isCastAvailable});case _r.UPDATE_IS_CHANGING_SOURCE:return br({},e,{isChangingSource:t.isChangingSource});case _r.UPDATE_PLAYLIST:return br({},e,{playlist:t.playlist});case _r.UPDATE_PICTURE_IN_PICTURE_SUPPORTED:return br({},e,{isPictureInPictureSupported:t.isPictureInPictureSupported});case _r.UPDATE_PICTURE_IN_PICTURE_MODE:return br({},e,{isInPictureInPicture:t.isInPictureInPicture});case _r.UPDATE_FULLSCREEN:return br({},e,{fullscreen:t.fullscreen});default:return e}},Tr={updateHasError:function(e){return{type:_r.UPDATE_ERROR,hasError:e}},updatePlayerState:function(e,t){return{type:_r.UPDATE_PLAYER_STATE,playerState:{prevoiusState:e,currentState:t}}},updatePrePlayback:function(e){return{type:_r.UPDATE_PRE_PLAYBACK,prePlayback:e}},updateIsPlaying:function(e){return{type:_r.UPDATE_IS_PLAYING,isPlaying:e}},updateIsPaused:function(e){return{type:_r.UPDATE_IS_PAUSED,isPaused:e}},updateIsSeeking:function(e){return{type:_r.UPDATE_IS_SEEKING,isSeeking:e}},updateLastSeekPoint:function(e){return{type:_r.UPDATE_LAST_SEEK_POINT,lastSeekPoint:e}},updateIsEnded:function(e){return{type:_r.UPDATE_IS_ENDED,isEnded:e}},updateIsPlaybackStarted:function(e){return{type:_r.UPDATE_IS_PLAYBACK_STARTED,isPlaybackStarted:e}},updateIsPlaybackEnded:function(e){return{type:_r.UPDATE_IS_PLAYBACK_ENDED,isPlaybackEnded:e}},updateCurrentTime:function(e){return{type:_r.UPDATE_CURRENT_TIME,currentTime:e}},updateDuration:function(e){return{type:_r.UPDATE_DURATION,duration:e}},updateVolume:function(e){return{type:_r.UPDATE_VOLUME,volume:e}},updateMuted:function(e){return{type:_r.UPDATE_MUTED,muted:e}},updateMetadataLoadingStatus:function(e){return{type:_r.UPDATE_METADATA_LOADING_STATUS,metadataLoaded:e}},updateDataLoadingStatus:function(e){return{type:_r.UPDATE_DATA_LOADING_STATUS,dataLoaded:e}},updateAudioTracks:function(e){return{type:_r.UPDATE_AUDIO_TRACKS,tracks:e}},updateVideoTracks:function(e){return{type:_r.UPDATE_VIDEO_TRACKS,tracks:e}},updateTextTracks:function(e){return{type:_r.UPDATE_TEXT_TRACKS,tracks:e}},updateAdBreak:function(e){return{type:_r.UPDATE_AD_BREAK,adBreak:e}},updateAdBreakProgress:function(e,t){return{type:_r.UPDATE_AD_BREAK_PROGRESS,adProgress:{currentTime:e,duration:t}}},updateAdBreakCompleted:function(){return{type:_r.UPDATE_AD_BREAK_COMPLETED}},updateAdIsPlaying:function(e){return{type:_r.UPDATE_AD_IS_PLAYING,adIsPlaying:e}},updateAdSkipTimeOffset:function(e){return{type:_r.UPDATE_AD_SKIP_TIME_OFFSET,adSkipTimeOffset:e}},updateAdSkippableState:function(e){return{type:_r.UPDATE_AD_SKIPPABLE_STATE,adSkippableState:e}},updateAdClickUrl:function(e){return{type:_r.UPDATE_AD_URL,adUrl:e}},updateAdIsLinear:function(e){return{type:_r.UPDATE_AD_IS_LINEAR,adIsLinear:e}},updateAdIsBumper:function(e){return{type:_r.UPDATE_AD_IS_BUMPER,adIsBumper:e}},updateAdContentType:function(e){return{type:_r.UPDATE_AD_CONTENT_TYPE,adContentType:e}},updatePlayerPoster:function(e){return{type:_r.UPDATE_PLAYER_POSTER,poster:e}},updateIsLive:function(e){return{type:_r.UPDATE_IS_LIVE,isLive:e}},updateIsDvr:function(e){return{type:_r.UPDATE_IS_DVR,isDvr:e}},updateIsImg:function(e){return{type:_r.UPDATE_IS_IMG,isImg:e}},updateIsIdle:function(e){return{type:_r.UPDATE_IS_IDLE,IsIdle:e}},updateFallbackToMutedAutoPlay:function(e){return{type:_r.UPDATE_FALLBACK_TO_MUTED_AUTOPLAY,fallback:e}},updateIsVr:function(e){return{type:_r.UPDATE_IS_VR,isVr:e}},updateVrStereoMode:function(e){return{type:_r.UPDATE_VR_STEREO_MODE,vrStereoMode:e}},updateIsCasting:function(e){return{type:_r.UPDATE_IS_CASTING,isCasting:e}},updateCastSession:function(e){return{type:_r.UPDATE_CAST_SESSION,castSession:e}},updateIsCastAvailable:function(e){return{type:_r.UPDATE_IS_CAST_AVAILABLE,isCastAvailable:e}},updateIsChangingSource:function(e){return{type:_r.UPDATE_IS_CHANGING_SOURCE,isChangingSource:e}},updatePlaylist:function(e){return{type:_r.UPDATE_PLAYLIST,playlist:e}},updatePictureInPictureSupport:function(e){return{type:_r.UPDATE_PICTURE_IN_PICTURE_SUPPORTED,isPictureInPictureSupported:e}},updateIsInPictureInPicture:function(e){return{type:_r.UPDATE_PICTURE_IN_PICTURE_MODE,isInPictureInPicture:e}},updateFullscreen:function(e){return{type:_r.UPDATE_FULLSCREEN,fullscreen:e}}},Ar=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getChildContext=function(){return{player:this.props.player}},i.render=function(){return this.props.children&&W(this.props.children)[0]||null},r}(B);function wr(){return(wr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Sr=function(e){return function(t){var n,r;function i(){return t.apply(this,arguments)||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i.prototype.render=function(){var t=this.context.player;return N(e,wr({},this.props,{player:t}))},i}(B)};function Cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xr,Ir,Pr=function(){function e(){this._map=new Map}var t=e.prototype;return t.push=function(e,t){if(this._map.has(e)){var n=this._map.get(e);Array.isArray(n)&&(n.push(t),this._map.set(e,n))}else this._map.set(e,[t])},t.set=function(e,t){this._map.set(e,t)},t.has=function(e){return this._map.has(e)},t.get=function(e){var t=this._map.get(e);return t?t.slice():[]},t.getAll=function(){for(var e,t=[],n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._map.values());!(e=n()).done;){var r=e.value;t=t.concat(r)}return t},t.remove=function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n))for(var r=0;r<n.length;++r)n[r]===t&&(n.splice(r,1),--r)}},t.keys=function(){return this._map.keys()},t.clear=function(){this._map.clear()},e}(),Dr=function(){function e(e,t){this.bubbles=!1,this.cancelable=!1,this.defaultPrevented=!1,this.timeStamp=window.performance?window.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.currentTarget=null,this.target=null,this.stopped=!1,t&&(this.payload=t)}var t=e.prototype;return t.preventDefault=function(){},t.stopImmediatePropagation=function(){this.stopped=!0},t.stopPropagation=function(){},e}();Ir=On,"Type"in(xr=Dr)?Object.defineProperty(xr,"Type",{value:Ir,enumerable:!0,configurable:!0,writable:!0}):xr.Type=Ir;var Rr=function(){function e(){this._listeners=new Pr,this.dispatchTarget=this,this.__logger=Dn("UI FakeEventTarget")}var t=e.prototype;return t.addEventListener=function(e,t){this._listeners.push(e,t)},t.removeEventListener=function(e,t){this._listeners.remove(e,t)},t.dispatchEvent=function(e){for(var t=this._listeners.get(e.type)||[],n=0;n<t.length;++n){e.target=this.dispatchTarget,e.currentTarget=this.dispatchTarget;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(t){this.__logger.error("Error occurred when handling event: "+e.type+".",t)}if(e.stopped)break}return e.defaultPrevented},e}();function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Lr=function(){function e(){this._bindingMap=new Pr}var t=e.prototype;return t.destroy=function(){return this.removeAll(),this._bindingMap=null,Promise.resolve()},t.listenOnce=function(e,t,n,r){var i=this;this.listen(e,t,(function r(a){i.unlisten(e,t,r),n.call(i,a)}),r)},t.listen=function(e,t,n,r){var i=new Mr(e,t,n,r);this._bindingMap&&this._bindingMap.push(t,i)},t.unlisten=function(e,t,n){if(this._bindingMap)for(var r=this._bindingMap.get(t),i=0;i<r.length;++i){var a=r[i];a.target!==e||a.listener!==n&&n||(a.unlisten(),this._bindingMap&&this._bindingMap.remove(t,a))}},t.removeAll=function(){if(this._bindingMap){for(var e,t=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Or(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Or(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._bindingMap.getAll());!(e=t()).done;)e.value.unlisten();this._bindingMap&&this._bindingMap.clear()}},e}(),Mr=function(){function e(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.options=r,this.target.addEventListener(t,n,!1)}return e.prototype.unlisten=function(){this.target&&(this.target.removeEventListener(this.type,this.listener,this.options),this.target=null,this.listener=null,this.options=null)},e}();function Nr(){return(Nr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ur(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jr,Br=function(e){return function(t){var n,r;function i(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fr(Ur(e=t.call.apply(t,[this].concat(r))||this),"eventManager",new Lr),e}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a=i.prototype;return a.componentWillUnmount=function(){this.eventManager&&(this.eventManager.destroy(),this.eventManager=null)},a.render=function(){return N(e,Nr({},this.props,{eventManager:this.eventManager}))},i}(B)},Vr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_AUDIO_TRACK)||this).payload={audioTrack:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Hr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_CAPTION_TRACK)||this).payload={captionTrack:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Kr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_CAPTIONS_STYLE)||this).payload={captionsStyle:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Gr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_QUALITY_TRACK)||this).payload={qualityTrack:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),zr=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,Dr.Type.USER_SEEKED)||this).payload={from:t,to:n},r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Wr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_SPEED)||this).payload={speed:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Yr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.UI_VISIBILITY_CHANGED)||this).payload={visible:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),qr=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,Dr.Type.USER_CLICKED_REWIND)||this).payload={from:t,to:n},r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Xr=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,Dr.Type.USER_CLICKED_FORWARD)||this).payload={from:t,to:n},r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),$r=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_CHANGED_VOLUME)||this).payload={volume:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr);function Qr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jr=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zr(Qr(t=e.call.apply(e,[this].concat(r))||this),"_notifyClick",(function(e){return ni(t.props.store,e,t.props.player)})),Zr(Qr(t),"_notifyChange",(function(e){return ti(t.props.store,e,t.props.player)})),Zr(Qr(t),"_notifyHoverChange",(function(e){return ei(t.props.store,e,t.props.player)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getChildContext=function(){return{notifyClick:this._notifyClick,notifyChange:this._notifyChange,notifyHoverChange:this._notifyHoverChange}},i.render=function(){return this.props.children&&W(this.props.children)[0]||null},r}(B);function ei(e,t,n){var r=e.getState().engine,i=e.getState().shell;!r.adBreak&&r.isPlaying&&i.playerHover!==t.payload.hover&&n.dispatchEvent(new Yr(t.payload.hover))}function ti(e,t,n){switch(t.name){case"Volume":n.dispatchEvent(new $r(t.payload.volume));break;case"SeekBarPlaybackContainer":case"SeekBarLivePlaybackContainer":n.dispatchEvent(new zr(t.payload.from,t.payload.to));break;case"ActivePreset":n.dispatchEvent(new Dr(Dr.Type.UI_PRESET_CHANGE,t.payload))}}function ni(e,t,n){switch(t.name){case"Keyboard":si[t.payload.key](e,t,n);break;case"OverlayAction":!function(e,t,n){"PlayPause"===t.payload.type?ri(e,0,n):"Fullscreen"===t.payload.type&&ai(0,0,n)}(e,t,n);break;case"Settings":!function(e,t,n){t.payload.type===n.Track.VIDEO?n.dispatchEvent(new Gr(t.payload.track)):"speed"===t.payload.type?n.dispatchEvent(new Wr(t.payload.speed)):"AdvancedAudioDescription"===t.payload.type&&n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_ADVANCED_AUDIO_DESCRIPTION,t.payload))}(0,t,n);break;case"CVAAOverlay":n.dispatchEvent(new Kr(t.payload.textStyle));break;case"Fullscreen":ai(0,0,n);break;case"Language":!function(e,t,n){t.payload.type===n.Track.AUDIO?n.dispatchEvent(new Vr(t.payload.track)):t.payload.type===n.Track.TEXT&&n.dispatchEvent(new Hr(t.payload.track))}(0,t,n);break;case"Shell":n.dispatchEvent(new Dr(Dr.Type.UI_CLICKED));break;case"Rewind":n.dispatchEvent(new qr(t.payload.from,t.payload.to));break;case"Forward":n.dispatchEvent(new Xr(t.payload.from,t.payload.to));break;case"LiveTag":n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_LIVE_TAG));break;case"PrePlaybackPlayOverlay":case"PlayPause":ri(e,0,n);break;case"Volume":ii(e,0,n);break;case"PictureInPicture":oi(0,0,n);break;case"ClosedCaptions":!function(e,t,n){t.payload?n.dispatchEvent(new Dr(Dr.Type.USER_HID_CAPTIONS)):n.dispatchEvent(new Dr(Dr.Type.USER_SHOWED_CAPTIONS))}(0,t,n)}}function ri(e,t,n){var r=e.getState().engine;r.adBreak?r.adIsPlaying?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PLAY)):r.isPlaying?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PLAY))}function ii(e,t,n){e.getState().engine.muted?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_MUTE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_UNMUTE))}function ai(e,t,n){n.isFullscreen()?n.dispatchEvent(new Dr(Dr.Type.USER_EXITED_FULL_SCREEN)):n.dispatchEvent(new Dr(Dr.Type.USER_ENTERED_FULL_SCREEN))}function oi(e,t,n){n.isInPictureInPicture()?n.dispatchEvent(new Dr(Dr.Type.USER_EXITED_PICTURE_IN_PICTURE)):n.dispatchEvent(new Dr(Dr.Type.USER_ENTERED_PICTURE_IN_PICTURE))}var si=((jr={})[Ln.SPACE]=function(e,t,n){ri(e,0,n)},jr[Ln.UP]=function(e,t,n){n.dispatchEvent(new $r(t.payload.volume))},jr[Ln.DOWN]=function(e,t,n){n.dispatchEvent(new $r(t.payload.volume))},jr[Ln.F]=function(e,t,n){ai(0,0,n)},jr[Ln.P]=function(e,t,n){oi(0,0,n)},jr[Ln.ESC]=function(e,t,n){ai(0,0,n)},jr[Ln.LEFT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},jr[Ln.RIGHT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},jr[Ln.HOME]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},jr[Ln.END]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},jr[Ln.M]=function(e,t,n){ii(e,0,n)},jr[Ln.SEMI_COLON]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},jr[Ln.PERIOD]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},jr[Ln.COMMA]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},jr[Ln.C]=function(e,t,n){n.dispatchEvent(new Hr(t.payload.track))},jr);function li(){return(li=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ui,ci,pi,di,fi=function(e){return function(t){return function(n){var r,i;function a(){return n.apply(this,arguments)||this}i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var o=a.prototype;return o.notifyClick=function(t){this.context.notifyClick({name:e,payload:t})},o.notifyChange=function(t){this.context.notifyChange({name:e,payload:t})},o.notifyHoverChange=function(t){this.context.notifyHoverChange({name:e,payload:t})},o.render=function(){var e=this;return N(t,li({},this.props,{notifyHoverChange:function(t){return e.notifyHoverChange(t)},notifyChange:function(t){return e.notifyChange(t)},notifyClick:function(t){return e.notifyClick(t)}}))},a}(B)}},hi=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){this._observer&&this._observer.disconnect(),this._observer=null,this._el=null},i.init=function(e){this._observer||(this._el=e,window.ResizeObserver?this._createNativeObserver():this._createIframeObserver(),this._el instanceof HTMLElement&&this._observer&&this._observer.observe(this._el))},i._createNativeObserver=function(){var e=this;this._observer=new window.ResizeObserver((function(t){t.forEach((function(){e._triggerResize()}))}))},i._createIframeObserver=function(){this._observer=new gi(this._triggerResize.bind(this))},i._triggerResize=function(){this.dispatchEvent(new Dr(Dr.Type.RESIZE))},r}(Rr),gi=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_observersStore",{}),this._onChangeCallback=e}var t=e.prototype;return t.observe=function(e){var t=this,n=this._createIframe(),r=e.getAttribute("id");this._observersStore[r]=n,e.appendChild(n),n.contentWindow.onresize=function(){return t._onChangeCallback()}},t.disconnect=function(){for(var e in this._observersStore){var t=document.getElementById(e),n=this._observersStore[e];n.onresize=null,t&&(t.removeChild(n),delete this._observersStore[t.getAttribute("id")])}},t._createIframe=function(){var e=document.createElement("iframe");return e.className="playkit-size-iframe",e},e}(),yi=function(e,t,n){var r;return void 0===n&&(n=!0),function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=void 0;n&&!r&&e.apply(s,a),clearTimeout(r),r=setTimeout((function(){r=null,n||e.apply(s,a)}),t)}};function vi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bi(){return(bi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _i,Ei={TINY:"tiny",EXTRA_SMALL:"extrasmall",SMALL:"small",MEDIUM:"medium",LARGE:"large",EXTRA_LARGE:"extralarge"},ki=(ui=$t((function(e){return{targetId:e.config.targetId,forceTouchUI:e.config.forceTouchUI,hoverTimeout:e.config.hoverTimeout,metadataLoaded:e.engine.metadataLoaded,currentState:e.engine.playerState.currentState,playerClasses:e.shell.playerClasses,isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,isCasting:e.engine.isCasting,guiClientRect:e.shell.guiClientRect,playerHover:e.shell.playerHover,playerNav:e.shell.playerNav,seekbarDraggingActive:e.seekbar.draggingActive,seekbarHoverActive:e.seekbar.hoverActive,volumeHoverActive:e.volume.hover,adBreak:e.engine.adBreak,prePlayback:e.engine.prePlayback,smartContainerOpen:e.shell.smartContainerOpen,fullscreen:e.engine.fullscreen,fallbackToMutedAutoPlay:e.engine.fallbackToMutedAutoPlay,playlist:e.engine.playlist}}),ur(bi({},sr,Tr))),ci=jn("Shell"),pi=fi("Shell"),ui(di=Sr(di=Br(di=ci(di=pi(di=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mi(vi(t=e.call.apply(e,[this].concat(r))||this),"onMouseOver",(function(){t.props.isMobile||t.state.nav&&(t.setState({nav:!1}),t.props.updatePlayerNavState(!1))})),mi(vi(t),"onMouseLeave",(function(e){Object.prototype.hasOwnProperty.call(e,"toElement")&&(t.props.isMobile||t.state.hover&&t._updatePlayerHover(!1))})),mi(vi(t),"onMouseMove",(function(){t.props.isMobile||t._updatePlayerHoverState()})),mi(vi(t),"onMouseUp",(function(){t.unMuteFallback(),t.props.notifyClick(),t._startHoverTimeout()})),mi(vi(t),"onTouchEnd",(function(e){t.props.prePlayback||(t.props.fallbackToMutedAutoPlay&&(t.props.player.muted=!1),t.state.hover||e.stopPropagation(),t._updatePlayerHoverState())})),mi(vi(t),"onKeyDown",(function(e){t.state.nav||e.keyCode!==Ln.TAB||(t.setState({nav:!0}),t.props.updatePlayerNavState(!0)),!t.state.nav||e.keyCode!==Ln.ENTER&&e.keyCode!==Ln.SPACE||(t.unMuteFallback(),e.srcElement.contains(t._playerRef)&&(e.preventDefault(),t.props.player.paused?t.props.player.play():t.props.player.pause()))})),mi(vi(t),"_onWindowResize",(function(){t._updatePlayerClientRect(),document.body&&t.props.updateDocumentWidth(document.body.clientWidth)})),mi(vi(t),"_updatePlayerClientRect",(function(){var e=document.getElementById(t.props.targetId);e&&t.props.updatePlayerClientRect(e.getBoundingClientRect())})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.unMuteFallback=function(){this.props.fallbackToMutedAutoPlay&&(this.props.player.muted=!1)},i.componentWillMount=function(){var e=this.props,t=e.player,n=e.forceTouchUI;this._environmentClasses=["playkit-"+t.env.os.name.replace(/ /g,"-"),"playkit-"+t.env.browser.name.replace(/ /g,"-")];var r=t.env,i=r.isIPadOS,a=r.isTablet,o=r.isMobile;this.props.updateIsMobile(i||a||o||n)},i.componentDidMount=function(){var e=this,t=this.props,n=t.player,r=t.eventManager;r.listen(window,"resize",yi(this._onWindowResize,100)),r.listen(document,"scroll",yi(this._updatePlayerClientRect,100)),this._playerResizeWatcher=new hi,this._playerResizeWatcher.init(document.getElementById(this.props.targetId)),r.listen(this._playerResizeWatcher,Dr.Type.RESIZE,yi(this._onWindowResize,100)),r.listen(n,n.Event.FIRST_PLAY,(function(){return e._onWindowResize()})),this._onWindowResize()},i.componentWillUnmount=function(){this._clearHoverTimeout(),this._playerResizeWatcher.destroy()},i._updatePlayerHoverState=function(){this.props.prePlayback||(this.state.hover||this._updatePlayerHover(!0),this._startHoverTimeout())},i._updatePlayerHover=function(e){this.props.updatePlayerHoverState(e),this.props.notifyHoverChange({hover:e}),this.setState({hover:e})},i._canEndHoverState=function(){return!this.props.seekbarDraggingActive&&!this.props.seekbarHoverActive&&!this.props.volumeHoverActive&&!this.props.smartContainerOpen&&(!this.props.player.paused||this.props.adBreak)},i._startHoverTimeout=function(){var e=this;this._clearHoverTimeout(),this.props.hoverTimeout&&(this.hoverTimeout=setTimeout((function(){e._canEndHoverState()&&e._updatePlayerHover(!1)}),this.props.hoverTimeout))},i._clearHoverTimeout=function(){this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null)},i.componentDidUpdate=function(e){(this.state.hover!==this.props.playerHover||"playing"===this.props.currentState&&"paused"===e.currentState||!this.props.prePlayback&&e.prePlayback||!this.props.adBreak&&e.adBreak||this.props.adBreak&&!e.adBreak)&&(this.state.hover!==this.props.playerHover&&this.props.notifyHoverChange({hover:this.props.playerHover}),this._updatePlayerHoverState())},i.render=function(e){var t=this,n=[pr.a.player,pr.a.skinDefault].concat(this._environmentClasses).concat(e.playerClasses);return this.props.prePlayback&&n.push(pr.a.prePlayback),this.props.isCasting&&n.push("playkit-casting"),this.props.isMobile&&n.push(pr.a.touch),this.props.playerNav&&n.push(pr.a.nav),(this.props.playerHover||this.props.playerNav)&&n.push(pr.a.hover),this.props.metadataLoaded&&n.push(pr.a.metadataLoaded),this.props.adBreak&&n.push(pr.a.adBreak),this.props.metadataLoaded&&n.push(pr.a["state-"+this.props.currentState]),this.props.seekbarDraggingActive&&n.push(pr.a.hover),this.props.fullscreen&&n.push(pr.a.fullscreen),this.props.playlist&&n.push(pr.a.playlist),this.props.guiClientRect&&(this.props.guiClientRect.width<=280?(n.push(pr.a.sizeTy),this.props.updatePlayerSize(Ei.TINY)):this.props.guiClientRect.width<=380?(n.push(pr.a.sizeXs),this.props.updatePlayerSize(Ei.EXTRA_SMALL)):this.props.guiClientRect.width<=480?(n.push(pr.a.sizeSm),this.props.updatePlayerSize(Ei.SMALL)):this.props.guiClientRect.width<=768?(n.push(pr.a.sizeMd),this.props.updatePlayerSize(Ei.MEDIUM)):this.props.guiClientRect.width<=1024?(n.push(pr.a.sizeLg),this.props.updatePlayerSize(Ei.LARGE)):this.props.updatePlayerSize(Ei.EXTRA_LARGE),this.props.updateIsSmallSize([Ei.SMALL,Ei.EXTRA_SMALL].includes(this.props.playerSize))),n.push("notranslate"),N("div",{tabIndex:"0",ref:function(e){return t._playerRef=e},"aria-label":"Video Player",className:n=n.join(" "),onTouchEnd:this.onTouchEnd,onMouseUp:this.onMouseUp,onMouseOver:this.onMouseOver,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onKeyDown:this.onKeyDown},e.children)},r}(B))||di)||di)||di)||di)||di);function Ti(){return(Ti=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ai(e){var t,n=e.sidePanelsSizes,r=e.sidePanelsModes,i=e.playerClientRect,a=e.isVideo,o=n[Zn.VERTICAL],s=i.width,l=Math.max(o.min,Math.min(o.max,s*o.ratio)),u=r[Jn.LEFT],c=r[Jn.RIGHT],p=s-(t=a?u===er.ALONGSIDE&&c===er.ALONGSIDE?2:1:u!==er.HIDDEN&&c!==er.HIDDEN?2:1)*l;return s<480&&(p=s,l=s),{verticalPanelWidth:l,videoWidth:p,verticalPanelCount:t}}function wi(e){var t,n=e.sidePanelsSizes,r=e.sidePanelsModes,i=e.playerClientRect,a=e.isVideo,o=n[Zn.HORIZONTAL],s=i.height,l=Math.max(o.min,Math.min(o.max,s*o.ratio)),u=r[Jn.TOP],c=r[Jn.BOTTOM],p=s-(t=a?u===er.ALONGSIDE&&c===er.ALONGSIDE?2:1:u!==er.HIDDEN&&c!==er.HIDDEN?2:1)*l;return i.width<480&&(p=s,l=s),{horizontalPanelHeight:l,videoHeight:p,horizontalPanelCount:t}}function Si(e){var t=e.sidePanelsModes,n=e.allowSidePanels,r={position:"absolute",left:0,right:0,top:0,bottom:0},i=n?t[Jn.LEFT]:er.HIDDEN,a=n?t[Jn.RIGHT]:er.HIDDEN,o=n?t[Jn.TOP]:er.HIDDEN,s=n?t[Jn.BOTTOM]:er.HIDDEN;if(e.playerClientRect.width>480){if(i===er.ALONGSIDE||a===er.ALONGSIDE){var l=Ai(Ti({},e,{isVideo:!0})),u=l.verticalPanelWidth,c=l.videoWidth;r.left=i===er.ALONGSIDE?u:0,r.right=a===er.ALONGSIDE?u:0,r.width=c,r.position="absolute"}if(o===er.ALONGSIDE||s===er.ALONGSIDE){var p=wi(Ti({},e,{isVideo:!0})),d=p.horizontalPanelHeight,f=p.videoHeight;r.top=o===er.ALONGSIDE?d:0,r.bottom=s===er.ALONGSIDE?d:0,r.height=f,r.position="absolute"}}return r}function Ci(e){var t=e.position,n=e.sidePanelsModes,r=n[Jn.LEFT],i=n[Jn.RIGHT],a=n[Jn.TOP],o=n[Jn.BOTTOM];if(-1!==[Jn.RIGHT,Jn.LEFT].indexOf(t)){var s={},l=Ai(e).verticalPanelWidth;return s.width=l,t===Jn.RIGHT?(i===er.HIDDEN?(s.right=-l,s.opacity=0):(s.right=0,s.opacity=1),s):(r===er.HIDDEN?(s.left=-l,s.opacity=0):(s.left=0,s.opacity=1),s)}var u={},c=wi(e).horizontalPanelHeight,p=Ai(e).verticalPanelWidth;return u.height=c,r!==er.HIDDEN&&(u.left=p),i!==er.HIDDEN&&(u.right=p),t===Jn.TOP?(a===er.HIDDEN?(u.top=-c,u.opacity=0):(u.top=0,u.opacity=1),u):(o===er.HIDDEN?(u.bottom=-c,u.opacity=0):(u.bottom=0,u.opacity=1),u)}function xi(){return(xi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ii(e){var t,n;return e.allowSidePanels?((t={})[Jn.TOP]=Ci(xi({},e,{position:Jn.TOP})),t[Jn.BOTTOM]=Ci(xi({},e,{position:Jn.BOTTOM})),t[Jn.RIGHT]=Ci(xi({},e,{position:Jn.RIGHT})),t[Jn.LEFT]=Ci(xi({},e,{position:Jn.LEFT})),t):((n={})[Jn.TOP]={},n[Jn.BOTTOM]={},n[Jn.RIGHT]={},n[Jn.LEFT]={},n)}var Pi,Di=$t((function(e){return{sidePanelsModes:e.shell.sidePanelsModes,sidePanelsSizes:e.shell.sidePanelsSizes,allowSidePanels:e.shell.presetSettings.allowSidePanels,playerClientRect:e.shell.playerClientRect}}),ur(sr))(_i=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e){var t=this.props,n=t.sidePanelsModes,r=t.sidePanelsSizes,i=t.allowSidePanels,a=t.playerClientRect,o=e.sidePanelsModes,s=e.sidePanelsSizes,l=e.allowSidePanels,u=e.playerClientRect;return!(n===o&&r===s&&i===l&&a===u)},i.componentDidUpdate=function(){var e={sidePanelsModes:this.props.sidePanelsModes,sidePanelsSizes:this.props.sidePanelsSizes,playerClientRect:this.props.playerClientRect,allowSidePanels:this.props.allowSidePanels},t=function(e){var t=e.sidePanelsModes,n=e.playerClientRect,r=e.allowSidePanels,i={position:"absolute",left:0,right:0,top:0,bottom:0},a=n.width,o=n.height,s=r?t[Jn.LEFT]:er.HIDDEN,l=r?t[Jn.RIGHT]:er.HIDDEN,u=r?t[Jn.TOP]:er.HIDDEN,c=r?t[Jn.BOTTOM]:er.HIDDEN;if(n.width>480){if(s!==er.HIDDEN||l!==er.HIDDEN){var p=Ai(e).verticalPanelWidth;s!==er.HIDDEN&&(i.left=p),l!==er.HIDDEN&&(i.right=p)}if(u!==er.HIDDEN||c!==er.HIDDEN){var d=wi(e).horizontalPanelHeight;u!==er.HIDDEN&&(i.top=d),c!==er.HIDDEN&&(i.bottom=d)}a=a-i.right-i.left,o=o-i.top-i.bottom}var f=n.left+(s!==er.HIDDEN?i.left:0),h=n.top+(u!==er.HIDDEN?i.top:0);return{style:i,rect:{x:f,y:h,width:a,height:o,top:h,right:n.right+(l!==er.HIDDEN?i.right:0),bottom:n.bottom+(c!==er.HIDDEN?i.bottom:0),left:f}}}(e),n=t.style,r=t.rect;this.props.updateLayoutStyles({gui:n,video:Si(e),sidePanels:Ii(e)}),this.props.updateGuiClientRect(r)},i.render=function(){return null},r}(B))||_i;function Ri(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Li=jn("PlayerAreaProvider")(Pi=$t((function(e){return{activePresetName:e.shell.activePresetName}}))(Pi=function(e){var t,n;function r(){var t;return Oi(Ri(t=e.call(this)||this),"_validateComponentData",(function(e){var n=e.container||e.area;return!!(e.get&&e.presets&&n)||(t.props.logger.warn("component data with label '"+(e.label||"")+"' is invalid (did you remember to set 'get', 'presets' and 'area'?)"),!1)})),Oi(Ri(t),"_addNewComponentAndUpdateListeners",(function(e){return t._addNewComponent(e,!0)})),Oi(Ri(t),"_addNewComponent",(function(e,n){var r=Object.assign({},e);if(r.container&&(r.area=r.area||r.container,delete r.container),!t._validateComponentData(r))return function(){};var i=r.area;return r.presets.forEach((function(e){if((t._componentsByPreset[e]||(t._componentsByPreset[e]=[])).push(r),n){var a=t._findListeners(i,e);t._emitListeners(a)}})),function(){t._removeNewComponent(r)}})),Oi(Ri(t),"_removeNewComponent",(function(e){t._validateComponentData(e)&&e.presets.forEach((function(n){var r=t._componentsByPreset[n]||[],i=r.indexOf(e);if(-1!==i){r.splice(i,1);var a=t._findListeners(e.area,e.presetName);t._emitListeners(a)}}))})),Oi(Ri(t),"_findListeners",(function(e,n){return e?t._listeners.filter((function(t){return(!n||t.presetName===n)&&t.areaName===e})):[]})),Oi(Ri(t),"_listen",(function(e,n,r){if(!e||!n||!r)return function(){};var i=t._findListeners(n,e);i&&i.length>0&&(t.props.logger.warn("Another component is already registered to updates for player area '"+n+"' in preset '"+e+"'. Unlisten to previous listener"),i.forEach((function(e){t._unlisten(e)})));var a={presetName:e,areaName:n,callback:r};return t._listeners.push(a),t._emitListeners([a]),function(){t._unlisten(a)}})),Oi(Ri(t),"_unlisten",(function(e){var n=t._listeners.indexOf(e);-1!==n&&t._listeners.splice(n,1)})),Oi(Ri(t),"_getAreaComponents",(function(e,n){if(!n||!e)return[];var r=t._componentsByPreset[e];return(r?r.filter((function(e){return e.area===n})):[])||[]})),t._listeners=[],t._componentsByPreset={},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._initializePlayerComponents=function(){this.props.uiComponents&&this.props.uiComponents.length>0&&(this.props.uiComponents.forEach(this._addNewComponent),this._emitAllListeners())},i._emitListeners=function(e){var t=this,n=this.props.activePresetName;(e||[]).forEach((function(e){var r=e.presetName===n?t._getAreaComponents(n,e.areaName):[];try{e.callback(r)}catch(n){t.props.logger.error("Error occurred when handling player area "+e.areaName+" of preset "+e.presetName+".",n)}}))},i._emitAllListeners=function(){this._emitListeners(this._listeners)},i.componentDidMount=function(){this.props.setApi(this._addNewComponentAndUpdateListeners),this._initializePlayerComponents()},i.componentDidUpdate=function(e){e.activePresetName!==this.props.activePresetName&&this._emitAllListeners()},i.getChildContext=function(){return{playerAreaComponentsStore:{listen:this._listen,addNewComponent:this._addNewComponentAndUpdateListeners,getAreaComponents:this._getAreaComponents}}},i.render=function(e){return N(j,null,N(Di,null),e.children)},r}(B))||Pi)||Pi,Mi={allowSidePanels:!1,allowPlayerArea:!1},Ni=function(e){return function(t){var n;return $t(null,ur(sr))(n=function(n){var r,i;function a(){return n.apply(this,arguments)||this}i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var o=a.prototype;return o.componentDidMount=function(){var t=Object.assign({},Mi,e),n=t.allowSidePanels,r=t.allowPlayerArea;this.props.updatePresetSettings({allowSidePanels:n,allowPlayerArea:r})},o.shouldComponentUpdate=function(){return!1},o.render=function(e){return N(t,e)},a}(B))||n}};function Ui(){return(Ui=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Fi={UPDATE_SEEKBAR_DRAGGING_STATUS:"seekbar/UPDATE_SEEKBAR_DRAGGING_STATUS",UPDATE_SEEKBAR_HOVER_ACTIVE:"seekbar/UPDATE_SEEKBAR_HOVER_ACTIVE",UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE:"seekbar/UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE",UPDATE_SEEKBAR_CLIENT_RECT:"seekbar/UPDATE_SEEKBAR_CLIENT_RECT",UPDATE_HIDE_SEEKBAR_PREVIEW:"seekbar/UPDATE_HIDE_SEEKBAR_PREVIEW",UPDATE_HIDE_SEEKBAR_TIME_BUBBLE:"seekbar/UPDATE_HIDE_SEEKBAR_TIME_BUBBLE",UPDATE_CURRENT_TIME:"seekbar/UPDATE_CURRENT_TIME",UPDATE_VIRTUAL_TIME:"seekbar/UPDATE_VIRTUAL_TIME"},ji={currentTime:0,virtualTime:0,draggingActive:!1,hoverActive:!1,previewHoverActive:!1,clientRect:{x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0},hidePreview:!1,hideTimeBubble:!1},Bi=function(e,t){switch(void 0===e&&(e=ji),t.type){case Fi.UPDATE_SEEKBAR_DRAGGING_STATUS:return Ui({},e,{draggingActive:t.draggingActive});case Fi.UPDATE_SEEKBAR_HOVER_ACTIVE:return Ui({},e,{hoverActive:t.hoverActive});case Fi.UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE:return Ui({},e,{previewHoverActive:t.previewHoverActive});case Fi.UPDATE_SEEKBAR_CLIENT_RECT:return Ui({},e,{clientRect:t.clientRect});case Fi.UPDATE_HIDE_SEEKBAR_PREVIEW:return Ui({},e,{hidePreview:t.hidePreview});case Fi.UPDATE_HIDE_SEEKBAR_TIME_BUBBLE:return Ui({},e,{hideTimeBubble:t.hideTimeBubble});case Fi.UPDATE_CURRENT_TIME:return Ui({},e,{currentTime:t.currentTime});case Fi.UPDATE_VIRTUAL_TIME:return Ui({},e,{virtualTime:t.virtualTime});default:return e}},Vi={updateSeekbarDraggingStatus:function(e){return{type:Fi.UPDATE_SEEKBAR_DRAGGING_STATUS,draggingActive:e}},updateSeekbarHoverActive:function(e){return{type:Fi.UPDATE_SEEKBAR_HOVER_ACTIVE,hoverActive:e}},updateSeekbarPreviewHoverActive:function(e){return{type:Fi.UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE,previewHoverActive:e}},updateSeekbarClientRect:function(e){return{type:Fi.UPDATE_SEEKBAR_CLIENT_RECT,clientRect:e}},updateHideSeekbarPreview:function(e){return{type:Fi.UPDATE_HIDE_SEEKBAR_PREVIEW,hidePreview:e}},updateHideSeekbarTimeBubble:function(e){return{type:Fi.UPDATE_HIDE_SEEKBAR_TIME_BUBBLE,hideTimeBubble:e}},updateCurrentTime:function(e){return{type:Fi.UPDATE_CURRENT_TIME,currentTime:e}},updateVirtualTime:function(e){return{type:Fi.UPDATE_VIRTUAL_TIME,virtualTime:e}}};function Hi(){return(Hi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ki={UPDATE_VOLUME_DRAGGING_STATUS:"volume/UPDATE_VOLUME_DRAGGING_STATUS",UPDATE_HOVER:"volume/UPDATE_HOVER"},Gi={draggingActive:!1,hover:!1},zi=function(e,t){switch(void 0===e&&(e=Gi),t.type){case Ki.UPDATE_VOLUME_DRAGGING_STATUS:return Hi({},e,{draggingActive:t.draggingActive});case Ki.UPDATE_HOVER:return Hi({},e,{hover:t.hover});default:return e}},Wi={updateVolumeDraggingStatus:function(e){return{type:Ki.UPDATE_VOLUME_DRAGGING_STATUS,draggingActive:e}},updateVolumeHover:function(e){return{type:Ki.UPDATE_HOVER,hover:e}}};function Yi(){return(Yi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var qi={UPDATE_LOADING_SPINNER_STATE:"loading/UPDATE_LOADING_SPINNER_STATE"},Xi={show:!1},$i=function(e,t){switch(void 0===e&&(e=Xi),t.type){case gr.UPDATE:return dr("loading",e,t);case gr.UPDATE_COMPONENT:return fr("loading",e,t);case qi.UPDATE_LOADING_SPINNER_STATE:return Yi({},e,{show:t.show});default:return e}},Qi={updateLoadingSpinnerState:function(e){return{type:qi.UPDATE_LOADING_SPINNER_STATE,show:e}}};function Zi(){return(Zi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ji={UPDATE_CAPTIONS_STYLE:"cvaa/UPDATE_CAPTIONS_STYLE"},ea={style:"default"},ta=function(e,t){switch(void 0===e&&(e=ea),t.type){case Ji.UPDATE_CAPTIONS_STYLE:return Zi({},e,{style:t.style});default:return e}},na={updateCaptionsStyle:function(e){return{type:Ji.UPDATE_CAPTIONS_STYLE,style:e}}};function ra(){return(ra=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ia={UPDATE_QUALITY:"settings/UPDATE_QUALITY",UPDATE_SPEED:"settings/UPDATE_SPEED",UPDATE_AUDIO:"settings/UPDATE_AUDIO",UPDATE_ADVANCED_AUDIO_DESC:"settings/UPDATE_ADVANCED_AUDIO_DESC"},aa={quality:1,speed:2,advancedAudioDesc:!1},oa=function(e,t){switch(void 0===e&&(e=aa),t.type){case ia.UPDATE_QUALITY:return ra({},e,{quality:t.quality});case ia.UPDATE_SPEED:return ra({},e,{speed:t.speed});case ia.UPDATE_AUDIO:return ra({},e,{speed:t.audio});case ia.UPDATE_ADVANCED_AUDIO_DESC:return ra({},e,{advancedAudioDesc:t.isChecked});default:return e}},sa={updateQuality:function(e){return{type:ia.UPDATE_QUALITY,quality:e}},updateSpeed:function(e){return{type:ia.UPDATE_SPEED,speed:e}},updateAudio:function(e){return{type:ia.UPDATE_AUDIO,audio:e}},updateAdvancedAudioDesc:function(e){return{type:ia.UPDATE_ADVANCED_AUDIO_DESC,isChecked:e}}};function la(){return(la=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ua={UPDATE_ACTION_ICON:"overlay-action/UPDATE_ACTION_ICON"},ca={iconType:null},pa=function(e,t){switch(void 0===e&&(e=ca),t.type){case ua.UPDATE_ACTION_ICON:return la({},e,{iconType:t.iconType});default:return e}},da={updateOverlayActionIcon:function(e){return{type:ua.UPDATE_ACTION_ICON,iconType:e}}};function fa(){return(fa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ha={UPDATE_PLAYLIST_COUNTDOWN_CANCELED:"playlist-countdown/UPDATE_PLAYLIST_COUNTDOWN_CANCELED"},ga={countdownCanceled:!1},ya=function(e,t){switch(void 0===e&&(e=ga),t.type){case ha.UPDATE_PLAYLIST_COUNTDOWN_CANCELED:return fa({},e,{countdownCanceled:t.countdownCanceled});default:return e}},va={updatePlaylistCountdownCanceled:function(e){return{type:ha.UPDATE_PLAYLIST_COUNTDOWN_CANCELED,countdownCanceled:e}}};function ma(){return(ma=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ba,_a,Ea,ka={UPDATE_OVERLAY:"overlay/UPDATE_OVERLAY"},Ta={isOpen:!1},Aa=function(e,t){switch(void 0===e&&(e=Ta),t.type){case ka.UPDATE_OVERLAY:return ma({},e,{isOpen:t.isOpen});default:return e}},wa={updateOverlay:function(e){return{type:ka.UPDATE_OVERLAY,isOpen:e}}},Sa=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}var a,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:xt.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:xt.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+xt.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){a=e}return function(e,t){if(void 0===e&&(e={}),a)throw a;for(var r=!1,i={},s=0;s<o.length;s++){var l=o[s],u=n[l],c=e[l],p=u(c,t);if(void 0===p){var d=Dt(l,t);throw new Error(d)}i[l]=p,r=r||p!==c}return(r=r||o.length!==Object.keys(e).length)?i:e}}({config:vr,engine:kr,shell:or,seekbar:Bi,volume:zi,loading:$i,cvaa:ta,settings:oa,overlayAction:pa,playlist:ya,overlay:Aa}),Ca=n(6);function xa(){return(xa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ia,Pa,Da=Vi.updateCurrentTime,Ra=(ba=$t(kr,ur(xa({},Tr,Qi,sr,{seekbarUpdateCurrentTime:Da}))),_a=jn("EngineConnector"),ba(Ea=Sr(Ea=Br(Ea=_a(Ea=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props,n=t.player,r=t.eventManager,i=n.Track;this.props.updatePrePlayback(!n.config.playback.autoplay),r.listen(n,n.Event.PLAYER_RESET,(function(t){e.props.updateCurrentTime(0),e.props.seekbarUpdateCurrentTime(0),t.payload.isChangeMedia||e.props.updateIsIdle(!0),e.props.updateIsPlaybackStarted(!1),e.props.updateDataLoadingStatus(!1)})),r.listen(n,n.Event.SOURCE_SELECTED,(function(){e.props.updateIsCastAvailable(n.isCastAvailable()),e.props.updateIsLive(n.isLive()),e.props.updateIsVr(n.isVr()),e.props.updateIsImg(n.isUntimedImg()),e.props.updateIsInPictureInPicture(n.isInPictureInPicture()),n.config.playback.autoplay?e.props.updateLoadingSpinnerState(!0):e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.CHANGE_SOURCE_STARTED,(function(){e.props.updatePrePlayback(!n.config.playback.autoplay&&!e.props.engine.isPlaybackStarted),e.props.updateIsChangingSource(!0),e.props.updateFallbackToMutedAutoPlay(!1),e.props.updateAdBreak(!1),e.props.updateAdIsPlaying(!1),e.props.updateIsPlaying(!1),e.props.updateIsEnded(!1),e.props.updateIsPlaybackEnded(!1),e.props.updateLastSeekPoint(0),e.props.updateIsPaused(!1),e.props.engine.isCasting&&e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.CHANGE_SOURCE_ENDED,(function(){e.props.updateIsChangingSource(!1),e.props.updatePlayerPoster(n.poster),e.props.updateIsIdle(!1)})),r.listen(n,n.Event.PLAYER_STATE_CHANGED,(function(t){e.props.updatePlayerState(t.payload.oldState.type,t.payload.newState.type)})),r.listen(n,n.Event.TIME_UPDATE,(function(){e.props.updateCurrentTime(n.currentTime)})),r.listen(n,n.Event.DURATION_CHANGE,(function(){e.props.updateDuration(n.isLive()?n.liveDuration:n.duration)})),r.listen(n,n.Event.LOADED_DATA,(function(){e.props.updateDuration(n.isLive()?n.liveDuration:n.duration),e.props.updatePictureInPictureSupport(n.isPictureInPictureSupported()),e.props.updateDataLoadingStatus(!0)})),r.listen(n,n.Event.LOADED_METADATA,(function(){e.props.updateMuted(n.muted),e.props.updateMetadataLoadingStatus(!0),e.props.updateIsLive(n.isLive()),e.props.updateIsDvr(n.isDvr()),e.props.updatePlayerPoster(n.poster)})),r.listen(n,n.Event.VOLUME_CHANGE,(function(){e.props.updateVolume(n.volume)})),r.listen(n,n.Event.MUTE_CHANGE,(function(){e.props.updateMuted(n.muted),e.props.engine.fallbackToMutedAutoPlay&&e.props.updateFallbackToMutedAutoPlay(n.muted)})),r.listen(n,n.Event.PLAYBACK_START,(function(){e.props.updatePrePlayback(!1),e.props.updateIsPlaybackStarted(!0),e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AUTOPLAY_FAILED,(function(){e.props.updatePrePlayback(!0)})),r.listen(n,n.Event.FIRST_PLAY,(function(){e.props.updatePrePlayback(!1)})),r.listen(n,n.Event.PLAY,(function(){e.props.updateIsPlaying(!0),e.props.updateIsEnded(!1),e.props.updateIsPaused(!1),e.props.updateIsPlaybackEnded(!1)})),r.listen(n,n.Event.PAUSE,(function(){e.props.updateIsPlaying(!1),e.props.updateIsPaused(!0)})),r.listen(n,n.Event.SEEKING,(function(){e.props.updateIsSeeking(!0)})),r.listen(n,n.Event.SEEKED,(function(){e.props.updateIsSeeking(!1),e.props.updateLastSeekPoint(n.currentTime),e.props.updateIsPlaybackEnded(!1)})),r.listen(n,n.Event.ENDED,(function(){e.props.updateIsEnded(!0),e.props.updateIsPlaying(!1),e.props.updateIsPaused(!0)})),r.listen(n,n.Event.PLAYBACK_ENDED,(function(){e.props.updateIsPlaybackEnded(!0)})),r.listen(n,n.Event.TRACKS_CHANGED,(function(){var t=n.getTracks(i.AUDIO),r=n.getTracks(i.VIDEO),a=n.getTracks(i.TEXT);e.props.updateAudioTracks(t),e.props.updateVideoTracks(r),e.props.updateTextTracks(a)})),r.listen(n,n.Event.TEXT_TRACK_CHANGED,(function(){var t=n.getTracks(i.TEXT);e.props.updateTextTracks(t)})),r.listen(n,n.Event.AUDIO_TRACK_CHANGED,(function(){var t=n.getTracks(i.AUDIO);e.props.updateAudioTracks(t)})),r.listen(n,n.Event.VIDEO_TRACK_CHANGED,(function(){var t=n.getTracks(i.VIDEO);e.props.updateVideoTracks(t)})),r.listen(n,n.Event.AD_BREAK_START,(function(){e.props.updateHasError(!1),e.props.updateAdBreak(!0)})),r.listen(n,n.Event.AD_BREAK_END,(function(){e.props.updateAdBreak(!1)})),r.listen(n,n.Event.ALL_ADS_COMPLETED,(function(){e.props.updateAdBreak(!1)})),r.listen(n,n.Event.AD_PROGRESS,(function(t){var n=t.payload.adProgress.currentTime,r=t.payload.adProgress.duration;e.props.updateAdBreakProgress(n,r)})),r.listen(n,n.Event.AD_COMPLETED,(function(){e.props.updateAdBreakCompleted()})),r.listen(n,n.Event.AD_STARTED,(function(t){var n=t.payload.ad;e.props.updateLoadingSpinnerState(!1),e.props.updateAdIsPlaying(!0),e.props.updatePrePlayback(!1),e.props.updateAdIsBumper(n.bumper),e.props.updateAdContentType(n.contentType)})),r.listen(n,n.Event.AD_RESUMED,(function(){e.props.updateAdIsPlaying(!0)})),r.listen(n,n.Event.AD_PAUSED,(function(){e.props.updateAdIsPlaying(!1)})),r.listen(n,n.Event.AD_ERROR,(function(t){t.payload.severity===n.Error.Severity.CRITICAL&&e.props.updateAdBreak(!1)})),r.listen(n,n.Event.FALLBACK_TO_MUTED_AUTOPLAY,(function(){e.props.updateFallbackToMutedAutoPlay(!0)})),r.listen(n,n.Event.AD_LOADED,(function(t){var n=t.payload.ad;e.props.updateAdIsLinear(n.linear),e.props.updateAdIsBumper(n.bumper),e.props.updateAdClickUrl(n.clickThroughUrl),e.props.updateAdSkipTimeOffset(n.skipOffset),e.props.updateAdSkippableState(n.skippable)})),r.listen(n,n.Event.VR_STEREO_MODE_CHANGED,(function(t){e.props.updateVrStereoMode(t.payload.mode)})),r.listen(n,n.Event.ERROR,(function(t){t.payload.severity===n.Error.Severity.CRITICAL&&(e.props.updateIsIdle(!1),e.props.updateHasError(!0))})),r.listen(n,n.Event.Cast.CAST_SESSION_STARTED,(function(t){var n=t.payload.session;e.props.updateIsCasting(!0),e.props.updateCastSession(n),n.resuming&&e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.Cast.CAST_SESSION_ENDED,(function(){e.props.updateIsCasting(!1),e.props.updateCastSession(null)})),r.listen(n,n.Event.Cast.CAST_AVAILABLE,(function(t){var n=t.payload.available;e.props.updateIsCastAvailable(n)})),r.listen(n,n.Event.Playlist.PLAYLIST_ITEM_CHANGED,(function(){e.props.updatePlaylist({next:n.playlist.next,prev:n.playlist.prev})})),r.listen(n,n.Event.ENTER_PICTURE_IN_PICTURE,(function(){e.props.updateIsInPictureInPicture(!0)})),r.listen(n,n.Event.LEAVE_PICTURE_IN_PICTURE,(function(){e.props.updateIsInPictureInPicture(!1)})),r.listen(n,n.Event.PRESENTATION_MODE_CHANGED,(function(){e.props.updateIsInPictureInPicture(n.isInPictureInPicture()),e.props.updateFullscreen(n.isFullscreen())})),r.listen(n,n.Event.ENTER_FULLSCREEN,(function(){e.props.updateFullscreen(!0)})),r.listen(n,n.Event.EXIT_FULLSCREEN,(function(){e.props.updateFullscreen(!1)}))},i.shouldComponentUpdate=function(){return!1},i.render=function(){return N("span",null)},r}(B))||Ea)||Ea)||Ea)||Ea);function Oa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function La(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ra.displayName="EngineConnector";var Ma=(Ia=$t((function(e){return{videoStyles:e.shell.layoutStyles.video,targetId:e.config.targetId}}),ur(sr)),Sr(Pa=Br(Pa=Ia(Pa=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return La(Oa(t=e.call.apply(e,[this].concat(r))||this),"_onVideoResize",(function(){var e=t.props.player.getVideoElement();e&&t.props.updateVideoClientRect(e.getBoundingClientRect())})),La(Oa(t),"_setRef",(function(e){t._videoResizeWatcher&&(t.props.eventManager.unlisten(t._videoResizeWatcher,Dr.Type.RESIZE,t._onVideoResize),t._videoResizeWatcher.destroy()),e&&(t._el=e),t._el?t._el.appendChild(t.props.player.getView()):t.props.updateVideoClientRect({x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0})})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e){return e.videoStyles!==this.props.videoStyles},i.componentDidMount=function(){var e=this,t=this.props,n=t.eventManager,r=t.player;n.listen(r,r.Event.SOURCE_SELECTED,(function(){return e._onVideoResize()}));var i=new hi;i.init(this._el),this._videoResizeWatcher=i,this.props.eventManager.listen(this._videoResizeWatcher,Dr.Type.RESIZE,this._onVideoResize)},i.componentWillUnmount=function(){this._videoResizeWatcher.destroy()},i.render=function(){var e=this.props,t=e.videoStyles;return N("div",{id:e.targetId+"-video",className:pr.a.videoPlayer,style:t,ref:this._setRef},N(qn,{name:"VideoContainer"}))},r}(B))||Pa)||Pa)||Pa);function Na(){return(Na=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ja(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ba,Va=function(e){return function(t){var n,r;function i(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ja(Fa(e=t.call.apply(t,[this].concat(r))||this),"_accessibleChildren",[]),ja(Fa(e),"_isModal",!1),ja(Fa(e),"onKeyDown",(function(t){switch(t.keyCode){case Ln.ESC:e.props.onClose&&(e.props.onClose(),t.stopPropagation());break;case Ln.DOWN:case Ln.UP:if(document.activeElement&&!e._isModal){var n=e._accessibleChildren.indexOf(document.activeElement);n=(n+(t.keyCode==Ln.DOWN?1:-1)+e._accessibleChildren.length)%e._accessibleChildren.length,e._accessibleChildren[n].focus(),t.preventDefault(),t.stopPropagation()}break;case Ln.TAB:e._isModal?t.shiftKey||document.activeElement!==e._accessibleChildren[e._accessibleChildren.length-1]?t.shiftKey&&document.activeElement===e._accessibleChildren[0]&&(e._accessibleChildren[e._accessibleChildren.length-1].focus(),t.preventDefault(),t.stopPropagation()):(e._accessibleChildren[0].focus(),t.preventDefault(),t.stopPropagation()):(e._previouslyActiveElement=null,e.props.onClose&&e.props.onClose())}})),ja(Fa(e),"setDefaultFocusedElement",(function(t){t&&(e._defaultFocusedElement=t)})),ja(Fa(e),"addAccessibleChild",(function(t){t&&-1==e._accessibleChildren.indexOf(t)&&e._accessibleChildren.push(t)})),ja(Fa(e),"clearAccessibleChildren",(function(){e._accessibleChildren=[]})),ja(Fa(e),"focusOnDefault",(function(){var t=e._defaultFocusedElement||e._accessibleChildren.length&&e._accessibleChildren[0];t&&(e._previouslyActiveElement=document.activeElement,t.focus())})),ja(Fa(e),"setIsModel",(function(t){e.isModal=t})),e}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a,o,s=i.prototype;return s.componentDidMount=function(){this.focusOnDefault()},s.componentWillUnmount=function(){this._previouslyActiveElement&&this._previouslyActiveElement.focus()},s.render=function(t){return N(e,Na({},t,{setDefaultFocusedElement:this.setDefaultFocusedElement,focusOnDefault:this.focusOnDefault,addAccessibleChild:this.addAccessibleChild,clearAccessibleChildren:this.clearAccessibleChildren,handleKeyDown:this.onKeyDown,setIsModal:this.setIsModel}))},a=i,(o=[{key:"isModal",set:function(e){this._isModal=e}}])&&Ua(a.prototype,o),i}(B)};function Ha(e){var t=parseInt(e,10),n=Math.floor(t/3600),r=Math.floor((t-3600*n)/60),i=t-3600*n-60*r;return n<10&&(n="0"+n),r<10&&(r="0"+r),i<10&&(i="0"+i),("00"!==n?n+":":"")+r+":"+i}function Ka(e){for(var t=e.split(":"),n=0,r=1,i=t.length-1;i>=0;i--){var a=parseInt(t[i]);if(isNaN(a)||a>59){n=0;break}n+=a*r,r*=60}return n}function Ga(e){var t=parseInt(e);return t<10?"00:0"+e:t<=59?"00:"+e:Ha(t)}function za(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Wa,Ya,qa,Xa,$a,Qa=fi("ActivePreset")(Ba=$t((function(e){return{state:{shell:e.shell,engine:{adBreak:e.engine.adBreak,isLive:e.engine.isLive,hasError:e.engine.hasError,isIdle:e.engine.isIdle,isVr:e.engine.isVr,isImg:e.engine.isImg,playlist:e.engine.playlist}},config:e.config}}),ur(sr))(Ba=function(e){var t,n;function r(){var t;return t=e.call(this)||this,r.logger=Dn("ActivePreset"),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getMatchedUI=function(e,t){for(var n,r,i=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return za(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?za(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(r=i()).done;){var a=r.value;if(void 0===a.condition||a.condition(t)){n=a;break}}return n},i.render=function(e){var t,n=this.props,i=n.uis,a=n.state.shell.activePresetName;if(i.length>0){var o=(t=this.getMatchedUI(i,e.state))?t.template(e):i[i.length-1].template(e),s=o&&o.type.displayName||"";return a!==s&&(e.notifyChange({from:a,to:s}),e.updateActivePresetName(s),e.updatePresetSettings(null),r.logger.debug("update active preset to '"+a+"' and reset preset settings")),o}},r}(B))||Ba)||Ba,Za=$t((function(e){return{sidePanelsStyles:e.shell.layoutStyles.sidePanels,playerClientRect:e.shell.playerClientRect}}))(Wa=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e){var t=this.props,n=t.sidePanelsStyles,r=t.position,i=e.sidePanelsStyles,a=e.position;return n[r]!==i[a]},i.render=function(e){var t=e.position,n=e.sidePanelsStyles,r=-1!==[Jn.RIGHT,Jn.LEFT].indexOf(t)?"verticalSidePanel":"horizontalSidePanel",i=[pr.a.sidePanel,pr.a[r]],a="SidePanel"+(t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());return N("div",{style:n[t],className:i.join(" ")},N("div",{className:pr.a.sidePanelContent},N(qn,{name:a})))},r}(B))||Wa,Ja=$t((function(e){return{allowSidePanels:e.shell.presetSettings.allowSidePanels,allowPlayerArea:e.shell.presetSettings.allowPlayerArea,sidePanelsConfig:e.config.components.sidePanels}}),ur(sr))(Ya=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(){var e=this.props.sidePanelsConfig,t=e.verticalSizes,n=e.horizontalSizes;t&&this.props.updateSidePanelSize(Zn.VERTICAL,t),n&&this.props.updateSidePanelSize(Zn.HORIZONTAL,n)},i.render=function(){var e=this.props,t=e.uis,n=e.playerContainer,r=e.allowSidePanels,i=e.allowPlayerArea;return N(j,null,N(Qa,{uis:t,playerContainer:n}),r?N(j,null,N(Za,{position:Jn.RIGHT}),N(Za,{position:Jn.LEFT}),N(Za,{position:Jn.TOP}),N(Za,{position:Jn.BOTTOM})):void 0,i?N(qn,{name:"PlayerArea"}):void 0)},r}(B))||Ya,eo=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return N("div",{className:pr.a.spinner},Array(8).fill(0).map((function(e,t){return N("span",{key:t+1})})))},r}(B);eo.displayName="Spinner";var to,no=(qa=$t((function(e){return{show:e.loading.show,isMobile:e.shell.isMobile,adBreak:e.engine.adBreak,adIsLinear:e.engine.adIsLinear}}),ur(Qi)),Xa=jn("Loading"),qa($a=Sr($a=Br($a=Xa($a=function(e){var t,n;function r(){return e.call(this)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props,n=t.player,r=t.eventManager;r.listen(n,n.Event.PLAYER_STATE_CHANGED,(function(t){var r=n.State;t.payload.newState.type===r.IDLE||t.payload.newState.type===r.PLAYING||t.payload.newState.type===r.PAUSED?e.props.updateLoadingSpinnerState(!1):e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AD_BREAK_START,(function(){e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AD_PROGRESS,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.AD_STARTED,(function(){e.props.adIsLinear&&e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.ALL_ADS_COMPLETED,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.AUTOPLAY_FAILED,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.PLAYING,(function(){e.props.updateLoadingSpinnerState(!1)}))},i.render=function(e){if(e.show)return N("div",{className:[pr.a.loadingBackdrop,pr.a.show].join(" ")},N("div",{className:pr.a.spinnerContainer},N(qn,{name:nr.LoadingSpinner},N(eo,null))))},r}(B))||$a)||$a)||$a)||$a);function ro(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}no.displayName="Loading";var ao,oo=$t((function(e){return{guiStyles:e.shell.layoutStyles.gui}}))(to=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return io(ro(t=e.call.apply(e,[this].concat(r))||this),"_setRef",(function(e){e&&(t._ref=e,t.setState((function(e){return{render:!e.render}})))})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e,t){return e.guiStyles!==this.props.guiStyles||t.render!==this.state.render},i.render=function(){var e=this.props,t=e.guiStyles,n=W(e.children),r=n[0],i=n[1];return N("div",{ref:this._setRef,style:t,className:pr.a.guiArea},N("div",{style:{pointerEvents:"auto"}},N(qn,{name:"GuiArea"},r)),"function"==typeof i?i({containerRef:this._ref}):i)},r}(B))||to,so=Ni({allowSidePanels:!0,allowPlayerArea:!0})(ao=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N(oo,null,N(no,null))))},r}(B))||ao;function lo(e){return N(so,e)}function uo(){return(uo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function co(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}so.displayName="Idle";var fo,ho,go,yo,vo={Maximize:"maximize",Minimize:"minimize",Play:"play",Pause:"pause",VolumeBase:"volume-base",VolumeWaves:"volume-waves",VolumeWave:"volume-wave",VolumeMute:"volume-mute",Close:"close",Settings:"settings",Check:"check",CheckActive:"check-active",Language:"language",Quality:"quality",Captions:"captions",Speed:"speed",SpeedDown:"speed-down",SpeedUp:"speed-up",Audio:"audio",ArrowDown:"arrow-down",StartOver:"start-over",SeekEnd:"seek-end",Rewind:"rewind",Rewind10:"rewind10",Forward:"forward",Forward10:"forward10",vrStereo:"vr-stereo",vrStereoFull:"vr-stereo-full",Cast:"cast",CastBrand:"cast-brand",Next:"next",Prev:"prev",PictureInPictureStart:"picture-in-picture-start",PictureInPictureStop:"picture-in-picture-stop",ClosedCaptionsOn:"closed-captions-on",ClosedCaptionsOff:"closed-captions-off",AdvancedAudioDescription:"advanced-audio-description"},mo={qualityHd:pr.a.badgeIcon+" "+pr.a.iconQualityHd,qualityHdActive:pr.a.badgeIcon+" "+pr.a.iconQualityHdActive,quality4k:pr.a.badgeIcon+" "+pr.a.iconQuality4K,quality4kActive:pr.a.badgeIcon+" "+pr.a.iconQuality4KActive,quality8k:pr.a.badgeIcon+" "+pr.a.iconQuality8K,quality8kActive:pr.a.badgeIcon+" "+pr.a.iconQuality8KActive},bo={INACTIVE:0,ACTIVE:1},_o=function(e){var t,n;function r(t){var n;po(co(n=e.call(this,t)||this),"_defaultColor",pr.a.white),po(co(n),"_activeColor",pr.a.brandColor),po(co(n),"_className",""),po(co(n),"createDynamicIconClass",(function(e){var t=e.path,r=e.state,i=e.color,a=e.activeColor,o=e.width,s=e.height,l=e.viewBox,u=e.fillRule,c=n.getFillColor(r,i,a),p=n.getPathTag(t,c),d=n.getSVGUrl(p,o,s,l,u),f="."+n._className+" { background-image: "+d+"; }",h=document.getElementById(gf);h&&h.appendChild(document.createTextNode(f))})),po(co(n),"getSVGUrl",(function(e,t,n,r,i){void 0===t&&(t=36),void 0===n&&(n=36),void 0===r&&(r="0 0 1024 1024"),void 0===i&&(i="nonzero");for(var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="'+r+'" width="'+t+'" height="'+n+'" fill-rule="'+i+'">'+e+"</svg>",o=[['"',"'"],["%","%25"],["&","%26"],["#","%23"],["{","%7B"],["}","%7D"],["<","%3C"],[">","%3E"]],s=Math.ceil(a.length/2e3),l=0,u="",c=0;c<s;c++){for(var p=a.slice(l,l+2e3-1),d=0;d<o.length;d++)p=p.split(o[d][0]).join(o[d][1]);u=""+u+p,l+=2e3}return'url("data:image/svg+xml,'+u+'")'})),po(co(n),"getFillColor",(function(e,t,r){return e===bo.ACTIVE?r||n._activeColor:t||n._defaultColor})),po(co(n),"getPathTag",(function(e,t){return Array.isArray(e)||(e=[e]),e.map((function(e){var n="string"==typeof e?{d:e,fill:t}:uo({},e,{fill:t});return"<path "+Object.keys(n).map((function(e){return e+'="'+n[e]+'"'})).join(" ")+" />"})).join(" ")}));var r=t.path,i=t.id;if(r&&i){n._className="playkit-icon-"+i;var a=Array.from(document.styleSheets).find((function(e){return e.ownerNode.id===gf}));a&&Array.from(a.rules).find((function(e){return e.selectorText==="."+n._className}))||n.createDynamicIconClass(t)}return n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUpdate=function(e){this._className&&this.props.state!==e.state&&this.createDynamicIconClass(e)},i.render=function(e){if(this._className)return N("i",{className:[pr.a.icon,this._className].join(" ")});switch(e.type){case vo.Maximize:return N("i",{className:[pr.a.icon,pr.a.iconMaximize].join(" ")});case vo.Minimize:return N("i",{className:[pr.a.icon,pr.a.iconMinimize].join(" ")});case vo.Play:return N("i",{className:[pr.a.icon,pr.a.iconPlay].join(" ")});case vo.Pause:return N("i",{className:[pr.a.icon,pr.a.iconPause].join(" ")});case vo.VolumeBase:return N("i",{className:[pr.a.icon,pr.a.iconVolumeBase].join(" ")});case vo.VolumeWaves:return N("i",{className:[pr.a.icon,pr.a.iconVolumeWaves].join(" ")});case vo.VolumeWave:return N("i",{className:[pr.a.icon,pr.a.iconVolumeWave].join(" ")});case vo.VolumeMute:return N("i",{className:[pr.a.icon,pr.a.iconVolumeMute].join(" ")});case vo.Close:return N("i",{className:[pr.a.icon,pr.a.iconClose].join(" ")});case vo.Settings:return N("i",{className:[pr.a.icon,pr.a.iconSettings].join(" ")});case vo.Check:return N("i",{className:[pr.a.icon,pr.a.iconCheck].join(" ")});case vo.CheckActive:return N("i",{className:[pr.a.icon,pr.a.iconCheckActive].join(" ")});case vo.Language:return N("i",{className:[pr.a.icon,pr.a.iconLanguage].join(" ")});case vo.Quality:return N("i",{className:[pr.a.icon,pr.a.iconQuality].join(" ")});case vo.Captions:return N("i",{className:[pr.a.icon,pr.a.iconCaptions].join(" ")});case vo.Speed:return N("i",{className:[pr.a.icon,pr.a.iconSpeed].join(" ")});case vo.SpeedDown:return N("i",{className:[pr.a.icon,pr.a.iconSpeedDown].join(" ")});case vo.SpeedUp:return N("i",{className:[pr.a.icon,pr.a.iconSpeedUp].join(" ")});case vo.Audio:return N("i",{className:[pr.a.icon,pr.a.iconAudio].join(" ")});case vo.ArrowDown:return N("i",{className:[pr.a.icon,pr.a.iconArrowDown].join(" ")});case vo.StartOver:return N("i",{className:[pr.a.icon,pr.a.iconStartOver].join(" ")});case vo.SeekEnd:return N("i",{className:[pr.a.icon,pr.a.iconSeekEnd].join(" ")});case vo.Rewind:return N("i",{className:[pr.a.icon,pr.a.iconRewind].join(" ")});case vo.Rewind10:return N("i",{className:[pr.a.icon,pr.a.iconRewind10].join(" ")});case vo.Forward:return N("i",{className:[pr.a.icon,pr.a.iconForward].join(" ")});case vo.Forward10:return N("i",{className:[pr.a.icon,pr.a.iconForward10].join(" ")});case vo.vrStereo:return N("i",{className:[pr.a.icon,pr.a.iconVrStereo].join(" ")});case vo.vrStereoFull:return N("i",{className:[pr.a.icon,pr.a.iconVrStereoFull].join(" ")});case vo.Cast:return N("i",{className:[pr.a.icon,pr.a.iconChromecast].join(" ")});case vo.CastBrand:return N("i",{className:[pr.a.icon,pr.a.iconChromecastBrand].join(" ")});case vo.Next:return N("i",{className:[pr.a.icon,pr.a.iconNext].join(" ")});case vo.Prev:return N("i",{className:[pr.a.icon,pr.a.iconPrev].join(" ")});case vo.PictureInPictureStart:return N("i",{className:[pr.a.icon,pr.a.iconPictureInPictureStart].join(" ")});case vo.PictureInPictureStop:return N("i",{className:[pr.a.icon,pr.a.iconPictureInPictureStop].join(" ")});case vo.ClosedCaptionsOn:return N("i",{className:[pr.a.icon,pr.a.iconClosedCaptionsOn].join(" ")});case vo.ClosedCaptionsOff:return N("i",{className:[pr.a.icon,pr.a.iconClosedCaptionsOff].join(" ")});case vo.AdvancedAudioDescription:return N("i",{className:[pr.a.icon,pr.a.iconAdvancedAudioDescription].join(" ")})}},r}(B),Eo=_o,ko=function(e){return e.adBreak&&e.adIsPlaying||!e.adBreak&&e.isPlaying};function To(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ao(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wo(){return(wo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var So,Co,xo,Io=(fo=$t((function(e){return{isPlayingAdOrPlayback:ko(e.engine),iconType:e.overlayAction.iconType,playerHover:e.shell.playerHover,isMobile:e.shell.isMobile,guiStyles:e.shell.layoutStyles.gui,isSmartContainerOpen:e.shell.smartContainerOpen,fullscreenConfig:e.config.components.fullscreen,seekbarDraggingActive:e.seekbar.draggingActive}}),ur(wo({},da,sr))),ho=jn("OverlayAction"),go=fi("OverlayAction"),fo(yo=Sr(yo=ho(yo=go(yo=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ao(To(t=e.call.apply(e,[this].concat(r))||this),"_iconTimeout",null),Ao(To(t),"_pointerDownPosX",NaN),Ao(To(t),"_pointerDownPosY",NaN),Ao(To(t),"_firstClickTime",0),Ao(To(t),"_clickTimeout",null),Ao(To(t),"togglePlayPause",(function(){t.props.isPlayingAdOrPlayback?(t.props.player.pause(),t.props.updateOverlayActionIcon(vo.Pause)):(t.props.player.play(),t.props.updateOverlayActionIcon(vo.Play)),t.props.updatePlayerHoverState(!0),t.props.notifyClick({type:"PlayPause"})})),Ao(To(t),"onOverlayPointerDown",(function(e){t._pointerDownPosX=e.clientX||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientX,t._pointerDownPosY=e.clientY||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientY})),Ao(To(t),"onOverlayMouseUp",(function(e){t.isDragging(e)||t.overlayClick()})),Ao(To(t),"onOverlayTouchEnd",(function(e){e.preventDefault(),t.props.playerHover&&!t.isDragging(e)&&t.togglePlayPause()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUnmount=function(){this.cancelClickTimeout(),this.cancelIconTimeout()},i.toggleFullscreen=function(){this.props.player.isFullscreen()?(this.props.logger.debug("Exit fullscreen"),this.props.player.exitFullscreen()):(this.props.logger.debug("Enter fullscreen"),this.props.player.enterFullscreen()),this.props.notifyClick({type:"Fullscreen"})},i.isDragging=function(e){var t=e.clientX||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientX,n=e.clientY||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientY;return this.props.seekbarDraggingActive||Math.abs(t-this._pointerDownPosX)>5||Math.abs(n-this._pointerDownPosY)>5},i.overlayClick=function(){var e=this;if(!this.props.isSmartContainerOpen){if(!this.props.fullscreenConfig.disableDoubleClick){var t=Date.now();if(t-this._firstClickTime<200)return this.cancelClickTimeout(),void this.toggleFullscreen();if(t-this._firstClickTime<500)return this.cancelClickTimeout(),this.togglePlayPause(),this.toggleFullscreen(),void(this._firstClickTime=0);this._firstClickTime=t}this._clickTimeout=setTimeout((function(){e._clickTimeout=null,e.togglePlayPause()}),200)}},i.cancelClickTimeout=function(){this._clickTimeout&&(clearTimeout(this._clickTimeout),this._clickTimeout=null)},i.cancelIconTimeout=function(){this._iconTimeout&&(clearTimeout(this._iconTimeout),this._iconTimeout=null)},i.shouldComponentUpdate=function(e){return e.iconType&&this.toggleOverlayActionIcon(e.iconType),!0},i.toggleOverlayActionIcon=function(e){var t=this,n=function(){t.setState({animation:!0,iconType:e},(function(){t._iconTimeout=setTimeout((function(){t._iconTimeout=null,t.setState({animation:!1})}),300)}))};null!==this._iconTimeout?(this.cancelIconTimeout(),this.setState({animation:!1},(function(){t.forceUpdate(),n()}))):n()},i.render=function(){return N("div",{style:this.props.guiStyles,className:pr.a.overlayAction+" "+(this.state.animation?pr.a.in:""),onMouseDown:this.onOverlayPointerDown,onTouchStart:this.onOverlayPointerDown,onMouseUp:this.onOverlayMouseUp,onTouchEnd:this.onOverlayTouchEnd},this.state.animation?this.renderIcons():void 0)},i.renderIcons=function(){return Array.isArray(this.state.iconType)?this.state.iconType.map((function(e,t){return N(Eo,{key:t,type:e})})):N(Eo,{type:this.state.iconType})},i.componentDidUpdate=function(){this.state.animation&&this.props.updateOverlayActionIcon(null)},r}(B))||yo)||yo)||yo)||yo);function Po(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Do(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Io.displayName="OverlayAction";var Ro={Top:"top",Bottom:"bottom",TopRight:"top-right",TopLeft:"top-left",BottomRight:"bottom-right",BottomLeft:"bottom-left",Left:"left",Right:"right"},Oo=$t((function(e){return{playerClientRect:e.shell.playerClientRect,guiClientRect:e.shell.guiClientRect,isMobile:e.shell.isMobile}}))(So=Br((xo=Co=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Do(Po(t=e.call.apply(e,[this].concat(r))||this),"_hoverTimeout",null),Do(Po(t),"lastAlternativeTypeIndex",-1),Do(Po(t),"showTooltip",(function(){t.setState({showTooltip:!0})})),Do(Po(t),"hideTooltip",(function(){t.setState({showTooltip:!1})})),Do(Po(t),"handleFocusOnChildren",(function(){var e=t.props.children.props.onFocus;t.showTooltip(),e&&e()})),Do(Po(t),"handleBlurOnChildren",(function(){var e=t.props.children.props.onBlur;t.hideTooltip(),e&&e()})),Do(Po(t),"onMouseOver",(function(){t._clearHoverTimeout(),t._hoverTimeout=setTimeout((function(){t.showTooltip()}),750)})),Do(Po(t),"onMouseLeave",(function(){t.hideTooltip(),t._clearHoverTimeout()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._clearHoverTimeout=function(){this._hoverTimeout&&(clearTimeout(this._hoverTimeout),this._hoverTimeout=null)},i.getAlternateType=function(){var e=this;return Object.values(Ro).find((function(t,n){return n>e.lastAlternativeTypeIndex&&t!=e.props.type&&(e.lastAlternativeTypeIndex=n,!0)}))},i.isToolTipInBoundaries=function(){var e=this.textElement.getBoundingClientRect(),t=this.props.playerClientRect;return e.top>t.top+5&&e.bottom<t.bottom-5&&e.right<t.right-5&&e.left>t.left+5},i.componentWillMount=function(){this.setState({valid:!1,type:this.props.type})},i.componentDidMount=function(){var e=this;this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)}))},i.handleClickOutside=function(e){var t;!(null==(t=this.tooltipElement)?void 0:t.contains(e.target))&&this.state.showTooltip&&this.hideTooltip()},i.componentDidUpdate=function(e){if(this.props.guiClientRect!==e.guiClientRect)this.lastAlternativeTypeIndex=-1,this.setState({valid:!1,type:this.props.type});else if(this.state.showTooltip)if(this.isToolTipInBoundaries())this.state.valid||this.setState({valid:!0});else{var t=this.getAlternateType();t&&this.setState({valid:!1,type:t})}},i.componentWillUnmount=function(){this._clearHoverTimeout()},i.render=function(e){var t=this,n=[pr.a.tooltipLabel,pr.a["tooltip-"+this.state.type]];if(this.state.showTooltip&&this.state.valid?n.push(pr.a.show):n.push(pr.a.hide),e.isMobile)return W(e.children)[0];var r=ie(e.children,{onFocus:this.handleFocusOnChildren,onBlur:this.handleBlurOnChildren});return N("div",{className:pr.a.tooltip,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,ref:function(e){return e?t.tooltipElement=e:void 0}},r,N("span",{style:{maxWidth:e.maxWidth},ref:function(e){return e?t.textElement=e:void 0},className:n.join(" ")},e.label))},r}(B),Do(Co,"defaultProps",{type:Ro.Top,maxWidth:"240px"}),So=xo))||So)||So;function Lo(){return(Lo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Mo,No,Uo,Fo,jo,Bo=Fe((function(e,t){return N("button",Lo({type:"button",ref:t},e))}));function Vo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Bo.displayName="Button";var Ko=(Mo=$t((function(e){return{prePlayback:e.engine.prePlayback,isPlaybackEnded:e.engine.isPlaybackEnded,playlist:e.engine.playlist,loading:e.loading.show}}),ur(Qi)),No=jn("PrePlaybackPlayOverlay"),Uo=fi("PrePlaybackPlayOverlay"),Fo=An({startOverText:"controls.startOver",playText:"controls.play"}),Mo(jo=Sr(jo=No(jo=Uo(jo=Fo(jo=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ho(Vo(t=e.call.apply(e,[this].concat(r))||this),"handleClick",(function(){t.props.player.getView().focus(),t.props.playlist&&t.props.isPlaybackEnded?t.props.player.playlist.playNext():t.props.player.play(),t.props.notifyClick()})),Ho(Vo(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.handleClick()})),Ho(Vo(t),"onMouseOver",(function(e){e.stopPropagation()})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=e.isPlaybackEnded&&!e.player.config.playback.loop&&!(e.playlist&&e.playlist.next);if((e.prePlayback||t)&&!e.loading){var n=e.isPlaybackEnded?e.startOverText:e.playText;return N("div",{className:pr.a.prePlaybackPlayOverlay,onMouseOver:this.onMouseOver,onClick:this.handleClick},N(Bo,{className:pr.a.prePlaybackPlayButton,tabIndex:"0","aria-label":n,onKeyDown:this.onKeyDown},N(Oo,{label:n},e.isPlaybackEnded?N(Eo,{type:vo.StartOver}):N(Eo,{type:vo.Play}))))}},r}(B))||jo)||jo)||jo)||jo)||jo);function Go(){return(Go=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function zo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ko.displayName="PrePlaybackPlayOverlay";var Yo=function(e){return function(t){return Br(function(n){var r,i;function a(){for(var t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Wo(zo(t=n.call.apply(n,[this].concat(i))||this),"ref",{current:null}),Wo(zo(t),"animate",(function(){t.ref.current&&(t.ref.current.classList.add(e),t.props.eventManager.listenOnce(t.ref.current,"animationend",(function(){t.ref.current.classList.remove(e)})))})),t}return i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,a.prototype.render=function(){return N(t,Go({},this.props,{innerRef:this.ref,animate:this.animate}))},a}(B))}};function qo(){return(qo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Xo,$o,Qo,Zo,Jo,es,ts=Fe((function(e,t){var n=e.className,r=e.children,i=e.name,a=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["className","children","name"]),o=[pr.a.controlButtonContainer,"playkit-control-"+ns(i)];if(n){var s=Array.isArray(n)?n:[n];o=o.concat(s)}return N("div",qo({className:o.join(" "),ref:t},a),r)})),ns=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()};function rs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function is(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var as,os,ss,ls,us,cs,ps=(Xo=$t((function(e){return{isDvr:e.engine.isDvr,isLive:e.engine.isLive}})),$o=jn("Rewind"),Qo=fi("Rewind"),Zo=Yo(pr.a.rotate),Jo=An({rewindText:"controls.rewind"}),Xo(es=Sr(es=$o(es=Qo(es=Zo(es=Jo(es=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return is(rs(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){var e,n=t.props.player;t.props.animate();var r=t.props.step||10,i=n.currentTime,a=n.isLive()?n.getStartTimeOfDvrWindow():0;n.currentTime-r<a?t.props.isDvr||(e=a):e=n.currentTime-r,n.currentTime=e,t.props.notifyClick({from:i,to:e})})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return e.isLive&&!e.isDvr?void 0:N(ts,{name:"Rewind",className:pr.a.noIdleControl},N(Oo,{label:this.props.rewindText},N(Bo,{tabIndex:"0","aria-label":this.props.rewindText,className:""+pr.a.controlButton,ref:this.props.innerRef,onClick:this.onClick},N(Eo,{type:e.step&&10!==e.step?vo.Rewind:vo.Rewind10}))))},r}(B))||es)||es)||es)||es)||es)||es);function ds(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ps.displayName="Rewind";var hs,gs,ys,vs,ms=(as=$t((function(e){return{isDvr:e.engine.isDvr,isLive:e.engine.isLive}})),os=jn("Forward"),ss=fi("Forward"),ls=Yo(pr.a.reverseRotate),us=An({forwardText:"controls.forward"}),as(cs=Sr(cs=os(cs=ss(cs=ls(cs=us(cs=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fs(ds(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){var e,n=t.props.player;t.props.animate();var r=t.props.step||10,i=n.currentTime,a=n.isLive()?n.liveDuration:n.duration;n.currentTime+r>a?n.isOnLiveEdge()||(e=a):e=n.currentTime+r,n.currentTime=e,t.props.notifyClick({from:i,to:e})})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return e.isLive&&!e.isDvr?void 0:N(ts,{name:"Forward",className:pr.a.noIdleControl},N(Oo,{label:this.props.forwardText},N(Bo,{tabIndex:"0","aria-label":this.props.forwardText,className:""+pr.a.controlButton,ref:this.props.innerRef,onClick:this.onClick},N(Eo,{type:e.step&&10!==e.step?vo.Forward:vo.Forward10}))))},r}(B))||cs)||cs)||cs)||cs)||cs)||cs);function bs(){return(bs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Es(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ms.displayName="Forward";var ks,Ts,As,ws={preventDefault:!1,payload:null},Ss=(hs=$t((function(e){return{isPlayingAdOrPlayback:ko(e.engine),playerNav:e.shell.playerNav,textTracks:e.engine.textTracks,overlayOpen:e.overlay.isOpen}}),ur(Object.assign({},sr,da))),gs=jn("Keyboard"),ys=fi("Keyboard"),hs(vs=Sr(vs=gs(vs=ys(vs=function(e){var t,n;function r(t){var n,r;Es(_s(r=e.call(this)||this),"_lastActiveTextLanguage",""),Es(_s(r),"_hoverTimeout",null),Es(_s(r),"keyboardHandlers",((n={})[Ln.SPACE]=function(){return r.props.isPlayingAdOrPlayback?(r.props.player.pause(),r.props.updateOverlayActionIcon(vo.Pause)):(r.props.player.play(),r.props.updateOverlayActionIcon(vo.Play)),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:!0}},n[Ln.UP]=function(){var e=(Math.round(100*r.props.player.volume)+5)/100;return e=e>1?1:e,r.props.logger.debug("Changing volume. "+r.props.player.volume+" => "+e),r.props.player.muted&&(r.props.player.muted=!1),r.props.player.volume=e,r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]),{preventDefault:!0,payload:{volume:r.props.player.volume}}},n[Ln.DOWN]=function(){var e=(Math.round(100*r.props.player.volume)-5)/100;return e=e<0?0:e,r.props.logger.debug("Changing volume. "+r.props.player.volume+" => "+e),r.props.player.volume=e,0===e?(r.props.player.muted=!0,r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute])):r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWave]),{preventDefault:!0,payload:{volume:r.props.player.volume}}},n[Ln.F]=function(){return r.props.player.isFullscreen()?{preventDefault:!0,payload:null}:(r.props.logger.debug("Enter fullscreen"),r.props.player.enterFullscreen(),{preventDefault:!0,payload:!0})},n[Ln.P]=function(){return r.props.player.isInPictureInPicture()?(r.props.logger.debug("Exit Picture In Picture"),r.props.player.exitPictureInPicture()):(r.props.logger.debug("Enter Picture In Picture"),r.props.player.enterPictureInPicture()),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:!0}},n[Ln.ESC]=function(){return r.props.player.isFullscreen()?(r.props.logger.debug("Exit fullscreen"),r.props.player.exitFullscreen(),{preventDefault:!0,payload:!0}):{preventDefault:!0,payload:null}},n[Ln.LEFT]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime-5,t=r.props.player.currentTime,n=e>0?e:0;return r.props.logger.debug("Seek. "+t+" => "+n),r.props.player.currentTime=n,r.props.updateOverlayActionIcon(vo.Rewind),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:n}}}return{preventDefault:!0,payload:null}},n[Ln.RIGHT]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime+5,t=r.props.player.currentTime,n=e>r.props.player.duration?r.props.player.duration:e;return r.props.logger.debug("Seek. "+t+" => "+n),r.props.player.currentTime=e>r.props.player.duration?r.props.player.duration:e,r.props.updateOverlayActionIcon(vo.Forward),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:n}}}return{preventDefault:!0,payload:null}},n[Ln.HOME]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime;return r.props.logger.debug("Seek. "+e+" => 0"),r.props.player.currentTime=0,r.props.updateOverlayActionIcon(vo.StartOver),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:0}}}return{preventDefault:!0,payload:null}},n[Ln.END]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime,t=r.props.player.duration;return r.props.logger.debug("Seek. "+e+" => "+t),r.props.player.currentTime=t,r.props.updateOverlayActionIcon(vo.SeekEnd),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:t}}}return{preventDefault:!0,payload:null}},n[Ln.M]=function(){return r.props.logger.debug(r.props.player.muted?"Umnute":"Mute"),r.props.player.muted=!r.props.player.muted,r.props.player.muted?r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute]):r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]),{preventDefault:!0,payload:!0}},n[Ln.SEMI_COLON]=function(e){return e.shiftKey?r.props.player.playbackRate!==r.props.player.defaultPlaybackRate?(r.props.logger.debug("Changing playback rate. "+r.props.player.playbackRate+" => "+r.props.player.defaultPlaybackRate),r.props.player.playbackRate=r.props.player.defaultPlaybackRate,r.props.updateOverlayActionIcon(vo.Speed),{preventDefault:!0,payload:{speed:r.props.player.defaultPlaybackRate}}):{preventDefault:!0,payload:null}:ws},n[Ln.PERIOD]=function(e){if(e.shiftKey){var t=r.props.player.playbackRate,n=r.props.player.playbackRates.indexOf(t);return n<r.props.player.playbackRates.length-1?(r.props.logger.debug("Changing playback rate. "+t+" => "+r.props.player.playbackRates[n+1]),r.props.player.playbackRate=r.props.player.playbackRates[n+1],r.props.updateOverlayActionIcon(vo.SpeedUp),{preventDefault:!0,payload:{speed:r.props.player.playbackRates[n+1]}}):{preventDefault:!0,payload:null}}return ws},n[Ln.COMMA]=function(e){if(e.shiftKey){var t=r.props.player.playbackRate,n=r.props.player.playbackRates.indexOf(t);return n>0?(r.props.logger.debug("Changing playback rate. "+t+" => "+r.props.player.playbackRates[n-1]),r.props.player.playbackRate=r.props.player.playbackRates[n-1],r.props.updateOverlayActionIcon(vo.SpeedDown),{preventDefault:!0,payload:{speed:r.props.player.playbackRates[n-1]}}):{preventDefault:!0,payload:null}}return ws},n[Ln.C]=function(e){var t=r.props.player.getActiveTracks().text;if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return ws;if(t){if("off"===t.language&&r._lastActiveTextLanguage){r.props.logger.debug("Changing text track to language",r._lastActiveTextLanguage);var n=r.props.player.getTracks("text").find((function(e){return e.language===r._lastActiveTextLanguage}));return r.props.player.selectTrack(n),{preventDefault:!0,payload:{track:n}}}"off"===t.language||r._lastActiveTextLanguage||(r.props.logger.debug("Hiding text track"),r._lastActiveTextLanguage=t.language,r.props.player.hideTextTrack())}return{preventDefault:!0,payload:null}},n));var i=document.getElementById(t.config.targetId);return i?(i.onkeydown=function(e){var t=e.target instanceof Node&&e.target.nodeName||"";if(-1===["INPUT","SELECT","TEXTAREA"].indexOf(t)&&!r.props.overlayOpen&&!r.props.playerNav&&"function"==typeof r.keyboardHandlers[e.keyCode]){r.props.logger.debug("KeyDown -> keyName: "+function(e){for(var t in Ln)if(Ln[t]===e)return t;return"NOT_FOUND"}(e.keyCode)+", shiftKey: "+e.shiftKey.toString());var n=r.keyboardHandlers[e.keyCode](e),i=n.preventDefault,a=n.payload;i&&e.preventDefault(),a&&r.props.notifyClick(bs({key:e.keyCode},a))}},r):_s(r)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.componentWillReceiveProps=function(e){var t=this.props.textTracks.find((function(e){return e.active})),n=e.textTracks.find((function(e){return e.active}));t&&"off"!==t.language&&n&&"off"===n.language?this._lastActiveTextLanguage=t.language:n&&"off"!==n.language&&(this._lastActiveTextLanguage="")},r}(B))||vs)||vs)||vs)||vs);function Cs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Is=["keydown","keyup"],Ps=(ks=$t((function(e){return{playerNav:e.shell.playerNav,overlayOpen:e.overlay.isOpen}})),Ts=jn("KEYBOARD_PROVIDER"),ks(As=Br(As=Ts(As=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xs(Cs(t=e.call.apply(e,[this].concat(r))||this),"_keyboardListeners",[]),xs(Cs(t),"_isKeyboardEnable",!1),xs(Cs(t),"_componentToHandle",null),xs(Cs(t),"_addKeyboardHandler",(function(e,n,r,i){var a=t._createKeyCode(n,r);t._keyboardListeners[a]?t.props.logger.warn("Combination of key "+r.code+" altKey "+(!!r.altKey).toString()+" ctrlKey "+(!!r.ctrlKey).toString()+"\n metaKey "+(!!r.metaKey).toString()+" shiftKey "+(!!r.shiftKey).toString()+" already exist"):t._keyboardListeners[a]={callback:i,componentName:e}})),xs(Cs(t),"_removeKeyboardHandler",(function(e,n){var r=t._createKeyCode(e,n);t._keyboardListeners[r]&&delete t._keyboardListeners[r]})),xs(Cs(t),"_updateIsKeyboardEnabled",(function(e){t._isKeyboardEnable=e})),xs(Cs(t),"_setKeyboardEventToScope",(function(e){t._componentToHandle=e})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props,n=t.eventManager,r=t.playerContainer;this.keyEventHandler=this._keyEventHandler.bind(this),Is.forEach((function(t){n.listen(r,t,e.keyEventHandler)}))},i.shouldComponentUpdate=function(){return!1},i._keyEventHandler=function(e){var t=this._createKeyCode(e.type,{code:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),n=e.target instanceof Node&&e.target.nodeName||"";-1!==["INPUT","SELECT","TEXTAREA"].indexOf(n)||!this._shouldHandleKeyboardEvents()||!this._keyboardListeners[t]||"function"!=typeof this._keyboardListeners[t].callback||this._componentToHandle&&this._keyboardListeners[t].componentName!==this._componentToHandle||(e.preventDefault(),e.stopPropagation(),this._keyboardListeners[t].callback(e))},i._shouldHandleKeyboardEvents=function(){return this._isKeyboardEnable&&!this.props.playerNav&&!this.props.overlayOpen},i._createKeyCode=function(e,t){var n=Is.indexOf(e),r=t.altKey?1:0,i=t.ctrlKey?1:0,a=t.metaKey?1:0,o=t.shiftKey?1:0;return parseInt(""+n+t.code+r+i+a+o)},i.getChildContext=function(){return{addKeyboardHandler:this._addKeyboardHandler,removeKeyboardHandler:this._removeKeyboardHandler,updateIsKeyboardEnabled:this._updateIsKeyboardEnabled,setKeyboardEventToScope:this._setKeyboardEventToScope}},i.render=function(){return this.props.children&&W(this.props.children)[0]||null},r}(B))||As)||As)||As);function Ds(){return(Ds=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Rs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Os(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ls,Ms,Ns,Us,Fs=function(e){return function(t){return function(n){var r,i;function a(){for(var t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Os(Rs(t=n.call.apply(n,[this].concat(i))||this),"keyboardEventHandlers",[]),Os(Rs(t),"_updateIsKeyboardEnabled",(function(e){t.context.updateIsKeyboardEnabled(e)})),Os(Rs(t),"_setKeyboardEventToScope",(function(n){n?t.context.setKeyboardEventToScope(e):t.context.setKeyboardEventToScope(null)})),t}i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var o=a.prototype;return o.componentDidMount=function(){var t=this;this.keyboardEventHandlers.forEach((function(n){var r=n.eventType?n.eventType:Is[0];t._addKeyboardHandler(e,r,n.key,n.action)}))},o.componentWillUnmount=function(){var e=this;this.keyboardEventHandlers.forEach((function(t){var n=t.eventType?t.eventType:Is[0];e._removeKeyboardHandler(n,t.key)}))},o.registerKeyboardEvents=function(e){this.keyboardEventHandlers=e},o._addKeyboardHandler=function(e,t,n,r){this.context.addKeyboardHandler(e,t,n,r)},o._removeKeyboardHandler=function(e,t){this.context.removeKeyboardHandler(e,t)},o.render=function(){var e=this;return N(t,Ds({},this.props,{setKeyboardEventToScope:function(t){return e._setKeyboardEventToScope(t)},updateIsKeyboardEnabled:function(t){return e._updateIsKeyboardEnabled(t)},registerKeyboardEvents:function(t){return e.registerKeyboardEvents(t)}}))},a}(B)}},js="chromecast";function Bs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hs,Ks,Gs,zs,Ws,Ys,qs=(Ls=$t((function(e){return{isCasting:e.engine.isCasting,isCastAvailable:e.engine.isCastAvailable}})),Ms=jn("Cast"),Ns=An({castText:"cast.play_on_tv"}),Ls(Us=Sr(Us=Br(Us=Ms(Us=Ns(Us=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vs(Bs(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){t.props.player.setIsCastInitiator(js,!0),t.props.eventManager.listenOnce(t.props.player,t.props.player.Event.Cast.CAST_SESSION_START_FAILED,(function(){return t.props.player.setIsCastInitiator(js,!1)}))})),Vs(Bs(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.props.player.startCasting(js)})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){if(e.isCasting||e.isCastAvailable){var t=e.isCasting?pr.a.castButton+" "+pr.a.castButtonActive:pr.a.castButton;return N("div",{role:"button","aria-label":this.props.castText,className:pr.a.controlButtonContainer,onClick:this.onClick,onKeyDown:this.onKeyDown},N(Oo,{label:this.props.castText},N("google-cast-launcher",{className:t,tabIndex:"0"})))}},r}(B))||Us)||Us)||Us)||Us)||Us);function Xs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}qs.displayName="Cast";var Qs,Zs,Js,el,tl,nl,rl=(Hs=$t((function(e){return{isInFullscreen:e.engine.fullscreen,targetId:e.config.targetId}})),Ks=jn("Fullscreen"),Gs=Fs("Fullscreen"),zs=fi("Fullscreen"),Ws=An({fullscreenText:"controls.fullscreen",fullscreenExitText:"controls.fullscreenExit"}),Hs(Ys=Sr(Ys=Ks(Ys=Gs(Ys=zs(Ys=Ws(Ys=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $s(Xs(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.F},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.ESC},action:function(e){t.handleKeydown(e)}}]),$s(Xs(t),"toggleFullscreen",(function(){var e=t.props,n=e.targetId,r=e.logger,i=e.player;r.debug("Toggle fullscreen");var a=document.getElementById(n);i.isFullscreen()?i.exitFullscreen():i.enterFullscreen(),a&&a.focus(),t.props.notifyClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.handleKeydown=function(e){switch(e.keyCode){case Ln.F:this.props.player.isFullscreen()||this.toggleFullscreen();break;case Ln.ESC:this.props.player.isFullscreen()&&this.toggleFullscreen()}},i.render=function(){return N(ts,{name:"Fullscreen"},N(Oo,{label:this.props.isInFullscreen?this.props.fullscreenExitText:this.props.fullscreenText},N(Bo,{tabIndex:"0","aria-label":this.props.isInFullscreen?this.props.fullscreenExitText:this.props.fullscreenText,className:this.props.isInFullscreen?[pr.a.controlButton,pr.a.isFullscreen].join(" "):pr.a.controlButton,onClick:this.toggleFullscreen},N(Eo,{type:vo.Maximize}),N(Eo,{type:vo.Minimize}))))},r}(B))||Ys)||Ys)||Ys)||Ys)||Ys)||Ys);function il(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function al(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ol(){return(ol=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}rl.displayName="Fullscreen";var sl,ll=(Qs=$t((function(e){return{isPlayingAdOrPlayback:ko(e.engine),isPlaying:e.engine.isPlaying,adBreak:e.engine.adBreak,isPlaybackEnded:e.engine.isPlaybackEnded}}),ur(ol({},sr,sa,da))),Zs=Fs("PlayPause"),Js=jn("PlayPause"),el=fi("PlayPause"),tl=An({startOverText:"controls.startOver",pauseText:"controls.pause",playText:"controls.play"}),Qs(nl=Sr(nl=Zs(nl=Js(nl=el(nl=tl(nl=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return al(il(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.SPACE},action:function(){t.props.isPlayingAdOrPlayback?t.props.updateOverlayActionIcon(vo.Pause):t.props.updateOverlayActionIcon(vo.Play),t.togglePlayPause(),t.props.updatePlayerHoverState(!0)}}]),al(il(t),"togglePlayPause",(function(){t.props.logger.debug("Toggle play"),t.props.isPlayingAdOrPlayback?t.props.player.pause():t.props.player.play(),t.props.notifyClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.render=function(e){var t=this.props.isPlayingAdOrPlayback?[pr.a.controlButton,pr.a.isPlaying].join(" "):pr.a.controlButton,n=e.isPlaybackEnded&&!this.props.adBreak,r=this.props.isPlayingAdOrPlayback?this.props.pauseText:this.props.playText,i=n?this.props.startOverText:r;return N(ts,{name:"PlayPause"},N(Oo,{label:i},N(Bo,{tabIndex:"0","aria-label":i,className:t,onClick:this.togglePlayPause},n?N(Eo,{type:vo.StartOver}):N("div",null,N(Eo,{type:vo.Play}),N(Eo,{type:vo.Pause})))))},r}(B))||nl)||nl)||nl)||nl)||nl)||nl);function ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pl(){return(pl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}ll.displayName="PlayPause";var dl,fl,hl,gl,yl,vl,ml=$t((function(e){return{audioTracks:e.engine.audioTracks,textTracks:e.engine.textTracks,videoTracks:e.engine.videoTracks,isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,isLive:e.engine.isLive,showQualityMenu:e.config.settings.showQualityMenu,showAudioMenu:e.config.settings.showAudioMenu,showCaptionsMenu:e.config.settings.showCaptionsMenu,showSpeedMenu:e.config.settings.showSpeedMenu,showAdvancedAudioDescToggle:e.config.settings.showAdvancedAudioDescToggle}}),ur(pl({},sa,da)))(sl=An({buttonLabel:"controls.settings"})(sl=Sr(sl=Br(sl=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cl(ul(t=e.call.apply(e,[this].concat(r))||this),"onControlButtonClick",(function(){t.setState((function(e){return{smartContainerOpen:!e.smartContainerOpen}}))})),cl(ul(t),"toggleCVAAOverlay",(function(){t.setState((function(e){return{cvaaOverlay:!e.cvaaOverlay}}))})),cl(ul(t),"onCVAAOverlayClose",(function(){t.toggleCVAAOverlay(),t.onControlButtonClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillMount=function(){this.setState({smartContainerOpen:!1,cvaaOverlay:!1})},i.componentDidMount=function(){var e=this;this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)}))},i.handleClickOutside=function(e){this.state.cvaaOverlay||this.props.isMobile||this.props.isSmallSize||!this._controlSettingsElement||this._controlSettingsElement.contains(e.target)||!this.state.smartContainerOpen||this.setState({smartContainerOpen:!1})},i.getButtonBadgeType=function(){var e,t,n=null==(e=this.props.player.getActiveTracks())||null==(t=e.video)?void 0:t.height;return n?id(n):null},i.render=function(e){var t=this,n=e.showAudioMenu&&e.audioTracks.length>1,r=n&&e.showAdvancedAudioDescToggle,i=e.showCaptionsMenu&&e.textTracks.length>1,a=e.showQualityMenu&&e.videoTracks.length>1,o=e.showSpeedMenu&&e.player.playbackRates.length>1&&!e.isLive;if((n||i||a||o)&&!(e.isLive&&e.videoTracks.length<=1)){var s=this.getButtonBadgeType()||"",l=document.getElementById(this.props.player.config.targetId)||document;return N(ts,{name:"Settings",ref:function(e){return e?t._controlSettingsElement=e:void 0}},N(Oo,{label:e.buttonLabel},N(Bo,{tabIndex:"0","aria-label":e.buttonLabel,className:[pr.a.controlButton,pr.a.buttonBadge,mo[s+"Active"],this.state.smartContainerOpen?pr.a.active:""].join(" "),onClick:this.onControlButtonClick},N(Eo,{type:vo.Settings}))),this.state.smartContainerOpen&&!this.state.cvaaOverlay&&N(fc,{targetId:e.player.config.targetId,title:N(bn,{id:"settings.title"}),onClose:this.onControlButtonClick},r&&N(pd,null),n&&N(Bp,null),i&&N(Xp,{onAdvancedCaptionsClick:this.toggleCVAAOverlay}),a&&N(sd,null),o&&N(nd,null)),this.state.cvaaOverlay?Xe(N(Mu,{onClose:this.onCVAAOverlayClose}),l.querySelector(".overlay-portal")):N("div",null))}},r}(B))||sl)||sl)||sl)||sl;function bl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function El(){return(El=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}ml.displayName="Settings";var kl,Tl,Al,wl,Sl=(dl=$t((function(e){return{isDraggingActive:e.volume.draggingActive,volume:e.engine.volume,muted:e.engine.muted,isMobile:e.shell.isMobile}}),ur(El({},Wi,Tr,da))),fl=Fs("Volume"),hl=jn("Volume"),gl=fi("Volume"),yl=An((function(e){return{tooltipLabel:e.muted?N(bn,{id:"controls.unmute"},"Unmute"):N(bn,{id:"controls.mute"},"Mute"),volBtnAriaLabel:e.muted?N(bn,{id:"volume.muted_click_to_unmute"},"Muted. Click to unmute"):N(bn,{id:"volume.volume_click_to_mute",fields:{vol:(100*e.player.volume).toFixed()}},100*e.player.volume+" volume. Click to mute")}})),dl(vl=Sr(vl=Br(vl=fl(vl=hl(vl=gl(vl=yl(vl=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _l(bl(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.UP},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.DOWN},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.M},action:function(e){t.handleKeydown(e)}}]),_l(bl(t),"onVolumeProgressBarMouseDown",(function(){t.props.updateVolumeDraggingStatus(!0)})),_l(bl(t),"onVolumeProgressBarMouseMove",(function(e){t.props.isDraggingActive&&t.changeVolume(e)})),_l(bl(t),"onMouseOver",(function(){t.props.isMobile||(t.props.updateVolumeHover(!0),t.setState({hover:!0}))})),_l(bl(t),"onMouseOut",(function(){t.props.isMobile||(t.props.updateVolumeHover(!1),t.setState({hover:!1}))})),_l(bl(t),"onKeyDown",(function(e){switch(e.keyCode){case Ln.UP:case Ln.DOWN:case Ln.ENTER:case Ln.SPACE:e.preventDefault(),e.stopPropagation(),t.handleKeydown(e);break;default:t.setState({hover:!1})}})),_l(bl(t),"onFocus",(function(){t.state.hover||t.setState({hover:!0})})),_l(bl(t),"onTouchEnd",(function(e){e.stopImmediatePropagation()})),_l(bl(t),"onVolumeProgressBarMouseUp",(function(e){t.props.isDraggingActive&&(t.props.updateVolumeDraggingStatus(!1),t.changeVolume(e))})),_l(bl(t),"toggleMute",(function(){var e=t.props.player;0===e.volume?(t.props.logger.debug("Toggle mute. Volume is 0, set mute to false & volume to 0.5"),e.muted=!1,e.volume=.5):(t.props.logger.debug("Toggle mute. "+e.muted+" => "+!e.muted),e.muted=!e.muted),t.props.notifyClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props.player;this.props.eventManager.listen(t,t.Event.LOADED_METADATA,(function(){e.props.updateVolume(t.volume),e.props.updateMuted(t.muted)})),this.props.eventManager.listen(t,t.Event.VOLUME_CHANGE,(function(){e.props.updateMuted(t.muted),e.props.updateVolume(t.volume)})),this.props.eventManager.listen(document,"mouseup",this.onVolumeProgressBarMouseUp),this.props.eventManager.listen(document,"mousemove",this.onVolumeProgressBarMouseMove),this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)})),this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.handleClickOutside=function(e){!this.props.isMobile&&this._volumeControlElement&&!this._volumeControlElement.contains(e.target)&&this.state.hover&&this.setState({hover:!1})},i.getVolumeProgressHeight=function(){return this.props.muted?"0%":Math.round(100*this.props.volume)+"%"},i.handleKeydown=function(e){var t,n=this,r=this.props.player,i=function(e){e===r.volume||e>100||e<0||(r.muted=e<5,r.volume=e/100,n.props.notifyChange({volume:r.volume}))};switch(e.keyCode){case Ln.UP:this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]),i(t=Math.min(Math.round(100*r.volume)+5,100));break;case Ln.DOWN:0===(t=Math.max(Math.round(100*r.volume)-5,0))?this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute]):this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWave]),i(t);break;case Ln.M:r.muted?this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]):this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute]),this.toggleMute();break;case Ln.ENTER:case Ln.SPACE:this.toggleMute()}},i.changeVolume=function(e){var t,n=this.props.player,r=this._volumeProgressBarElement.getBoundingClientRect();t=r.height>r.width?this._getVerticalVolume(r,e):this._getHorizontalVolume(r,e),(t=parseFloat(t.toFixed(2)))<=1&&t>=0&&(this.props.logger.debug("Change volume from "+n.volume+" => "+t),n.volume=t,this.props.muted&&(n.muted=!1),this.props.notifyChange({volume:n.volume}))},i._getHorizontalVolume=function(e,t){var n=e.width,r=e.left,i=t.clientX;return 0!=n?(i-r)/n:0},i._getVerticalVolume=function(e,t){var n=e.height,r=e.top,i=t.clientY;return 0!=n?1-(i-r)/n:0},i.render=function(){var e=this;if(!this.props.player.isImage()){var t=this.props,n=t.player,r=t.isDraggingActive,i=t.muted,a=t.volume,o=t.smartContainerOpen,s=[pr.a.volumeControl];return r&&s.push(pr.a.draggingActive),(i||0===a)&&s.push(pr.a.isMuted),this.state.hover&&!o&&s.push(pr.a.hover),N(ts,{role:"application",name:"Volume",ref:function(t){return t?e._volumeControlElement=t:void 0},className:s,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut},N(Oo,{label:this.props.tooltipLabel,type:this.props.toolTipType?this.props.toolTipType:Ro.Left},N(Bo,{tabIndex:"0","aria-live":"polite","aria-label":this.props.volBtnAriaLabel,className:pr.a.controlButton,onMouseUp:this.toggleMute,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown,onFocus:this.onFocus},N(Eo,{type:vo.VolumeBase}),N(Eo,{type:vo.VolumeWaves}),N(Eo,{type:vo.VolumeMute}))),N("div",{className:pr.a.volumeControlBar,role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":100*n.volume,"aria-valuetext":100*n.volume+"% volume "+(n.muted?"muted":"")},N("div",{className:pr.a.bar,ref:function(t){return t?e._volumeProgressBarElement=t:void 0},onMouseDown:this.onVolumeProgressBarMouseDown},N("div",{className:pr.a.progress,style:{height:this.getVolumeProgressHeight()}}))))}},r}(B))||vl)||vl)||vl)||vl)||vl)||vl)||vl);function Cl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Il(){return(Il=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Sl.displayName="Volume";var Pl=(kl=$t((function(e){return{isVr:e.engine.isVr,vrStereoMode:e.engine.vrStereoMode,config:e.config.components.vrStereo}}),ur(Il({},sr,Tr))),Tl=jn("VrStereo"),Al=An({vrStereoText:"controls.vrStereo"}),kl(wl=Sr(wl=Tl(wl=Al(wl=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xl(Cl(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){t.props.player.toggleVrStereoMode(),t.props.updateVrStereoMode(!t.props.vrStereoMode)})),xl(Cl(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.onClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._shouldRender=function(){var e=this.props.config;return this.props.isVr&&!(0===Object.keys(e).length&&e.constructor===Object)},i.componentWillMount=function(){this.props.updateVrStereoMode(this.props.config.vrStereoMode)},i.render=function(){if(this._shouldRender())return N(ts,{name:"VrStereo"},N(Oo,{label:this.props.vrStereoText},N(Bo,{tabIndex:"0","aria-label":this.props.vrStereoText,className:this.props.vrStereoMode?[pr.a.controlButton,pr.a.vrStereoMode].join(" "):pr.a.controlButton,onClick:this.onClick,onKeyDown:this.onKeyDown},N(Eo,{type:vo.vrStereo}),N(Eo,{type:vo.vrStereoFull}))))},r}(B))||wl)||wl)||wl)||wl);Pl.displayName="VrStereo";var Dl,Rl=$t((function(e){return{textTracks:e.engine.textTracks,showCCButton:e.config.showCCButton}}))(jn("ClosedCaptions")(fi("ClosedCaptions")(An({closedCaptionsOnText:"controls.closedCaptionsOn",closedCaptionsOffText:"controls.closedCaptionsOff"})((function(e,t){var n,r=ye(!1),i=r[0],a=r[1],o=e.textTracks,s=t.player,l=o.find((function(e){return e.active}));if(me((function(){a("off"!==(null==l?void 0:l.language))}),[l]),(null==(n=e.textTracks)?void 0:n.length)&&e.showCCButton)return N(ts,{name:"ClosedCaptions"},i?N(Oo,{label:e.closedCaptionsOnText},N(Bo,{tabIndex:"0","aria-label":e.closedCaptionsOnText,className:[pr.a.controlButton,pr.a.ccOn].join(" "),onClick:function(){e.notifyClick(!0),s.hideTextTrack()}},N(Eo,{type:vo.ClosedCaptionsOn}))):N(Oo,{label:e.closedCaptionsOffText},N(Bo,{tabIndex:"0","aria-label":e.closedCaptionsOffText,className:pr.a.controlButton,onClick:function(){e.notifyClick(!1),s.showTextTrack()}},N(Eo,{type:vo.ClosedCaptionsOff}))))})))));Rl.displayName="ClosedCaptions";var Ol,Ll,Ml,Nl=$t((function(e){return{url:e.engine.adUrl}}))(Dl=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return N("a",{href:e.url,target:"_blank",rel:"noreferrer",className:[pr.a.btn,pr.a.btnDarkTransparent,pr.a.learnMore].join(" ")},N(bn,{id:"ads.learn_more"}))},r}(B))||Dl;function Ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Nl.displayName="AdLearnMore";var jl=(Ol=$t((function(e){return{currentTime:e.engine.adProgress.currentTime,duration:e.engine.adProgress.duration,adSkipTimeOffset:e.engine.adSkipTimeOffset,adSkippableState:e.engine.adSkippableState}})),Ll=jn("AdSkip"),Ol(Ml=Sr(Ml=Ll(Ml=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fl(Ul(t=e.call.apply(e,[this].concat(r))||this),"skipAd",(function(){t.props.player.ads.skipAd()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getSkipTimeOffset=function(){return Math.ceil(this.props.adSkipTimeOffset-this.props.currentTime)},i.render=function(){return this.props.adSkippableState?this.getSkipTimeOffset()<=0?N(En,null,N("a",{className:[pr.a.btn,pr.a.btnBranded,pr.a.btnSkipAd].join(" "),onClick:this.skipAd},N(bn,{id:"ads.skip_ad"}))):N(En,null,N("span",{className:pr.a.skipAd},N(bn,{id:"ads.skip_in"})," "+this.getSkipTimeOffset())):void 0},r}(B))||Ml)||Ml)||Ml);jl.displayName="AdSkip";var Bl=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return N("span",{className:pr.a.adNotice},N(bn,{id:"ads.ad_notice"}))},r}(B);Bl.displayName="AdNotice";var Vl,Hl=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.PLAYER_RESIZE)||this).payload={playerSize:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Kl=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.GUI_RESIZE)||this).payload={guiSize:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Gl=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.VIDEO_RESIZE)||this).payload={videoSize:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),zl="event-dispatcher-middleware/COMPONENT_CLICKED",Wl="event-dispatcher-middleware/COMPONENT_CHANGED";function Yl(e,t,n){var r=e.getState().engine;r.adBreak?r.adIsPlaying?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PLAY)):r.isPlaying?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PLAY))}function ql(e,t,n){e.getState().engine.muted?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_MUTE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_UNMUTE))}function Xl(e,t,n){n.isFullscreen()?n.dispatchEvent(new Dr(Dr.Type.USER_EXITED_FULL_SCREEN)):n.dispatchEvent(new Dr(Dr.Type.USER_ENTERED_FULL_SCREEN))}var $l,Ql=((Vl={})[Ln.SPACE]=function(e,t,n){Yl(e,0,n)},Vl[Ln.UP]=function(e,t,n){n.dispatchEvent(new $r(t.payload.volume))},Vl[Ln.DOWN]=function(e,t,n){n.dispatchEvent(new $r(t.payload.volume))},Vl[Ln.F]=function(e,t,n){Xl(0,0,n)},Vl[Ln.P]=function(e,t,n){!function(e,t,n){n.isInPictureInPicture()?n.dispatchEvent(new Dr(Dr.Type.USER_EXITED_PICTURE_IN_PICTURE)):n.dispatchEvent(new Dr(Dr.Type.USER_ENTERED_PICTURE_IN_PICTURE))}(0,0,n)},Vl[Ln.ESC]=function(e,t,n){Xl(0,0,n)},Vl[Ln.LEFT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Vl[Ln.RIGHT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Vl[Ln.HOME]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Vl[Ln.END]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Vl[Ln.M]=function(e,t,n){ql(e,0,n)},Vl[Ln.SEMI_COLON]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Vl[Ln.PERIOD]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Vl[Ln.COMMA]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Vl[Ln.C]=function(e,t,n){n.dispatchEvent(new Hr(t.payload.track))},Vl),Zl=function(e){var t,n;function r(t){var n;return void 0===t&&(t={config:{}}),(n=e.call(this)||this).name=t.name,n.config=t.config,n.player=t.player,n.eventManager=new Lr,n.logger=Dn("UI "+n.name),n.logger.debug("Initialized"),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.notifyClick=function(e){this.context.store.dispatch({type:zl,name:this.name,payload:e})},i.notifyChange=function(e){this.context.store.dispatch({type:Wl,name:this.name,payload:e})},i.componentWillUnmount=function(){this.eventManager.removeAll()},r}(B);function Jl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Zl,"defaultProps",{});var tu=$t((function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded,guiClientRect:e.shell.guiClientRect}}),ur(sr))($l=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eu(Jl(t=e.call.apply(e,[this].concat(r))||this),"_ref",{current:null}),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(){var e=this._ref.current.scrollHeight>pr.a.bottomBarMaxHeight;this.state.lineBreak!==e&&this.setState({lineBreak:e})},i.render=function(e){var t=e.leftControls,n=e.rightControls,r=[pr.a.bottomBar];return e.isCasting&&e.isPlaybackEnded&&r.push(pr.a.hide),this.state.lineBreak&&r.push(pr.a.lineBreak),N("div",{ref:this._ref,className:r.join(" ")},N("div",{className:pr.a.bottomBarArea},N(qn,{name:"BottomBar"},e.children)),N("div",{className:pr.a.leftControls},N(qn,{name:"BottomBarLeftControls"},t)),N("div",{className:pr.a.rightControls},N(qn,{name:"BottomBarRightControls"},n)))},r}(B))||$l;tu.displayName="BottomBar";var nu,ru=function(e){var t=_e(null);return me((function(){var n;e.isActive&&(null==(n=t)||n.focus())}),[]),N("div",{role:"button",tabIndex:"0",ref:function(n){t=n,e.addAccessibleChild(n)},className:e.classNames.join(" "),onClick:e.changeCaptionsStyle,onKeyDown:function(t){t.keyCode===Ln.ENTER&&e.changeCaptionsStyle()}},e.children,e.isActive?N("div",{className:pr.a.activeTick},N(Eo,{type:vo.Check})):void 0)};function iu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ou,su=Sr(nu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return au(iu(t=e.call.apply(e,[this].concat(r))||this),"transitionToState",(function(){t.props.transitionToState(t.props.cvaaOverlayState.CustomCaptions)})),au(iu(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.transitionToState()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillMount=function(){var e=this.props.player;this.captionsStyleDefault=e.TextStyle.fromJson({backgroundOpacity:e.TextStyle.StandardOpacities.TRANSPARENT}),this.captionsStyleYellow=e.TextStyle.fromJson({backgroundOpacity:e.TextStyle.StandardOpacities.TRANSPARENT,fontColor:e.TextStyle.StandardColors.YELLOW}),this.captionsStyleBlackBG=e.TextStyle.fromJson({backgroundColor:e.TextStyle.StandardColors.BLACK,fontColor:e.TextStyle.StandardColors.WHITE})},i.render=function(e){var t=this;return N("div",{className:[pr.a.overlayScreen,pr.a.active].join(" ")},N("div",{className:pr.a.title},N(bn,{id:"cvaa.title"})),N("div",null,N(ru,{addAccessibleChild:e.addAccessibleChild,classNames:[pr.a.sample],changeCaptionsStyle:function(){return e.changeCaptionsStyle(t.captionsStyleDefault)},isActive:e.player.textStyle.isEqual(this.captionsStyleDefault)},N(bn,{id:"cvaa.sample_caption_tag",fields:{number:"1"}})),N(ru,{addAccessibleChild:e.addAccessibleChild,classNames:[pr.a.sample,pr.a.blackBg],changeCaptionsStyle:function(){return e.changeCaptionsStyle(t.captionsStyleBlackBG)},isActive:e.player.textStyle.isEqual(this.captionsStyleBlackBG)},N(bn,{id:"cvaa.sample_caption_tag",fields:{number:"2"}})),N(ru,{addAccessibleChild:e.addAccessibleChild,classNames:[pr.a.sample,pr.a.yellowText],changeCaptionsStyle:function(){return e.changeCaptionsStyle(t.captionsStyleYellow)},isActive:e.player.textStyle.isEqual(this.captionsStyleYellow)},N(bn,{id:"cvaa.sample_caption_tag",fields:{number:"3"}}))),this.isAdvancedStyleApplied()?N("div",{className:pr.a.customCaptionsApplied},N("div",{className:[pr.a.sample,pr.a.custom].join(" "),style:e.customTextStyle.toCSS()},N(bn,{id:"cvaa.sample_custom_caption_tag"}),N("div",{className:pr.a.activeTick},N(Eo,{type:vo.Check}))),N("a",{role:"button",tabIndex:"0","aria-haspopup":"true",onClick:this.transitionToState,ref:function(t){e.addAccessibleChild(t)},onKeyDown:this.onKeyDown},N(bn,{id:"cvaa.edit_caption"}))):N("a",{role:"button","aria-haspopup":"true",tabIndex:"0",className:pr.a.buttonSaveCvaa,onClick:this.transitionToState,ref:function(t){e.addAccessibleChild(t)},onKeyDown:this.onKeyDown},N(bn,{id:"cvaa.set_custom_caption"})))},i.isAdvancedStyleApplied=function(){var e=this.props.player;return!e.textStyle.isEqual(this.captionsStyleDefault)&&!e.textStyle.isEqual(this.captionsStyleBlackBG)&&!e.textStyle.isEqual(this.captionsStyleYellow)},r}(B))||nu;function lu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function cu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pu=$t((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,guiClientRect:e.shell.guiClientRect}}))(ou=Br(ou=Va(ou=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cu(lu(t=e.call.apply(e,[this].concat(r))||this),"handleClickOutside",(function(e){t.props.isMobile||t.props.isSmallSize||!t._menuElement||t._menuElement.contains(e.target)||t.props.onClose()})),cu(lu(t),"onChange",(function(e){t.onSelect(t.props.options[e.target.value])})),t}uu(t,e);var n=t.prototype;return n.componentWillMount=function(){this.setState({position:[pr.a.top,pr.a.left]})},n.componentDidMount=function(){this.props.eventManager.listen(document,"click",this.handleClickOutside),this.props.isMobile||this.props.isSmallSize||this.setState({position:this.getPosition()})},n.getPosition=function(){var e=this._menuElement.getBoundingClientRect(),t=this.props.guiClientRect;return e.top>=t.top?[pr.a.top,pr.a.left]:e.bottom+e.height<t.bottom?[pr.a.bottom,pr.a.left]:(this._menuElement.style.maxHeight=.8*t.height+"px",[pr.a.stickBottom,pr.a.left])},n.isSelected=function(e){return e.active},n.onSelect=function(e){this.props.onMenuChosen(e.value),this.props.options.filter((function(e){return e.active})).forEach((function(e){e.active=!1})),this.props.options.filter((function(t){return t.value===e.value}))[0].active=!0},n.renderNativeSelect=function(e){var t=this,n=this.props.hideSelect?pr.a.mobileHiddenSelect:"";return N("select",{"aria-labelledby":e,role:"listbox",ref:function(e){t.props.pushRef&&t.props.pushRef(e)},className:n+=" "+pr.a.dropdown,onChange:this.onChange},this.props.options.map((function(e,n){return N("option",{role:"option","aria-selected":t.isSelected(e)?"true":"",selected:t.isSelected(e),value:n,key:n},e.label)})))},n.render=function(e){var t=this;return e.clearAccessibleChildren(),e.isMobile||e.isSmallSize?this.renderNativeSelect(e.labelledby):N("div",{role:"menu",onKeyDown:e.handleKeyDown,ref:function(e){return e?t._menuElement=e:void 0},className:[pr.a.dropdownMenu].concat(this.state.position).join(" ")},e.options.map((function(n,r){return N(fu,{setDefaultFocusedElement:e.setDefaultFocusedElement,addAccessibleChild:e.addAccessibleChild,isSelected:t.isSelected,onSelect:function(e){t.onSelect(e)},key:r,data:n})})))},t}(B))||ou)||ou)||ou;pu.displayName="Menu";var du,fu=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cu(lu(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(e){e.stopPropagation(),t.props.onSelect(t.props.data)})),cu(lu(t),"onKeyDown",(function(e){switch(e.keyCode){case Ln.ENTER:t.props.onSelect(t.props.data),e.stopPropagation()}})),t}return uu(t,e),t.prototype.render=function(e){var t=this,n=e.data.badgeType&&!e.isSelected(e.data)?mo[e.data.badgeType]:mo[e.data.badgeType+"Active"];return N("div",{role:"menuitemradio",tabIndex:"-1","aria-checked":e.isSelected(e.data)?"true":"false",ref:function(n){t.props.addAccessibleChild(n),e.isSelected(e.data)&&e.setDefaultFocusedElement(n)},className:e.isSelected(e.data)?[pr.a.dropdownMenuItem,pr.a.active].join(" "):pr.a.dropdownMenuItem,onClick:this.onClick,onKeyDown:this.onKeyDown},N("span",{className:n?[pr.a.labelBadge,n].join(" "):""},e.data.label),N("span",{className:[pr.a.menuIconContainer,pr.a.active].join(" ")},N(Eo,{type:vo.CheckActive})))},t}(B);function hu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yu=$t((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize}}))(du=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gu(hu(t=e.call.apply(e,[this].concat(r))||this),"onMenuChosen",(function(e){t.props.onMenuChosen(e),t.setState({dropMenuActive:!1})})),gu(hu(t),"onClick",(function(){t.state.dropMenuActive||setTimeout((function(){return t.toggleDropDown()}))})),gu(hu(t),"onKeyDown",(function(e){switch(e.keyCode){case Ln.ENTER:t.onClick();break;case Ln.SPACE:e.preventDefault(),t.onClick();break;case Ln.ESC:t.state.dropMenuActive&&(t.onClose(),e.stopPropagation())}})),gu(hu(t),"onClose",(function(){t.setState({dropMenuActive:!1})})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillMount=function(){this.setState({dropMenuActive:!1})},i.componentDidMount=function(){this.props.registerParentSelectedCallback&&this.props.registerParentSelectedCallback(this.toggleDropDown.bind(this))},i.isSelected=function(e){return e.active},i.getActiveOption=function(){return this.props.options.find((function(e){return e.active}))||this.props.options[0]||{label:"Unlabled"}},i.renderNativeSelect=function(e){return N(pu,{labelledby:e,pushRef:this.props.pushRef,options:this.props.options,onMenuChosen:this.onMenuChosen,onClose:this.onClose})},i.render=function(e){var t,n,r=this,i=e.name+"Active",a=this.getActiveOption(),o=(null==a||null==(t=a.dropdownOptions)?void 0:t.label)||a.label,s=mo[a.badgeType||(null==a||null==(n=a.dropdownOptions)?void 0:n.badgeType)];return e.isMobile||e.isSmallSize?this.renderNativeSelect(e.name):N("div",{name:e.name,className:this.state.dropMenuActive?[pr.a.dropdown,pr.a.active].join(" "):pr.a.dropdown,ref:function(e){return e?r._el=e:void 0}},N("div",{tabIndex:e.tabbable?0:-1,ref:function(t){e.pushRef&&e.pushRef(t)},role:"menuitem","aria-haspopup":"true","aria-expanded":this.state.dropMenuActive?"true":"false","aria-labelledby":[e.name,i].join(" "),className:pr.a.dropdownButton,onClick:this.onClick,onKeyDown:this.onKeyDown},N("span",{id:i,className:s?[pr.a.labelBadge,s].join(" "):""},o),N(Eo,{type:vo.ArrowDown}),this.state.dropMenuActive?N(pu,{parentEl:this._el,options:e.options,onMenuChosen:this.onMenuChosen,onClose:this.onClose}):void 0))},i.toggleDropDown=function(){this.setState((function(e){return{dropMenuActive:!e.dropMenuActive}}))},r}(B))||du;yu.displayName="DropDown";var vu=function(e){return N("div",{className:e.classNames.join(" ")},N("label",{id:e.styleName},N(bn,{id:e.labelId})),N(yu,{name:e.styleName,pushRef:function(t){e.addAccessibleChild(t)},tabbable:!0,onMenuChosen:function(t){var n={};n[e.styleName]=t,e.changeCustomStyle(n)},options:e.options}))};function mu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _u=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bu(mu(t=e.call.apply(e,[this].concat(r))||this),"mouseDownHandler",(function(e){t._sliderElementOffsetLeft=t._sliderElement.getBoundingClientRect().left,t.state.dragging||t.setState((function(n){return{dragging:!0,value:t.mouseEventToValue(e,n)}}),(function(){t.props.onChange(t.mouseEventToValue(e,t.state))}))})),bu(mu(t),"onKeyDown",(function(e){e.keyCode!==Ln.LEFT&&e.keyCode!==Ln.RIGHT||t.onKeyboardDragging(e)})),bu(mu(t),"mouseMoveHandler",(function(e){t.state.dragging&&t.setState((function(n){return{value:t.mouseEventToValue(e,n)}}),(function(){t.props.onChange(t.mouseEventToValue(e,t.state))}))})),bu(mu(t),"mouseUpHandler",(function(e){t.state.dragging&&t.setState((function(n){return{value:t.mouseEventToValue(e,n),dragging:!1}}),(function(){t.props.onChange(t.mouseEventToValue(e,t.state))}))})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillMount=function(){this.setState({value:this.props.value||0,min:this.props.min||0,max:this.props.max||100,dragging:!1}),document.addEventListener("mouseup",this.mouseUpHandler),document.addEventListener("mousemove",this.mouseMoveHandler),document.addEventListener("touchend",this.mouseUpHandler),document.addEventListener("touchmove",this.mouseMoveHandler)},i.componentWillUnmount=function(){document.removeEventListener("mouseup",this.mouseUpHandler),document.removeEventListener("mousemove",this.mouseMoveHandler),document.removeEventListener("touchend",this.mouseUpHandler),document.removeEventListener("touchmove",this.mouseMoveHandler)},i.componentDidMount=function(){this.sliderWidth=this._sliderElement.clientWidth,this._sliderElementOffsetLeft=this._sliderElement.getBoundingClientRect().left},i.onKeyboardDragging=function(e){var t=this;e.stopPropagation(),this._sliderElementOffsetLeft=this._sliderElement.getBoundingClientRect().left;var n=this.props.value;switch(e.keyCode){case Ln.RIGHT:(n+=5)>this.state.max&&(n=this.state.max);break;case Ln.LEFT:(n-=5)<this.state.min&&(n=this.state.min)}this.setState({value:n,dragging:!1},(function(){t.props.onChange(n)}))},i.mouseEventToValue=function(e,t){var n=(e.touches&&e.touches.length>0?e.touches[0].clientX:e.changedTouches?e.changedTouches[0].pageX:e.clientX)-this._sliderElement.getBoundingClientRect().left,r=Math.round(n/this._sliderElement.clientWidth*100);return this.getValueByPersentage(r)<t.min?t.min:this.getValueByPersentage(r)>t.max?t.max:this.getValueByPersentage(r)},i.getValueByPersentage=function(e){return this.state.max/100*e},i.getPercentageByValue=function(){return Math.round(this.state.value/this.state.max*100)},i.render=function(e){var t=this;return N("div",{role:"slider","aria-valuemin":this.state.min,"aria-valuenow":this.state.value,"aria-valuemax":this.state.max,"aria-labelledby":e.name,tabIndex:"0",ref:function(n){n&&(t._sliderElement=n,e.pushRef&&e.pushRef(n))},className:pr.a.slider,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler,onKeyDown:this.onKeyDown},N("div",{className:pr.a.progress,style:{width:this.getPercentageByValue()+"%"}},N("div",{className:pr.a.handle,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler})))},r}(B);_u.displayName="Slider";var Eu,ku=function(e){return N("div",{className:e.classNames.join(" ")},N("label",{id:e.styleName},N(bn,{id:e.labelId})),N(_u,{name:e.styleName,pushRef:function(t){e.addAccessibleChild(t)},min:0,max:100,value:100*e.value,onChange:function(t){var n={};n[e.styleName]=t/100,e.changeCustomStyle(n)}}))};function Tu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wu,Su,Cu,xu,Iu=Sr(Eu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Au(Tu(t=e.call.apply(e,[this].concat(r))||this),"changeCaptionsStyle",(function(){t.props.changeCaptionsStyle(t.props.customTextStyle)})),Au(Tu(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.changeCaptionsStyle()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.focusOnDefault()},i.render=function(e){var t=this.props.player,n=t.TextStyle.FontFamily,r=t.TextStyle.EdgeStyles,i=t.TextStyle.StandardColors,a=t.TextStyle.FontSizes.map((function(t){return{value:t.label,label:t.label,active:e.customTextStyle.fontSize===t.label}})),o=Object.keys(i).map((function(t){return{value:i[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.fontColor.every((function(e,n){return e===i[t][n]}))}})),s=Object.keys(n).map((function(t){return{value:n[t],label:n[t],active:e.customTextStyle.fontFamily===n[t]}})),l=Object.keys(r).map((function(t){return{value:r[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.fontEdge===r[t]}})),u=Object.keys(i).map((function(t){return{value:i[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.backgroundColor.every((function(e,n){return e===i[t][n]}))}}));return N("div",{className:[pr.a.overlayScreen,pr.a.active].join(" ")},N("form",{className:[pr.a.form,pr.a.customCaptionForm].join(" ")},N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.size_label",options:a,classNames:[pr.a.formGroupRow,pr.a.fontSize],styleName:"fontSize",changeCustomStyle:e.changeCustomStyle}),N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_color_label",options:o,classNames:[pr.a.formGroupRow,pr.a.fontColor],styleName:"fontColor",changeCustomStyle:e.changeCustomStyle}),N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_family_label",options:s,classNames:[pr.a.formGroupRow,pr.a.fontFamily],styleName:"fontFamily",changeCustomStyle:e.changeCustomStyle}),N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_style_label",options:l,classNames:[pr.a.formGroupRow,pr.a.fontStyle],styleName:"fontEdge",changeCustomStyle:e.changeCustomStyle}),N(ku,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_opacity_label",value:e.customTextStyle.fontOpacity,classNames:[pr.a.formGroupRow,pr.a.fontOpacity],styleName:"fontOpacity",changeCustomStyle:e.changeCustomStyle}),N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.background_color_label",options:u,classNames:[pr.a.formGroupRow,pr.a.backgroundColor],styleName:"backgroundColor",changeCustomStyle:e.changeCustomStyle}),N(ku,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.background_opacity_label",value:e.customTextStyle.backgroundOpacity,classNames:[pr.a.formGroupRow,pr.a.backgroundOpacity],styleName:"backgroundOpacity",changeCustomStyle:e.changeCustomStyle}),N("div",{className:pr.a.formGroupRow},N("a",{role:"button",tabIndex:"0",ref:function(t){e.addAccessibleChild(t)},onClick:this.changeCaptionsStyle,onKeyDown:this.onKeyDown,className:[pr.a.btn,pr.a.btnBranded,pr.a.btnBlock].join(" ")},N(bn,{id:"cvaa.apply"}))),N("div",{className:pr.a.previewContainer},N("span",{style:e.getPreviewStyle()},N(bn,{id:"cvaa.caption_preview"})))))},r}(B))||Eu;function Pu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Du(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ru(){return(Ru=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ou,Lu={Main:"main",CustomCaptions:"custom-captions"},Mu=(wu=$t((function(e){return{style:e.cvaa.style}}),ur(Ru({},na,sr))),Su=jn("CVAAOverlay"),Cu=fi("CVAAOverlay"),wu(xu=Sr(xu=Su(xu=Cu(xu=Va(xu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Du(Pu(t=e.call.apply(e,[this].concat(r))||this),"transitionToState",(function(e){t.setState({activeWindow:e})})),Du(Pu(t),"changeCaptionsStyle",(function(e){t.props.updateCaptionsStyle(e),t.props.player.textStyle=e,t.props.onClose(),t.props.notifyClick({textStyle:e})})),Du(Pu(t),"getPreviewStyle",(function(){return"font-size: "+100*t.state.customTextStyle.implicitFontScale+"%!important; "+t.state.customTextStyle.toCSS()})),Du(Pu(t),"changeCustomStyle",(function(e){t.setState((function(t){var n=t.customTextStyle.clone();return{customTextStyle:Object.assign(n,e)}}))})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUnmount=function(){this.setState({activeWindow:Lu.Main})},i.componentWillMount=function(){var e=this.props.player;this.setState({activeWindow:Lu.Main,customTextStyle:e.textStyle}),this.props.setIsModal(!0)},i.render=function(e){return e.clearAccessibleChildren(),N(ju,{open:!0,handleKeyDown:this.props.handleKeyDown,addAccessibleChild:this.props.addAccessibleChild,onClose:e.onClose,type:"cvaa"},this.state.activeWindow===Lu.Main?N(su,{cvaaOverlayState:Lu,addAccessibleChild:e.addAccessibleChild,captionsStyleDefault:this.captionsStyleDefault,captionsStyleBlackBG:this.captionsStyleBlackBG,captionsStyleYellow:this.captionsStyleYellow,changeCaptionsStyle:this.changeCaptionsStyle,transitionToState:this.transitionToState,customTextStyle:this.state.customTextStyle}):N(Iu,{addAccessibleChild:e.addAccessibleChild,focusOnDefault:this.props.focusOnDefault,changeCaptionsStyle:this.changeCaptionsStyle,changeCustomStyle:this.changeCustomStyle,getPreviewStyle:this.getPreviewStyle,customTextStyle:this.state.customTextStyle}))},r}(B))||xu)||xu)||xu)||xu)||xu);function Nu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fu(){return(Fu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Mu.displayName="CVAAOverlay";var ju=$t((function(e){return{overlayOpen:e.overlay.isOpen}}),ur(Fu({},sr,wa)))(Ou=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uu(Nu(t=e.call.apply(e,[this].concat(r))||this),"_timeoutId",null),Uu(Nu(t),"onCloseButtonKeyDown",(function(e){e.keyCode!==Ln.ENTER&&e.keyCode!==Ln.SPACE||(e.preventDefault(),t.props.onClose())})),Uu(Nu(t),"onKeyDown",(function(e){t.props.handleKeyDown&&t.props.handleKeyDown(e)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this._timeoutId=setTimeout((function(){return e.props.addPlayerClass(pr.a.overlayActive)}),0)},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null),this.props.removePlayerClass(pr.a.overlayActive)},i.renderCloseButton=function(e){return e.permanent?void 0:N(En,null,N("a",{role:"button",ref:function(t){e.addAccessibleChild&&e.addAccessibleChild(t)},tabIndex:"0",onClick:function(){e.updateOverlay(!1),e.onClose()},onKeyDown:this.onCloseButtonKeyDown,"aria-label":N(bn,{id:"overlay.close"}),className:pr.a.closeOverlay},N(Eo,{type:vo.Close})))},i.render=function(e){var t=[pr.a.overlay];if(e.type){var n=pr.a[e.type+"-overlay"]?pr.a[e.type+"-overlay"]:e.type+"-overlay";t.push(n)}return e.open&&(this.props.updateOverlay(e.open),t.push(pr.a.active)),N("div",{tabIndex:"-1",className:t.join(" "),role:"dialog",onKeyDown:this.onKeyDown},N("div",{className:pr.a.overlayContents},e.children),this.renderCloseButton(e))},r}(B))||Ou;function Bu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ju.displayName="Overlay";var Hu,Ku,Gu,zu=[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 4C5.89543 4 5 4.89543 5 6V13C5 14.1046 5.89543 15 7 15H11C12.1046 15 13 14.1046 13 13V6C13 4.89543 12.1046 4 11 4H7ZM7 6H11V13H7V6Z"},{d:"M15 11H16V18H12V17.2H10V18.1C10 19.2458 10.9971 20 12 20H16C17.0029 20 18 19.2458 18 18.1V10.9C18 9.75416 17.0029 9 16 9H15V11Z"}],Wu=function(e){var t,n;function r(t){var n;return Vu(Bu(n=e.call(this,t)||this),"_timeoutId",null),Vu(Bu(n),"copy",(function(){try{n.props.copy(),n.setState({copySuccess:!0}),n._timeoutId=setTimeout((function(){n.setState({copySuccess:!1})}),2e3)}catch(e){n.setState({copySuccess:!1})}})),Vu(Bu(n),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&n.copy()})),n.setState({copySuccess:!1}),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},i.render=function(e){var t=[pr.a.btnCopyUrl,pr.a.btnBorderless,pr.a.onlyIcon].join(" ");return t+=this.state.copySuccess?" "+pr.a.copied:"",N(En,null,N(ts,{name:"CopyButton"},N(Oo,{label:N(bn,{id:"copy.button"})},N(Bo,{tabIndex:"0",ref:function(t){e.addAccessibleChild&&e.addAccessibleChild(t)},className:t,onClick:this.copy,onKeyDown:this.onKeyDown},N(_o,{id:"copy",color:"#fff",path:zu,width:"24",height:"24",viewBox:"0 0 24 24"}),N(_o,{type:vo.Check})))))},r}(B);function Yu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Vu(Wu,"defaultProps",{icon:vo.Copy}),Wu.displayName="CopyButton";var Xu,$u,Qu,Zu,Ju=(Hu=$t((function(e){return{hasError:e.engine.hasError}}),ur(Tr)),Ku=jn("ErrorOverlay"),Hu(Gu=Sr(Gu=Ku(Gu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qu(Yu(t=e.call.apply(e,[this].concat(r))||this),"copyError",(function(){var e=window.getSelection(),n=document.createRange();n.selectNode(t.sessionEl),e.removeAllRanges(),e.addRange(n),document.execCommand("copy")})),qu(Yu(t),"handleClick",(function(){var e=t.props.player.getMediaInfo();t.props.player.loadMedia(e)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.renderSessionID=function(){var e=this,t=this.props.player,n=t&&t.config&&t.config.session&&t.config.session.id;return n?N("div",{className:pr.a.linkOptionsContainer},N("div",{className:pr.a.copyUrlRow},N("div",{ref:function(t){return t?e.sessionEl=t:void 0},className:pr.a.errorSession},N(bn,{id:"error.default_session_text"})," "," "+n),N(Wu,{copy:this.copyError}))):void 0},i.renderRetryButton=function(){if(this.props.player.getMediaInfo())return N("div",{className:pr.a.controlButtonContainer,onClick:this.handleClick},N(Bo,{className:[pr.a.controlButton,pr.a.retryBtn].join(" ")},N(bn,{id:"error.retry"})))},i.render=function(){return this.props&&this.props.hasError?N("div",{className:"overlay-portal"},N(ju,{open:!0,permanent:!0,type:"error"},N("div",{className:pr.a.errorOverlay},N("p",{className:pr.a.errorText}),N("div",{className:pr.a.svgContainer},N("svg",{width:"124",height:"110",viewBox:"0 0 124 110",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},N("defs",null,N("polygon",{id:"path-1",points:"58.0906294 70 50.7492774 88.8201923 60.1881585 88.8201923 54.22331 107 73.8876457 84.2307692 64.0554779 84.2307692 70.6102564 70"})),N("g",{id:"Player-v3",fill:"none",fillRule:"evenodd"},N("g",{id:"Desktop---Default---Error",transform:"translate(-365 -103)"},N("g",{id:"Cloud",transform:"translate(366 104)"},N("path",{d:"M63.5662942,30.179068 C61.0506558,29.4162424 58.3339083,29 55.5,29 C42.5213084,29 32,37.7304474 32,48.5 C32,48.6497107 32.0020332,48.7990274 32.0060779,48.947932 L32.0060779,48.947932 C20.975194,51.4855427 13,58.8323573 13,67.5 C13,71.2164926 14.4662425,74.6901504 17.0109182,77.6459815 C17.3714483,67.0552274 26.624181,58.1393462 39.3259742,55.0194402 L39.3259742,55.0194402 C39.3212229,54.8326784 39.3188345,54.6453999 39.3188345,54.4576271 C39.3188345,41.956968 49.9040267,31.6467441 63.5662942,30.179068 Z",id:"Combined-Shape",fillOpacity:".08",fill:"#2E2E2E"}),N("path",{d:"M31.0032591,48.1614253 C31.2192187,36.9518144 42.1402046,28 55.5,28 C64.749856,28 73.0886419,32.3249294 77.2653132,39.0733535 C84.8537029,39.7078593 90.7909537,44.3809769 90.9945979,50.1913309 C102.911627,51.5069936 112,59.4322556 112,69 C112,79.5603607 100.981582,88 87.5,88 C84.4639246,88 81.503099,87.5724513 78.7283559,86.7489741 C74.6488476,88.1943213 69.4726739,89 64,89 C58.7323857,89 53.737093,88.2538247 49.7263698,86.9058736 C46.7827225,87.6274324 43.6763865,88 40.5,88 C24.8190401,88 12,78.9101352 12,67.5 C12,58.659353 19.7679337,51.004786 31.0032591,48.1614253 Z",id:"Combined-Shape",stroke:"#666",strokeWidth:"2"}),N("g",{id:"Path-8",strokeLinecap:"round",strokeLinejoin:"round"},N("use",{fill:"#666",xlinkHref:"#path-1"}),N("path",{stroke:"#1D1D1D",strokeWidth:"2",d:"M65.6170644,83.2307692 L76.0725949,83.2307692 L51.7165365,111.432521 L58.8076053,89.8201923 L49.2858112,89.8201923 L57.4073201,69 L72.1718429,69 L65.6170644,83.2307692 Z"})),N("path",{d:"M59.9991166,0 L59.9991166,7.04768642 C59.9991166,7.59997117 60.4468318,8.04768642 60.9991166,8.04768642 C61.5514013,8.04768642 61.9991166,7.59997117 61.9991166,7.04768642 L61.9991166,0 C61.9991166,-0.55228475 61.5514013,-1 60.9991166,-1 C60.4468318,-1 59.9991166,-0.55228475 59.9991166,0 Z M95.3084192,8.85153517 L90.7782537,14.2503762 C90.4232519,14.6734508 90.4784359,15.3042064 90.9015106,15.6592082 C91.3245852,16.01421 91.9553408,15.9590261 92.3103426,15.5359514 L96.8405081,10.1371104 C97.1955099,9.71403572 97.140326,9.08328013 96.7172513,8.72827833 C96.2941766,8.37327654 95.663421,8.4284605 95.3084192,8.85153517 Z M121.628196,36.6783398 L114.687579,37.9021577 C114.143685,37.9980609 113.780517,38.5167193 113.87642,39.0606136 C113.972323,39.6045079 114.490981,39.9676764 115.034876,39.8717732 L121.975492,38.6479553 C122.519386,38.552052 122.882555,38.0333936 122.786652,37.4894993 C122.690748,36.945605 122.17209,36.5824365 121.628196,36.6783398 Z M0.0227411046,38.6479553 L6.96335733,39.8717732 C7.50725163,39.9676764 8.02591002,39.6045079 8.12181326,39.0606136 C8.2177165,38.5167193 7.85454799,37.9980609 7.31065368,37.9021577 L0.37003746,36.6783398 C-0.173856844,36.5824365 -0.69251523,36.945605 -0.788418471,37.4894993 C-0.884321711,38.0333936 -0.521153199,38.552052 0.0227411046,38.6479553 Z M25.157725,10.1371104 L29.6878905,15.5359514 C30.0428923,15.9590261 30.6736479,16.01421 31.0967226,15.6592082 C31.5197972,15.3042064 31.5749812,14.6734508 31.2199794,14.2503762 L26.6898139,8.85153517 C26.3348121,8.4284605 25.7040565,8.37327654 25.2809818,8.72827833 C24.8579072,9.08328013 24.8027232,9.71403572 25.157725,10.1371104 Z",id:"Path-9",fill:"#666",fillRule:"nonzero"})))))),N("div",{className:pr.a.headline},this.props.errorHead?this.props.errorHead:N(bn,{id:"error.default_error"})),this.renderSessionID(),this.renderRetryButton()))):void 0},r}(B))||Gu)||Gu)||Gu);function ec(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ju.displayName="ErrorOverlay";var nc=(Xu=$t((function(e){return{isLive:e.engine.isLive,isDvr:e.engine.isDvr,currentTime:e.engine.currentTime,duration:e.engine.duration}})),$u=jn("LiveTag"),Qu=fi("LiveTag"),Xu(Zu=Sr(Zu=$u(Zu=Qu(Zu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tc(ec(t=e.call.apply(e,[this].concat(r))||this),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.onClick()})),tc(ec(t),"onClick",(function(){t.isOnLiveEdge()||(t.props.player.seekToLiveEdge(),t.props.player.paused&&t.props.player.play()),t.props.notifyClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.isOnLiveEdge=function(){return this.props.player.isOnLiveEdge()},i.render=function(e){var t=[pr.a.liveTag];return e.isDvr&&!this.isOnLiveEdge()&&t.push(pr.a.nonLivePlayhead),N("div",{tabIndex:"0",className:t.join(" "),onClick:this.onClick,onKeyDown:this.onKeyDown},N(bn,{id:"controls.live"}))},r}(B))||Zu)||Zu)||Zu)||Zu);nc.displayName="LiveTag";var rc,ic,ac,oc,sc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(){return!1},i.render=function(e){return N("div",{className:"overlay-portal","aria-live":"polite"},e.children)},r}(B);function lc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}sc.displayName="OverlayPortal";var uc,cc=(rc=$t((function(e){return{currentTime:e.seekbar.currentTime,virtualTime:e.seekbar.virtualTime,isDraggingActive:e.seekbar.draggingActive,isMobile:e.shell.isMobile,poster:e.engine.poster,isDvr:e.engine.isDvr,dataLoaded:e.engine.dataLoaded}}),ur(Vi)),ic=fi("SeekBarLivePlaybackContainer"),ac=jn("SeekBarLivePlaybackContainer"),rc(oc=Sr(oc=Br(oc=ic(oc=ac(oc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.componentDidMount=function(){var e=this.props,t=e.eventManager,n=e.player,r=e.isDraggingActive,i=e.updateCurrentTime;t.listen(n,n.Event.TIME_UPDATE,(function(){r||i(Math.max(n.normalizedCurrentTime,0))})),t.listen(n,n.Event.LOADED_DATA,(function(){i(Math.max(n.normalizedCurrentTime,0))}))},o.render=function(e){var t=this;if(e.isDvr)return N(Id,{playerElement:this.props.playerContainer,showFramePreview:this.props.showFramePreview,showTimeBubble:this.props.showTimeBubble,changeCurrentTime:function(e){t.props.player.isOnLiveEdge()&&e===t.duration||(t.props.player.normalizedCurrentTime=e)},playerPoster:this.props.poster,updateSeekbarDraggingStatus:function(e){return t.props.updateSeekbarDraggingStatus(e)},updateSeekbarHoverActive:function(e){return t.props.updateSeekbarHoverActive(e)},updateSeekbarClientRect:function(e){return t.props.updateSeekbarClientRect(e)},updateCurrentTime:function(e){return t.props.updateCurrentTime(e)},updateVirtualTime:function(e){return t.props.updateVirtualTime(e)},isDvr:this.props.isDvr,currentTime:this.currentTime,virtualTime:this.props.virtualTime,duration:this.duration,isDraggingActive:this.props.isDraggingActive,isMobile:this.props.isMobile,notifyChange:function(e){return t.props.notifyChange(e)},forceFullProgress:this.props.player.isOnLiveEdge(),dataLoaded:this.props.dataLoaded})},i=r,(a=[{key:"currentTime",get:function(){return Math.min(this.props.currentTime,this.duration)}},{key:"duration",get:function(){return this.props.player.normalizedDuration}}])&&lc(i.prototype,a),r}(B))||oc)||oc)||oc)||oc)||oc);function pc(){return(pc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}cc.displayName="SeekBarLivePlaybackContainer";var fc=$t((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize}}),ur(sr))(uc=Va(uc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.componentWillMount=function(){this.props.addPlayerClass(pr.a.smartContainerOpen),this.props.updateSmartContainerOpen(!0)},o.componentWillUnmount=function(){this.props.removePlayerClass(pr.a.smartContainerOpen),this.props.updateSmartContainerOpen(!1)},o.componentDidMount=function(){this.props.setIsModal(this.isPortal)},o.render=function(e){var t=document.getElementById(this.props.targetId)||document;return e.clearAccessibleChildren(),this.isPortal?Xe(N(ju,{open:!0,onClose:e.onClose,handleKeyDown:this.props.handleKeyDown,addAccessibleChild:this.props.addAccessibleChild},N("div",{className:pr.a.title},e.title),this.renderChildren(e)),t.querySelector(".overlay-portal")):N("div",{onKeyDown:e.handleKeyDown,tabIndex:"-1",className:[pr.a.smartContainer,pr.a.top,pr.a.left].join(" ")},this.renderChildren(e))},o.renderChildren=function(e){var t=this;return W(e.children).map((function(n){if(n)return ie(n,pc({pushRef:function(t){e.addAccessibleChild(t)}},t.props))}))},i=r,(a=[{key:"isPortal",get:function(){return this.props.isMobile||this.props.isSmallSize}}])&&dc(i.prototype,a),r}(B))||uc)||uc;fc.displayName="SmartContainer";var hc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=e.label&&e.label.toLowerCase();return N("div",{className:[pr.a.smartContainerItem,pr.a.selectMenuItem].join(" ")},N("label",{id:t,htmlFor:t},e.icon?N("div",{className:pr.a.labelIcon},N(Eo,{type:e.icon})):void 0,e.label),e.options&&e.options.length?N(yu,{pushRef:function(t){e.pushRef(t)},name:t,onMenuChosen:function(t){return e.onMenuChosen(t)},options:e.options}):N("div",{style:{paddingLeft:"20px"}},N(Op,{pushRef:function(t){e.pushRef(t)},name:t,isChecked:e.isChecked,onMenuChosen:function(t){return e.onMenuChosen(t)}})))},r}(B);hc.displayName="SmartContainerItem";var gc,yc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getTimeDisplay=function(e,t,n){var r=n||"current / total",i=Ha(e),a=Ha(t),o=Ha(t-e);return(r=(r=r.replace(/current/g,i)).replace(/total/g,a)).replace(/left/g,o)},i.render=function(e){return N("div",{className:pr.a.timeDisplay},N("span",null,this.getTimeDisplay(e.currentTime,e.duration,e.format)))},r}(B);function vc(){return(vc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}yc.displayName="TimeDisplay";var mc,bc=$t((function(e){return{adProgress:e.engine.adProgress}}))(gc=jn("TimeDisplayAdsContainer")(gc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return N(yc,vc({currentTime:Math.round(e.adProgress.currentTime),duration:Math.round(e.adProgress.duration)},e))},r}(B))||gc)||gc;function _c(){return(_c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}bc.displayName="TimeDisplayAdsContainer";var Ec,kc=$t((function(e){return{currentTime:e.engine.currentTime,duration:e.engine.duration}}))(mc=jn("TimeDisplayPlaybackContainer")(mc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return N(yc,_c({currentTime:e.currentTime,duration:e.duration},e))},r}(B))||mc)||mc;kc.displayName="TimeDisplayPlaybackContainer";var Tc,Ac,wc,Sc=$t((function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded}}))(Ec=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=e.disabled,n=e.isPlaybackEnded,r=e.isCasting,i=e.leftControls,a=e.rightControls,o=[pr.a.topBar];return t&&o.push(pr.a.disabled),r&&n&&o.push(pr.a.hide),N("div",{className:o.join(" ")},N("div",{className:pr.a.topBarArea},N(qn,{name:"TopBar"})),e.children,N("div",{className:pr.a.leftControls},N(qn,{name:"TopBarLeftControls"},i)),N("div",{className:pr.a.rightControls},N(qn,{name:"TopBarRightControls"},a)))},r}(B))||Ec;function Cc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Sc.displayName="TopBar";var Ic,Pc,Dc,Rc=(Tc=$t((function(e){return{fallbackToMutedAutoPlay:e.engine.fallbackToMutedAutoPlay}}),null),Ac=jn("UnmuteIndication"),Tc(wc=Sr(wc=Br(wc=Ac(wc=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xc(Cc(t=e.call.apply(e,[this].concat(r))||this),"_iconTimeout",null),xc(Cc(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&(t.props.player.muted=!t.props.player.muted)})),xc(Cc(t),"onMouseOver",(function(){return t.setState({iconOnly:!1})})),xc(Cc(t),"onMouseOut",(function(){return t.setState({iconOnly:!0})})),xc(Cc(t),"onMouseUp",(function(){return t.props.player.muted=!t.props.player.muted})),xc(Cc(t),"onTouchEnd",(function(e){return e.stopImmediatePropagation()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(e){var t=this;!e.fallbackToMutedAutoPlay&&this.props.fallbackToMutedAutoPlay&&(this.props.eventManager.listenOnce(this.props.player,this.props.player.Event.PLAYING,(function(){return t._iconOnlyTimeout()})),this.props.eventManager.listenOnce(this.props.player,this.props.player.Event.AD_STARTED,(function(){return t._iconOnlyTimeout()})))},i.componentWillUnmount=function(){this._iconTimeout&&(clearTimeout(this._iconTimeout),this._iconTimeout=null)},i._iconOnlyTimeout=function(){var e=this;this._iconTimeout=setTimeout((function(){e.setState({iconOnly:!0})}),3e3)},i.render=function(e){if(this.props.fallbackToMutedAutoPlay){var t=[pr.a.unmuteButtonContainer];return e.hasTopBar&&t.push(pr.a.hasTopBar),this.state.iconOnly&&t.push(pr.a.showIconOnly),N(En,null,N("div",{tabIndex:"0","aria-label":N(bn,{id:"controls.unmute"}),className:t.join(" "),onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown},N("a",{className:[pr.a.btn,pr.a.btnDarkTransparent,pr.a.unmuteButton].join(" ")},N("div",{className:pr.a.unmuteIconContainer},N(Eo,{type:vo.VolumeBase}),N(Eo,{type:vo.VolumeMute})),N("span",null,N(bn,{id:"unmute.unmute"})))))}},r}(B))||wc)||wc)||wc)||wc);Rc.displayName="UnmuteIndication";var Oc,Lc,Mc,Nc=(Ic=$t((function(e){return{config:Object.assign({placement:"top-left",timeout:0},e.config.components.watermark)}})),Pc=jn("Watermark"),Ic(Dc=Sr(Dc=Br(Dc=Pc(Dc=function(e){var t,n;function r(){var t;return function(e,t,n){t in e?Object.defineProperty(e,t,{value:null,enumerable:!0,configurable:!0,writable:!0}):e[t]=null}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call(this)||this),"_timeoutId"),t.setState({show:!0}),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=function(){e.props.config.timeout>0&&(e._timeoutId=setTimeout((function(){return e.setState({show:!1})}),e.props.config.timeout))},n=this.props.player;this.props.eventManager.listenOnce(n,n.Event.PLAYING,t),this.props.eventManager.listen(n,n.Event.CHANGE_SOURCE_ENDED,(function(){e.setState({show:!0}),e.props.eventManager.listenOnce(n,n.Event.PLAYING,t)}))},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},i.render=function(e){if(e.config.img){var t=[pr.a.watermark];return e.config.placement.split("-").forEach((function(e){t.push(pr.a[e])})),e.config.url||t.push(pr.a.emptyUrl),this.state.show||t.push(pr.a.hideWatermark),N("div",{className:t.join(" ")},N("a",{href:e.config.url,target:"_blank",rel:"noopener noreferrer"},N("img",{src:e.config.img})))}},r}(B))||Dc)||Dc)||Dc)||Dc);Nc.displayName="Watermark";var Uc,Fc,jc,Bc=(Oc=$t((function(e){return{isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,config:e.config.components.logo}})),Lc=jn("Logo"),Oc(Mc=Sr(Mc=Lc(Mc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._shouldRender=function(){return!(0===Object.keys(this.props.config).length&&this.props.config.constructor===Object)},i.render=function(e){if(this._shouldRender()){var t=[Ei.TINY,Ei.EXTRA_SMALL,Ei.SMALL].includes(this.props.playerSize);return e.config.img&&!t?N("div",{className:[pr.a.controlButtonContainer,e.config.url?"":pr.a.emptyUrl].join(" "),"aria-label":N(bn,{id:"controls.logo"}),title:e.config.text},N("a",{className:pr.a.controlButton,href:e.config.url,target:"_blank",rel:"noopener noreferrer"},N("img",{className:pr.a.icon,src:e.config.img}))):void 0}},r}(B))||Mc)||Mc)||Mc);Bc.displayName="Logo";var Vc,Hc,Kc,Gc,zc,Wc=$t((function(e){return{poster:e.engine.poster,castSession:e.engine.castSession,isIdle:e.engine.isIdle,isPlaying:e.engine.isPlaying,isPlaybackEnded:e.engine.isPlaybackEnded,isPaused:e.engine.isPaused,isChangingSource:e.engine.isChangingSource}}))(Uc=jn("CastOverlay")((jc=Fc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getStatus=function(){return this.props.isPlaying||this.props.isPaused?N(bn,{id:"cast.status.playing_on"}):this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?N(bn,{id:"cast.status.connected_to"}):N(bn,{id:"cast.status.connecting_to"})},i.getIcon=function(){return this.props.isPlaying||this.props.isPaused||this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?N(_o,{type:this.props.icon}):N("div",{className:pr.a.castConnectingSpinner})},i.render=function(e){if(e.castSession){var t={},n=[pr.a.castPoster];e.poster&&(t={backgroundImage:e.isChangingSource?"":"url("+e.poster+")",backgroundSize:"contain"},n.push(pr.a.hasPoster));var r=this.getStatus(),i=this.getIcon();return N("div",null,N("div",{className:pr.a.castOverlay},N("div",{className:n.join(" "),style:t,onMouseOver:function(e){return e.stopPropagation()}}),N("div",{className:pr.a.castBlackCover})),N("div",{className:pr.a.castBox},N("div",{className:pr.a.castIcon},i),N("div",{className:pr.a.castText},N(En,null,N("span",{className:pr.a.castStatus},r)),N("br",null),N("span",{className:pr.a.castDevice},e.castSession.deviceFriendlyName))))}},r}(B),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Fc,"defaultProps",{icon:vo.Cast}),Uc=jc))||Uc)||Uc;function Yc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Wc.displayName="CastOverlay";var Xc,$c,Qc,Zc,Jc,ep=(Vc=$t((function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,prePlayback:e.engine.prePlayback,loading:e.loading.show,isCastAvailable:e.engine.isCastAvailable}})),Hc=jn("CastBeforePlay"),Vc(Kc=Sr(Kc=Hc((zc=Gc=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qc(Yc(t=e.call.apply(e,[this].concat(r))||this),"_timeoutId",null),qc(Yc(t),"onClick",(function(){t.props.player.startCasting(js)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this._timeoutId=setTimeout((function(){e.setState({show:!0})}),700)},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},i.render=function(e){if(e.isCastAvailable&&!e.loading&&e.prePlayback){var t=[pr.a.castOnTvButtonContainer];return this.state.show&&t.push(pr.a.showCastOnTv),N("div",{className:t.join(" ")},N(En,null,N(Bo,{tabIndex:"0","aria-label":N(bn,{id:"cast.play_on_tv"}),onClick:this.onClick,className:[pr.a.btn,pr.a.btnDarkTransparent,pr.a.castOnTvButton].join(" ")},N("div",{className:pr.a.castOnTvIconContainer},N(_o,{type:e.icon})),N("span",null,N(bn,{id:"cast.play_on_tv"})))))}},r}(B),qc(Gc,"defaultProps",{icon:vo.Cast}),Kc=zc))||Kc)||Kc)||Kc);function tp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function np(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ep.displayName="CastBeforePlay";var rp,ip=(Xc=$t((function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,isCasting:e.engine.isCasting}}),null),$c=jn("CastAfterPlay"),Xc(Qc=Sr(Qc=$c((Jc=Zc=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return np(tp(t=e.call.apply(e,[this].concat(r))||this),"_timeoutId",null),np(tp(t),"onClick",(function(e){e.stopPropagation(),t.props.player.stopCasting()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this._timeoutId=setTimeout((function(){e.setState({show:!0})}),700)},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},i.render=function(e){if(e.isCasting&&e.isPlaybackEnded){var t=[pr.a.castOnTvButtonContainer];return this.state.show&&t.push(pr.a.showCastOnTv),N("div",null,N("div",{className:t.join(" "),onClick:this.onClick},N("a",{className:[pr.a.btn,pr.a.btnDarkTransparent,pr.a.castOnTvButton].join(" ")},N("div",{className:pr.a.castOnTvIconContainer},N(_o,{type:e.icon})),N(En,null,N("span",null,N(bn,{id:"cast.disconnect_from_tv"}))))))}},r}(B),np(Zc,"defaultProps",{icon:vo.CastBrand}),Qc=Jc))||Qc)||Qc)||Qc);ip.displayName="CastAfterPlay";var ap,op=An({prevControlsText:"controls.prev",nextControlsText:"controls.next",playlistPrevText:"playlist.prev",playlistUpNextText:"playlist.up_next"})(rp=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t,n,r=e.type,i=e.item,a=e.onClick,o="next"===r?vo.Next:vo.Prev,s=e[e.type+"ControlsText"],l="prev"===r?this.props.playlistPrevText:this.props.playlistUpNextText,u=null==i||null==(t=i.sources)?void 0:t.poster,c=(null==i||null==(n=i.sources)?void 0:n.metadata)?i.sources.metadata.name:"",p=N(Bo,{disabled:!i,tabIndex:"0","aria-label":s,className:""+pr.a.controlButton,onClick:a},N("div",null,N(Eo,{type:o})));return N("div",{className:[pr.a.controlButtonContainer,pr.a.controlPlaylistButton].join(" ")},e.showPreview&&(u||c)?N(j,null,N("div",{className:pr.a.posterPreview},u?N("div",{className:pr.a.posterPreviewImg,style:"background-image: url("+u+");"}):void 0,N("div",{className:pr.a.posterPreviewText},N("div",{className:pr.a.posterPreviewTextTitle},l),N("div",{className:pr.a.posterPreviewTextName},""+(c||"")))),p):N(Oo,{label:s},p))},r}(B))||rp;function sp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var up,cp,pp,dp=$t((function(e){return{playlist:e.engine.playlist}}))(ap=Sr(ap=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lp(sp(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){"prev"===t.props.type?t.props.player.playlist.playPrev():t.props.player.playlist.playNext()})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=e.playlist[e.type];return N(op,{type:e.type,item:t,onClick:this.onClick.bind(this),showPreview:e.showPreview})},r}(B))||ap)||ap;function fp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}dp.displayName="PlaylistButton";var gp,yp,vp,mp,bp,_p,Ep=(up=$t((function(e){return{playlist:e.engine.playlist,isPlaybackEnded:e.engine.isPlaybackEnded}})),cp=jn("PlaylistNextScreen"),up(pp=Sr(pp=cp(pp=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return hp(fp(t=e.call.apply(e,[this].concat(r))||this),"onPosterClick",(function(){t.props.player.playlist.playNext()})),hp(fp(t),"onKeyDown",(function(e){e.keyCode!==Ln.ENTER&&e.keyCode!==Ln.SPACE||(e.preventDefault(),t.onPosterClick())})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(e){!this._shouldRender(e)&&this._shouldRender(this.props)&&this.focusElement&&this.focusElement.focus()},i._shouldRender=function(e){return!(!(e.playlist&&e.playlist.next&&e.playlist.next.sources&&e.isPlaybackEnded)||e.player.playlist.options.autoContinue)},i._getPosterUrl=function(){var e=this.props.playlist.next;return e.sources.poster?e.sources.poster.indexOf("entry_id/"+e.sources.id)>-1&&-1===e.sources.poster.indexOf("/width/")?e.sources.poster+"/width/384":e.sources.poster:""},i.render=function(e){var t=this;if(this._shouldRender(e)){var n=e.playlist.next;return N("div",{className:pr.a.playlistNextScreenOverlay},N("div",{className:pr.a.playlistNextScreenContent},N("div",{id:"playlistNextScreenTextId",className:pr.a.playlistNextScreenText},N(En,null,N("div",{className:pr.a.playlistNextScreenTextTitle},N(bn,{id:"playlist.next"}))),N("div",{className:pr.a.playlistNextScreenTextName},""+(n.sources.metadata?n.sources.metadata.name:""))),N("div",{className:pr.a.playlistNextScreenPosterPlaceholder},N("div",{className:pr.a.playlistNextScreenPosterAspectRatio},N("div",{role:"button","aria-labelledby":"playlistNextScreenTextId",ref:function(e){return e?t.focusElement=e:void 0},tabIndex:"0",className:pr.a.playlistNextScreenPoster,onClick:this.onPosterClick,onKeyDown:this.onKeyDown},N("div",{className:pr.a.playlistNextScreenPosterImg,style:"background-image: url("+this._getPosterUrl()+");"}),N(Eo,{type:vo.Play}))))))}},r}(B))||pp)||pp)||pp);function kp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ep.displayName="PlaylistNextScreen";var Ap,wp=(gp=$t((function(e){return{isPictureInPictureSupported:e.engine.isPictureInPictureSupported,isInPictureInPicture:e.engine.isInPictureInPicture,playerSize:e.shell.playerSize}}),ur(sr)),yp=Fs("PictureInPicture"),vp=jn("PictureInPicture"),mp=fi("PictureInPicture"),bp=An({pictureInPictureText:"controls.pictureInPicture",pictureInPictureExitText:"controls.pictureInPictureExit",pictureInPictureExpandText:"controls.pictureInPictureExpand"}),gp(_p=Sr(_p=yp(_p=vp(_p=mp(_p=bp(_p=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tp(kp(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.P},action:function(){t.togglePip(),t.props.updatePlayerHoverState(!0)}}]),Tp(kp(t),"togglePip",(function(){var e=t.props.player;e.isInPictureInPicture()?(t.props.logger.debug("Exit Picture In Picture"),t.props.notifyClick(),e.exitPictureInPicture()):(t.props.logger.debug("Enter Picture In Picture"),t.props.notifyClick(),e.enterPictureInPicture())})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.render=function(){if(this.props.isPictureInPictureSupported&&this.props.playerSize!==Ei.EXTRA_SMALL)return N(ts,{name:"PictureInPicture"},N(Oo,{label:this.props.isInPictureInPicture?this.props.pictureInPictureExpandText:this.props.pictureInPictureText},N(Bo,{tabIndex:"0","aria-label":this.props.isInPictureInPicture?this.props.pictureInPictureExitText:this.props.pictureInPictureText,className:this.props.isInPictureInPicture?[pr.a.controlButton,pr.a.isInPictureInPicture].join(" "):pr.a.controlButton,onClick:this.togglePip},N(Eo,{type:vo.PictureInPictureStart}),N(Eo,{type:vo.PictureInPictureStop}))))},r}(B))||_p)||_p)||_p)||_p)||_p)||_p);wp.displayName="PictureInPicture";var Sp=$t((function(e){return{playlist:e.engine.playlist}}))(Ap=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.setState({shouldUpdate:!1})},i.componentDidUpdate=function(e){!!e.playlist!=!!this.props.playlist&&this.setState({shouldUpdate:!0})},i.render=function(e){var t=e.name,n=e.className,r=this.state.shouldUpdate;return r&&this.setState({shouldUpdate:!1}),N("div",{className:[pr.a.playbackControls,n].join(" ")},N(qn,{name:t,shouldUpdate:r},e.playlist?N(j,null,N(dp,{type:"prev",showPreview:e.showPreview}),N(ll,null),N(dp,{type:"next",showPreview:e.showPreview})):N(ll,null)))},r}(B))||Ap;function Cp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Sp.displayName="PlaybackControls";var Ip,Pp,Dp,Rp,Op=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xp(Cp(t=e.call.apply(e,[this].concat(r))||this),"onChange",(function(e){t.props.onMenuChosen(e)})),xp(Cp(t),"handleOnKeyDown",(function(e){e.keyCode!==Ln.ENTER&&e.keyCode!==Ln.SPACE||(e.preventDefault(),t.onChange(!t.props.isChecked))})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=this;return N("label",{onKeyDown:function(e){return t.handleOnKeyDown(e)},className:pr.a.switch,ref:function(t){e.pushRef&&e.pushRef(t)},"aria-label":e.name,role:"switch","aria-checked":e.isChecked,tabIndex:"-1"},N("input",{name:e.name,className:pr.a.toggleInput,type:"checkbox",checked:e.isChecked,onChange:function(e){return t.onChange(e.target.checked)}}),N("span",{className:pr.a.slider}))},r}(B);Op.displayName="ToggleSwitch";var Lp,Mp,Np,Up,Fp,jp,Bp=(Ip=$t((function(e){return{audioTracks:e.engine.audioTracks}}),ur(sa)),Pp=fi("AudioMenu"),Dp=An({audioLabelText:"settings.audio"}),Ip(Rp=Sr(Rp=Pp(Rp=Dp(Rp=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.onAudioChange=function(e){this.props.updateAudio(e),this.props.player.selectTrack(e),this.props.notifyClick({type:this.props.player.Track.AUDIO,track:e})},i.render=function(e){var t=this,n=e.audioTracks.filter((function(e){return e.label||e.language})).map((function(e){return{label:e.label||e.language,active:e.active,value:e}}));return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Audio,label:this.props.audioLabelText,options:n,onMenuChosen:function(e){return t.onAudioChange(e)}})},r}(B))||Rp)||Rp)||Rp)||Rp);function Vp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Bp.displayName="AudioMenu";var Kp,Gp,zp,Wp,Yp,qp,Xp=(Lp=$t((function(e){return{textTracks:e.engine.textTracks,isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,showAdvancedCaptionsMenu:e.config.settings.showAdvancedCaptionsMenu}}),ur(na)),Mp=Fs("CaptionsMenu"),Np=jn("CaptionsMenu"),Up=fi("CaptionsMenu"),Fp=An({captionsLabelText:"captions.captions",advancedCaptionsSettingsText:"captions.advanced_captions_settings"}),Lp(jp=Sr(jp=Br(jp=Mp(jp=Np(jp=Up(jp=Fp(jp=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hp(Vp(t=e.call.apply(e,[this].concat(r))||this),"_lastActiveTextLanguage",""),Hp(Vp(t),"_keyboardEventHandlers",[{key:{code:Ln.C},action:function(){var e=t.props,n=e.player,r=e.logger,i=n.getActiveTracks().text;if(i)if("off"===i.language&&t._lastActiveTextLanguage){r.debug("Changing text track to language",t._lastActiveTextLanguage);var a=n.getTracks("text").find((function(e){return e.language===t._lastActiveTextLanguage}));n.selectTrack(a)}else"off"===i.language||t._lastActiveTextLanguage||(r.debug("Hiding text track"),t._lastActiveTextLanguage=i.language,n.hideTextTrack())}}]),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillReceiveProps=function(e){var t=this.props.textTracks.find((function(e){return e.active})),n=e.textTracks.find((function(e){return e.active}));t&&"off"!==t.language&&n&&"off"===n.language?this._lastActiveTextLanguage=t.language:n&&"off"!==n.language&&(this._lastActiveTextLanguage="")},i.onCaptionsChange=function(e){e!==this.props.advancedCaptionsSettingsText?(this.props.player.selectTrack(e),this.props.notifyClick({type:this.props.player.Track.TEXT,track:e})):this.props.onAdvancedCaptionsClick()},i.render=function(e){var t=this,n=e.textTracks.map((function(e){return{label:e.label||e.language,active:e.active,value:e}}));return e.showAdvancedCaptionsMenu&&n.push({label:e.advancedCaptionsSettingsText,value:e.advancedCaptionsSettingsText,active:!1}),N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Captions,label:this.props.captionsLabelText,options:n,onMenuChosen:function(e){return t.onCaptionsChange(e)}})},r}(B))||jp)||jp)||jp)||jp)||jp)||jp)||jp);function $p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Xp.displayName="CaptionsMenu";var Zp,Jp,ed,td,nd=(Kp=$t(null,ur(sa)),Gp=Fs("SpeedMenu"),zp=jn("SpeedMenu"),Wp=fi("SpeedMenu"),Yp=An({speedLabelText:"settings.speed",speedNormalLabelText:"settings.speedNormal"}),Kp(qp=Sr(qp=Gp(qp=zp(qp=Wp(qp=Yp(qp=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qp($p(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.PERIOD,shiftKey:!0},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.SEMI_COLON,shiftKey:!0},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.COMMA,shiftKey:!0},action:function(e){t.handleKeydown(e)}}]),Qp($p(t),"onSpeedChange",(function(e){t.props.updateSpeed(e),t.props.player.playbackRate=e,t.props.notifyClick({type:"speed",speed:e})})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.handleKeydown=function(e){var t,n,r=this.props,i=r.player,a=r.logger;switch(e.keyCode){case Ln.PERIOD:t=i.playbackRate,(n=i.playbackRates.indexOf(t))<i.playbackRates.length-1&&(a.debug("Changing playback rate. "+t+" => "+i.playbackRates[n+1]),i.playbackRate=i.playbackRates[n+1],this.props.updateOverlayActionIcon(vo.SpeedUp),i.dispatchEvent(new Wr(i.playbackRate)));break;case Ln.SEMI_COLON:i.playbackRate!==i.defaultPlaybackRate&&(a.debug("Changing playback rate. "+i.playbackRate+" => "+i.defaultPlaybackRate),i.playbackRate=i.defaultPlaybackRate,this.props.updateOverlayActionIcon(vo.Speed),i.dispatchEvent(new Wr(i.playbackRate)));break;case Ln.COMMA:t=i.playbackRate,(n=i.playbackRates.indexOf(t))>0&&(a.debug("Changing playback rate. "+t+" => "+i.playbackRates[n-1]),i.playbackRate=i.playbackRates[n-1],this.props.updateOverlayActionIcon(vo.SpeedDown),i.dispatchEvent(new Wr(i.playbackRate)))}},i.render=function(e){var t=e.player.playbackRates.reduce((function(t,n){var r={value:n,label:1===n?e.speedNormalLabelText:n,active:!1};return n===e.player.playbackRate&&(r.active=!0),t.push(r),t}),[]);return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Speed,label:e.speedLabelText,options:t,onMenuChosen:this.onSpeedChange})},r}(B))||qp)||qp)||qp)||qp)||qp)||qp);nd.displayName="SpeedMenu";var rd={HD:1080,UHD_4K:2160,UHD_8K:4320};function id(e){var t=Object.keys(mo),n=t[0],r=t[2],i=t[4];return e>=rd.HD&&e<rd.UHD_4K?n:e>=rd.UHD_4K&&e<rd.UHD_8K?r:e>=rd.UHD_8K?i:null}var ad,od=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],sd=(Zp=$t((function(e){return{videoTracks:e.engine.videoTracks}}),ur(sa)),Jp=fi("QualityMenu"),ed=An({qualityLabelText:"settings.quality",qualityAutoLabelText:"settings.qualityAuto"}),Zp(td=Sr(td=Jp(td=ed(td=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.onQualityChange=function(e){this.props.updateQuality(e);var t=this.props.player;"auto"===e?t.enableAdaptiveBitrate():t.selectTrack(e),this.props.notifyClick({type:t.Track.VIDEO,track:e})},i.filterUniqueQualities=function(e,t){var n=e.length-1,r=e[n];return n>-1&&t.label===r.label?(t.bandwidth>r.bandwidth&&(e[n]=t),e[n].active=t.active||r.active):e.push(t),e},i.render=function(e){var t=this,n=e.videoTracks.sort((function(e,t){return e.height<t.height?1:-1})).filter((function(e){return e.bandwidth||e.height})).reduce(this.filterUniqueQualities,[]).map((function(t){return{label:t.label,active:!e.player.isAdaptiveBitrateEnabled()&&t.active,value:t,badgeType:id(t.height)}}));if(n.length>1&&"progressive"!==e.player.streamType){var r,i=n.find((function(e){return!0===e.value.active})).value;r=od.includes(this.props.player._localPlayer._config.ui.locale)?i.label+" - "+this.props.qualityAutoLabelText:this.props.qualityAutoLabelText+" - "+i.label,n.unshift({label:this.props.qualityAutoLabelText,dropdownOptions:{label:r,badgeType:id(i.height)},active:e.player.isAdaptiveBitrateEnabled(),value:"auto"})}return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Quality,label:e.qualityLabelText,options:n,onMenuChosen:function(e){return t.onQualityChange(e)}})},r}(B))||td)||td)||td)||td);function ld(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ud(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}sd.displayName="QualityMenu";var cd,pd=$t((function(e){return{isAdvancedAudioDescChecked:e.settings.advancedAudioDesc}}),ur(sa))(ad=fi("AdvancedAudioDescToggle")(ad=An({advancedAudioText:"settings.advancedAudioDescription"})(ad=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ud(ld(t=e.call.apply(e,[this].concat(r))||this),"onAdvancedAudioClick",(function(e){t.props.updateAdvancedAudioDesc(e),t.props.notifyClick({type:"AdvancedAudioDescription",checked:e})})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.AdvancedAudioDescription,label:e.advancedAudioText,isChecked:e.isAdvancedAudioDescChecked,onMenuChosen:this.onAdvancedAudioClick})},r}(B))||ad)||ad)||ad;pd.displayName="AdvancedAudioDescToggle";var dd,fd,hd,gd,yd,vd,md,bd=$t((function(e){return{videoStyles:e.shell.layoutStyles.video}}))(cd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e){return e.videoStyles!==this.props.videoStyles},i.render=function(){var e=this.props,t=e.videoStyles,n=e.children;return N("div",{style:t,className:pr.a.videoArea},N("div",{style:{pointerEvents:"auto"}},N(qn,{name:"VideoArea"},n)))},r}(B))||cd,_d=Sr(dd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(){return!1},i.render=function(){var e=this.props.children;return N("div",{className:pr.a.interactiveArea},N("div",{style:{pointerEvents:"auto"}},N(qn,{name:"InteractiveArea"},e)))},r}(B))||dd,Ed=(fd=$t((function(e){return{duration:e.engine.duration}})),Sr(hd=fd(hd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._getFramePreviewImgStyle=function(e){return"background: url("+e.url+");background-position: -"+e.x+"px -"+e.y+"px;"},i._getFramePreviewImgContainerStyle=function(e){return{height:e.height+4+"px",width:e.width+4+"px"}},i.render=function(){var e=this.props.player.getThumbnail(this.props.virtualTime);if(e)return N("div",{style:this._getFramePreviewImgContainerStyle(e),className:[pr.a.framePreviewImgContainer,pr.a.nonSticky].join(" ")},N("div",{className:pr.a.framePreviewImg,style:this._getFramePreviewImgStyle(e)}))},r}(B))||hd)||hd);function kd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Td(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ad(){return(Ad=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Ed.displayName="SeekBarPreview";var wd,Sd,Cd,xd,Id=(gd=$t((function(e){return{config:e.config.components.seekbar,isMobile:e.shell.isMobile,previewHoverActive:e.seekbar.previewHoverActive,hidePreview:e.seekbar.hidePreview,hideTimeBubble:e.seekbar.hideTimeBubble}}),ur(Ad({},sr,da))),yd=Fs("SeekBar"),vd=An({sliderAriaLabel:"controls.seekBarSlider"}),gd(md=Sr(md=Br(md=yd(md=vd(md=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Td(kd(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.LEFT},action:function(e){t.handleKeydown(e,!1)}},{key:{code:Ln.RIGHT},action:function(e){t.handleKeydown(e,!1)}},{key:{code:Ln.HOME},action:function(e){t.handleKeydown(e,!1)}},{key:{code:Ln.END},action:function(e){t.handleKeydown(e,!1)}}]),Td(kd(t),"onSeekbarMouseDown",(function(e){if(!t.props.isMobile&&!t.props.previewHoverActive&&(e.preventDefault(),e.stopPropagation(),t.props.updateSeekbarDraggingStatus(!0),t.props.isDraggingActive)){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration)}})),Td(kd(t),"onPlayerMouseUp",(function(e){if(!t.props.isMobile&&!t.props.previewHoverActive&&t.props.isDraggingActive){var n=t.props.currentTime,r=t.getTime(e);t.props.changeCurrentTime(r),t.updateSeekBarProgress(r,t.props.duration),t.props.updateSeekbarDraggingStatus(!1),t.props.notifyChange({from:n,to:r})}})),Td(kd(t),"onPlayerMouseMove",(function(e){if(!t.props.isMobile&&t.props.isDraggingActive){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration),t.updateSeekBarProgress(n,t.props.duration,!0)}})),Td(kd(t),"onSeekbarMouseMove",(function(e){if(!t.props.isMobile&&!t.props.previewHoverActive){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration,!0)}})),Td(kd(t),"onSeekbarTouchStart",(function(e){if(t.props.updateSeekbarDraggingStatus(!0),t.props.isDraggingActive){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration)}})),Td(kd(t),"onSeekbarTouchMove",(function(e){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration,!0),t.props.isDraggingActive&&t.updateSeekBarProgress(n,t.props.duration),e.preventDefault()})),Td(kd(t),"onKeyDown",(function(e){switch(e.keyCode){case Ln.LEFT:case Ln.RIGHT:t.handleKeydown(e,!0);break;case Ln.ENTER:case Ln.SPACE:e.preventDefault(),t.togglePlayPause()}})),Td(kd(t),"togglePlayPause",(function(){t.props.player.paused?t.props.player.play():t.props.player.pause()})),Td(kd(t),"onSeekbarTouchEnd",(function(e){if(t.props.isDraggingActive){var n=t.getTime(e),r=t.props.currentTime,i=n;t.props.changeCurrentTime(i),t.updateSeekBarProgress(i,t.props.duration),t.props.notifyChange({from:r,to:i})}t.props.updateSeekbarDraggingStatus(!1)})),Td(kd(t),"onSeekbarMouseOver",(function(){t.props.isMobile||t.props.updateSeekbarHoverActive(!0)})),Td(kd(t),"onSeekbarMouseLeave",(function(){t.props.isMobile||t.props.updateSeekbarHoverActive(!1)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props,n=t.player,r=t.eventManager,i=this._seekBarElement.getBoundingClientRect();this.props.updateSeekbarClientRect(i),r.listen(n,Dr.Type.GUI_RESIZE,(function(){e.setState({resizing:!0}),setTimeout((function(){var t=e._seekBarElement.getBoundingClientRect();e.props.updateSeekbarClientRect(t),e.setState({resizing:!1})}),pr.a.defaultTransitionTime)})),document.addEventListener("mouseup",this.onPlayerMouseUp),document.addEventListener("mousemove",this.onPlayerMouseMove),this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.componentWillUnmount=function(){document.removeEventListener("mouseup",this.onPlayerMouseUp),document.removeEventListener("mousemove",this.onPlayerMouseMove)},i.handleKeydown=function(e,t){var n=this,r=this.props,i=r.duration,a=r.currentTime,o=function(e,t){n.props.changeCurrentTime(t),n.updateSeekBarProgress(t,i,!0),n.props.notifyChange({from:e,to:t})};switch(this.props.updatePlayerHoverState(!0),e.keyCode){case Ln.LEFT:t||this.props.updateOverlayActionIcon(vo.Rewind),o(a,a-5>0?a-5:0);break;case Ln.RIGHT:t||this.props.updateOverlayActionIcon(vo.Forward),o(a,a+5>i?i:a+5);break;case Ln.HOME:t||this.props.updateOverlayActionIcon(vo.StartOver),o(a,0);break;case Ln.END:t||this.props.updateOverlayActionIcon(vo.SeekEnd),o(a,i)}},i.updateSeekBarProgress=function(e,t,n){void 0===n&&(n=!1),n?this.props.updateVirtualTime(e):this.props.updateCurrentTime(e)},i.getOffset=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft+this._getTransformX(e),n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return this.props.player.isFullscreen()&&(t=0),{top:n,left:t}},i._getTransformX=function(e){var t=getComputedStyle(e),n=(t.getPropertyValue("transform")||t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")).match(/-?\d+/g),r=0;return n&&n.length>0&&(r=parseFloat(n[4])),r},i.getTime=function(e){var t,n=("number"==typeof e.clientX?e.clientX:null==e||null==(t=e.changedTouches[0])?void 0:t.clientX)-this._seekBarElement.getBoundingClientRect().left,r=parseFloat((this.props.duration/this._seekBarElement.offsetWidth*n).toFixed(2));return r<0?0:r>this.props.duration?this.props.duration:r},i.getBufferedPercent=function(){var e=this.props.player;if(this.props.duration>0&&e.buffered.length>0){var t=(e.isLive()?e.buffered.end(0)-e.getStartTimeOfDvrWindow():e.buffered.end(0))/this.props.duration*100;return t<100?t:100}return 0},i.getFramePreviewOffset=function(){if(this._seekBarElement&&this._framePreviewElement){var e=this.props.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth?this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth:e}return 0},i.getTimeBubbleOffset=function(){if(this._timeBubbleElement){var e=this.props.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth?this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth:e}return 0},i.renderFramePreview=function(){var e=this;if(this.props.showFramePreview&&!this.props.isMobile)return N("div",{className:this.props.hidePreview?[pr.a.framePreview,pr.a.hideFramePreview].join(" "):pr.a.framePreview,style:this._getFramePreviewStyle(),ref:function(t){return t?e._framePreviewElement=t:void 0}},N(Ed,{virtualTime:this.props.virtualTime}))},i._getFramePreviewStyle=function(){return"left: "+this.getFramePreviewOffset()+"px;"},i.renderTimeBubble=function(){var e=this;if(!this.props.hideTimeBubble&&this.props.showTimeBubble&&!this.props.isMobile){var t="left: "+this.getTimeBubbleOffset()+"px",n=this.props.isDvr?"-"+Ha(this.props.duration-this.props.virtualTime):Ha(this.props.virtualTime);return N("div",{className:pr.a.timePreview,style:t,ref:function(t){return t?e._timeBubbleElement=t:void 0}},n)}},i.render=function(e,t){var n=this,r=e.virtualTime/e.duration*100+"%",i=(e.forceFullProgress?100:e.currentTime/e.duration*100)+"%",a=Math.round(this.getBufferedPercent())+"%",o=[pr.a.seekBar];return e.adBreak&&o.push(pr.a.adBreak),e.isDvr&&o.push(pr.a.live),e.isMobile&&o.push(pr.a.hover),e.isDraggingActive&&o.push(pr.a.hover),t.resizing&&o.push(pr.a.resizing),N("div",{tabIndex:"0",className:o.join(" "),ref:function(e){return e?n._seekBarElement=e:void 0},role:"slider","aria-label":e.sliderAriaLabel,"aria-valuemin":"0","aria-valuemax":Math.round(this.props.duration),"aria-valuenow":Math.round(this.props.currentTime),"aria-valuetext":Ha(this.props.currentTime)+" of "+Ha(this.props.duration),onMouseOver:this.onSeekbarMouseOver,onMouseLeave:this.onSeekbarMouseLeave,onMouseMove:this.onSeekbarMouseMove,onMouseDown:this.onSeekbarMouseDown,onTouchStart:this.onSeekbarTouchStart,onTouchMove:this.onSeekbarTouchMove,onTouchEnd:this.onSeekbarTouchEnd,onKeyDown:this.onKeyDown},N("div",{className:pr.a.progressBar},N(qn,{name:"SeekBar",shouldUpdate:!0},this.renderFramePreview(),this.renderTimeBubble(),N("div",{className:pr.a.buffered,style:{width:a}}),e.dataLoaded?N("div",{className:pr.a.progress,style:{width:i}},e.adBreak?void 0:N("a",{className:pr.a.scrubber})):void 0,N("div",{className:pr.a.virtualProgress,style:{width:r}},N("div",{className:pr.a.virtualProgressIndicator})))))},r}(B))||md)||md)||md)||md)||md);Id.displayName="SeekBar";var Pd,Dd,Rd,Od=(wd=$t((function(e){return{currentTime:e.seekbar.currentTime,virtualTime:e.seekbar.virtualTime,duration:e.engine.duration,isDraggingActive:e.seekbar.draggingActive,isMobile:e.shell.isMobile,poster:e.engine.poster,dataLoaded:e.engine.dataLoaded}}),ur(Vi)),Sd=jn("SeekBarPlaybackContainer"),Cd=fi("SeekBarPlaybackContainer"),wd(xd=Sr(xd=Br(xd=Sd(xd=Cd(xd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this.props.eventManager.listen(this.props.player,this.props.player.Event.TIME_UPDATE,(function(){e.props.isDraggingActive||e.props.updateCurrentTime(e.props.player.currentTime)}))},i.render=function(){var e=this;return N(Id,{playerElement:this.props.playerContainer,showFramePreview:this.props.showFramePreview,showTimeBubble:this.props.showTimeBubble,changeCurrentTime:function(t){return e.props.player.currentTime=t},playerPoster:this.props.poster,updateSeekbarDraggingStatus:function(t){return e.props.updateSeekbarDraggingStatus(t)},updateSeekbarHoverActive:function(t){return e.props.updateSeekbarHoverActive(t)},updateSeekbarClientRect:function(t){return e.props.updateSeekbarClientRect(t)},updateCurrentTime:function(t){return e.props.updateCurrentTime(t)},updateVirtualTime:function(t){return e.props.updateVirtualTime(t)},currentTime:this.props.currentTime,virtualTime:this.props.virtualTime,duration:this.props.duration,isDraggingActive:this.props.isDraggingActive,isMobile:this.props.isMobile,notifyChange:function(t){return e.props.notifyChange(t)},dataLoaded:this.props.dataLoaded})},r}(B))||xd)||xd)||xd)||xd)||xd);function Ld(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Md(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Od.displayName="SeekBarPlaybackContainer";var Nd,Ud,Fd,jd=(Pd=$t((function(e){return{playlist:e.engine.playlist,currentTime:e.engine.currentTime,duration:e.engine.duration,lastSeekPoint:e.engine.lastSeekPoint,isSeeking:e.engine.isSeeking,isPlaybackEnded:e.engine.isPlaybackEnded,countdownCanceled:e.playlist.countdownCanceled}}),ur(va)),Dd=jn("PlaylistCountdown"),Pd(Rd=Sr(Rd=Br(Rd=Dd(Rd=function(e){var t,n;function r(t){var n;return Md(Ld(n=e.call(this,t)||this),"onClick",(function(){n.props.player.playlist.playNext()})),Md(Ld(n),"cancelNext",(function(e){n.props.logger.debug("Cancel auto play next item"),e.stopPropagation(),n.props.updatePlaylistCountdownCanceled(!0)})),Md(Ld(n),"onKeyDown",(function(e){switch(e.keyCode){case Ln.ENTER:n.onClick();break;case Ln.ESC:n.cancelNext(e)}})),Md(Ld(n),"onCancelButtonKeyDown",(function(e){e.keyCode===Ln.ENTER&&n.cancelNext(e)})),n.setState({focusable:!1}),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._shouldRender=function(e){return this.state.timeToShow&&e.playlist&&e.playlist.next&&e.playlist.next.sources&&e.player.playlist.countdown.showing&&(e.player.playlist.options.autoContinue||e.player.playlist.options.loop)},i._getTimeToShow=function(){var e=this.props.player.playlist.countdown,t=this.props.duration-e.duration;return e.timeToShow>=0&&e.timeToShow<=this.props.duration&&(t=Math.max(e.timeToShow,this.props.lastSeekPoint)),Math.max(0,Math.min(t,this.props.duration))},i.componentWillUpdate=function(e){var t=this._getTimeToShow();e.currentTime>=t?this.setState({timeToShow:!0}):(this.setState({timeToShow:!1}),this.props.updatePlaylistCountdownCanceled(!1))},i.isHidden=function(e){return!e.timeToShow||this.props.player.playlist.countdown.duration>=this.props.duration},i.isCanceled=function(){return this.props.countdownCanceled},i.isShown=function(e){return!this.isHidden(e)&&!this.isCanceled()},i.componentDidUpdate=function(e,t){var n=this;if(this._shouldRender(e)){var r=this._getTimeToShow(),i=this.props.player.playlist.countdown;e.isSeeking||this.props.countdownCanceled||!(this.props.isPlaybackEnded||this.props.currentTime>=r+i.duration&&this.props.currentTime<this.props.duration)||this.props.player.playlist.playNext()}!t.shown&&this.state.shown?this.focusElement&&this.props.eventManager.listenOnce(this.focusElement,"animationend",(function(){n.isShown(n.state)&&(n.focusElement.focus(),n.setState({focusable:!0}))})):t.shown&&!this.state.shown&&this.setState({focusable:!1}),this.isShown(this.state)!==this.state.shown&&this.setState((function(e){return{shown:n.isShown(e)}}))},i.shouldComponentUpdate=function(e){return this.props.duration>0&&!e.isSeeking&&!this.props.isPlaybackEnded},i.render=function(e){var t=this;if(this._shouldRender(e)&&(this.isShown(this.state)&&(this.nextShown=e.playlist.next),e.playlist.next&&e.playlist.next.sources&&this.nextShown)){var n=this.props.player.playlist.countdown,r=this._getTimeToShow(),i=e.currentTime-r,a=Math.min(n.duration,e.duration-r),o=Math.ceil(a-(i>0?i:0)),s=[pr.a.playlistCountdown];return this.isHidden(this.state)?s.push(pr.a.hidden):this.isCanceled()?s.push(pr.a.canceled):s.push(pr.a.slideIn),N("div",{role:"button","aria-labelledby":"playlistCountdownTextId",ref:function(e){return e?t.focusElement=e:void 0},tabIndex:this.state.focusable?0:-1,className:s.join(" "),onKeyDown:this.onKeyDown,onClick:this.onClick},N("div",{className:pr.a.playlistCountdownPoster,style:"background-image: url("+this.nextShown.sources.poster+");"}),N("div",{className:pr.a.playlistCountdownContentPlaceholder},N("div",{className:pr.a.playlistCountdownContentBackground},N("div",{className:pr.a.playlistCountdownContent},N(En,null,N("div",{id:"playlistCountdownTextId",className:pr.a.playlistCountdownText},N("div",{className:pr.a.playlistCountdownTextTitle},N(bn,{id:"playlist.up_next_in"}),N("div",{className:pr.a.playlistCountdownTimeLeft},o)),N("div",{className:pr.a.playlistCountdownTextName},""+(this.nextShown.sources.metadata?this.nextShown.sources.metadata.name:"")))),N("div",{className:[pr.a.controlButtonContainer,pr.a.playlistCountdownCancel].join(" ")},N(En,null,N(Bo,{tabIndex:this.state.focusable?0:-1,"aria-label":N(bn,{id:"playlist.cancel"}),className:[pr.a.controlButton,pr.a.playlistCountdownCancelButton].join(" "),onClick:this.cancelNext,onKeyDown:this.onCancelButtonKeyDown},N(Eo,{type:vo.Close}))))))))}},r}(B))||Rd)||Rd)||Rd)||Rd);jd.displayName="PlaylistCountdown";var Bd,Vd=(Nd=$t((function(e){return{poster:e.engine.poster,isInPictureInPicture:e.engine.isInPictureInPicture,isChangingSource:e.engine.isChangingSource}})),Ud=jn("PictureInPictureOverlay"),Nd(Fd=Sr(Fd=Ud(Fd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._handleClick=function(){this.props.player.exitPictureInPicture()},i.render=function(){if(this.props.isInPictureInPicture){var e={},t=[pr.a.pictureInPicturePoster];return this.props.poster&&(e={backgroundImage:this.props.isChangingSource?"":"url("+this.props.poster+")",backgroundSize:"contain"},t.push(pr.a.hasPoster)),N("div",null,N("div",{className:pr.a.pictureInPictureOverlay},N("div",{className:t.join(" "),style:e,onMouseOver:function(e){return e.stopPropagation()}},N("div",{className:pr.a.darkLayer})),N("div",{className:pr.a.pictureInPictureControl},N(En,null,N("span",{className:pr.a.pictureInPictureText},N(bn,{id:"pictureInPicture.overlay_text"}))))))}},r}(B))||Fd)||Fd)||Fd);Vd.displayName="PictureInPictureOverlay";var Hd,Kd=Ni({allowSidePanels:!0,allowPlayerArea:!0})(Bd=Fs("Playback")(Bd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.updateIsKeyboardEnabled(!0)},i.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(Io,null),N(bd,null),N(oo,null,N(j,null,N(Rc,null),N(no,null),N(sc,null),N(Vd,null),N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls}),N(Ep,null),N(Ko,null),N(ep,null)),(function(e){var t=e.containerRef;return N(j,null,N(Sc,null),N(_d,null,N(Nc,null),N(jd,null)),N(tu,{leftControls:N(j,null,N(Sp,{name:"BottomBarPlaybackControls",showPreview:!0}),N(ps,{step:10}),N(ms,{step:10}),N(kc,{format:"current / total"})),rightControls:N(j,null,N(Pl,null),N(Sl,null),N(Rl,null),N(ml,null),N(qs,null),N(wp,null),N(rl,null),N(Bc,null))},N(Od,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))},r}(B))||Bd)||Bd;function Gd(e){return N(Kd,e)}Kd.displayName="Playback";var zd=$t((function(e){return{isBumper:e.engine.adIsBumper}}))(Hd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return this.props.isBumper?null:N(Bl,null)},r}(B))||Hd;zd.displayName="AdLeftControls";var Wd,Yd=$t((function(e){return{state:{shell:e.shell,engine:{adIsLinear:e.engine.adIsLinear,adContentType:e.engine.adContentType}}}}))(Fs("Ads")((function(e,t){if(e.updateIsKeyboardEnabled(!0),function(e,t){var n=e.state.shell.isMobile&&!t.player.env.isIPadOS,r=!1;try{var i=t.player.config.plugins.ima.adsRenderingSettings;r=i&&i.useStyledLinearAds}catch(e){}return n||r}(e,t))return N("div",{className:pr.a.adGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(oo,null,N(j,null,N(no,null),N(Rc,{hasTopBar:!0})),N(j,null,N(Sc,{disabled:!0,leftControls:N(zd,null)}))))));var n=!1,r=!1,i=N(tu,{leftControls:N(j,null,N(Sp,{name:"BottomBarPlaybackControls",showPreview:!0}),N(bc,null)),rightControls:N(j,null,N(Sl,null),N(rl,null))}),a=N(tu,{rightControls:N(j,null,N(rl,null))});return N("div",{className:pr.a.adGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(oo,null,N(j,null,N(no,null),N(Rc,{hasTopBar:!0}),r?N(jl,null):void 0,N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls})),N(j,null,N(Sc,{disabled:!0,leftControls:N(zd,null),rightControls:n?N(Nl,null):void 0}),function(e){var t=e.state.engine,n=t.adIsLinear,r=t.adContentType;return!(n&&r&&!r.startsWith("video"))}(e)?i:a)))))})));function qd(e){return N(Yd,e)}function Xd(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N(oo,null,N(j,null,N(Ju,null)))))}function $d(e){return N(Xd,e)}Yd.displayName="Ads",Xd.displayName="Error";var Qd,Zd=Ni({allowSidePanels:!0,allowPlayerArea:!0})(Wd=Fs("Live")(Wd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.updateIsKeyboardEnabled(!0)},i.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(Io,null),N(bd,null),N(oo,null,N(j,null,N(no,null),N(sc,null),N(Vd,null),N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls}),N(Ko,null),N(ep,null)),(function(e){var t=e.containerRef;return N(j,null,N(Sc,null),N(_d,null,N(Nc,null),N(Rc,null)),N(tu,{leftControls:N(j,null,N(Sp,{name:"BottomBarPlaybackControls",showPreview:!0}),N(ps,{step:10}),N(ms,{step:10}),N(nc,null)),rightControls:N(j,null,N(Pl,null),N(Sl,null),N(Rl,null),N(ml,null),N(qs,null),N(wp,null),N(rl,null),N(Bc,null))},N(cc,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))},r}(B))||Wd)||Wd;function Jd(e){return N(Zd,e)}Zd.displayName="Live";var ef,tf=Ni({allowSidePanels:!0,allowPlayerArea:!0})(Qd=Fs("Img")(Qd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.updateIsKeyboardEnabled(!0)},i.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(bd,null),N(oo,null,N(j,null,N(Rc,null),N(no,null),N(sc,null),N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls}),N(ep,null)),(function(){return N(j,null,N(Sc,null),N(_d,null,N(Nc,null)),N(tu,{rightControls:N(j,null,N(Pl,null),N(qs,null),N(rl,null),N(Bc,null))}))})))))},r}(B))||Qd)||Qd;function nf(e){return N(tf,e)}tf.displayName="Img";var rf=function(e,t){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(i)}));return Nt({},n,{dispatch:r=Ut.apply(void 0,a)(n.dispatch)})}}}(function(e){return function(t){return function(t){return function(n){ef||(ef=Dn("UILoggerMiddleware")),e.debugActions&&ef.debug("Action fired",n),t(n)}}}}(t),function(e){return function(t){return function(n){return function(r){switch(r.type){case zl:!function(e,t,n){switch(t.name){case"Keyboard":Ql[t.payload.key](e,t,n);break;case"OverlayAction":!function(e,t,n){"PlayPause"===t.payload.type?Yl(e,0,n):"Fullscreen"===t.payload.type&&Xl(0,0,n)}(e,t,n);break;case"Settings":!function(e,t,n){t.payload.type===n.Track.VIDEO?n.dispatchEvent(new Gr(t.payload.track)):n.dispatchEvent(new Wr(t.payload.speed))}(0,t,n);break;case"CVAAOverlay":n.dispatchEvent(new Kr(t.payload.textStyle));break;case"Fullscreen":Xl(0,0,n);break;case"Language":!function(e,t,n){t.payload.type===n.Track.AUDIO?n.dispatchEvent(new Vr(t.payload.track)):t.payload.type===n.Track.TEXT&&n.dispatchEvent(new Hr(t.payload.track))}(0,t,n);break;case"Shell":n.dispatchEvent(new Dr(Dr.Type.UI_CLICKED));break;case"Rewind":n.dispatchEvent(new qr(t.payload.from,t.payload.to));break;case"Forward":n.dispatchEvent(new Xr(t.payload.from,t.payload.to));break;case"LiveTag":n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_LIVE_TAG));break;case"PrePlaybackPlayOverlay":case"PlayPause":Yl(e,0,n);break;case"Volume":ql(e,0,n)}}(t,r,e);break;case Wl:!function(e,t,n){switch(t.name){case"Volume":n.dispatchEvent(new $r(t.payload.volume));break;case"SeekBarPlaybackContainer":n.dispatchEvent(new zr(t.payload.from,t.payload.to));break;case"ActivePreset":n.dispatchEvent(new Dr(Dr.Type.UI_PRESET_CHANGE,t.payload))}}(0,r,e);break;case Qn.UPDATE_PLAYER_HOVER_STATE:!function(e,t,n){var r=e.getState().engine,i=e.getState().shell;!r.adBreak&&r.isPlaying&&i.playerHover!==t.hover&&n.dispatchEvent(new Yr(t.hover))}(t,r,e)}switch(n(r),r.type){case Qn.UPDATE_GUI_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.guiClientRect;n.dispatchEvent(new Kl(r))}(t,0,e);break;case Qn.UPDATE_PLAYER_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.playerClientRect;n.dispatchEvent(new Hl(r))}(t,0,e);break;case Qn.UPDATE_VIDEO_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.videoClientRect;n.dispatchEvent(new Gl(r))}(t,0,e)}}}}}(e))};function af(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var of={colors:{live:"--playkit-live-color",playerBackground:"--playkit-player-background-color"}},sf=["primary","secondary","success","danger","warning"],lf=["--playkit-icon-data-url","--playkit-icon-chromecast-url","--playkit-icon-quality-HD-active-url","--playkit-icon-quality-4K-active-url","--playkit-icon-quality-8K-active-url"],uf=function(){function e(e,t,n){this.player=e,this.config=t,this.playerContainerElement=document.querySelector("#"+n)}var t=e.prototype;return t.applyUserTheme=function(){this.config&&this.setColors(this.config)},t.setColors=function(e){for(var t in e.colors.primary&&this.setSvgFillColor(e.colors.primary),e.colors)sf.includes(t)?this.setAccentOrAcknowledgementColor(t,e.colors[t]):this.setColor(of.colors[t],e.colors[t])},t.setAccentOrAcknowledgementColor=function(e,t){var n,r,i,a,o,s,l,u,c=function(e){return function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.min(n,r,i),o=Math.max(n,r,i),s=o-a;o===a?t=0:n===o?t=(r-i)/s:r===o?t=2+(i-n)/s:i===o&&(t=4+(n-r)/s),(t=Math.min(60*t,360))<0&&(t+=360);var l=(a+o)/2;return[t,100*(o===a?0:l<=.5?s/(o+a):s/(2-o-a)),100*l]}(function(e){var t=e.toString().match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]}(e))}(t),p=c[0],d=c[1],f=c[2];null==(n=this.playerContainerElement)||null==(r=n.querySelector("."+pr.a.player))||r.style.setProperty("--playkit-{name}-color".replace("{name}",e),t),null==(i=this.playerContainerElement)||null==(a=i.querySelector("."+pr.a.player))||a.style.setProperty("--playkit-{name}-hsl-hue".replace("{name}",e),Math.round(p)+"deg"),null==(o=this.playerContainerElement)||null==(s=o.querySelector("."+pr.a.player))||s.style.setProperty("--playkit-{name}-hsl-saturation".replace("{name}",e),Math.round(d)+"%"),null==(l=this.playerContainerElement)||null==(u=l.querySelector("."+pr.a.player))||u.style.setProperty("--playkit-{name}-hsl-lightness".replace("{name}",e),Math.round(f)+"%")},t.setColor=function(e,t){var n,r;null==(n=this.playerContainerElement)||null==(r=n.querySelector("."+pr.a.player))||r.style.setProperty(e,t)},t.setSvgFillColor=function(e){for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return af(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?af(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(lf);!(t=n()).done;){var r,i,a,o=t.value,s=getComputedStyle(null==(r=this.playerContainerElement)?void 0:r.querySelector("."+pr.a.player)).getPropertyValue(o),l=e.replace("#","%23");null==(i=this.playerContainerElement)||null==(a=i.querySelector("."+pr.a.player))||a.style.setProperty(o,s.replace(/fill='%23([a-f0-9]{3}){1,2}\b'/,"fill='"+l+"'"))}},e}();function cf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var df=function(){function e(e,t){var n,r;pf(this,"_translations",{en:Ca.en}),pf(this,"_locale","en"),(n=t.logger)&&"function"==typeof n.getLogger&&(xn.get=n.getLogger),n&&n.LogLevel&&(In=n.LogLevel),this._uiComponents=[].concat(t.uiComponents||[]),this.player=e,this.targetId=t.targetId,this._createStore(t),this.setConfig(t),this._setLocaleTranslations(t),this._themesManager=new uf(e,t.userTheme,t.targetId),r=this.player.env,Ln.SEMI_COLON="firefox"===r.browser.name.toLowerCase()?59:186}var t,n,r=e.prototype;return r.setConfig=function(e,t){t?this.store.dispatch(mr.updateComponentConfig(t,e)):this.store.dispatch(mr.updateConfig(e))},r.addComponent=function(e){return function(){}},r.buildDefaultUI=function(){var e=[{template:function(e){return lo(e)},condition:function(e){return e.engine.isIdle}},{template:function(e){return $d(e)},condition:function(e){return e.engine.hasError}},{template:function(e){return qd(e)},condition:function(e){return e.engine.adBreak}},{template:function(e){return Jd(e)},condition:function(e){return e.engine.isLive}},{template:function(e){return nf(e)},condition:function(e){return e.engine.isImg}},{template:function(e){return Gd(e)}}];this._buildUI(e),this._themesManager.applyUserTheme()},r.buildCustomUI=function(e){if(e.length>0)this._buildUI(e);else{var t=[{template:function(e){return Gd(e)}}];this._buildUI(t)}this._themesManager.applyUserTheme()},r._setLocaleTranslations=function(e){var t=this;e.translations&&Object.entries(e.translations).forEach((function(e){var n=e[0],r=e[1];r=Cn({},t._translations.en,r),t._translations[n]=r})),e.locale&&this._translations[e.locale]&&(this._locale=e.locale)},r._createStore=function(e){var t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Ut;this.store=Pt(Sa,t(rf(this.player,e)))},r._buildUI=function(e){var t=this;this.player&&(this.container=document.getElementById(this.targetId),this.container&&ne(N(ut,{store:this.store},N(Li,{uiComponents:this._uiComponents,setApi:function(e){e&&(t.addComponent=e)}},N(pn,{definition:this._translations[this._locale]},N(Ar,{player:this.player},N(Jr,{player:this.player,store:this.store},N(Ps,{playerContainer:this.container},N(ki,null,N(Ra,null),N(Ma,null),N(Ja,{uis:e,playerContainer:this.container})))))))),this.container))},r.destroy=function(){this.container&&(this.container.prepend(this.player.getView()),ne("",this.container))},r.getLogLevel=function(e){return function(e){return Pn(e).getLevel()}(e)},r.setLogLevel=function(e,t){!function(e,t){Pn(t).setLevel(e)}(e,t)},t=e,(n=[{key:"config",get:function(){return function e(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,r){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[r]=e(t))})):"object"==typeof t?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"==typeof n[t]&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n}(this.store.getState().config)}},{key:"LogLevel",get:function(){return In}},{key:"Event",get:function(){return On}}])&&cf(t.prototype,n),e}(),ff=On,hf="0.77.2-canary.0-ee0e6eb",gf="@playkit-js/playkit-js-ui"}])},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(10),i=n(30);e.exports=n(9)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(47),i=n(26);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";var r=n(3);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var r=n(20);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(48),i=n(30),a=n(17),o=n(28),s=n(15),l=n(93),u=Object.getOwnPropertyDescriptor;t.f=n(9)?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(1),i=n(8),a=n(3);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*a((function(){n(1)})),"Object",o)}},function(e,t,n){var r=n(19),i=n(47),a=n(11),o=n(7),s=n(109);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,p=6==e,d=5==e||p,f=t||s;return function(t,s,h){for(var g,y,v=a(t),m=i(v),b=r(s,h,3),_=o(m.length),E=0,k=n?f(t,_):l?f(t,0):void 0;_>E;E++)if((d||E in m)&&(y=b(g=m[E],E,v),e))if(n)k[E]=y;else if(y)switch(e){case 3:return!0;case 5:return g;case 6:return E;case 2:k.push(g)}else if(c)return!1;return p?-1:u||c?c:k}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";if(n(9)){var r=n(32),i=n(2),a=n(3),o=n(1),s=n(62),l=n(88),u=n(19),c=n(44),p=n(30),d=n(16),f=n(45),h=n(21),g=n(7),y=n(120),v=n(34),m=n(28),b=n(15),_=n(49),E=n(5),k=n(11),T=n(80),A=n(35),w=n(37),S=n(36).f,C=n(82),x=n(31),I=n(6),P=n(24),D=n(52),R=n(50),O=n(84),L=n(42),M=n(55),N=n(43),U=n(83),F=n(111),j=n(10),B=n(22),V=j.f,H=B.f,K=i.RangeError,G=i.TypeError,z=i.Uint8Array,W=Array.prototype,Y=l.ArrayBuffer,q=l.DataView,X=P(0),$=P(2),Q=P(3),Z=P(4),J=P(5),ee=P(6),te=D(!0),ne=D(!1),re=O.values,ie=O.keys,ae=O.entries,oe=W.lastIndexOf,se=W.reduce,le=W.reduceRight,ue=W.join,ce=W.sort,pe=W.slice,de=W.toString,fe=W.toLocaleString,he=I("iterator"),ge=I("toStringTag"),ye=x("typed_constructor"),ve=x("def_constructor"),me=s.CONSTR,be=s.TYPED,_e=s.VIEW,Ee=P(1,(function(e,t){return Se(R(e,e[ve]),t)})),ke=a((function(){return 1===new z(new Uint16Array([1]).buffer)[0]})),Te=!!z&&!!z.prototype.set&&a((function(){new z(1).set({})})),Ae=function(e,t){var n=h(e);if(n<0||n%t)throw K("Wrong offset!");return n},we=function(e){if(E(e)&&be in e)return e;throw G(e+" is not a typed array!")},Se=function(e,t){if(!E(e)||!(ye in e))throw G("It is not a typed array constructor!");return new e(t)},Ce=function(e,t){return xe(R(e,e[ve]),t)},xe=function(e,t){for(var n=0,r=t.length,i=Se(e,r);r>n;)i[n]=t[n++];return i},Ie=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Pe=function(e){var t,n,r,i,a,o,s=k(e),l=arguments.length,c=l>1?arguments[1]:void 0,p=void 0!==c,d=C(s);if(null!=d&&!T(d)){for(o=d.call(s),r=[],t=0;!(a=o.next()).done;t++)r.push(a.value);s=r}for(p&&l>2&&(c=u(c,arguments[2],2)),t=0,n=g(s.length),i=Se(this,n);n>t;t++)i[t]=p?c(s[t],t):s[t];return i},De=function(){for(var e=0,t=arguments.length,n=Se(this,t);t>e;)n[e]=arguments[e++];return n},Re=!!z&&a((function(){fe.call(new z(1))})),Oe=function(){return fe.apply(Re?pe.call(we(this)):we(this),arguments)},Le={copyWithin:function(e,t){return F.call(we(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Z(we(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return U.apply(we(this),arguments)},filter:function(e){return Ce(this,$(we(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return J(we(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(we(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){X(we(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(we(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(we(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(we(this),arguments)},lastIndexOf:function(e){return oe.apply(we(this),arguments)},map:function(e){return Ee(we(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(we(this),arguments)},reduceRight:function(e){return le.apply(we(this),arguments)},reverse:function(){for(var e,t=we(this).length,n=Math.floor(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this},some:function(e){return Q(we(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return ce.call(we(this),e)},subarray:function(e,t){var n=we(this),r=n.length,i=v(e,r);return new(R(n,n[ve]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,g((void 0===t?r:v(t,r))-i))}},Me=function(e,t){return Ce(this,pe.call(we(this),e,t))},Ne=function(e){we(this);var t=Ae(arguments[1],1),n=this.length,r=k(e),i=g(r.length),a=0;if(i+t>n)throw K("Wrong length!");for(;a<i;)this[t+a]=r[a++]},Ue={entries:function(){return ae.call(we(this))},keys:function(){return ie.call(we(this))},values:function(){return re.call(we(this))}},Fe=function(e,t){return E(e)&&e[be]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},je=function(e,t){return Fe(e,t=m(t,!0))?p(2,e[t]):H(e,t)},Be=function(e,t,n){return!(Fe(e,t=m(t,!0))&&E(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};me||(B.f=je,j.f=Be),o(o.S+o.F*!me,"Object",{getOwnPropertyDescriptor:je,defineProperty:Be}),a((function(){de.call({})}))&&(de=fe=function(){return ue.call(this)});var Ve=f({},Le);f(Ve,Ue),d(Ve,he,Ue.values),f(Ve,{slice:Me,set:Ne,constructor:function(){},toString:de,toLocaleString:Oe}),Ie(Ve,"buffer","b"),Ie(Ve,"byteOffset","o"),Ie(Ve,"byteLength","l"),Ie(Ve,"length","e"),V(Ve,ge,{get:function(){return this[be]}}),e.exports=function(e,t,n,l){var u=e+((l=!!l)?"Clamped":"")+"Array",p="get"+e,f="set"+e,h=i[u],v=h||{},m=h&&w(h),b=!h||!s.ABV,k={},T=h&&h.prototype,C=function(e,n){V(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[p](n*t+r.o,ke)}(this,n)},set:function(e){return function(e,n,r){var i=e._d;l&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[f](n*t+i.o,r,ke)}(this,n,e)},enumerable:!0})};b?(h=n((function(e,n,r,i){c(e,h,u,"_d");var a,o,s,l,p=0,f=0;if(E(n)){if(!(n instanceof Y||"ArrayBuffer"==(l=_(n))||"SharedArrayBuffer"==l))return be in n?xe(h,n):Pe.call(h,n);a=n,f=Ae(r,t);var v=n.byteLength;if(void 0===i){if(v%t)throw K("Wrong length!");if((o=v-f)<0)throw K("Wrong length!")}else if((o=g(i)*t)+f>v)throw K("Wrong length!");s=o/t}else s=y(n),a=new Y(o=s*t);for(d(e,"_d",{b:a,o:f,l:o,e:s,v:new q(a)});p<s;)C(e,p++)})),T=h.prototype=A(Ve),d(T,"constructor",h)):a((function(){h(1)}))&&a((function(){new h(-1)}))&&M((function(e){new h,new h(null),new h(1.5),new h(e)}),!0)||(h=n((function(e,n,r,i){var a;return c(e,h,u),E(n)?n instanceof Y||"ArrayBuffer"==(a=_(n))||"SharedArrayBuffer"==a?void 0!==i?new v(n,Ae(r,t),i):void 0!==r?new v(n,Ae(r,t)):new v(n):be in n?xe(h,n):Pe.call(h,n):new v(y(n))})),X(m!==Function.prototype?S(v).concat(S(m)):S(v),(function(e){e in h||d(h,e,v[e])})),h.prototype=T,r||(T.constructor=h));var x=T[he],I=!!x&&("values"==x.name||null==x.name),P=Ue.values;d(h,ye,!0),d(T,be,u),d(T,_e,!0),d(T,ve,h),(l?new h(1)[ge]==u:ge in T)||V(T,ge,{get:function(){return u}}),k[u]=h,o(o.G+o.W+o.F*(h!=v),k),o(o.S,u,{BYTES_PER_ELEMENT:t}),o(o.S+o.F*a((function(){v.of.call(h,1)})),u,{from:Pe,of:De}),"BYTES_PER_ELEMENT"in T||d(T,"BYTES_PER_ELEMENT",t),o(o.P,u,Le),N(u),o(o.P+o.F*Te,u,{set:Ne}),o(o.P+o.F*!I,u,Ue),r||T.toString==de||(T.toString=de),o(o.P+o.F*a((function(){new h(1).slice()})),u,{slice:Me}),o(o.P+o.F*(a((function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()}))||!a((function(){T.toLocaleString.call([1,2])}))),u,{toLocaleString:Oe}),L[u]=I?x:P,r||I||d(T,he,P)}}else e.exports=function(){}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(31)("meta"),i=n(5),a=n(15),o=n(10).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(3)((function(){return l(Object.preventExtensions({}))})),c=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},p=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&p.NEED&&l(e)&&!a(e,r)&&c(e),e}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(95),i=n(67);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(21),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(4),i=n(96),a=n(67),o=n(66)("IE_PROTO"),s=function(){},l=function(){var e,t=n(64)("iframe"),r=a.length;for(t.style.display="none",n(68).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(95),i=n(67).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(15),i=n(11),a=n(66)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){var r=n(6)("unscopables"),i=Array.prototype;null==i[r]&&n(16)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var r=n(10).f,i=n(15),a=n(6)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){var r=n(1),i=n(26),a=n(3),o=n(70),s="["+o+"]",l=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),c=function(e,t,n){var i={},s=a((function(){return!!o[e]()||" "!=" "[e]()})),l=i[e]=s?t(p):o[e];n&&(i[n]=l),r(r.P+r.F*s,"String",i)},p=c.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(u,"")),e};e.exports=c},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(9),o=n(6)("species");e.exports=function(e){var t=r[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(12);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),window._babelPolyfill||n(126);var r,i,a,o=function(){function e(){}return e.register=function(t){e._polyfills.push(t)},e.installAll=function(){for(var t=0;t<e._polyfills.length;t++)e._polyfills[t].install()},e}();r=o,a=[],(i=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(i="_polyfills"))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a},function(e,t,n){var r=n(25);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(25),i=n(6)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){var r=n(4),i=n(20),a=n(6)("species");e.exports=function(e,t){var n,o=r(e).constructor;return void 0===o||null==(n=r(o)[a])?t:i(n)}},function(e,t,n){var r=n(8),i=n(2),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(32)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(17),i=n(7),a=n(34);e.exports=function(e){return function(t,n,o){var s,l=r(t),u=i(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(25);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(6)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(4);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(49),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";n(113);var r=n(12),i=n(16),a=n(3),o=n(26),s=n(6),l=n(85),u=s("species"),c=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=s(e),f=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=f?!a((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[u]=function(){return n}),n[d](""),!t})):void 0;if(!f||!h||"replace"===e&&!c||"split"===e&&!p){var g=/./[d],y=n(o,d,""[e],(function(e,t,n,r,i){return t.exec===l?f&&!i?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=y[0],m=y[1];r(String.prototype,e,v),i(RegExp.prototype,d,2==t?function(e,t){return m.call(e,this,t)}:function(e){return m.call(e,this)})}}},function(e,t,n){var r=n(19),i=n(108),a=n(80),o=n(4),s=n(7),l=n(82),u={},c={};(t=e.exports=function(e,t,n,p,d){var f,h,g,y,v=d?function(){return e}:l(e),m=r(n,p,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(a(v)){for(f=s(e.length);f>b;b++)if((y=t?m(o(h=e[b])[0],h[1]):m(e[b]))===u||y===c)return y}else for(g=v.call(e);!(h=g.next()).done;)if((y=i(g,m,h.value,t))===u||y===c)return y}).BREAK=u,t.RETURN=c},function(e,t,n){var r=n(2).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(2),i=n(1),a=n(12),o=n(45),s=n(29),l=n(59),u=n(44),c=n(5),p=n(3),d=n(55),f=n(40),h=n(71);e.exports=function(e,t,n,g,y,v){var m=r[e],b=m,_=y?"set":"add",E=b&&b.prototype,k={},T=function(e){var t=E[e];a(E,e,"delete"==e||"has"==e?function(e){return!(v&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(v||E.forEach&&!p((function(){(new b).entries().next()})))){var A=new b,w=A[_](v?{}:-0,1)!=A,S=p((function(){A.has(1)})),C=d((function(e){new b(e)})),x=!v&&p((function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)}));C||((b=t((function(t,n){u(t,b,e);var r=h(new m,t,b);return null!=n&&l(n,y,r[_],r),r}))).prototype=E,E.constructor=b),(S||x)&&(T("delete"),T("has"),y&&T("get")),(x||w)&&T(_),v&&E.clear&&delete E.clear}else b=g.getConstructor(t,e,y,_),o(b.prototype,n),s.NEED=!0;return f(b,e),k[e]=b,i(i.G+i.W+i.F*(b!=m),k),v||g.setStrong(b,e,y),b}},function(e,t,n){for(var r,i=n(2),a=n(16),o=n(31),s=o("typed_array"),l=o("view"),u=!(!i.ArrayBuffer||!i.DataView),c=u,p=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");p<9;)(r=i[d[p++]])?(a(r.prototype,s,!0),a(r.prototype,l,!0)):c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function e(t,n,r,i){void 0===i&&(i={}),this.severity=t,this.category=n,this.code=r,this.data=i,e._logger.error("Category:"+n+" | Code:"+r+" |",i)};i(a,"Severity",{RECOVERABLE:1,CRITICAL:2}),i(a,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),i(a,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),i(a,"_logger",Object(r.b)("Error"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(8);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(){this.metadata=new Map,this.sources=new r.a,this.type=e.Type.UNKNOWN}return e.prototype.toJSON=function(){return{id:this.id,name:this.name,sources:this.sources.toJSON(),duration:this.duration,dvrStatus:this.dvrStatus,status:this.status,metadata:this.metadata,type:this.type,poster:this.poster,assetReferenceType:this.assetReferenceType}},e}();i(a,"Type",{VOD:"Vod",LIVE:"Live",IMAGE:"Image",AUDIO:"Audio",UNKNOWN:"Unknown"}),i(a,"DvrStatus",{ON:1,OFF:0})},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return i}));var r={get:function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}}},i={};function a(e){e&&"function"==typeof e.getLogger&&(r.get=e.getLogger),e&&e.LogLevel&&(i=e.LogLevel)}function o(e){return r.get(e)}function s(e){return o(e).getLevel()}function l(e,t){o(t).setLevel(e)}t.b=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(e){void 0===e&&(e=new Map),i(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),i(this,"_attemptCounter",1),this.headers=e}var t=e.prototype;return t.getUrl=function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")},t.doHttpRequest=function(){var e=this,t=new Promise((function(t,n){e._requestPromise={resolve:t,reject:n}}));return this.url||this._requestPromise.reject(new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,r.a.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t},t._createXHR=function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var n=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(n)}catch(n){e._requestPromise.reject(e._createError(t,r.a.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var n=performance.now();t.ontimeout=function(){e._handleError(t,r.a.Code.TIMEOUT,{timeout:(performance.now()-n)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,r.a.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,n){t.setRequestHeader(n,e)})),t.send(this.params)},t._getResponseHeaders=function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))},t._handleError=function(e,t,n){var r=this._createError(e,t,n);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(r);this._attemptCounter++,this._createXHR()},t._createError=function(e,t,n){return Object.assign(n,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,t,n)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){var t;(t="hasError")in this?Object.defineProperty(this,t,{value:!1,enumerable:!0,configurable:!0,writable:!0}):this[t]=!1,"KalturaAPIException"===e.objectType?(this.hasError=!0,this.error=new i(e.code,e.message)):e.error&&"KalturaAPIException"===e.error.objectType?(this.hasError=!0,this.error=new i(e.error.code,e.error.message)):this.data=e},i=function(e,t){this.code=e,this.message=t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a}));var r={DASH:{name:"dash",mimeType:"application/dash+xml",pathExt:"mpd"},HLS:{name:"hls",mimeType:"application/x-mpegURL",pathExt:"m3u8"},WVM:{name:"wvm",mimeType:"video/wvm",pathExt:"wvm"},MP4:{name:"mp4",mimeType:"video/mp4",pathExt:"mp4"},MP3:{name:"mp3",mimeType:"audio/mpeg",pathExt:"mp3"}},i=new Map([["mpegdash",r.DASH],["applehttp",r.HLS],["url",r.MP4]]);function a(e){var t=i.get(e);return!!t&&t.name===r.MP4.name}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r,i,a,o=function(e){this.scheme=e.scheme,this.licenseURL=e.licenseURL,this.certificate=e.certificate};a={"drm.PLAYREADY_CENC":"com.microsoft.playready","drm.WIDEVINE_CENC":"com.widevine.alpha","fairplay.FAIRPLAY":"com.apple.fairplay",WIDEVINE_CENC:"com.widevine.alpha",PLAYREADY_CENC:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"},(i="Scheme")in(r=o)?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){this.message=e.message,this.code=e.code}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n(9);var r=n(5),i=(n(13),function(){function e(){this.progressive=[],this.dash=[],this.hls=[],this.image=[]}var t=e.prototype;return t.map=function(e,t){if(t)switch(t.name){case r.a.MP4.name:this.progressive.push(e);break;case r.a.DASH.name:this.dash.push(e);break;case r.a.HLS.name:this.hls.push(e)}},t.toJSON=function(){var e={progressive:[],dash:[],hls:[],image:[]};return this.progressive.forEach((function(t){return e.progressive.push(t.toJSON())})),this.hls.forEach((function(t){return e.hls.push(t.toJSON())})),this.dash.forEach((function(t){return e.dash.push(t.toJSON())})),e.image=this.image,e},e}())},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n(12);var r=function(){function e(){}return e.prototype.toJSON=function(){var e={id:this.id,url:this.url,mimetype:this.mimetype};return this.bandwidth&&(e.bandwidth=this.bandwidth),this.width&&(e.width=this.width),this.height&&(e.height=this.height),this.label&&(e.label=this.label),this.drmData&&this.drmData.length>0&&(e.drmData=[],this.drmData.forEach((function(t){Array.isArray(e.drmData)&&e.drmData.push(t.toJSON())}))),e},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n(11);var r=n(0);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(e){i(this,"_loadersResponseMap",new Map),i(this,"_loaders",new Map),this._networkRetryConfig=e}var t=e.prototype;return t.add=function(e,t,n){var r=this,i=new e(t);if(i.isValid()){this._loaders.set(e.id,i);var a=this._multiRequest.requests.length,o=i.requests;this._multiRequest.retryConfig=this._networkRetryConfig,o.forEach((function(e){e.params=e.params||{},e.params.ks=e.params.ks||n,r._multiRequest.add(e)}));var s=Array.from(new Array(o.length),(function(e,t){return t+a}));this._loadersResponseMap.set(e.id,s)}},t.fetchData=function(e){var t=this;return new Promise((function(n,i){t._multiRequest.execute(e).then((function(e){t._multiResponse=e.response,t.prepareData(e.response).success?n(t._loaders):i(new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,r.a.Code.API_RESPONSE_MISMATCH,{headers:e.headers}))}),(function(e){i(e)}))}))},t.prepareData=function(e){var t=this;return this._loaders.forEach((function(n,r){var i=t._loadersResponseMap.get(r);try{i&&i.length>0&&(n.response=e.results.slice(i[0],i[i.length-1]+1))}catch(e){return{success:!1,error:e}}})),{success:!0,data:this._loaders}},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),i=n(2),a=n(4),o=n(0);function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return l(s(t=e.call.apply(e,[this].concat(r))||this),"requests",[]),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.add=function(e){var t;this.requests.push(e);var n={},r={service:e.service,action:e.action};return Object.assign(n,((t={})[this.requests.length]=Object.assign(r,e.params),t)),Object.assign(n,this.params),this.params=n,this},i.execute=function(e){var t=this;return new Promise((function(n,i){try{t.params=JSON.stringify(t.params)}catch(e){r._logger.error(""+e.message),i(new o.a(o.a.Severity.CRITICAL,o.a.Category.PROVIDER,o.a.Code.FAILED_PARSING_REQUEST,{error:e,params:t.params}))}t.doHttpRequest().then((function(r){var a=new c(r,e);a.success?n({headers:t.responseHeaders,response:a}):i(new o.a(o.a.Severity.CRITICAL,o.a.Category.NETWORK,o.a.Code.MULTIREQUEST_API_ERROR,{url:t.url,headers:t.responseHeaders,results:a.results}))}),(function(e){i(e)}))}))},r}(r.a);l(u,"_logger",Object(i.b)("MultiRequestBuilder"));var c=function e(t,n){void 0===n&&(n=!0),l(this,"results",[]);var r=t.result?t.result:t,i=(Array.isArray(r)?r:[r]).map((function(e){return new a.a(e)})),o=i.filter((function(e){return e.hasError}));o.forEach((function(t){e._logger.error("Service returned an error with error code: "+t.error.code+" and message: "+t.error.message+".")})),this.results=i,n&&o.length||o.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(e){return!e.hasError})),this.success=!0)};l(c,"_logger",Object(i.b)("MultiRequestResult"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(e,t,n){this.licenseUrl=e,this.scheme=t,n&&(this.certificate=n)}return e.prototype.toJSON=function(){var e={licenseUrl:this.licenseUrl,scheme:this.scheme};return this.certificate&&(e.certificate=this.certificate),e},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(t){this.id=t.id,this.url=e.extractBaseThumbnailUrl(t.dataUrl),this.mimetype=""}return e.extractBaseThumbnailUrl=function(e){return e.match(".+entry_id/[a-zA-Z0-9_]+/")[0].slice(0,-1)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),i=(n(10),n(0));function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}var s=function(){function e(e,t){var n,i;i={async:!0,timeout:0,maxAttempts:4},(n="_networkRetryConfig")in this?Object.defineProperty(this,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):this[n]=i,Object(r.e)(e.logger),this._partnerId=e.partnerId,this._widgetId=e.widgetId,this._uiConfId=e.uiConfId,this._isAnonymous=!e.ks,this._ks=e.ks||"",this._playerVersion=t}o(e,[{key:"partnerId",get:function(){return this._partnerId}},{key:"widgetId",get:function(){return this._widgetId||this.defaultWidgetId}},{key:"defaultWidgetId",get:function(){return"_"+this._partnerId}},{key:"uiConfId",get:function(){return this._uiConfId}},{key:"ks",get:function(){return this._ks},set:function(e){this._ks=e}},{key:"playerVersion",get:function(){return this._playerVersion}},{key:"isAnonymous",get:function(){return this._isAnonymous}}]);var t=e.prototype;return t.getMediaConfig=function(e){return Promise.reject(new i.a(i.a.Severity.CRITICAL,i.a.Category.PROVIDER,i.a.Code.METHOD_NOT_IMPLEMENTED,{message:"getMediaConfig method must be implement by the derived class"}))},t.getPlaylistConfig=function(e){return Promise.reject(new i.a(i.a.Severity.CRITICAL,i.a.Category.PROVIDER,i.a.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading playlist by id"}))},t.getEntryListConfig=function(e){return Promise.reject(new i.a(i.a.Severity.CRITICAL,i.a.Category.PROVIDER,i.a.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading entry list"}))},t._verifyHasSources=function(e){if(0===e.hls.concat(e.dash,e.progressive,e.image).length)throw new i.a(i.a.Severity.CRITICAL,i.a.Category.SERVICE,i.a.Code.MISSING_PLAY_SOURCE,{action:"",messages:"No play source for entry id: "+e.id})},t.getLogLevel=function(e){return Object(r.c)(e)},t.setLogLevel=function(e,t){Object(r.d)(e,t)},o(e,[{key:"LogLevel",get:function(){return r.a}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function e(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,r){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[r]=e(t))})):"object"==typeof t?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"==typeof n[t]&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n(1);var r=function(){this.items=[]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){this.url=e.url,this.clickThroughUrl=e.clickThroughUrl}},function(e,t,n){"use strict";n.r(t),n.d(t,"Provider",(function(){return ke})),n.d(t,"ProviderParser",(function(){return K})),n.d(t,"NAME",(function(){return Te})),n.d(t,"VERSION",(function(){return Ae})),n.d(t,"RequestBuilder",(function(){return G.a})),n.d(t,"ResponseTypes",(function(){return r}));var r={};n.r(r),n.d(r,"KalturaBaseEntryListResponse",(function(){return $})),n.d(r,"KalturaMediaEntry",(function(){return S})),n.d(r,"KalturaAccessControlModifyRequestHostRegexAction",(function(){return y})),n.d(r,"KalturaBumper",(function(){return m})),n.d(r,"KalturaFlavorAsset",(function(){return v})),n.d(r,"KalturaMediaEntries",(function(){return oe})),n.d(r,"KalturaMetadata",(function(){return T})),n.d(r,"KalturaMetadataListResponse",(function(){return A})),n.d(r,"KalturaPlaybackContext",(function(){return E})),n.d(r,"KalturaPlaybackSource",(function(){return h})),n.d(r,"KalturaPlaylist",(function(){return ae})),n.d(r,"KalturaRuleAction",(function(){return g})),n.d(r,"KalturaUIConfResponse",(function(){return ye})),n.d(r,"KalturaDrmPlaybackPluginData",(function(){return f.a})),n.d(r,"KalturaAccessControlMessage",(function(){return d.a})),n.d(r,"BaseServiceResult",(function(){return p.a}));var i,a,o,s=n(2),l=n(15),u={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1,replaceHostOnlyManifestUrls:!1},c=function(){function e(){}return e.set=function(e){e&&Object.assign(u,e)},e.get=function(){return Object(l.a)(u)},e}(),p=n(4),d=n(7),f=n(6),h=function(){function e(e){var t,n=this;t=[],"drm"in this?Object.defineProperty(this,"drm",{value:t,enumerable:!0,configurable:!0,writable:!0}):this.drm=t,this.format=e.format,this.deliveryProfileId=e.deliveryProfileId,this.url=e.url,this.protocols=e.protocols,this.flavorIds=e.flavorIds,e.drm&&e.drm.map((function(e){return n.drm.push(new f.a(e))}))}var t=e.prototype;return t.hasDrmData=function(){return this.drm&&this.drm.length>0},t.hasFlavorIds=function(){return!!this.flavorIds&&this.flavorIds.length>0},t.getProtocol=function(e){var t="";if(this.protocols&&this.protocols.length>0)this.protocols.split(",").forEach((function(n){n===e&&(t=n)}));else if("http"===e)return e;return t},e}(),g=function(e){this.type=e.type};o={DRM_POLICY:"drm.DRM_POLICY",BLOCK:1,PREVIEW:2,LIMIT_FLAVORS:3,ADD_TO_STORAGE:4,LIMIT_DELIVERY_PROFILES:5,SERVE_FROM_REMOTE_SERVER:6,REQUEST_HOST_REGEX:7,LIMIT_THUMBNAIL_CAPTURE:8},(a="Type")in(i=g)?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o;var y=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).pattern=t.pattern,n.replacement=t.replacement,n.replacmenServerNodeId=t.replacmenServerNodeId,n.checkAliveTimeoutMs=t.checkAliveTimeoutMs,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(g),v=function(e){this.id=e.id,this.flavorParamsId=e.flavorParamsId,this.fileExt=e.fileExt,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.id=e.id,this.frameRate=e.frameRate,this.isOriginal=e.isOriginal,this.isWeb=e.isWeb,this.containerFormat=e.containerFormat,this.videoCodecId=e.videoCodecId,this.status=e.status,this.language=e.language,this.label=e.label};!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(v,"Status",{ERROR:-1,QUEUED:0,CONVERTING:1,READY:2,DELETED:3,NOT_APPLICABLE:4,TEMP:5,WAIT_FOR_CONVERT:6,IMPORTING:7,VALIDATING:8,EXPORTING:9});var m=function(e){this.entryId=e.entryId,this.clickThroughUrl=e.url,this.sources=e.sources?e.sources.map((function(e){return new h(e)})):[]};function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){var t,n;function r(t){var n;if(_(b(n=e.call(this,t)||this),"sources",[]),_(b(n),"actions",[]),_(b(n),"messages",[]),_(b(n),"flavorAssets",[]),_(b(n),"bumperData",[]),!n.hasError){var r=t.messages;r&&r.map((function(e){return n.messages.push(new d.a(e))}));var i=t.actions;i&&i.map((function(e){e.type===g.Type.REQUEST_HOST_REGEX?n.actions.push(new y(e)):n.actions.push(new g(e))}));var a=t.sources;a&&a.map((function(e){return n.sources.push(new h(e))}));var o=t.flavorAssets;o&&o.map((function(e){return n.flavorAssets.push(new v(e))}));var s=t.bumperData;s&&s.map((function(e){return n.bumperData.push(new m(e))}))}return n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.hasBlockAction=function(){return void 0!==this.getBlockAction()},i.getBlockAction=function(){return this.actions.find((function(e){return e.type===g.Type.BLOCK}))},i.getErrorMessages=function(){return this.messages},i.getRequestHostRegexAction=function(){var e=this.actions.find((function(e){return e.type===g.Type.REQUEST_HOST_REGEX}));if(e instanceof y)return e},r}(p.a);function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=function(e){this.id=e.id,this.metadataProfileId=e.metadataProfileId,this.metadataProfileVersion=e.metadataProfileVersion,this.metadataProfileId=e.metadataProfileId,this.metadataObjectType=e.metadataObjectType,this.objectId=e.objectId,this.version=e.version,this.created=new Date(0),this.created.setUTCSeconds(e.createdAt),this.updated=new Date(0),this.updated.setUTCSeconds(e.updatedAt),this.status=e.status,this.xml=e.xml};k(T,"ObjectType",{AD_CUE_POINT:"adCuePointMetadata.AdCuePoint",ANNOTATION:"annotationMetadata.Annotation",CODE_CUE_POINT:"codeCuePointMetadata.CodeCuePoint",THUMB_CUE_POINT:"thumbCuePointMetadata.thumbCuePoint",ENTRY:1,CATEGORY:2,USER:3,PARTNER:4,DYNAMIC_OBJECT:5}),k(T,"Status",{VALID:1,INVALID:2,DELETED:3});var A=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.totalCount=t.totalCount,n.totalCount>0&&(n.metas=[],t.objects.map((function(e){return n.metas.push(new T(e))})))),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=function(e){this.id=e.id,this.referenceId=e.referenceId,this.externalSourceType=e.externalSourceType,this.name=e.name,this.description=e.description,this.dataUrl=e.dataUrl,this.type=e.type,this.entryType=e.mediaType,this.flavorParamsIds=e.flavorParamsIds,this.duration=e.duration,this.poster=e.thumbnailUrl,this.status=e.status,this.dvrStatus=e.dvrStatus,this.tags=e.tags};w(S,"EntryType",{AUTOMATIC:{value:-1},EXTERNAL_MEDIA:{value:"externalMedia.externalMedia"},MEDIA_CLIP:{value:1},MIX:{value:2},PLAYLIST:{value:5},DATA:{value:6},LIVE_STREAM:{value:7},LIVE_CHANNEL:{value:8},DOCUMENT:{value:10}}),w(S,"MediaType",{VIDEO:{value:1},IMAGE:{value:2},AUDIO:{value:5},LIVE_STREAM_FLASH:{value:201},LIVE_STREAM_WINDOWS_MEDIA:{value:202},LIVE_STREAM_REAL_MEDIA:{value:203},LIVE_STREAM_QUICK_TIME:{value:204}}),w(S,"EntryStatus",{ERROR_IMPORTING:-2,ERROR_CONVERTING:-1,SCAN_FAILURE:"virusScan.ScanFailure",IMPORT:0,INFECTED:"virusScan.Infected",PRECONVERT:1,READY:2,DELETED:3,PENDING:4,MODERATE:5,BLOCKED:6,NO_CONTENT:7}),w(S,"EntryModerationStatus",{PENDING_MODERATION:1,APPROVED:2,REJECTED:3,FLAGGED_FOR_REVIEW:4,MODERATE:5,AUTO_APPROVED:6});var C=function(){function e(){}return e.build=function(e){var t=c.get(),n=t.serviceUrl.substr(0,t.serviceUrl.lastIndexOf("/")),r=e.partnerId,i=e.entryId,a=e.ks,o=e.uiConfId,s=e.format,l=e.protocol,u=e.extension,p=e.flavorIds;if(!n||isNaN(Number.parseInt(r))||!i||!s||!l)return"";var d=n;return n.endsWith("/")||(d+="/"),d+="p/"+r+"/sp/"+r+"00/playManifest/entryId/"+i+"/protocol/"+l+"/format/"+s,p?d+="/flavorIds/"+p:o&&(d+="/uiConfId/"+o),""!==a&&(d+="/ks/"+a),""!==u&&(d+="/a."+u),o&&""!==p&&(d+="?uiConfId="+o),d},e}(),x=function(){function e(){}return e.xmlToJson=function(e){var t={};if(1===e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);t["@attributes"][r.nodeName]=r.nodeValue}}}else 3===e.nodeType&&(t=e.nodeValue);if(e.hasChildNodes())for(var i=0;i<e.childNodes.length;i++){var a=e.childNodes.item(i),o=a.nodeName;if(void 0===t[o])t[o]=this.xmlToJson(a);else{if(void 0===t[o].push){var s=t[o];t[o]=[],t[o].push(s)}t[o].push(this.xmlToJson(a))}}return t},e}(),I=n(1),P=n(12),D=n(9),R=n(8),O=n(5),L=function(){this.items=[]},M=n(16),N=n(17),U={SRT:"1",DFXP:"2",WEBVTT:"3",CAP:"4"},F={3:"vtt",1:"srt"},j=function(){function e(){}return e.createConfig=function(e,t){return e.map((function(e){var n=e.url,r=F[e.format];return[U.DFXP,U.CAP].includes(e.format)&&(n=e.webVttUrl,r=F[U.WEBVTT]),n=H(n,t),{default:!!e.isDefault,type:r,language:e.languageCode,label:e.label,url:n}}))},e}(),B=n(13),V=function(){function e(){}return e.getMediaEntry=function(t,n,r,i){var a=new I.a,o=i.entry,s=i.playBackContextResult,l=i.metadataListResult,u=s.sources;return a.sources=e._getParsedSources(u,t,n,r,o,s),e._fillBaseData(a,o,l),a.type!==I.a.Type.LIVE&&c.get().useApiCaptions&&s.data.playbackCaptions&&(a.sources.captions=j.createConfig(s.data.playbackCaptions,t)),a},e.addKsToUrl=function(e,t){var n;return t?(n=-1!==e.split("?")[0].replace(/^.*[\\/]/,"").indexOf(".")?-1===e.indexOf("?")?"?ks=":"&ks=":"/ks/",e+n+t):e},e.getPlaylist=function(t){var n=new L,r=t.playlistData,i=t.playlistItems.entries;return n.id=r.id,n.name=r.name,n.description=r.description,n.poster=r.poster,i.forEach((function(t){var r=new I.a;e._fillBaseData(r,t),n.items.push(r)})),n},e.getEntryList=function(t){var n=new M.a;return t.playlistItems.entries.forEach((function(t){var r=new I.a;e._fillBaseData(r,t),n.items.push(r)})),n},e.getBumper=function(t,n,r){var i=t.playBackContextResult,a=i.bumperData[0];if(a){var o=(a&&a.sources).find((function(e){return Object(O.c)(e.format)}));if(o){var s=e._parseProgressiveSources(o,i,n,r,0,a.entryId);if(s[0])return new N.a({url:s[0].url,clickThroughUrl:a.clickThroughUrl})}}},e._fillBaseData=function(t,n,r){return t.poster=n.poster,t.id=n.id,t.duration=n.duration,t.metadata=e._parseMetadata(r),t.metadata.description=n.description||"",t.metadata.entryId=n.id||"",t.metadata.name=n.name||"",t.metadata.tags=n.tags||"",t.status=n.status,t.type=e._getEntryType(n.entryType,n.type),t.type===I.a.Type.LIVE&&(t.dvrStatus=n.dvrStatus),t},e._getEntryType=function(e,t){var n=I.a.Type.UNKNOWN;switch(e){case S.MediaType.IMAGE.value:n=I.a.Type.IMAGE;break;case S.MediaType.AUDIO.value:n=I.a.Type.AUDIO;break;default:switch(t){case S.EntryType.MEDIA_CLIP.value:n=I.a.Type.VOD;break;case S.EntryType.LIVE_STREAM.value:case S.EntryType.LIVE_CHANNEL.value:n=I.a.Type.LIVE;break;default:n=I.a.Type.UNKNOWN}}return n},e._getParsedSources=function(t,n,r,i,a,o){var s,l,u=new R.a;return a.type===S.EntryType.EXTERNAL_MEDIA.value?((l=new D.a).mimetype="video/youtube",l.url=a.referenceId,l.id=a.id+"_youtube",u.progressive.push(l)):a.entryType===S.MediaType.IMAGE.value?u.image.push(new B.a(a)):t&&t.length>0&&(t.filter((function(e){return!Object(O.c)(e.format)})).forEach((function(t){var s=e._parseAdaptiveSource(t,o,n,r,i,a.id);if(s){var l=O.b.get(t.format);u.map(s,l)}})),s=t.find((function(t){return Object(O.c)(t.format)&&""!==t.getProtocol(e._getBaseProtocol())})),u.progressive=e._parseProgressiveSources(s,o,n,r,i,a.id)),u},e._parseAdaptiveSource=function(t,n,r,i,a,o){var s=new D.a;if(t){var l="",u=O.b.get(t.format),c=t.getProtocol(e._getBaseProtocol()),p=t.deliveryProfileId,d=t.format,h="";if(u&&(h=u.pathExt,s.mimetype=u.mimeType),t.hasFlavorIds()?(!h&&n.flavorAssets&&n.flavorAssets.length>0&&(h=n.flavorAssets[0].fileExt),l=C.build({entryId:o,flavorIds:t.flavorIds,format:d,ks:r,partnerId:i,uiConfId:a,extension:h,protocol:c})):l=e.addKsToUrl(t.url,r),!l){var g="failed to create play url from source, discarding source: ("+o+"_"+p+"), "+d;return e._logger.warn(g),null}if(s.url=l,s.id=o+"_"+p+","+d,t.hasDrmData()){var y=[];t.drm.forEach((function(e){y.push(new P.a(e.licenseURL,f.a.Scheme[e.scheme],e.certificate))})),s.drmData=y}}return s},e._parseProgressiveSources=function(t,n,r,i,a,o){var s=[],l=[];if(t){var u=t.getProtocol(e._getBaseProtocol()),c=t.format,p=t.deliveryProfileId,d=p+","+c;n.flavorAssets.map((function(t){var n=new D.a;n.id=t.id+d,n.mimetype="mp3"===t.fileExt?"audio/mp3":"video/mp4",n.height=t.height,n.width=t.width,n.bandwidth=1024*t.bitrate,n.label=t.label||t.language;var f=C.build({entryId:o,flavorIds:t.id,format:c,ks:r,partnerId:i,uiConfId:a,extension:t.fileExt,protocol:u});if(""===f)return e._logger.warn("failed to create play url from source, discarding source: ("+o+"_"+p+"), "+c+"."),null;n.url=f,t.height&&t.width?s.push(n):l.push(n)}))}return l.length&&!s.length?l:s},e._parseMetadata=function(e){var t={};return e&&e.metas&&e.metas.length>0&&e.metas.forEach((function(e){if(e.xml){var n,r=new DOMParser;e.xml=e.xml.replace(/\r?\n|\r/g,""),e.xml=e.xml.replace(/>\s*/g,">"),e.xml=e.xml.replace(/>\s*/g,">"),n=r.parseFromString(e.xml,"text/xml");var i=x.xmlToJson(n);Object.keys(i.metadata).forEach((function(e){t[e]=i.metadata[e]["#text"]}))}})),t},e._getBaseProtocol=function(){var e=c.get(),t=/^https?:/.exec(e.cdnUrl),n=t?t[0]:document.location.protocol;return"string"==typeof n?n.slice(0,-1):"https"},e.hasBlockAction=function(e){return e.playBackContextResult.hasBlockAction()},e.getBlockAction=function(e){return e.playBackContextResult.getBlockAction()},e.getErrorMessages=function(e){return e.playBackContextResult.getErrorMessages()},e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(V,"_logger",Object(s.b)("OVPProviderParser"));var H=V.addKsToUrl,K=V,G=n(3),z=n(11),W=function(){function e(){}return e.getMultiRequest=function(e,t,n){var r=c.get(),i=r.serviceParams;Object.assign(i,{ks:t,clientTag:"html5:v"+e}),n&&Object.assign(i,{partnerId:n});var a=new Map;a.set("Content-Type","application/json");var o=new z.a(a);return o.method="POST",o.service="multirequest",o.url=o.getUrl(r.serviceUrl),o.params=i,o},e}(),Y=function e(t){void 0===t&&(t={}),this.type=t.type||e.Type.INCLUDE_FIELDS,this.fields=t.fields||"id,referenceId,name,description,thumbnailUrl,dataUrl,duration,msDuration,flavorParamsIds,mediaType,type,tags,dvrStatus,externalSourceType,status"};!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Y,"Type",{INCLUDE_FIELDS:1,EXCLUDE_FIELDS:2});var q=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.getPlaybackContext=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);return i.service="baseEntry",i.action="getPlaybackContext",i.method="POST",i.url=i.getUrl(e),i.tag="baseEntry-getPlaybackContext",i.params={entryId:n,ks:t,contextDataParams:{objectType:"KalturaContextDataParams",flavorTags:"all"}},i},r.list=function(e,t,n,i,a){var o=new Map;o.set("Content-Type","application/json");var s=new G.a(o);return s.service="baseEntry",s.action="list",s.method="POST",s.url=s.getUrl(e),s.tag="list",s.params=r.getEntryListReqParams(n,t,i,a),s},r.getEntryListReqParams=function(e,t,n,r){var i={};return e?i=n?{redirectFromEntryId:e}:{idEqual:e}:r&&(i={objectType:"KalturaBaseEntryFilter",referenceIdEqual:r}),{ks:t,filter:i,responseProfile:new Y}},r}(W),X=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.list=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);i.service="metadata_metadata",i.action="list",i.method="POST",i.url=i.getUrl(e),i.tag="metadata_metadata-list";var a={objectType:"KalturaMetadataFilter",objectIdEqual:n,metadataObjectTypeEqual:"1"};return i.params={filter:a,ks:t},i},r}(W),$=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.totalCount=t.totalCount,n.totalCount>0&&(n.entries=[],t.objects.map((function(e){return n.entries.push(new S(e))})))),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Z(e,t,n){return t&&Q(e.prototype,t),n&&Q(e,n),e}var J=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_response",{}),this.requests=this.buildRequests(e),this._entryId=e.entryId,this._referenceId=e.referenceId}Z(e,null,[{key:"id",get:function(){return"media"}}]);var t=e.prototype;return t.buildRequests=function(e){var t=c.get(),n=[];n.push(q.list(t.serviceUrl,e.ks,e.entryId,e.redirectFromEntryId,e.referenceId));var r="{1:result:ks}"===e.ks?"{2:result:objects:0:id}":"{1:result:objects:0:id}";return n.push(q.getPlaybackContext(t.serviceUrl,e.ks,r)),n.push(X.list(t.serviceUrl,e.ks,r)),n},t.isValid=function(){return!(!this._entryId&&!this._referenceId)},Z(e,[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){var t=new $(e[0].data);this._response.entry=t.entries[0],this._response.playBackContextResult=new E(e[1].data),this._response.metadataListResult=new A(e[2].data)},get:function(){return this._response}}]),e}(),ee=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.anonymousSession=function(e,t){var n=new Map;n.set("Content-Type","application/json");var r=new G.a(n);return r.service="session",r.action="startWidgetSession",r.method="POST",r.url=r.getUrl(e),r.tag="session-startWidget",r.params={widgetId:t},r},r}(W);function te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ne=function(){var e,t,n;function r(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_response",{}),this.requests=this.buildRequests(e),this._widgetId=e.widgetId}e=r,n=[{key:"id",get:function(){return"session"}}],(t=[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){this._response.ks=e[0].data.ks},get:function(){return this._response.ks}}])&&te(e.prototype,t),n&&te(e,n);var i=r.prototype;return i.buildRequests=function(e){var t=c.get(),n=[];return n.push(ee.anonymousSession(t.serviceUrl,e.widgetId)),n},i.isValid=function(){return!!this._widgetId},r}(),re=function(e){var t,n;function r(t,n,r,i){var a;return void 0===r&&(r=""),(a=e.call(this,i)||this)._multiRequest=W.getMultiRequest(t,r,n),a}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(n(10).a),ie=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.execute=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);return i.service="playlist",i.action="execute",i.method="POST",i.url=i.getUrl(e),i.tag="playlist-execute",i.params={ks:t,id:n,responseProfile:new Y},i},r.get=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);return i.service="playlist",i.action="get",i.method="POST",i.url=i.getUrl(e),i.tag="playlist-get",i.params={ks:t,id:n,responseProfile:{fields:"id,name,description,thumbnailUrl",type:1}},i},r}(W),ae=function(e){this.id=e.id,this.name=e.name,this.description=e.description,this.poster=e.thumbnailUrl},oe=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.entries=[],t.map((function(e){return n.entries.push(new S(e))}))),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function le(e,t,n){return t&&se(e.prototype,t),n&&se(e,n),e}var ue=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_response",{}),this.requests=this.buildRequests(e),this._playlistId=e.playlistId}le(e,null,[{key:"id",get:function(){return"playlist"}}]);var t=e.prototype;return t.buildRequests=function(e){var t=c.get(),n=[];return n.push(ie.get(t.serviceUrl,e.ks,e.playlistId)),n.push(ie.execute(t.serviceUrl,e.ks,e.playlistId)),n},t.isValid=function(){return!!this._playlistId},le(e,[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){this._response.playlistData=new ae(e[0].data),this._response.playlistItems=new oe(e[1].data)},get:function(){return this._response}}]),e}(),ce=n(14);function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t,n){return t&&pe(e.prototype,t),n&&pe(e,n),e}var fe=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_response",{playlistItems:{entries:[]}}),this.requests=this.buildRequests(e),this._entries=e.entries}de(e,null,[{key:"id",get:function(){return"entry_list"}}]);var t=e.prototype;return t.buildRequests=function(e){var t=c.get(),n=[];return e.entries.forEach((function(r){n.push(q.list(t.serviceUrl,e.ks,r.entryId||r,e.redirectFromEntryId,r.referenceId))})),n},t.isValid=function(){return!(!this._entries||!this._entries.length)},de(e,[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){var t,n=this;e.forEach((function(e){t=new $(e.data),n._response.playlistItems.entries.push(t.entries[0])}))},get:function(){return this._response}}]),e}(),he=n(0);function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ye=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.name=t.name,n.description=t.description,n.objTypeAsString=t.objTypeAsString,n.width=t.width,n.height=t.height,n.htmlParams=t.htmlParams,n.swfUrl=t.swfUrl,n.confFilePath=t.confFilePath,n.confFile=t.confFile,n.confFileFeatures=t.confFileFeatures,n.config=t.config,n.confVars=t.confVars,n.useCdn=t.useCdn,n.tags=t.tags,n.swfUrlVersion=t.swfUrlVersion,n.created=new Date(0),n.created.setUTCSeconds(t.createdAt),n.updated=new Date(0),n.updated.setUTCSeconds(t.updatedAt),n.html5Url=t.description,n.version=t.description,n.partnerTags=t.description,n.objType=t.description,n.creationMode=t.description),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function ve(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function me(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){ve(a,r,i,o,s,"next",e)}function s(e){ve(a,r,i,o,s,"throw",e)}o(void 0)}))}}ge(ye,"Type",{PLAYER:1,CONTRIBUTION_WIZARD:2,SIMPLE_EDITOR:3,ADVANCED_EDITOR:4,PLAYLIST:5,APP_STUDIO:6,KRECORD:7,PLAYER_V3:8,KMC_ACCOUNT:9,KMC_ANALYTICS:10,KMC_CONTENT:11,KMC_DASHBOARD:12,KMC_LOGIN:13,PLAYER_SL:14,CLIENTSIDE_ENCODER:15,KMC_GENERAL:16,KMC_ROLES_AND_PERMISSIONS:17,CLIPPER:18,KSR:19,KUPLOAD:20,WEBCASTING:21}),ge(ye,"CreationMode",{WIZARD:2,ADVANCED:3});var be=function(){function e(){}return e._applyRegexAction=function(e,t){if(e){var n=new RegExp(e.pattern,"i");if(t.match(n))return t.replace(n,e.replacement+"/")}return t},e._isECDNUrlAlive=function(){var t=me(regeneratorRuntime.mark((function t(n,r){var i,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=r+"/api_v3/service/system/action/ping/format/1",(a=new XMLHttpRequest).open("GET",i),a.timeout=n.checkAliveTimeoutMs,a.onreadystatechange=function(){if(4===a.readyState)return 200===a.status},a.ontimeout=function(){return e._logger.warn("Got timeout while pinging the ECDN url. the ping url: "+i),!1},a.send();case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.handleRegexAction=function(){var t=me(regeneratorRuntime.mark((function t(n,r){var i,a,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=c.get().cdnUrl,a=e._extractRegexActionFromData(r),o=e._getRegExp(a),t.t0=i&&a&&o&&i.match(o),!t.t0){t.next=11;break}if(t.t1=a.checkAliveTimeoutMs>0,!t.t1){t.next=10;break}return t.next=9,e._isECDNUrlAlive(a,i.replace(o,a.replacement));case 9:t.t1=!t.sent;case 10:t.t0=!t.t1;case 11:if(!t.t0){t.next=14;break}return e._replaceHostUrls(n,a),t.abrupt("return",n);case 14:return e._logger.debug("exiting handleRegexAction - not applying regex action."),t.abrupt("return",n);case 16:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e._replaceHostUrls=function(t,n){e._logger.debug("Starting to modify urls...");var r=t.sources,i=r.hls,a=r.dash,o=r.progressive,s=r.image;[].concat(i,a,o,s).forEach((function(t){return t.url=e._applyRegexAction(n,t.url)})),c.get().replaceHostOnlyManifestUrls||(e._logger.debug("replaceHostOnlyManifestUrls flag is off - modifying captions and poster URLs"),r.captions&&r.captions.forEach((function(t){return t.url=e._applyRegexAction(n,t.url)})),"string"==typeof r.poster&&(r.poster=e._applyRegexAction(n,r.poster))),e._logger.debug("Finished modifying urls")},e._extractRegexActionFromData=function(e){var t,n;return null==(t=e.get(J.id))||null==(n=t.response)?void 0:n.playBackContextResult.getRequestHostRegexAction()},e._getRegExp=function(e){if(e&&e.pattern&&e.replacement)return new RegExp(e.pattern,"i")},e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(be,"_logger",Object(s.b)("RegexActionHandler"));var _e=be;function Ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ke=function(e){var t,n;function r(t,n){var r;return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r=e.call(this,t,n)||this),"_filterOptionsConfig",{redirectFromEntryId:!0}),r._logger=Object(s.b)("OVPProvider"),c.set(t.env),r._setFilterOptionsConfig(t.filterOptions),r._networkRetryConfig=Object.assign(r._networkRetryConfig,t.networkRetryParameters),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.getMediaConfig=function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this.widgetId!==this.defaultWidgetId&&(this._isAnonymous=!1),this._dataLoader=new re(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(n,r){var i=e.entryId,a=e.referenceId;if(i||a){var o=t.ks;o||(o="{1:result:ks}",t._dataLoader.add(ne,{widgetId:t.widgetId}));var s=t._getEntryRedirectFilter(e);return t._dataLoader.add(J,{entryId:i,ks:o,redirectFromEntryId:s,referenceId:a}),t._dataLoader.fetchData().then((function(e){try{var i=t._parseDataFromResponse(e);_e.handleRegexAction(i,e).then(n)}catch(e){r(e)}}),(function(e){r(e)}))}r(new he.a(he.a.Severity.CRITICAL,he.a.Category.PROVIDER,he.a.Code.MISSING_MANDATORY_PARAMS,{message:"missing entry id"}))}))},o.doRequest=function(e,t){var n=this,r=t||this.ks,i=new re(this.playerVersion,this.partnerId,r,this._networkRetryConfig);return new Promise((function(t,a){return r||i.add(ne,{widgetId:n.widgetId}),e.forEach((function(e){i.add(e.loader,e.params,r||"{1:result:ks}")})),i.fetchData().then((function(e){try{t(e)}catch(e){a(e)}}),(function(e){a(e)}))}))},o._getEntryRedirectFilter=function(e){return"boolean"==typeof e.redirectFromEntryId?e.redirectFromEntryId:"boolean"!=typeof this._filterOptionsConfig.redirectFromEntryId||this._filterOptionsConfig.redirectFromEntryId},o._setFilterOptionsConfig=function(e){e&&"boolean"==typeof e.redirectFromEntryId&&(this._filterOptionsConfig.redirectFromEntryId=e.redirectFromEntryId)},o._parseDataFromResponse=function(e){this._logger.debug("Data parsing started");var t={session:{isAnonymous:this._isAnonymous,partnerId:this.partnerId},sources:this._getDefaultSourcesObject(),plugins:{}};if(this.uiConfId&&(t.session.uiConfId=this.uiConfId),e){if(e.has(ne.id)){var n=e.get(ne.id);n&&n.response&&(t.session.ks=n.response,this.widgetId!==this.defaultWidgetId&&(this.ks=t.session.ks))}else t.session.ks=this.ks;if(e.has(J.id)){var r=e.get(J.id);if(r&&r.response){var i=r.response;if(K.hasBlockAction(i))throw new he.a(he.a.Severity.CRITICAL,he.a.Category.SERVICE,he.a.Code.BLOCK_ACTION,{action:K.getBlockAction(i),messages:K.getErrorMessages(i)});var a=K.getMediaEntry(this.isAnonymous?"":this.ks,this.partnerId,this.uiConfId,i);Object.assign(t.sources,this._getSourcesObject(a)),this._verifyMediaStatus(a),this._verifyHasSources(t.sources);var o=K.getBumper(i,this.isAnonymous?"":this.ks,this.partnerId);o&&Object.assign(t.plugins,{bumper:o})}}}return this._logger.debug("Data parsing finished",t),t},o._verifyMediaStatus=function(e){if([S.EntryStatus.IMPORT,S.EntryStatus.PRECONVERT].includes(e.status))throw new he.a(he.a.Severity.CRITICAL,he.a.Category.SERVICE,he.a.Code.MEDIA_STATUS_NOT_READY,{messages:"Status of entry id "+e.id+" is "+e.status+" and is still being imported or converted",data:{status:status}})},o.getPlaylistConfig=function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this.widgetId!==this.defaultWidgetId&&(this._isAnonymous=!1),this._dataLoader=new re(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(n,r){var i=e.playlistId;if(i){var a=t.ks;a||(a="{1:result:ks}",t._dataLoader.add(ne,{widgetId:t.widgetId})),t._dataLoader.add(ue,{playlistId:i,ks:a}),t._dataLoader.fetchData().then((function(e){n(t._parsePlaylistDataFromResponse(e))}),(function(e){r(e)}))}else r({success:!1,data:"Missing mandatory parameter"})}))},o._parsePlaylistDataFromResponse=function(e){var t=this;this._logger.debug("Data parsing started");var n=this._getPlaylistObject();if(e&&e.has(ue.id)){var r=e.get(ue.id);if(r&&r.response){var i=K.getPlaylist(r.response);n.id=i.id,n.poster=i.poster,n.metadata.name=i.name,n.metadata.description=i.description,i.items.forEach((function(e){return n.items.push({sources:t._getSourcesObject(e)})}))}}return this._logger.debug("Data parsing finished",n),n},o.getEntryListConfig=function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this.widgetId!==this.defaultWidgetId&&(this._isAnonymous=!1),this._dataLoader=new re(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(n,r){var i=e.entries;if(i&&i.length){var a=t.ks;a||(a="{1:result:ks}",t._dataLoader.add(ne,{widgetId:t.widgetId}));var o=t._getEntryRedirectFilter(e);t._dataLoader.add(fe,{entries:i,ks:a,redirectFromEntryId:o}),t._dataLoader.fetchData(!1).then((function(e){n(t._parseEntryListDataFromResponse(e))}),(function(e){r(e)}))}else r({success:!1,data:"Missing mandatory parameter"})}))},o._parseEntryListDataFromResponse=function(e){var t=this;this._logger.debug("Data parsing started");var n=this._getPlaylistObject();if(e&&e.has(fe.id)){var r=e.get(fe.id);r&&r.response&&K.getEntryList(r.response).items.forEach((function(e){return n.items.push({sources:t._getSourcesObject(e)})}))}return this._logger.debug("Data parsing finished",n),n},o._getPlaylistObject=function(){return{id:"",metadata:{name:"",description:""},poster:"",items:[]}},o._getDefaultSourcesObject=function(){return{hls:[],dash:[],progressive:[],image:[],id:"",duration:0,type:I.a.Type.UNKNOWN,poster:"",dvr:!1,vr:null,metadata:{name:"",description:"",tags:""}}},o._getSourcesObject=function(e){var t=this._getDefaultSourcesObject(),n=e.sources.toJSON();return t.hls=n.hls,t.dash=n.dash,t.progressive=n.progressive,t.image=n.image,t.id=e.id,t.duration=e.duration,t.type=e.type,t.dvr=!!e.dvrStatus,t.poster=e.poster,e.sources.captions&&(t.captions=e.sources.captions),e.metadata&&"string"==typeof e.metadata.tags&&e.metadata.tags.search(/\b360\b/)>-1&&(t.vr={}),Object.assign(t.metadata,e.metadata),t},i=r,(a=[{key:"env",get:function(){return c.get()}}])&&Ee(i.prototype,a),r}(ce.a),Te="@playkit-js/playkit-js-providers-ovp",Ae="2.39.3-canary.0-e04b57d"}])},function(e,t,n){var r=n(5),i=n(2).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){t.f=n(6)},function(e,t,n){var r=n(51)("keys"),i=n(31);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(2).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(5),i=n(4),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(19)(Function.call,n(22).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t,n){var r=n(5),i=n(69).set;e.exports=function(e,t,n){var a,o=t.constructor;return o!==n&&"function"==typeof o&&(a=o.prototype)!==n.prototype&&r(a)&&i&&i(e,a),e}},function(e,t,n){"use strict";var r=n(21),i=n(26);e.exports=function(e){var t=String(i(this)),n="",a=r(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(21),i=n(26);e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(32),i=n(1),a=n(12),o=n(16),s=n(42),l=n(107),u=n(40),c=n(37),p=n(6)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,h,g,y,v){l(n,t,h);var m,b,_,E=function(e){if(!d&&e in w)return w[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",T="values"==g,A=!1,w=e.prototype,S=w[p]||w["@@iterator"]||g&&w[g],C=S||E(g),x=g?T?E("entries"):C:void 0,I="Array"==t&&w.entries||S;if(I&&(_=c(I.call(new e)))!==Object.prototype&&_.next&&(u(_,k,!0),r||"function"==typeof _[p]||o(_,p,f)),T&&S&&"values"!==S.name&&(A=!0,C=function(){return S.call(this)}),r&&!v||!d&&!A&&w[p]||o(w,p,C),s[t]=C,s[k]=f,g)if(m={values:T?C:E("values"),keys:y?C:E("keys"),entries:x},v)for(b in m)b in w||a(w,b,m[b]);else i(i.P+i.F*(d||A),t,m);return m}},function(e,t,n){var r=n(78),i=n(26);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(5),i=n(25),a=n(6)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(6)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var r=n(42),i=n(6)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(10),i=n(30);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(49),i=n(6)("iterator"),a=n(42);e.exports=n(8).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){"use strict";var r=n(11),i=n(34),a=n(7);e.exports=function(e){for(var t=r(this),n=a(t.length),o=arguments.length,s=i(o>1?arguments[1]:void 0,n),l=o>2?arguments[2]:void 0,u=void 0===l?n:i(l,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(38),i=n(112),a=n(42),o=n(17);e.exports=n(76)(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r,i,a=n(56),o=RegExp.prototype.exec,s=String.prototype.replace,l=o,u=(r=/a/,i=/b*/g,o.call(r,"a"),o.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(u||c)&&(l=function(e){var t,n,r,i,l=this;return c&&(n=new RegExp("^"+l.source+"$(?!\\s)",a.call(l))),u&&(t=l.lastIndex),r=o.call(l,e),u&&r&&(l.lastIndex=l.global?r.index+r[0].length:t),c&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=l},function(e,t,n){"use strict";var r=n(75)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r,i,a,o=n(19),s=n(101),l=n(68),u=n(64),c=n(2),p=c.process,d=c.setImmediate,f=c.clearImmediate,h=c.MessageChannel,g=c.Dispatch,y=0,v={},m=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},b=function(e){m.call(e.data)};d&&f||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++y]=function(){s("function"==typeof e?e:Function(e),t)},r(y),y},f=function(e){delete v[e]},"process"==n(25)(p)?r=function(e){p.nextTick(o(m,e,1))}:g&&g.now?r=function(e){g.now(o(m,e,1))}:h?(a=(i=new h).port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),m.call(e)}}:function(e){setTimeout(o(m,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,n){"use strict";var r=n(2),i=n(9),a=n(32),o=n(62),s=n(16),l=n(45),u=n(3),c=n(44),p=n(21),d=n(7),f=n(120),h=n(36).f,g=n(10).f,y=n(83),v=n(40),m=r.ArrayBuffer,b=r.DataView,_=r.Math,E=r.RangeError,k=r.Infinity,T=m,A=_.abs,w=_.pow,S=_.floor,C=_.log,x=_.LN2,I=i?"_b":"buffer",P=i?"_l":"byteLength",D=i?"_o":"byteOffset";function R(e,t,n){var r,i,a,o=new Array(n),s=8*n-t-1,l=(1<<s)-1,u=l>>1,c=23===t?w(2,-24)-w(2,-77):0,p=0,d=e<0||0===e&&1/e<0?1:0;for((e=A(e))!=e||e===k?(i=e!=e?1:0,r=l):(r=S(C(e)/x),e*(a=w(2,-r))<1&&(r--,a*=2),(e+=r+u>=1?c/a:c*w(2,1-u))*a>=2&&(r++,a/=2),r+u>=l?(i=0,r=l):r+u>=1?(i=(e*a-1)*w(2,t),r+=u):(i=e*w(2,u-1)*w(2,t),r=0));t>=8;o[p++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;o[p++]=255&r,r/=256,s-=8);return o[--p]|=128*d,o}function O(e,t,n){var r,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,l=n-1,u=e[l--],c=127&u;for(u>>=7;s>0;c=256*c+e[l],l--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===c)c=1-o;else{if(c===a)return r?NaN:u?-k:k;r+=w(2,t),c-=o}return(u?-1:1)*r*w(2,c-t)}function L(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function M(e){return[255&e]}function N(e){return[255&e,e>>8&255]}function U(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function F(e){return R(e,52,8)}function j(e){return R(e,23,4)}function B(e,t,n){g(e.prototype,t,{get:function(){return this[n]}})}function V(e,t,n,r){var i=f(+n);if(i+t>e[P])throw E("Wrong index!");var a=e[I]._b,o=i+e[D],s=a.slice(o,o+t);return r?s:s.reverse()}function H(e,t,n,r,i,a){var o=f(+n);if(o+t>e[P])throw E("Wrong index!");for(var s=e[I]._b,l=o+e[D],u=r(+i),c=0;c<t;c++)s[l+c]=u[a?c:t-c-1]}if(o.ABV){if(!u((function(){m(1)}))||!u((function(){new m(-1)}))||u((function(){return new m,new m(1.5),new m(NaN),"ArrayBuffer"!=m.name}))){for(var K,G=(m=function(e){return c(this,m),new T(f(e))}).prototype=T.prototype,z=h(T),W=0;z.length>W;)(K=z[W++])in m||s(m,K,T[K]);a||(G.constructor=m)}var Y=new b(new m(2)),q=b.prototype.setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||l(b.prototype,{setInt8:function(e,t){q.call(this,e,t<<24>>24)},setUint8:function(e,t){q.call(this,e,t<<24>>24)}},!0)}else m=function(e){c(this,m,"ArrayBuffer");var t=f(e);this._b=y.call(new Array(t),0),this[P]=t},b=function(e,t,n){c(this,b,"DataView"),c(e,m,"DataView");var r=e[P],i=p(t);if(i<0||i>r)throw E("Wrong offset!");if(i+(n=void 0===n?r-i:d(n))>r)throw E("Wrong length!");this[I]=e,this[D]=i,this[P]=n},i&&(B(m,"byteLength","_l"),B(b,"buffer","_b"),B(b,"byteLength","_l"),B(b,"byteOffset","_o")),l(b.prototype,{getInt8:function(e){return V(this,1,e)[0]<<24>>24},getUint8:function(e){return V(this,1,e)[0]},getInt16:function(e){var t=V(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=V(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return L(V(this,4,e,arguments[1]))},getUint32:function(e){return L(V(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return O(V(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return O(V(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){H(this,1,e,M,t)},setUint8:function(e,t){H(this,1,e,M,t)},setInt16:function(e,t){H(this,2,e,N,t,arguments[2])},setUint16:function(e,t){H(this,2,e,N,t,arguments[2])},setInt32:function(e,t){H(this,4,e,U,t,arguments[2])},setUint32:function(e,t){H(this,4,e,U,t,arguments[2])},setFloat32:function(e,t){H(this,4,e,j,t,arguments[2])},setFloat64:function(e,t){H(this,8,e,F,t,arguments[2])}});v(m,"ArrayBuffer"),v(b,"DataView"),s(b.prototype,o.VIEW,!0),t.ArrayBuffer=m,t.DataView=b},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(125)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=!n(9)&&!n(3)((function(){return 7!=Object.defineProperty(n(64)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(2),i=n(8),a=n(32),o=n(65),s=n(10).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t,n){var r=n(15),i=n(17),a=n(52)(!1),o=n(66)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(u,n)||u.push(n));return u}},function(e,t,n){var r=n(10),i=n(4),a=n(33);e.exports=n(9)?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var r=n(17),i=n(36).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(e){return o.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(9),i=n(33),a=n(53),o=n(48),s=n(11),l=n(47),u=Object.assign;e.exports=!u||n(3)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){for(var n=s(e),u=arguments.length,c=1,p=a.f,d=o.f;u>c;)for(var f,h=l(arguments[c++]),g=p?i(h).concat(p(h)):i(h),y=g.length,v=0;y>v;)f=g[v++],r&&!d.call(h,f)||(n[f]=h[f]);return n}:u},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(20),i=n(5),a=n(101),o=[].slice,s={},l=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=o.call(arguments,1),s=function(){var r=n.concat(o.call(arguments));return this instanceof s?l(t,r.length,r):a(t,r,e)};return i(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(2).parseInt,i=n(41).trim,a=n(70),o=/^[-+]?0[xX]/;e.exports=8!==r(a+"08")||22!==r(a+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(o.test(n)?16:10))}:r},function(e,t,n){var r=n(2).parseFloat,i=n(41).trim;e.exports=1/r(n(70)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(25);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(5),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var r=n(35),i=n(30),a=n(40),o={};n(16)(o,n(6)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(4);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},function(e,t,n){var r=n(220);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(20),i=n(11),a=n(47),o=n(7);e.exports=function(e,t,n,s,l){r(t);var u=i(e),c=a(u),p=o(u.length),d=l?p-1:0,f=l?-1:1;if(n<2)for(;;){if(d in c){s=c[d],d+=f;break}if(d+=f,l?d<0:p<=d)throw TypeError("Reduce of empty array with no initial value")}for(;l?d>=0:p>d;d+=f)d in c&&(s=t(s,c[d],d,u));return s}},function(e,t,n){"use strict";var r=n(11),i=n(34),a=n(7);e.exports=[].copyWithin||function(e,t){var n=r(this),o=a(n.length),s=i(e,o),l=i(t,o),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?o:i(u,o))-l,o-s),p=1;for(l<s&&s<l+c&&(p=-1,l+=c-1,s+=c-1);c-- >0;)l in n?n[s]=n[l]:delete n[s],s+=p,l+=p;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(85);n(1)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){n(9)&&"g"!=/./g.flags&&n(10).f(RegExp.prototype,"flags",{configurable:!0,get:n(56)})},function(e,t,n){"use strict";var r,i,a,o,s=n(32),l=n(2),u=n(19),c=n(49),p=n(1),d=n(5),f=n(20),h=n(44),g=n(59),y=n(50),v=n(87).set,m=n(240)(),b=n(116),_=n(241),E=n(60),k=n(117),T=l.TypeError,A=l.process,w=A&&A.versions,S=w&&w.v8||"",C=l.Promise,x="process"==c(A),I=function(){},P=i=b.f,D=!!function(){try{var e=C.resolve(1),t=(e.constructor={})[n(6)("species")]=function(e){e(I,I)};return(x||"function"==typeof PromiseRejectionEvent)&&e.then(I)instanceof t&&0!==S.indexOf("6.6")&&-1===E.indexOf("Chrome/66")}catch(e){}}(),R=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},O=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var r=e._v,i=1==e._s,a=0,o=function(t){var n,a,o,s=i?t.ok:t.fail,l=t.resolve,u=t.reject,c=t.domain;try{s?(i||(2==e._h&&N(e),e._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&(c.exit(),o=!0)),n===t.promise?u(T("Promise-chain cycle")):(a=R(n))?a.call(n,l,u):l(n)):u(r)}catch(e){c&&!o&&c.exit(),u(e)}};n.length>a;)o(n[a++]);e._c=[],e._n=!1,t&&!e._h&&L(e)}))}},L=function(e){v.call(l,(function(){var t,n,r,i=e._v,a=M(e);if(a&&(t=_((function(){x?A.emit("unhandledRejection",i,e):(n=l.onunhandledrejection)?n({promise:e,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=x||M(e)?2:1),e._a=void 0,a&&t.e)throw t.v}))},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},N=function(e){v.call(l,(function(){var t;x?A.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},U=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},F=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw T("Promise can't be resolved itself");(t=R(e))?m((function(){var r={_w:n,_d:!1};try{t.call(e,u(F,r,1),u(U,r,1))}catch(e){U.call(r,e)}})):(n._v=e,n._s=1,O(n,!1))}catch(e){U.call({_w:n,_d:!1},e)}}};D||(C=function(e){h(this,C,"Promise","_h"),f(e),r.call(this);try{e(u(F,this,1),u(U,this,1))}catch(e){U.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(45)(C.prototype,{then:function(e,t){var n=P(y(this,C));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=x?A.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=u(F,e,1),this.reject=u(U,e,1)},b.f=P=function(e){return e===C||e===o?new a(e):i(e)}),p(p.G+p.W+p.F*!D,{Promise:C}),n(40)(C,"Promise"),n(43)("Promise"),o=n(8).Promise,p(p.S+p.F*!D,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),p(p.S+p.F*(s||!D),"Promise",{resolve:function(e){return k(s&&this===o?C:this,e)}}),p(p.S+p.F*!(D&&n(55)((function(e){C.all(e).catch(I)}))),"Promise",{all:function(e){var t=this,n=P(t),r=n.resolve,i=n.reject,a=_((function(){var n=[],a=0,o=1;g(e,!1,(function(e){var s=a++,l=!1;n.push(void 0),o++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--o||r(n))}),i)})),--o||r(n)}));return a.e&&i(a.v),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,i=_((function(){g(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){"use strict";var r=n(20);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(4),i=n(5),a=n(116);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(10).f,i=n(35),a=n(45),o=n(19),s=n(44),l=n(59),u=n(76),c=n(112),p=n(43),d=n(9),f=n(29).fastKey,h=n(39),g=d?"_s":"size",y=function(e,t){var n,r=f(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,r){s(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[g]=0,null!=r&&l(r,n,e[u],e)}));return a(c.prototype,{clear:function(){for(var e=h(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=h(this,t),r=y(n,e);if(r){var i=r.n,a=r.p;delete n._i[r.i],r.r=!0,a&&(a.n=i),i&&(i.p=a),n._f==r&&(n._f=i),n._l==r&&(n._l=a),n[g]--}return!!r},forEach:function(e){h(this,t);for(var n,r=o(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!y(h(this,t),e)}}),d&&r(c.prototype,"size",{get:function(){return h(this,t)[g]}}),c},def:function(e,t,n){var r,i,a=y(e,t);return a?a.v=n:(e._l=a={i:i=f(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=a),r&&(r.n=a),e[g]++,"F"!==i&&(e._i[i]=a)),e},getEntry:y,setStrong:function(e,t,n){u(e,t,(function(e,n){this._t=h(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))}),n?"entries":"values",!n,!0),p(t)}}},function(e,t,n){"use strict";var r=n(45),i=n(29).getWeak,a=n(4),o=n(5),s=n(44),l=n(59),u=n(24),c=n(15),p=n(39),d=u(5),f=u(6),h=0,g=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},v=function(e,t){return d(e.a,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var u=e((function(e,r){s(e,u,t,"_i"),e._t=t,e._i=h++,e._l=void 0,null!=r&&l(r,n,e[a],e)}));return r(u.prototype,{delete:function(e){if(!o(e))return!1;var n=i(e);return!0===n?g(p(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!o(e))return!1;var n=i(e);return!0===n?g(p(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var r=i(a(t),!0);return!0===r?g(e).set(t,n):r[e._i]=n,e},ufstore:g}},function(e,t,n){var r=n(21),i=n(7);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var r=n(36),i=n(53),a=n(4),o=n(2).Reflect;e.exports=o&&o.ownKeys||function(e){var t=r.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(7),i=n(72),a=n(26);e.exports=function(e,t,n,o){var s=String(a(e)),l=s.length,u=void 0===n?" ":String(n),c=r(t);if(c<=l||""==u)return s;var p=c-l,d=i.call(u,Math.ceil(p/u.length));return d.length>p&&(d=d.slice(0,p)),o?d+s:s+d}},function(e,t,n){var r=n(9),i=n(33),a=n(17),o=n(48).f;e.exports=function(e){return function(t){for(var n,s=a(t),l=i(s),u=l.length,c=0,p=[];u>c;)n=l[c++],r&&!o.call(s,n)||p.push(e?[n,s[n]]:s[n]);return p}}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";n(127);var r,i=(r=n(299))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(e,t,n){"use strict";n(128),n(271),n(273),n(276),n(278),n(280),n(282),n(284),n(286),n(288),n(290),n(292),n(294),n(298)},function(e,t,n){n(129),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(210),n(211),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(84),n(234),n(113),n(235),n(114),n(236),n(237),n(238),n(239),n(115),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),e.exports=n(8)},function(e,t,n){"use strict";var r=n(2),i=n(15),a=n(9),o=n(1),s=n(12),l=n(29).KEY,u=n(3),c=n(51),p=n(40),d=n(31),f=n(6),h=n(65),g=n(94),y=n(131),v=n(54),m=n(4),b=n(5),_=n(11),E=n(17),k=n(28),T=n(30),A=n(35),w=n(97),S=n(22),C=n(53),x=n(10),I=n(33),P=S.f,D=x.f,R=w.f,O=r.Symbol,L=r.JSON,M=L&&L.stringify,N=f("_hidden"),U=f("toPrimitive"),F={}.propertyIsEnumerable,j=c("symbol-registry"),B=c("symbols"),V=c("op-symbols"),H=Object.prototype,K="function"==typeof O&&!!C.f,G=r.QObject,z=!G||!G.prototype||!G.prototype.findChild,W=a&&u((function(){return 7!=A(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=P(H,t);r&&delete H[t],D(e,t,n),r&&e!==H&&D(H,t,r)}:D,Y=function(e){var t=B[e]=A(O.prototype);return t._k=e,t},q=K&&"symbol"==typeof O.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof O},X=function(e,t,n){return e===H&&X(V,t,n),m(e),t=k(t,!0),m(n),i(B,t)?(n.enumerable?(i(e,N)&&e[N][t]&&(e[N][t]=!1),n=A(n,{enumerable:T(0,!1)})):(i(e,N)||D(e,N,T(1,{})),e[N][t]=!0),W(e,t,n)):D(e,t,n)},$=function(e,t){m(e);for(var n,r=y(t=E(t)),i=0,a=r.length;a>i;)X(e,n=r[i++],t[n]);return e},Q=function(e){var t=F.call(this,e=k(e,!0));return!(this===H&&i(B,e)&&!i(V,e))&&(!(t||!i(this,e)||!i(B,e)||i(this,N)&&this[N][e])||t)},Z=function(e,t){if(e=E(e),t=k(t,!0),e!==H||!i(B,t)||i(V,t)){var n=P(e,t);return!n||!i(B,t)||i(e,N)&&e[N][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=R(E(e)),r=[],a=0;n.length>a;)i(B,t=n[a++])||t==N||t==l||r.push(t);return r},ee=function(e){for(var t,n=e===H,r=R(n?V:E(e)),a=[],o=0;r.length>o;)!i(B,t=r[o++])||n&&!i(H,t)||a.push(B[t]);return a};K||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(V,n),i(this,N)&&i(this[N],e)&&(this[N][e]=!1),W(this,e,T(1,n))};return a&&z&&W(H,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),S.f=Z,x.f=X,n(36).f=w.f=J,n(48).f=Q,C.f=ee,a&&!n(32)&&s(H,"propertyIsEnumerable",Q,!0),h.f=function(e){return Y(f(e))}),o(o.G+o.W+o.F*!K,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)f(te[ne++]);for(var re=I(f.store),ie=0;re.length>ie;)g(re[ie++]);o(o.S+o.F*!K,"Symbol",{for:function(e){return i(j,e+="")?j[e]:j[e]=O(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){z=!0},useSimple:function(){z=!1}}),o(o.S+o.F*!K,"Object",{create:function(e,t){return void 0===t?A(e):$(A(e),t)},defineProperty:X,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:ee});var ae=u((function(){C.f(1)}));o(o.S+o.F*ae,"Object",{getOwnPropertySymbols:function(e){return C.f(_(e))}}),L&&o(o.S+o.F*(!K||u((function(){var e=O();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!q(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,M.apply(L,r)}}),O.prototype[U]||n(16)(O.prototype,U,O.prototype.valueOf),p(O,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(51)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(33),i=n(53),a=n(48);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);return t}},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(35)})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(9),"Object",{defineProperty:n(10).f})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(9),"Object",{defineProperties:n(96)})},function(e,t,n){var r=n(17),i=n(22).f;n(23)("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},function(e,t,n){var r=n(11),i=n(37);n(23)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(11),i=n(33);n(23)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){n(23)("getOwnPropertyNames",(function(){return n(97).f}))},function(e,t,n){var r=n(5),i=n(29).onFreeze;n(23)("freeze",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(5),i=n(29).onFreeze;n(23)("seal",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(5),i=n(29).onFreeze;n(23)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(5);n(23)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(5);n(23)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(5);n(23)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(98)})},function(e,t,n){var r=n(1);r(r.S,"Object",{is:n(99)})},function(e,t,n){var r=n(1);r(r.S,"Object",{setPrototypeOf:n(69).set})},function(e,t,n){"use strict";var r=n(49),i={};i[n(6)("toStringTag")]="z",i+""!="[object z]"&&n(12)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(100)})},function(e,t,n){var r=n(10).f,i=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in i||n(9)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(5),i=n(37),a=n(6)("hasInstance"),o=Function.prototype;a in o||n(10).f(o,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(1),i=n(102);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(e,t,n){var r=n(1),i=n(103);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){"use strict";var r=n(2),i=n(15),a=n(25),o=n(71),s=n(28),l=n(3),u=n(36).f,c=n(22).f,p=n(10).f,d=n(41).trim,f=r.Number,h=f,g=f.prototype,y="Number"==a(n(35)(g)),v="trim"in String.prototype,m=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,i,a=(t=v?t.trim():d(t,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var o,l=t.slice(2),u=0,c=l.length;u<c;u++)if((o=l.charCodeAt(u))<48||o>i)return NaN;return parseInt(l,r)}}return+t};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof f&&(y?l((function(){g.valueOf.call(n)})):"Number"!=a(n))?o(new h(m(t)),n,f):m(t)};for(var b,_=n(9)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;_.length>E;E++)i(h,b=_[E])&&!i(f,b)&&p(f,b,c(h,b));f.prototype=g,g.constructor=f,n(12)(r,"Number",f)}},function(e,t,n){"use strict";var r=n(1),i=n(21),a=n(104),o=n(72),s=1..toFixed,l=Math.floor,u=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",p=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*u[n],u[n]=r%1e7,r=l(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=u[t],u[t]=l(n/e),n=n%e*1e7},f=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var n=String(u[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2==1?h(e,t-1,n*e):h(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,l=a(this,c),u=i(e),g="",y="0";if(u<0||u>20)throw RangeError(c);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(g="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*h(2,69,1))-69)<0?l*h(2,-t,1):l/h(2,t,1),n*=4503599627370496,(t=52-t)>0){for(p(0,n),r=u;r>=7;)p(1e7,0),r-=7;for(p(h(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<<r),p(1,1),d(2),y=f()}else p(0,n),p(1<<-t,0),y=f()+o.call("0",u);return y=u>0?g+((s=y.length)<=u?"0."+o.call("0",u-s)+y:y.slice(0,s-u)+"."+y.slice(s-u)):g+y}})},function(e,t,n){"use strict";var r=n(1),i=n(3),a=n(104),o=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==o.call(1,void 0)}))||!i((function(){o.call({})}))),"Number",{toPrecision:function(e){var t=a(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(1),i=n(2).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{isInteger:n(105)})},function(e,t,n){var r=n(1);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(1),i=n(105),a=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&a(e)<=9007199254740991}})},function(e,t,n){var r=n(1);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(1);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(1),i=n(103);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(1),i=n(102);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(1),i=n(106),a=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+a(e-1)*a(e+1))}})},function(e,t,n){var r=n(1),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(1),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(1),i=n(73);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(1),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(1),i=n(74);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t,n){var r=n(1);r(r.S,"Math",{fround:n(174)})},function(e,t,n){var r=n(73),i=Math.pow,a=i(2,-52),o=i(2,-23),s=i(2,127)*(2-o),l=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),u=r(e);return i<l?u*(i/l/o+1/a-1/a)*l*o:(n=(t=(1+o/a)*i)-(t-i))>s||n!=n?u*(1/0):u*n}},function(e,t,n){var r=n(1),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,a=0,o=0,s=arguments.length,l=0;o<s;)l<(n=i(arguments[o++]))?(a=a*(r=l/n)*r+1,l=n):a+=n>0?(r=n/l)*r:n;return l===1/0?1/0:l*Math.sqrt(a)}})},function(e,t,n){var r=n(1),i=Math.imul;r(r.S+r.F*n(3)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(e,t){var n=+e,r=+t,i=65535&n,a=65535&r;return 0|i*a+((65535&n>>>16)*a+i*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log1p:n(106)})},function(e,t,n){var r=n(1);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(1);r(r.S,"Math",{sign:n(73)})},function(e,t,n){var r=n(1),i=n(74),a=Math.exp;r(r.S+r.F*n(3)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(a(e-1)-a(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(1),i=n(74),a=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){var r=n(1);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(1),i=n(34),a=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(1),i=n(17),a=n(7);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=a(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s<r&&o.push(String(arguments[s]));return o.join("")}})},function(e,t,n){"use strict";n(41)("trim",(function(e){return function(){return e(this,3)}}))},function(e,t,n){"use strict";var r=n(75)(!0);n(76)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(1),i=n(75)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(1),i=n(7),a=n(77),o="".endsWith;r(r.P+r.F*n(79)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:Math.min(i(n),r),l=String(e);return o?o.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){"use strict";var r=n(1),i=n(77);r(r.P+r.F*n(79)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(1);r(r.P,"String",{repeat:n(72)})},function(e,t,n){"use strict";var r=n(1),i=n(7),a=n(77),o="".startsWith;r(r.P+r.F*n(79)("startsWith"),"String",{startsWith:function(e){var t=a(this,e,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(13)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(13)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(13)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(13)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(13)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(13)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(13)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(13)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(13)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(13)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(13)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(13)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(13)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(1);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(1),i=n(11),a=n(28);r(r.P+r.F*n(3)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=i(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(1),i=n(209);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(e,t,n){"use strict";var r=n(3),i=Date.prototype.getTime,a=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=a.call(new Date(-50000000000001))}))||!r((function(){a.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:a},function(e,t,n){var r=Date.prototype,i=r.toString,a=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(12)(r,"toString",(function(){var e=a.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,t,n){var r=n(6)("toPrimitive"),i=Date.prototype;r in i||n(16)(i,r,n(212))},function(e,t,n){"use strict";var r=n(4),i=n(28);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),"number"!=e)}},function(e,t,n){var r=n(1);r(r.S,"Array",{isArray:n(54)})},function(e,t,n){"use strict";var r=n(19),i=n(1),a=n(11),o=n(108),s=n(80),l=n(7),u=n(81),c=n(82);i(i.S+i.F*!n(55)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,p,d=a(e),f="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,y=void 0!==g,v=0,m=c(d);if(y&&(g=r(g,h>2?arguments[2]:void 0,2)),null==m||f==Array&&s(m))for(n=new f(t=l(d.length));t>v;v++)u(n,v,y?g(d[v],v):d[v]);else for(p=m.call(d),n=new f;!(i=p.next()).done;v++)u(n,v,y?o(p,g,[i.value,v],!0):i.value);return n.length=v,n}})},function(e,t,n){"use strict";var r=n(1),i=n(81);r(r.S+r.F*n(3)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(1),i=n(17),a=[].join;r(r.P+r.F*(n(47)!=Object||!n(18)(a)),"Array",{join:function(e){return a.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(1),i=n(68),a=n(25),o=n(34),s=n(7),l=[].slice;r(r.P+r.F*n(3)((function(){i&&l.call(i)})),"Array",{slice:function(e,t){var n=s(this.length),r=a(this);if(t=void 0===t?n:t,"Array"==r)return l.call(this,e,t);for(var i=o(e,n),u=o(t,n),c=s(u-i),p=new Array(c),d=0;d<c;d++)p[d]="String"==r?this.charAt(i+d):this[i+d];return p}})},function(e,t,n){"use strict";var r=n(1),i=n(20),a=n(11),o=n(3),s=[].sort,l=[1,2,3];r(r.P+r.F*(o((function(){l.sort(void 0)}))||!o((function(){l.sort(null)}))||!n(18)(s)),"Array",{sort:function(e){return void 0===e?s.call(a(this)):s.call(a(this),i(e))}})},function(e,t,n){"use strict";var r=n(1),i=n(24)(0),a=n(18)([].forEach,!0);r(r.P+r.F*!a,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var r=n(5),i=n(54),a=n(6)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(1),i=n(24)(1);r(r.P+r.F*!n(18)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(24)(2);r(r.P+r.F*!n(18)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(24)(3);r(r.P+r.F*!n(18)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(24)(4);r(r.P+r.F*!n(18)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(110);r(r.P+r.F*!n(18)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(1),i=n(110);r(r.P+r.F*!n(18)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(1),i=n(52)(!1),a=[].indexOf,o=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(o||!n(18)(a)),"Array",{indexOf:function(e){return o?a.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(17),a=n(21),o=n(7),s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(l||!n(18)(s)),"Array",{lastIndexOf:function(e){if(l)return s.apply(this,arguments)||0;var t=i(this),n=o(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,a(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(1);r(r.P,"Array",{copyWithin:n(111)}),n(38)("copyWithin")},function(e,t,n){var r=n(1);r(r.P,"Array",{fill:n(83)}),n(38)("fill")},function(e,t,n){"use strict";var r=n(1),i=n(24)(5),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(38)("find")},function(e,t,n){"use strict";var r=n(1),i=n(24)(6),a="findIndex",o=!0;a in[]&&Array(1)[a]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(38)(a)},function(e,t,n){n(43)("Array")},function(e,t,n){var r=n(2),i=n(71),a=n(10).f,o=n(36).f,s=n(78),l=n(56),u=r.RegExp,c=u,p=u.prototype,d=/a/g,f=/a/g,h=new u(d)!==d;if(n(9)&&(!h||n(3)((function(){return f[n(6)("match")]=!1,u(d)!=d||u(f)==f||"/a/i"!=u(d,"i")})))){u=function(e,t){var n=this instanceof u,r=s(e),a=void 0===t;return!n&&r&&e.constructor===u&&a?e:i(h?new c(r&&!a?e.source:e,t):c((r=e instanceof u)?e.source:e,r&&a?l.call(e):t),n?this:p,u)};for(var g=function(e){e in u||a(u,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})},y=o(c),v=0;y.length>v;)g(y[v++]);p.constructor=u,u.prototype=p,n(12)(r,"RegExp",u)}n(43)("RegExp")},function(e,t,n){"use strict";n(114);var r=n(4),i=n(56),a=n(9),o=/./.toString,s=function(e){n(12)(RegExp.prototype,"toString",e,!0)};n(3)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?i.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,t,n){"use strict";var r=n(4),i=n(7),a=n(86),o=n(57);n(58)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=r(e),u=String(this);if(!l.global)return o(l,u);var c=l.unicode;l.lastIndex=0;for(var p,d=[],f=0;null!==(p=o(l,u));){var h=String(p[0]);d[f]=h,""===h&&(l.lastIndex=a(u,i(l.lastIndex),c)),f++}return 0===f?null:d}]}))},function(e,t,n){"use strict";var r=n(4),i=n(11),a=n(7),o=n(21),s=n(86),l=n(57),u=Math.max,c=Math.min,p=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,f=/\$([$&`']|\d\d?)/g;n(58)("replace",2,(function(e,t,n,h){return[function(r,i){var a=e(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,a,i):n.call(String(a),r,i)},function(e,t){var i=h(n,e,this,t);if(i.done)return i.value;var p=r(e),d=String(this),f="function"==typeof t;f||(t=String(t));var y=p.global;if(y){var v=p.unicode;p.lastIndex=0}for(var m=[];;){var b=l(p,d);if(null===b)break;if(m.push(b),!y)break;""===String(b[0])&&(p.lastIndex=s(d,a(p.lastIndex),v))}for(var _,E="",k=0,T=0;T<m.length;T++){b=m[T];for(var A=String(b[0]),w=u(c(o(b.index),d.length),0),S=[],C=1;C<b.length;C++)S.push(void 0===(_=b[C])?_:String(_));var x=b.groups;if(f){var I=[A].concat(S,w,d);void 0!==x&&I.push(x);var P=String(t.apply(void 0,I))}else P=g(A,d,w,S,x,t);w>=k&&(E+=d.slice(k,w)+P,k=w+A.length)}return E+d.slice(k)}];function g(e,t,r,a,o,s){var l=r+e.length,u=a.length,c=f;return void 0!==o&&(o=i(o),c=d),n.call(s,c,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(l);case"<":s=o[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>u){var d=p(c/10);return 0===d?n:d<=u?void 0===a[d-1]?i.charAt(1):a[d-1]+i.charAt(1):n}s=a[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(4),i=n(99),a=n(57);n(58)("search",1,(function(e,t,n,o){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),l=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var c=a(s,l);return i(s.lastIndex,u)||(s.lastIndex=u),null===c?-1:c.index}]}))},function(e,t,n){"use strict";var r=n(78),i=n(4),a=n(50),o=n(86),s=n(7),l=n(57),u=n(85),c=n(3),p=Math.min,d=[].push,f="length",h=!c((function(){RegExp(4294967295,"y")}));n(58)("split",2,(function(e,t,n,c){var g;return g="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[f]||2!="ab".split(/(?:ab)*/)[f]||4!=".".split(/(.?)(.?)/)[f]||".".split(/()()/)[f]>1||"".split(/.?/)[f]?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var a,o,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,h=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,c+"g");(a=u.call(g,i))&&!((o=g.lastIndex)>p&&(l.push(i.slice(p,a.index)),a[f]>1&&a.index<i[f]&&d.apply(l,a.slice(1)),s=a[0][f],p=o,l[f]>=h));)g.lastIndex===a.index&&g.lastIndex++;return p===i[f]?!s&&g.test("")||l.push(""):l.push(i.slice(p)),l[f]>h?l.slice(0,h):l}:"0".split(void 0,0)[f]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,i,r):g.call(String(i),n,r)},function(e,t){var r=c(g,e,this,t,g!==n);if(r.done)return r.value;var u=i(e),d=String(this),f=a(u,RegExp),y=u.unicode,v=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(h?"y":"g"),m=new f(h?u:"^(?:"+u.source+")",v),b=void 0===t?4294967295:t>>>0;if(0===b)return[];if(0===d.length)return null===l(m,d)?[d]:[];for(var _=0,E=0,k=[];E<d.length;){m.lastIndex=h?E:0;var T,A=l(m,h?d:d.slice(E));if(null===A||(T=p(s(m.lastIndex+(h?0:E)),d.length))===_)E=o(d,E,y);else{if(k.push(d.slice(_,E)),k.length===b)return k;for(var w=1;w<=A.length-1;w++)if(k.push(A[w]),k.length===b)return k;E=_=T}}return k.push(d.slice(_)),k}]}))},function(e,t,n){var r=n(2),i=n(87).set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,s=r.Promise,l="process"==n(25)(o);e.exports=function(){var e,t,n,u=function(){var r,i;for(l&&(r=o.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){o.nextTick(u)};else if(!a||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(u)}}else n=function(){i.call(r,u)};else{var p=!0,d=document.createTextNode("");new a(u).observe(d,{characterData:!0}),n=function(){d.data=p=!p}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){"use strict";var r=n(118),i=n(39);e.exports=n(61)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(118),i=n(39);e.exports=n(61)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(2),a=n(24)(0),o=n(12),s=n(29),l=n(98),u=n(119),c=n(5),p=n(39),d=n(39),f=!i.ActiveXObject&&"ActiveXObject"in i,h=s.getWeak,g=Object.isExtensible,y=u.ufstore,v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(c(e)){var t=h(e);return!0===t?y(p(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(p(this,"WeakMap"),e,t)}},b=e.exports=n(61)("WeakMap",v,m,u,!0,!0);d&&f&&(l((r=u.getConstructor(v,"WeakMap")).prototype,m),s.NEED=!0,a(["delete","has","get","set"],(function(e){var t=b.prototype,n=t[e];o(t,e,(function(t,i){if(c(t)&&!g(t)){this._f||(this._f=new r);var a=this._f[e](t,i);return"set"==e?this:a}return n.call(this,t,i)}))})))},function(e,t,n){"use strict";var r=n(119),i=n(39);n(61)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(1),i=n(62),a=n(88),o=n(4),s=n(34),l=n(7),u=n(5),c=n(2).ArrayBuffer,p=n(50),d=a.ArrayBuffer,f=a.DataView,h=i.ABV&&c.isView,g=d.prototype.slice,y=i.VIEW;r(r.G+r.W+r.F*(c!==d),{ArrayBuffer:d}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(e){return h&&h(e)||u(e)&&y in e}}),r(r.P+r.U+r.F*n(3)((function(){return!new d(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==g&&void 0===t)return g.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),a=new(p(this,d))(l(i-r)),u=new f(this),c=new f(a),h=0;r<i;)c.setUint8(h++,u.getUint8(r++));return a}}),n(43)("ArrayBuffer")},function(e,t,n){var r=n(1);r(r.G+r.W+r.F*!n(62).ABV,{DataView:n(88).DataView})},function(e,t,n){n(27)("Int8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},function(e,t,n){n(27)("Int16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Uint16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Int32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Uint32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Float32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Float64",8,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){var r=n(1),i=n(20),a=n(4),o=(n(2).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(3)((function(){o((function(){}))})),"Reflect",{apply:function(e,t,n){var r=i(e),l=a(n);return o?o(r,t,l):s.call(r,t,l)}})},function(e,t,n){var r=n(1),i=n(35),a=n(20),o=n(4),s=n(5),l=n(3),u=n(100),c=(n(2).Reflect||{}).construct,p=l((function(){function e(){}return!(c((function(){}),[],e)instanceof e)})),d=!l((function(){c((function(){}))}));r(r.S+r.F*(p||d),"Reflect",{construct:function(e,t){a(e),o(t);var n=arguments.length<3?e:a(arguments[2]);if(d&&!p)return c(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}var l=n.prototype,f=i(s(l)?l:Object.prototype),h=Function.apply.call(e,f,t);return s(h)?h:f}})},function(e,t,n){var r=n(10),i=n(1),a=n(4),o=n(28);i(i.S+i.F*n(3)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(e,t,n){a(e),t=o(t,!0),a(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},function(e,t,n){var r=n(1),i=n(22).f,a=n(4);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(a(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(1),i=n(4),a=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(107)(a,"Object",(function(){var e,t=this._k;do{if(this._i>=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new a(e)}})},function(e,t,n){var r=n(22),i=n(37),a=n(15),o=n(1),s=n(5),l=n(4);o(o.S,"Reflect",{get:function e(t,n){var o,u,c=arguments.length<3?t:arguments[2];return l(t)===c?t[n]:(o=r.f(t,n))?a(o,"value")?o.value:void 0!==o.get?o.get.call(c):void 0:s(u=i(t))?e(u,n,c):void 0}})},function(e,t,n){var r=n(22),i=n(1),a=n(4);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(a(e),t)}})},function(e,t,n){var r=n(1),i=n(37),a=n(4);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(a(e))}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(1),i=n(4),a=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!a||a(e)}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{ownKeys:n(121)})},function(e,t,n){var r=n(1),i=n(4),a=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return a&&a(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(10),i=n(22),a=n(37),o=n(15),s=n(1),l=n(30),u=n(4),c=n(5);s(s.S,"Reflect",{set:function e(t,n,s){var p,d,f=arguments.length<4?t:arguments[3],h=i.f(u(t),n);if(!h){if(c(d=a(t)))return e(d,n,s,f);h=l(0)}if(o(h,"value")){if(!1===h.writable||!c(f))return!1;if(p=i.f(f,n)){if(p.get||p.set||!1===p.writable)return!1;p.value=s,r.f(f,n,p)}else r.f(f,n,l(0,s));return!0}return void 0!==h.set&&(h.set.call(f,s),!0)}})},function(e,t,n){var r=n(1),i=n(69);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){n(272),e.exports=n(8).Array.includes},function(e,t,n){"use strict";var r=n(1),i=n(52)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(38)("includes")},function(e,t,n){n(274),e.exports=n(8).Array.flatMap},function(e,t,n){"use strict";var r=n(1),i=n(275),a=n(11),o=n(7),s=n(20),l=n(109);r(r.P,"Array",{flatMap:function(e){var t,n,r=a(this);return s(e),t=o(r.length),n=l(r,0),i(n,r,r,t,0,1,e,arguments[1]),n}}),n(38)("flatMap")},function(e,t,n){"use strict";var r=n(54),i=n(5),a=n(7),o=n(19),s=n(6)("isConcatSpreadable");e.exports=function e(t,n,l,u,c,p,d,f){for(var h,g,y=c,v=0,m=!!d&&o(d,f,3);v<u;){if(v in l){if(h=m?m(l[v],v,n):l[v],g=!1,i(h)&&(g=void 0!==(g=h[s])?!!g:r(h)),g&&p>0)y=e(t,n,h,a(h.length),y,p-1)-1;else{if(y>=9007199254740991)throw TypeError();t[y]=h}y++}v++}return y}},function(e,t,n){n(277),e.exports=n(8).String.padStart},function(e,t,n){"use strict";var r=n(1),i=n(122),a=n(60),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){n(279),e.exports=n(8).String.padEnd},function(e,t,n){"use strict";var r=n(1),i=n(122),a=n(60),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){n(281),e.exports=n(8).String.trimLeft},function(e,t,n){"use strict";n(41)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){n(283),e.exports=n(8).String.trimRight},function(e,t,n){"use strict";n(41)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){n(285),e.exports=n(65).f("asyncIterator")},function(e,t,n){n(94)("asyncIterator")},function(e,t,n){n(287),e.exports=n(8).Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(1),i=n(121),a=n(17),o=n(22),s=n(81);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),l=o.f,u=i(r),c={},p=0;u.length>p;)void 0!==(n=l(r,t=u[p++]))&&s(c,t,n);return c}})},function(e,t,n){n(289),e.exports=n(8).Object.values},function(e,t,n){var r=n(1),i=n(123)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){n(291),e.exports=n(8).Object.entries},function(e,t,n){var r=n(1),i=n(123)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";n(115),n(293),e.exports=n(8).Promise.finally},function(e,t,n){"use strict";var r=n(1),i=n(8),a=n(2),o=n(50),s=n(117);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,i.Promise||a.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){n(295),n(296),n(297),e.exports=n(8)},function(e,t,n){var r=n(2),i=n(1),a=n(60),o=[].slice,s=/MSIE .\./.test(a),l=function(e){return function(t,n){var r=arguments.length>2,i=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};i(i.G+i.B+i.F*s,{setTimeout:l(r.setTimeout),setInterval:l(r.setInterval)})},function(e,t,n){var r=n(1),i=n(87);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(84),i=n(33),a=n(12),o=n(2),s=n(16),l=n(42),u=n(6),c=u("iterator"),p=u("toStringTag"),d=l.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(f),g=0;g<h.length;g++){var y,v=h[g],m=f[v],b=o[v],_=b&&b.prototype;if(_&&(_[c]||s(_,c,d),_[p]||s(_,p,v),l[v]=d,m))for(y in r)_[y]||a(_,y,r[y],!0)}},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),s=new w(i||[]);return r(o,"_invoke",{value:E(e,n,s)}),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function d(){}function f(){}function h(){}var g={};l(g,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==t&&n.call(v,a)&&(g=v);var m=h.prototype=d.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var i;r(this,"_invoke",{value:function(r,a){function o(){return new t((function(i,o){!function r(i,a,o,s){var l=c(e[i],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(p).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,s)}))}s(l.arg)}(r,a,i,o)}))}return i=i?i.then(o,o):o()}})}function E(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new _(u(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(m),l(m,s,"Generator"),l(m,a,(function(){return this})),l(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=S,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){n(300),e.exports=n(124).global},function(e,t,n){var r=n(301);r(r.G,{global:n(89)})},function(e,t,n){var r=n(89),i=n(124),a=n(302),o=n(304),s=n(311),l=function(e,t,n){var u,c,p,d=e&l.F,f=e&l.G,h=e&l.S,g=e&l.P,y=e&l.B,v=e&l.W,m=f?i:i[t]||(i[t]={}),b=m.prototype,_=f?r:h?r[t]:(r[t]||{}).prototype;for(u in f&&(n=t),n)(c=!d&&_&&void 0!==_[u])&&s(m,u)||(p=c?_[u]:n[u],m[u]=f&&"function"!=typeof _[u]?n[u]:y&&c?a(p,r):v&&_[u]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(p):g&&"function"==typeof p?a(Function.call,p):p,g&&((m.virtual||(m.virtual={}))[u]=p,e&l.R&&b&&!b[u]&&o(b,u,p)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){var r=n(303);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(305),i=n(310);e.exports=n(91)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(306),i=n(307),a=n(309),o=Object.defineProperty;t.f=n(91)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(90);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(91)&&!n(125)((function(){return 7!=Object.defineProperty(n(308)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(90),i=n(89).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(90);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";(function(e){var t=n(46);var r,i,a,o=function(){function t(){}return t.install=function(){if(!e.performance||!e.performance.now){var t=Date.now();e.performance||(e.performance={}),e.performance.now=function(){return Date.now()-t}}},t}();r=o,a="performance.now",(i=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(i="id"))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,t.a.register(o)}).call(this,n(92))},function(e,t,n){(function(e,t){var n;(n=void 0!==e&&"[object process]"==={}.toString.call(e)||"undefined"!=typeof navigator&&"ReactNative"===navigator.product?t:self).Proxy||(n.Proxy=function(){function e(){return null}function t(e){return!!e&&("object"==typeof e||"function"==typeof e)}function n(e){if(null!==e&&!t(e))throw new TypeError("Object prototype may only be an Object or null: "+e)}var r=null,i=Object,a=!(!i.create&&{__proto__:null}instanceof i),o=i.create||(a?function(e){return n(e),{__proto__:e}}:function(e){function t(){}if(n(e),null===e)throw new SyntaxError("Native Object.create is required to create objects with null prototype");return t.prototype=e,new t}),s=i.getPrototypeOf||([].__proto__===Array.prototype?function(e){return t(e=e.__proto__)?e:null}:e),l=function(u,c){function p(){}if(void 0===(this&&this instanceof l?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");if(!t(u)||!t(c))throw new TypeError("Cannot create proxy with a non-object as target or handler");r=function(){u=null,p=function(e){throw new TypeError("Cannot perform '"+e+"' on a proxy that has been revoked")}},setTimeout((function(){r=null}),0);var d=c;for(var f in c={get:null,set:null,apply:null,construct:null},d){if(!(f in c))throw new TypeError("Proxy polyfill does not support trap '"+f+"'");c[f]=d[f]}"function"==typeof d&&(c.apply=d.apply.bind(d)),d=s(u);var h=!1,g=!1;if("function"==typeof u){var y=function(){var e=this&&this.constructor===y,t=Array.prototype.slice.call(arguments);return p(e?"construct":"apply"),e&&c.construct?c.construct.call(this,u,t):!e&&c.apply?c.apply(u,this,t):e?(t.unshift(u),new(u.bind.apply(u,t))):u.apply(this,t)};h=!0}else u instanceof Array?(y=[],g=!0):y=a||null!==d?o(d):{};var v=c.get?function(e){return p("get"),c.get(this,e,y)}:function(e){return p("get"),this[e]},m=c.set?function(e,t){p("set"),c.set(this,e,t,y)}:function(e,t){p("set"),this[e]=t},b={};if(i.getOwnPropertyNames(u).forEach((function(e){if(!h&&!g||!(e in y)){var t=i.getOwnPropertyDescriptor(u,e);i.defineProperty(y,e,{enumerable:!!t.enumerable,get:v.bind(u,e),set:m.bind(u,e)}),b[e]=!0}})),f=!0,h||g){var _=i.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return n(t),e.__proto__=t,e}:e);d&&_(y,d)||(f=!1)}if(c.get||!f)for(var E in u)b[E]||i.defineProperty(y,E,{get:v.bind(u,E)});return i.seal(u),i.seal(y),y};return l.revocable=function(e,t){return{proxy:new l(e,t),revoke:r}},l}(),n.Proxy.revocable=n.Proxy.revocable)}).call(this,n(314),n(92))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,p=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):p=-1,u.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=u.length;t;){for(l=u,u=[];++p<t;)l&&l[p].run();p=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){var r,i;window,e.exports=(r=n(0),i=n(316),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=r},function(e,t){e.exports=i},function(e){e.exports=JSON.parse('{"recoverDecodingErrorDelay":3000,"recoverSwapAudioCodecDelay":3000,"abr":{"enabled":true,"restrictions":{}},"hlsConfig":{"fragLoadingMaxRetry":4,"maxMaxBufferLength":60},"network":{}}')},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return b})),n.d(t,"NAME",(function(){return _}));var r,i,a,o,s=n(0),l=n(1),u=n.n(l),c=n(2),p=((r={})[u.a.ErrorDetails.MANIFEST_LOAD_ERROR]={category:s.Error.Category.MANIFEST,code:s.Error.Code.HTTP_ERROR},r[u.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT]={category:s.Error.Category.MANIFEST,code:s.Error.Code.TIMEOUT},r[u.a.ErrorDetails.MANIFEST_PARSING_ERROR]={category:s.Error.Category.MANIFEST,code:s.Error.Code.HLSJS_CANNOT_PARSE},r[u.a.ErrorDetails.LEVEL_LOAD_ERROR]={category:s.Error.Category.NETWORK,code:s.Error.Code.HTTP_ERROR},r[u.a.ErrorDetails.LEVEL_LOAD_TIMEOUT]={category:s.Error.Category.NETWORK,code:s.Error.Code.TIMEOUT},r[u.a.ErrorDetails.LEVEL_SWITCH_ERROR]={category:s.Error.Category.PLAYER,code:s.Error.Code.BITRATE_SWITCH_ISSUE},r[u.a.ErrorDetails.FRAG_LOAD_ERROR]={category:s.Error.Category.NETWORK,code:s.Error.Code.HTTP_ERROR},r[u.a.ErrorDetails.FRAG_LOOP_LOADING_ERROR]={category:s.Error.Category.NETWORK,code:s.Error.Code.HTTP_ERROR},r[u.a.ErrorDetails.FRAG_LOAD_TIMEOUT]={category:s.Error.Category.NETWORK,code:s.Error.Code.TIMEOUT},r[u.a.ErrorDetails.FRAG_PARSING_ERROR]={category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_FRAG_PARSING_ERROR},r[u.a.ErrorDetails.BUFFER_APPEND_ERROR]={category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_BUFFER_APPEND_ISSUE},r[u.a.ErrorDetails.BUFFER_APPENDING_ERROR]={category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_BUFFER_APPENDING_ISSUE},r[u.a.ErrorDetails.BUFFER_STALLED_ERROR]={category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_BUFFER_STALLED_ERROR},r),d=function(e){var t,n;function r(t){var n;return n=e.call(this,t)||this,t&&t.readystatechange&&(n.readystatechange=t.readystatechange),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.loadInternal=function(){var e,t=this,n=this.context;e=this.loader=new XMLHttpRequest;var r=this.stats;r.tfirst=0,r.loaded=0;var i,a=this.xhrSetup;try{if(a)try{i=a(e,n.url,n)}catch(t){e.open("GET",n.url,!0),i=a(e,n.url,n)}e.readyState||e.open("GET",n.url,!0)}catch(e){i=Promise.reject(e)}(i=i||Promise.resolve()).then((function(){n.rangeEnd&&e.setRequestHeader("Range","bytes="+n.rangeStart+"-"+(n.rangeEnd-1)),e.onreadystatechange=t.readystatechange.bind(t),e.onprogress=t.loadprogress.bind(t),e.responseType=n.responseType,t.requestTimeout=window.setTimeout(t.loadtimeout.bind(t),t.config.timeout),e.send()})).catch((function(r){t.callbacks.onError({code:e.status,text:r.message},n,e)}))},r}(u.a.DefaultConfig.loader),f=function(e){var t,n;function r(t){var n,i=(n=e.call(this,t)||this).load.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),a=r.redirectExternalStreamsHandler;return n.load=function(e,t,n){var o=e.url;"manifest"===e.type?s.Utils.Http.jsonp(o,a,{timeout:r.redirectExternalStreamsTimeout}).then((function(r){e.url=r,i(e,t,n)})).catch((function(){return i(e,t,n)})):i(e,t,n)},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(d);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}o=function(e,t){return t},(a="redirectExternalStreamsHandler")in(i=f)?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o;var m=function(e){var t,n;function r(t,n,i){var a,o;return r._logger.debug("Creating adapter. Hls version: "+u.a.version),v(y(o=e.call(this,t,n,i)||this),"_hlsjsLib",u.a),v(y(o),"_triedReloadWithRedirect",!1),v(y(o),"_playerTracks",[]),v(y(o),"_startTime",0),v(y(o),"_requestFilterError",!1),v(y(o),"_responseFilterError",!1),v(y(o),"_nativeTextTracksMap",{}),v(y(o),"_lastLoadedFragSN",-1),v(y(o),"_sameFragSNLoadedCount",0),v(y(o),"_adapterEventsBindings",((a={})[u.a.Events.ERROR]=function(e,t){return o._onError(t)},a[u.a.Events.MANIFEST_LOADED]=function(e,t){return o._onManifestLoaded(t)},a[u.a.Events.LEVEL_SWITCHED]=function(e,t){return o._onLevelSwitched(e,t)},a[u.a.Events.AUDIO_TRACK_SWITCHED]=function(e,t){return o._onAudioTrackSwitched(e,t)},a[u.a.Events.FPS_DROP]=function(e,t){return o._onFpsDrop(t)},a[u.a.Events.FRAG_PARSING_METADATA]=function(e,t){return o._onFragParsingMetadata(t)},a[u.a.Events.FRAG_LOADED]=function(e,t){return o._onFragLoaded(t)},a[u.a.Events.MEDIA_ATTACHED]=function(){return o._onMediaAttached()},a[u.a.Events.LEVEL_LOADED]=function(e,t){return o._onLevelLoaded(e,t)},a)),v(y(o),"_onLevelLoaded",(function(e,t){if(o.isLive()){var n=t.details.endSN;if(o._lastLoadedFragSN===n){if(o._sameFragSNLoadedCount++,r._logger.debug("Same frag SN. Count is: "+o._sameFragSNLoadedCount+", Max is: "+o._config.network.maxStaleLevelReloads),o._sameFragSNLoadedCount>=o._config.network.maxStaleLevelReloads){r._logger.error("Same frag loading reached max count");var i=new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.NETWORK,s.Error.Code.LIVE_MANIFEST_REFRESH_ERROR,{fragSN:n});return o._trigger(s.EventType.ERROR,i),o.destroy()}r._logger.debug("Last frag SN is: "+n)}else o._sameFragSNLoadedCount=0;o._lastLoadedFragSN=n}})),o._config=s.Utils.Object.mergeDeep({},c,o._config),o._init(),o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.createAdapter=function(e,t,n){var i=s.Utils.Object.copyDeep(c);if(s.Utils.Object.hasPropertyPath(n,"sources.options")){var a=n.sources.options;i.forceRedirectExternalStreams=a.forceRedirectExternalStreams,i.redirectExternalStreamsHandler=a.redirectExternalStreamsHandler,i.redirectExternalStreamsTimeout=a.redirectExternalStreamsTimeout,f.redirectExternalStreamsHandler=i.redirectExternalStreamsHandler,f.redirectExternalStreamsTimeout=i.redirectExternalStreamsTimeout}if(s.Utils.Object.hasPropertyPath(n,"sources.startTime")&&s.Utils.Object.getPropertyPath(n,"sources.startTime")>-1&&(i.hlsConfig.startPosition=n.sources.startTime),s.Utils.Object.hasPropertyPath(n,"text.useNativeTextTrack")&&(i.subtitleDisplay=s.Utils.Object.getPropertyPath(n,"text.useNativeTextTrack")),s.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedFramesInterval")&&(i.hlsConfig.fpsDroppedFramesInterval=n.abr.fpsDroppedFramesInterval),s.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedMonitoringThreshold")&&(i.hlsConfig.fpsDroppedMonitoringThreshold=n.abr.fpsDroppedMonitoringThreshold),s.Utils.Object.hasPropertyPath(n,"abr.capLevelOnFPSDrop")&&(r._logger.debug("capLevelOnFPSDrop = ",n.abr.capLevelOnFPSDrop),i.hlsConfig.capLevelOnFPSDrop=n.abr.capLevelOnFPSDrop),s.Utils.Object.hasPropertyPath(n,"text")&&(i.hlsConfig.enableCEA708Captions=n.text.enableCEA708Captions,i.hlsConfig.captionsTextTrack1Label=n.text.captionsTextTrack1Label,i.hlsConfig.captionsTextTrack1LanguageCode=n.text.captionsTextTrack1LanguageCode,i.hlsConfig.captionsTextTrack2Label=n.text.captionsTextTrack2Label,i.hlsConfig.captionsTextTrack2LanguageCode=n.text.captionsTextTrack2LanguageCode),s.Utils.Object.hasPropertyPath(n,"abr")){var o=n.abr;"boolean"==typeof o.enabled&&(i.abr.enabled=o.enabled),"boolean"==typeof o.capLevelToPlayerSize&&(i.hlsConfig.capLevelToPlayerSize=o.capLevelToPlayerSize),o.defaultBandwidthEstimate&&(i.hlsConfig.abrEwmaDefaultEstimate=o.defaultBandwidthEstimate),o.restrictions&&s.Utils.Object.createPropertyPath(i,"abr.restrictions",o.restrictions)}return s.Utils.Object.hasPropertyPath(n,"streaming.lowLatencyMode")&&(i.hlsConfig.lowLatencyMode=s.Utils.Object.getPropertyPath(n,"streaming.lowLatencyMode")),s.Utils.Object.hasPropertyPath(n,"playback.options.html5.hls")&&s.Utils.Object.mergeDeep(i.hlsConfig,n.playback.options.html5.hls),i.network=n.network,new this(e,t,i)},r.canPlayType=function(e){var t="string"==typeof e&&r._hlsMimeTypes.includes(e.toLowerCase())&&r.isMSESupported();return r._logger.debug("canPlayType result for mimeType:"+e+" is "+t.toString()),t},r.canPlayDrm=function(){return r._logger.warn("canPlayDrm result is false"),!1},r.isSupported=function(){var e=u.a.isSupported();return r._logger.debug("isSupported:"+e),e};var i,a,o=r.prototype;return o._init=function(){this._config.forceRedirectExternalStreams&&(this._config.hlsConfig.pLoader=f),this._maybeSetFilters(),this._hls=new u.a(this._config.hlsConfig),this._capabilities.fpsControl=!0,this._hls.subtitleDisplay=this._config.subtitleDisplay,this._addBindings()},o._maybeSetFilters=function(){var e=this;if("function"==typeof s.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(r._logger.debug("Register request filter"),s.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:d,xhrSetup:function(t,n,r){var i,a={url:n,body:null,headers:{}};try{"manifest"===r.type&&(i=e._config.network.requestFilter(s.RequestType.MANIFEST,a)),r.frag&&"subtitle"!==r.frag.type&&(i=e._config.network.requestFilter(s.RequestType.SEGMENT,a))}catch(e){i=Promise.reject(e)}return(i=i||Promise.resolve(a)).then((function(e){r.url=e.url,t.open("GET",e.url,!0),Object.entries(e.headers).forEach((function(e){t.setRequestHeader.apply(t,e)})),"boolean"==typeof e.withCredentials&&(t.withCredentials=e.withCredentials)})).catch((function(t){throw e._requestFilterError=!0,t}))}})),"function"==typeof s.Utils.Object.getPropertyPath(this._config,"network.responseFilter")){var t=this;r._logger.debug("Register response filter"),s.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:d,readystatechange:function(e){var n=this,i=e.currentTarget,a=i.readyState,o=this.stats,l=this.context,u=this.config;if(!o.aborted&&a>=2){window.clearTimeout(this.requestTimeout);var c=o.loading;if(0===c.first&&(c.first=Math.max(performance.now(),c.start)),4===a){var p=i.status;if(p>=200&&p<300){var d,f;c.end=Math.max(o.tfirst,performance.now()),f="arraybuffer"===l.responseType?(d=i.response).byteLength:(d=i.responseText).length,o.loaded=o.total=f;var h,g={url:i.responseURL,originalUrl:l.url,data:d,headers:s.Utils.Http.convertHeadersToDictionary(i.getAllResponseHeaders())};try{"manifest"===l.type&&(h=t._config.network.responseFilter(s.RequestType.MANIFEST,g)),l.frag&&"subtitle"!==l.frag.type&&(h=t._config.network.responseFilter(s.RequestType.SEGMENT,g))}catch(e){h=Promise.reject(e)}return(h=h||Promise.resolve(g)).then((function(e){n.callbacks.onSuccess(e,o,l,i)})).catch((function(e){t._responseFilterError=!0,n.callbacks.onError({code:p,text:e.message},l,i)}))}o.retry>=u.maxRetry||p>=400&&p<499?(r._logger.error(p+" while loading "+l.url),this.callbacks.onError({code:p,text:i.statusText},l,i)):(r._logger.warn(p+" while loading "+l.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,u.maxRetryDelay),o.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),u.timeout)}}})}},o._addBindings=function(){var e=this;this._mediaAttachedPromise=new Promise((function(t){return e._onMediaAttached=t}));for(var t=0,n=Object.entries(this._adapterEventsBindings);t<n.length;t++){var r=n[t],i=r[0],a=r[1];this._hls.on(i,a)}this._onRecoveredCallback=function(){return e._onRecovered()},this._onAddTrack=this._onAddTrack.bind(this),this._eventManager.listen(this._videoElement,"addtrack",this._onAddTrack),this._videoElement.textTracks.onaddtrack=this._onAddTrack},o._onFpsDrop=function(e){this._trigger(s.EventType.FPS_DROP,e)},o._onFragParsingMetadata=function(e){var t;this._trigger("hlsFragParsingMetadata",e);var n=Array.from(null==(t=this._videoElement)?void 0:t.textTracks).find((function(e){return"id3"===e.label})),r=Array.from((null==n?void 0:n.cues)||[]),i=[];null==e||e.samples.forEach((function(e){var t=s.Utils.binarySearch(r,(function(t){return t.startTime-e.pts}));if(t){var n=Object(s.createTimedMetadata)(t);i.push(n)}})),i.length&&this._trigger(s.EventType.TIMED_METADATA_ADDED,{cues:i})},o._onAddTrack=function(e){if(!this._hls.subtitleTracks.length){var t=this._parseCEATextTrack(e.track);t&&(r._logger.debug("A CEA 608/708 caption has been found",t),this._playerTracks.push(t),this._trigger(s.EventType.TRACKS_CHANGED,{tracks:this._playerTracks}))}},o.attachMediaSource=function(){this._hls||(this._videoElement&&this._videoElement.src&&(s.Utils.Dom.setAttribute(this._videoElement,"src",""),s.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init())},o.detachMediaSource=function(){var e;this._hls&&(0===Math.floor(this.duration-this.currentTime)?this._config.hlsConfig.startPosition=0:this.currentTime>0&&(this._config.hlsConfig.startPosition=this.currentTime),this._reset(),null==(e=this._loadPromiseHandlers)||e.reject(new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,"media detached while loading")),this._loadPromiseHandlers=null,this._loadPromise=null,this._hls=null)},o.handleMediaError=function(e){return e.code===e.MEDIA_ERR_DECODE&&(r._logger.debug("The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",e.message),this._handleMediaError(u.a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR))},o.load=function(e){var t=this;return this._loadPromise||(this._startTime=e,this._loadPromise=new Promise((function(e,n){t._loadPromiseHandlers={resolve:e,reject:n},t._loadInternal()}))),this._loadPromise},o._loadInternal=function(){var e;this._hls&&this._sourceObj&&this._sourceObj.url?(this._hls.loadSource(this._sourceObj.url),this._hls.attachMedia(this._videoElement),this._trigger(s.EventType.ABR_MODE_CHANGED,{mode:this.isAdaptiveBitrateEnabled()?"auto":"manual"})):null==(e=this._loadPromiseHandlers)||e.reject(new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,"no url provided"))},o._reloadWithDirectManifest=function(){this._triedReloadWithRedirect=!0,this._reset(),this._config.hlsConfig.pLoader=f,this._hls=new u.a(this._config.hlsConfig),this._addBindings(),this._loadInternal()},o.destroy=function(){var t=this;return new Promise((function(n,i){e.prototype.destroy.call(t).then((function(){var e;r._logger.debug("destroy"),t._playerTracks=[],t._nativeTextTracksMap={},t._sameFragSNLoadedCount=0,t._lastLoadedFragSN=-1,null==(e=t._loadPromiseHandlers)||e.reject(new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,"The adapter has been destroyed while loading")),t._loadPromiseHandlers=null,t._loadPromise=null,t._reset(),n()}),(function(){return i()}))}))},o._reset=function(){this._removeBindings(),this._requestFilterError=!1,this._responseFilterError=!1,this._hls.detachMedia(),this._hls.destroy()},o._parseTracks=function(){var e=this._parseAudioTracks(this._hls.audioTracks||[]),t=this._parseVideoTracks(this._hls.levels||[]),n=this._parseTextTracks(this._hls.subtitleTracks||[]);return e.concat(t).concat(n)},o._parseAudioTracks=function(e){for(var t=[],n=0;n<e.length;n++){var r={id:e[n].id,active:this._hls.audioTrack===e[n].id,label:e[n].name,language:e[n].lang,index:n};t.push(new s.AudioTrack(r))}return t},o._parseVideoTracks=function(e){for(var t=[],n=0;n<e.length;n++){var r={active:this._hls.startLevel===n,bandwidth:e[n].bitrate,width:e[n].width,height:e[n].height,language:"",index:n};t.push(new s.VideoTrack(r))}return t},o._parseTextTracks=function(e){for(var t,n=[],r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(t=r()).done;){var i=t.value,a={id:i.id,active:!1,default:i.default,label:i.name,kind:i.type.toLowerCase(),language:i.lang};n.push(new s.TextTrack(a))}return n},o._parseCEATextTrack=function(e){var t=null;if("captions"===e.kind){var n={id:e.id,active:"showing"===e.mode,label:e.label,kind:e.kind,language:e.language};t=new s.TextTrack(n),this._nativeTextTracksMap[t.index]=e}return t},o.selectAudioTrack=function(e){e instanceof s.AudioTrack&&!e.active&&this._hls.audioTracks&&(this._hls.audioTrack=e.id)},o.selectVideoTrack=function(e){e instanceof s.VideoTrack&&(!e.active||this.isAdaptiveBitrateEnabled())&&this._hls.levels&&(this.isAdaptiveBitrateEnabled()&&this._trigger(s.EventType.ABR_MODE_CHANGED,{mode:"manual"}),this._hls.currentLevel=e.index)},o.selectTextTrack=function(e){e instanceof s.TextTrack&&!e.active&&this._hls&&(this._hls.subtitleTracks.length?(this._hls.subtitleTrack=e.id,this._notifyTrackChanged(e)):this._selectNativeTextTrack(e))},o._selectNativeTextTrack=function(e){var t=this._nativeTextTracksMap[e.index];t&&(this.disableNativeTextTracks(),t.mode=this._config.subtitleDisplay?"showing":"hidden",this._notifyTrackChanged(e))},o._notifyTrackChanged=function(e){this._onTrackChanged(e)},o.hideTextTrack=function(){this._hls&&(this._hls.subtitleTracks.length?this._hls.subtitleTrack=-1:this.disableNativeTextTracks())},o.enableAdaptiveBitrate=function(){this.isAdaptiveBitrateEnabled()||(this._trigger(s.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._hls.nextLevel=-1)},o.isAdaptiveBitrateEnabled=function(){return!!this._hls&&this._hls.autoLevelEnabled},o.applyABRRestriction=function(e){s.Utils.Object.createPropertyPath(this._config,"abr.restrictions",e),this._hls.capLevelToPlayerSize||this._maybeApplyAbrRestrictions(e)},o._getLevelDetails=function(){var e=this._hls.levels[this._hls.currentLevel]||this._hls.levels[this._hls.nextLevel]||this._hls.levels[this._hls.nextAutoLevel]||this._hls.levels[this._hls.nextLoadLevel];return e&&e.details?e.details:{}},o._getLiveEdge=function(){try{var e;return(e=this._hls.liveSyncPosition?this._hls.liveSyncPosition:this._hls.config.liveSyncDuration?this._videoElement.duration-this._hls.config.liveSyncDuration:this._videoElement.duration-this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration)>0?e:this._videoElement.duration}catch(e){return r._logger.debug("Live edge calculation failed, fall back to duration"),this._videoElement.duration}},o.seekToLiveEdge=function(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}},o.getSegmentDuration=function(){var e=s.Utils.Object.getPropertyPath(this._hls,"streamController.fragCurrent");return e?e.duration:0},o.isLive=function(){try{return!!this._getLevelDetails().live}catch(e){return!1}},o._onManifestLoaded=function(e){var t=this;r._logger.debug("The source has been loaded successfully"),this._hls.config.autoStartLoad||this._hls.startLoad(this._startTime),this._playerTracks=this._parseTracks(),this._config.abr.enabled||(this._hls.currentLevel=0),this._mediaAttachedPromise.then((function(){var e;null==(e=t._loadPromiseHandlers)||e.resolve({tracks:t._playerTracks}),t._loadPromiseHandlers=null}));var n=e.stats.loading,i=n.end-n.start;this._trigger(s.EventType.MANIFEST_LOADED,{miliSeconds:i})},o._maybeApplyAbrRestrictions=function(e){var t=this._playerTracks.filter((function(e){return e instanceof s.VideoTrack})),n=Object(s.filterTracksByRestriction)(t,e);if(n.length){var i=n[0],a=n.pop();this._hls.config.minAutoBitrate=i.bandwidth,this._hls.autoLevelCapping=a.index;var o=n.some((function(e){return e.active}));this.isAdaptiveBitrateEnabled()||o||this.selectVideoTrack(i)}else r._logger.warn("Invalid restrictions, there are not tracks within the restriction range")},o._onLevelSwitched=function(e,t){var n=this._playerTracks.find((function(e){return e instanceof s.VideoTrack&&e.index===t.level}));this._onTrackChanged(n)},o._onAudioTrackSwitched=function(e,t){var n=this._playerTracks.find((function(e){return e instanceof s.AudioTrack&&e.id===t.id}));this._onTrackChanged(n),this._handleWaitingUponAudioTrackSwitch()},o._handleWaitingUponAudioTrackSwitch=function(){var e=this;["IE","Edge"].includes(s.Env.browser.name)&&this._eventManager.listenOnce(this._videoElement,s.EventType.TIME_UPDATE,(function(){e._trigger(s.EventType.PLAYING)}))},o._getErrorDataObject=function(e){var t={};switch(t.name=e.details,t.name){case u.a.ErrorDetails.MANIFEST_LOAD_ERROR:case u.a.ErrorDetails.LEVEL_LOAD_ERROR:case u.a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:t.url=e.url,t.responseCode=e.response?e.response.code:null;break;case u.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case u.a.ErrorDetails.LEVEL_LOAD_TIMEOUT:case u.a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:t.url=e.url;break;case u.a.ErrorDetails.MANIFEST_PARSING_ERROR:t.url=e.url,t.reason=e.reason;break;case u.a.ErrorDetails.LEVEL_SWITCH_ERROR:t.level=e.level,t.reason=e.reason;break;case u.a.ErrorDetails.FRAG_LOAD_ERROR:t.fragUrl=e.frag?e.frag.url:null,t.responseCode=e.response?e.response.code:null;break;case u.a.ErrorDetails.FRAG_LOAD_TIMEOUT:t.fragUrl=e.frag?e.frag.url:null;break;case u.a.ErrorDetails.FRAG_DECRYPT_ERROR:case u.a.ErrorDetails.FRAG_PARSING_ERROR:t.reason=e.reason;break;case u.a.ErrorDetails.KEY_LOAD_ERROR:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null,t.responseCode=e.response?e.response.code:null;break;case u.a.ErrorDetails.KEY_LOAD_TIMEOUT:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null;break;case u.a.ErrorDetails.BUFFER_ADD_CODEC_ERROR:t.mimeType=e.mimeType,t.errorMsg=e.err?e.err.message:null;break;case u.a.ErrorDetails.BUFFER_STALLED_ERROR:t.buffer=e.buffer}return(this._requestFilterError||this._responseFilterError)&&(t.reason=e.response.text),t},o._onError=function(e){var t=e.type,n=e.details,i=e.fatal,a=this._getErrorDataObject(e);if(i){var o,l;switch(t){case u.a.ErrorTypes.NETWORK_ERROR:var c;c=this._requestFilterError?s.Error.Code.REQUEST_FILTER_ERROR:this._responseFilterError?s.Error.Code.RESPONSE_FILTER_ERROR:s.Error.Code.HTTP_ERROR,![u.a.ErrorDetails.MANIFEST_LOAD_ERROR,u.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT].includes(n)||this._triedReloadWithRedirect||this._config.forceRedirectExternalStreams||this._requestFilterError||this._responseFilterError?o=new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.NETWORK,c,a):(o=new s.Error(s.Error.Severity.RECOVERABLE,s.Error.Category.NETWORK,c,a),this._reloadWithDirectManifest());break;case u.a.ErrorTypes.MEDIA_ERROR:o=this._handleMediaError(n)?new s.Error(s.Error.Severity.RECOVERABLE,s.Error.Category.MEDIA,s.Error.Code.HLS_FATAL_MEDIA_ERROR,a):new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.MEDIA,s.Error.Code.HLS_FATAL_MEDIA_ERROR,a);break;default:o=new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,a)}this._trigger(s.EventType.ERROR,o),o&&o.severity===s.Error.Severity.CRITICAL&&(this._loadPromiseHandlers&&(null==(l=this._loadPromiseHandlers)||l.reject(o),this._loadPromiseHandlers=null,this._loadPromise=null),this.destroy())}else{var d=this._requestFilterError||this._responseFilterError?{category:s.Error.Category.NETWORK,code:this._requestFilterError?s.Error.Code.REQUEST_FILTER_ERROR:s.Error.Code.RESPONSE_FILTER_ERROR}:p[n]||{category:0,code:0},f=d.category,h=d.code;r._logger.warn(new s.Error(s.Error.Severity.RECOVERABLE,f,h,a))}this._requestFilterError=!1,this._responseFilterError=!1},o._handleMediaError=function(e){r._logger.error("_handleMediaError mediaErrorName:",e);var t=performance.now(),n=!0;return e===u.a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR?(r._logger.error("recover aborted due to: MANIFEST_INCOMPATIBLE_CODECS_ERROR"),n=!1):this._checkTimeDeltaHasPassed(t,this._recoverDecodingErrorDate,this._config.recoverDecodingErrorDelay)?(this._eventManager.listen(this._videoElement,s.EventType.LOADED_METADATA,this._onRecoveredCallback),r._logger.debug("try to recover using: _recoverDecodingError()"),this._recoverDecodingError()):this._checkTimeDeltaHasPassed(t,this._recoverSwapAudioCodecDate,this._config.recoverSwapAudioCodecDelay)?(this._eventManager.listen(this._videoElement,s.EventType.LOADED_METADATA,this._onRecoveredCallback),r._logger.debug("try to recover using: _recoverSwapAudioCodec()"),this._recoverSwapAudioCodec()):(r._logger.error("cannot recover, last media error recovery failed error: ",e),n=!1),n},o._onRecovered=function(){this._trigger(s.EventType.MEDIA_RECOVERED),this._videoElement.removeEventListener(s.EventType.LOADED_METADATA,this._onRecoveredCallback)},o._checkTimeDeltaHasPassed=function(e,t,n){return!t||e-t>n},o._recoverDecodingError=function(){this._recoverDecodingErrorDate=performance.now(),r._logger.warn("try to recover media Error"),this._hls.recoverMediaError()},o._recoverSwapAudioCodec=function(){this._recoverSwapAudioCodecDate=performance.now(),r._logger.warn("try to swap Audio Codec and recover media Error"),this._hls.swapAudioCodec(),this._hls.recoverMediaError()},o._removeBindings=function(){for(var e=0,t=Object.entries(this._adapterEventsBindings);e<t.length;e++){var n=t[e],r=n[0],i=n[1];this._hls.off(r,i)}this._videoElement.textTracks.onaddtrack=null,this._onRecoveredCallback=null,this._eventManager&&this._eventManager.removeAll()},o.getStartTimeOfDvrWindow=function(){if(!this.isLive())return 0;try{var e=this._hls.levels[this._hls.nextLoadLevel].details,t=e.fragments,n=t.length,i=t[0].start+t[0].duration,a=t[n-1].start+t[n-1].duration,o=void 0!==this._hls.config.liveMaxLatencyDuration?this._hls.config.liveMaxLatencyDuration:this._hls.config.liveMaxLatencyDurationCount*e.targetduration;return Math.max(i-this._hls.config.maxFragLookUpTolerance,a-o)}catch(e){return r._logger.debug("Unable obtain the start of DVR window"),0}},o._onFragLoaded=function(e){if(s.Utils.Object.hasPropertyPath(e,"frag.stats.loading")){var t=e.frag.stats,n=t.loading.end-t.loading.start;this._trigger(s.EventType.FRAG_LOADED,{miliSeconds:n,bytes:t.loaded,url:e.frag.url})}},o._getLiveTargetBuffer=function(){return this._hls.config.liveSyncDuration?this._hls.config.liveSyncDuration:this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration},i=r,(a=[{key:"liveDuration",get:function(){return this._getLiveEdge()+this.getSegmentDuration()}},{key:"targetBuffer",get:function(){var e=NaN;return this._hls?(e=this.isLive()?this._getLiveTargetBuffer()-(this._videoElement.currentTime-this._getLiveEdge()):this._videoElement.duration-this._videoElement.currentTime,e=Math.min(e,this._hls.config.maxMaxBufferLength+this._getLevelDetails().targetduration)):NaN}}])&&g(i.prototype,a),r}(s.BaseMediaSourceAdapter);v(m,"id","HlsAdapter"),v(m,"_logger",s.BaseMediaSourceAdapter.getLogger(m.id)),v(m,"_hlsMimeTypes",["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"]);var b="1.32.3-canary.0-5a35881",_="@playkit-js/playkit-js-hls";t.default=m,m.isSupported()&&Object(s.registerMediaSourceAdapter)(m)}]))},function(e,t,n){var r;"undefined"!=typeof window&&(r=()=>(()=>{var e={21:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=function(){function e(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),i=function(){function e(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}(),a=n(145),o=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],u=s[1],c=s[2],p=s[3],d=new Uint32Array(256),f=0,h=0,g=0;for(g=0;g<256;g++)d[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var y=h^h<<1^h<<2^h<<3^h<<4;y=y>>>8^255&y^99,e[f]=y,t[y]=f;var v=d[f],m=d[v],b=d[m],_=257*d[y]^16843008*y;r[f]=_<<24|_>>>8,i[f]=_<<16|_>>>16,a[f]=_<<8|_>>>24,o[f]=_,_=16843009*b^65537*m^257*v^16843008*f,l[y]=_<<24|_>>>8,u[y]=_<<16|_>>>16,c[y]=_<<8|_>>>24,p[y]=_,f?(f=v^d[d[d[b^v]]],h^=d[d[h]]):f=h=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var a,o,s,l,u=this.ksRows=4*(i+6+1),c=this.keySchedule=new Uint32Array(u),p=this.invKeySchedule=new Uint32Array(u),d=this.sBox,f=this.rcon,h=this.invSubMix,g=h[0],y=h[1],v=h[2],m=h[3];for(a=0;a<u;a++)a<i?s=c[a]=t[a]:(l=s,a%i==0?(l=d[(l=l<<8|l>>>24)>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l],l^=f[a/i|0]<<24):i>6&&a%i==4&&(l=d[l>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l]),c[a]=s=(c[a-i]^l)>>>0);for(o=0;o<u;o++)a=u-o,l=3&o?c[a]:c[a-4],p[o]=o<4||a<=4?l:g[d[l>>>24]]^y[d[l>>>16&255]]^v[d[l>>>8&255]]^m[d[255&l]],p[o]=p[o]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n){for(var r,i,a,o,s,l,u,c,p,d,f,h,g,y,v=this.keySize+6,m=this.invKeySchedule,b=this.invSBox,_=this.invSubMix,E=_[0],k=_[1],T=_[2],A=_[3],w=this.uint8ArrayToUint32Array_(n),S=w[0],C=w[1],x=w[2],I=w[3],P=new Int32Array(e),D=new Int32Array(P.length),R=this.networkToHostOrderSwap;t<P.length;){for(p=R(P[t]),d=R(P[t+1]),f=R(P[t+2]),h=R(P[t+3]),s=p^m[0],l=h^m[1],u=f^m[2],c=d^m[3],g=4,y=1;y<v;y++)r=E[s>>>24]^k[l>>16&255]^T[u>>8&255]^A[255&c]^m[g],i=E[l>>>24]^k[u>>16&255]^T[c>>8&255]^A[255&s]^m[g+1],a=E[u>>>24]^k[c>>16&255]^T[s>>8&255]^A[255&l]^m[g+2],o=E[c>>>24]^k[s>>16&255]^T[l>>8&255]^A[255&u]^m[g+3],s=r,l=i,u=a,c=o,g+=4;r=b[s>>>24]<<24^b[l>>16&255]<<16^b[u>>8&255]<<8^b[255&c]^m[g],i=b[l>>>24]<<24^b[u>>16&255]<<16^b[c>>8&255]<<8^b[255&s]^m[g+1],a=b[u>>>24]<<24^b[c>>16&255]<<16^b[s>>8&255]<<8^b[255&l]^m[g+2],o=b[c>>>24]<<24^b[s>>16&255]<<16^b[l>>8&255]<<8^b[255&u]^m[g+3],D[t]=R(r^S),D[t+1]=R(o^C),D[t+2]=R(a^x),D[t+3]=R(i^I),S=p,C=d,x=f,I=h,t+=4}return D.buffer},e}(),s=n(93),l=n(63),u=function(){function e(e,t){var n=(void 0===t?{}:t).removePKCS7Padding,r=void 0===n||n;if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=r,r)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch(e){}null===this.subtle&&(this.useSoftware=!0)}var t=e.prototype;return t.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},t.isSync=function(){return this.useSoftware},t.flush=function(){var e=this.currentResult,t=this.remainderData;if(!e||t)return this.reset(),null;var n,r,i,o=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?(i=(r=(n=o).byteLength)&&new DataView(n.buffer).getUint8(r-1))?(0,a.sliceUint8)(n,0,r-i):n:o},t.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},t.decrypt=function(e,t,n){var r=this;return this.useSoftware?new Promise((function(i,a){r.softwareDecrypt(new Uint8Array(e),t,n);var o=r.flush();o?i(o.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,n)},t.softwareDecrypt=function(e,t,n){var r=this.currentIV,i=this.currentResult,s=this.remainderData;this.logOnce("JS AES decrypt"),s&&(e=(0,l.appendUint8Array)(s,e),this.remainderData=null);var u=this.getValidChunk(e);if(!u.length)return null;r&&(n=r);var c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new o),c.expandKey(t);var p=i;return this.currentResult=c.decrypt(u.buffer,0,n),this.currentIV=(0,a.sliceUint8)(u,-16).buffer,p||null},t.webCryptoDecrypt=function(e,t,n){var a=this,o=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new i(o,t)),this.fastAesKey.expandKey().then((function(t){return o?(a.logOnce("WebCrypto AES decrypt"),new r(o,new Uint8Array(n)).decrypt(e.buffer,t)):Promise.reject(new Error("web crypto not initialized"))})).catch((function(r){return s.logger.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+r.name+": "+r.message),a.onWebCryptoError(e,t,n)}))},t.onWebCryptoError=function(e,t,n){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n);var r=this.flush();if(r)return r.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},t.getValidChunk=function(e){var t=e,n=e.length-e.length%16;return n!==e.length&&(t=(0,a.sliceUint8)(e,0,n),this.remainderData=(0,a.sliceUint8)(e,n)),t},t.logOnce=function(e){this.logEnabled&&(s.logger.log("[decrypter]: "+e),this.logEnabled=!1)},e}()},181:(e,t,n)=>{"use strict";n.r(t),n.d(t,{canParse:()=>l,decodeFrame:()=>f,getID3Data:()=>o,getID3Frames:()=>d,getTimeStamp:()=>u,isFooter:()=>a,isHeader:()=>i,isTimeStampFrame:()=>c,testables:()=>b,utf8ArrayToStr:()=>m});var r,i=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},a=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},o=function(e,t){for(var n=t,r=0;i(e,t);)r+=10,r+=s(e,t+6),a(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},u=function(e){for(var t=d(e),n=0;n<t.length;n++){var r=t[n];if(c(r))return v(r)}},c=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},p=function(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=s(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}},d=function(e){for(var t=0,n=[];i(e,t);){for(var r=s(e,t+6),o=(t+=10)+r;t+8<o;){var l=p(e.subarray(t)),u=f(l);u&&n.push(u),t+=l.size+10}a(e,t)&&(t+=10)}return n},f=function(e){return"PRIV"===e.type?h(e):"W"===e.type[0]?y(e):g(e)},h=function(e){if(!(e.size<2)){var t=m(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}},g=function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,n=m(e.data.subarray(t),!0);t+=n.length+1;var r=m(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=m(e.data.subarray(1));return{key:e.type,data:i}}},y=function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,n=m(e.data.subarray(t),!0);t+=n.length+1;var r=m(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=m(e.data);return{key:e.type,data:i}},v=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},m=function(e,t){void 0===t&&(t=!1);var n=_();if(n){var r=n.decode(e);if(t){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var a,o,s,l=e.length,u="",c=0;c<l;){if(0===(a=e[c++])&&t)return u;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(a);break;case 12:case 13:o=e[c++],u+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[c++],s=e[c++],u+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return u},b={decodeTextFrame:g};function _(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},182:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(544),i=n(851),a=n(93),o=n(729),s=n(973);function l(e){var t=new o.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(o){var l=o.data;switch(l.cmd){case"init":var c=JSON.parse(l.config);e.transmuxer=new r.default(t,l.typeSupported,c,l.vendor,l.id),(0,a.enableLogs)(c.debug,l.id),function(){var e=function(e){a.logger[e]=function(t){n("workerLog",{logType:e,message:t})}};for(var t in a.logger)e(t)}(),n("init",null);break;case"configure":e.transmuxer.configure(l.config);break;case"demux":var d=e.transmuxer.push(l.data,l.decryptdata,l.chunkMeta,l.state);(0,r.isPromise)(d)?(e.transmuxer.async=!0,d.then((function(t){u(e,t)})).catch((function(e){n(i.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:l.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker push error"})}))):(e.transmuxer.async=!1,u(e,d));break;case"flush":var f=l.chunkMeta,h=e.transmuxer.flush(f);(0,r.isPromise)(h)||e.transmuxer.async?((0,r.isPromise)(h)||(h=Promise.resolve(h)),h.then((function(t){p(e,t,f)})).catch((function(e){n(i.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:l.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker flush error"})}))):p(e,h,f)}}))}function u(e,t){if(!((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment))return!1;var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;return a&&c(r,a),o&&c(r,o),e.postMessage({event:"transmuxComplete",data:t},r),!0}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function p(e,t,n){t.reduce((function(t,n){return u(e,n)||t}),!1)||e.postMessage({event:"transmuxComplete",data:t[0]}),e.postMessage({event:"flush",data:n})}},544:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TransmuxConfig:()=>oe,TransmuxState:()=>se,default:()=>re,isPromise:()=>ae});var r=n(851),i=n(973),a=n(21),o=n(965),s=n(181),l=n(856);function u(e,t){return void 0===e&&(e=""),void 0===t&&(t=9e4),{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}var c=n(63),p=n(145),d=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(e){this.initPTS=e,this.resetContiguity()},t.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=(0,c.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r=s.getID3Data(e,0),i=r?r.length:0,a=this._audioTrack,d=this._id3Track,h=r?s.getTimeStamp(r):void 0,g=e.length;for((null===this.basePTS||0===this.frameIndex&&(0,o.isFiniteNumber)(h))&&(this.basePTS=f(h,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),r&&r.length>0&&d.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:l.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});i<g;){if(this.canParse(e,i)){var y=this.appendFrame(a,e,i);y?(this.frameIndex++,this.lastPTS=y.sample.pts,n=i+=y.length):i=g}else s.canParse(e,i)?(r=s.getID3Data(e,i),d.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:l.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY}),n=i+=r.length):i++;if(i===g&&n!==g){var v=(0,p.sliceUint8)(e,n);this.cachedData?this.cachedData=(0,c.appendUint8Array)(this.cachedData,v):this.cachedData=v}}return{audioTrack:a,videoTrack:u(),id3Track:d,textTrack:u()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},t.flush=function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:u(),id3Track:this._id3Track,textTrack:u()}},t.destroy=function(){},e}(),f=function(e,t,n){return(0,o.isFiniteNumber)(e)?90*e:9e4*t+(n||0)};const h=d;var g=n(93);function y(e,t){return 255===e[t]&&240==(246&e[t+1])}function v(e,t){return 1&e[t+1]?7:9}function m(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function b(e,t){return t+1<e.length&&y(e,t)}function _(e,t){if(b(e,t)){var n=v(e,t);if(t+n>=e.length)return!1;var r=m(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||b(e,i)}return!1}function E(e,t,n,a,o){if(!e.samplerate){var s=function(e,t,n,a){var o,s,l,u,c=navigator.userAgent.toLowerCase(),p=a,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];o=1+((192&t[n+2])>>>6);var f=(60&t[n+2])>>>2;if(!(f>d.length-1))return l=(1&t[n+2])<<2,l|=(192&t[n+3])>>>6,g.logger.log("manifest codec:"+a+", ADTS type:"+o+", samplingIndex:"+f),/firefox/i.test(c)?f>=6?(o=5,u=new Array(4),s=f-3):(o=2,u=new Array(2),s=f):-1!==c.indexOf("android")?(o=2,u=new Array(2),s=f):(o=5,u=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&f>=6?s=f-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(f>=6&&1===l||/vivaldi/i.test(c))||!a&&1===l)&&(o=2,u=new Array(2)),s=f)),u[0]=o<<3,u[0]|=(14&f)>>1,u[1]|=(1&f)<<7,u[1]|=l<<3,5===o&&(u[1]|=(14&s)>>1,u[2]=(1&s)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:d[f],channelCount:l,codec:"mp4a.40."+o,manifestCodec:p};e.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+f})}(t,n,a,o);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,g.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function k(e){return 9216e4/e}function T(e,t,n,r,i){var a,o=r+i*k(e.samplerate),s=function(e,t){var n=v(e,t);if(t+n<=e.length){var r=m(e,t)-n;if(r>0)return{headerLength:n,frameLength:r}}}(t,n);if(s){var l=s.frameLength,u=s.headerLength,c=u+l,p=Math.max(0,n+c-t.length);p?(a=new Uint8Array(c-u)).set(t.subarray(n+u,t.length),0):a=t.subarray(n+u,n+c);var d={unit:a,pts:o};return p||e.samples.push(d),{sample:d,length:c,missing:p}}var f=t.length-n;return(a=new Uint8Array(f)).set(t.subarray(n,t.length),0),{sample:{unit:a,pts:o},length:f,missing:-1}}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const w=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this).observer=void 0,r.config=void 0,r.observer=t,r.config=n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var i=r.prototype;return i.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(s.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(_(e,t))return g.logger.log("ADTS sync word found !"),!0;return!1},i.canParse=function(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&y(e,t)&&m(e,t)<=e.length-t}(e,t)},i.appendFrame=function(e,t,n){E(e,this.observer,t,n,e.manifestCodec);var r=T(e,t,n,this.basePTS,this.frameIndex);if(r&&0===r.missing)return r},r}(h);var S=/\/emsg[-/]ID3/i;const C=function(){function e(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}var t=e.prototype;return t.resetTimeStamp=function(){},t.resetInitSegment=function(e,t,n,r){var i=this.videoTrack=u("video",1),a=this.audioTrack=u("audio",1),o=this.txtTrack=u("text",1);if(this.id3Track=u("id3",1),this.timeOffset=0,e&&e.byteLength){var s=(0,c.parseInitSegment)(e);if(s.video){var l=s.video,p=l.id,d=l.timescale,f=l.codec;i.id=p,i.timescale=o.timescale=d,i.codec=f}if(s.audio){var h=s.audio,g=h.id,y=h.timescale,v=h.codec;a.id=g,a.timescale=y,a.codec=v}o.id=c.RemuxerTrackIdConfig.text,i.sampleDuration=0,i.duration=a.duration=r}},t.resetContiguity=function(){},e.probe=function(e){return e=e.length>16384?e.subarray(0,16384):e,(0,c.findBox)(e,["moof"]).length>0},t.demux=function(e,t){this.timeOffset=t;var n=e,r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=(0,c.appendUint8Array)(this.remainderData,e));var a=(0,c.segmentValidRange)(n);this.remainderData=a.remainder,r.samples=a.valid||new Uint8Array}else r.samples=n;var o=this.extractID3Track(r,t);return i.samples=(0,c.parseSamples)(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:o,textTrack:this.txtTrack}},t.flush=function(){var e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;var r=this.extractID3Track(t,this.timeOffset);return n.samples=(0,c.parseSamples)(e,t),{videoTrack:t,audioTrack:u(),id3Track:r,textTrack:u()}},t.extractID3Track=function(e,t){var n=this.id3Track;if(e.samples.length){var r=(0,c.findBox)(e.samples,["emsg"]);r&&r.forEach((function(e){var r=(0,c.parseEmsg)(e);if(S.test(r.schemeIdUri)){var i=(0,o.isFiniteNumber)(r.presentationTime)?r.presentationTime/r.timeScale:t+r.presentationTimeDelta/r.timeScale,a=4294967295===r.eventDuration?Number.POSITIVE_INFINITY:r.eventDuration/r.timeScale;a<=.001&&(a=Number.POSITIVE_INFINITY);var s=r.payload;n.samples.push({data:s,len:s.byteLength,dts:i,pts:i,type:l.MetadataSchema.emsg,duration:a})}}))}return n},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();var x=null,I=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],P=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],D=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],R=[0,1,1,4];function O(e,t,n,r,i){if(!(n+24>t.length)){var a=L(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function L(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==i&&15!==i&&3!==a){var o=e[t+2]>>1&1,s=e[t+3]>>6,l=1e3*I[14*(3===n?3-r:3===r?3:4)+i-1],u=P[3*(3===n?0:2===n?1:2)+a],c=3===s?1:2,p=D[n][r],d=R[r],f=8*p*d,h=Math.floor(p*l/u+o)*d;if(null===x){var g=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);x=g?parseInt(g[1]):0}return!!x&&x<=87&&2===r&&l>=224e3&&0===s&&(e[t+3]=128|e[t+3]),{sampleRate:u,channelCount:c,frameLength:h,samplesPerFrame:f}}}function M(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function N(e,t){return t+1<e.length&&M(e,t)}function U(e,t){if(t+1<e.length&&M(e,t)){var n=L(e,t),r=4;null!=n&&n.frameLength&&(r=n.frameLength);var i=t+r;return i===e.length||N(e,i)}return!1}const F=function(){function e(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.skipBits=function(e){var t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;if(e>32&&g.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n},t.readSPS=function(){var e,t,n,r=0,i=0,a=0,o=0,s=this.readUByte.bind(this),l=this.readBits.bind(this),u=this.readUEG.bind(this),c=this.readBoolean.bind(this),p=this.skipBits.bind(this),d=this.skipEG.bind(this),f=this.skipUEG.bind(this),h=this.skipScalingList.bind(this);s();var g=s();if(l(5),p(3),s(),f(),100===g||110===g||122===g||244===g||44===g||83===g||86===g||118===g||128===g){var y=u();if(3===y&&p(1),f(),f(),p(1),c())for(t=3!==y?8:12,n=0;n<t;n++)c()&&h(n<6?16:64)}f();var v=u();if(0===v)u();else if(1===v)for(p(1),d(),d(),e=u(),n=0;n<e;n++)d();f(),p(1);var m=u(),b=u(),_=l(1);0===_&&p(1),p(1),c()&&(r=u(),i=u(),a=u(),o=u());var E=[1,1];if(c()&&c())switch(s()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[s()<<8|s(),s()<<8|s()]}return{width:Math.ceil(16*(m+1)-2*r-2*i),height:(2-_)*(b+1)*16-(_?2:4)*(a+o),pixelRatio:E}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),j=function(){function e(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new a.default(t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)},t.decryptAacSample=function(e,t,n){var r=this,i=e[t].unit;if(!(i.length<=16)){var a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length);this.decryptBuffer(o).then((function(a){var o=new Uint8Array(a);i.set(o,16),r.decrypter.isSync()||r.decryptAacSamples(e,t+1,n)}))}},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32||(this.decryptAacSample(e,t,n),this.decrypter.isSync())))return}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,i){var a=this,o=(0,c.discardEPB)(i.data),s=this.getAvcEncryptedData(o);this.decryptBuffer(s.buffer).then((function(s){i.data=a.getAvcDecryptedUnit(o,s),a.decrypter.isSync()||a.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,n,r,a),this.decrypter.isSync())))return}}},e}();function B(){return(B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var V=188;function H(e,t,n,r){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:r,length:0}}function K(e,t){return((31&e[t+1])<<8)+e[t+2]}function G(e,t){return(31&e[t+10])<<8|e[t+11]}function z(e,t,n,r){var i={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},a=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){var o=K(e,t);switch(e[t]){case 207:if(!r){g.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===i.audio&&(i.audio=o);break;case 21:-1===i.id3&&(i.id3=o);break;case 219:if(!r){g.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===i.avc&&(i.avc=o);break;case 3:case 4:!0!==n.mpeg&&!0!==n.mp3?g.logger.log("MPEG audio found, not supported in this browser"):-1===i.audio&&(i.audio=o,i.segmentCodec="mp3");break;case 36:g.logger.warn("Unsupported HEVC stream type found")}t+=5+((15&e[t+3])<<8|e[t+4])}return i}function W(e){var t,n,r,i,a,o=0,s=e.data;if(!e||0===e.size)return null;for(;s[0].length<19&&s.length>1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var u=t[7];192&u&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&u?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(g.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var c=(r=t[8])+9;if(e.size<=c)return null;e.size-=c;for(var p=new Uint8Array(e.size),d=0,f=s.length;d<f;d++){var h=(t=s[d]).byteLength;if(c){if(c>h){c-=h;continue}t=t.subarray(c),h-=c,c=0}p.set(t,o),o+=h}return n&&(n-=r+3),{data:p,pts:i,dts:a,len:n}}return null}function Y(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&g.logger.log(e.pts+"/"+e.dts+":"+e.debug)}const q=function(){function e(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=t,this.typeSupported=n}e.probe=function(t){var n=e.syncOffset(t);return n>0&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n),-1!==n},e.syncOffset=function(e){for(var t=e.length,n=Math.min(940,e.length-V)+1,r=0;r<n;){for(var i=!1,a=r;a<t&&71===e[a];a+=V)if(i||0!==K(e,a)||(i=!0),i&&a+V>n)return r;r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:c.RemuxerTrackIdConfig[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video"),this._audioTrack=e.createTrack("audio",i),this._id3Track=e.createTrack("id3"),this._txtTrack=e.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=n,this.videoCodec=r,this._duration=i},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._avcTrack,n=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},t.demux=function(t,n,a,o){var s;void 0===a&&(a=!1),void 0===o&&(o=!1),a||(this.sampleAes=null);var l=this._avcTrack,u=this._audioTrack,p=this._id3Track,d=this._txtTrack,f=l.pid,h=l.pesData,y=u.pid,v=p.pid,m=u.pesData,b=p.pesData,_=null,E=this.pmtParsed,k=this._pmtId,T=t.length;if(this.remainderData&&(T=(t=(0,c.appendUint8Array)(this.remainderData,t)).length,this.remainderData=null),T<V&&!o)return this.remainderData=t,{audioTrack:u,videoTrack:l,id3Track:p,textTrack:d};var A=Math.max(0,e.syncOffset(t));(T-=(T-A)%V)<t.byteLength&&!o&&(this.remainderData=new Uint8Array(t.buffer,T,t.buffer.byteLength-T));for(var w=0,S=A;S<T;S+=V)if(71===t[S]){var C=!!(64&t[S+1]),x=K(t,S),I=void 0;if((48&t[S+3])>>4>1){if((I=S+5+t[S+4])===S+V)continue}else I=S+4;switch(x){case f:C&&(h&&(s=W(h))&&this.parseAVCPES(l,d,s,!1),h={data:[],size:0}),h&&(h.data.push(t.subarray(I,S+V)),h.size+=S+V-I);break;case y:if(C){if(m&&(s=W(m)))switch(u.segmentCodec){case"aac":this.parseAACPES(u,s);break;case"mp3":this.parseMPEGPES(u,s)}m={data:[],size:0}}m&&(m.data.push(t.subarray(I,S+V)),m.size+=S+V-I);break;case v:C&&(b&&(s=W(b))&&this.parseID3PES(p,s),b={data:[],size:0}),b&&(b.data.push(t.subarray(I,S+V)),b.size+=S+V-I);break;case 0:C&&(I+=t[I]+1),k=this._pmtId=G(t,I);break;case k:C&&(I+=t[I]+1);var P=z(t,I,this.typeSupported,a);(f=P.avc)>0&&(l.pid=f),(y=P.audio)>0&&(u.pid=y,u.segmentCodec=P.segmentCodec),(v=P.id3)>0&&(p.pid=v),null===_||E||(g.logger.warn("MPEG-TS PMT found at "+S+" after unknown PID '"+_+"'. Backtracking to sync byte @"+A+" to parse all TS packets."),_=null,S=A-188),E=this.pmtParsed=!0;break;case 17:case 8191:break;default:_=x}}else w++;w>0&&this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"Found "+w+" TS packet/s that do not start with 0x47"}),l.pesData=h,u.pesData=m,p.pesData=b;var D={audioTrack:u,videoTrack:l,id3Track:p,textTrack:d};return o&&this.extractRemainingSamples(D),D},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.videoTrack,i=e.id3Track,a=e.textTrack,o=r.pesData,s=n.pesData,l=i.pesData;if(o&&(t=W(o))?(this.parseAVCPES(r,a,t,!0),r.pesData=null):r.pesData=o,s&&(t=W(s))){switch(n.segmentCodec){case"aac":this.parseAACPES(n,t);break;case"mp3":this.parseMPEGPES(n,t)}n.pesData=null}else null!=s&&s.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=s;l&&(t=W(l))?(this.parseID3PES(i,t),i.pesData=null):i.pesData=l},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new j(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.videoTrack;r.samples&&"aac"===r.segmentCodec?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._duration=0},t.parseAVCPES=function(e,t,n,r){var i,a=this,o=this.parseAVCNALu(e,n.data),s=this.avcSample,l=!1;n.data=null,s&&o.length&&!e.audFound&&(Y(s,e),s=this.avcSample=H(!1,n.pts,n.dts,"")),o.forEach((function(r){switch(r.type){case 1:i=!0,s||(s=a.avcSample=H(!0,n.pts,n.dts,"")),s.frame=!0;var o=r.data;if(l&&o.length>4){var u=new F(o).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(s.key=!0)}break;case 5:i=!0,s||(s=a.avcSample=H(!0,n.pts,n.dts,"")),s.key=!0,s.frame=!0;break;case 6:i=!0,(0,c.parseSEIMessageFromNALu)(r.data,1,n.pts,t.samples);break;case 7:if(i=!0,l=!0,!e.sps){var p=new F(r.data).readSPS();e.width=p.width,e.height=p.height,e.pixelRatio=p.pixelRatio,e.sps=[r.data],e.duration=a._duration;for(var d=r.data.subarray(1,4),f="avc1.",h=0;h<3;h++){var g=d[h].toString(16);g.length<2&&(g="0"+g),f+=g}e.codec=f}break;case 8:i=!0,e.pps||(e.pps=[r.data]);break;case 9:i=!1,e.audFound=!0,s&&Y(s,e),s=a.avcSample=H(!1,n.pts,n.dts,"");break;case 12:i=!0;break;default:i=!1,s&&(s.debug+="unknown NAL "+r.type+" ")}s&&i&&s.units.push(r)})),r&&s&&(Y(s,e),this.avcSample=null)},t.getLastNalUnit=function(e){var t,n,r=this.avcSample;if(r&&0!==r.units.length||(r=e[e.length-1]),null!==(t=r)&&void 0!==t&&t.units){var i=r.units;n=i[i.length-1]}return n},t.parseAVCNALu=function(e,t){var n,r,i=t.byteLength,a=e.naluState||0,o=a,s=[],l=0,u=-1,c=0;for(-1===a&&(u=0,c=31&t[0],a=0,l=1);l<i;)if(n=t[l++],a)if(1!==a)if(n)if(1===n){if(u>=0){var p={data:t.subarray(u,l-a-1),type:c};s.push(p)}else{var d=this.getLastNalUnit(e.samples);if(d&&(o&&l<=4-o&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-o)),(r=l-a-1)>0)){var f=new Uint8Array(d.data.byteLength+r);f.set(d.data,0),f.set(t.subarray(0,r),d.data.byteLength),d.data=f,d.state=0}}l<i?(u=l,c=31&t[l],a=0):a=-1}else a=0;else a=3;else a=n?0:2;else a=n?0:1;if(u>=0&&a>=0){var h={data:t.subarray(u,i),type:c,state:a};s.push(h)}if(0===s.length){var g=this.getLastNalUnit(e.samples);if(g){var y=new Uint8Array(g.data.byteLength+t.byteLength);y.set(g.data,0),y.set(t,g.data.byteLength),g.data=y}}return e.naluState=a,s},t.parseAACPES=function(e,t){var n,a,o,s,l,u=0,c=this.aacOverFlow,p=t.data;if(c){this.aacOverFlow=null;var d=c.missing,f=c.sample.unit.byteLength;if(-1===d){var h=new Uint8Array(f+p.byteLength);h.set(c.sample.unit,0),h.set(p,f),p=h}else{var y=f-d;c.sample.unit.set(p.subarray(0,d),y),e.samples.push(c.sample),u=c.missing}}for(n=u,a=p.length;n<a-1&&!b(p,n);n++);if(n===u||(n<a-1?(o="AAC PES did not start with ADTS header,offset:"+n,s=!1):(o="no ADTS header found in AAC PES",s=!0),g.logger.warn("parsing error:"+o),this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:s,reason:o}),!s)){if(E(e,this.observer,p,n,this.audioCodec),void 0!==t.pts)l=t.pts;else{if(!c)return void g.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var v=k(e.samplerate);l=c.sample.pts+v}for(var m,_=0;n<a;){if(n+=(m=T(e,p,n,l,_)).length,m.missing){this.aacOverFlow=m;break}for(_++;n<a-1&&!b(p,n);n++);}}},t.parseMPEGPES=function(e,t){var n=t.data,r=n.length,i=0,a=0,o=t.pts;if(void 0!==o)for(;a<r;)if(N(n,a)){var s=O(e,n,a,o,i);if(!s)break;a+=s.length,i++}else a++;else g.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},t.parseID3PES=function(e,t){if(void 0!==t.pts){var n=B({},t,{type:this._avcTrack?l.MetadataSchema.emsg:l.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}else g.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},e}();function X(e,t){return(X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const $=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,X(t,n);var i=r.prototype;return i.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(s.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(U(e,t))return g.logger.log("MPEG Audio sync word found !"),!0;return!1},i.canParse=function(e,t){return function(e,t){return M(e,t)&&4<=e.length-t}(e,t)},i.appendFrame=function(e,t,n){if(null!==this.basePTS)return O(e,t,n,this.basePTS,this.frameIndex)},r}(h);var Q=n(524),Z=n(923);function J(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n||"hev1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===Z.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}const ee=function(){function e(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndTime=null}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndTime=null},t.resetNextTimestamp=function(){this.lastEndTime=null},t.resetInitSegment=function(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment((0,c.patchEncyptionData)(e,r)),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=(0,c.parseInitSegment)(e);t||(t=J(r.audio,Z.ElementaryStreamTypes.AUDIO)),n||(n=J(r.video,Z.ElementaryStreamTypes.VIDEO));var i={};r.audio&&r.video?i.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?i.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?i.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:g.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},t.remux=function(e,t,n,r,i){var a,s=this.initPTS,l=this.lastEndTime,u={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};(0,o.isFiniteNumber)(l)||(l=this.lastEndTime=i||0);var p=t.samples;if(!p||!p.length)return u;var d={initPTS:void 0,timescale:1},f=this.initData;if(f&&f.length||(this.generateInitSegment(p),f=this.initData),!f||!f.length)return g.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),u;this.emitInitSegment&&(d.tracks=this.initTracks,this.emitInitSegment=!1);var h=(0,c.getStartDTS)(f,p);(0,o.isFiniteNumber)(s)||(this.initPTS=d.initPTS=s=h-i);var y=(0,c.getDuration)(p,f),v=e?h-s:l,m=v+y;(0,c.offsetStartDTS)(f,p,s),y>0?this.lastEndTime=m:(g.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var b=!!f.audio,_=!!f.video,E="";b&&(E+="audio"),_&&(E+="video");var k={data1:p,startPTS:v,startDTS:v,endPTS:m,endDTS:m,type:E,hasAudio:b,hasVideo:_,nb:1,dropped:0};u.audio="audio"===k.type?k:void 0,u.video="audio"!==k.type?k:void 0,u.initSegment=d;var T=null!=(a=this.initPTS)?a:0;return u.id3=(0,Q.flushTextTrackMetadataCueSamples)(n,i,T,T),r.samples.length&&(u.text=(0,Q.flushTextTrackUserdataCueSamples)(r,i,T)),u},e}();var te;try{te=self.performance.now.bind(self.performance)}catch(e){g.logger.debug("Unable to use Performance API on this environment"),te=self.Date.now}var ne=[{demux:C,remux:ee},{demux:q,remux:Q.default},{demux:w,remux:Q.default},{demux:$,remux:Q.default}],re=function(){function e(e,t,n,r,i){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,r){var i=this,a=n.transmuxing;a.executeStart=te();var o=new Uint8Array(e),s=this.currentTransmuxState,l=this.transmuxConfig;r&&(this.currentTransmuxState=r);var u=r||s,c=u.contiguous,p=u.discontinuity,d=u.trackSwitch,f=u.accurateTimeOffset,h=u.timeOffset,g=u.initSegmentChange,y=l.audioCodec,v=l.videoCodec,m=l.defaultInitPts,b=l.duration,_=l.initSegmentData,E=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(o,t);if(E&&"AES-128"===E.method){var k=this.getDecrypter();if(!k.isSync())return this.decryptionPromise=k.webCryptoDecrypt(o,E.key.buffer,E.iv.buffer).then((function(e){var t=i.push(e,null,n);return i.decryptionPromise=null,t})),this.decryptionPromise;var T=k.softwareDecrypt(o,E.key.buffer,E.iv.buffer);if(n.part>-1&&(T=k.flush()),!T)return a.executeEnd=te(),ie(n);o=new Uint8Array(T)}var A=this.needsProbing(p,d);A&&this.configureTransmuxer(o),(p||d||g||A)&&this.resetInitSegment(_,y,v,b,t),(p||g||A)&&this.resetInitialTimestamp(m),c||this.resetContiguity();var w=this.transmux(o,E,h,f,n),S=this.currentTransmuxState;return S.contiguous=!0,S.discontinuity=!1,S.trackSwitch=!1,a.executeEnd=te(),w},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=te();var a=this.decrypter,o=this.currentTransmuxState,s=this.decryptionPromise;if(s)return s.then((function(){return t.flush(e)}));var l=[],u=o.timeOffset;if(a){var c=a.flush();c&&l.push(this.push(c,null,e))}var p=this.demuxer,d=this.remuxer;if(!p||!d)return this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=te(),[ie(e)];var f=p.flush(u);return ae(f)?f.then((function(n){return t.flushRemux(l,n,e),l})):(this.flushRemux(l,f,e),l)},t.flushRemux=function(e,t,n){var r=t.audioTrack,i=t.videoTrack,a=t.id3Track,o=t.textTrack,s=this.currentTransmuxState,l=s.accurateTimeOffset,u=s.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var c=this.remuxer.remux(r,i,a,o,u,l,!0,this.id);e.push({remuxResult:c,chunkMeta:n}),n.transmuxing.executeEnd=te()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r,i){var a=this.demuxer,o=this.remuxer;a&&o&&(a.resetInitSegment(e,t,n,r),o.resetInitSegment(e,t,n,i))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.videoTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e){for(var t,n=this.config,r=this.observer,i=this.typeSupported,a=this.vendor,o=0,s=ne.length;o<s;o++)if(ne[o].demux.probe(e)){t=ne[o];break}t||(g.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),t={demux:C,remux:ee});var l=this.demuxer,u=this.remuxer,c=t.remux,p=t.demux;u&&u instanceof c||(this.remuxer=new c(r,n,i,a)),l&&l instanceof p||(this.demuxer=new p(r,n,i),this.probe=p.probe)},t.needsProbing=function(e,t){return!this.demuxer||!this.remuxer||e||t},t.getDecrypter=function(){var e=this.decrypter;return e||(e=this.decrypter=new a.default(this.config)),e},e}(),ie=function(e){return{remuxResult:{},chunkMeta:e}};function ae(e){return"then"in e&&e.then instanceof Function}var oe=function(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i},se=function(e,t,n,r,i,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=a}},973:(e,t,n)=>{"use strict";var r,i;n.r(t),n.d(t,{ErrorDetails:()=>i,ErrorTypes:()=>r}),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(r||(r={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown"}(i||(i={}))},851:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{Events:()=>r}),function(e){e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached"}(r||(r={}))},76:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Tr});var r,i=n(945),a=n(965),o=n(851),s=n(973),l=n(93),u=/^(\d+)x(\d+)$/,c=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,p=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=u.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(c.lastIndex=0;null!==(t=c.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}();function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}!function(e){e.ID="ID",e.CLASS="CLASS",e.START_DATE="START-DATE",e.DURATION="DURATION",e.END_DATE="END-DATE",e.END_ON_NEXT="END-ON-NEXT",e.PLANNED_DURATION="PLANNED-DURATION",e.SCTE35_OUT="SCTE35-OUT",e.SCTE35_IN="SCTE35-IN"}(r||(r={}));var f,h,g,y=function(){function e(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){var n=t.attr;for(var i in n)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==n[i]){l.logger.warn('DATERANGE tag attribute: "'+i+'" does not match for tags with ID: "'+e.ID+'"'),this._badValueForSameId=i;break}e=d(new p({}),n,e)}if(this.attr=e,this._startDate=new Date(e[r.START_DATE]),r.END_DATE in this.attr){var o=new Date(this.attr[r.END_DATE]);(0,a.isFiniteNumber)(o.getTime())&&(this._endDate=o)}}var t,n;return t=e,(n=[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}},{key:"duration",get:function(){if(r.DURATION in this.attr){var e=this.attr.decimalFloatingPoint(r.DURATION);if((0,a.isFiniteNumber)(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return r.PLANNED_DURATION in this.attr?this.attr.decimalFloatingPoint(r.PLANNED_DURATION):null}},{key:"endOnNext",get:function(){return this.attr.bool(r.END_ON_NEXT)}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&(0,a.isFiniteNumber)(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),v=n(923),m=function(){function e(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}var t,n;return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t,this.advanced=this.endSN>e.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&(0,a.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function b(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))}function _(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(function(e){return e.charCodeAt(0)}))}function E(e){switch(e){case h.FAIRPLAY:return f.FAIRPLAY;case h.PLAYREADY:return f.PLAYREADY;case h.WIDEVINE:return f.WIDEVINE;case h.CLEARKEY:return f.CLEARKEY}}function k(e){switch(e){case f.FAIRPLAY:return h.FAIRPLAY;case f.PLAYREADY:return h.PLAYREADY;case f.WIDEVINE:return h.WIDEVINE;case f.CLEARKEY:return h.CLEARKEY}}function T(e){var t=e.drmSystems,n=e.widevineLicenseUrl,r=t?[f.FAIRPLAY,f.WIDEVINE,f.PLAYREADY,f.CLEARKEY].filter((function(e){return!!t[e]})):[];return!r[f.WIDEVINE]&&n&&r.push(f.WIDEVINE),r}!function(e){e.CLEARKEY="org.w3.clearkey",e.FAIRPLAY="com.apple.fps",e.PLAYREADY="com.microsoft.playready",e.WIDEVINE="com.widevine.alpha"}(f||(f={})),function(e){e.CLEARKEY="org.w3.clearkey",e.FAIRPLAY="com.apple.streamingkeydelivery",e.PLAYREADY="com.microsoft.playready",e.WIDEVINE="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"}(h||(h={})),function(e){e.WIDEVINE="edef8ba979d64acea3c827dcd51d21ed"}(g||(g={}));var A="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null,w=n(63),S={},C=function(){function e(e,t,n,r,i){void 0===r&&(r=[1]),void 0===i&&(i=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e}e.clearKeyUriToKeyIdMap=function(){S={}};var t=e.prototype;return t.isSupported=function(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;switch(this.keyFormat){case"identity":return"SAMPLE-AES"===this.method;case h.FAIRPLAY:case h.WIDEVINE:case h.PLAYREADY:case h.CLEARKEY:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1},t.getDecryptData=function(t){if(!this.encrypted||!this.uri)return null;if("AES-128"===this.method&&this.uri&&!this.iv){"number"!=typeof t&&("AES-128"!==this.method||this.iv||l.logger.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),t=0);var n=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t}(t);return new e(this.method,this.uri,"identity",this.keyFormatVersions,n)}var r=function(e){var t,n,r=e.split(":"),i=null;if("data"===r[0]&&2===r.length){var a=r[1].split(";"),o=a[a.length-1].split(",");if(2===o.length){var s="base64"===o[0],l=o[1];s?(a.splice(-1,1),i=b(l)):(t=_(l).subarray(0,16),(n=new Uint8Array(16)).set(t,16-t.length),i=n)}}return i}(this.uri);if(r)switch(this.keyFormat){case h.WIDEVINE:this.pssh=r,r.length>=22&&(this.keyId=r.subarray(r.length-22,r.length-6));break;case h.PLAYREADY:var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=(0,w.mp4pssh)(i,null,r);var a=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),o=String.fromCharCode.apply(null,Array.from(a)),s=o.substring(o.indexOf("<"),o.length),u=(new DOMParser).parseFromString(s,"text/xml").getElementsByTagName("KID")[0];if(u){var c=u.childNodes[0]?u.childNodes[0].nodeValue:u.getAttribute("VALUE");if(c){var p=b(c).subarray(0,16);!function(e){var t=function(e,t,n){var r=e[t];e[t]=e[n],e[n]=r};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(p),this.keyId=p}}break;default:var d=r.subarray(0,16);if(16!==d.length){var f=new Uint8Array(16);f.set(d,16-d.length),d=f}this.keyId=d}if(!this.keyId||16!==this.keyId.byteLength){var g=S[this.uri];if(!g){var y=Object.keys(S).length%Number.MAX_SAFE_INTEGER;g=new Uint8Array(16),new DataView(g.buffer,12,4).setUint32(0,y),S[this.uri]=g}this.keyId=g}return this},e}(),x={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function I(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}function P(){return(P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var D=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+|#EXT-X-SESSION-KEY:([^\n\r]*)[\r\n]+/g,R=/#EXT-X-MEDIA:(.*)/g,O=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),L=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),M=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},e.convertAVC1ToAVCOTI=function(e){var t=e.split(".");if(t.length>2){var n=t.shift()+".";return(n+=parseInt(t.shift()).toString(16))+("000"+parseInt(t.shift()).toString(16)).slice(-4)}return e},e.resolve=function(e,t){return(0,i.buildAbsoluteURL)(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],a=[],o={},s=[],u=!1;for(D.lastIndex=0;null!=(r=D.exec(t));)if(r[1]){var c,d=new p(r[1]),f={attrs:d,bitrate:d.decimalInteger("AVERAGE-BANDWIDTH")||d.decimalInteger("BANDWIDTH"),name:d.NAME,url:e.resolve(r[2],n)},h=d.decimalResolution("RESOLUTION");h&&(f.width=h.width,f.height=h.height),U((d.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),f),f.videoCodec&&-1!==f.videoCodec.indexOf("avc1")&&(f.videoCodec=e.convertAVC1ToAVCOTI(f.videoCodec)),null!==(c=f.unknownCodecs)&&void 0!==c&&c.length||a.push(f),i.push(f)}else if(r[3]){var g=new p(r[3]);g["DATA-ID"]&&(u=!0,o[g["DATA-ID"]]=g)}else if(r[4]){var y=r[4],v=N(y,n);v.encrypted&&v.isSupported()?s.push(v):l.logger.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+y+'"')}return{levels:a.length>0&&a.length<i.length?a:i,sessionData:u?o:null,sessionKeys:s.length?s:null}},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(R.lastIndex=0;null!==(a=R.exec(t));){var l=new p(a[1]);if(l.TYPE===r){var u={attrs:l,bitrate:0,id:s++,groupId:l["GROUP-ID"],instreamId:l["INSTREAM-ID"],name:l.NAME||l.LANGUAGE||"",type:r,default:l.bool("DEFAULT"),autoselect:l.bool("AUTOSELECT"),forced:l.bool("FORCED"),lang:l.LANGUAGE,url:l.URI?e.resolve(l.URI,n):""};if(i.length){var c=e.findGroup(i,u.groupId)||i[0];F(u,c,"audioCodec"),F(u,c,"textCodec")}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,r,i){var o,s,u,c=new m(t),d=c.fragments,f=null,h=0,g=0,b=0,_=0,E=null,k=new v.Fragment(r,t),T=-1,A=!1;for(O.lastIndex=0,c.m3u8=e;null!==(o=O.exec(e));){A&&(A=!1,(k=new v.Fragment(r,t)).start=b,k.sn=h,k.cc=_,k.level=n,f&&(k.initSegment=f,k.rawProgramDateTime=f.rawProgramDateTime,f.rawProgramDateTime=null));var w=o[1];if(w){k.duration=parseFloat(w);var S=(" "+o[2]).slice(1);k.title=S||null,k.tagList.push(S?["INF",w,S]:["INF",w])}else if(o[3])(0,a.isFiniteNumber)(k.duration)&&(k.start=b,u&&V(k,u,c),k.sn=h,k.level=n,k.cc=_,k.urlId=i,d.push(k),k.relurl=(" "+o[3]).slice(1),j(k,E),E=k,b+=k.duration,h++,g=0,A=!0);else if(o[4]){var C=(" "+o[4]).slice(1);E?k.setByteRange(C,E):k.setByteRange(C)}else if(o[5])k.rawProgramDateTime=(" "+o[5]).slice(1),k.tagList.push(["PROGRAM-DATE-TIME",k.rawProgramDateTime]),-1===T&&(T=d.length);else{if(!(o=o[0].match(L))){l.logger.warn("No matches on slow regex match for level playlist!");continue}for(s=1;s<o.length&&void 0===o[s];s++);var x=(" "+o[s]).slice(1),I=(" "+o[s+1]).slice(1),D=o[s+2]?(" "+o[s+2]).slice(1):"";switch(x){case"PLAYLIST-TYPE":c.type=I.toUpperCase();break;case"MEDIA-SEQUENCE":h=c.startSN=parseInt(I);break;case"SKIP":var R=new p(I),M=R.decimalInteger("SKIPPED-SEGMENTS");if((0,a.isFiniteNumber)(M)){c.skippedSegments=M;for(var U=M;U--;)d.unshift(null);h+=M}var F=R.enumeratedString("RECENTLY-REMOVED-DATERANGES");F&&(c.recentlyRemovedDateranges=F.split("\t"));break;case"TARGETDURATION":c.targetduration=parseFloat(I);break;case"VERSION":c.version=parseInt(I);break;case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"#":(I||D)&&k.tagList.push(D?[I,D]:[I]);break;case"DISCONTINUITY":_++,k.tagList.push(["DIS"]);break;case"GAP":k.tagList.push([x]);break;case"BITRATE":k.tagList.push([x,I]);break;case"DATERANGE":var H=new p(I),K=new y(H,c.dateRanges[H.ID]);K.isValid||c.skippedSegments?c.dateRanges[K.id]=K:l.logger.warn('Ignoring invalid DATERANGE tag: "'+I+'"'),k.tagList.push(["EXT-X-DATERANGE",I]);break;case"DISCONTINUITY-SEQUENCE":_=parseInt(I);break;case"KEY":var G=N(I,t);if(G.isSupported()){if("NONE"===G.method){u=void 0;break}u||(u={}),u[G.keyFormat]&&(u=P({},u)),u[G.keyFormat]=G}else l.logger.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+I+'"');break;case"START":var z=new p(I).decimalFloatingPoint("TIME-OFFSET");(0,a.isFiniteNumber)(z)&&(c.startTimeOffset=z);break;case"MAP":var W=new p(I);if(k.duration){var Y=new v.Fragment(r,t);B(Y,W,n,u),f=Y,k.initSegment=f,f.rawProgramDateTime&&!k.rawProgramDateTime&&(k.rawProgramDateTime=f.rawProgramDateTime)}else B(k,W,n,u),f=k,A=!0;break;case"SERVER-CONTROL":var q=new p(I);c.canBlockReload=q.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=q.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&q.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=q.optionalFloat("PART-HOLD-BACK",0),c.holdBack=q.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var X=new p(I);c.partTarget=X.decimalFloatingPoint("PART-TARGET");break;case"PART":var $=c.partList;$||($=c.partList=[]);var Q=g>0?$[$.length-1]:void 0,Z=g++,J=new v.Part(new p(I),k,t,Z,Q);$.push(J),k.duration+=J.duration;break;case"PRELOAD-HINT":var ee=new p(I);c.preloadHint=ee;break;case"RENDITION-REPORT":var te=new p(I);c.renditionReports=c.renditionReports||[],c.renditionReports.push(te);break;default:l.logger.warn("line parsed but not handled: "+o)}}}E&&!E.relurl?(d.pop(),b-=E.duration,c.partList&&(c.fragmentHint=E)):c.partList&&(j(k,E),k.cc=_,c.fragmentHint=k,u&&V(k,u,c));var ne=d.length,re=d[0],ie=d[ne-1];if((b+=c.skippedSegments*c.targetduration)>0&&ne&&ie){c.averagetargetduration=b/ne;var ae=ie.sn;c.endSN="initSegment"!==ae?ae:0,c.live||(ie.endList=!0),re&&(c.startCC=re.cc)}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(b+=c.fragmentHint.duration),c.totalduration=b,c.endCC=_,T>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(d,T),c},e}();function N(e,t){var n,r,i=new p(e),a=null!=(n=i.enumeratedString("METHOD"))?n:"",o=i.URI,s=i.hexadecimalInteger("IV"),u=i.enumeratedString("KEYFORMATVERSIONS"),c=null!=(r=i.enumeratedString("KEYFORMAT"))?r:"identity";o&&i.IV&&!s&&l.logger.error("Invalid IV: "+i.IV);var d=o?M.resolve(o,t):"",f=(u||"1").split("/").map(Number).filter(Number.isFinite);return new C(a,d,c,f,s)}function U(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return function(e,t){var n=x[t];return!!n&&!0===n[e.slice(0,4)]}(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function F(e,t,n){var r=t[n];r&&(e[n]=r)}function j(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),(0,a.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function B(e,t,n,r){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=n,e.sn="initSegment",r&&(e.levelkeys=r),e.initSegment=null}function V(e,t,n){e.levelkeys=t;var r=n.encryptedFragments;r.length&&r[r.length-1].levelkeys===t||!Object.keys(t).some((function(e){return t[e].isCommonEncryption}))||r.push(e)}var H=n(308);function K(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}const G=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.startLoad=function(e){},t.stopLoad=function(){this.destroyInternalLoaders()},t.registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(o.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(o.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(o.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:H.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:H.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:H.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:H.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i,a,o,s=this.hls.config,u=this.getInternalLoader(e);if(u){var c=u.context;if(c&&c.url===e.url)return void l.logger.trace("[playlist-loader]: playlist request ongoing");l.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case H.PlaylistContextType.MANIFEST:n=s.manifestLoadingMaxRetry,r=s.manifestLoadingTimeOut,i=s.manifestLoadingRetryDelay,a=s.manifestLoadingMaxRetryTimeout;break;case H.PlaylistContextType.LEVEL:case H.PlaylistContextType.AUDIO_TRACK:case H.PlaylistContextType.SUBTITLE_TRACK:n=0,r=s.levelLoadingTimeOut;break;default:n=s.levelLoadingMaxRetry,r=s.levelLoadingTimeOut,i=s.levelLoadingRetryDelay,a=s.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===H.PlaylistContextType.LEVEL&&null!==e.level?o=this.hls.levels[e.level].details:e.type===H.PlaylistContextType.AUDIO_TRACK&&null!==e.id?o=this.hls.audioTracks[e.id].details:e.type===H.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(o=this.hls.subtitleTracks[e.id].details),o)){var p=o.partTarget,d=o.targetduration;p&&d&&(r=Math.min(1e3*Math.max(3*p,.8*d),r))}var f={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,f,h)},t.loadsuccess=function(e,t,n,r){void 0===r&&(r=null),this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var i=this.hls,a=e.data,s=K(e,n),u=M.parseMasterPlaylist(a,s),c=u.levels,d=u.sessionData,f=u.sessionKeys;if(c.length){var h=c.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=c.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),y=M.parseMasterPlaylistMedia(a,s,"AUDIO",h),v=M.parseMasterPlaylistMedia(a,s,"SUBTITLES",g),m=M.parseMasterPlaylistMedia(a,s,"CLOSED-CAPTIONS");y.length&&(y.some((function(e){return!e.url}))||!c[0].audioCodec||c[0].attrs.AUDIO||(l.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),y.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new p({}),bitrate:0,url:""}))),i.trigger(o.Events.MANIFEST_LOADED,{levels:c,audioTracks:y,subtitles:v,captions:m,url:s,stats:t,networkDetails:r,sessionData:d,sessionKeys:f})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,r){var i=this.hls,l=n.id,u=n.level,c=n.type,d=K(e,n),f=(0,a.isFiniteNumber)(l)?l:0,h=(0,a.isFiniteNumber)(u)?u:f,g=function(e){switch(e.type){case H.PlaylistContextType.AUDIO_TRACK:return H.PlaylistLevelType.AUDIO;case H.PlaylistContextType.SUBTITLE_TRACK:return H.PlaylistLevelType.SUBTITLE;default:return H.PlaylistLevelType.MAIN}}(n),y=M.parseLevelPlaylist(e.data,d,h,g,f);if(y.fragments.length){if(c===H.PlaylistContextType.MANIFEST){var v={attrs:new p({}),bitrate:0,details:y,name:"",url:d};i.trigger(o.Events.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:d,stats:t,networkDetails:r,sessionData:null,sessionKeys:null})}t.parsing.end=performance.now(),n.levelDetails=y,this.handlePlaylistLoaded(e,t,n,r)}else i.trigger(o.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:d,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===H.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),l.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var i=s.ErrorDetails.UNKNOWN,a=!1,u=this.getInternalLoader(e);switch(e.type){case H.PlaylistContextType.MANIFEST:i=n?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,a=!0;break;case H.PlaylistContextType.LEVEL:i=n?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,a=!1;break;case H.PlaylistContextType.AUDIO_TRACK:i=n?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,a=!1;break;case H.PlaylistContextType.SUBTITLE_TRACK:i=n?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,a=!1}u&&this.resetInternalLoader(e.type);var c={type:s.ErrorTypes.NETWORK_ERROR,details:i,fatal:a,url:e.url,loader:u,context:e,networkDetails:t};r&&(c.response=r),this.hls.trigger(o.Events.ERROR,c)},t.handlePlaylistLoaded=function(e,t,n,r){var i=n.type,a=n.level,s=n.id,l=n.groupId,u=n.loader,c=n.levelDetails,p=n.deliveryDirectives;if(null!=c&&c.targetduration){if(u)switch(c.live&&(u.getCacheAge&&(c.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(c.ageHeader)||(c.ageHeader=0)),i){case H.PlaylistContextType.MANIFEST:case H.PlaylistContextType.LEVEL:this.hls.trigger(o.Events.LEVEL_LOADED,{details:c,level:a||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:p});break;case H.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(o.Events.AUDIO_TRACK_LOADED,{details:c,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:p});break;case H.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(o.Events.SUBTITLE_TRACK_LOADED,{details:c,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:p})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();function z(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function W(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){l.logger.debug("[texttrack-utils]: "+n);var r=new self.TextTrackCue(t.startTime,t.endTime,t.text);r.id=t.id,e.addCue(r)}"disabled"===n&&(e.mode=n)}function Y(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function q(e,t,n,r){var i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var a=function(e,t,n){var r=[],i=function(e,t){if(t<e[0].startTime)return 0;var n=e.length-1;if(t>e[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(t<e[a].startTime)i=a-1;else{if(!(t>e[a].startTime&&r<n))return a;r=a+1}}return e[r].startTime-t<t-e[i].startTime?r:i}(e,t);if(i>-1)for(var a=i,o=e.length;a<o;a++){var s=e[a];if(s.startTime>=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}(e.cues,t,n),o=0;o<a.length;o++)r&&!r(a[o])||e.removeCue(a[o]);"disabled"===i&&(e.mode=i)}var X=n(181),$=n(856);function Q(){return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var Z=function(){var e=Q();try{new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function J(e,t){return e.getTime()/1e3-t}const ee=function(){function e(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}var t=e.prototype;return t.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},t._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},t._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},t.onMediaAttached=function(e,t){this.media=t.media},t.onMediaDetaching=function(){this.id3Track&&(Y(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},t.onManifestLoading=function(){this.dateRangeCuesAppended={}},t.createTrack=function(e){var t=this.getID3Track(e.textTracks);return t.mode="hidden",t},t.getID3Track=function(e){if(this.media){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return z(n,this.media),n}return this.media.addTextTrack("metadata","id3")}},t.onFragParsingMetadata=function(e,t){if(this.media){var n=this.hls.config,r=n.enableEmsgMetadataCues,i=n.enableID3MetadataCues;if(r||i){var a=t.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var o=Q(),s=0;s<a.length;s++){var l=a[s].type;if((l!==$.MetadataSchema.emsg||r)&&i){var u=X.getID3Frames(a[s].data);if(u){var c=a[s].pts,p=c+a[s].duration;p>Z&&(p=Z),p-c<=0&&(p=c+.25);for(var d=0;d<u.length;d++){var f=u[d];if(!X.isTimeStampFrame(f)){this.updateId3CueEnds(c);var h=new o(c,p,"");h.value=f,l&&(h.type=l),this.id3Track.addCue(h)}}}}}}}},t.updateId3CueEnds=function(e){var t,n=null===(t=this.id3Track)||void 0===t?void 0:t.cues;if(n)for(var r=n.length;r--;){var i=n[r];i.startTime<e&&i.endTime===Z&&(i.endTime=e)}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,i=t.type,a=this.id3Track,o=this.hls;if(o){var s=o.config,l=s.enableEmsgMetadataCues,u=s.enableID3MetadataCues;a&&(l||u)&&q(a,n,r,"audio"===i?function(e){return e.type===$.MetadataSchema.audioId3&&u}:"video"===i?function(e){return e.type===$.MetadataSchema.emsg&&l}:function(e){return e.type===$.MetadataSchema.audioId3&&u||e.type===$.MetadataSchema.emsg&&l})}},t.onLevelUpdated=function(e,t){var n=this,i=t.details;if(this.media&&i.hasProgramDateTime&&this.hls.config.enableDateRangeMetadataCues){var o=this.dateRangeCuesAppended,s=this.id3Track,l=i.dateRanges,u=Object.keys(l);if(s)for(var c=Object.keys(o).filter((function(e){return!u.includes(e)})),p=function(e){var t=c[e];Object.keys(o[t].cues).forEach((function(e){s.removeCue(o[t].cues[e])})),delete o[t]},d=c.length;d--;)p(d);var f=i.fragments[i.fragments.length-1];if(0!==u.length&&(0,a.isFiniteNumber)(null==f?void 0:f.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var h=f.programDateTime/1e3-f.start,g=Q(),y=function(e){var t=u[e],i=l[t],a=o[t],s=(null==a?void 0:a.cues)||{},c=(null==a?void 0:a.durationKnown)||!1,p=J(i.startDate,h),d=Z,f=i.endDate;if(f)d=J(f,h),c=!0;else if(i.endOnNext&&!c){var y=u.reduce((function(e,t){var n=l[t];return n.class===i.class&&n.id!==t&&n.startDate>i.startDate&&e.push(n),e}),[]).sort((function(e,t){return e.startDate.getTime()-t.startDate.getTime()}))[0];y&&(d=J(y.startDate,h),c=!0)}for(var v,m=Object.keys(i.attr),b=0;b<m.length;b++){var _=m[b];if(_!==r.ID&&_!==r.CLASS&&_!==r.START_DATE&&_!==r.DURATION&&_!==r.END_DATE&&_!==r.END_ON_NEXT){var E=s[_];if(E)c&&!a.durationKnown&&(E.endTime=d);else{var k=i.attr[_];E=new g(p,d,""),_!==r.SCTE35_OUT&&_!==r.SCTE35_IN||(v=k,k=Uint8Array.from(v.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer),E.value={key:_,data:k},E.type=$.MetadataSchema.dateRange,n.id3Track.addCue(E),s[_]=E}}}o[t]={cues:s,dateRange:i,durationKnown:c}},v=0;v<u.length;v++)y(v)}}},e}();var te,ne=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return t.timeupdate()},this.hls=e,this.config=e.config,this.registerListeners()}var t,n,r=e.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(o.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(o.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(o.Events.ERROR,this.onError)},r.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},r.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},r.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},r.onLevelUpdated=function(e,t){var n=t.details;this.levelDetails=n,n.advanced&&this.timeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(e,t){t.details===s.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,l.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},r.timeupdate=function(){var e=this.media,t=this.levelDetails;if(e&&t){this.currentTime=e.currentTime;var n=this.computeLatency();if(null!==n){this._latency=n;var r=this.config,i=r.lowLatencyMode,a=r.maxLiveSyncPlaybackRate;if(i&&1!==a){var o=this.targetLatency;if(null!==o){var s=n-o,l=s<Math.min(this.maxLatency,o+t.targetduration);if(t.live&&l&&s>.05&&this.forwardBufferLength>1){var u=Math.min(2,Math.max(1,a)),c=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(u,Math.max(1,c))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},r.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},r.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,u=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===u)&&(u=void 0!==a?a:o*r);var c=r;return u+Math.min(1*this.stallCount,c)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),re=["NONE","TYPE-0","TYPE-1","TYPE-2",null];!function(e){e.No="",e.Yes="YES",e.v2="v2"}(te||(te={}));var ie=function(){function e(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}return e.prototype.addDirectives=function(e){var t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href},e}(),ae=function(){function e(e){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[e.url],this.attrs=e.attrs,this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter((function(e){return e})).join(",").replace(/\.[^.,]+/g,"")}var t,n;return t=e,(n=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(e){var t=e%this.url.length;this._urlId!==t&&(this.details=void 0,this._urlId=t)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function oe(){return(oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function se(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function le(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function ue(e,t){var n=t.startPTS;if((0,a.isFiniteNumber)(n)){var r,i=0;t.sn>e.sn?(i=n-e.start,r=e):(i=e.start-n,r=t),r.duration!==i&&(r.duration=i)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function ce(e,t,n,r,i,o){r-n<=0&&(l.logger.warn("Fragment should have a positive duration",t),r=n+t.duration,o=i+t.duration);var s=n,u=r,c=t.startPTS,p=t.endPTS;if((0,a.isFiniteNumber)(c)){var d=Math.abs(c-n);(0,a.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(d,t.deltaPTS):t.deltaPTS=d,s=Math.max(n,c),n=Math.min(n,c),i=Math.min(i,t.startDTS),u=Math.min(r,p),r=Math.max(r,p),o=Math.max(o,t.endDTS)}t.duration=r-n;var f=n-t.start;t.start=t.startPTS=n,t.maxStartPTS=s,t.startDTS=i,t.endPTS=r,t.minEndPTS=u,t.endDTS=o;var h,g=t.sn;if(!e||g<e.startSN||g>e.endSN)return 0;var y=g-e.startSN,v=e.fragments;for(v[y]=t,h=y;h>0;h--)ue(v[h],v[h-1]);for(h=y;h<v.length-1;h++)ue(v[h],v[h+1]);return e.fragmentHint&&ue(v[v.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,f}function pe(e,t){var n=t.startSN+t.skippedSegments-e.startSN,r=e.fragments;n<0||n>=r.length||de(t,r[n].start)}function de(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r<n.length;r++)n[r].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}var fe=function(){function e(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=l.logger.log.bind(l.logger,t+":"),this.warn=l.logger.warn.bind(l.logger,t+":"),this.hls=e}var t=e.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.onError=function(e,t){!t.fatal||t.type!==s.ErrorTypes.NETWORK_ERROR&&t.type!==s.ErrorTypes.KEY_SYSTEM_ERROR||this.stopLoad()},t.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},t.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.requestScheduled=-1,this.loadPlaylist()},t.stopLoad=function(){this.canLoad=!1,this.clearTimer()},t.switchParams=function(e,t){var n=null==t?void 0:t.renditionReports;if(n)for(var r=0;r<n.length;r++){var i=n[r],a=void 0;try{a=new self.URL(i.URI,t.url).href}catch(e){l.logger.warn("Could not construct new URL for Rendition Report: "+e),a=i.URI||""}if(a===e.slice(-a.length)){var o=parseInt(i["LAST-MSN"])||(null==t?void 0:t.lastPartSn),s=parseInt(i["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){var u=Math.min(t.age-t.partTarget,t.targetduration);s>=0&&u>t.partTarget&&(s+=1)}return new ie(o,s>=0?s:void 0,te.No)}}},t.loadPlaylist=function(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,s=self.performance.now(),u=o.loading.first?Math.max(0,s-o.loading.first):0;if(i.advancedDateTime=Date.now()-u,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&function(e,t){for(var n=null,r=e.fragments,i=r.length-1;i>=0;i--){var o=r[i].initSegment;if(o){n=o;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var s,u,c,p,d,f=0;if(function(e,t,n){for(var r=t.skippedSegments,i=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(r?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,s=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,u=i;u<=a;u++){var c=l[o+u],p=s[u];r&&!p&&u<r&&(p=t.fragments[u]=c),c&&p&&n(c,p)}}(e,t,(function(e,r){e.relurl&&(f=e.cc-r.cc),(0,a.isFiniteNumber)(e.startPTS)&&(0,a.isFiniteNumber)(e.endPTS)&&(r.start=r.startPTS=e.startPTS,r.startDTS=e.startDTS,r.appendedPTS=e.appendedPTS,r.maxStartPTS=e.maxStartPTS,r.endPTS=e.endPTS,r.endDTS=e.endDTS,r.minEndPTS=e.minEndPTS,r.duration=e.endPTS-e.startPTS,r.duration&&(s=r),t.PTSKnown=t.alignedSliding=!0),r.elementaryStreams=e.elementaryStreams,r.loader=e.loader,r.stats=e.stats,r.urlId=e.urlId,e.initSegment&&(r.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=n)||void 0===t?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed){l.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var h=t.skippedSegments;h--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=(u=e.dateRanges,c=t.dateRanges,p=t.recentlyRemovedDateranges,d=oe({},u),p&&p.forEach((function(e){delete d[e]})),Object.keys(c).forEach((function(e){var t=new y(c[e].attr,d[e]);t.isValid?d[e]=t:l.logger.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(c[e].attr)+'"')})),d));var g=t.fragments;if(f){l.logger.warn("discontinuity sliding from playlist, take drift into account");for(var v=0;v<g.length;v++)g[v].cc+=f}t.skippedSegments&&(t.startCC=t.fragments[0].cc),function(e,t,n){if(e&&t)for(var r=0,i=0,a=e.length;i<=a;i++){var o=e[i],s=t[i+r];o&&s&&o.index===s.index&&o.fragment.sn===s.fragment.sn?(l=o,(u=s).elementaryStreams=l.elementaryStreams,u.stats=l.stats):r--}var l,u}(e.partList,t.partList),s?ce(t,s,s.startPTS,s.endPTS,s.startDTS,s.endDTS):pe(e,t),g.length&&(t.totalduration=t.edge-g[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;var m=t.advancedDateTime;if(t.advanced&&m){var b=t.edge;t.driftStart||(t.driftStartTime=m,t.driftStart=b),t.driftEndTime=m,t.driftEnd=b}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}(n,i),!this.canLoad||!i.live)return;var c,p=void 0,d=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var f=this.hls.config.lowLatencyMode,h=i.lastPartSn,g=i.endSN,v=i.lastPartIndex,m=h===g;-1!==v?(p=m?g+1:h,d=m?f?0:v:v+1):p=g+1;var b=i.age,_=b+i.ageHeader,E=Math.min(_-i.partTarget,1.5*i.targetduration);if(E>0){if(n&&E>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+E+" with playlist age: "+i.age),E=0;else{var k=Math.floor(E/i.targetduration);p+=k,void 0!==d&&(d+=Math.round(E%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+b.toFixed(2)+"s goal: "+E+" skip sn "+k+" to part "+d)}i.tuneInGoal=E}if(c=this.getDeliveryDirectives(i,t.deliveryDirectives,p,d),f||!m)return void this.loadPlaylist(c)}else c=this.getDeliveryDirectives(i,t.deliveryDirectives,p,d);var T=this.hls.mainForwardBufferInfo,A=T?T.end-T.len:0,w=function(e,t){void 0===t&&(t=1/0);var n=1e3*e.targetduration;if(e.updated){var r=e.fragments;if(r.length&&4*n>t){var i=1e3*r[r.length-1].duration;i<n&&(n=i)}}else n/=2;return Math.round(n)}(i,1e3*(i.edge-A));i.updated?s>this.requestScheduled+w&&(this.requestScheduled=o.loading.start):this.requestScheduled=-1,void 0!==p&&i.canBlockReload?this.requestScheduled=o.loading.first+w-(1e3*i.partTarget||1e3):this.requestScheduled=(-1===this.requestScheduled?s:this.requestScheduled)+w;var S=this.requestScheduled-s;S=Math.max(0,S),this.log("reload live playlist "+e+" in "+Math.round(S)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(c)}),S)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var i=function(e,t){var n=e.canSkipUntil,r=e.canSkipDateRanges,i=e.endSN;return n&&(void 0!==t?t-i:0)<n?r?te.v2:te.Yes:te.No}(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=te.No),new ie(n,r,i)},t.retryLoadingOrFail=function(e){var t,n=this,r=this.hls.config,i=this.retryCount<r.levelLoadingMaxRetry;if(i)if(this.requestScheduled=-1,this.retryCount++,e.details.indexOf("LoadTimeOut")>-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}();function he(){return(he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var ye,ve=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),me=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,"[level-controller]")||this)._levels=[],n._firstLevel=-1,n._startLevel=void 0,n.currentLevelIndex=-1,n.manualLevelIndex=-1,n.onParsedComplete=void 0,n._registerListeners(),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ge(t,n);var i,a,l=r.prototype;return l._registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.ERROR,this.onError,this)},l._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.ERROR,this.onError,this)},l.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,e.prototype.destroy.call(this)},l.startLoad=function(){this._levels.forEach((function(e){e.loadError=0})),e.prototype.startLoad.call(this)},l.onManifestLoaded=function(e,t){var n,r,i=[],a=[],l=[],u={},c=!1,p=!1,d=!1;if(t.levels.forEach((function(e){var t=e.attrs;c=c||!(!e.width||!e.height),p=p||!!e.videoCodec,d=d||!!e.audioCodec,ve&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0);var n=e.bitrate+"-"+e.attrs.RESOLUTION+"-"+e.attrs.CODECS;(r=u[n])?r.url.push(e.url):(r=new ae(e),u[n]=r,i.push(r)),t&&(t.AUDIO&&se(r,"audio",t.AUDIO),t.SUBTITLES&&se(r,"text",t.SUBTITLES))})),(c||p)&&d&&(i=i.filter((function(e){var t=e.videoCodec,n=e.width,r=e.height;return!!t||!(!n||!r)}))),i=i.filter((function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||I(t,"audio"))&&(!n||I(n,"video"))})),t.audioTracks&&le(a=t.audioTracks.filter((function(e){return!e.audioCodec||I(e.audioCodec,"audio")}))),t.subtitles&&le(l=t.subtitles),i.length>0){n=i[0].bitrate,i.sort((function(e,t){return e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"]?(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1:e.bitrate!==t.bitrate?e.bitrate-t.bitrate:e.attrs.SCORE!==t.attrs.SCORE?e.attrs.decimalFloatingPoint("SCORE")-t.attrs.decimalFloatingPoint("SCORE"):c&&e.height!==t.height?e.height-t.height:0})),this._levels=i;for(var f=0;f<i.length;f++)if(i[f].bitrate===n){this._firstLevel=f,this.log("manifest loaded, "+i.length+" level(s) found, first bitrate: "+n);break}var h=d&&!p,g={levels:i,audioTracks:a,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:d,video:p,altAudio:!h&&a.some((function(e){return!!e.url}))};this.hls.trigger(o.Events.MANIFEST_PARSED,g),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,reason:"no level with compatible codecs found in manifest"})},l.onError=function(t,n){var r,i;if(e.prototype.onError.call(this,t,n),!n.fatal){var a=n.context,o=this._levels[this.currentLevelIndex];if(a&&(a.type===H.PlaylistContextType.AUDIO_TRACK&&o.audioGroupIds&&a.groupId===o.audioGroupIds[o.urlId]||a.type===H.PlaylistContextType.SUBTITLE_TRACK&&o.textGroupIds&&a.groupId===o.textGroupIds[o.urlId]))this.redundantFailover(this.currentLevelIndex);else{var l,u=!1,c=!0;switch(n.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(n.frag){var p=n.frag.type===H.PlaylistLevelType.MAIN?n.frag.level:this.currentLevelIndex,d=this._levels[p];d?(d.fragmentError++,d.fragmentError>this.hls.config.fragLoadingMaxRetry&&(l=p)):l=p}break;case s.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:var f=o.attrs["HDCP-LEVEL"];f&&(this.hls.maxHdcpLevel=re[re.indexOf(f)-1],this.warn('Restricting playback to HDCP-LEVEL of "'+this.hls.maxHdcpLevel+'" or lower'));case s.ErrorDetails.FRAG_PARSING_ERROR:case s.ErrorDetails.KEY_SYSTEM_NO_SESSION:l=(null===(r=n.frag)||void 0===r?void 0:r.type)===H.PlaylistLevelType.MAIN?n.frag.level:this.currentLevelIndex,n.levelRetry=!1;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:a&&(a.deliveryDirectives&&(c=!1),l=a.level),u=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:l=null!=(i=n.level)?i:this.currentLevelIndex,u=!0}void 0!==l&&this.recoverLevel(n,l,u,c)}}},l.recoverLevel=function(e,t,n,r){var i=e.details,a=this._levels[t];if(a.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError<o)e.levelRetry=!0,this.redundantFailover(t);else if(-1===this.manualLevelIndex){for(var s=-1,l=this._levels,u=l.length;u--;){var c=(u+this.currentLevelIndex)%l.length;if(c!==this.currentLevelIndex&&0===l[c].loadError){s=c;break}}s>-1&&this.currentLevelIndex!==s?(this.warn(i+": switch to "+s),e.levelRetry=!0,this.hls.nextAutoLevel=s):!1===e.levelRetry&&(e.fatal=!0)}}},l.redundantFailover=function(e){var t=this._levels[e],n=t.url.length;if(n>1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},l.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===H.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},l.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,o.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},l.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,a=0;a<n.audioGroupIds.length;a++)if(n.audioGroupIds[a]===i){r=a;break}r!==n.urlId&&(n.urlId=r,this.startLoad())}},l.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.currentLevelIndex,r=this._levels[n];if(this.canLoad&&r&&r.url.length>0){var i=r.urlId,a=r.url[i];if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+n+(void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+i+" "+a),this.clearTimer(),this.hls.trigger(o.Events.LEVEL_LOADING,{url:a,level:n,id:i,deliveryDirectives:t||null})}},l.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(o.Events.LEVELS_UPDATED,{levels:r})},i=r,(a=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var i=this.currentLevelIndex,a=n[i],l=n[e];this.log("switching to level "+e+" from "+i),this.currentLevelIndex=e;var u=he({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete u._urlId,this.hls.trigger(o.Events.LEVEL_SWITCHING,u);var c=l.details;if(!c||c.live){var p=this.switchParams(l.uri,null==a?void 0:a.details);this.loadPlaylist(p)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(fe);!function(e){e.NOT_LOADED="NOT_LOADED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(ye||(ye={}));var be=function(){function e(e){this.activeFragment=null,this.activeParts=null,this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(o.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(o.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.endListFragments=this.timeRanges=this.activeFragment=this.activeParts=null},t.getAppendedFrag=function(e,t){if(t===H.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var a=r[i],o=a?a.end:n.appendedPTS;if(a.start<=e&&void 0!==o&&e<=o)return i>9&&(this.activeParts=r.slice(i-9)),a}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;this.timeRanges&&(this.timeRanges[e]=t),Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered||a.loaded){var o=a.range[e];o&&o.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=Ee(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var s=n[e],l=null!==i||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,l,s)}})),o.loaded=null,Object.keys(o.range).length?(o.buffered=!0,o.body.endList&&(this.endListFragments[o.body.type]=o)):this.removeFragment(o.body))}},t.fragBuffered=function(e){var t=Ee(e),n=this.fragments[t];n&&(n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=t?t.start:e.start,o=t?t.end:e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,u=0;u<r.length;u++){var c=r.start(u)-this.bufferPadding,p=r.end(u)+this.bufferPadding;if(l>=c&&s<=p){i.time.push({startPTS:Math.max(a,r.start(u)),endPTS:Math.min(o,r.end(u))});break}if(a<p&&o>c)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(u)),endPTS:Math.min(o,r.end(u))});else if(o<=c)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach((function(l){var u=s[l];u&&_e(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.isEndListAppended=function(e){var t=this.endListFragments[e];return void 0!==t&&(t.buffered||_e(t))},t.getState=function(e){var t=Ee(e),n=this.fragments[t];return n?n.buffered?_e(n)?ye.PARTIAL:ye.OK:ye.APPENDING:ye.NOT_LOADED},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,i=n.end(a)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=Ee(n);this.fragments[i]={body:n,loaded:t,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,a=t.timeRanges;if(r.type===H.PlaylistLevelType.MAIN)if(this.activeFragment!==r&&(this.activeFragment=r,r.appendedPTS=void 0),i){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(i)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach((function(e){var t=a[e];if(n.detectEvictedFragments(e,t),!i&&r.type===H.PlaylistLevelType.MAIN){var o=r.elementaryStreams[e];if(!o)return;for(var s=0;s<t.length;s++){var l=t.end(s);l<=o.endPTS&&l>o.startPTS?r.appendedPTS=Math.max(l,r.appendedPTS||0):r.appendedPTS=o.endPTS}}}))},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=Ee(e);return!!this.fragments[t]},t.removeFragmentsInRange=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a&&a.buffered){var o=a.body;o.type===n&&o.start<t&&o.end>e&&r.removeFragment(o)}}))},t.removeFragment=function(e){var t=Ee(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),e.appendedPTS=void 0,delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function _e(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function Ee(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}function ke(e){var t="function"==typeof Map?new Map:void 0;return(ke=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Te(e,arguments,Se(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),we(r,e)})(e)}function Te(e,t,n){return(Te=Ae()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&we(i,n.prototype),i}).apply(null,arguments)}function Ae(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function we(e,t){return(we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Se(e){return(Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ce=Math.pow(2,17),xe=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var i=this.config,a=i.fLoader,o=i.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var u=n.loader=e.loader=a?new a(i):new o(i),c=Ie(e),p={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:"initSegment"===e.sn?1/0:Ce};e.stats=u.stats,u.load(c,p,{onSuccess:function(t,i,a,o){n.resetLoader(e,u);var s=t.data;a.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(s.slice(0,16)),s=s.slice(16)),r({frag:e,part:null,payload:s,networkDetails:o})},onError:function(t,r,i){n.resetLoader(e,u),l(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:i}))},onAbort:function(t,r,i){n.resetLoader(e,u),l(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:i}))},onTimeout:function(t,r,i){n.resetLoader(e,u),l(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:i}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var i=this.config,a=i.fLoader,o=i.loader;return new Promise((function(l,u){r.loader&&r.loader.destroy();var c=r.loader=e.loader=a?new a(i):new o(i),p=Ie(e,t),d={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:Ce};t.stats=c.stats,c.load(p,d,{onSuccess:function(i,a,o,s){r.resetLoader(e,c),r.updateStatsFromPart(e,t);var u={frag:e,part:t,payload:i.data,networkDetails:s};n(u),l(u)},onError:function(n,i,a){r.resetLoader(e,c),u(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:a}))},onAbort:function(n,i,a){e.stats.aborted=t.stats.aborted,r.resetLoader(e,c),u(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:a}))},onTimeout:function(n,i,a){r.resetLoader(e,c),u(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:a}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,u=r.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function Ie(e,t){void 0===t&&(t=null);var n=t||e,r={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},i=n.byteRangeStartOffset,o=n.byteRangeEndOffset;if((0,a.isFiniteNumber)(i)&&(0,a.isFiniteNumber)(o)){var s,l=i,u=o;if("initSegment"===e.sn&&"AES-128"===(null===(s=e.decryptdata)||void 0===s?void 0:s.method)){var c=o-i;c%16&&(u=o+(16-c%16)),0!==i&&(r.resetIV=!0,l=i-16)}r.rangeStart=l,r.rangeEnd=u}return r}var Pe=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return(n=e.call.apply(e,[this].concat(i))||this).data=void 0,n.data=t,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,we(t,n),r}(ke(Error)),De=function(){function e(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}var t=e.prototype;return t.abort=function(){for(var e in this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e].loader;t&&t.abort()}},t.detach=function(){for(var e in this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}},t.destroy=function(){for(var e in this.detach(),this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}},t.createKeyLoadError=function(e,t,n,r){return void 0===t&&(t=s.ErrorDetails.KEY_LOAD_ERROR),new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:t,fatal:!1,frag:e,networkDetails:n})},t.loadClear=function(e,t){var n=this;if(this.emeController&&this.config.emeEnabled)for(var r=e.sn,i=e.cc,a=function(e){var a=t[e];if(i<=a.cc&&("initSegment"===r||r<a.sn))return n.emeController.selectKeySystemFormat(a).then((function(e){a.setKeyFormat(e)})),"break"},o=0;o<t.length&&"break"!==a(o);o++);},t.load=function(e){var t=this;return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then((function(n){return t.loadInternal(e,n)})):this.loadInternal(e)},t.loadInternal=function(e,t){var n,r;t&&e.setKeyFormat(t);var i=e.decryptdata;if(!i){var a=t?"Expected frag.decryptdata to be defined after setting format "+t:"Missing decryption data on fragment in onKeyLoading";return Promise.reject(this.createKeyLoadError(e,s.ErrorDetails.KEY_LOAD_ERROR,null,a))}var o=i.uri;if(!o)return Promise.reject(this.createKeyLoadError(e,s.ErrorDetails.KEY_LOAD_ERROR,null,'Invalid key URI: "'+o+'"'));var l,u=this.keyUriToKeyInfo[o];if(null!==(n=u)&&void 0!==n&&n.decryptdata.key)return i.key=u.decryptdata.key,Promise.resolve({frag:e,keyInfo:u});if(null!==(r=u)&&void 0!==r&&r.keyLoadPromise)switch(null===(l=u.mediaKeySessionContext)||void 0===l?void 0:l.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return u.keyLoadPromise.then((function(t){return i.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:u}}))}switch(u=this.keyUriToKeyInfo[o]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===i.keyFormat?this.loadKeyHTTP(u,e):this.loadKeyEME(u,e);case"AES-128":return this.loadKeyHTTP(u,e);default:return Promise.reject(this.createKeyLoadError(e,s.ErrorDetails.KEY_LOAD_ERROR,null,'Key supplied with unsupported METHOD: "'+i.method+'"'))}},t.loadKeyEME=function(e,t){var n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var r=this.emeController.loadKey(n);if(r)return(e.keyLoadPromise=r.then((function(t){return e.mediaKeySessionContext=t,n}))).catch((function(t){throw e.keyLoadPromise=null,t}))}return Promise.resolve(n)},t.loadKeyHTTP=function(e,t){var n=this,r=this.config,i=new(0,r.loader)(r);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((function(a,o){var l={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},u={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:r.fragLoadingRetryDelay,maxRetryDelay:r.fragLoadingMaxRetryTimeout,highWaterMark:0},c={onSuccess:function(e,t,r,i){var l=r.frag,u=r.keyInfo,c=r.url;if(!l.decryptdata||u!==n.keyUriToKeyInfo[c])return o(n.createKeyLoadError(l,s.ErrorDetails.KEY_LOAD_ERROR,i,"after key load, decryptdata unset or changed"));u.decryptdata.key=l.decryptdata.key=new Uint8Array(e.data),l.keyLoader=null,u.loader=null,a({frag:l,keyInfo:u})},onError:function(e,r,i){n.resetLoader(r),o(n.createKeyLoadError(t,s.ErrorDetails.KEY_LOAD_ERROR,i))},onTimeout:function(e,r,i){n.resetLoader(r),o(n.createKeyLoadError(t,s.ErrorDetails.KEY_LOAD_TIMEOUT,i))},onAbort:function(e,r,i){n.resetLoader(r),o(n.createKeyLoadError(t,s.ErrorDetails.INTERNAL_ABORTED,i))}};i.load(l,u,c)}))},t.resetLoader=function(e){var t=e.frag,n=e.keyInfo,r=e.url,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[r],i&&i.destroy()},e}(),Re=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}(),Oe={length:0,start:function(){return 0},end:function(){return 0}},Le=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i<r.length;i++)if(n>=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;i<a.length;i++)o.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(o,n,r)}}catch(e){}return{len:0,start:n,end:n,nextStart:void 0}},e.bufferedInfo=function(e,t,n){t=Math.max(0,t),e.sort((function(e,t){return e.start-t.start||t.end-e.end}));var r=[];if(n)for(var i=0;i<e.length;i++){var a=r.length;if(a){var o=r[a-1].end;e[i].start-o<n?e[i].end>o&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,u=t,c=t,p=0;p<r.length;p++){var d=r[p].start,f=r[p].end;if(t+n>=d&&t<f)u=d,l=(c=f)-t;else if(t+n<d){s=d;break}}return{len:l,start:u||0,end:c||0,nextStart:s}},e.getBuffered=function(e){try{return e.buffered}catch(e){return l.logger.log("failed to get media.buffered",e),Oe}},e}(),Me=function(e,t,n,r,i,a){void 0===r&&(r=0),void 0===i&&(i=-1),void 0===a&&(a=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=a};function Ne(e,t){for(var n=null,r=0,i=e.length;r<i;r++){var a=e[r];if(a&&a.cc===t){n=a;break}}return n}function Ue(e,t){if(e){var n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function Fe(e,t){for(var n=t.fragments,r=0,i=n.length;r<i;r++)Ue(n[r],e);t.fragmentHint&&Ue(t.fragmentHint,e),t.alignedSliding=!0}function je(e,t){if(e.hasProgramDateTime&&t.hasProgramDateTime){var n=e.fragments,r=t.fragments;if(n.length&&r.length){var i=r[Math.round(r.length/2)-1],a=Ne(n,i.cc)||n[Math.round(n.length/2)-1],o=i.programDateTime,s=a.programDateTime;null!==o&&null!==s&&Fe((s-o)/1e3-(a.start-i.start),e)}}}const Be=function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null};function Ve(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=null;if(e?i=t[e.sn-t[0].sn+1]||null:0===n&&0===t[0].start&&(i=t[0]),i&&0===He(n,r,i))return i;var a=Be(t,He.bind(null,n,r));return!a||a===e&&i?i:a}function He(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=0),n.start<=e&&n.start+n.duration>e)return 0;var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function Ke(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}var Ge=n(21);function ze(e,t){return(ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var We="STOPPED",Ye="IDLE",qe="KEY_LOADING",Xe="FRAG_LOADING",$e="FRAG_LOADING_WAITING_RETRY",Qe="WAITING_TRACK",Ze="PARSING",Je="PARSED",et="ENDED",tt="ERROR",nt="WAITING_INIT_PTS",rt="WAITING_LEVEL",it=function(e){var t,n;function r(t,n,r,i){var a;return(a=e.call(this)||this).hls=void 0,a.fragPrevious=null,a.fragCurrent=null,a.fragmentTracker=void 0,a.transmuxer=null,a._state=We,a.media=null,a.mediaBuffer=null,a.config=void 0,a.bitrateTest=!1,a.lastCurrentTime=0,a.nextLoadPosition=0,a.startPosition=0,a.loadedmetadata=!1,a.fragLoadError=0,a.retryDate=0,a.levels=null,a.fragmentLoader=void 0,a.keyLoader=void 0,a.levelLastLoaded=null,a.startFragRequested=!1,a.decrypter=void 0,a.initPTS=[],a.onvseeking=null,a.onvended=null,a.logPrefix="",a.log=void 0,a.warn=void 0,a.logPrefix=i,a.log=l.logger.log.bind(l.logger,i+":"),a.warn=l.logger.warn.bind(l.logger,i+":"),a.hls=t,a.fragmentLoader=new xe(t.config),a.keyLoader=r,a.fragmentTracker=n,a.config=t.config,a.decrypter=new Ge.default(t.config),t.on(o.Events.LEVEL_SWITCHING,a.onLevelSwitching,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a)),a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ze(t,n);var i,u,c=r.prototype;return c.doTick=function(){this.onTickEnd()},c.onTickEnd=function(){},c.startLoad=function(e){},c.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort();var e=this.fragCurrent;e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=We},c._streamEnded=function(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;var n=t.partList;if(null!=n&&n.length){var r=n[n.length-1];return Le.isBuffered(this.media,r.start+r.duration/2)}var i=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)},c.getLevelDetails=function(){var e;if(this.levels&&null!==this.levelLastLoaded)return null===(e=this.levels[this.levelLastLoaded])||void 0===e?void 0:e.details},c.onMediaAttached=function(e,t){var n=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.state===We&&this.startLoad(r.startPosition)},c.onMediaDetaching=function(){var e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,n=this.media,r=this.mediaBuffer,i=this.state,o=n?n.currentTime:0,s=Le.bufferInfo(r||n,o,e.maxBufferHole);if(this.log("media seeking to "+((0,a.isFiniteNumber)(o)?o.toFixed(3):o)+", state: "+i),this.state===et)this.resetLoadingState();else if(t){var l=e.maxFragLookUpTolerance,u=t.start-l,c=t.start+t.duration+l;if(!s.len||c<s.start||u>s.end){var p=o>c;(o<u||p)&&(p&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests()),this.resetLoadingState())}}n&&(this.lastCurrentTime=o),this.loadedmetadata||s.len||(this.nextLoadPosition=this.startPosition=o),this.tickImmediate()},c.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},c.onLevelSwitching=function(e,t){this.fragLoadError=0},c.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},c.onHandlerDestroyed=function(){this.state=We,this.hls.off(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,e.prototype.onHandlerDestroyed.call(this)},c.loadFragment=function(e,t,n){this._loadFragForPlayback(e,t,n)},c._loadFragForPlayback=function(e,t,n){var r=this;this._doFragLoad(e,t,n,(function(t){if(r.fragContextChanged(e))return r.warn("Fragment "+e.sn+(t.part?" p: "+t.part.index:"")+" of level "+e.level+" was dropped during download."),void r.fragmentTracker.removeFragment(e);e.stats.chunkCount++,r._handleFragmentLoadProgress(t)})).then((function(t){if(t){r.fragLoadError=0;var n=r.state;r.fragContextChanged(e)?(n===Xe||!r.fragCurrent&&n===Ze)&&(r.fragmentTracker.removeFragment(e),r.state=Ye):("payload"in t&&(r.log("Loaded fragment "+e.sn+" of level "+e.level),r.hls.trigger(o.Events.FRAG_LOADED,t)),r._handleFragmentLoadComplete(t))}})).catch((function(t){r.state!==We&&r.state!==tt&&(r.warn(t),r.resetFragmentLoading(e))}))},c.flushMainBuffer=function(e,t,n){if(void 0===n&&(n=null),e-t){var r={startOffset:e,endOffset:t,type:n};this.fragLoadError=0,this.hls.trigger(o.Events.BUFFER_FLUSHING,r)}},c._loadInitSegment=function(e,t){var n=this;this._doFragLoad(e,t).then((function(t){if(!t||n.fragContextChanged(e)||!n.levels)throw new Error("init load aborted");return t})).then((function(t){var r=n.hls,i=t.payload,a=e.decryptdata;if(i&&i.byteLength>0&&a&&a.key&&a.iv&&"AES-128"===a.method){var s=self.performance.now();return n.decrypter.decrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(n){var i=self.performance.now();return r.trigger(o.Events.FRAG_DECRYPTED,{frag:e,payload:n,stats:{tstart:s,tdecrypt:i}}),t.payload=n,t}))}return t})).then((function(t){var r=n.fragCurrent,i=n.hls,a=n.levels;if(!a)throw new Error("init load aborted, missing levels");a[e.level].details;var s=e.stats;n.state=Ye,n.fragLoadError=0,e.data=new Uint8Array(t.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),t.frag===r&&i.trigger(o.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),n.tick()})).catch((function(t){n.state!==We&&n.state!==tt&&(n.warn(t),n.resetFragmentLoading(e))}))},c.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},c.fragBufferedComplete=function(e,t){var n,r,i,a,o=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" (frag:["+(null!=(n=e.startPTS)?n:NaN).toFixed(3)+"-"+(null!=(r=e.endPTS)?r:NaN).toFixed(3)+"] > buffer:"+(o?function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+"-"+e.end(r).toFixed(3)+"]";return t}(Le.getBuffered(o)):"(detached)")+")"),this.state=Ye,o&&(!this.loadedmetadata&&e.type==H.PlaylistLevelType.MAIN&&o.buffered.length&&(null===(i=this.fragCurrent)||void 0===i?void 0:i.sn)===(null===(a=this.fragPrevious)||void 0===a?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},c.seekToStartPos=function(){},c._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,a=!i||0===i.length||i.some((function(e){return!e})),o=new Me(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},c._handleFragmentLoadProgress=function(e){},c._doFragLoad=function(e,t,n,r){var i,s=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");var l=null;if(!e.encrypted||null!==(i=e.decryptdata)&&void 0!==i&&i.key?!e.encrypted&&t.encryptedFragments.length&&this.keyLoader.loadClear(e,t.encryptedFragments):(this.log("Loading key for "+e.sn+" of ["+t.startSN+"-"+t.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level),this.state=qe,this.fragCurrent=e,l=this.keyLoader.load(e).then((function(e){if(!s.fragContextChanged(e.frag))return s.hls.trigger(o.Events.KEY_LOADED,e),s.state===qe&&(s.state=Ye),e})),this.hls.trigger(o.Events.KEY_LOADING,{frag:e}),this.throwIfFragContextChanged("KEY_LOADING")),n=Math.max(e.start,n||0),this.config.lowLatencyMode&&t){var u=t.partList;if(u&&r){n>e.end&&t.fragmentHint&&(e=t.fragmentHint);var c=this.getNextPart(u,e,n);if(c>-1){var p=u[c];return this.log("Loading part sn: "+e.sn+" p: "+p.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+c+"-"+(u.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=p.start+p.duration,this.state=Xe,this.hls.trigger(o.Events.FRAG_LOADING,{frag:e,part:u[c],targetBufferTime:n}),this.throwIfFragContextChanged("FRAG_LOADING parts"),l?l.then((function(t){return!t||s.fragContextChanged(t.frag)?null:s.doFragPartsLoad(e,u,c,r)})).catch((function(e){return s.handleFragLoadError(e)})):this.doFragPartsLoad(e,u,c,r).catch((function(e){return s.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(u,n))return Promise.resolve(null)}}this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),(0,a.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Xe,this.hls.trigger(o.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.throwIfFragContextChanged("FRAG_LOADING");var d=this.config.progressive;return d&&l?l.then((function(t){return!t||s.fragContextChanged(null==t?void 0:t.frag)?null:s.fragmentLoader.load(e,r)})).catch((function(e){return s.handleFragLoadError(e)})):Promise.all([this.fragmentLoader.load(e,d?r:void 0),l]).then((function(e){var t=e[0];return!d&&t&&r&&r(t),t})).catch((function(e){return s.handleFragLoadError(e)}))},c.throwIfFragContextChanged=function(e){if(null===this.fragCurrent)throw new Error("frag load aborted, context changed in "+e)},c.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,s){var l=[];!function n(u){var c=t[u];i.fragmentLoader.loadPart(e,c,r).then((function(r){l[c.index]=r;var s=r.part;i.hls.trigger(o.Events.FRAG_LOADED,r);var p=t[u+1];if(!p||p.fragment!==e)return a({frag:e,part:s,partsLoaded:l});n(u+1)})).catch(s)}(n)}))},c.handleFragLoadError=function(e){if("data"in e){var t=e.data;e.data&&t.details===s.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(o.Events.ERROR,t)}else this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,err:e,fatal:!0});return null},c._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===Ze){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||this.state===We||this.state===tt||(this.state=Ye)},c.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=t[n],o=i>-1?function(e,t,n){if(!e||!e.details)return null;var r=e.details.partList;if(r)for(var i=r.length;i--;){var a=r[i];if(a.index===n&&a.fragment.sn===t)return a}return null}(a,r,i):null,s=o?o.fragment:function(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t<r.startSN&&n&&n.sn===t?n:null)}(a,r,this.fragCurrent);return s?{frag:s,part:o,level:a}:null},c.bufferFragmentData=function(e,t,n,r){if(e&&this.state===Ze){var i=e.data1,a=e.data2,s=i;if(i&&a&&(s=(0,w.appendUint8Array)(i,a)),s&&s.length){var l={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:s};this.hls.trigger(o.Events.BUFFER_APPENDING,l),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},c.flushBufferGap=function(e){var t=this.media;if(t)if(Le.isBuffered(t,t.currentTime)){var n=t.currentTime,r=Le.bufferInfo(t,n,0),i=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),o=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}else this.flushMainBuffer(0,e.start)},c.getFwdBufferInfo=function(e,t){var n=this.config,r=this.getLoadPosition();if(!(0,a.isFiniteNumber)(r))return null;var i=Le.bufferInfo(e,r,n.maxBufferHole);if(0===i.len&&void 0!==i.nextStart){var o=this.fragmentTracker.getBufferedFrag(r,t);if(o&&i.nextStart<o.end)return Le.bufferInfo(e,r,Math.max(i.nextStart,n.maxBufferHole))}return i},c.getMaxBufferLength=function(e){var t,n=this.config;return t=e?Math.max(8*n.maxBufferSize/e,n.maxBufferLength):n.maxBufferLength,Math.min(t,n.maxMaxBufferLength)},c.reduceMaxBufferLength=function(e){var t=this.config,n=e||t.maxBufferLength;return t.maxMaxBufferLength>=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},c.getNextFragment=function(e,t){var n=t.fragments,r=n.length;if(!r)return null;var i,a=this.config,o=n[0].start;if(t.live){var s=a.initialLiveManifestSize;if(r<s)return this.warn("Not enough fragments to start playback (have: "+r+", need: "+s+")"),null;t.PTSKnown||this.startFragRequested||-1!==this.startPosition||(i=this.getInitialLiveFragment(t,n),this.startPosition=i?this.hls.liveSyncPosition||i.start:e)}else e<=o&&(i=n[0]);if(!i){var l=a.lowLatencyMode?t.partEnd:t.fragmentEnd;i=this.getFragmentAtPosition(e,l,t)}return this.mapToInitFragWhenRequired(i)},c.mapToInitFragWhenRequired=function(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment},c.getNextPart=function(e,t,n){for(var r=-1,i=!1,a=!0,o=0,s=e.length;o<s;o++){var l=e[o];if(a=a&&!l.independent,r>-1&&n<l.start)break;var u=l.loaded;u?r=-1:(i||l.independent||a)&&l.fragment===t&&(r=o),i=u}return r},c.loadedEndOfParts=function(e,t){var n=e[e.length-1];return n&&t>n.start&&n.loaded},c.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=function(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!(0,a.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var r=0;r<e.length;++r){var i=e[r];if(Ke(t,n,i))return i}return null}(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var o=t[i-e.startSN];n.cc===o.cc&&(r=o,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=function(e,t){return Be(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}(t,n.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var s=this.hls.liveSyncPosition;null!==s&&(r=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r},c.getFragmentAtPosition=function(e,t,n){var r,i=this.config,a=this.fragPrevious,o=n.fragments,s=n.endSN,l=n.fragmentHint,u=i.maxFragLookUpTolerance,c=!!(i.lowLatencyMode&&n.partList&&l);if(c&&l&&!this.bitrateTest&&(o=o.concat(l),s=l.sn),r=e<t?Ve(a,o,e,e>t-u?0:u):o[o.length-1]){var p=r.sn-n.startSN;if(this.fragmentTracker.getState(r)===ye.OK&&(a=r),a&&r.sn===a.sn&&!c&&a&&r.level===a.level){var d=o[p+1];r.sn<s&&this.fragmentTracker.getState(d)!==ye.OK?(this.log("SN "+r.sn+" just loaded, load next one: "+d.sn),r=d):r=null}}return r},c.synchronizeToLiveEdge=function(e){var t=this.config,n=this.media;if(n){var r=this.hls.liveSyncPosition,i=n.currentTime,a=e.fragments[0].start,o=e.edge,s=i>=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i<r||!s)){var l=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!s&&n.readyState<4||i<o-l)&&(this.loadedmetadata||(this.nextLoadPosition=r),n.readyState&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+o+", reset currentTime to : "+r.toFixed(3)),n.currentTime=r))}}},c.alignPlaylists=function(e,t){var n=this.levels,r=this.levelLastLoaded,i=this.fragPrevious,o=null!==r?n[r]:null,s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;var u=e.fragments[0].start,c=!t,p=e.alignedSliding&&(0,a.isFiniteNumber)(u);if(c||!p&&!u){!function(e,t,n){t&&(function(e,t,n){if(function(e,t,n){return!(!t.details||!(n.endCC>n.startCC||e&&e.cc<n.startCC))}(e,n,t)){var r=function(e,t,n){void 0===n&&(n=0);var r=e.fragments,i=t.fragments;if(i.length&&r.length){var a=Ne(r,i[0].cc);if(a&&(!a||a.startPTS))return a;l.logger.log("No frag in previous level to align on")}else l.logger.log("No fragments to align")}(n.details,t);r&&(0,a.isFiniteNumber)(r.start)&&(l.logger.log("Adjusting PTS using last level due to CC increase within current level "+t.url),Fe(r.start,t))}}(e,n,t),!n.alignedSliding&&t.details&&function(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var n=t.fragments[0].programDateTime,r=e.fragments[0].programDateTime,i=(r-n)/1e3+t.fragments[0].start;i&&(0,a.isFiniteNumber)(i)&&(l.logger.log("Adjusting PTS using programDateTime delta "+(r-n)+"ms, sliding:"+i.toFixed(3)+" "+e.url+" "),Fe(i,e))}}(n,t.details),n.alignedSliding||!t.details||n.skippedSegments||pe(t.details,n))}(i,o,e);var d=e.fragments[0].start;return this.log("Live playlist sliding: "+d.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" prev-sn: "+(i?i.sn:"na")+" fragments: "+s),d}return u},c.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},c.setStartPosition=function(e,t){var n=this.startPosition;if(n<t&&(n=-1),-1===n||-1===this.lastCurrentTime){var r=e.startTimeOffset;(0,a.isFiniteNumber)(r)?(n=t+r,r<0&&(n+=e.totalduration),n=Math.min(Math.max(t,n),t+e.totalduration),this.log("Start time offset "+r+" found in playlist, adjust startPosition to "+n),this.startPosition=n):e.live?n=this.hls.liveSyncPosition||t:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n},c.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},c.handleFragLoadAborted=function(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn("Fragment "+e.sn+(t?" part"+t.index:"")+" of level "+e.level+" was aborted"),this.resetFragmentLoading(e))},c.resetFragmentLoading=function(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===$e)||(this.state=Ye)},c.onFragmentOrKeyLoadError=function(e,t){if(t.fatal)return this.stopLoad(),void(this.state=tt);var n=this.config;if(t.chunkMeta){var r=this.getCurrentContext(t.chunkMeta);r&&(t.frag=r.frag,t.levelRetry=!0,this.fragLoadError=n.fragLoadingMaxRetry)}var i=t.frag;if(i&&i.type===e)if(this.fragCurrent,this.fragLoadError+1<=n.fragLoadingMaxRetry){this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition);var a=Math.min(Math.pow(2,this.fragLoadError)*n.fragLoadingRetryDelay,n.fragLoadingMaxRetryTimeout);this.warn("Fragment "+i.sn+" of "+e+" "+i.level+" failed to load, retrying in "+a+"ms"),this.retryDate=self.performance.now()+a,this.fragLoadError++,this.state=$e}else t.levelRetry?(e===H.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=Ye):(l.logger.error(t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.stopLoad(),this.state=tt)},c.afterBufferFlushed=function(e,t,n){if(e){var r=Le.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===et&&this.resetLoadingState()}},c.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Ye},c.resetStartWhenNotLoaded=function(e){if(!this.loadedmetadata){this.startFragRequested=!1;var t=this.levels?this.levels[e].details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},c.updateLevelTiming=function(e,t,n,r){var i=this,a=n.details;Object.keys(e.elementaryStreams).reduce((function(t,s){var l=e.elementaryStreams[s];if(l){var u=l.endPTS-l.startPTS;if(u<=0)return i.warn("Could not parse fragment "+e.sn+" "+s+" duration reliably ("+u+")"),t||!1;var c=r?0:ce(a,e,l.startPTS,l.endPTS,l.startDTS,l.endDTS);return i.hls.trigger(o.Events.LEVEL_PTS_UPDATED,{details:a,level:n,drift:c,type:s,frag:e,start:l.startPTS,end:l.endPTS}),!0}return t}),!1)||(this.warn("Found no media in fragment "+e.sn+" of level "+n.id+" resetting transmuxer to fallback to playlist timing"),this.resetTransmuxer()),this.state=Je,this.hls.trigger(o.Events.FRAG_PARSED,{frag:e,part:t})},c.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},i=r,(u=[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,u),Object.defineProperty(i,"prototype",{writable:!1}),r}(Re);function at(){return self.MediaSource||self.WebKitMediaSource}function ot(){return self.SourceBuffer||self.WebKitSourceBuffer}var st=function(){var e=ENTRY_MODULE,t={},n=function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports};n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(ENTRY_MODULE);return r.default||r}.toString().split("ENTRY_MODULE"),lt="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function ut(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function ct(e,t,r){var i={};i[r]=[];var a=t.toString().replace(/^"[^"]+"/,"function"),o=a.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||a.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!o)return i;for(var s,l=o[1],u=new RegExp("(\\\\n|\\W)"+ut(l)+lt,"g");s=u.exec(a);)"dll-reference"!==s[3]&&i[r].push(s[3]);for(u=new RegExp("\\("+ut(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)'+lt,"g");s=u.exec(a);)e[s[2]]||(i[r].push(s[1]),e[s[2]]=n(s[1]).m),i[s[2]]=i[s[2]]||[],i[s[2]].push(s[4]);for(var c,p=Object.keys(i),d=0;d<p.length;d++)for(var f=0;f<i[p[d]].length;f++)c=i[p[d]][f],isNaN(1*c)||(i[p[d]][f]=1*i[p[d]][f]);return i}function pt(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}function dt(e,t,n,r){var i=e[r].map((function(e){return'"'+e+'": '+t[r][e].toString().replace(/^"[^"]+"/,"function")})).join(",");return st[0]+"{"+i+"}"+st[1]+'"'+n+'"'+st[2]}var ft=n(544),ht=n(729),gt=n.n(ht),yt=at()||{isTypeSupported:function(){return!1}},vt=function(){function e(e,t,r,i){var a=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;var u=e.config;this.hls=e,this.id=t,this.useWorker=!!u.enableWorker,this.onTransmuxComplete=r,this.onFlush=i;var c=function(e,t){(t=t||{}).frag=a.frag,t.id=a.id,a.hls.trigger(e,t)};this.observer=new ht.EventEmitter,this.observer.on(o.Events.FRAG_DECRYPTED,c),this.observer.on(o.Events.ERROR,c);var p={mp4:yt.isTypeSupported("video/mp4"),mpeg:yt.isTypeSupported("audio/mpeg"),mp3:yt.isTypeSupported('audio/mp4; codecs="mp3"')},d=navigator.vendor;if(this.useWorker&&"undefined"!=typeof Worker){var f;l.logger.log("demuxing in webworker");try{f=this.worker=function(e,t){t=t||{};var r={main:n.m},i=t.all?{main:Object.keys(r.main)}:function(e,t){for(var n={main:[182]},r={main:[]},i={main:{}};pt(n);)for(var a=Object.keys(n),o=0;o<a.length;o++){var s=a[o],l=n[s].pop();if(i[s]=i[s]||{},!i[s][l]&&e[s][l]){i[s][l]=!0,r[s]=r[s]||[],r[s].push(l);for(var u=ct(e,e[s][l],s),c=Object.keys(u),p=0;p<c.length;p++)n[c[p]]=n[c[p]]||[],n[c[p]]=n[c[p]].concat(u[c[p]])}}return r}(r),a="";Object.keys(i).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;i[e][t];)t++;i[e].push(t),r[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+e+" = ("+dt(i,r,t,modules)+")();\n"})),a=a+"new (("+dt(i,r,182,"main")+")())(self);";var o=new window.Blob([a],{type:"text/javascript"}),s=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(o),l=new window.Worker(s);return l.objectURL=s,l}(),this.onwmsg=this.onWorkerMessage.bind(this),f.addEventListener("message",this.onwmsg),f.onerror=function(e){a.useWorker=!1,l.logger.warn("Exception in webworker, fallback to inline"),a.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},f.postMessage({cmd:"init",typeSupported:p,vendor:d,id:t,config:JSON.stringify(u)})}catch(e){l.logger.warn("Error in worker:",e),l.logger.error("Error while initializing DemuxerWorker, fallback to inline"),f&&self.URL.revokeObjectURL(f.objectURL),this.transmuxer=new ft.default(this.observer,p,u,d,t),this.worker=null}}else this.transmuxer=new ft.default(this.observer,p,u,d,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null,this.onwmsg=void 0;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},t.push=function(e,t,n,r,i,a,o,s,u,c){var p,d,f=this;u.transmuxing.start=self.performance.now();var h=this.transmuxer,g=this.worker,y=a?a.start:i.start,v=i.decryptdata,m=this.frag,b=!(m&&i.cc===m.cc),_=!(m&&u.level===m.level),E=m?u.sn-m.sn:-1,k=this.part?u.part-this.part.index:-1,T=0===E&&u.id>1&&u.id===(null==m?void 0:m.stats.chunkCount),A=!_&&(1===E||0===E&&(1===k||T&&k<=0)),w=self.performance.now();(_||E||0===i.stats.parsing.start)&&(i.stats.parsing.start=w),!a||!k&&A||(a.stats.parsing.start=w);var S=!(m&&(null===(p=i.initSegment)||void 0===p?void 0:p.url)===(null===(d=m.initSegment)||void 0===d?void 0:d.url)),C=new ft.TransmuxState(b,A,s,_,y,S);if(!A||b||S){l.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+b+"\n trackSwitch: "+_+"\n contiguous: "+A+"\n accurateTimeOffset: "+s+"\n timeOffset: "+y+"\n initSegmentChange: "+S);var x=new ft.TransmuxConfig(n,r,t,o,c);this.configureTransmuxer(x)}if(this.frag=i,this.part=a,g)g.postMessage({cmd:"demux",data:e,decryptdata:v,chunkMeta:u,state:C},e instanceof ArrayBuffer?[e]:[]);else if(h){var I=h.push(e,v,u,C);(0,ft.isPromise)(I)?(h.async=!0,I.then((function(e){f.handleTransmuxComplete(e)})).catch((function(e){f.transmuxerError(e,u,"transmuxer-interface push error")}))):(h.async=!1,this.handleTransmuxComplete(I))}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);(0,ft.isPromise)(i)||n.async?((0,ft.isPromise)(i)||(i=Promise.resolve(i)),i.then((function(n){t.handleFlushResult(n,e)})).catch((function(n){t.transmuxerError(n,e,"transmuxer-interface flush error")}))):this.handleFlushResult(i,e)}},t.transmuxerError=function(e,t,n){this.hls&&this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:n})},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":l.logger[t.data.logType]&&l.logger[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}(),mt=function(){function e(e,t,n,r){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},t.poll=function(e,t){var n=this.config,r=this.media,i=this.stalled;if(null!==r){var a=r.currentTime,o=r.seeking,s=this.seeking&&!o,u=!this.seeking&&o;if(this.seeking=o,a===e){if((u||s)&&(this.stalled=null),!(r.paused&&!o||r.ended||0===r.playbackRate)&&Le.getBuffered(r).length){var c=Le.bufferInfo(r,a,0),p=c.len>0,d=c.nextStart||0;if(p||d){if(o){var f=c.len>2,h=!d||t&&t.start<=a||d-a>2&&!this.fragmentTracker.getPartialFragment(a);if(f||h)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var g,y=Math.max(d,c.start||0)-a,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,m=(null==v||null===(g=v.details)||void 0===g?void 0:g.live)?2*v.details.targetduration:2;if(y>0&&y<=m)return void this._trySkipBufferHole(null)}var b=self.performance.now();if(null!==i){var _=b-i;if(o||!(_>=250)||(this._reportStall(c),this.media)){var E=Le.bufferInfo(r,a,n.maxBufferHole);this._tryFixBufferStall(E,_)}}else this.stalled=b}}}else if(this.moved=!0,null!==i){if(this.stallReported){var k=self.performance.now()-i;l.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media;if(null!==i){var a=i.currentTime,o=r.getPartialFragment(a);if(o&&(this._trySkipBufferHole(o)||!this.media))return;e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(l.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},t._reportStall=function(e){var t=this.hls,n=this.media;!this.stallReported&&n&&(this.stallReported=!0,l.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer ("+JSON.stringify(e)+")"),t.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e.len}))},t._trySkipBufferHole=function(e){var t=this.config,n=this.hls,r=this.media;if(null===r)return 0;for(var i=r.currentTime,a=0,u=Le.getBuffered(r),c=0;c<u.length;c++){var p=u.start(c);if(i+t.maxBufferHole>=a&&i<p){var d=Math.max(p+.05,r.currentTime+.1);return l.logger.warn("skipping hole, adjusting currentTime from "+i+" to "+d),this.moved=!0,this.stalled=null,r.currentTime=d,e&&n.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+d,frag:e}),d}a=u.end(c)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,r=this.nudgeRetry;if(null!==n){var i=n.currentTime;if(this.nudgeRetry++,r<e.nudgeMaxRetry){var a=i+(r+1)*e.nudgeOffset;l.logger.warn("Nudging 'currentTime' from "+i+" to "+a),n.currentTime=a,t.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else l.logger.error("Playhead still not moving while enough data buffered @"+i+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})}},e}();function bt(e,t){return(bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var _t=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t,n,r,"[stream-controller]")||this).audioCodecSwap=!1,i.gapController=null,i.level=-1,i._forceStartLoad=!1,i.altAudio=!1,i.audioOnly=!1,i.fragPlaying=null,i.onvplaying=null,i.onvseeked=null,i.fragLastKbps=0,i.couldBacktrack=!1,i.backtrackFragment=null,i.audioCodecSwitch=!1,i.videoBuffer=null,i._registerListeners(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,bt(t,n);var i,l,u=r.prototype;return u._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(o.Events.ERROR,this.onError,this),e.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(o.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},u._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(o.Events.ERROR,this.onError,this),e.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(o.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},u.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},u.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(n.config.testBandwidth&&this.levels.length>1?(r=0,this.bitrateTest=!0):r=n.nextAutoLevel),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=Ye,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=We},u.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},u.doTick=function(){switch(this.state){case Ye:this.doTickIdle();break;case rt:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=Ye;break}break;case $e:var i,a=self.performance.now(),o=this.retryDate;(!o||a>=o||null!==(i=this.media)&&void 0!==i&&i.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.level),this.state=Ye)}this.onTickEnd()},u.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},u.doTickIdle=function(){var e=this.hls,t=this.levelLastLoaded,n=this.levels,r=this.media,i=e.config,a=e.nextLoadLevel;if(null!==t&&(r||!this.startFragRequested&&i.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&n&&n[a]){var s=n[a],l=this.getMainFwdBufferInfo();if(null!==l){var u=this.getLevelDetails();if(u&&this._streamEnded(l,u)){var c={};return this.altAudio&&(c.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,c),void(this.state=et)}this.level=e.nextLoadLevel=a;var p=s.details;if(!p||this.state===rt||p.live&&this.levelLastLoaded!==a)return this.level=a,void(this.state=rt);if(!(l.len>=this.getMaxBufferLength(s.maxBitrate))){this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);var d=this.backtrackFragment?this.backtrackFragment.start:l.end,f=this.getNextFragment(d,p);if(this.couldBacktrack&&!this.fragPrevious&&f&&"initSegment"!==f.sn&&this.fragmentTracker.getState(f)!==ye.OK){var h,g=(null!=(h=this.backtrackFragment)?h:f).sn-p.startSN,y=p.fragments[g-1];y&&f.cc===y.cc&&(f=y,this.fragmentTracker.removeFragment(y))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(f&&this.fragmentTracker.getState(f)===ye.OK&&this.nextLoadPosition>d){var m=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO,b=(m===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,m,H.PlaylistLevelType.MAIN),f=this.getNextFragment(this.nextLoadPosition,p)}f&&(!f.initSegment||f.initSegment.data||this.bitrateTest||(f=f.initSegment),this.loadFragment(f,p,d))}}}},u.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);this.fragCurrent=t,a===ye.NOT_LOADED?"initSegment"===t.sn?this._loadInitSegment(t,n):this.bitrateTest?(this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t,n)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):a===ye.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},u.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,H.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},u.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,H.PlaylistLevelType.MAIN)},u.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},u.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},u.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(t.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,u=s.duration,c=Math.max(o.end,l+Math.min(Math.max(u-this.config.maxFragLookUpTolerance,.5*u),.75*u));this.flushMainBuffer(c,Number.POSITIVE_INFINITY)}}}},u.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&e.abortRequests(),this.state){case qe:case Xe:case $e:case Ze:case Je:this.state=Ye}this.nextLoadPosition=this.getLoadPosition()},u.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},u.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new mt(this.config,r,this.fragmentTracker,this.hls)},u.onMediaDetaching=function(){var t=this.media;t&&this.onvplaying&&this.onvseeked&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},u.onMediaPlaying=function(){this.tick()},u.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;(0,a.isFiniteNumber)(t)&&this.log("Media seeked to "+t.toFixed(3)),this.tick()},u.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(o.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null,this.backtrackFragment=null},u.onManifestParsed=function(e,t){var n,r,i,a=!1,o=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(a=!0),-1!==n.indexOf("mp4a.40.5")&&(o=!0))})),this.audioCodecSwitch=a&&o&&!("function"==typeof(null==(i=ot())||null===(r=i.prototype)||void 0===r?void 0:r.changeType)),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},u.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===Ye){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=rt)}},u.onLevelLoaded=function(e,t){var n,r=this.levels,i=t.level,a=t.details,s=a.totalduration;if(r){this.log("Level "+i+" loaded ["+a.startSN+","+a.endSN+"], cc ["+a.startCC+", "+a.endCC+"] duration:"+s);var l=this.fragCurrent;!l||this.state!==Xe&&this.state!==$e||l.level!==t.level&&l.loader&&(this.state=Ye,this.backtrackFragment=null,l.abortRequests());var u=r[i],c=0;if(a.live||null!==(n=u.details)&&void 0!==n&&n.live){if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed)return;c=this.alignPlaylists(a,u.details)}if(u.details=a,this.levelLastLoaded=i,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:a,level:i}),this.state===rt){if(this.waitForCdnTuneIn(a))return;this.state=Ye}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,c),this.tick()}else this.warn("Levels were reset while loading level "+i)},u._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,c=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(o),d=this.transmuxer=this.transmuxer||new vt(this.hls,H.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),f=r?r.index:-1,h=-1!==f,g=new Me(n.level,n.sn,n.stats.chunkCount,i.byteLength,f,h),y=this.initPTS[n.cc];d.push(i,c,p,l,n,r,s.totalduration,u,g,y)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},u.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;a&&(this.log("Switching to main audio track, cancel main fragment load"),a.abortRequests()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},u.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},u.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},u.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===H.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===Je&&(this.state=Ye));var i=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*i.total/(i.buffering.end-i.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},u.onError=function(e,t){if(t.type!==s.ErrorTypes.KEY_SYSTEM_ERROR)switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.FRAG_PARSING_ERROR:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(H.PlaylistLevelType.MAIN,t);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==tt&&(t.fatal?(this.warn(""+t.details),this.state=tt):t.levelRetry||this.state!==rt||(this.state=Ye));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===Ze||this.state===Je)){var n=!0,r=this.getFwdBufferInfo(this.media,H.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}else this.onFragmentOrKeyLoadError(H.PlaylistLevelType.MAIN,t)},u.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){if(this.loadedmetadata||!Le.getBuffered(e).length){var n=this.state!==Ye?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}},u.onFragLoadEmergencyAborted=function(){this.state=Ye,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},u.onBufferFlushed=function(e,t){var n=t.type;if(n!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,H.PlaylistLevelType.MAIN)}},u.onLevelsUpdated=function(e,t){this.levels=t.levels},u.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},u.seekToStartPos=function(){var e=this.media;if(e){var t=e.currentTime,n=this.startPosition;if(n>=0&&t<n){if(e.seeking)return void this.log("could not seek to "+n+", already seeking at "+t);var r=Le.getBuffered(e),i=(r.length?r.start(0):0)-n;i>0&&(i<this.config.maxBufferHole||i<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+i+" to match buffer start"),n+=i,this.startPosition=n),this.log("seek to target start position "+n+" from current time "+t),e.currentTime=n}}},u._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t},u._loadBitrateTestFrag=function(e,t){var n=this;e.bitrateTest=!0,this._doFragLoad(e,t).then((function(t){var r=n.hls;if(t&&!n.fragContextChanged(e)){n.fragLoadError=0,n.state=Ye,n.startFragRequested=!1,n.bitrateTest=!1;var i=e.stats;i.parsing.start=i.parsing.end=i.buffering.start=i.buffering.end=self.performance.now(),r.trigger(o.Events.FRAG_LOADED,t),e.bitrateTest=!1}}))},u._handleTransmuxComplete=function(e){var t,n="main",r=this.hls,i=e.remuxResult,s=e.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetStartWhenNotLoaded(s.level);var u=l.frag,c=l.part,p=l.level,d=i.video,f=i.text,h=i.id3,g=i.initSegment,y=p.details,m=this.altAudio?void 0:i.audio;if(!this.fragContextChanged(u)){if(this.state=Ze,g){g.tracks&&(this._bufferInitSegment(p,g.tracks,u,s),r.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:u,id:n,tracks:g.tracks}));var b=g.initPTS,_=g.timescale;(0,a.isFiniteNumber)(b)&&(this.initPTS[u.cc]=b,r.trigger(o.Events.INIT_PTS_FOUND,{frag:u,id:n,initPTS:b,timescale:_}))}if(d&&!1!==i.independent){if(y){var E=d.startPTS,k=d.endPTS,T=d.startDTS,A=d.endDTS;if(c)c.elementaryStreams[d.type]={startPTS:E,endPTS:k,startDTS:T,endDTS:A};else if(d.firstKeyFrame&&d.independent&&1===s.id&&(this.couldBacktrack=!0),d.dropped&&d.independent){var w=this.getMainFwdBufferInfo();if((w?w.end:this.getLoadPosition())+this.config.maxBufferHole<(d.firstKeyFramePTS?d.firstKeyFramePTS:E)-this.config.maxBufferHole)return void this.backtrack(u);u.setElementaryStreamInfo(d.type,u.start,k,u.start,A,!0)}u.setElementaryStreamInfo(d.type,E,k,T,A),this.backtrackFragment&&(this.backtrackFragment=u),this.bufferFragmentData(d,u,c,s)}}else if(!1===i.independent)return void this.backtrack(u);if(m){var S=m.startPTS,C=m.endPTS,x=m.startDTS,I=m.endDTS;c&&(c.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:S,endPTS:C,startDTS:x,endDTS:I}),u.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,S,C,x,I),this.bufferFragmentData(m,u,c,s)}if(y&&null!=h&&null!==(t=h.samples)&&void 0!==t&&t.length){var P={id:n,frag:u,details:y,samples:h.samples};r.trigger(o.Events.FRAG_PARSING_METADATA,P)}if(y&&f){var D={id:n,frag:u,details:y,samples:f.samples};r.trigger(o.Events.FRAG_PARSING_USERDATA,D)}}},u._bufferInitSegment=function(e,t,n,r){var i=this;if(this.state===Ze){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;var a=t.audio,s=t.video,l=t.audiovideo;if(a){var u=e.audioCodec,c=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==a.metadata.channelCount&&-1===c.indexOf("firefox")&&(u="mp4a.40.5")),-1!==c.indexOf("android")&&"audio/mpeg"!==a.container&&(u="mp4a.40.2",this.log("Android: force audio codec to "+u)),e.audioCodec&&e.audioCodec!==u&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+u+'"'),a.levelCodec=u,a.id="main",this.log("Init audio buffer, container:"+a.container+", codecs[selected/level/parsed]=["+(u||"")+"/"+(e.audioCodec||"")+"/"+a.codec+"]")}s&&(s.levelCodec=e.videoCodec,s.id="main",this.log("Init video buffer, container:"+s.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+s.codec+"]")),l&&this.log("Init audiovideo buffer, container:"+l.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+l.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,t),Object.keys(t).forEach((function(e){var a=t[e].initSegment;null!=a&&a.byteLength&&i.hls.trigger(o.Events.BUFFER_APPENDING,{type:e,data:a,frag:n,part:null,chunkMeta:r,parent:n.type})})),this.tick()}},u.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,H.PlaylistLevelType.MAIN)},u.backtrack=function(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Ye},u.checkFragmentChanged=function(){var e=this.media,t=null;if(e&&e.readyState>1&&!1===e.seeking){var n=e.currentTime;if(Le.isBuffered(e,n)?t=this.getAppendedFrag(n):Le.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.fragPlaying=t,this.hls.trigger(o.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}))}}},i=r,(l=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}},{key:"currentProgramDateTime",get:function(){var e=this.media;if(e){var t=e.currentTime,n=this.currentFrag;if(n&&(0,a.isFiniteNumber)(t)&&(0,a.isFiniteNumber)(n.programDateTime)){var r=n.programDateTime+1e3*(t-n.start);return new Date(r)}}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,l),Object.defineProperty(i,"prototype",{writable:!1}),r}(it);const Et=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}(),kt=function(){function e(e,t,n){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Et(e),this.fast_=new Et(t)}var t=e.prototype;return t.update=function(e,t){var n=this.slow_,r=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new Et(e,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==t&&(this.fast_=new Et(t,r.getEstimate(),r.getTotalWeight()))},t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}(),Tt=function(){function e(e){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;var t=e.config;this.bwEstimator=new kt(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}var t,n,r=e.prototype;return r.registerListeners=function(){var e=this.hls;e.on(o.Events.FRAG_LOADING,this.onFragLoading,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e.off(o.Events.FRAG_LOADING,this.onFragLoading,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},r.onFragLoading=function(e,t){var n,r=t.frag;r.type===H.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=r,this.partCurrent=null!=(n=t.part)?n:null,this.timer=self.setInterval(this.onCheck,100)))},r.onLevelLoaded=function(e,t){var n=this.hls.config;t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},r._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.autoLevelEnabled,i=n.media;if(e&&i){var s=t?t.stats:e.stats,u=t?t.duration:e.duration;if(s.aborted||s.loaded&&s.loaded===s.total||0===e.level)return this.clearTimer(),void(this._nextAutoLevel=-1);if(r&&!i.paused&&i.playbackRate&&i.readyState){var c=n.mainForwardBufferInfo;if(null!==c){var p=performance.now()-s.loading.start,d=Math.abs(i.playbackRate);if(!(p<=500*u/d)){var f=s.loaded&&s.loading.first,h=this.bwEstimator.getEstimate(),g=n.levels,y=n.minAutoLevel,v=g[e.level],m=s.total||Math.max(s.loaded,Math.round(u*v.maxBitrate/8)),b=f?1e3*s.loaded/p:0,_=b?(m-s.loaded)/b:8*m/h,E=c.len/d;if(!(_<=E)){var k,T=Number.POSITIVE_INFINITY;for(k=e.level-1;k>y;k--){var A=g[k].maxBitrate;if((T=b?u*A/(6.4*b):u*A/h)<E)break}T>=_||(l.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+k+"\n Current BW estimate: "+((0,a.isFiniteNumber)(h)?(h/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+_.toFixed(3)+" s\n Estimated load time for the next fragment: "+T.toFixed(3)+" s\n Time to underbuffer: "+E.toFixed(3)+" s"),n.nextLoadLevel=k,f&&this.bwEstimator.sample(p,s.loaded),this.clearTimer(),(e.loader||e.keyLoader)&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),n.trigger(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:s}))}}}}}},r.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if(n.type===H.PlaylistLevelType.MAIN&&(0,a.isFiniteNumber)(n.sn)){var i=r?r.stats:n.stats,s=r?r.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var l=this.hls.levels[n.level],u=(l.loaded?l.loaded.bytes:0)+i.loaded,c=(l.loaded?l.loaded.duration:0)+s;l.loaded={bytes:u,duration:c},l.realBitrate=Math.round(8*u/c)}if(n.bitrateTest){var p={stats:i,frag:n,part:r,id:n.type};this.onFragBuffered(o.Events.FRAG_BUFFERED,p)}}},r.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===H.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},r.onError=function(e,t){var n;if((null===(n=t.frag)||void 0===n?void 0:n.type)===H.PlaylistLevelType.MAIN){if(t.type===s.ErrorTypes.KEY_SYSTEM_ERROR)return void this.clearTimer();switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.clearTimer()}}},r.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},r.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,o=n.media,s=t?t.duration:e?e.duration:0,u=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,p=n.mainForwardBufferInfo,d=(p?p.len:0)/u,f=this.findBestLevel(c,a,r,d,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(f>=0)return f;l.logger.trace((d?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var h=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,y=i.abrBandWidthUpFactor;if(!d){var v=this.bitrateTestDelay;v&&(h=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-v,l.logger.trace("bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*h)+" ms"),g=y=1)}return f=this.findBestLevel(c,a,r,d+h,g,y),Math.max(f,0)},r.findBestLevel=function(e,t,n,r,i,o){for(var s,u=this.fragCurrent,c=this.partCurrent,p=this.lastLoadedFragLevel,d=this.hls.levels,f=d[p],h=!(null==f||null===(s=f.details)||void 0===s||!s.live),g=null==f?void 0:f.codecSet,y=c?c.duration:u?u.duration:0,v=n;v>=t;v--){var m=d[v];if(m&&(!g||m.codecSet===g)){var b,_=m.details,E=(c?null==_?void 0:_.partTarget:null==_?void 0:_.averagetargetduration)||y;b=v<=p?i*e:o*e;var k=d[v].maxBitrate,T=k*E/b;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(b)+"/"+k+"/"+E+"/"+r+"/"+T),b>k&&(0===T||!(0,a.isFiniteNumber)(T)||h&&!this.bitrateTestDelay||T<r))return v}}return-1},t=e,(n=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(-1!==e&&!t.canEstimate())return e;var n=this.getNextABRAutoLevel();return-1!==e&&this.hls.levels[n].loadError?e:(-1!==e&&(n=Math.min(e,n)),n)},set:function(e){this._nextAutoLevel=e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();var At=function(){function e(){this.chunks=[],this.dataLength=0}var t=e.prototype;return t.push=function(e){this.chunks.push(e),this.dataLength+=e.length},t.flush=function(){var e,t=this.chunks,n=this.dataLength;return t.length?(e=1===t.length?t[0]:function(e,t){for(var n=new Uint8Array(t),r=0,i=0;i<e.length;i++){var a=e[i];n.set(a,r),r+=a.length}return n}(t,n),this.reset(),e):new Uint8Array(0)},t.reset=function(){this.chunks.length=0,this.dataLength=0},e}();function wt(){return(wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function St(e,t){return(St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const Ct=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t,n,r,"[audio-stream-controller]")||this).videoBuffer=null,i.videoTrackCC=-1,i.waitingVideoCC=-1,i.audioSwitch=!1,i.trackId=-1,i.waitingData=null,i.mainDetails=null,i.bufferFlushed=!1,i.cachedTrackLoadedData=null,i._registerListeners(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,St(t,n);var i=r.prototype;return i.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},i._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(o.Events.ERROR,this.onError,this),e.on(o.Events.BUFFER_RESET,this.onBufferReset,this),e.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},i._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(o.Events.ERROR,this.onError,this),e.off(o.Events.BUFFER_RESET,this.onBufferReset,this),e.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},i.onInitPtsFound=function(e,t){var n=t.frag,r=t.id,i=t.initPTS;if("main"===r){var a=n.cc;this.initPTS[n.cc]=i,this.log("InitPTS for cc: "+a+" found from main: "+i),this.videoTrackCC=a,this.state===nt&&this.tick()}},i.startLoad=function(e){if(!this.levels)return this.startPosition=e,void(this.state=We);var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t,this.state=Ye):(this.loadedmetadata=!1,this.state=Qe),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},i.doTick=function(){switch(this.state){case Ye:this.doTickIdle();break;case Qe:var t,n=this.levels,r=this.trackId,i=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=nt}break;case $e:var a,o=performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=Ye);break;case nt:var l=this.waitingData;if(l){var u=l.frag,c=l.part,p=l.cache,d=l.complete;if(void 0!==this.initPTS[u.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=Xe;var f={frag:u,part:c,payload:p.flush(),networkDetails:null};this._handleFragmentLoadProgress(f),d&&e.prototype._handleFragmentLoadComplete.call(this,f)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log("Waiting fragment cc ("+u.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var h=this.getLoadPosition(),g=Le.bufferInfo(this.mediaBuffer,h,this.config.maxBufferHole);He(g.end,this.config.maxFragLookUpTolerance,u)<0&&(this.log("Waiting fragment cc ("+u.cc+") @ "+u.start+" cancelled because another fragment at "+g.end+" is needed"),this.clearWaitingFragment())}}else this.state=Ye}this.onTickEnd()},i.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Ye)},i.resetLoadingState=function(){this.clearWaitingFragment(),e.prototype.resetLoadingState.call(this)},i.onTickEnd=function(){var e=this.media;e&&e.readyState&&(this.lastCurrentTime=e.currentTime)},i.doTickIdle=function(){var e=this.hls,t=this.levels,n=this.media,r=this.trackId,i=e.config;if(t&&t[r]&&(n||!this.startFragRequested&&i.startFragPrefetch)){var a=t[r].details;if(!a||a.live&&this.levelLastLoaded!==r||this.waitForCdnTuneIn(a))this.state=Qe;else{var s=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&s&&(this.bufferFlushed=!1,this.afterBufferFlushed(s,v.ElementaryStreamTypes.AUDIO,H.PlaylistLevelType.AUDIO));var l=this.getFwdBufferInfo(s,H.PlaylistLevelType.AUDIO);if(null!==l){var u=this.audioSwitch;if(!u&&this._streamEnded(l,a))return e.trigger(o.Events.BUFFER_EOS,{type:"audio"}),void(this.state=et);var c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,H.PlaylistLevelType.MAIN);if(!(l.len>=this.getMaxBufferLength(null==c?void 0:c.len))||u){var p=a.fragments[0].start,d=l.end;if(u&&n){var f=this.getLoadPosition();d=f,a.PTSKnown&&f<p&&(l.end>p||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=p+.05)}if(!(c&&d>c.end+a.targetduration)&&(c&&c.len||!l.len)){var h=this.getNextFragment(d,a);h?this.loadFragment(h,a,d):this.bufferFlushed=!0}}}}}},i.getMaxBufferLength=function(t){var n=e.prototype.getMaxBufferLength.call(this);return t?Math.max(n,t):n},i.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},i.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new ae(e)}))},i.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;r&&r.abortRequests(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=Ye):this.state=We,this.tick()},i.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},i.onLevelLoaded=function(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(o.Events.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},i.onAudioTrackLoaded=function(e,t){var n;if(null!=this.mainDetails){var r=this.levels,i=t.details,a=t.id;if(r){this.log("Track "+a+" loaded ["+i.startSN+","+i.endSN+"],duration:"+i.totalduration);var o=r[a],s=0;if(i.live||null!==(n=o.details)&&void 0!==n&&n.live){var l=this.mainDetails;if(i.fragments[0]||(i.deltaUpdateFailed=!0),i.deltaUpdateFailed||!l)return;!o.details&&i.hasProgramDateTime&&l.hasProgramDateTime?(je(i,l),s=i.fragments[0].start):s=this.alignPlaylists(i,o.details)}o.details=i,this.levelLastLoaded=a,this.startFragRequested||!this.mainDetails&&i.live||this.setStartPosition(o.details,s),this.state!==Qe||this.waitForCdnTuneIn(i)||(this.state=Ye),this.tick()}else this.warn("Audio tracks were reset while loading level "+a)}else this.cachedTrackLoadedData=t},i._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.config,o=this.trackId,s=this.levels;if(s){var l=s[o],u=l.details,c=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2",p=this.transmuxer;p||(p=this.transmuxer=new vt(this.hls,H.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var d=this.initPTS[n.cc],f=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==d){var h=r?r.index:-1,g=-1!==h,y=new Me(n.level,n.sn,n.stats.chunkCount,i.byteLength,h,g);p.push(i,f,c,"",n,r,u.totalduration,!1,y,d)}else this.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+u.startSN+" ,"+u.endSN+"],track "+o),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new At,complete:!1}).cache.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=nt}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},i._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},i.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},i.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)},i.onFragBuffered=function(e,t){var n,r=t.frag,i=t.part;r.type===H.PlaylistLevelType.AUDIO?this.fragContextChanged(r)?this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==r.sn&&(this.fragPrevious=r,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(r,i)):this.loadedmetadata||r.type!==H.PlaylistLevelType.MAIN||null!==(n=this.videoBuffer||this.media)&&void 0!==n&&n.buffered.length&&(this.loadedmetadata=!0)},i.onError=function(t,n){if(n.type!==s.ErrorTypes.KEY_SYSTEM_ERROR)switch(n.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.FRAG_PARSING_ERROR:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(H.PlaylistLevelType.AUDIO,n);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==tt&&this.state!==We&&(this.state=n.fatal?tt:Ye,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===Ze||this.state===Je)){var r=!0,i=this.getFwdBufferInfo(this.mediaBuffer,H.PlaylistLevelType.AUDIO);i&&i.len>.5&&(r=!this.reduceMaxBufferLength(i.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}else this.onFragmentOrKeyLoadError(H.PlaylistLevelType.AUDIO,n)},i.onBufferFlushed=function(e,t){t.type===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0,this.state===et&&(this.state=Ye))},i._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,i=e.remuxResult,a=e.chunkMeta,s=this.getCurrentContext(a);if(!s)return this.warn("The loading context changed while buffering fragment "+a.sn+" of level "+a.level+". This chunk will not be buffered."),void this.resetStartWhenNotLoaded(a.level);var l=s.frag,u=s.part,c=s.level.details,p=i.audio,d=i.text,f=i.id3,h=i.initSegment;if(!this.fragContextChanged(l)&&c){if(this.state=Ze,this.audioSwitch&&p&&this.completeAudioSwitch(),null!=h&&h.tracks&&(this._bufferInitSegment(h.tracks,l,a),r.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:l,id:n,tracks:h.tracks})),p){var g=p.startPTS,y=p.endPTS,m=p.startDTS,b=p.endDTS;u&&(u.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:y,startDTS:m,endDTS:b}),l.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,g,y,m,b),this.bufferFragmentData(p,l,u,a)}if(null!=f&&null!==(t=f.samples)&&void 0!==t&&t.length){var _=wt({id:n,frag:l,details:c},f);r.trigger(o.Events.FRAG_PARSING_METADATA,_)}if(d){var E=wt({id:n,frag:l,details:c},d);r.trigger(o.Events.FRAG_PARSING_USERDATA,E)}}},i._bufferInitSegment=function(e,t,n){if(this.state===Ze){e.video&&delete e.video;var r=e.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,e);var i=r.initSegment;if(null!=i&&i.byteLength){var a={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:i};this.hls.trigger(o.Events.BUFFER_APPENDING,a)}this.tick()}}},i.loadFragment=function(t,n,r){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||i===ye.NOT_LOADED||i===ye.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t,n):n.live&&!(0,a.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=nt):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)))},i.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:r})},r}(it);function xt(e,t){return(xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const It=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,"[audio-track-controller]")||this).tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.trackName="",n.selectDefaultTrack=!0,n.registerListeners(),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,xt(t,n);var i,a,l=r.prototype;return l.registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(o.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(o.Events.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,e.prototype.destroy.call(this)},l.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},l.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},l.onAudioTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.tracksInGroup[n];if(i){var a=i.details;i.details=t.details,this.log("audioTrack "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,a))}else this.warn("Invalid audio track id "+n)},l.onLevelLoading=function(e,t){this.switchLevel(t.level)},l.onLevelSwitching=function(e,t){this.switchLevel(t.level)},l.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];if(this.groupId!==n){this.groupId=n;var r=this.tracks.filter((function(e){return!n||e.groupId===n}));this.selectDefaultTrack&&!r.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=r;var i={audioTracks:r};this.log("Updating audio tracks, "+r.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(o.Events.AUDIO_TRACKS_UPDATED,i),this.selectInitialTrack()}}},l.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===H.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},l.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var r=t[e],i=r.id,a=r.groupId,s=void 0===a?"":a,l=r.name,u=r.type,c=r.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHING,{id:i,groupId:s,name:l,type:u,url:c}),!r.details||r.details.live){var p=this.switchParams(r.url,null==n?void 0:n.details);this.loadPlaylist(p)}}},l.selectInitialTrack=function(){this.tracksInGroup;var e=this.trackName,t=this.findTrackId(e)||this.findTrackId();-1!==t?this.setAudioTrack(t):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},l.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},l.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var r=n.id,i=n.groupId,a=n.url;if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(o.Events.AUDIO_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},i=r,(a=[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(fe);function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Dt=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t,n,r,"[subtitle-stream-controller]")||this).levels=[],i.currentTrackId=-1,i.tracksBuffered=[],i.mainDetails=null,i._registerListeners(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Pt(t,n);var i,a,s=r.prototype;return s.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},s._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.ERROR,this.onError,this),e.on(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(o.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(o.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(o.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},s._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.ERROR,this.onError,this),e.off(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(o.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(o.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(o.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},s.startLoad=function(e){this.stopLoad(),this.state=Ye,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},s.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},s.onLevelLoaded=function(e,t){this.mainDetails=t.details},s.onSubtitleFragProcessed=function(e,t){var n=t.frag,r=t.success;if(this.fragPrevious=n,this.state=Ye,r){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var a,o=n.start,s=0;s<i.length;s++)if(o>=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},s.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(e){for(var t=0;t<e.length;)if(e[t].end<=o)e.shift();else{if(!(e[t].start<o))break;e[t].start=o,t++}})),this.fragmentTracker.removeFragmentsInRange(n,o,H.PlaylistLevelType.SUBTITLE)}},s.onFragBuffered=function(e,t){var n;this.loadedmetadata||t.frag.type!==H.PlaylistLevelType.MAIN||null!==(n=this.media)&&void 0!==n&&n.buffered.length&&(this.loadedmetadata=!0)},s.onError=function(e,t){var n=t.frag;n&&n.type===H.PlaylistLevelType.SUBTITLE&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state=Ye)},s.onSubtitleTracksUpdated=function(e,t){var n=this,r=t.subtitleTracks;this.tracksBuffered=[],this.levels=r.map((function(e){return new ae(e)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(e){n.tracksBuffered[e.id]=[]})),this.mediaBuffer=null},s.onSubtitleTrackSwitch=function(e,t){if(this.currentTrackId=t.id,this.levels.length&&-1!==this.currentTrackId){var n=this.levels[this.currentTrackId];null!=n&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval(500)}else this.clearInterval()},s.onSubtitleTrackLoaded=function(e,t){var n,r=t.details,i=t.id,a=this.currentTrackId,o=this.levels;if(o.length){var s=o[a];if(!(i>=o.length||i!==a)&&s){this.mediaBuffer=this.mediaBufferTimeRanges;var l=0;if(r.live||null!==(n=s.details)&&void 0!==n&&n.live){var u=this.mainDetails;if(r.deltaUpdateFailed||!u)return;var c=u.fragments[0];s.details?0===(l=this.alignPlaylists(r,s.details))&&c&&de(r,l=c.start):r.hasProgramDateTime&&u.hasProgramDateTime?(je(r,u),l=r.fragments[0].start):c&&de(r,l=c.start)}s.details=r,this.levelLastLoaded=i,this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(s.details,l),this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===Ye&&(Ve(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),s.details=void 0))}}},s._handleFragmentLoadComplete=function(e){var t=this,n=e.frag,r=e.payload,i=n.decryptdata,a=this.hls;if(!this.fragContextChanged(n)&&r&&r.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var s=performance.now();this.decrypter.decrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer).then((function(e){var t=performance.now();a.trigger(o.Events.FRAG_DECRYPTED,{frag:n,payload:e,stats:{tstart:s,tdecrypt:t}})})).catch((function(e){t.warn(e.name+": "+e.message),t.state=Ye}))}},s.doTick=function(){if(this.media){if(this.state===Ye){var e=this.currentTrackId,t=this.levels;if(!t.length||!t[e]||!t[e].details)return;var n=t[e].details,r=n.targetduration,i=this.config,a=this.getLoadPosition(),o=Le.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],a-r,i.maxBufferHole),s=o.end,l=o.len,u=this.getFwdBufferInfo(this.media,H.PlaylistLevelType.MAIN);if(l>this.getMaxBufferLength(null==u?void 0:u.len)+r)return;var c=n.fragments,p=c.length,d=n.edge,f=null,h=this.fragPrevious;if(s<d){var g=i.maxFragLookUpTolerance;!(f=Ve(h,c,Math.max(c[0].start,s),g))&&h&&h.start<c[0].start&&(f=c[0])}else f=c[p-1];if(!f)return;f=this.mapToInitFragWhenRequired(f),this.fragmentTracker.getState(f)===ye.NOT_LOADED&&this.loadFragment(f,n,s)}}else this.state=Ye},s.getMaxBufferLength=function(t){var n=e.prototype.getMaxBufferLength.call(this);return t?Math.max(n,t):n},s.loadFragment=function(t,n,r){this.fragCurrent=t,"initSegment"===t.sn?this._loadInitSegment(t,n):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r))},i=r,(a=[{key:"mediaBufferTimeRanges",get:function(){return new Rt(this.tracksBuffered[this.currentTrackId]||[])}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(it),Rt=function(e){this.buffered=void 0;var t=function(t,n,r){if((n>>>=0)>r-1)throw new DOMException("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+n+") is greater than the maximum bound ("+r+")");return e[n][t]};this.buffered={get length(){return e.length},end:function(n){return t("end",n,e.length)},start:function(n){return t("start",n,e.length)}}};function Ot(e,t){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Lt(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"subtitles"!==r.kind&&"captions"!==r.kind||!r.label||t.push(e[n])}return t}const Mt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,"[subtitle-track-controller]")||this).media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n._subtitleDisplay=!0,n.registerListeners(),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ot(t,n);var i,a,s=r.prototype;return s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},s.registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(o.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(o.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(o.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(o.Events.ERROR,this.onError,this)},s.onMediaAttached=function(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},s.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},s.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),Lt(this.media.textTracks).forEach((function(e){Y(e)})),this.subtitleTrack=-1,this.media=null)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},s.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},s.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid subtitle track id "+n)},s.onLevelLoading=function(e,t){this.switchLevel(t.level)},s.onLevelSwitching=function(e,t){this.switchLevel(t.level)},s.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,i=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=i;var a=this.findTrackId(null==r?void 0:r.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:i};this.log("Updating subtitle tracks, "+i.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(o.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==a&&this.setSubtitleTrack(a,r)}}},s.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},s.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===H.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},s.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var r=n.id,i=n.groupId,a=n.url;if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(o.Events.SUBTITLE_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},s.toggleTrackModes=function(e){var t=this,n=this.media,r=this.trackId;if(n){var i=Lt(n.textTracks),a=i.filter((function(e){return e.groupId===t.groupId}));if(-1===e)[].slice.call(i).forEach((function(e){e.mode="disabled"}));else{var o=a[r];o&&(o.mode="disabled")}var s=a[e];s&&(s.mode=this.subtitleDisplay?"showing":"hidden")}},s.setSubtitleTrack=function(e,t){var n,r=this.tracksInGroup;if(this.media){if(this.trackId!==e&&this.toggleTrackModes(e),!(this.trackId===e&&(-1===e||null!==(n=r[e])&&void 0!==n&&n.details)||e<-1||e>=r.length)){this.clearTimer();var i=r[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,i){var a=i.id,s=i.groupId,l=void 0===s?"":s,u=i.name,c=i.type,p=i.url;this.hls.trigger(o.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:l,name:u,type:c,url:p});var d=this.switchParams(i.url,null==t?void 0:t.details);this.loadPlaylist(d)}else this.hls.trigger(o.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},s.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=Lt(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}},i=r,(a=[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes(this.trackId)}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(fe);var Nt,Ut=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,r=t[e],i=n[e];if(i.length){var a=i[0];try{a.execute()}catch(t){l.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(t),r&&r.updating||(i.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}(),Ft=at(),jt=/([ha]vc.)(?:\.[^.,]+)+/,Bt=function(){function e(e){var t=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var e=t.media,n=t.mediaSource;l.logger.log("[buffer-controller]: Media source opened"),e&&(e.removeEventListener("emptied",t._onMediaEmptied),t.updateMediaElementDuration(),t.hls.trigger(o.Events.MEDIA_ATTACHED,{media:e})),n&&n.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){l.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){l.logger.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var e=t.media,n=t._objectUrl;e&&e.src!==n&&l.logger.error("Media element src was set while attaching MediaSource ("+n+" > "+e.src+")")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},t.registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.BUFFER_RESET,this.onBufferReset,this),e.on(o.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(o.Events.BUFFER_EOS,this.onBufferEos,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(o.Events.FRAG_PARSED,this.onFragParsed,this),e.on(o.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.BUFFER_RESET,this.onBufferReset,this),e.off(o.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(o.Events.BUFFER_EOS,this.onBufferEos,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(o.Events.FRAG_PARSED,this.onFragParsed,this),e.off(o.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new Ut(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,l.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&Ft){var r=this.mediaSource=new Ft;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src,n.addEventListener("emptied",this._onMediaEmptied)}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(l.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){l.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):l.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(o.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){l.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a=t[e],o=a.id,s=a.codec,u=a.levelCodec,c=a.container,p=a.metadata,d=(i.levelCodec||i.codec).replace(jt,"$1"),f=(u||s).replace(jt,"$1");if(d!==f){var h=c+";codecs="+(u||s);n.appendChangeType(e,h),l.logger.log("[buffer-controller]: switching codec "+d+" to "+f),n.tracks[e]={buffer:i.buffer,codec:s,container:c,levelCodec:u,metadata:p,id:o}}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(l.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){l.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,i=this.operationQueue,a=this.tracks,u=t.data,c=t.type,p=t.frag,d=t.part,f=t.chunkMeta,h=f.buffering[c],g=self.performance.now();h.start=g;var y=p.stats.buffering,v=d?d.stats.buffering:null;0===y.start&&(y.start=g),v&&0===v.start&&(v.start=g);var m=a.audio,b=!1;"audio"===c&&"audio/mpeg"===(null==m?void 0:m.container)&&(b=!this.lastMpegAudioChunk||1===f.id||this.lastMpegAudioChunk.sn!==f.sn,this.lastMpegAudioChunk=f);var _=p.start,E={execute:function(){if(h.executeStart=self.performance.now(),b){var e=n.sourceBuffer[c];if(e){var t=_-e.timestampOffset;Math.abs(t)>=.1&&(l.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_+" (delta: "+t+") sn: "+p.sn+")"),e.timestampOffset=_)}}n.appendExecutor(u,c)},onStart:function(){},onComplete:function(){var e=self.performance.now();h.executeEnd=h.end=e,0===y.first&&(y.first=e),v&&0===v.first&&(v.first=e);var t=n.sourceBuffer,r={};for(var i in t)r[i]=Le.getBuffered(t[i]);n.appendError=0,n.hls.trigger(o.Events.BUFFER_APPENDED,{type:c,frag:p,part:d,chunkMeta:f,parent:p.type,timeRanges:r})},onError:function(e){l.logger.error("[buffer-controller]: Error encountered while trying to append to the "+c+" SourceBuffer",e);var t={type:s.ErrorTypes.MEDIA_ERROR,parent:p.type,details:s.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=s.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=s.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(l.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0,r.stopLoad())),r.trigger(o.Events.ERROR,t)}};i.append(E,c)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,i=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(o.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){l.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(i(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(i(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,i=t.part,a=[],s=i?i.elementaryStreams:r.elementaryStreams;s[v.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(s[v.ElementaryStreamTypes.AUDIO]&&a.push("audio"),s[v.ElementaryStreamTypes.VIDEO]&&a.push("video")),0===a.length&&l.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,i&&(i.stats.buffering.end=e);var t=i?i.stats:r.stats;n.hls.trigger(o.Events.FRAG_BUFFERED,{frag:r,part:i,stats:t,id:r.type})}),a)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return!i||t.type&&t.type!==r||(i.ending=!0,i.ended||(i.ended=!0,l.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS"))),e&&!(i&&!i.ended)}),!0)&&(l.logger.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers((function(){n.getSourceBufferTypes().forEach((function(e){var t=n.sourceBuffer[e];t&&(t.ending=!1)}));var e=n.mediaSource;e&&"open"===e.readyState?(l.logger.log("[buffer-controller]: Calling mediaSource.endOfStream()"),e.endOfStream()):e&&l.logger.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+e.readyState)})))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,r=this.sourceBuffer;if(n&&null!==t){var i=this.getSourceBufferTypes();if(i.length){var s=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if((0,a.isFiniteNumber)(s)&&!(s<0)){var u=n.currentTime,c=t.levelTargetDuration,p=Math.max(s,c),d=Math.floor(u/c)*c-p;i.forEach((function(n){var i=r[n];if(i){var a=Le.getBuffered(i);if(a.length>0&&d>a.start(0)){if(e.trigger(o.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),t.live)e.trigger(o.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d});else if(i.ended&&a.end(a.length-1)-u<2*c)return void l.logger.info("[buffer-controller]: Cannot flush "+n+" back buffer while SourceBuffer is in ended state");e.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:n})}}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,r=this.mediaSource,i=e.fragments[0].start+e.totalduration,o=n.duration,s=(0,a.isFiniteNumber)(r.duration)?r.duration:0;e.live&&t.config.liveDurationInfinity?(l.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),r.duration=1/0,this.updateSeekableRange(e)):(i>s&&i>o||!(0,a.isFiniteNumber)(o))&&(l.logger.log("[buffer-controller]: Updating Media Source duration to "+i.toFixed(3)),r.duration=i)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var i=this.getSourceBufferTypes();if(0===i.length)return void this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});i.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var i in e)if(!t[i]){var a=e[i];if(!a)throw Error("source buffer exists for track "+i+", however track does not");var u=a.levelCodec||a.codec,c=a.container+";codecs="+u;l.logger.log("[buffer-controller]: creating sourceBuffer("+c+")");try{var p=t[i]=n.addSourceBuffer(c),d=i;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[i]={buffer:p,codec:u,container:a.container,levelCodec:a.levelCodec,metadata:a.metadata,id:a.id},r++}catch(e){l.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:c})}}r&&this.hls.trigger(o.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){l.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var r=this.media,i=this.mediaSource,o=this.operationQueue,s=this.sourceBuffer[e];if(!r||!i||!s)return l.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void o.shiftAndExecuteNext(e);var u=(0,a.isFiniteNumber)(r.duration)?r.duration:1/0,c=(0,a.isFiniteNumber)(i.duration)?i.duration:1/0,p=Math.max(0,t),d=Math.min(n,u,c);d>p&&!s.ending?(s.ended=!1,l.logger.log("[buffer-controller]: Removing ["+p+","+d+"] from the "+e+" SourceBuffer"),s.remove(p,d)):o.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return l.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return l.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}(),Vt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Ht=function(e){var t=e;return Vt.hasOwnProperty(e)&&(t=Vt[e]),String.fromCharCode(t)},Kt=100,Gt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},zt={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Wt={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Yt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},qt=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(Nt||(Nt={}));var Xt=function(){function e(){this.time=null,this.verboseLevel=Nt.ERROR}return e.prototype.log=function(e,t){if(this.verboseLevel>=e){var n="function"==typeof t?t():t;l.logger.log(this.time+" ["+e+"] "+n)}},e}(),$t=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},Qt=function(){function e(e,t,n,r,i){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),Zt=function(){function e(e,t,n,r,i,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new Qt(t,n,r,i,a)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),Jt=function(){function e(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var t=0;t<Kt;t++)this.chars.push(new Zt);this.logger=e,this.pos=0,this.currPenState=new Qt}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<Kt;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<Kt;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<Kt;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(Nt.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>Kt&&(this.logger.log(Nt.DEBUG,"Too large cursor position "+this.pos),this.pos=Kt)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){var t=this;e>=144&&this.backSpace();var n=Ht(e);this.pos>=Kt?this.logger.log(Nt.ERROR,(function(){return"Cannot insert "+e.toString(16)+" ("+n+") at position "+t.pos+". Skipping it!"})):(this.chars[this.pos].setChar(n,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<Kt;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<Kt;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),en=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new Jt(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(Nt.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(Nt.INFO,(function(){return"pacData = "+JSON.stringify(e)}));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<15;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var a=i.rows[r].cueStartTime,o=this.logger.time;if(a&&null!==o&&a<o)for(var s=0;s<this.nrRollUpRows;s++)this.rows[t-this.nrRollUpRows+s+1].copy(i.rows[r+s])}}this.currRow=t;var l=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,c=Math.max(u-1,0);l.setCursor(e.indent),e.color=l.chars[c].penState.foreground}var p={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(p)},t.setBkgData=function(e){this.logger.log(Nt.INFO,(function(){return"bkgData = "+JSON.stringify(e)})),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){var e=this;if(null!==this.nrRollUpRows){this.logger.log(Nt.TEXT,(function(){return e.getDisplayText()}));var t=this.currRow+1-this.nrRollUpRows,n=this.rows.splice(t,1)[0];n.clear(),this.rows.splice(this.currRow,0,n),this.logger.log(Nt.INFO,"Rolling up")}else this.logger.log(Nt.DEBUG,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<15;i++){var a=this.rows[i].getTextString();a&&(r=i+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),tn=function(){function e(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new en(n),this.nonDisplayedMemory=new en(n),this.lastOutputScreen=new en(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(Nt.INFO,(function(){return"MODE="+e})),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=this,n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(Nt.INFO,(function(){return r+": "+t.writeScreen.getDisplayText(!0)})),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(Nt.TEXT,(function(){return"DISPLAYED: "+t.displayedMemory.getDisplayText(!0)})),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(Nt.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(Nt.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(Nt.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(Nt.INFO,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(Nt.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(Nt.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(Nt.INFO,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(Nt.INFO,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(Nt.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(Nt.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(Nt.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){var e=this;if(this.logger.log(Nt.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(Nt.TEXT,(function(){return"DISP: "+e.displayedMemory.getDisplayText()}))}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(Nt.INFO,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(Nt.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}();function nn(e,t,n){n.a=e,n.b=t}function rn(e,t,n){return n.a===e&&n.b===t}const an=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new Xt;this.channels=[null,new tn(e,t,r),new tn(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,r,i,a=!1;this.logger.time=e;for(var o=0;o<t.length;o+=2)if(r=127&t[o],i=127&t[o+1],0!==r||0!==i){if(this.logger.log(Nt.DATA,"["+$t([t[o],t[o+1]])+"] -> ("+$t([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(a=this.parseChars(r,i))){var s=this.currentChannel;s&&s>0?this.channels[s].insertChars(a):this.logger.log(Nt.WARNING,"No channel found yet. TEXT-MODE?")}n||a||this.logger.log(Nt.WARNING,"Couldn't parse cleaned data "+$t([r,i])+" orig: "+$t([t[o],t[o+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(rn(e,t,n))return nn(null,null,n),this.logger.log(Nt.DEBUG,"Repeated command ("+$t([e,t])+") is dropped"),!0;var r=20===e||21===e||23===e?1:2,i=this.channels[r];return 20===e||21===e||28===e||29===e?32===t?i.ccRCL():33===t?i.ccBS():34===t?i.ccAOF():35===t?i.ccAON():36===t?i.ccDER():37===t?i.ccRU(2):38===t?i.ccRU(3):39===t?i.ccRU(4):40===t?i.ccFON():41===t?i.ccRDC():42===t?i.ccTR():43===t?i.ccRTD():44===t?i.ccEDM():45===t?i.ccCR():46===t?i.ccENM():47===t&&i.ccEOC():i.ccTO(t-32),nn(e,t,n),this.currentChannel=r,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(Nt.ERROR,"Mismatch channel in midrow parsing"),!1;var r=this.channels[n];return!!r&&(r.ccMIDROW(t),this.logger.log(Nt.DEBUG,"MIDROW ("+$t([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(rn(e,t,r))return nn(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?Gt[e]:Wt[e]:1===i?zt[e]:Yt[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),nn(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,r,i=null,a=null;if(e>=25?(n=2,a=e-8):(n=1,a=e),a>=17&&a<=19?(r=17===a?t+80:18===a?t+112:t+144,this.logger.log(Nt.INFO,"Special char '"+Ht(r)+"' in channel "+n),i=[r]):e>=32&&e<=127&&(i=0===t?[e]:[e,t]),i){var o=$t(i);this.logger.log(Nt.DEBUG,"Char codes = "+o.join(",")),nn(e,t,this.cmdHistory)}return i},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=qt[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),nn(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var n=this.channels[t];n&&n.cueSplitAtTime(e)}},e}();var on=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[],this.startTime=null},e}();const sn=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var e=["","lr","rl"],t=["start","middle","end","left","right"];function n(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var n=t.toLowerCase();return!!~e.indexOf(n)&&n}function r(e){return n(t,e)}function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=1;i<arguments.length;i++){var a=arguments[i];for(var o in a)e[o]=a[o]}return e}function a(t,a,o){var s=this,l={enumerable:!0};s.hasBeenReset=!1;var u="",c=!1,p=t,d=a,f=o,h=null,g="",y=!0,v="auto",m="start",b=50,_="middle",E=50,k="middle";Object.defineProperty(s,"id",i({},l,{get:function(){return u},set:function(e){u=""+e}})),Object.defineProperty(s,"pauseOnExit",i({},l,{get:function(){return c},set:function(e){c=!!e}})),Object.defineProperty(s,"startTime",i({},l,{get:function(){return p},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},l,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},l,{get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},l,{get:function(){return g},set:function(t){var r=function(t){return n(e,t)}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");g=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},l,{get:function(){return y},set:function(e){y=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},l,{get:function(){return m},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return _},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return k},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");k=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();var ln=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function un(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var cn=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},t.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},t.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1},e}();function pn(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var dn=new sn(0,0,""),fn="middle"===dn.align?"middle":"center";function hn(e,t,n){var r=e;function i(){var t=un(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.slice(3),a(),t.endTime=i(),a(),function(e,t){var r=new cn;pn(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",fn,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",fn,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",fn,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===dn.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",fn);var a=r.get("position","auto");"auto"===a&&50===dn.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function gn(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var yn=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new ln,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=gn(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.slice(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.slice(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var i=(r=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:r=n(),t.state){case"HEADER":/:/.test(r)?pn(r,(function(e,t){}),/:/):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new sn(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{hn(r,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var o=-1!==r.indexOf("--\x3e");if(!r||o&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r;continue;case"BADCUE":r||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},t.flush=function(){var e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this},e}(),vn=n(673),mn=n(524),bn=/\r\n|\n\r|\n|\r/g,_n=function(e,t,n){return void 0===n&&(n=0),e.slice(n,n+t.length)===t},En=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()};function kn(e,t,n){return En(e.toString())+En(t.toString())+En(n)}function Tn(){return(Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var An="stpp.ttml.im1t",wn=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Sn=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Cn={left:"start",center:"center",right:"end",start:"start",end:"end"};function xn(e,t,n,r,i){var a=(0,w.findBox)(new Uint8Array(e),["mdat"]);if(0!==a.length){var o=a.map((function(e){return(0,X.utf8ArrayToStr)(e)})),s=(0,vn.toTimescaleFromScale)(t,1,n);try{o.forEach((function(e){return r(function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");var r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(r).reduce((function(e,t){return e[t]=n.getAttribute("ttp:"+t)||r[t],e}),{}),a="preserve"!==n.getAttribute("xml:space"),o=Pn(In(n,"styling","style")),s=Pn(In(n,"layout","region")),l=In(n,"body","[begin]");return[].map.call(l,(function(e){var n=function e(t,n){return[].slice.call(t.childNodes).reduce((function(t,r,i){var a;return"br"===r.nodeName&&i?t+"\n":null!==(a=r.childNodes)&&void 0!==a&&a.length?e(r,n):n?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent}),"")}(e,a);if(!n||!e.hasAttribute("begin"))return null;var r=On(e.getAttribute("begin"),i),l=On(e.getAttribute("dur"),i),u=On(e.getAttribute("end"),i);if(null===r)throw Rn(e);if(null===u){if(null===l)throw Rn(e);u=r+l}var c=new sn(r-t,u-t,n);c.id=kn(c.startTime,c.endTime,c.text);var p=function(e,t,n){var r="http://www.w3.org/ns/ttml#styling",i=null,a=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;return a&&n.hasOwnProperty(a)&&(i=n[a]),["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(n,a){var o=Dn(t,r,a)||Dn(e,r,a)||Dn(i,r,a);return o&&(n[a]=o),n}),{})}(s[e.getAttribute("region")],o[e.getAttribute("style")],o),d=p.textAlign;if(d){var f=Cn[d];f&&(c.lineAlign=f),c.align=d}return Tn(c,p),c})).filter((function(e){return null!==e}))}(e,s))}))}catch(e){i(e)}}else i(new Error("Could not parse IMSC1 mdat"))}function In(e,t,n){var r=e.getElementsByTagName(t)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function Pn(e){return e.reduce((function(e,t){var n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function Dn(e,t,n){return e&&e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function Rn(e){return new Error("Could not parse ttml timestamp "+e)}function On(e,t){if(!e)return null;var n=un(e);return null===n&&(wn.test(e)?n=function(e,t){var n=wn.exec(e),r=(0|n[4])+(0|n[5])/t.subFrameRate;return 3600*(0|n[1])+60*(0|n[2])+(0|n[3])+r/t.frameRate}(e,t):Sn.test(e)&&(n=function(e,t){var n=Sn.exec(e),r=Number(n[1]);switch(n[2]){case"h":return 3600*r;case"m":return 60*r;case"ms":return 1e3*r;case"f":return r/t.frameRate;case"t":return r/t.tickRate}return r}(e,t))),n}var Ln=function(){function e(e){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new on(this,"textTrack1"),n=new on(this,"textTrack2"),r=new on(this,"textTrack3"),i=new on(this,"textTrack4");this.cea608Parser1=new an(1,t,n),this.cea608Parser2=new an(3,r,i)}e.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(o.Events.FRAG_LOADING,this.onFragLoading,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(o.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(o.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(o.Events.FRAG_LOADING,this.onFragLoading,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(o.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(o.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(e,t,n,r,i){for(var a,s,l,u,c=!1,p=i.length;p--;){var d=i[p],f=(a=d[0],s=d[1],l=t,u=n,Math.min(s,u)-Math.max(a,l));if(f>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),c=!0,f/(n-t)>.5))return}if(c||i.push([t,n]),this.config.renderTextTracksNatively){var h=this.captionsTracks[e];this.Cues.newCue(h,t,n,r)}else{var g=this.Cues.newCue(null,t,n,r);this.hls.trigger(o.Events.CUES_PARSED,{type:"captions",cues:g,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,i=t.id,a=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===i&&(this.initPTS[r.cc]=a,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(o.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var r=t.textTracks[n];if(r[e])return r}return null},t.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},t.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,n=this.captionsTracks,r=this.media,i=t[e],a=i.label,o=i.languageCode,s=this.getExistingTrack(e);if(s)n[e]=s,Y(n[e]),z(n[e],r);else{var l=this.createTextTrack("captions",a,o);l&&(l[e]=!0,n[e]=l)}}},t.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(o.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}}},t.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},t.onMediaAttaching=function(e,t){this.media=t.media,this._cleanTracks()},t.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Y(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)Y(t[n])}},t.onSubtitleTracksUpdated=function(e,t){var n=this;this.textTracks=[];var r=t.subtitleTracks||[],i=r.some((function(e){return e.textCodec===An}));if(this.config.enableWebVTT||i&&this.config.enableIMSC1){var a=this.tracks&&r&&this.tracks.length===r.length;if(this.tracks=r||[],this.config.renderTextTracksNatively){var s=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,t){var r;if(t<s.length){for(var i=null,a=0;a<s.length;a++)if(Mn(s[a],e)){i=s[a];break}i&&(r=i)}if(r)Y(r);else{var o=n._captionsOrSubtitlesFromCharacteristics(e);(r=n.createTextTrack(o,e.name,e.lang))&&(r.mode="disabled")}r&&(r.groupId=e.groupId,n.textTracks.push(r))}))}else if(!a&&this.tracks&&this.tracks.length){var l=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(o.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:l})}}},t._captionsOrSubtitlesFromCharacteristics=function(e){var t;if(null!==(t=e.attrs)&&void 0!==t&&t.CHARACTERISTICS){var n=/transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS),r=/describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS);if(n&&r)return"captions"}return"subtitles"},t.onManifestLoaded=function(e,t){var n=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((function(e){var t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(t){var r="textTrack"+t[1],i=n.captionsProperties[r];i&&(i.label=e.name,e.lang&&(i.languageCode=e.lang),i.media=e)}}))},t.closedCaptionsForLevel=function(e){var t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]},t.onFragLoading=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2,i=this.lastSn,a=this.lastPartIndex;if(this.enabled&&n&&r&&t.frag.type===H.PlaylistLevelType.MAIN){var o,s,l=t.frag.sn,u=null!=(o=null==t||null===(s=t.part)||void 0===s?void 0:s.index)?o:-1;l===i+1||l===i&&u===a+1||(n.reset(),r.reset()),this.lastSn=l,this.lastPartIndex=u}},t.onFragLoaded=function(e,t){var n=t.frag,r=t.payload,i=this.initPTS,s=this.unparsedVttFrags;if(n.type===H.PlaylistLevelType.SUBTITLE)if(r.byteLength){if(!(0,a.isFiniteNumber)(i[n.cc]))return s.push(t),void(i.length&&this.hls.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Missing initial subtitle PTS")}));var l=n.decryptdata,u="stats"in t;if(null==l||!l.encrypted||u){var c=this.tracks[n.level],p=this.vttCCs;p[n.cc]||(p[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),c&&c.textCodec===An?this._parseIMSC1(n,r):this._parseVTTs(n,r,p)}}else this.hls.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var n=this,r=this.hls;xn(t,this.initPTS[e.cc],this.timescale[e.cc],(function(t){n._appendCues(t,e.level),r.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){l.logger.log("Failed to parse IMSC1: "+t),r.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e,t,n){var r,i=this,s=this.hls;!function(e,t,n,r,i,o,s,l){var u,c=new yn,p=(0,X.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(bn,"\n").split("\n"),d=[],f=(0,vn.toMpegTsClockFromTimescale)(t,n),h="00:00.000",g=0,y=0,v=!0;c.oncue=function(e){var t=r[i],n=r.ccOffset,a=(g-f)/9e4;null!=t&&t.new&&(void 0!==y?n=r.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!==(a=i)&&void 0!==a&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(r,i,a)),a&&(n=a-r.presentationOffset);var s=e.endTime-e.startTime,l=(0,mn.normalizePts)(9e4*(e.startTime+n-y),9e4*o)/9e4;e.startTime=Math.max(l,0),e.endTime=Math.max(l+s,0);var u=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(u)),e.id||(e.id=kn(e.startTime,e.endTime,u)),e.endTime>0&&d.push(e)},c.onparsingerror=function(e){u=e},c.onflush=function(){u?l(u):s(d)},p.forEach((function(e){if(v){if(_n(e,"X-TIMESTAMP-MAP=")){v=!1,e.slice(16).split(",").forEach((function(e){_n(e,"LOCAL:")?h=e.slice(6):_n(e,"MPEGTS:")&&(g=parseInt(e.slice(7)))}));try{y=function(e){var t=parseInt(e.slice(-3)),n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!((0,a.isFiniteNumber)(t)&&(0,a.isFiniteNumber)(n)&&(0,a.isFiniteNumber)(r)&&(0,a.isFiniteNumber)(i)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,(t+=6e4*r)+36e5*i}(h)/1e3}catch(e){u=e}return}""===e&&(v=!1)}c.parse(e+"\n")})),c.flush()}(null!==(r=e.initSegment)&&void 0!==r&&r.data?(0,w.appendUint8Array)(e.initSegment.data,new Uint8Array(t)):t,this.initPTS[e.cc],this.timescale[e.cc],n,e.cc,e.start,(function(t){i._appendCues(t,e.level),s.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(n){i._fallbackToIMSC1(e,t),l.logger.log("Failed to parse VTT cue: "+n),s.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})}))},t._fallbackToIMSC1=function(e,t){var n=this,r=this.tracks[e.level];r.textCodec||xn(t,this.initPTS[e.cc],this.timescale[e.cc],(function(){r.textCodec=An,n._parseIMSC1(e,t)}),(function(){r.textCodec="wvtt"}))},t._appendCues=function(e,t){var n=this.hls;if(this.config.renderTextTracksNatively){var r=this.textTracks[t];if(!r||"disabled"===r.mode)return;e.forEach((function(e){return W(r,e)}))}else{var i=this.tracks[t];if(!i)return;var a=i.default?"default":"subtitles"+t;n.trigger(o.Events.CUES_PARSED,{type:"subtitles",cues:e,track:a})}},t.onFragDecrypted=function(e,t){var n=t.frag;if(n.type===H.PlaylistLevelType.SUBTITLE){if(!(0,a.isFiniteNumber)(this.initPTS[n.cc]))return void this.unparsedVttFrags.push(t);this.onFragLoaded(o.Events.FRAG_LOADED,t)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&n&&r){var i=t.frag,a=t.samples;if(i.type!==H.PlaylistLevelType.MAIN||"NONE"!==this.closedCaptionsForLevel(i))for(var o=0;o<a.length;o++){var s=a[o].bytes;if(s){var l=this.extractCea608Data(s);n.addData(a[o].pts,l[0]),r.addData(a[o].pts,l[1])}}}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,i=t.endOffsetSubtitles,a=t.type,o=this.media;if(o&&!(o.currentTime<r)){if(!a||"video"===a){var s=this.captionsTracks;Object.keys(s).forEach((function(e){return q(s[e],n,r)}))}if(this.config.renderTextTracksNatively&&0===n&&void 0!==i){var l=this.textTracks;Object.keys(l).forEach((function(e){return q(l[e],n,i)}))}}},t.extractCea608Data=function(e){for(var t=[[],[]],n=31&e[0],r=2,i=0;i<n;i++){var a=e[r++],o=127&e[r++],s=127&e[r++];if((0!==o||0!==s)&&0!=(4&a)){var l=3&a;0!==l&&1!==l||(t[l].push(o),t[l].push(s))}}return t},e}();function Mn(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}const Nn=function(){function e(e){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t,n,r=e.prototype;return r.setStreamController=function(e){this.streamController=e},r.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},r.registerListeners=function(){var e=this.hls;e.on(o.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},r.unregisterListener=function(){var e=this.hls;e.off(o.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},r.onFpsDropLevelCapping=function(t,n){e.isLevelAllowed(n.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(n.droppedLevel)},r.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null},r.onManifestParsed=function(e,t){var n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()},r.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},r.onMediaDetaching=function(){this.stopCapping()},r.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},r.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},r.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},r.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},r.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,a=e.length-1,o=0;o<e.length;o+=1){var s=e[o];if((s.width>=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},t=e,(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Un=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var r=performance.now();if(t){if(this.lastTime){var i=r-this.lastTime,a=n-this.lastDroppedFrames,s=t-this.lastDecodedFrames,u=1e3*a/i,c=this.hls;if(c.trigger(o.Events.FPS_DROP,{currentDropped:a,currentDecoded:s,totalDroppedFrames:n}),u>0&&a>c.config.fpsDroppedMonitoringThreshold*s){var p=c.currentLevel;l.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+p),p>0&&(-1===c.autoLevelCapping||c.autoLevelCapping>=p)&&(p-=1,c.trigger(o.Events.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();var Fn=n(300);function jn(e){var t="function"==typeof Map?new Map:void 0;return(jn=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Bn(e,arguments,Kn(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Hn(r,e)})(e)}function Bn(e,t,n){return(Bn=Vn()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Hn(i,n.prototype),i}).apply(null,arguments)}function Vn(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Hn(e,t){return(Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Kn(e){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn="[eme]",zn=function(){function e(t){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=e.CDMCleanupPromise?[e.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=l.logger.debug.bind(l.logger,Gn),this.log=l.logger.log.bind(l.logger,Gn),this.warn=l.logger.warn.bind(l.logger,Gn),this.error=l.logger.error.bind(l.logger,Gn),this.hls=t,this.config=t.config,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null},t.registerListeners=function(){this.hls.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},t.unregisterListeners=function(){this.hls.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},t.getLicenseServerUrl=function(e){var t=this.config,n=t.drmSystems,r=t.widevineLicenseUrl,i=n[e];if(i)return i.licenseUrl;if(e===f.WIDEVINE&&r)return r;throw new Error('no license server URL configured for key-system "'+e+'"')},t.getServerCertificateUrl=function(e){var t=this.config.drmSystems[e];if(t)return t.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+e+'"]')},t.attemptKeySystemAccess=function(e){var t=this,n=this.hls.levels,r=function(e,t,n){return!!e&&n.indexOf(e)===t},i=n.map((function(e){return e.audioCodec})).filter(r),a=n.map((function(e){return e.videoCodec})).filter(r);return i.length+a.length===0&&a.push("avc1.42e01e"),new Promise((function(n,r){!function e(o){var l=o.shift();t.getMediaKeysPromise(l,i,a).then((function(e){return n({keySystem:l,mediaKeys:e})})).catch((function(t){o.length?e(o):r(t instanceof Wn?t:new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))}(e)}))},t.requestMediaKeySystemAccess=function(e,t){var n=this.config.requestMediaKeySystemAccessFunc;if("function"!=typeof n){var r="Configured requestMediaKeySystemAccess is not a function "+n;return null===A&&"http:"===self.location.protocol&&(r="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(r))}return n(e,t)},t.getMediaKeysPromise=function(e,t,n){var r=this,i=function(e,t,n,r){var i;switch(e){case f.FAIRPLAY:i=["cenc","sinf"];break;case f.WIDEVINE:case f.PLAYREADY:i=["cenc"];break;case f.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+e)}return function(e,t,n,r){return[{initDataTypes:e,persistentState:r.persistentState||"not-allowed",distinctiveIdentifier:r.distinctiveIdentifier||"not-allowed",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:t.map((function(e){return{contentType:'audio/mp4; codecs="'+e+'"',robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null}})),videoCapabilities:n.map((function(e){return{contentType:'video/mp4; codecs="'+e+'"',robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}}))}]}(i,t,n,r)}(e,t,n,this.config.drmSystemOptions),a=this.keySystemAccessPromises[e],o=null==a?void 0:a.keySystemAccess;if(!o){this.log('Requesting encrypted media "'+e+'" key-system access with config: '+JSON.stringify(i)),o=this.requestMediaKeySystemAccess(e,i);var s=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch((function(t){r.log('Failed to obtain access to key-system "'+e+'": '+t)})),o.then((function(t){r.log('Access for key-system "'+t.keySystem+'" obtained');var n=r.fetchServerCertificate(e);return r.log('Create media-keys for "'+e+'"'),s.mediaKeys=t.createMediaKeys().then((function(t){return r.log('Media-keys created for "'+e+'"'),n.then((function(n){return n?r.setMediaKeysServerCertificate(t,e,n):t}))})),s.mediaKeys.catch((function(t){r.error('Failed to create media-keys for "'+e+'"}: '+t)})),s.mediaKeys}))}return o.then((function(){return a.mediaKeys}))},t.createMediaKeySessionContext=function(e){var t=e.decryptdata,n=e.keySystem,r=e.mediaKeys;this.log('Creating key-system session "'+n+'" keyId: '+Fn.default.hexDump(t.keyId||[]));var i=r.createSession(),a={decryptdata:t,keySystem:n,mediaKeys:r,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(a),a},t.renewKeySession=function(e){var t=e.decryptdata;if(t.pssh){var n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t);this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,"cenc",t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)},t.getKeyIdString=function(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return Fn.default.hexDump(e.keyId)},t.updateKeySession=function(e,t){var n,r=e.mediaKeysSession;return this.log('Updating key-session "'+r.sessionId+'" for keyID '+Fn.default.hexDump((null===(n=e.decryptdata)||void 0===n?void 0:n.keyId)||[])+"\n } (data length: "+(t?t.byteLength:t)+")"),r.update(t)},t.selectKeySystemFormat=function(e){var t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+e.sn+" "+e.type+": "+e.level+") key formats "+t.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise},t.getKeyFormatPromise=function(e){var t=this;return new Promise((function(n,r){var i=T(t.config),a=e.map(E).filter((function(e){return!!e&&-1!==i.indexOf(e)}));return t.getKeySystemSelectionPromise(a).then((function(e){var t=e.keySystem,i=k(t);i?n(i):r(new Error('Unable to find format for key-system "'+t+'"'))})).catch(r)}))},t.loadKey=function(e){var t=this,n=e.keyInfo.decryptdata,r=this.getKeyIdString(n),i="(keyId: "+r+' format: "'+n.keyFormat+'" method: '+n.method+" uri: "+n.uri+")";this.log("Starting session for key "+i);var a=this.keyIdToKeySessionPromise[r];return a||(a=this.keyIdToKeySessionPromise[r]=this.getKeySystemForKeyPromise(n).then((function(r){var a=r.keySystem,o=r.mediaKeys;return t.throwIfDestroyed(),t.log("Handle encrypted media sn: "+e.frag.sn+" "+e.frag.type+": "+e.frag.level+" using key "+i),t.attemptSetMediaKeys(a,o).then((function(){t.throwIfDestroyed();var e=t.createMediaKeySessionContext({keySystem:a,mediaKeys:o,decryptdata:n});return t.generateRequestWithPreferredKeySession(e,"cenc",n.pssh,"playlist-key")}))}))).catch((function(e){return t.handleError(e)})),a},t.throwIfDestroyed=function(e){if(void 0===e&&(e="Invalid state"),!this.hls)throw new Error("invalid state")},t.handleError=function(e){this.hls&&(this.error(e.message),e instanceof Wn?this.hls.trigger(o.Events.ERROR,e.data):this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))},t.getKeySystemForKeyPromise=function(e){var t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){var r=E(e.keyFormat),i=r?[r]:T(this.config);return this.attemptKeySystemAccess(i)}return n},t.getKeySystemSelectionPromise=function(e){if(e.length||(e=T(this.config)),0===e.length)throw new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(e)},t._onMediaEncrypted=function(e){var t=this,n=e.initDataType,r=e.initData;if(this.debug('"'+e.type+'" event: init data type: "'+n+'"'),null!==r){var i,a;if("sinf"===n&&this.config.drmSystems[f.FAIRPLAY]){var o=(0,w.bin2str)(new Uint8Array(r));try{var s=b(JSON.parse(o).sinf),l=(0,w.parseSinf)(new Uint8Array(s));if(!l)return;i=l.subarray(8,24),a=f.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{var u=(0,w.parsePssh)(r);if(null===u)return;0===u.version&&u.systemId===g.WIDEVINE&&u.data&&(i=u.data.subarray(8,24)),a=function(e){if(e===g.WIDEVINE)return f.WIDEVINE}(u.systemId)}if(a&&i){for(var c=Fn.default.hexDump(i),p=this.keyIdToKeySessionPromise,d=this.mediaKeySessions,h=p[c],y=function(e){var a=d[e],o=a.decryptdata;if(o.pssh||!o.keyId)return"continue";var s=Fn.default.hexDump(o.keyId);return c===s||-1!==o.uri.replace(/-/g,"").indexOf(c)?(h=p[s],delete p[s],o.pssh=new Uint8Array(r),o.keyId=i,h=p[c]=h.then((function(){return t.generateRequestWithPreferredKeySession(a,n,r,"encrypted-event-key-match")})),"break"):void 0},v=0;v<d.length;v++){var m=y(v);if("continue"!==m&&"break"===m)break}h||(h=p[c]=this.getKeySystemSelectionPromise([a]).then((function(e){var a,o=e.keySystem,s=e.mediaKeys;t.throwIfDestroyed();var l=new C("ISO-23001-7",c,null!=(a=k(o))?a:"");return l.pssh=new Uint8Array(r),l.keyId=i,t.attemptSetMediaKeys(o,s).then((function(){t.throwIfDestroyed();var e=t.createMediaKeySessionContext({decryptdata:l,keySystem:o,mediaKeys:s});return t.generateRequestWithPreferredKeySession(e,n,r,"encrypted-event-no-match")}))}))),h.catch((function(e){return t.handleError(e)}))}}},t._onWaitingForKey=function(e){this.log('"'+e.type+'" event')},t.attemptSetMediaKeys=function(e,t){var n=this,r=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'+e+'"');var i=Promise.all(r).then((function(){if(!n.media)throw new Error("Attempted to set mediaKeys without media element attached");return n.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(i),i.then((function(){n.log('Media-keys set for "'+e+'"'),r.push(i),n.setMediaKeysQueue=n.setMediaKeysQueue.filter((function(e){return-1===r.indexOf(e)}))}))},t.generateRequestWithPreferredKeySession=function(e,t,n,r){var i,a,o=this,l=null===(i=this.config.drmSystems)||void 0===i||null===(a=i[e.keySystem])||void 0===a?void 0:a.generateRequest;if(l)try{var u=l.call(this.hls,t,n,e);if(!u)throw new Error("Invalid response from configured generateRequest filter");t=u.initDataType,n=e.decryptdata.pssh=u.initData?new Uint8Array(u.initData):null}catch(e){var c;if(this.warn(e.message),null!==(c=this.hls)&&void 0!==c&&c.config.debug)throw e}if(null===n)return this.log('Skipping key-session request for "'+r+'" (no initData)'),Promise.resolve(e);var p=this.getKeyIdString(e.decryptdata);this.log('Generating key-session request for "'+r+'": '+p+" (init data type: "+t+" length: "+(n?n.byteLength:null)+")");var d=new(gt());e.mediaKeysSession.onmessage=function(t){var n=e.mediaKeysSession;if(n){var r=t.messageType,i=t.message;o.log('"'+r+'" message event for session "'+n.sessionId+'" message size: '+i.byteLength),"license-request"===r||"license-renewal"===r?o.renewLicense(e,i).catch((function(e){o.handleError(e),d.emit("error",e)})):"license-release"===r?e.keySystem===f.FAIRPLAY&&(o.updateKeySession(e,_("acknowledged")),o.removeSession(e)):o.warn('unhandled media key message type "'+r+'"')}else d.emit("error",new Error("invalid state"))},e.mediaKeysSession.onkeystatuseschange=function(t){if(e.mediaKeysSession){o.onKeyStatusChange(e);var n=e.keyStatus;d.emit("keyStatus",n),"expired"===n&&(o.warn(e.keySystem+" expired for key "+p),o.renewKeySession(e))}else d.emit("error",new Error("invalid state"))};var h=new Promise((function(e,t){d.on("error",t),d.on("keyStatus",(function(n){n.startsWith("usable")?e():"output-restricted"===n?t(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===n?t(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},'key status changed to "'+n+'"')):"expired"===n?t(new Error("key expired while generating request")):o.warn('unhandled key status change "'+n+'"')}))}));return e.mediaKeysSession.generateRequest(t,n).then((function(){var t;o.log('Request generated for key-session "'+(null===(t=e.mediaKeysSession)||void 0===t?void 0:t.sessionId)+'" keyId: '+p)})).catch((function(e){throw new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},"Error generating key-session request: "+e)})).then((function(){return h})).catch((function(t){throw d.removeAllListeners(),o.removeSession(e),t})).then((function(){return d.removeAllListeners(),e}))},t.onKeyStatusChange=function(e){var t=this;e.mediaKeysSession.keyStatuses.forEach((function(n,r){t.log('key status change "'+n+'" for keyStatuses keyId: '+Fn.default.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))+" session keyId: "+Fn.default.hexDump(new Uint8Array(e.decryptdata.keyId||[]))+" uri: "+e.decryptdata.uri),e.keyStatus=n}))},t.fetchServerCertificate=function(e){var t=this;return new Promise((function(n,r){var i=t.getServerCertificateUrl(e);if(!i)return n();t.log('Fetching serverCertificate for "'+e+'"');var a=new XMLHttpRequest;a.open("GET",i,!0),a.responseType="arraybuffer",a.onreadystatechange=function(){a.readyState===XMLHttpRequest.DONE&&(200===a.status?n(a.response):r(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:a},'"'+e+'" certificate request XHR failed ('+i+"). Status: "+a.status+" ("+a.statusText+")")))},a.send()}))},t.setMediaKeysServerCertificate=function(e,t,n){var r=this;return new Promise((function(i,a){e.setServerCertificate(n).then((function(a){r.log("setServerCertificate "+(a?"success":"not supported by CDM")+" ("+(null==n?void 0:n.byteLength)+') on "'+t+'"'),i(e)})).catch((function(e){a(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))},t.renewLicense=function(e,t){var n=this;return this.requestLicense(e,new Uint8Array(t)).then((function(t){return n.updateKeySession(e,new Uint8Array(t)).catch((function(e){throw new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))}))},t.setupLicenseXHR=function(e,t,n,r){var i=this,a=this.config.licenseXhrSetup;return a?Promise.resolve().then((function(){if(!n.decryptdata)throw new Error("Key removed");return a.call(i.hls,e,t,n,r)})).catch((function(o){if(!n.decryptdata)throw o;return e.open("POST",t,!0),a.call(i.hls,e,t,n,r)})).then((function(n){return e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:n||r}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))},t.requestLicense=function(e,t){var n=this;return new Promise((function(r,i){var a=n.getLicenseServerUrl(e.keySystem);n.log("Sending license request to URL: "+a);var o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=function(){if(!n.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(4===o.readyState)if(200===o.status){n._requestLicenseFailureCount=0;var l=o.response;n.log("License received "+(l instanceof ArrayBuffer?l.byteLength:l));var u=n.config.licenseResponseCallback;if(u)try{l=u.call(n.hls,o,a,e)}catch(e){n.error(e)}r(l)}else if(n._requestLicenseFailureCount++,n._requestLicenseFailureCount>3||o.status>=400&&o.status<500)i(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o},"License Request XHR failed ("+a+"). Status: "+o.status+" ("+o.statusText+")"));else{var c=3-n._requestLicenseFailureCount+1;n.warn("Retrying license request, "+c+" attempts left"),n.requestLicense(e,t).then(r,i)}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,n.setupLicenseXHR(o,a,e,t).then((function(e){var t=e.xhr,n=e.licenseChallenge;t.send(n)}))}))},t.onMediaAttached=function(e,t){if(this.config.emeEnabled){var n=t.media;this.media=n,n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}},t.onMediaDetached=function(){var t=this,n=this.media,r=this.mediaKeySessions;n&&(n.removeEventListener("encrypted",this.onMediaEncrypted),n.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},C.clearKeyUriToKeyIdMap();var i=r.length;e.CDMCleanupPromise=Promise.all(r.map((function(e){return t.removeSession(e)})).concat(null==n?void 0:n.setMediaKeys(null).catch((function(e){t.log("Could not clear media keys: "+e+". media.src: "+(null==n?void 0:n.src))})))).then((function(){i&&(t.log("finished closing key sessions and clearing media keys"),r.length=0)})).catch((function(e){t.log("Could not close sessions and clear media keys: "+e+". media.src: "+(null==n?void 0:n.src))}))},t.onManifestLoaded=function(e,t){var n=t.sessionKeys;if(n&&this.config.emeEnabled&&!this.keyFormatPromise){var r=n.reduce((function(e,t){return-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e}),[]);this.log("Selecting key-system from session-keys "+r.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(r)}},t.removeSession=function(e){var t=this,n=e.mediaKeysSession,r=e.licenseXhr;if(n){this.log("Remove licenses and keys and close session "+n.sessionId),n.onmessage=null,n.onkeystatuseschange=null,r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;var i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),n.remove().catch((function(e){t.log("Could not remove session: "+e)})).then((function(){return n.close()})).catch((function(e){t.log("Could not close session: "+e)}))}},e}();zn.CDMCleanupPromise=void 0;var Wn=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,n)||this).data=void 0,r.data=t,t.err=t.error,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Hn(t,n),r}(jn(Error));const Yn=zn;var qn,Xn,$n;function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}function Zn(e,t,n){return t&&Qn(e.prototype,t),n&&Qn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?er(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tr(){return(tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(qn||(qn={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(Xn||(Xn={})),function(e){e.VOD="v",e.LIVE="l"}($n||($n={}));var nr=function(){function e(t){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(e){try{n.apply(e,{ot:qn.MANIFEST,su:!n.initialized})}catch(e){l.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var t=e.frag,r=n.hls.levels[t.level],i=n.getObjectType(t),a={d:1e3*t.duration,ot:i};i!==qn.VIDEO&&i!==qn.AUDIO&&i!=qn.MUXED||(a.br=r.bitrate/1e3,a.tb=n.getTopBandwidth(i)/1e3,a.bl=n.getBufferLength(i)),n.apply(e,a)}catch(e){l.logger.warn("Could not generate segment CMCD data.",e)}},this.hls=t;var r=this.config=t.config,i=r.cmcd;null!=i&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||e.uuid(),this.cid=i.contentId,this.useHeaders=!0===i.useHeaders,this.registerListeners())}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},t.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},t.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},t.onBufferCreated=function(e,t){var n,r;this.audioBuffer=null===(n=t.tracks.audio)||void 0===n?void 0:n.buffer,this.videoBuffer=null===(r=t.tracks.video)||void 0===r?void 0:r.buffer},t.createData=function(){var e;return{v:1,sf:Xn.HLS,sid:this.sid,cid:this.cid,pr:null===(e=this.media)||void 0===e?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},t.apply=function(t,n){void 0===n&&(n={}),tr(n,this.createData());var r=n.ot===qn.INIT||n.ot===qn.VIDEO||n.ot===qn.MUXED;if(this.starved&&r&&(n.bs=!0,n.su=!0,this.starved=!1),null==n.su&&(n.su=this.buffering),this.useHeaders){var i=e.toHeaders(n);if(!Object.keys(i).length)return;t.headers||(t.headers={}),tr(t.headers,i)}else{var a=e.toQuery(n);if(!a)return;t.url=e.appendQueryToUri(t.url,a)}},t.getObjectType=function(e){var t=e.type;return"subtitle"===t?qn.TIMED_TEXT:"initSegment"===e.sn?qn.INIT:"audio"===t?qn.AUDIO:"main"===t?this.hls.audioTracks.length?qn.VIDEO:qn.MUXED:void 0},t.getTopBandwidth=function(e){var t,n=0,r=this.hls;if(e===qn.AUDIO)t=r.audioTracks;else{var i=r.maxAutoLevel,a=i>-1?i+1:r.levels.length;t=r.levels.slice(0,a)}for(var o,s=Jn(t);!(o=s()).done;){var l=o.value;l.bitrate>n&&(n=l.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===qn.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*Le.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},Zn(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},Zn(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},a=function(e){return 100*i(e/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(e){return encodeURIComponent(e)},rtp:a,tb:i},s=Jn(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var c=o[l];c&&(u=c(u));var p,d=typeof u;p="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),n.push(p)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},o=0,s=Object.keys(t);o<s.length;o++){var l=s[o];i[null!=a[l]?a[l]:1][l]=t[l]}for(var u=0;u<i.length;u++){var c=e.serialize(i[u]);c&&(n["CMCD-"+r[u]]=c)}return n},e.toQuery=function(t){return"CMCD="+encodeURIComponent(e.serialize(t))},e.appendQueryToUri=function(e,t){if(!t)return e;var n=e.includes("?")?"&":"?";return""+e+n+t},e}(),rr=n(408),ir=/^age:\s*[\d.]+\s*$/m;const ar=function(){function e(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e?e.xhrSetup:null,this.stats=new rr.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,t.url)}catch(e){n.open("GET",t.url,!0),i(n,t.url)}n.readyState||n.open("GET",t.url,!0);var a=this.context.headers;if(a)for(var o in a)n.setRequestHeader(o,a[o])}catch(e){return void this.callbacks.onError({code:n.status,text:e.message},t,n)}t.rangeEnd&&n.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),n.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var r=t.readyState,i=this.config;if(!n.aborted&&r>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===r){t.onreadystatechange=null,t.onprogress=null;var a=t.status,o="arraybuffer"===t.responseType;if(a>=200&&a<300&&(o&&t.response||null!==t.responseText)){var s,u;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),u=o?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=u,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var p={url:t.responseURL,data:s};this.callbacks.onSuccess(p,n,e,t)}else n.retry>=i.maxRetry||a>=400&&a<499?(l.logger.error(a+" while loading "+e.url),this.callbacks.onError({code:a,text:t.statusText},e,t)):(l.logger.warn(a+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,i.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)}},t.loadtimeout=function(){l.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&ir.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();function or(e){var t="function"==typeof Map?new Map:void 0;return(or=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return sr(e,arguments,cr(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ur(r,e)})(e)}function sr(e,t,n){return(sr=lr()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&ur(i,n.prototype),i}).apply(null,arguments)}function lr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ur(e,t){return(ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cr(e){return(cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pr(){return(pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var dr=function(){function e(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||fr,this.controller=new self.AbortController,this.stats=new rr.LoadStats}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},t.abortInternal=function(){var e=this.response;e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,n){var r=this,i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();var o=function(e,t){var n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(pr({},e.headers))};return e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),n}(e,this.controller.signal),s=n.onProgress,l="arraybuffer"===e.responseType,u=l?"byteLength":"length";this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,o),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){r.abortInternal(),n.onTimeout(i,e,r.response)}),t.timeout),self.fetch(this.request).then((function(n){if(r.response=r.loader=n,!n.ok){var o=n.status,u=n.statusText;throw new hr(u||"fetch, bad network response",o,n)}return i.loading.first=Math.max(self.performance.now(),i.loading.start),i.total=parseInt(n.headers.get("Content-Length")||"0"),s&&(0,a.isFiniteNumber)(t.highWaterMark)?r.loadProgressively(n,i,e,t.highWaterMark,s):l?n.arrayBuffer():n.text()})).then((function(o){var l=r.response;self.clearTimeout(r.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);var c=o[u];c&&(i.loaded=i.total=c);var p={url:l.url,data:o};s&&!(0,a.isFiniteNumber)(t.highWaterMark)&&s(i,e,o,l),n.onSuccess(p,i,e,l)})).catch((function(t){if(self.clearTimeout(r.requestTimeout),!i.aborted){var a=t&&t.code||0,o=t?t.message:null;n.onError({code:a,text:o},e,t?t.details:null)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.loadProgressively=function(e,t,n,r,i){void 0===r&&(r=0);var a=new At,o=e.body.getReader();return function s(){return o.read().then((function(o){if(o.done)return a.dataLength&&i(t,n,a.flush(),e),Promise.resolve(new ArrayBuffer(0));var l=o.value,u=l.length;return t.loaded+=u,u<r||a.dataLength?(a.push(l),a.dataLength>=r&&i(t,n,a.flush(),e)):i(t,n,l,e),s()})).catch((function(){return Promise.reject()}))}()},e}();function fr(e,t){return new self.Request(e.url,t)}var hr=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ur(t,n),r}(or(Error));const gr=dr;var yr=/\s/;function vr(){return(vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function mr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(n),!0).forEach((function(t){_r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _r(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Er=br(br({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:ar,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Tt,bufferController:Bt,capLevelController:Nn,fpsController:Un,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:A,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0},{cueHandler:{newCue:function(e,t,n,r){for(var i,a,o,s,l,u=[],c=self.VTTCue||self.TextTrackCue,p=0;p<r.rows.length;p++)if(o=!0,s=0,l="",!(i=r.rows[p]).isEmpty()){for(var d=0;d<i.chars.length;d++)yr.test(i.chars[d].uchar)&&o?s++:(l+=i.chars[d].uchar,o=!1);i.cueStartTime=t,t===n&&(n+=1e-4),s>=16?s--:s++;var f=gn(l.trim()),h=kn(t,n,f);e&&e.cues&&e.cues.getCueById(h)||((a=new c(t,n,f)).id=h,a.line=p+1,a.align="left",a.position=10+Math.min(80,10*Math.floor(8*s/32)),u.push(a))}return e&&u.length&&(u.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),u.forEach((function(t){return W(e,t)}))),u}},enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:Dt,subtitleTrackController:Mt,timelineController:Ln,audioStreamController:Ct,audioTrackController:It,emeController:Yn,cmcdController:nr});function kr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}var Tr=function(){function e(t){void 0===t&&(t={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new ht.EventEmitter,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var n=this.config=function(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return vr({},e,t)}(e.DefaultConfig,t);this.userConfig=t,(0,l.enableLogs)(n.debug,"Hls instance"),this._autoLevelCapping=-1,n.progressive&&function(e){var t=e.loader;t!==gr&&t!==ar?(l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}()&&(e.loader=gr,e.progressive=!0,e.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}(n);var r=n.abrController,i=n.bufferController,a=n.capLevelController,o=n.fpsController,s=this.abrController=new r(this),u=this.bufferController=new i(this),c=this.capLevelController=new a(this),p=new o(this),d=new G(this),f=new ee(this),h=this.levelController=new me(this),g=new be(this),y=new De(this.config),v=this.streamController=new _t(this,g,y);c.setStreamController(v),p.setStreamController(v);var m=[d,h,v];this.networkControllers=m;var b=[s,u,c,p,f,g];this.audioTrackController=this.createController(n.audioTrackController,m);var _=n.audioStreamController;_&&m.push(new _(this,g,y)),this.subtitleTrackController=this.createController(n.subtitleTrackController,m);var E=n.subtitleStreamController;E&&m.push(new E(this,g,y)),this.createController(n.timelineController,b),y.emeController=this.emeController=this.createController(n.emeController,b),this.cmcdController=this.createController(n.cmcdController,b),this.latencyController=this.createController(ne,b),this.coreComponents=b}e.isSupported=function(){return function(){var e=at();if(!e)return!1;var t=ot(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!r}()};var t,n,r,a=e.prototype;return a.createController=function(e,t){if(e){var n=new e(this);return t&&t.push(n),n}return null},a.on=function(e,t,n){void 0===n&&(n=this),this._emitter.on(e,t,n)},a.once=function(e,t,n){void 0===n&&(n=this),this._emitter.once(e,t,n)},a.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},a.off=function(e,t,n,r){void 0===n&&(n=this),this._emitter.off(e,t,n,r)},a.listeners=function(e){return this._emitter.listeners(e)},a.emit=function(e,t,n){return this._emitter.emit(e,t,n)},a.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){l.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,error:t})}return!1},a.listenerCount=function(e){return this._emitter.listenerCount(e)},a.destroy=function(){l.logger.log("destroy"),this.trigger(o.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(e){return e.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(e){return e.destroy()})),this.coreComponents.length=0},a.attachMedia=function(e){l.logger.log("attachMedia"),this._media=e,this.trigger(o.Events.MEDIA_ATTACHING,{media:e})},a.detachMedia=function(){l.logger.log("detachMedia"),this.trigger(o.Events.MEDIA_DETACHING,void 0),this._media=null},a.loadSource=function(e){this.stopLoad();var t=this.media,n=this.url,r=this.url=i.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});l.logger.log("loadSource:"+r),t&&n&&n!==r&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(t)),this.trigger(o.Events.MANIFEST_LOADING,{url:e})},a.startLoad=function(e){void 0===e&&(e=-1),l.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},a.stopLoad=function(){l.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},a.swapAudioCodec=function(){l.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},a.recoverMediaError=function(){l.logger.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},a.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},t=e,r=[{key:"version",get:function(){return"1.3.5"}},{key:"Events",get:function(){return o.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:Er},set:function(t){e.defaultConfig=t}}],(n=[{key:"levels",get:function(){return this.levelController.levels||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){l.logger.log("set currentLevel:"+e),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){l.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){l.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){l.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){l.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(l.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e)}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(e){re.indexOf(e)>-1&&(this._maxHdcpLevel=e)}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var n=e.length,r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e,t=this.levels,n=this.autoLevelCapping,r=this.maxHdcpLevel;if(e=-1===n&&t&&t.length?t.length-1:n,r)for(var i=e;i--;){var a=t[i].attrs["HDCP-LEVEL"];if(a&&a<=r)return i}return e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&kr(t.prototype,n),r&&kr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();Tr.defaultConfig=void 0},923:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseSegment:()=>p,ElementaryStreamTypes:()=>r,Fragment:()=>d,Part:()=>f});var r,i=n(965),a=n(945),o=n(408);function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,l(e,t)}function l(e,t){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}!function(e){e.AUDIO="audio",e.VIDEO="video",e.AUDIOVIDEO="audiovideo"}(r||(r={}));var p=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[r.AUDIO]=null,t[r.VIDEO]=null,t[r.AUDIOVIDEO]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var n=e.split("@",2),r=[];1===n.length?r[0]=t?t.byteRangeEndOffset:0:r[0]=parseInt(n[1]),r[1]=parseInt(n[0])+r[0],this._byteRange=r},c(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=(0,a.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),d=function(e){function t(t,n){var r;return(r=e.call(this,n)||this)._decryptdata=null,r.rawProgramDateTime=null,r.programDateTime=null,r.tagList=[],r.duration=0,r.sn=0,r.levelkeys=void 0,r.type=void 0,r.loader=null,r.keyLoader=null,r.level=-1,r.cc=0,r.startPTS=void 0,r.endPTS=void 0,r.appendedPTS=void 0,r.startDTS=void 0,r.endDTS=void 0,r.start=0,r.deltaPTS=void 0,r.maxStartPTS=void 0,r.minEndPTS=void 0,r.stats=new o.LoadStats,r.urlId=0,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.endList=void 0,r.type=t,r}s(t,e);var n=t.prototype;return n.setKeyFormat=function(e){if(this.levelkeys){var t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}},n.abortRequests=function(){var e,t;null===(e=this.loader)||void 0===e||e.abort(),null===(t=this.keyLoader)||void 0===t||t.abort()},n.setElementaryStreamInfo=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null},c(t,[{key:"decryptdata",get:function(){if(!this.levelkeys&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{var t=Object.keys(this.levelkeys);if(1===t.length)return this._decryptdata=this.levelkeys[t[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!(0,i.isFiniteNumber)(this.programDateTime))return null;var e=(0,i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;if(null!==(e=this._decryptdata)&&void 0!==e&&e.encrypted)return!0;if(this.levelkeys){var t=Object.keys(this.levelkeys),n=t.length;if(n>1||1===n&&this.levelkeys[t[0]].encrypted)return!0}return!1}}]),t}(p),f=function(e){function t(t,n,r,i,a){var s;(s=e.call(this,r)||this).fragOffset=0,s.duration=0,s.gap=!1,s.independent=!1,s.relurl=void 0,s.fragment=void 0,s.index=void 0,s.stats=new o.LoadStats,s.duration=t.decimalFloatingPoint("DURATION"),s.gap=t.bool("GAP"),s.independent=t.bool("INDEPENDENT"),s.relurl=t.enumeratedString("URI"),s.fragment=n,s.index=i;var l=t.enumeratedString("BYTERANGE");return l&&s.setByteRange(l,a),a&&(s.fragOffset=a.fragOffset+a.duration),s}return s(t,e),c(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(p)},408:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LoadStats:()=>r});var r=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},965:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MAX_SAFE_INTEGER:()=>i,isFiniteNumber:()=>r});var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},524:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y,flushTextTrackMetadataCueSamples:()=>m,flushTextTrackUserdataCueSamples:()=>b,normalizePts:()=>v});var r=n(965);const i=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},e}();var a=Math.pow(2,32)-1,o=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var a=r.length,o=a;a--;)t+=r[a].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a<o;a++)s.set(r[a],t),t+=r[a].byteLength;return s},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var r=Math.floor(n/(a+1)),i=Math.floor(n%(a+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var r=Math.floor(n/(a+1)),i=Math.floor(n%(a+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n<i.length;n++)r=i[n].flags,a[n+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,r,i,a=[],o=[];for(n=0;n<t.sps.length;n++)i=(r=t.sps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)i=(r=t.pps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,u=t.height,c=t.pixelRatio[0],p=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,p>>24,p>>16&255,p>>8&255,255&p])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?"mp3"===t.segmentCodec&&"mp3"===t.codec?e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,r=t.duration*t.timescale,i=t.width,o=t.height,s=Math.floor(r/(a+1)),l=Math.floor(r%(a+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var r=e.sdtp(t),i=t.id,o=Math.floor(n/(a+1)),s=Math.floor(n%(a+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,r.length+16+20+8+16+8+8),r)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,u=t.samples||[],c=u.length,p=12+16*c,d=new Uint8Array(p);for(n+=8+p,d.set(["video"===t.type?1:0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<c;r++)a=(i=u[r]).duration,o=i.size,s=i.flags,l=i.cts,d.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,d)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();o.types=void 0,o.HDLR_TYPES=void 0,o.STTS=void 0,o.STSC=void 0,o.STCO=void 0,o.STSZ=void 0,o.VMHD=void 0,o.SMHD=void 0,o.STSD=void 0,o.FTYP=void 0,o.DINF=void 0;const s=o;var l=n(851),u=n(973),c=n(93),p=n(308),d=n(673);function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=null,g=null,y=function(){function e(e,t,n,r){if(void 0===r&&(r=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,null===h){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);h=i?parseInt(i[1]):0}if(null===g){var a=navigator.userAgent.match(/Safari\/(\d+)/i);g=a?parseInt(a[1]):0}}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){c.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){c.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){c.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},t.getVideoStartPts=function(e){var t=!1,n=e.reduce((function(e,n){var r=n.pts-e;return r<-4294967296?(t=!0,v(e,n.pts)):r>0?e:n.pts}),e[0].pts);return t&&c.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var l,u,d,f,h,g,y=i,_=i,E=e.pid>-1,k=t.pid>-1,T=t.samples.length,A=e.samples.length>0,w=o&&T>0||T>1;if((!E||A)&&(!k||w)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(e,t,i));var S,C=this.isVideoContiguous,x=-1;if(w&&(x=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!C&&this.config.forceKeyFrameOnDiscontinuity))if(g=!0,x>0){c.logger.warn("[mp4-remuxer]: Dropped "+x+" out of "+T+" video samples due to a missing keyframe");var I=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(x),t.dropped+=x,S=_+=(t.samples[0].pts-I)/t.inputTimeScale}else-1===x&&(c.logger.warn("[mp4-remuxer]: No keyframe found out of "+T+" video samples"),g=!1);if(this.ISGenerated){if(A&&w){var P=this.getVideoStartPts(t.samples),D=(v(e.samples[0].pts,P)-P)/t.inputTimeScale;y+=Math.max(0,D),_+=Math.max(0,-D)}if(A){if(e.samplerate||(c.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,i)),u=this.remuxAudio(e,y,this.isAudioContiguous,a,k||w||s===p.PlaylistLevelType.AUDIO?_:void 0),w){var R=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(c.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,i)),l=this.remuxVideo(t,_,C,R)}}else w&&(l=this.remuxVideo(t,_,C,0));l&&(l.firstKeyFrame=x,l.independent=-1!==x,l.firstKeyFramePTS=S)}}return this.ISGenerated&&(n.samples.length&&(h=m(n,i,this._initPTS,this._initDTS)),r.samples.length&&(f=b(r,i,this._initPTS))),{audio:u,video:l,initSegment:d,independent:g,text:f,id3:h}},t.generateIS=function(e,t,n){var i,a,o,l=e.samples,u=t.samples,c=this.typeSupported,p={},d=!(0,r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(i=a=1/0),e.config&&l.length&&(e.timescale=e.samplerate,"mp3"===e.segmentCodec&&(c.mpeg?(f="audio/mpeg",e.codec=""):c.mp3&&(e.codec="mp3")),p.audio={id:"audio",container:f,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&c.mpeg?new Uint8Array(0):s.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(o=e.inputTimeScale,i=a=l[0].pts-Math.round(o*n))),t.sps&&t.pps&&u.length&&(t.timescale=t.inputTimeScale,p.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:s.initSegment([t]),metadata:{width:t.width,height:t.height}},d)){o=t.inputTimeScale;var h=this.getVideoStartPts(u),g=Math.round(o*n);a=Math.min(a,v(u[0].dts,h)-g),i=Math.min(i,h-g)}if(Object.keys(p).length)return this.ISGenerated=!0,d&&(this._initPTS=i,this._initDTS=a),{tracks:p,initPTS:i,timescale:o}},t.remuxVideo=function(e,t,n,r){var i,a,o=e.inputTimeScale,p=e.samples,y=[],m=p.length,b=this._initPTS,E=this.nextAvcDts,k=8,T=this.videoSampleDuration,A=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,S=!1;n&&null!==E||(E=t*o-(p[0].pts-v(p[0].dts,p[0].pts)));for(var C=0;C<m;C++){var x=p[C];x.pts=v(x.pts-b,E),x.dts=v(x.dts-b,E),x.dts<p[C>0?C-1:C].dts&&(S=!0)}S&&p.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),i=p[0].dts;var I=p[p.length-1].dts-i,P=I?Math.round(I/(m-1)):T||e.inputTimeScale/30;if(n){var D=i-E,R=D>P,O=D<-1;if((R||O)&&(R?c.logger.warn("AVC: "+(0,d.toMsFromMpegTsClock)(D,!0)+" ms ("+D+"dts) hole between fragments detected, filling it"):c.logger.warn("AVC: "+(0,d.toMsFromMpegTsClock)(-D,!0)+" ms ("+D+"dts) overlapping between fragments detected"),!O||E>p[0].pts)){i=E;var L=p[0].pts-D;p[0].dts=i,p[0].pts=L,c.logger.log("Video: First PTS/DTS adjusted: "+(0,d.toMsFromMpegTsClock)(L,!0)+"/"+(0,d.toMsFromMpegTsClock)(i,!0)+", delta: "+(0,d.toMsFromMpegTsClock)(D,!0)+" ms")}}i=Math.max(0,i);for(var M=0,N=0,U=0;U<m;U++){for(var F=p[U],j=F.units,B=j.length,V=0,H=0;H<B;H++)V+=j[H].data.length;N+=V,M+=B,F.length=V,F.dts=Math.max(F.dts,i),A=Math.min(F.pts,A),w=Math.max(F.pts,w)}a=p[m-1].dts;var K,G=N+4*M+8;try{K=new Uint8Array(G)}catch(e){return void this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:u.ErrorTypes.MUX_ERROR,details:u.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:G,reason:"fail allocating video mdat "+G})}var z=new DataView(K.buffer);z.setUint32(0,G),K.set(s.types.mdat,4);for(var W=!1,Y=Number.POSITIVE_INFINITY,q=Number.POSITIVE_INFINITY,X=Number.NEGATIVE_INFINITY,$=Number.NEGATIVE_INFINITY,Q=0;Q<m;Q++){for(var Z=p[Q],J=Z.units,ee=0,te=0,ne=J.length;te<ne;te++){var re=J[te],ie=re.data,ae=re.data.byteLength;z.setUint32(k,ae),k+=4,K.set(ie,k),k+=ae,ee+=4+ae}var oe=void 0;if(Q<m-1)T=p[Q+1].dts-Z.dts,oe=p[Q+1].pts-Z.pts;else{var se=this.config,le=Q>0?Z.dts-p[Q-1].dts:P;if(oe=Q>0?Z.pts-p[Q-1].pts:P,se.stretchShortVideoTrack&&null!==this.nextAudioPts){var ue=Math.floor(se.maxBufferHole*o),ce=(r?A+r*o:this.nextAudioPts)-Z.pts;ce>ue?((T=ce-le)<0?T=le:W=!0,c.logger.log("[mp4-remuxer]: It is approximately "+ce/90+" ms to the next segment; using duration "+T/90+" ms for the last video frame.")):T=le}else T=le}var pe=Math.round(Z.pts-Z.dts);Y=Math.min(Y,T),X=Math.max(X,T),q=Math.min(q,oe),$=Math.max($,oe),y.push(new _(Z.key,T,ee,pe))}if(y.length)if(h){if(h<70){var de=y[0].flags;de.dependsOn=2,de.isNonSync=0}}else if(g&&$-q<X-Y&&P/X<.025&&0===y[0].cts){c.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var fe=i,he=0,ge=y.length;he<ge;he++){var ye=fe+y[he].duration,ve=fe+y[he].cts;if(he<ge-1){var me=ye+y[he+1].cts;y[he].duration=me-ve}else y[he].duration=he?y[he-1].duration:P;y[he].cts=0,fe=ye}}T=W||!T?P:T,this.nextAvcDts=E=a+T,this.videoSampleDuration=T,this.isVideoContiguous=!0;var be={data1:s.moof(e.sequenceNumber++,i,f({},e,{samples:y})),data2:K,startPTS:A/o,endPTS:(w+T)/o,startDTS:i/o,endDTS:E/o,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:e.dropped};return e.samples=[],e.dropped=0,be},t.remuxAudio=function(e,t,n,r,a){var o=e.inputTimeScale,p=o/(e.samplerate?e.samplerate:o),d="aac"===e.segmentCodec?1024:1152,h=d*p,g=this._initPTS,y="mp3"===e.segmentCodec&&this.typeSupported.mpeg,m=[],b=void 0!==a,E=e.samples,k=y?0:8,T=this.nextAudioPts||-1,A=t*o;if(this.isAudioContiguous=n=n||E.length&&T>0&&(r&&Math.abs(A-T)<9e3||Math.abs(v(E[0].pts-g,A)-T)<20*h),E.forEach((function(e){e.pts=v(e.pts-g,A)})),!n||T<0){if(!(E=E.filter((function(e){return e.pts>=0}))).length)return;T=0===a?0:r&&!b?Math.max(0,A):E[0].pts}if("aac"===e.segmentCodec)for(var w=this.config.maxAudioFramesDrift,S=0,C=T;S<E.length;S++){var x=E[S],I=x.pts,P=I-C,D=Math.abs(1e3*P/o);if(P<=-w*h&&b)0===S&&(c.logger.warn("Audio frame @ "+(I/o).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*P/o)+" ms."),this.nextAudioPts=T=C=I);else if(P>=w*h&&D<1e4&&b){var R=Math.round(P/h);(C=I-R*h)<0&&(R--,C+=h),0===S&&(this.nextAudioPts=T=C),c.logger.warn("[mp4-remuxer]: Injecting "+R+" audio frame @ "+(C/o).toFixed(3)+"s due to "+Math.round(1e3*P/o)+" ms gap.");for(var O=0;O<R;O++){var L=Math.max(C,0),M=i.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);M||(c.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),M=x.unit.subarray()),E.splice(S,0,{unit:M,pts:L}),C+=h,S++}}x.pts=C,C+=h}for(var N,U=null,F=null,j=0,B=E.length;B--;)j+=E[B].unit.byteLength;for(var V=0,H=E.length;V<H;V++){var K=E[V],G=K.unit,z=K.pts;if(null!==F)m[V-1].duration=Math.round((z-F)/p);else{if(n&&"aac"===e.segmentCodec&&(z=T),U=z,!(j>0))return;j+=k;try{N=new Uint8Array(j)}catch(e){return void this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:u.ErrorTypes.MUX_ERROR,details:u.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}y||(new DataView(N.buffer).setUint32(0,j),N.set(s.types.mdat,4))}N.set(G,k);var W=G.byteLength;k+=W,m.push(new _(!0,d,W,0)),F=z}var Y=m.length;if(Y){var q=m[m.length-1];this.nextAudioPts=T=F+p*q.duration;var X=y?new Uint8Array(0):s.moof(e.sequenceNumber++,U/p,f({},e,{samples:m}));e.samples=[];var $=U/o,Q=T/o,Z={data1:X,data2:N,startPTS:$,endPTS:Q,startDTS:$,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:Y};return this.isAudioContiguous=!0,Z}},t.remuxEmptyAudio=function(e,t,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,l=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,p=1024*o,d=Math.ceil((u-l)/p),f=i.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(c.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var h=[],g=0;g<d;g++){var y=l+g*p;h.push({unit:f,pts:y,dts:y})}return e.samples=h,this.remuxAudio(e,t,n,!1)}c.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},e}();function v(e,t){var n;if(null===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}function m(e,t,n,r){var i=e.samples.length;if(i){for(var a=e.inputTimeScale,o=0;o<i;o++){var s=e.samples[o];s.pts=v(s.pts-n,t*a)/a,s.dts=v(s.dts-r,t*a)/a}var l=e.samples;return e.samples=[],{samples:l}}}function b(e,t,n){var r=e.samples.length;if(r){for(var i=e.inputTimeScale,a=0;a<r;a++){var o=e.samples[a];o.pts=v(o.pts-n,t*i)/i}e.samples.sort((function(e,t){return e.pts-t.pts}));var s=e.samples;return e.samples=[],{samples:s}}}var _=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags=new E(e)},E=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},856:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{MetadataSchema:()=>r}),function(e){e.audioId3="org.id3",e.dateRange="com.apple.quicktime.HLS",e.emsg="https://aomedia.org/emsg/ID3"}(r||(r={}))},308:(e,t,n)=>{"use strict";var r,i;n.r(t),n.d(t,{PlaylistContextType:()=>r,PlaylistLevelType:()=>i}),function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(i||(i={}))},300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={hexDump:function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].toString(16);r.length<2&&(r="0"+r),t+=r}return t}}},93:(e,t,n)=>{"use strict";n.r(t),n.d(t,{enableLogs:()=>s,logger:()=>l});var r=function(){},i={trace:r,debug:r,log:r,warn:r,info:r,error:r},a=i;function o(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):r}function s(e,t){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach((function(t){a[t]=e[t]?e[t].bind(e):o(t)}))}(e,"debug","log","info","warn","error");try{a.log('Debug logs enabled for "'+t+'"')}catch(e){a=i}}else a=i}var l=i},63:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RemuxerTrackIdConfig:()=>c,appendUint8Array:()=>S,bin2str:()=>p,computeRawDurationFromSamples:()=>T,discardEPB:()=>P,findBox:()=>y,getDuration:()=>k,getStartDTS:()=>E,mp4Box:()=>R,mp4pssh:()=>O,offsetStartDTS:()=>A,parseEmsg:()=>D,parseInitSegment:()=>m,parsePssh:()=>L,parseSEIMessageFromNALu:()=>I,parseSamples:()=>C,parseSegmentIndex:()=>v,parseSinf:()=>_,patchEncyptionData:()=>b,readSint32:()=>h,readUint16:()=>d,readUint32:()=>f,segmentValidRange:()=>w,writeUint32:()=>g});var r=n(923),i=n(145),a=n(181),o=n(93),s=n(300),l=Math.pow(2,32)-1,u=[].push,c={video:1,audio:2,id3:3,text:4};function p(e){return String.fromCharCode.apply(null,e)}function d(e,t){var n=e[t]<<8|e[t+1];return n<0?65536+n:n}function f(e,t){var n=h(e,t);return n<0?4294967296+n:n}function h(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function g(e,t,n){e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function y(e,t){var n=[];if(!t.length)return n;for(var r=e.byteLength,i=0;i<r;){var a=f(e,i),o=a>1?i+a:r;if(p(e.subarray(i+4,i+8))===t[0])if(1===t.length)n.push(e.subarray(i+8,o));else{var s=y(e.subarray(i+8,o),t.slice(1));s.length&&u.apply(n,s)}i=o}return n}function v(e){var t=[],n=e[0],r=8,i=f(e,r);r+=4,r+=0===n?8:16,r+=2;var a=e.length+0,o=d(e,r);r+=2;for(var s=0;s<o;s++){var l=r,u=f(e,l);l+=4;var c=2147483647&u;if(1==(2147483648&u)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var p=f(e,l);l+=4,t.push({referenceSize:c,subsegmentDuration:p,info:{duration:p/i,start:a,end:a+c-1}}),a+=c,r=l+=4}return{earliestPresentationTime:0,timescale:i,version:n,referencesCount:o,references:t}}function m(e){for(var t=[],n=y(e,["moov","trak"]),i=0;i<n.length;i++){var a=n[i],o=y(a,["tkhd"])[0];if(o){var s=o[0],l=0===s?12:20,u=f(o,l),c=y(a,["mdia","mdhd"])[0];if(c){var d=f(c,l=0===(s=c[0])?12:20),h=y(a,["mdia","hdlr"])[0];if(h){var g=p(h.subarray(8,12)),v={soun:r.ElementaryStreamTypes.AUDIO,vide:r.ElementaryStreamTypes.VIDEO}[g];if(v){var m=y(a,["mdia","minf","stbl","stsd"])[0],b=void 0;m&&(b=p(m.subarray(12,16))),t[u]={timescale:d,type:v},t[v]={timescale:d,id:u,codec:b}}}}}}return y(e,["moov","mvex","trex"]).forEach((function(e){var n=f(e,4),r=t[n];r&&(r.default={duration:f(e,12),flags:f(e,20)})})),t}function b(e,t){if(!e||!t)return e;var n=t.keyId;return n&&t.isCommonEncryption&&y(e,["moov","trak"]).forEach((function(e){var t=y(e,["mdia","minf","stbl","stsd"])[0].subarray(8),r=y(t,["enca"]),i=r.length>0;i||(r=y(t,["encv"])),r.forEach((function(e){y(i?e.subarray(28):e.subarray(78),["sinf"]).forEach((function(e){var t=_(e);if(t){var r=t.subarray(8,24);r.some((function(e){return 0!==e}))||(o.logger.log("[eme] Patching keyId in 'enc"+(i?"a":"v")+">sinf>>tenc' box: "+s.default.hexDump(r)+" -> "+s.default.hexDump(n)),t.set(n,8))}}))}))})),e}function _(e){var t=y(e,["schm"])[0];if(t){var n=p(t.subarray(4,8));if("cbcs"===n||"cenc"===n)return y(e,["schi","tenc"])[0]}return o.logger.error("[eme] missing 'schm' box"),null}function E(e,t){return y(t,["moof","traf"]).reduce((function(t,n){var r=y(n,["tfdt"])[0],i=r[0],a=y(n,["tfhd"]).reduce((function(t,n){var a=f(n,4),o=e[a];if(o){var s=f(r,4);1===i&&(s*=Math.pow(2,32),s+=f(r,8));var l=s/(o.timescale||9e4);if(isFinite(l)&&(null===t||l<t))return l}return t}),null);return null!==a&&isFinite(a)&&(null===t||a<t)?a:t}),null)||0}function k(e,t){for(var n=0,i=0,a=0,o=y(e,["moof","traf"]),s=0;s<o.length;s++){var l=o[s],u=y(l,["tfhd"])[0],c=t[f(u,4)];if(c){var p=c.default,d=f(u,0)|(null==p?void 0:p.flags),h=null==p?void 0:p.duration;8&d&&(h=f(u,2&d?12:8));for(var g=c.timescale||9e4,m=y(l,["trun"]),b=0;b<m.length;b++)!(n=T(m[b]))&&h&&(n=h*f(m[b],4)),c.type===r.ElementaryStreamTypes.VIDEO?i+=n/g:c.type===r.ElementaryStreamTypes.AUDIO&&(a+=n/g)}}if(0===i&&0===a){for(var _=0,E=y(e,["sidx"]),k=0;k<E.length;k++){var A=v(E[k]);null!=A&&A.references&&(_+=A.references.reduce((function(e,t){return e+t.info.duration||0}),0))}return _}return i||a}function T(e){var t=f(e,0),n=8;1&t&&(n+=4),4&t&&(n+=4);for(var r=0,i=f(e,4),a=0;a<i;a++)256&t&&(r+=f(e,n),n+=4),512&t&&(n+=4),1024&t&&(n+=4),2048&t&&(n+=4);return r}function A(e,t,n){y(t,["moof","traf"]).forEach((function(t){y(t,["tfhd"]).forEach((function(r){var i=f(r,4),a=e[i];if(a){var o=a.timescale||9e4;y(t,["tfdt"]).forEach((function(e){var t=e[0],r=f(e,4);if(0===t)r-=n*o,g(e,4,r=Math.max(r,0));else{r*=Math.pow(2,32),r+=f(e,8),r-=n*o,r=Math.max(r,0);var i=Math.floor(r/(l+1)),a=Math.floor(r%(l+1));g(e,4,i),g(e,8,a)}}))}}))}))}function w(e){var t={valid:null,remainder:null},n=y(e,["moof"]);if(!n)return t;if(n.length<2)return t.remainder=e,t;var r=n[n.length-1];return t.valid=(0,i.sliceUint8)(e,0,r.byteOffset-8),t.remainder=(0,i.sliceUint8)(e,r.byteOffset-8),t}function S(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function C(e,t){var n=[],i=t.samples,a=t.timescale,o=t.id,s=!1;return y(i,["moof"]).map((function(l){var u=l.byteOffset-8;y(l,["traf"]).map((function(l){var c=y(l,["tfdt"]).map((function(e){var t=e[0],n=f(e,4);return 1===t&&(n*=Math.pow(2,32),n+=f(e,8)),n/a}))[0];return void 0!==c&&(e=c),y(l,["tfhd"]).map((function(c){var p=f(c,4),d=16777215&f(c,0),g=0,v=0!=(16&d),m=0,b=0!=(32&d),_=8;p===o&&(0!=(1&d)&&(_+=8),0!=(2&d)&&(_+=4),0!=(8&d)&&(g=f(c,_),_+=4),v&&(m=f(c,_),_+=4),b&&(_+=4),"video"===t.type&&(s=function(e){if(!e)return!1;var t=e.indexOf("."),n=t<0?e:e.substring(0,t);return"hvc1"===n||"hev1"===n||"dvh1"===n||"dvhe"===n}(t.codec)),y(l,["trun"]).map((function(o){var l=o[0],c=16777215&f(o,0),p=0!=(1&c),d=0,y=0!=(4&c),v=0!=(256&c),b=0,_=0!=(512&c),E=0,k=0!=(1024&c),T=0!=(2048&c),A=0,w=f(o,4),S=8;p&&(d=f(o,S),S+=4),y&&(S+=4);for(var C=d+u,P=0;P<w;P++){if(v?(b=f(o,S),S+=4):b=g,_?(E=f(o,S),S+=4):E=m,k&&(S+=4),T&&(A=0===l?f(o,S):h(o,S),S+=4),t.type===r.ElementaryStreamTypes.VIDEO)for(var D=0;D<E;){var R=f(i,C);x(s,i[C+=4])&&I(i.subarray(C,C+R),s?2:1,e+A/a,n),C+=R,D+=R+4}e+=b/a}})))}))}))})),n}function x(e,t){if(e){var n=t>>1&63;return 39===n||40===n}return 6==(31&t)}function I(e,t,n,r){var i=P(e),o=0;o+=t;for(var s=0,l=0,u=!1,c=0;o<i.length;){s=0;do{if(o>=i.length)break;s+=c=i[o++]}while(255===c);l=0;do{if(o>=i.length)break;l+=c=i[o++]}while(255===c);var p=i.length-o;if(!u&&4===s&&o<i.length){if(u=!0,181===i[o++]){var h=d(i,o);if(o+=2,49===h){var g=f(i,o);if(o+=4,1195456820===g){var y=i[o++];if(3===y){var v=i[o++],m=64&v,b=m?2+3*(31&v):0,_=new Uint8Array(b);if(m){_[0]=v;for(var E=1;E<b;E++)_[E]=i[o++]}r.push({type:y,payloadType:s,pts:n,bytes:_})}}}}}else if(5===s&&l<p){if(u=!0,l>16){for(var k=[],T=0;T<16;T++){var A=i[o++].toString(16);k.push(1==A.length?"0"+A:A),3!==T&&5!==T&&7!==T&&9!==T||k.push("-")}for(var w=l-16,S=new Uint8Array(w),C=0;C<w;C++)S[C]=i[o++];r.push({payloadType:s,pts:n,uuid:k.join(""),userData:(0,a.utf8ArrayToStr)(S),userDataBytes:S})}}else if(l<p)o+=l;else if(l>p)break}}function P(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;var i=t-n.length,a=new Uint8Array(i),o=0;for(r=0;r<i;o++,r++)o===n[0]&&(o++,n.shift()),a[r]=e[o];return a}function D(e){var t=e[0],n="",r="",i=0,a=0,o=0,s=0,l=0,u=0;if(0===t){for(;"\0"!==p(e.subarray(u,u+1));)n+=p(e.subarray(u,u+1)),u+=1;for(n+=p(e.subarray(u,u+1)),u+=1;"\0"!==p(e.subarray(u,u+1));)r+=p(e.subarray(u,u+1)),u+=1;r+=p(e.subarray(u,u+1)),u+=1,i=f(e,12),a=f(e,16),s=f(e,20),l=f(e,24),u=28}else if(1===t){i=f(e,u+=4);var c=f(e,u+=4),d=f(e,u+=4);for(u+=4,o=Math.pow(2,32)*c+d,Number.isSafeInteger(o)||(o=Number.MAX_SAFE_INTEGER,console.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),s=f(e,u),l=f(e,u+=4),u+=4;"\0"!==p(e.subarray(u,u+1));)n+=p(e.subarray(u,u+1)),u+=1;for(n+=p(e.subarray(u,u+1)),u+=1;"\0"!==p(e.subarray(u,u+1));)r+=p(e.subarray(u,u+1)),u+=1;r+=p(e.subarray(u,u+1)),u+=1}return{schemeIdUri:n,value:r,timeScale:i,presentationTime:o,presentationTimeDelta:a,eventDuration:s,id:l,payload:e.subarray(u,e.byteLength)}}function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=n.length,a=8,o=i;o--;)a+=n[o].byteLength;var s=new Uint8Array(a);for(s[0]=a>>24&255,s[1]=a>>16&255,s[2]=a>>8&255,s[3]=255&a,s.set(e,4),o=0,a=8;o<i;o++)s.set(n[o],a),a+=n[o].byteLength;return s}function O(e,t,n){if(16!==e.byteLength)throw new RangeError("Invalid system id");var r,i,a;if(t){r=1,i=new Uint8Array(16*t.length);for(var o=0;o<t.length;o++){var s=t[o];if(16!==s.byteLength)throw new RangeError("Invalid key");i.set(s,16*o)}}else r=0,i=new Uint8Array;r>0?(a=new Uint8Array(4),t.length>0&&new DataView(a.buffer).setUint32(0,t.length,!1)):a=new Uint8Array;var l=new Uint8Array(4);return n&&n.byteLength>0&&new DataView(l.buffer).setUint32(0,n.byteLength,!1),R([112,115,115,104],new Uint8Array([r,0,0,0]),e,a,i,l,n||new Uint8Array)}function L(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;var t={version:0,systemId:"",kids:null,data:null},n=new DataView(e),r=n.getUint32(0);if(e.byteLength!==r&&r>44)return null;if(1886614376!==n.getUint32(4))return null;if(t.version=n.getUint32(8)>>>24,t.version>1)return null;t.systemId=s.default.hexDump(new Uint8Array(e,12,16));var i=n.getUint32(28);if(0===t.version){if(r-32<i)return null;t.data=new Uint8Array(e,32,i)}else if(1===t.version){t.kids=[];for(var a=0;a<i;a++)t.kids.push(new Uint8Array(e,32+16*a,16))}return t}},673:(e,t,n)=>{"use strict";function r(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function i(e,t,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),r(e,t,1/n,i)}function a(e,t){return void 0===t&&(t=!1),r(e,1e3,1/9e4,t)}function o(e,t){return void 0===t&&(t=1),r(e,9e4,1/t)}n.r(t),n.d(t,{toMpegTsClockFromTimescale:()=>o,toMsFromMpegTsClock:()=>a,toTimescaleFromBase:()=>r,toTimescaleFromScale:()=>i})},145:(e,t,n)=>{"use strict";function r(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}n.r(t),n.d(t,{sliceUint8:()=>r})},729:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,a||e,o),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,o=new Array(a);i<a;i++)o[i]=r[i].fn;return o},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,a,o){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],p=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),p){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,a),!0;case 6:return c.fn.call(c.context,t,r,i,a,o),!0}for(u=1,l=new Array(p-1);u<p;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),p){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(d=1,l=new Array(p-1);d<p;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||o(this,a);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[a]=1===u.length?u[0]:u:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s},945:function(e){var t,n,r,i,a;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,i=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var i=a.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var o=a.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return r.alwaysNormalize?(o.path=a.normalizePath(o.path),a.buildURLFromParts(o)):t;var s=a.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=n.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(u.netLoc=s.netLoc,"/"!==o.path[0]))if(o.path){var c=s.path,p=c.substring(0,c.lastIndexOf("/")+1)+o.path;u.path=a.normalizePath(p)}else u.path=s.path,o.params||(u.params=s.params,o.query||(u.query=s.query));return null===u.path&&(u.path=r.alwaysNormalize?a.normalizePath(o.path):o.path),a.buildURLFromParts(u)},parseURL:function(e){var n=t.exec(e);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(i,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}return n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(76).default})(),e.exports=r())},function(e,t,n){var r,i;window,e.exports=(r=n(0),i=n(318),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=r},function(e,t){e.exports=i},function(e){e.exports=JSON.parse('{"shakaConfig":{"streaming":{"ignoreTextStreamFailures":true,"bufferingGoal":60,"alwaysStreamText":true},"abr":{"enabled":true,"restrictions":{}}},"forceRedirectExternalStreams":false,"trackEmsgEvents":true,"switchDynamicToStatic":false}')},function(e,t,n){(t=n(5)(!1)).push([e.i,".shaka-text-container {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n width: 100%;\n min-width: 48px;\n transition: bottom cubic-bezier(0.4, 0, 0.6, 1) 0.1s;\n transition-delay: 0s;\n font-size: 20px;\n line-height: 1.4;\n color: #fff;\n font-family: Roboto-Regular, Roboto, sans-serif, TengwarTelcontar;\n}\n.shaka-text-container span.shaka-text-wrapper {\n display: inline;\n background: 0 0;\n text-align: center;\n}\n\n:fullscreen .shaka-text-container {\n font-size: 4.4vmin;\n}\n\n:-webkit-full-screen .shaka-text-container {\n font-size: 4.4vmin;\n}\n\n:-moz-full-screen .shaka-text-container {\n font-size: 4.4vmin;\n}\n\n:-ms-fullscreen .shaka-text-container {\n font-size: 4.4vmin;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],i=0;i<e.length;i++){var s=e[i],l=t.base?s[0]+t.base:s[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var p=o(c),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(a[p].references++,a[p].updater(d)):a.push({identifier:c,updater:g(d,t),references:1}),r.push(c)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,c=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function d(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,h=0;function g(e,t){var n,r,i;if(t.singleton){var a=h++;n=f||(f=l(t)),r=p.bind(null,n,a,!1),i=p.bind(null,n,a,!0)}else n=l(t),r=d.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=o(n[r]);a[i].references--}for(var l=s(e,t),u=0;u<n.length;u++){var c=o(n[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=l}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(n=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return X})),n.d(t,"NAME",(function(){return $}));var r,i,a,o,s,l,u,c=n(0),p=n(1),d=n.n(p),f=(i=r=function(){function e(){}return e.isConfigured=function(e,t){return c.DrmScheme.WIDEVINE===t.keySystem&&!!e.find((function(e){return e.scheme===t.keySystem}))},e.canPlayDrm=function(t){return e._logger.debug("Can play DRM scheme of: "+c.DrmScheme.WIDEVINE),!!t.find((function(e){return e.scheme===c.DrmScheme.WIDEVINE}))},e.setDrmPlayback=function(t,n){e._logger.debug("Sets drm playback");var r,i,a=c.Env.browser.name,o=n.find((function(e){return e.scheme===c.DrmScheme.WIDEVINE}));o&&(t.drm={servers:(r={},r[c.DrmScheme.WIDEVINE]=o.licenseUrl,r),advanced:{}},"Chrome"===a&&(t.drm.advanced=((i={})[c.DrmScheme.WIDEVINE]={videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},i)))},e}(),a=r,o="_logger",s=Object(c.getLogger)("Widevine"),o in a?Object.defineProperty(a,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[o]=s,i),h=(u=l=function(){function e(){}return e.isConfigured=function(e,t){return c.DrmScheme.PLAYREADY===t.keySystem&&!!e.find((function(e){return e.scheme===t.keySystem}))},e.canPlayDrm=function(t){return e._logger.debug("Can play DRM scheme of: "+c.DrmScheme.PLAYREADY),!!t.find((function(e){return e.scheme===c.DrmScheme.PLAYREADY}))},e.setDrmPlayback=function(t,n){e._logger.debug("Sets drm playback");var r,i=n.find((function(e){return e.scheme===c.DrmScheme.PLAYREADY}));i&&(t.drm={servers:(r={},r[c.DrmScheme.PLAYREADY]=i.licenseUrl,r)})},e}(),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(l,"_logger",Object(c.getLogger)("PlayReady")),u),g=n(2),y=n(4),v=n.n(y),m=n(3),b=n.n(m);function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}v()(b.a,{insert:"head",singleton:!1}),b.a.locals;var E=function(){function e(e){this._media=A.parseAttr(e,T.AttributeTypes.MEDIA),this._startNumber=A.parseAttr(e,T.AttributeTypes.START_NUMBER,A.parseInt,1),this._duration=A.parseAttr(e,T.AttributeTypes.DURATION,A.parseFloat),this._timescale=A.parseAttr(e,T.AttributeTypes.TIMESCALE,A.parsePositiveInt,1),this._presentationTimeOffset=A.parseAttr(e,T.AttributeTypes.PRESENTATION_TIME_OFFSET,A.parseInt,0),this._endNumber=A.parseAttr(e,T.AttributeTypes.END_NUMBER,A.parsePositiveInt)}var t,n;return t=e,(n=[{key:"media",get:function(){return this._media}},{key:"startNumber",get:function(){return this._startNumber}},{key:"duration",get:function(){return this._duration}},{key:"timescale",get:function(){return this._timescale}},{key:"presentationTimeOffset",get:function(){return this._presentationTimeOffset}},{key:"endNumber",get:function(){return this._endNumber}}])&&_(t.prototype,n),e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(E,"MediaTemplateType",{REPRESENTATION:"$RepresentationID$",NUMBER:"$Number$",BANDWIDTH:"$Bandwidth$",TIME:"$Time$"});var k=function(e,t){var n=t.id,r=t.index,i=t.bitrate,a=t.time,o=e.match(/\$([a-zA-Z]+)\$/g),s=function(e,t,n){return n?e.replace(t,n):e};return o&&o.forEach((function(t){switch(t){case E.MediaTemplateType.REPRESENTATION:e=s(e,t,n);break;case E.MediaTemplateType.NUMBER:e=s(e,t,r);break;case E.MediaTemplateType.BANDWIDTH:e=s(e,t,i);break;case E.MediaTemplateType.TIME:e=s(e,t,a)}})),e},T={TagTypes:{BASE_URL:"BaseURL",SEGMENT_TEMPLATE:"SegmentTemplate",REPRESENTATION:"Representation",ESSENTIAL_PROPERTY:"EssentialProperty",ADAPTATION_SET:"AdaptationSet"},AttributeTypes:{BASE_URL:"BaseURL",ID:"id",CONTENT_TYPE:"contentType",MIME_TYPE:"mimeType",MEDIA:"media",DURATION:"duration",START_NUMBER:"startNumber",TIMESCALE:"timescale",PRESENTATION_TIME_OFFSET:"presentationTimeOffset",END_NUMBER:"endNumber",BANDWIDTH:"bandwidth",WIDTH:"width",HEIGHT:"height",SCHEME_ID_URI:"schemeIdUri",VALUE:"value"}},A={parseXml:function(e){return(new DOMParser).parseFromString(e,"text/xml")},parseAttr:function(e,t,n,r){var i=null,a=e.getAttribute(t);return null!==a&&(i=n?n(a):a),null==i?r:i},findElements:function(e,t){return e.getElementsByTagName(t)},findChild:function(e,t){var n=this.findChildren(e,t);return 1!==n.length?null:n[0]},findChildren:function(e,t){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.tagName===t}))},parseInt:function(e){var t=Number(e);return t%1==0?t:null},parsePositiveInt:function(e){var t=Number(e);return t%1==0&&t>0?t:null},parseFloat:function(e){var t=Number(e);return isNaN(t)?null:t}};function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var S=function(){function e(e){this._schemeIdUri=A.parseAttr(e,T.AttributeTypes.SCHEME_ID_URI),this._value=A.parseAttr(e,T.AttributeTypes.VALUE)}var t,n;return t=e,(n=[{key:"schemeIdUri",get:function(){return this._schemeIdUri}},{key:"value",get:function(){return this._value}}])&&w(t.prototype,n),e}();function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var x=function(){function e(e){this._id=A.parseAttr(e,T.AttributeTypes.ID),this._bandwidth=A.parseAttr(e,T.AttributeTypes.BANDWIDTH,parseInt),this._width=A.parseAttr(e,T.AttributeTypes.WIDTH,parseInt),this._height=A.parseAttr(e,T.AttributeTypes.HEIGHT,parseInt);var t=A.findChild(e,T.TagTypes.ESSENTIAL_PROPERTY);t&&(this._essentialProperty=new S(t))}var t,n;return t=e,(n=[{key:"bandwidth",get:function(){return this._bandwidth}},{key:"id",get:function(){return this._id}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"essentialProperty",get:function(){return this._essentialProperty}}])&&C(t.prototype,n),e}();function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var P=function(){function e(e){this._id=A.parseAttr(e,T.AttributeTypes.ID),this._mimeType=A.parseAttr(e,T.AttributeTypes.MIME_TYPE),this._contentType=A.parseAttr(e,T.AttributeTypes.CONTENT_TYPE),this._representations=Array.from(A.findChildren(e,T.TagTypes.REPRESENTATION)).map((function(e){return new x(e)}));var t=A.findChild(e,T.TagTypes.SEGMENT_TEMPLATE);t&&(this._segmentTemplate=new E(t));var n=A.findChild(e,T.TagTypes.ESSENTIAL_PROPERTY);n&&(this._essentialProperty=new S(n))}var t,n;return t=e,(n=[{key:"id",get:function(){return this._id}},{key:"mimeType",get:function(){return this._mimeType}},{key:"contentType",get:function(){return this._contentType}},{key:"segmentTemplate",get:function(){return this._segmentTemplate}},{key:"essentialProperty",get:function(){return this._essentialProperty}},{key:"representations",get:function(){return this._representations}}])&&I(t.prototype,n),e}();function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(P,"ContentType",{VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image"});var O=function(){function e(e){var t,n=this;R(this,"_logger",Object(c.getLogger)("DashManifestParser")),R(this,"_parseAdaptionSets",(function(){var e=A.findElements(n._xmlDoc,T.TagTypes.BASE_URL);e&&e.length>0&&e[0].innerHTML&&(n._baseURL=e[0].textContent);var t=A.findElements(n._xmlDoc,T.TagTypes.ADAPTATION_SET),r=Array.from(t).filter((function(e){return A.parseAttr(e,T.AttributeTypes.CONTENT_TYPE)===P.ContentType.IMAGE}));r.length>0?(n._adaptationSets=r.map((function(e){return new P(e)})),n._logger.debug("Found image adaptation set",n._adaptationSets)):n._logger.debug("No image adaptations were found in manifest")})),this._logger.debug("Initialize manifest parser"),this._adaptationSets=[],(t=e instanceof ArrayBuffer?function(e){return TextDecoder?(new TextDecoder).decode(new Uint8Array(e)):null}(e):e)&&(this._xmlDoc=A.parseXml(t))}e.isValid=function(){return window.TextEncoder&&window.TextDecoder};var t,n,r=e.prototype;return r.parseManifest=function(){try{this._logger.debug("Start parsing dash manifest"),this._parseAdaptionSets(),this._logger.debug("Manifest parsing finished successfully")}catch(e){this._logger.warn("Manifest parsing failed",e)}},r.getBaseUrl=function(){return this._baseURL||""},r.getImageSet=function(){return this._adaptationSets.find((function(e){return e.contentType===P.ContentType.IMAGE}))},r.hasImageSet=function(){return!!this.getImageSet()},t=e,(n=[{key:"adaptationSets",get:function(){return this._adaptationSets}}])&&D(t.prototype,n),e}();function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M=function(){function e(e,t,n){var r=this;L(this,"_tracks",[]),L(this,"_parseTracks",(function(e,t,n){var i=e.representations,a=e.segmentTemplate,o=e.essentialProperty;i.forEach((function(e,i){var s=e.id,l=e.bandwidth,u=e.width,p=e.height,d=a.startNumber,f=a.duration,h=a.media,g=a.timescale,y=a.presentationTimeOffset,v=r._getEssentialValue(o,e),m=r._getDimensions(v),b=m[0],_=m[1];r._tracks.push(new c.ImageTrack({id:s,index:i,active:!1,width:u,height:p,duration:f,rows:b,cols:_,url:r._buildTemplateUrl(h,s,t,n),customData:{bitrate:l,startNumber:d,timescale:g,presentationTimeOffset:y}}))}))})),L(this,"_getDimensions",(function(e){var t=1,n=1;if(e.includes("x")){var r=e.split("x");n=parseInt(r[0]),t=parseInt(r[1])}return[t,n]})),L(this,"_getEssentialValue",(function(e,t){return e?e.value:t.essentialProperty?t.essentialProperty.value:""})),L(this,"_buildTemplateUrl",(function(e,t,n,r){var i=n.split("/").pop(),a=n.replace(i,"");return(r=r.replace(/^\.\/|^\./,"")).length>0&&!r.endsWith("/")&&(r+="/"),k(""+a+r+e,{id:t})})),L(this,"_buildUrlFromTemplate",(function(e,t){return k(e.url,{index:t,time:(t-1)*e.duration*e.customData.timescale,bitrate:e.customData.bitrate})})),this._parseTracks(e,t,n),this._tracks.length>0&&(this._tracks.sort((function(e,t){return e.customData.bitrate-t.customData.bitrate})),this.selectTrack(this._tracks[this._tracks.length-1]))}var t=e.prototype;return t.selectTrack=function(e){this._tracks.forEach((function(t){return t.index===e.index?t.active=!0:t.active=!1}))},t.getTracks=function(){return this._tracks},t.getActiveTrack=function(){return this._tracks.find((function(e){return e.active}))},t.getThumbnail=function(e){var t=this.getActiveTrack(),n=t.duration,r=t.rows,i=t.cols,a=t.sliceWidth,o=t.sliceHeight,s=t.customData,l=Math.floor(e/n)+s.startNumber,u=e%n,p=Math.floor(u*r*i/n);return new c.ThumbnailInfo({width:Math.floor(a),height:Math.floor(o),x:Math.floor(p%i)*a,y:Math.floor(p/i)*o,url:this._buildUrlFromTemplate(t,l)})},e}();function N(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function U(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){N(a,r,i,o,s,"next",e)}function s(e){N(a,r,i,o,s,"throw",e)}o(void 0)}))}}function F(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var K="error",G="adaptation",z="buffering",W="drmsessionupdate",Y="emsg",q=function(e){var t,n;n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,o.createAdapter=function(e,t,n){var r=c.Utils.Object.copyDeep(g);if(c.Utils.Object.hasPropertyPath(n,"text.useNativeTextTrack")&&(r.textTrackVisibile=c.Utils.Object.getPropertyPath(n,"text.useNativeTextTrack")),c.Utils.Object.hasPropertyPath(n,"text.useShakaTextTrackDisplay")&&(r.useShakaTextTrackDisplay=c.Utils.Object.getPropertyPath(n,"text.useShakaTextTrackDisplay"),r.textTrackVisibile=r.textTrackVisibile||r.useShakaTextTrackDisplay),c.Utils.Object.hasPropertyPath(n,"streaming")){var i=n.streaming;"boolean"==typeof i.forceBreakStall&&(r.forceBreakStall=i.forceBreakStall),"boolean"==typeof i.lowLatencyMode&&(r.lowLatencyMode=i.lowLatencyMode),"boolean"==typeof i.trackEmsgEvents&&(r.trackEmsgEvents=i.trackEmsgEvents),"boolean"==typeof i.switchDynamicToStatic&&(r.switchDynamicToStatic=i.switchDynamicToStatic)}if(c.Utils.Object.hasPropertyPath(n,"sources.options")){var a=n.sources.options;r.forceRedirectExternalStreams=a.forceRedirectExternalStreams,r.redirectExternalStreamsHandler=a.redirectExternalStreamsHandler,r.redirectExternalStreamsTimeout=a.redirectExternalStreamsTimeout}if(c.Utils.Object.hasPropertyPath(n,"abr")){var o=n.abr;"boolean"==typeof o.enabled&&(r.shakaConfig.abr.enabled=o.enabled),"boolean"==typeof o.capLevelToPlayerSize&&(r.capLevelToPlayerSize=o.capLevelToPlayerSize),o.defaultBandwidthEstimate&&(r.shakaConfig.abr.defaultBandwidthEstimate=o.defaultBandwidthEstimate),o.restrictions&&c.Utils.Object.createPropertyPath(r,"abr.restrictions",o.restrictions)}return c.Utils.Object.hasPropertyPath(n,"playback.options.html5.dash")&&(c.Utils.Object.mergeDeep(r.shakaConfig,n.playback.options.html5.dash),c.Utils.Object.hasPropertyPath(r.shakaConfig,"manifest.dash.defaultPresentationDelay")&&(r.shakaConfig.manifest.defaultPresentationDelay=r.shakaConfig.manifest.dash.defaultPresentationDelay,delete r.shakaConfig.manifest.dash.defaultPresentationDelay)),r.network=n.network,new this(e,t,r)},o.canPlayType=function(e){var t="string"==typeof e&&e.toLowerCase()===o._dashMimeType&&o.isMSESupported();return o._logger.debug("canPlayType result for mimeType: "+e+" is "+t.toString()),t};var r,i,a=o.prototype;function o(t,n,r){var i,a;return void 0===r&&(r={}),o._logger.debug("Creating adapter. Shaka version: "+d.a.Player.version),H(V(a=e.call(this,t,n,r)||this),"_shakaLib",d.a),H(V(a),"_adapterEventsBindings",((i={})[K]=function(e){return a._onError(e)},i[G]=function(){return a._onAdaptation()},i[z]=function(e){return a._onBuffering(e)},i[W]=function(){return a._onDrmSessionUpdate()},i[Y]=function(e){return a._onEmsg(e)},i[c.EventType.WAITING]=function(){return a._onWaiting()},i[c.EventType.PLAYING]=function(){return a._onPlaying()},i)),H(V(a),"_buffering",!1),H(V(a),"_waitingSent",!1),H(V(a),"_playingSent",!1),H(V(a),"_videoSizeUpdateTimer",null),H(V(a),"_stallInterval",null),H(V(a),"VIDEO_ERROR_CODE",3016),H(V(a),"_lastTimeDetach",NaN),H(V(a),"_requestFilterError",!1),H(V(a),"_responseFilterError",!1),H(V(a),"_isDestroyInProgress",!1),H(V(a),"_isStartOver",!0),H(V(a),"_seekRangeStart",0),H(V(a),"_isLive",!1),H(V(a),"_isStaticLive",!1),H(V(a),"_selectedVideoTrack",null),a._config=c.Utils.Object.mergeDeep({},g,a._config),a._init(),a}return a.setMaxBitrate=function(e){this._hasLowerOrEqualBitrate(e)&&this._shaka.configure({abr:{restrictions:{maxBandwidth:e}}})},a._getSortedTracks=function(){return this._shaka.getVariantTracks().map((function(e){return{id:e.id,bandwidth:e.bandwidth,active:e.active}})).sort((function(e,t){return e.bandwidth-t.bandwidth}))},a._hasLowerOrEqualBitrate=function(e){return this._getSortedTracks()[0].bandwidth<=e},o.canPlayDrm=function(e,t){o._availableDrmProtocol=[];for(var n,r=F(o._drmProtocols);!(n=r()).done;){var i=n.value;if(i.isConfigured(e,t)){o._availableDrmProtocol.push(i);break}}if(!o._availableDrmProtocol.length)for(var a,s=F(o._drmProtocols);!(a=s()).done;){var l=a.value;l.canPlayDrm(e)&&o._availableDrmProtocol.push(l)}return!!o._availableDrmProtocol.length},o.isSupported=function(){var e=!1;window.VTTCue||(e=!0),d.a.polyfill.installAll();var t=d.a.Player.isBrowserSupported();return e&&(window.VTTCue=void 0),o._logger.debug("isSupported:"+t),t},a._init=function(){d.a.polyfill.installAll(),this._shaka=new d.a.Player,this._config.useShakaTextTrackDisplay&&this._shaka.setVideoContainer(c.Utils.Dom.getElementBySelector(".playkit-subtitles")),this._maybeSetFilters(),this._maybeSetDrmConfig(),this._maybeBreakStalls(),this._shaka.configure(this._config.shakaConfig),this._addBindings()},a._clearStallInterval=function(){this._stallInterval&&(clearInterval(this._stallInterval),this._stallInterval=null)},a._stallHandler=function(){var e=this;this._clearStallInterval();var t=function(){return Date.now()/1e3},n=t(),r=this._videoElement.currentTime;this._stallInterval=setInterval((function(){t()-n>3&&!e._videoElement.paused&&(r===e._videoElement.currentTime&&(o._logger.debug("stall found, break the stall"),e._videoElement.currentTime=parseFloat(e._videoElement.currentTime.toFixed(1))+.1),e._clearStallInterval()),r=e._videoElement.currentTime}),500)},a._maybeBreakStalls=function(){var e=this;this._config.forceBreakStall&&this._eventManager.listen(this._videoElement,c.EventType.SEEKING,(function(){return e._stallHandler()}))},a._maybeGetRedirectedUrl=function(e){var t=this._config.forceRedirectExternalStreams,n=this._config.redirectExternalStreamsTimeout,r=this._config.redirectExternalStreamsHandler;return new Promise((function(i){if(!t)return i(e);c.Utils.Http.jsonp(e,r,{timeout:n}).then((function(e){i(e)})).catch((function(){return i(e)}))}))},a._maybeSetFilters=function(){var e=this;"function"==typeof c.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(o._logger.debug("Register request filter"),this._shaka.getNetworkingEngine().registerRequestFilter((function(t,n){if(Object.values(c.RequestType).includes(t)){var r,i={url:n.uris[0],body:n.body,headers:n.headers};try{r=e._config.network.requestFilter(t,i)}catch(e){r=Promise.reject(e)}return(r=r||Promise.resolve(i)).then((function(e){n.uris=[e.url],n.headers=e.headers,"boolean"==typeof e.withCredentials&&(n.allowCrossSiteCredentials=e.withCredentials),"POST"===n.method?n.body=e.body:e.body&&o._logger.warn("Request with "+n.method+" method cannot have body")})).catch((function(t){throw e._requestFilterError=!0,t}))}}))),"function"==typeof c.Utils.Object.getPropertyPath(this._config,"network.responseFilter")&&(o._logger.debug("Register response filter"),this._shaka.getNetworkingEngine().registerResponseFilter((function(t,n){if(Object.values(c.RequestType).includes(t)){var r,i=n.uri,a=n.data,o=n.headers,s={url:i,originalUrl:e._sourceObj.url,data:a,headers:o};try{r=e._config.network.responseFilter(t,s)}catch(e){r=Promise.reject(e)}return(r=r||Promise.resolve(s)).then((function(e){n.data=e.data})).catch((function(t){throw e._responseFilterError=!0,t}))}})))},a._maybeSetDrmConfig=function(){if(this._sourceObj&&this._sourceObj.drmData)for(var e,t={},n=F(o._availableDrmProtocol);!(e=n()).done;)e.value.setDrmPlayback(t,this._sourceObj.drmData),this._config.shakaConfig.drm&&c.Utils.Object.mergeDeep(t.drm,this._config.shakaConfig.drm),c.Utils.Object.mergeDeep(this._config.shakaConfig,t)},a._maybeCapLevelToPlayerSize=function(){var e=this;if(this._config.capLevelToPlayerSize){var t=function(){return{minHeight:0,maxHeight:e._videoHeight,minWidth:0,maxWidth:e._videoWidth,minBitrate:0,maxBitrate:1/0}};this._clearVideoUpdateTimer(),this._videoSizeUpdateTimer=setInterval((function(){return e._updateRestriction(t())}),1e3),this._updateRestriction(t())}},a._maybeApplyAbrRestrictions=function(){this._config.capLevelToPlayerSize||(this._clearVideoUpdateTimer(),c.Utils.Object.hasPropertyPath(this._config,"abr.restrictions")&&this._updateRestriction(this._config.abr.restrictions))},a._updateRestriction=function(e){var t=this._getRestrictionShakaConfig(e);this._shaka.configure({abr:{restrictions:t}})},a._getRestrictionShakaConfig=function(e){var t=this,n=function(e){var n=t._getVideoTracks();return Math.min.apply(null,n.map((function(t){return t[e]})))},r={};if(e){var i=e.maxHeight,a=e.maxWidth,s=e.maxBitrate,l=e.minHeight,u=e.minWidth,c=e.minBitrate,p=Math.max(l,0),d=Math.max(i,n("height"));d>=p?(r.minHeight=p,r.maxHeight=d):o._logger.warn("Invalid maxHeight restriction, maxHeight must be greater than minHeight",l,i);var f=Math.max(u,0),h=Math.max(a,n("width"));h>=f?(r.minWidth=f,r.maxWidth=h):o._logger.warn("Invalid maxWidth restriction, maxWidth must be greater than minWidth",u,a);var g=Math.max(c,0),y=Math.max(s,n("bandwidth"));y>=g?(r.minBandwidth=g,r.maxBandwidth=y):o._logger.warn("Invalid maxBitrate restriction, maxBitrate must be greater than minBitrate",c,s)}return r},a.attachMediaSource=function(){this._shaka||(this._videoElement&&this._videoElement.src&&(c.Utils.Dom.setAttribute(this._videoElement,"src",""),c.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init())},a.detachMediaSource=function(){var e=this;return this._shaka?(0===Math.floor(this.duration-this.currentTime)?this._lastTimeDetach=0:this.currentTime>0&&(this._lastTimeDetach=this.currentTime),this._reset().then((function(){e._shaka=null,e._loadPromise=null}))):Promise.resolve()},a._clearVideoUpdateTimer=function(){this._videoSizeUpdateTimer&&(clearInterval(this._videoSizeUpdateTimer),this._videoSizeUpdateTimer=null)},a._addBindings=function(){var e=this;this._eventManager.listen(this._shaka,G,this._adapterEventsBindings.adaptation),this._eventManager.listen(this._shaka,K,this._adapterEventsBindings.error),this._eventManager.listen(this._shaka,W,this._adapterEventsBindings.drmsessionupdate),this._eventManager.listen(this._videoElement,c.EventType.WAITING,this._adapterEventsBindings.waiting),this._eventManager.listen(this._videoElement,c.EventType.PLAYING,this._adapterEventsBindings.playing),this._eventManager.listen(this._videoElement,c.EventType.LOADED_DATA,(function(){return e._onLoadedData()})),this._eventManager.listenOnce(this._videoElement,c.EventType.PLAYING,(function(){e._eventManager.listen(e._shaka,z,e._adapterEventsBindings.buffering)})),this._config.trackEmsgEvents&&this._eventManager.listen(this._shaka,Y,this._adapterEventsBindings.emsg),this._shaka.getNetworkingEngine().registerResponseFilter((function(t,n){switch(t){case d.a.net.NetworkingEngine.RequestType.SEGMENT:e._trigger(c.EventType.FRAG_LOADED,{miliSeconds:n.timeMs,bytes:n.data.byteLength,url:n.uri}),e.isLive()&&e._dispatchNativeEvent(c.EventType.DURATION_CHANGE);break;case d.a.net.NetworkingEngine.RequestType.MANIFEST:e._parseManifest(n.data),e._playbackActualUri=n.uri,e._trigger(c.EventType.MANIFEST_LOADED,{miliSeconds:n.timeMs}),setTimeout((function(){var t,r;e._isLive=e._isLive||(null==(t=e._shaka)?void 0:t.isLive()),e._isLive&&!(null==(r=e._shaka)?void 0:r.isLive())&&!e._isStaticLive&&e._config.switchDynamicToStatic&&(e._sourceObj.url=n.uri,e._switchFromDynamicToStatic())}))}}))},a._onLoadedData=function(){var e=this;this._setLowLatencyMode();var t=this.getSegmentDuration();this._seekRangeStart=this._shaka.seekRange().start,this._startOverTimeout=setTimeout((function(){e._shaka.seekRange().start-e._seekRangeStart>=t&&(e._isStartOver=!1)}),1e3*(t+1))},a._switchFromDynamicToStatic=function(){var e=U(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o._logger.info("Switching from dynamic manifest to static"),this._dispatchNativeEvent(c.EventType.WAITING),t=this._videoElement.currentTime-this._seekRangeStart,n=this.isAdaptiveBitrateEnabled(),r=this._videoElement.paused,e.next=7,this.detachMediaSource();case 7:return this._isStaticLive=!0,this._isLive=!0,this.attachMediaSource(),e.next=12,this.load();case 12:this._videoElement.currentTime=t,r||this._videoElement.play(),n?this._onAdaptation():this._selectedVideoTrack&&this.selectVideoTrack(this._selectedVideoTrack);case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),a._setLowLatencyMode=function(){this._shaka.configure({streaming:{lowLatencyMode:"boolean"==typeof this._config.lowLatencyMode?this._config.lowLatencyMode:this.isLive()}})},a._parseManifest=function(e){!this._manifestParser&&O.isValid()&&(o._logger.debug("Creating parser for the first time"),this._manifestParser=new O(e),this._manifestParser.parseManifest())},a.load=function(){var e=U(regeneratorRuntime.mark((function e(t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._loadPromise){e.next=5;break}return e.next=3,this._removeMediaKeys();case 3:this._shaka.attach(this._videoElement),this._loadPromise=new Promise((function(e,r){if(n._sourceObj&&n._sourceObj.url){n._trigger(c.EventType.ABR_MODE_CHANGED,{mode:n.isAdaptiveBitrateEnabled()?"auto":"manual"});var i=t&&t>-1?t:void 0;i=isNaN(n._lastTimeDetach)?i:n._lastTimeDetach,n._lastTimeDetach=NaN,n._maybeGetRedirectedUrl(n._sourceObj.url).then((function(e){return n._shaka.load(e,i)})).then((function(){var t={tracks:n._getParsedTracks()};n._maybeCapLevelToPlayerSize(),o._logger.debug("The source has been loaded successfully"),e(t)})).catch((function(e){r(new c.Error(n._isDestroyInProgress?c.Error.Severity.RECOVERABLE:e.severity,e.category,e.code,e.data))}))}}));case 5:return e.abrupt("return",this._loadPromise);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),a.destroy=function(){var t=this;return this._isDestroyInProgress=!0,new Promise((function(n,r){e.prototype.destroy.call(t).then((function(){o._logger.debug("destroy"),t._loadPromise=null,t._adapterEventsBindings={},t._reset().then((function(e){t._isDestroyInProgress=!1,n(e)})).catch((function(e){t._isDestroyInProgress=!1,r(e)}))}))}))},a.getThumbnail=function(e){if(this._thumbnailController)return this._thumbnailController.getThumbnail(e)},a._reset=function(){return this._buffering=!1,this._waitingSent=!1,this._playingSent=!1,this._isLive=!1,this._isStaticLive=!1,this._requestFilterError=!1,this._responseFilterError=!1,this._manifestParser=null,this._thumbnailController=null,this._clearStallInterval(),this._clearVideoUpdateTimer(),clearTimeout(this._startOverTimeout),this._eventManager&&this._eventManager.removeAll(),this._shaka?this._shaka.destroy():Promise.resolve()},a._removeMediaKeys=function(){var e=U(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._videoElement||!this._videoElement.mediaKeys){e.next=16;break}return e.prev=1,o._logger.debug("Removing mediaKeys from the video element"),e.next=5,this._videoElement.setMediaKeys(null);case 5:o._logger.debug("mediaKeys removed"),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this._logger.warn("mediaKeys not cleared");case 11:return e.prev=11,e.abrupt("return",Promise.resolve());case 14:e.next=17;break;case 16:return e.abrupt("return",Promise.resolve());case 17:case"end":return e.stop()}}),e,this,[[1,8,11,14]])})));return function(){return e.apply(this,arguments)}}(),a._getVideoTracks=function(){var e=this._shaka.getVariantTracks(),t=this._getActiveTrack();return e.filter((function(e){return e.audioId===t.audioId}))},a._getActiveTrack=function(){return this._shaka.getVariantTracks().find((function(e){return e.active}))},a._getAudioTracks=function(){var e=this._shaka.getVariantTracks(),t=this._shaka.getAudioLanguagesAndRoles();return t.forEach((function(t){var n=e.filter((function(e){return e.language===t.language})),r=n.map((function(e){return e.id})).join("_"),i=n.some((function(e){return e.active}));t.id=r,t.label=n[0].label,t.active=i})),t},a._getParsedTracks=function(){if(this._shaka){var e=this._getParsedVideoTracks(),t=this._getParsedAudioTracks(),n=this._getParsedTextTracks(),r=this._getParsedImageTracks();return e.concat(t).concat(n).concat(r)}return[]},a._getParsedVideoTracks=function(){var e=this._getVideoTracks(),t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,bandwidth:e[n].videoBandwidth||e[n].bandwidth,width:e[n].width,height:e[n].height,active:e[n].active,index:n};t.push(new c.VideoTrack(r))}return t},a._getParsedAudioTracks=function(){var e=this._getAudioTracks(),t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].active,label:e[n].label,language:e[n].language,index:n};t.push(new c.AudioTrack(r))}return t},a._getParsedTextTracks=function(){for(var e,t=[],n=F(this._shaka.getTextTracks());!(e=n()).done;){var r=e.value,i=r.kind?r.kind+"s":"";i=""===i&&this._config.useShakaTextTrackDisplay?"captions":i;var a={id:r.id,kind:i,active:!1,default:r.primary,label:r.label,language:r.language};t.push(new c.TextTrack(a))}return t},a._getParsedImageTracks=function(){var e,t,n=null==(e=this._manifestParser)?void 0:e.getImageSet(),r=(null==(t=this._manifestParser)?void 0:t.getBaseUrl())||"";return n?(this._thumbnailController=new M(n,this._playbackActualUri,r),this._thumbnailController.getTracks()):[]},a.selectVideoTrack=function(e){if(this._shaka){var t=this._getVideoTracks();if(e instanceof c.VideoTrack&&t){var n=t[e.index];n&&(this.isAdaptiveBitrateEnabled()&&(this._shaka.configure({abr:{enabled:!1}}),this._trigger(c.EventType.ABR_MODE_CHANGED,{mode:"manual"})),n.active||(this._selectedVideoTrack=e,this._shaka.selectVariantTrack(t[e.index],!0),this._onTrackChanged(e)))}}},a.selectAudioTrack=function(e){this._shaka&&e instanceof c.AudioTrack&&!e.active&&(this._shaka.selectAudioLanguage(e.language),this._onTrackChanged(e))},a.selectTextTrack=function(e){this._shaka&&e instanceof c.TextTrack&&!e.active&&("subtitles"===e.kind||"captions"===e.kind)&&(this._shaka.setTextTrackVisibility(this._config.textTrackVisibile),this._shaka.selectTextLanguage(e.language),this._onTrackChanged(e))},a.selectImageTrack=function(e){this._shaka&&this._thumbnailController&&e instanceof c.ImageTrack&&!e.active&&(this._thumbnailController.selectTrack(e),this._onTrackChanged(c.ImageTrack))},a.hideTextTrack=function(){this._shaka&&this._shaka.setTextTrackVisibility(!1)},a.enableAdaptiveBitrate=function(){this._shaka&&!this.isAdaptiveBitrateEnabled()&&(this._trigger(c.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._shaka.configure({abr:{enabled:!0}}))},a.isAdaptiveBitrateEnabled=function(){return!!this._shaka&&this._shaka.getConfiguration().abr.enabled},a.applyABRRestriction=function(e){if(c.Utils.Object.createPropertyPath(this._config,"abr.restrictions",e),this._maybeApplyAbrRestrictions(),!this.isAdaptiveBitrateEnabled()){var t=this._getParsedVideoTracks(),n=Object(c.filterTracksByRestriction)(t,this._config.abr.restrictions);n.length&&(n.find((function(e){return e.active}))||this.selectVideoTrack(n[0]))}},a._getLiveEdge=function(){return this._shaka?this._shaka.seekRange().end:NaN},a.seekToLiveEdge=function(){this._shaka&&this._videoElement.readyState>0&&(this._videoElement.currentTime=this._getLiveEdge())},a.isLive=function(){var e;return(null==(e=this._shaka)?void 0:e.isLive())||this._isLive},a.getSegmentDuration=function(){return this._shaka?this._shaka.getStats().maxSegmentDuration:0},a._onAdaptation=function(){var e=this._getParsedVideoTracks().find((function(e){return e.active}));this._onTrackChanged(e)},a._onError=function(e){if(e&&e.detail){var t=e.detail;if(t.code===this.VIDEO_ERROR_CODE)return;(this._requestFilterError||this._responseFilterError)&&t.data[0]instanceof d.a.util.Error&&(t=t.data[0],this._requestFilterError?this._requestFilterError=!1:this._responseFilterError=!1),this._trigger(c.EventType.ERROR,new c.Error(t.severity,t.category,t.code,t.data)),o._logger.error(t),t.severity===c.Error.Severity.CRITICAL&&this.destroy()}},a._onBuffering=function(e){e.buffering?this._waitingSent||(this._dispatchNativeEvent(c.EventType.WAITING),this._buffering=!0):(this._buffering=!1,this._videoElement.paused||this._playingSent||this._dispatchNativeEvent(c.EventType.PLAYING))},a._dispatchNativeEvent=function(e){var t;"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),this._videoElement.dispatchEvent(t)},a._onDrmSessionUpdate=function(){this._trigger(c.EventType.DRM_LICENSE_LOADED,{licenseTime:this._shaka.getStats().licenseTime,scheme:this._shaka.drmInfo().keySystem})},a._onEmsg=function(e){var t=e.detail,n=e.type,r=Array.from(this._videoElement.textTracks).find((function(e){return e.label===n}));r||(r=this._videoElement.addTextTrack(c.TextTrack.KIND.METADATA,n));var i=t.startTime,a=t.endTime,o=t.id,s=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["startTime","endTime","id"]),l=new c.TimedMetadata(i,a,o,c.TimedMetadata.TYPE.EMSG,s),u=Object(c.createTextTrackCue)(l);r.addCue(u),this._trigger(c.EventType.TIMED_METADATA_ADDED,{cues:[l]})},a._onWaiting=function(){this._waitingSent=!0,this._playingSent=!1},a._onPlaying=function(){this._playingSent=!0,this._waitingSent=!1,this._buffering&&this._dispatchNativeEvent(c.EventType.WAITING)},a.getStartTimeOfDvrWindow=function(){return this.isLive()&&this._shaka?(this._isStartOver?this._seekRangeStart:this._shaka.seekRange().start)+this._shaka.getConfiguration().streaming.safeSeekOffset:0},a.getDrmInfo=function(){var e=this._shaka.drmInfo();if(e){var t=e.licenseServerUri,n=e.keySystem,r=e.serverCertificateUri,i={licenseUrl:t,scheme:n};return r&&(i.certificate=r),i}return null},r=o,(i=[{key:"_videoWidth",get:function(){var e,t=this._videoElement;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=this._contentScaleFactor),e}},{key:"_videoHeight",get:function(){var e,t=this._videoElement;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=this._contentScaleFactor),e}},{key:"_contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){o._logger.debug("failed reading devicePixelRatio, assume 1")}return e}},{key:"liveDuration",get:function(){return this._getLiveEdge()}},{key:"targetBuffer",get:function(){var e=NaN;return this._shaka?(e=this.isLive()?this._getLiveEdge()-this._videoElement.currentTime:this._videoElement.duration-this._videoElement.currentTime,e=Math.min(e,this._shaka.getConfiguration().streaming.bufferingGoal+this._shaka.getStats().maxSegmentDuration)):NaN}}])&&B(r.prototype,i),o}(c.BaseMediaSourceAdapter);H(q,"id","DashAdapter"),H(q,"_logger",c.BaseMediaSourceAdapter.getLogger(q.id)),H(q,"_dashMimeType","application/dash+xml"),H(q,"_drmProtocols",[f,h]),H(q,"_availableDrmProtocol",[]);var X="1.34.1-canary.0-9422826",$="@playkit-js/playkit-js-dash";t.default=q,q.isSupported()&&Object(c.registerMediaSourceAdapter)(q)}]))},function(e,t,n){(function(e){ + */var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,a=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,p=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,m=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,_=r?Symbol.for("react.responder"):60118,E=r?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case p:case d:case o:case l:case s:case h:return e;default:switch(e=e&&e.$$typeof){case c:case f:case v:case y:case u:return e;default:return t}}case a:return t}}}function T(e){return k(e)===d}t.AsyncMode=p,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=u,t.Element=i,t.ForwardRef=f,t.Fragment=o,t.Lazy=v,t.Memo=y,t.Portal=a,t.Profiler=l,t.StrictMode=s,t.Suspense=h,t.isAsyncMode=function(e){return T(e)||k(e)===p},t.isConcurrentMode=T,t.isContextConsumer=function(e){return k(e)===c},t.isContextProvider=function(e){return k(e)===u},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===v},t.isMemo=function(e){return k(e)===y},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===s},t.isSuspense=function(e){return k(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===s||e===h||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===b||e.$$typeof===_||e.$$typeof===E||e.$$typeof===m)},t.typeOf=k},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],i=0;i<e.length;i++){var s=e[i],l=t.base?s[0]+t.base:s[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var p=o(c),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(a[p].references++,a[p].updater(d)):a.push({identifier:c,updater:g(d,t),references:1}),r.push(c)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,c=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function d(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,h=0;function g(e,t){var n,r,i;if(t.singleton){var a=h++;n=f||(f=l(t)),r=p.bind(null,n,a,!1),i=p.bind(null,n,a,!0)}else n=l(t),r=d.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=o(n[r]);a[i].references--}for(var l=s(e,t),u=0;u<n.length;u++){var c=o(n[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=l}}}},function(e,t,n){(t=n(15)(!1)).push([e.i,".playkit-player{--playkit-primary-hsl-hue: 215deg;--playkit-secondary-hsl-hue: 40deg;--playkit-success-hsl-hue: 136deg;--playkit-danger-hsl-hue: 355deg;--playkit-warning-hsl-hue: 21deg;--playkit-primary-hsl-saturation: 100%;--playkit-secondary-hsl-saturation: 100%;--playkit-success-hsl-saturation: 100%;--playkit-danger-hsl-saturation: 100%;--playkit-warning-hsl-saturation: 100%;--playkit-primary-hsl-lightness: 50%;--playkit-secondary-hsl-lightness: 50%;--playkit-success-hsl-lightness: 50%;--playkit-danger-hsl-lightness: 50%;--playkit-warning-hsl-lightness: 50%;--playkit-primary-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-primary-hsl-saturation) var(--playkit-primary-hsl-lightness));--playkit-primary-darker-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-primary-hsl-saturation) calc(var(--playkit-primary-hsl-lightness) - 15%));--playkit-primary-brighter-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-primary-hsl-saturation) calc(var(--playkit-primary-hsl-lightness) + 15%));--playkit-primary-text-contrast-color: #ffffff;--playkit-secondary-color: hsl(var(--playkit-secondary-hsl-hue) var(--playkit-secondary-hsl-saturation) var(--playkit-secondary-hsl-lightness));--playkit-secondary-darker-color: hsl(var(--playkit-secondary-hsl-hue) var(--playkit-secondary-hsl-saturation) calc(var(--playkit-secondary-hsl-lightness) - 15%));--playkit-secondary-brighter-color: hsl(var(--playkit-secondary-hsl-hue) var(--playkit-secondary-hsl-saturation) calc(var(--playkit-secondary-hsl-lightness) + 15%));--playkit-secondary-text-contrast-color: #ffffff;--playkit-success-color: hsl(var(--playkit-success-hsl-hue) var(--playkit-success-hsl-saturation) var(--playkit-success-hsl-lightness));--playkit-success-darker-color: hsl(var(--playkit-success-hsl-hue) var(--playkit-success-hsl-saturation) calc(var(--playkit-success-hsl-lightness) - 15%));--playkit-success-brighter-color: hsl(var(--playkit-success-hsl-hue) var(--playkit-success-hsl-saturation) calc(var(--playkit-success-hsl-lightness) + 15%));--playkit-success-text-contrast-color: #ffffff;--playkit-danger-color: hsl(var(--playkit-danger-hsl-hue) var(--playkit-danger-hsl-saturation) var(--playkit-danger-hsl-lightness));--playkit-danger-darker-color: hsl(var(--playkit-danger-hsl-hue) var(--playkit-danger-hsl-saturation) calc(var(--playkit-danger-hsl-lightness) - 15%));--playkit-danger-brighter-color: hsl(var(--playkit-danger-hsl-hue) var(--playkit-danger-hsl-saturation) calc(var(--playkit-danger-hsl-lightness) + 15%));--playkit-danger-text-contrast-color: #ffffff;--playkit-warning-color: hsl(var(--playkit-warning-hsl-hue) var(--playkit-warning-hsl-saturation) var(--playkit-warning-hsl-lightness));--playkit-warning-darker-color: hsl(var(--playkit-warning-hsl-hue) var(--playkit-warning-hsl-saturation) calc(var(--playkit-warning-hsl-lightness) - 15%));--playkit-warning-brighter-color: hsl(var(--playkit-warning-hsl-hue) var(--playkit-warning-hsl-saturation) calc(var(--playkit-warning-hsl-lightness) + 15%));--playkit-warning-text-contrast-color: #ffffff;--playkit-tone-1-color: #ffffff;--playkit-tone-2-color: #cccccc;--playkit-tone-3-color: #999999;--playkit-tone-4-color: #888888;--playkit-tone-5-color: #666666;--playkit-tone-6-color: #444444;--playkit-tone-7-color: #222222;--playkit-tone-8-color: #000000;--playkit-live-color: #e12536;--playkit-player-background-color: #000000;--playkit-tab-focus-color: var(--playkit-primary-color);--playkit-tooltip-background-color: var(--playkit-tone-1-color);--playkit-tooltip-color: var(--playkit-tone-7-color);--playkit-ads-color: var(--playkit-secondary-color)}.playkit-row{display:block}.playkit-row:after{content:\"\";clear:both;display:block}.playkit-d-inline-block{display:inline-block}.playkit-mobile-hidden-select{display:block;opacity:0;position:absolute;top:0;left:0px;width:100%;height:100%}.playkit-font-size-base,.playkit-ad-notice{font-size:15px}.playkit-player .playkit-form-group{margin:10px 0;position:relative;max-width:100%}.playkit-player .playkit-form-group.playkit-has-error .playkit-form-control{border-color:var(--playkit-danger-color)}.playkit-player .playkit-form-group.playkit-has-error .playkit-form-control:focus{border-color:#fff}.playkit-player .playkit-form-group.playkit-has-icon .playkit-form-control{padding-left:34px}.playkit-player .playkit-form-group .playkit-icon{position:absolute;top:2px;left:2px;width:32px;height:32px;fill:rgba(255,255,255,.4)}.playkit-player .playkit-form-control{height:32px;width:100%;min-width:72px;border:2px solid rgba(255,255,255,.2);border-radius:4px;background-color:rgba(0,0,0,.4);font-size:15px;line-height:18px;color:#fff;padding:8px 10px;text-overflow:ellipsis}.playkit-player .playkit-form-control::-webkit-input-placeholder{color:rgba(255,255,255,.6)}.playkit-player .playkit-form-control:focus{background-color:#fff;border-color:#fff;color:var(--playkit-tone-7-color)}.playkit-player .playkit-form-control:focus::-webkit-input-placeholder{color:var(--playkit-tone-2-color)}.playkit-player .playkit-form-control:focus+.playkit-icon{fill:var(--playkit-tone-3-color)}.playkit-player textarea.playkit-form-control{min-height:72px}.playkit-player select{font-size:15px;color:#fff;-webkit-appearance:none;border:0;background:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23FFFFFF' viewBox='0 0 1024 1024'><path d='M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z' /></svg>\") no-repeat;background-size:16px;background-position:100% center;background-repeat:no-repeat;padding-right:24px}.playkit-checkbox{font-size:15px;position:relative}.playkit-checkbox input{display:none}.playkit-checkbox label:before{height:16px;width:16px;border:1px solid rgba(255,255,255,.2);border-radius:4px;background-color:rgba(0,0,0,.4);margin-right:8px;display:inline-block;content:\"\";vertical-align:middle}.playkit-checkbox input:checked+label:before{content:\"✔\";text-align:center;font-size:14px}.playkit-form-group-row{font-size:15px;margin:24px 0}.playkit-form-group-row:after{clear:both;content:\" \";display:block}.playkit-form-group-row label{float:left;color:rgba(244,244,244,.8)}.playkit-form-group-row .playkit-dropdown{float:right}.playkit-btn{text-decoration:none;height:36px;border-radius:18px;color:#fff;line-height:36px;font-weight:bold;cursor:pointer;display:inline-block;padding:0 24px}.playkit-btn.playkit-btn-block{display:block}.playkit-btn.playkit-btn-dark-transparent{background-color:rgba(0,0,0,.5);border:2px solid rgba(255,255,255,.2);line-height:32px}.playkit-btn.playkit-btn-dark-transparent:hover{color:#fff;border:2px solid rgba(255,255,255,.4)}.playkit-btn.playkit-btn-branded{background-color:var(--playkit-primary-color)}.playkit-btn.playkit-btn-branded:hover{color:#fff}.playkit-btn-rounded{height:36px;width:36px;min-width:36px;min-height:36px;border-radius:18px;background-color:rgba(0,0,0,.4);display:inline-block;padding:2px}.playkit-player button:focus{outline:none}.playkit-btn-borderless{display:flex;flex-direction:row;justify-content:center;align-items:center;border-radius:4px;border:none;padding:8px 12px 8px 8px;width:82px;height:40px;background-color:rgba(0,0,0,0);cursor:pointer}.playkit-btn-borderless.playkit-only-icon{padding:4px;width:40px;height:40px}.playkit-btn-borderless.playkit-only-label{padding:8px;width:50px;height:40px}.playkit-btn-borderless i{width:32px;height:32px}.playkit-btn-borderless label{color:var(--playkit-tone-1-color)}.playkit-btn-borderless:hover{background-color:var(--playkit-tone-4-color)}.playkit-player.playkit-size-sm .playkit-btn-borderless,.playkit-player.playkit-size-xs .playkit-btn-borderless{height:32px}.playkit-player.playkit-size-sm .playkit-btn-borderless i,.playkit-player.playkit-size-xs .playkit-btn-borderless i{width:24px;height:24px}.playkit-player.playkit-size-sm .playkit-btn-borderless.playkit-only-icon,.playkit-player.playkit-size-xs .playkit-btn-borderless.playkit-only-icon{padding:4px;width:32px;height:32px}.playkit-player.playkit-size-sm .playkit-btn-borderless.playkit-only-label,.playkit-player.playkit-size-xs .playkit-btn-borderless.playkit-only-label{padding:8px;width:50px;height:32px}.playkit-icon{display:inline-block;font-size:0;width:100%;height:100%;margin:0 auto;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.playkit-badge-icon:after{content:\"\";position:absolute;height:16px;width:16px;background-size:cover;background-repeat:no-repeat;background-position:50% 50%}.playkit-player{--playkit-icon-vr-stereo-full-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M864 255.996c53.019 0 96 42.981 96 96v384.004c0 53.019-42.981 96-96 96h-219.764c-33.721 0-64.97-17.693-82.319-46.608l-49.917-83.195-49.917 83.195c-17.349 28.916-48.598 46.608-82.319 46.608h-219.764c-53.019 0-96-42.981-96-96v-384.003c0-53.019 42.981-96 96-96h704zM304 624c44.183 0 80-35.817 80-80s-35.817-80-80-80c-44.183 0-80 35.817-80 80s35.817 80 80 80zM720 624c44.183 0 80-35.817 80-80s-35.817-80-80-80c-44.183 0-80 35.817-80 80s35.817 80 80 80z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-chromecast-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-HD-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M3.73939861,5 L2,5 L2,11 L3.73939861,11 L3.73918396,8.56940659 L5.96845644,8.56940659 L5.9691596,11 L7.69930609,11 L7.69930609,5 L5.9691596,5 L5.96845644,7.32457143 L3.73918396,7.32457143 L3.73939861,5 Z M10.849653,5 L8.65690054,5 L8.65690054,11 L10.8774094,11 L11.1387878,10.9921562 C11.5670397,10.9660102 11.9583976,10.8744992 12.3128614,10.7176232 L12.3128614,10.7176232 L12.4919044,10.6311813 L12.686671,10.5199596 C13.0639309,10.2858264 13.3675515,9.98155416 13.5975328,9.60714286 C13.827514,9.23273155 13.9589319,8.81088809 13.9917864,8.34161247 L13.9917864,8.34161247 L14,8.10302198 L14,7.9010989 L13.9917864,7.66145717 C13.9589319,7.19033135 13.827514,6.76815149 13.5975328,6.39491758 C13.3292213,5.95947802 12.9583655,5.61813187 12.4849653,5.37087912 C12.0791937,5.15894819 11.6207417,5.03784481 11.1096093,5.00756896 L11.1096093,5.00756896 L10.849653,5 Z M10.849653,6.24862637 C11.154973,6.24862637 11.4101773,6.30906593 11.615266,6.42994505 C11.8203547,6.55082418 11.9745567,6.73282967 12.077872,6.97596154 C12.1605243,7.17046703 12.2101157,7.40497253 12.2266461,7.67947802 L12.2266461,7.67947802 L12.232845,7.89285714 L12.232845,8.10302198 L12.2265536,8.31796703 C12.2097764,8.59445055 12.1594449,8.83049451 12.075559,9.0260989 C11.9707016,9.2706044 11.8180416,9.4532967 11.617579,9.57417582 C11.4572089,9.67087912 11.2672321,9.7289011 11.0476484,9.74824176 L11.0476484,9.74824176 L10.8774094,9.75549451 L10.3957366,9.75600879 L10.3957366,6.24937143 Z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-4K-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M6.52117789,5 L4.77853973,5 L4.7778117,5.01381978 L2,8.80769231 L2.10649455,9.76785714 L4.7778117,9.76866813 L4.77853973,11 L6.52117789,11 L6.52063574,9.76866813 L7.19402985,9.76785714 L7.19402985,8.5728022 L6.52063574,8.57362637 L6.52117789,5 Z M9.81282775,5 L7.99273901,5 L7.99273901,11 L9.81282775,11 L9.8119758,9.5061978 L10.4712352,8.88589011 L11.8313836,11 L13.9806374,11 L11.6856603,7.6629978 L14,5 L11.7587737,5 L10.3549818,6.78434066 L9.8119758,7.5229011 L9.81282775,5 Z M4.7778117,7.01905934 L4.7778117,8.57362637 L3.65066559,8.5728022 L4.69624849,7.13873626 L4.7778117,7.01905934 Z'%3E%3C/path%3E%3C/svg%3E\");--playkit-icon-quality-8K-active-url: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23006bff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M4.5,5 C4.04427083,5 3.6389974,5.06279225 3.28417969,5.18837675 C2.92936198,5.31396126 2.65104167,5.499666 2.44921875,5.74549098 C2.24739583,5.99131597 2.14648438,6.29458918 2.14648438,6.65531062 C2.14648438,6.96259185 2.24820964,7.23112892 2.45166016,7.46092184 C2.58729384,7.61411712 2.75692636,7.74445187 2.96055773,7.85192607 L2.96055773,7.85192607 L3.07972656,7.90981323 L3.04817708,7.92134269 L2.87890625,8.000668 C2.71614583,8.08483634 2.57291667,8.18353373 2.44921875,8.29676019 L2.44921875,8.29676019 L2.33203125,8.41482966 L2.24394133,8.52320968 C2.08131378,8.74602266 2,9.00515316 2,9.3006012 C2,9.67735471 2.10986328,9.99131597 2.32958984,10.242485 C2.54931641,10.493654 2.84879557,10.6826987 3.22802734,10.8096192 C3.60725911,10.9365397 4.03613281,11 4.51464844,11 C4.99641927,11 5.42366536,10.9365397 5.79638672,10.8096192 C6.16910807,10.6826987 6.46289063,10.493654 6.67773438,10.242485 C6.89257813,9.99131597 7,9.67735471 7,9.3006012 C7,8.95591182 6.89176432,8.66065464 6.67529297,8.41482966 L6.67529297,8.41482966 L6.56041124,8.29676019 C6.3983742,8.14579158 6.20089157,8.02065242 5.96796332,7.92134269 L5.96796332,7.92134269 L5.94,7.911 L6.06141493,7.85192607 L6.20532227,7.76703407 C6.29701063,7.70758183 6.38019929,7.64241446 6.45488824,7.57153195 L6.45488824,7.57153195 L6.56054688,7.46092184 L6.65155707,7.3427967 C6.78945132,7.14054034 6.85839844,6.91137831 6.85839844,6.65531062 C6.85839844,6.29458918 6.75830078,5.99131597 6.55810547,5.74549098 C6.35791016,5.499666 6.08121745,5.31396126 5.72802734,5.18837675 C5.37483724,5.06279225 4.96549479,5 4.5,5 Z M9.8178888,5 L8,5 L8,11 L9.8178888,11 L9.81771088,9.5061978 L10.4751832,8.88673407 L11.8340048,11 L13.9806608,11 L11.6891307,7.6629978 L14,5 L11.7614827,5 L10.3593876,6.78434066 L9.81771088,7.5229011 L9.8178888,5 Z M4.50488281,8.51903808 C4.6546224,8.51903808 4.78401693,8.54375418 4.89306641,8.59318637 C5.00211589,8.64261857 5.0867513,8.71543086 5.14697266,8.81162325 C5.20719401,8.90781563 5.23730469,9.02805611 5.23730469,9.17234469 C5.23730469,9.30861723 5.20800781,9.4261857 5.14941406,9.5250501 C5.09082031,9.6239145 5.0069987,9.7007348 4.89794922,9.75551102 C4.78889974,9.81028724 4.66113281,9.83767535 4.51464844,9.83767535 C4.36490885,9.83767535 4.23388672,9.81028724 4.12158203,9.75551102 C4.00927734,9.7007348 3.92220052,9.6239145 3.86035156,9.5250501 C3.7985026,9.4261857 3.76757812,9.30861723 3.76757812,9.17234469 C3.76757812,9.02805611 3.7985026,8.90781563 3.86035156,8.81162325 C3.92220052,8.71543086 4.00846354,8.64261857 4.11914062,8.59318637 C4.22981771,8.54375418 4.35839844,8.51903808 4.50488281,8.51903808 Z M4.5,6.16232465 C4.63671875,6.16232465 4.74902344,6.18570474 4.83691406,6.23246493 C4.92480469,6.27922512 4.99072266,6.34535738 5.03466797,6.43086172 C5.07861328,6.51636607 5.10058594,6.62057448 5.10058594,6.74348697 C5.10058594,6.86372745 5.08024089,6.96993988 5.03955078,7.06212425 C4.99886068,7.15430862 4.93538411,7.22645291 4.84912109,7.27855711 C4.76285807,7.33066132 4.65136719,7.35671343 4.51464844,7.35671343 C4.37792969,7.35671343 4.2648112,7.33066132 4.17529297,7.27855711 C4.08577474,7.22645291 4.01985677,7.15430862 3.97753906,7.06212425 C3.93522135,6.96993988 3.9140625,6.86372745 3.9140625,6.74348697 C3.9140625,6.62057448 3.93522135,6.51636607 3.97753906,6.43086172 C4.01985677,6.34535738 4.08496094,6.27922512 4.17285156,6.23246493 C4.26074219,6.18570474 4.36979167,6.16232465 4.5,6.16232465 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-maximize{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M800 269.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E %3Cpath fill='%23fff' d='M224 754.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3C/svg%3E\")}.playkit-icon-minimize{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M672 306.745v-114.745c0-17.673-14.327-32-32-32s-32 14.327-32 32v192c0 17.673 14.327 32 32 32h192c17.673 0 32-14.327 32-32s-14.327-32-32-32h-114.745l137.373-137.373c12.497-12.497 12.497-32.758 0-45.255s-32.758-12.497-45.255 0l-137.373 137.373z' /%3E%3Cpath fill='%23fff' d='M352 717.255v114.745c0 17.673 14.327 32 32 32s32-14.327 32-32v-192c0-17.673-14.327-32-32-32h-192c-17.673 0-32 14.327-32 32s14.327 32 32 32h114.745l-137.373 137.373c-12.497 12.497-12.497 32.758 0 45.255s32.758 12.497 45.255 0l137.373-137.373z' /%3E%3C/svg%3E\")}.playkit-icon-play{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M796.806 461.202c44.919 28.075 44.739 73.706 0 101.668l-459.472 287.171c-44.919 28.075-81.334 7.915-81.334-45.305v-585.4c0-53.096 36.595-73.266 81.334-45.305l459.472 287.171z' /%3E%3C/svg%3E\")}.playkit-icon-pause{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M256 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314zM640 287.843c0-35.259 28.407-63.843 64-63.843 35.346 0 64 28.564 64 63.843v448.314c0 35.259-28.407 63.843-64 63.843-35.346 0-64-28.564-64-63.843v-448.314z' /%3E%3C/svg%3E\")}.playkit-icon-volume-base{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M128 416v192h96v-192h-96zM64 383.853c0-17.592 14.012-31.853 32.094-31.853h159.813c17.725 0 32.094 14.581 32.094 31.853v256.295c0 17.592-14.012 31.853-32.094 31.853h-159.813c-17.725 0-32.094-14.581-32.094-31.853v-256.295z' /%3E%3Cpath fill='%23fff' d='M288 634.342l160 88.889v-422.462l-160 88.889v244.684zM224 352l231.787-128.771c31.046-17.248 56.213-2.487 56.213 32.476v512.589c0 35.184-25.054 49.786-56.213 32.476l-231.787-128.771v-320z' /%3E%3C/svg%3E\")}.playkit-icon-volume-waves{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M802.017 837.177c82.359-86.627 129.183-201.774 129.183-324.26 0-123.976-47.976-240.409-132.127-327.329-12.293-12.697-32.552-13.025-45.249-0.732s-13.025 32.552-0.732 45.249c72.692 75.084 114.109 175.597 114.109 282.812 0 105.928-40.422 205.331-111.566 280.162-12.177 12.808-11.666 33.063 1.143 45.24s33.063 11.666 45.24-1.143z' /%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z' /%3E%3C/svg%3E\")}.playkit-icon-volume-wave{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M667.436 743.221c67.761-60.884 107.273-147.888 107.273-241.233 0-87.318-34.552-169.203-94.836-229.446-12.501-12.493-32.762-12.486-45.255 0.015s-12.486 32.762 0.015 45.255c48.375 48.342 76.075 113.989 76.075 184.176 0 75.021-31.679 144.776-86.048 193.627-13.146 11.812-14.227 32.044-2.416 45.19s32.044 14.227 45.19 2.416z'/%3E%3C/svg%3E\")}.playkit-icon-volume-mute{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M768 466.745l-67.986-67.986c-12.213-12.213-32.654-12.393-45.151 0.104-12.584 12.584-12.543 32.711-0.104 45.151l67.986 67.986-67.986 67.986c-12.213 12.213-12.393 32.654 0.104 45.151 12.584 12.584 32.711 12.543 45.151 0.104l67.986-67.986 67.986 67.986c12.213 12.213 32.654 12.393 45.151-0.104 12.584-12.584 12.543-32.711 0.104-45.151l-67.986-67.986 67.986-67.986c12.213-12.213 12.393-32.654-0.104-45.151-12.584-12.584-32.711-12.543-45.151-0.104l-67.986 67.986z' /%3E%3C/svg%3E\")}.playkit-icon-close{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M573.162 512l214.269-214.269c16.772-16.772 16.688-44.071-0.202-60.96-17.007-17.007-44.182-16.98-60.96-0.202l-214.269 214.269-214.269-214.269c-16.772-16.772-44.071-16.688-60.96 0.202-17.007 17.007-16.98 44.182-0.202 60.96l214.269 214.269-214.269 214.269c-16.772 16.772-16.688 44.071 0.202 60.96 17.007 17.007 44.182 16.98 60.96 0.202l214.269-214.269 214.269 214.269c16.772 16.772 44.071 16.688 60.96-0.202 17.007-17.007 16.98-44.182 0.202-60.96l-214.269-214.269z' /%3E%3C/svg%3E\")}.playkit-icon-settings{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M803.451 546.033c2.552-22.107 2.552-44.408 0.246-64.81-1.084-6.208-6.499-10.721-12.535-10.671-30.286 0.533-57.727-17.773-68.866-45.941s-3.64-60.291 18.795-80.593c3.935-3.569 4.416-9.583 0.92-13.959-13.595-17.35-29.146-33.073-46.311-46.83-4.23-3.38-10.359-2.886-14.783 1.966-14.421 14.721-34.212 22.938-54.434 22.761-9.009 0.041-17.942-1.652-26.865-5.212-28.414-11.992-46.226-40.546-44.49-71.542 0.335-5.319-3.547-9.972-8.785-10.588-21.926-2.538-44.068-2.595-65.961-0.176-5.349 0.6-9.341 5.207-9.175 10.514 1.027 30.384-16.802 58.251-45.764 70.431-8.238 3.138-16.993 4.701-25.207 4.609-20.599 0.206-40.395-7.982-55.482-23.363-2.014-2.187-4.849-3.435-7.553-3.445-2.441 0.015-4.811 0.83-6.513 2.139-17.541 13.798-33.455 29.547-47.262 46.729-3.418 4.337-2.922 10.575 0.97 14.162 22.816 20.692 30.19 53.479 17.807 83.351-13.035 27.396-41.135 44.394-71.446 43.222-5.112-0.197-9.499 3.606-10.086 9.179-2.673 22.023-2.673 44.289-0.212 64.867 1.080 6.27 6.559 10.824 13.309 10.737l2.225 0.006c28.935 0.604 54.726 18.391 65.634 45.374 11.22 28.205 3.921 60.407-18.565 81.204-3.866 3.509-4.341 9.418-0.895 13.742 13.545 17.354 29.027 33.106 46.042 46.867 4.303 3.449 10.547 2.954 14.986-1.907 14.414-14.76 34.226-23.001 54.43-22.82 9.070-0.052 18.063 1.668 27.041 5.299 28.19 12.071 45.891 40.41 44.347 71.468-0.342 5.312 3.536 9.962 8.802 10.578 21.915 2.548 44.049 2.605 65.929 0.176 5.364-0.604 9.364-5.227 9.191-10.598-0.997-30.358 16.84-58.183 45.452-70.201 8.263-3.256 17.070-4.908 25.521-4.865 20.676-0.206 40.533 8.070 55.398 23.38 2.039 2.195 4.898 3.446 7.673 3.455 2.268-0.011 4.468-0.776 6.321-2.228 17.625-13.724 33.599-29.444 47.415-46.611 3.426-4.348 2.928-10.6-0.863-14.097-22.358-20.082-30.057-51.85-19.372-79.939s37.55-46.71 67.745-46.857h5.229c5.12-0.026 9.413-3.875 9.996-8.962zM861.733 552.735c-3.961 34.572-33.157 60.748-68.129 60.926h-5.235c-5.803 0.028-10.991 3.624-13.054 9.048s-0.577 11.558 4.020 15.69c26.602 24.519 29.853 65.381 7.275 94.034-16.847 20.934-36.063 39.845-57.197 56.302-12.034 9.427-26.861 14.584-42.368 14.658-19.254-0.051-37.623-8.090-50.269-21.718-3.221-3.315-7.66-5.165-12.712-5.118-1.425-0.007-2.839 0.258-3.554 0.532-5.581 2.346-9.136 7.892-8.937 13.966 1.152 35.958-25.509 66.771-61.307 70.804-26.332 2.923-52.909 2.854-79.246-0.208-36.286-4.245-62.897-36.157-60.576-72.186 0.304-6.123-3.235-11.788-8.302-13.964-1.328-0.536-2.748-0.808-4.606-0.8-4.651-0.041-9.118 1.817-11.635 4.367-24.544 27.036-65.886 30.311-94.481 7.394-20.587-16.65-39.207-35.595-55.308-56.226-22.552-28.277-19.261-69.208 7.317-93.334 4.474-4.138 5.939-10.604 3.748-16.115-2.052-5.076-6.932-8.442-11.794-8.55-36.436 0.464-66.759-24.741-72.949-60.89-3.243-26.718-3.243-53.731-0.055-79.964 3.744-35.827 34.642-62.605 70.642-61.219 6.877 0.266 13.251-3.59 15.584-8.401 2.309-5.59 0.861-12.028-3.789-16.247-26.603-24.51-29.856-65.368-7.293-93.994 16.767-20.868 35.856-39.76 57.129-56.491 12.099-9.322 26.921-14.42 42.463-14.513 19.308 0.059 37.717 8.166 50.145 21.684 3.263 3.322 7.737 5.172 12.994 5.126 1.471 0.015 2.933-0.245 3.363-0.39 5.601-2.359 9.165-7.93 8.957-14.077-1.126-35.941 25.542-66.721 61.322-70.731 26.322-2.909 52.889-2.84 79.251 0.212 36.244 4.265 62.828 36.125 60.546 72.343-0.339 6.047 3.159 11.654 8.186 13.782 1.381 0.55 2.855 0.829 4.726 0.823 4.663 0.040 9.142-1.819 11.615-4.312 24.439-26.99 65.656-30.312 94.137-7.557 20.721 16.607 39.456 35.549 55.655 56.225 22.667 28.35 19.38 69.439-7.531 93.846-4.33 3.918-5.776 10.112-3.628 15.542s7.438 8.96 13.543 8.854c34.999-0.298 65.076 24.766 71.337 60.925 3.065 26.552 3.065 53.368 0 79.92zM511.956 589.951c43.215-0.108 78.137-35.17 78.072-78.385 0-31.732-19.132-60.334-48.461-72.448s-63.068-5.35-85.461 17.133c-22.393 22.483-29.022 56.249-16.791 85.529s40.909 48.298 72.641 48.171zM512.146 648.617c-55.438 0.221-105.58-33.029-126.965-84.224s-9.796-110.233 29.358-149.543c39.153-39.31 98.144-51.136 149.424-29.956s84.731 71.189 84.732 126.627c0.114 75.549-60.999 136.907-136.548 137.096z' /%3E%3C/svg%3E\")}.playkit-icon-check{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\")}.playkit-icon-check-active{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M342.481 563.894c-12.577-12.416-32.838-12.285-45.254 0.292s-12.285 32.838 0.292 45.254l118.857 117.333c13.275 13.105 34.901 12.123 46.933-2.131l297.143-352c11.4-13.505 9.694-33.694-3.811-45.094s-33.694-9.694-45.094 3.811l-274.828 325.566-94.238-93.030z' /%3E%3C/svg%3E\")}.playkit-icon-language{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c159.058 0 288-128.942 288-288s-128.942-288-288-288c-159.058 0-288 128.942-288 288s128.942 288 288 288zM512 864c-194.404 0-352-157.596-352-352s157.596-352 352-352c194.404 0 352 157.596 352 352s-157.596 352-352 352z' /%3E%3Cpath fill='%23fff' d='M441.231 173.324c-76.632 84.62-121.231 207.208-121.231 338.676 0 134.304 46.556 259.282 126.083 343.936l46.646-43.82c-68.041-72.429-108.728-181.651-108.728-300.116 0-116.001 39.001-223.203 104.669-295.716l-47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M584.297 173.324c76.632 84.62 121.231 207.208 121.231 338.676 0 134.304-46.556 259.282-126.083 343.936l-46.646-43.82c68.041-72.429 108.728-181.651 108.728-300.116 0-116.001-39.001-223.203-104.669-295.716l47.438-42.96z' /%3E%3Cpath fill='%23fff' d='M840.432 419.786c-81.65-22.637-200.551-35.786-328.432-35.786-128.056 0-247.103 13.185-328.758 35.876l17.136 61.663c75.47-20.972 188.938-33.539 311.622-33.539 122.521 0 235.854 12.533 311.334 33.459l17.099-61.674z' /%3E%3Cpath fill='%23fff' d='M840.432 605.754c-81.65 22.637-200.551 35.786-328.432 35.786-128.056 0-247.103-13.185-328.758-35.876l17.136-61.663c75.47 20.972 188.938 33.539 311.622 33.539 122.521 0 235.854-12.533 311.334-33.459l17.099 61.674z' /%3E%3Cpath fill='%23fff' d='M480 192h64v640h-64v-640z' /%3E%3C/svg%3E\")}.playkit-icon-quality{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M159.904 192h288.234c17.277 0 31.862 14.323 31.862 31.992 0 17.792-14.261 31.993-31.853 31.994l-288.147 0.014v544.174c-0.017-0.18 704-0.174 704-0.174v-128.006c0-17.795 14.327-31.994 32-31.994 17.796 0 32 14.34 32 32.029v128.145c0 35.25-28.639 63.826-63.904 63.826h-704.192c-35.293 0-63.904-28.875-63.904-63.826v-544.348c0-35.25 28.639-63.826 63.904-63.826zM501.818 378.182c108.449 0 196.364-87.915 196.364-196.364 0-29.091 43.636-29.091 43.636 0 0 108.449 87.915 196.364 196.364 196.364 29.091 0 29.091 43.636 0 43.636-108.449 0-196.364 87.915-196.364 196.364 0 29.091-43.636 29.091-43.636 0 0-108.449-87.915-196.364-196.364-196.364-29.091 0-29.091-43.636 0-43.636z' /%3E%3C/svg%3E\")}.playkit-icon-captions{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M160 771.213c-0.017-0.172 704-0.166 704-0.166v-518.261c0.017 0.172-704 0.166-704 0.166v518.261zM96 252.787c0-33.572 28.639-60.787 63.904-60.787h704.192c35.293 0 63.904 27.5 63.904 60.787v518.427c0 33.572-28.639 60.787-63.904 60.787h-704.192c-35.293 0-63.904-27.5-63.904-60.787v-518.427z' /%3E%3Cpath fill='%23fff' d='M490.583 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412zM767.219 568.655c0 7.729-2.311 15.987-6.933 24.777s-11.668 17.162-21.14 25.118c-9.471 7.956-21.405 14.358-35.801 19.208s-30.611 7.274-48.644 7.274c-38.34 0-68.268-11.176-89.787-33.528s-32.278-52.319-32.278-89.901c0-25.459 4.925-47.962 14.775-67.511s24.095-34.665 42.734-45.348c18.639-10.684 40.916-16.025 66.829-16.025 16.063 0 30.8 2.349 44.212 7.047s24.777 10.759 34.096 18.185c9.32 7.425 16.442 15.343 21.367 23.754s7.388 16.253 7.388 23.527c0 7.425-2.766 13.714-8.297 18.867s-12.237 7.729-20.117 7.729c-5.152 0-9.433-1.326-12.843-3.978s-7.236-6.933-11.479-12.843c-7.577-11.517-15.495-20.155-23.754-25.913s-18.753-8.638-31.482-8.638c-18.336 0-33.111 7.16-44.325 21.481s-16.821 33.907-16.821 58.759c0 11.669 1.44 22.39 4.319 32.164s7.047 18.109 12.502 25.004c5.455 6.895 12.047 12.123 19.776 15.684s16.215 5.342 25.459 5.342c12.426 0 23.072-2.879 31.937-8.638s16.707-14.548 23.527-26.368c3.789-6.971 7.88-12.426 12.275-16.366s9.774-5.91 16.139-5.91c7.577 0 13.866 2.879 18.867 8.638s7.501 11.896 7.501 18.412z' /%3E%3C/svg%3E\")}.playkit-icon-speed{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 832c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM480.239 643.971c-0.158-1.272-0.239-2.566-0.239-3.876v-192.19c0-17.621 14.204-31.905 32-31.905 17.673 0 32 14.497 32 31.905v192.19c0 1.313-0.079 2.607-0.232 3.878 55.325 14.128 96.232 64.301 96.232 124.027 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-59.729 40.91-109.903 96.239-124.029zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z' /%3E%3C/svg%3E\")}.playkit-icon-speed-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM401.852 670.758c-1.056-0.826-2.077-1.728-3.055-2.706l-113.005-113.005c-12.533-12.533-12.65-32.737-0.066-45.321 12.497-12.497 32.536-12.719 45.321 0.066l113.005 113.005c0.976 0.976 1.876 1.998 2.701 3.059 19.106-11.343 41.416-17.855 65.248-17.855 70.692 0 128 57.308 128 128s-57.308 128-128 128c-70.692 0-128-57.308-128-128 0-23.829 6.511-46.137 17.852-65.242zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\")}.playkit-icon-speed-up{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M512 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM546.516 612.708c0.524-1.23 1.129-2.446 1.819-3.64l79.906-138.402c8.862-15.35 28.348-20.692 43.76-11.794 15.305 8.837 20.707 28.135 11.666 43.794l-79.906 138.402c-0.693 1.201-1.451 2.34-2.268 3.416 23.761 23.238 38.508 55.655 38.508 91.516 0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 11.959 0 23.535 1.64 34.516 4.708zM928 576c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-194.404-157.596-352-352-352s-352 157.596-352 352c0 17.673-14.327 32-32 32s-32-14.327-32-32c0-229.75 186.25-416 416-416s416 186.25 416 416z'/%3E%3C/svg%3E\")}.playkit-icon-audio{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M768 625.124v-354.531l-352 135.385v330.022c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124v-241.124c0-13.241 8.155-25.114 20.513-29.867l416-160c20.96-8.062 43.487 7.41 43.487 29.867v512c0 70.692-57.308 128-128 128s-128-57.308-128-128c0-70.692 57.308-128 128-128 23.314 0 45.173 6.233 64 17.124zM288 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64zM704 800c35.346 0 64-28.654 64-64s-28.654-64-64-64c-35.346 0-64 28.654-64 64s28.654 64 64 64z' /%3E%3C/svg%3E\")}.playkit-icon-arrow-down{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M301.255 338.745c-24.994-24.994-65.516-24.994-90.51 0s-24.994 65.516 0 90.51l256 256c24.994 24.994 65.516 24.994 90.51 0l256-256c24.994-24.994 24.994-65.516 0-90.51s-65.516-24.994-90.51 0l-210.745 210.745-210.745-210.745z' /%3E%3C/svg%3E\")}.playkit-icon-start-over{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M255.271 339.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z' /%3E%3C/svg%3E\")}.playkit-icon-seek-end{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M742.494 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'/%3E%3C/svg%3E\")}.playkit-icon-rewind{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' opacity='0.5' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M816.068 431.974c-20.553-78.699-71.369-149.456-147.375-193.338-139.923-80.785-316.040-42.095-410.222 84.418l89.738-4.499c20.299-1.018 37.579 14.613 38.596 34.911s-14.613 37.579-34.911 38.596l-159.799 8.011c-16.335 0.819-31.25-9.242-36.61-24.694l-52.434-151.164c-6.66-19.202 3.506-40.167 22.708-46.828s40.167 3.506 46.828 22.708l27.226 78.49c116.254-155.703 333.248-203.244 505.682-103.69 91.184 52.645 152.976 136.648 179.618 230.523l-69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-rewind-10{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M258.471 323.053c94.182-126.513 270.298-165.203 410.222-84.418 150.758 87.040 202.411 279.813 115.371 430.571s-279.813 202.411-430.571 115.371c-61.424-35.463-107.948-89.4-134.169-153.673-7.677-18.818-29.156-27.85-47.974-20.173s-27.85 29.156-20.173 47.974c32.339 79.269 89.818 145.906 165.517 189.611 185.96 107.364 423.747 43.649 531.111-142.311s43.649-423.747-142.311-531.111c-172.433-99.554-389.428-52.014-505.682 103.69l-27.226-78.49c-6.66-19.202-27.626-29.368-46.828-22.708s-29.368 27.626-22.708 46.828l52.434 151.164c5.36 15.452 20.275 25.513 36.61 24.694l159.799-8.011c20.299-1.018 35.929-18.298 34.911-38.596s-18.298-35.929-38.596-34.911l-89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M413.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM596.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM529.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-forward{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' opacity='0.5' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M207.932 431.974c20.553-78.699 71.369-149.456 147.375-193.338 139.923-80.785 316.040-42.095 410.222 84.418l-89.738-4.499c-20.299-1.018-37.579 14.613-38.596 34.911s14.613 37.579 34.911 38.596l159.799 8.011c16.335 0.819 31.25-9.242 36.61-24.694l52.434-151.164c6.66-19.202-3.506-40.167-22.708-46.828s-40.167 3.506-46.828 22.708l-27.226 78.49c-116.254-155.703-333.248-203.244-505.682-103.69-91.184 52.645-152.976 136.648-179.618 230.523l69.044 26.555z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-forward-10{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M765.529 323.053c-94.182-126.513-270.298-165.203-410.222-84.418-150.758 87.040-202.411 279.813-115.371 430.571s279.813 202.411 430.571 115.371c61.424-35.463 107.948-89.4 134.169-153.673 7.677-18.818 29.156-27.85 47.974-20.173s27.85 29.156 20.173 47.974c-32.339 79.269-89.818 145.906-165.517 189.611-185.96 107.364-423.747 43.649-531.111-142.311s-43.649-423.747 142.311-531.111c172.433-99.554 389.428-52.014 505.682 103.69l27.226-78.49c6.66-19.202 27.626-29.368 46.828-22.708s29.368 27.626 22.708 46.828l-52.434 151.164c-5.36 15.452-20.275 25.513-36.61 24.694l-159.799-8.011c-20.299-1.018-35.929-18.298-34.911-38.596s18.298-35.929 38.596-34.911l89.738 4.499z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M365.327 636.083h67.358v-252.083h-48.527c-2.173 7.358-4.949 13.589-8.329 18.693s-7.726 9.139-13.037 12.106c-5.311 2.967-11.709 5.103-19.193 6.409s-16.417 1.958-26.798 1.958v41.302h48.527v171.616zM548.807 554.192c0 17.803 1.569 29.849 4.708 36.139s8.208 9.435 15.21 9.435c7.001 0 12.071-3.145 15.21-9.435s4.708-18.336 4.708-36.139v-83.316c0-17.803-1.569-29.849-4.708-36.139s-8.208-9.435-15.21-9.435c-7.001 0-12.071 3.145-15.21 9.435s-4.708 18.336-4.708 36.139v83.316zM481.449 512.534c0-25.398 1.75-46.405 5.251-63.021s8.812-29.789 15.934-39.522c7.122-9.732 16.176-16.497 27.16-20.295s23.962-5.697 38.93-5.697c14.969 0 27.945 1.899 38.93 5.697s20.038 10.563 27.16 20.295c7.122 9.732 12.433 22.906 15.934 39.522s5.251 37.622 5.251 63.021c0 25.636-1.75 46.702-5.251 63.199s-8.812 29.552-15.934 39.166c-7.122 9.613-16.176 16.2-27.16 19.761s-23.962 5.341-38.93 5.341c-14.969 0-27.945-1.78-38.93-5.341s-20.038-10.147-27.16-19.761c-7.122-9.613-12.433-22.668-15.934-39.166s-5.251-37.563-5.251-63.199z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-vr-stereo{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M864 255.996c53.019 0 96 42.981 96 96v384.004c0 53.019-42.981 96-96 96h-219.764c-33.721 0-64.97-17.693-82.319-46.608l-49.917-83.195-49.917 83.195c-17.349 28.916-48.598 46.608-82.319 46.608h-219.764c-53.019 0-96-42.981-96-96v-384.003c0-53.019 42.981-96 96-96h704zM128 351.997v384.003c0 17.673 14.327 32 32 32h219.764c11.24 0 21.657-5.898 27.44-15.536l49.917-83.195c5.405-9.008 12.944-16.547 21.952-21.952 30.309-18.185 69.622-8.357 87.807 21.952l49.917 83.195c5.783 9.639 16.199 15.536 27.44 15.536h219.764c17.673 0 32-14.327 32-32v-384.004c0-17.673-14.327-32-32-32h-704c-17.673 0-32 14.327-32 32zM304 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80zM720 624c-44.183 0-80-35.817-80-80s35.817-80 80-80c44.183 0 80 35.817 80 80s-35.817 80-80 80z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-vr-stereo-full{background-image:var(--playkit-icon-vr-stereo-full-url)}.playkit-icon-chromecast{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M160 704v96h96c0-53.12-42.88-96-96-96zM160 576v64c88.32 0 160 71.68 160 160h64c0-123.84-100.16-224-224-224zM736 352h-448v52.16c126.72 40.96 226.88 141.12 267.84 267.84h180.16v-320zM160 448v64c159.040 0 288 128.96 288 288h64c0-194.56-157.76-352-352-352zM800 224h-576c-35.2 0-64 28.8-64 64v96h64v-96h576v448h-224v64h224c35.2 0 64-28.8 64-64v-448c0-35.2-28.8-64-64-64z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-chromecast-brand{background-image:var(--playkit-icon-chromecast-url)}.playkit-icon-next{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M640 549.333l-264.982 154.573c-30.386 17.725-55.018 3.388-55.018-32.094v-319.625c0-35.45 24.605-49.835 55.018-32.094l264.982 154.573v-154.448c0-17.794 14.204-32.219 32-32.219 17.673 0 32 14.398 32 32.219v383.562c0 17.794-14.204 32.219-32 32.219-17.673 0-32-14.398-32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-prev{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M384 549.333l264.982 154.573c30.386 17.725 55.018 3.388 55.018-32.094v-319.625c0-35.45-24.605-49.835-55.018-32.094l-264.982 154.573v-154.448c0-17.794-14.204-32.219-32-32.219-17.673 0-32 14.398-32 32.219v383.562c0 17.794 14.204 32.219 32 32.219 17.673 0 32-14.398 32-32.219v-154.448z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-picture-in-picture-start{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M224 256c-17.673 0-32 14.327-32 32v448c0 17.673 14.327 32 32 32h576c17.673 0 32-14.327 32-32v-448c0-17.673-14.327-32-32-32h-576zM224 192h576c53.019 0 96 42.981 96 96v448c0 53.019-42.981 96-96 96h-576c-53.019 0-96-42.981-96-96v-448c0-53.019 42.981-96 96-96z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M544 512h192c17.673 0 32 14.327 32 32v128c0 17.673-14.327 32-32 32h-192c-17.673 0-32-14.327-32-32v-128c0-17.673 14.327-32 32-32z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-picture-in-picture-stop{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 1024 1024' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M800 192c51.126 0 92.917 39.965 95.837 90.359l0.163 5.641v448c0 51.126-39.965 92.917-90.359 95.837l-5.641 0.163h-576c-51.126 0-92.917-39.965-95.837-90.359l-0.163-5.641v-64c0-17.673 14.327-32 32-32 16.411 0 29.936 12.353 31.785 28.268l0.215 3.732v64c0 16.411 12.353 29.936 28.268 31.785l3.732 0.215h576c16.411 0 29.936-12.353 31.785-28.268l0.215-3.732v-448c0-16.411-12.353-29.936-28.268-31.785l-3.732-0.215h-192c-17.673 0-32-14.327-32-32 0-16.411 12.353-29.936 28.268-31.785l3.732-0.215h192z'%3E%3C/path%3E%3Cpath fill='%23fff' d='M416 192c17.673 0 32 14.327 32 32 0 16.411-12.353 29.936-28.268 31.785l-3.732 0.215-178.752-0.032 202.711 202.736c12.497 12.497 12.497 32.758 0 45.255-11.535 11.535-29.687 12.423-42.24 2.662l-3.015-2.662-202.704-202.679v178.72c0 16.411-12.353 29.936-28.268 31.785l-3.732 0.215c-16.411 0-29.936-12.353-31.785-28.268l-0.215-3.732v-256l0.005-0.588c0.014-0.757 0.054-1.514 0.122-2.268l-0.127 2.856c0-1.62 0.12-3.212 0.353-4.767 0.083-0.544 0.182-1.101 0.295-1.656 0.141-0.705 0.307-1.399 0.495-2.084 0.14-0.5 0.288-0.992 0.449-1.482 0.204-0.629 0.434-1.262 0.684-1.885 0.227-0.568 0.466-1.121 0.722-1.669 0.311-0.661 0.644-1.314 0.998-1.954 0.212-0.388 0.439-0.779 0.676-1.166 0.503-0.818 1.040-1.614 1.61-2.382 0.174-0.238 0.351-0.47 0.532-0.7 1.588-2.021 3.42-3.854 5.45-5.446l-2.891 2.563c1.133-1.133 2.329-2.163 3.578-3.090 0.774-0.571 1.569-1.108 2.389-1.609 0.386-0.239 0.777-0.466 1.171-0.685 0.633-0.348 1.285-0.681 1.951-0.993 0.544-0.255 1.098-0.495 1.656-0.718 0.632-0.253 1.265-0.483 1.907-0.694 0.476-0.154 0.969-0.302 1.464-0.438 0.69-0.192 1.384-0.359 2.086-0.502 0.557-0.111 1.115-0.209 1.674-0.293 0.327-0.051 0.672-0.097 1.019-0.137l0.876-0.088c0.755-0.067 1.511-0.108 2.268-0.122l0.588-0.005h256z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-advanced-audio-description{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 24 24' width='24' height='24' fill-rule='nonzero'%3E%3Cpath d='M6.647 12.958h1.547V10.81l-1.547 2.147ZM12.226 10.408c.99 0 1.787.717 1.787 1.595 0 .881-.798 1.598-1.787 1.598h-.467v-3.193h.467Z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3.536 4C2.688 4 2 4.68 2 5.52v12.96c0 .832.688 1.52 1.536 1.52h16.928c.848 0 1.536-.68 1.536-1.52V5.52C22 4.688 21.312 4 20.464 4H3.536Zm15.335 5h.826c.83.87 1.303 1.982 1.303 3.14a4.504 4.504 0 0 1-1.033 2.837h-.792c.745-.793 1.165-1.792 1.165-2.838 0-1.178-.537-2.311-1.47-3.139ZM8.185 15h1.47V9.004H7.819L3 15h2.158l.566-.793h2.461V15Zm4.223-.003c1.851 0 3.357-1.343 3.357-2.994 0-1.657-1.49-2.997-3.341-2.997h-2.075v5.993h2.059v-.002ZM18.008 9h-.826c.932.828 1.47 1.961 1.47 3.14 0 1.045-.421 2.044-1.166 2.837h.787a4.48 4.48 0 0 0 1.038-2.838c0-1.157-.472-2.27-1.303-3.139Zm-2.515 0h.82c.837.87 1.304 1.982 1.304 3.14a4.474 4.474 0 0 1-1.033 2.837h-.787c.74-.793 1.16-1.792 1.16-2.838 0-1.178-.532-2.311-1.464-3.139Z' fill='%23fff'/%3E%3C/svg%3E\")}.playkit-icon-quality-hd:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M3.73939861,5 L2,5 L2,11 L3.73939861,11 L3.73918396,8.56940659 L5.96845644,8.56940659 L5.9691596,11 L7.69930609,11 L7.69930609,5 L5.9691596,5 L5.96845644,7.32457143 L3.73918396,7.32457143 L3.73939861,5 Z M10.849653,5 L8.65690054,5 L8.65690054,11 L10.8774094,11 L11.1387878,10.9921562 C11.5670397,10.9660102 11.9583976,10.8744992 12.3128614,10.7176232 L12.3128614,10.7176232 L12.4919044,10.6311813 L12.686671,10.5199596 C13.0639309,10.2858264 13.3675515,9.98155416 13.5975328,9.60714286 C13.827514,9.23273155 13.9589319,8.81088809 13.9917864,8.34161247 L13.9917864,8.34161247 L14,8.10302198 L14,7.9010989 L13.9917864,7.66145717 C13.9589319,7.19033135 13.827514,6.76815149 13.5975328,6.39491758 C13.3292213,5.95947802 12.9583655,5.61813187 12.4849653,5.37087912 C12.0791937,5.15894819 11.6207417,5.03784481 11.1096093,5.00756896 L11.1096093,5.00756896 L10.849653,5 Z M10.849653,6.24862637 C11.154973,6.24862637 11.4101773,6.30906593 11.615266,6.42994505 C11.8203547,6.55082418 11.9745567,6.73282967 12.077872,6.97596154 C12.1605243,7.17046703 12.2101157,7.40497253 12.2266461,7.67947802 L12.2266461,7.67947802 L12.232845,7.89285714 L12.232845,8.10302198 L12.2265536,8.31796703 C12.2097764,8.59445055 12.1594449,8.83049451 12.075559,9.0260989 C11.9707016,9.2706044 11.8180416,9.4532967 11.617579,9.57417582 C11.4572089,9.67087912 11.2672321,9.7289011 11.0476484,9.74824176 L11.0476484,9.74824176 L10.8774094,9.75549451 L10.3957366,9.75600879 L10.3957366,6.24937143 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-hd-active:after{background-image:var(--playkit-icon-quality-HD-active-url)}.playkit-icon-quality-4k:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M6.52117789,5 L4.77853973,5 L4.7778117,5.01381978 L2,8.80769231 L2.10649455,9.76785714 L4.7778117,9.76866813 L4.77853973,11 L6.52117789,11 L6.52063574,9.76866813 L7.19402985,9.76785714 L7.19402985,8.5728022 L6.52063574,8.57362637 L6.52117789,5 Z M9.81282775,5 L7.99273901,5 L7.99273901,11 L9.81282775,11 L9.8119758,9.5061978 L10.4712352,8.88589011 L11.8313836,11 L13.9806374,11 L11.6856603,7.6629978 L14,5 L11.7587737,5 L10.3549818,6.78434066 L9.8119758,7.5229011 L9.81282775,5 Z M4.7778117,7.01905934 L4.7778117,8.57362637 L3.65066559,8.5728022 L4.69624849,7.13873626 L4.7778117,7.01905934 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-4k-active:after{background-image:var(--playkit-icon-quality-4K-active-url)}.playkit-icon-quality-8k:after{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 16 16' width='16' height='16' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M13.9931545,4 C14.5492199,4 15,4.45303631 15,4.99703014 L15,11.0029699 C15,11.5536144 14.5500512,12 13.9931545,12 L2.00684547,12 C1.45078007,12 1,11.5469637 1,11.0029699 L1,4.99703014 C1,4.4463856 1.44994876,4 2.00684547,4 L13.9931545,4 Z M4.5,5 C4.04427083,5 3.6389974,5.06279225 3.28417969,5.18837675 C2.92936198,5.31396126 2.65104167,5.499666 2.44921875,5.74549098 C2.24739583,5.99131597 2.14648438,6.29458918 2.14648438,6.65531062 C2.14648438,6.96259185 2.24820964,7.23112892 2.45166016,7.46092184 C2.58729384,7.61411712 2.75692636,7.74445187 2.96055773,7.85192607 L2.96055773,7.85192607 L3.07972656,7.90981323 L3.04817708,7.92134269 L2.87890625,8.000668 C2.71614583,8.08483634 2.57291667,8.18353373 2.44921875,8.29676019 L2.44921875,8.29676019 L2.33203125,8.41482966 L2.24394133,8.52320968 C2.08131378,8.74602266 2,9.00515316 2,9.3006012 C2,9.67735471 2.10986328,9.99131597 2.32958984,10.242485 C2.54931641,10.493654 2.84879557,10.6826987 3.22802734,10.8096192 C3.60725911,10.9365397 4.03613281,11 4.51464844,11 C4.99641927,11 5.42366536,10.9365397 5.79638672,10.8096192 C6.16910807,10.6826987 6.46289063,10.493654 6.67773438,10.242485 C6.89257813,9.99131597 7,9.67735471 7,9.3006012 C7,8.95591182 6.89176432,8.66065464 6.67529297,8.41482966 L6.67529297,8.41482966 L6.56041124,8.29676019 C6.3983742,8.14579158 6.20089157,8.02065242 5.96796332,7.92134269 L5.96796332,7.92134269 L5.94,7.911 L6.06141493,7.85192607 L6.20532227,7.76703407 C6.29701063,7.70758183 6.38019929,7.64241446 6.45488824,7.57153195 L6.45488824,7.57153195 L6.56054688,7.46092184 L6.65155707,7.3427967 C6.78945132,7.14054034 6.85839844,6.91137831 6.85839844,6.65531062 C6.85839844,6.29458918 6.75830078,5.99131597 6.55810547,5.74549098 C6.35791016,5.499666 6.08121745,5.31396126 5.72802734,5.18837675 C5.37483724,5.06279225 4.96549479,5 4.5,5 Z M9.8178888,5 L8,5 L8,11 L9.8178888,11 L9.81771088,9.5061978 L10.4751832,8.88673407 L11.8340048,11 L13.9806608,11 L11.6891307,7.6629978 L14,5 L11.7614827,5 L10.3593876,6.78434066 L9.81771088,7.5229011 L9.8178888,5 Z M4.50488281,8.51903808 C4.6546224,8.51903808 4.78401693,8.54375418 4.89306641,8.59318637 C5.00211589,8.64261857 5.0867513,8.71543086 5.14697266,8.81162325 C5.20719401,8.90781563 5.23730469,9.02805611 5.23730469,9.17234469 C5.23730469,9.30861723 5.20800781,9.4261857 5.14941406,9.5250501 C5.09082031,9.6239145 5.0069987,9.7007348 4.89794922,9.75551102 C4.78889974,9.81028724 4.66113281,9.83767535 4.51464844,9.83767535 C4.36490885,9.83767535 4.23388672,9.81028724 4.12158203,9.75551102 C4.00927734,9.7007348 3.92220052,9.6239145 3.86035156,9.5250501 C3.7985026,9.4261857 3.76757812,9.30861723 3.76757812,9.17234469 C3.76757812,9.02805611 3.7985026,8.90781563 3.86035156,8.81162325 C3.92220052,8.71543086 4.00846354,8.64261857 4.11914062,8.59318637 C4.22981771,8.54375418 4.35839844,8.51903808 4.50488281,8.51903808 Z M4.5,6.16232465 C4.63671875,6.16232465 4.74902344,6.18570474 4.83691406,6.23246493 C4.92480469,6.27922512 4.99072266,6.34535738 5.03466797,6.43086172 C5.07861328,6.51636607 5.10058594,6.62057448 5.10058594,6.74348697 C5.10058594,6.86372745 5.08024089,6.96993988 5.03955078,7.06212425 C4.99886068,7.15430862 4.93538411,7.22645291 4.84912109,7.27855711 C4.76285807,7.33066132 4.65136719,7.35671343 4.51464844,7.35671343 C4.37792969,7.35671343 4.2648112,7.33066132 4.17529297,7.27855711 C4.08577474,7.22645291 4.01985677,7.15430862 3.97753906,7.06212425 C3.93522135,6.96993988 3.9140625,6.86372745 3.9140625,6.74348697 C3.9140625,6.62057448 3.93522135,6.51636607 3.97753906,6.43086172 C4.01985677,6.34535738 4.08496094,6.27922512 4.17285156,6.23246493 C4.26074219,6.18570474 4.36979167,6.16232465 4.5,6.16232465 Z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-quality-8k-active:after{background-image:var(--playkit-icon-quality-8K-active-url)}.playkit-icon-closed-captions-on{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M15.114 18.545c0.144-0.275 0.217-0.533 0.217-0.774 0-0.204-0.078-0.395-0.234-0.575s-0.353-0.27-0.59-0.27c-0.199 0-0.367 0.061-0.504 0.185s-0.265 0.294-0.384 0.511c-0.213 0.369-0.458 0.644-0.735 0.824s-0.61 0.27-0.998 0.27c-0.289 0-0.554-0.056-0.796-0.167s-0.447-0.275-0.618-0.49c-0.171-0.215-0.301-0.476-0.391-0.781s-0.135-0.64-0.135-1.005c0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27s0.505 0.45 0.742 0.81c0.133 0.185 0.252 0.318 0.359 0.401s0.24 0.124 0.401 0.124c0.246 0 0.456-0.081 0.629-0.242s0.259-0.357 0.259-0.59c0-0.227-0.077-0.472-0.231-0.735s-0.377-0.51-0.668-0.742c-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 1.174 0.336 2.111 1.009 2.809s1.608 1.048 2.806 1.048c0.564 0 1.070-0.076 1.52-0.227s0.823-0.352 1.119-0.6c0.296-0.249 0.516-0.51 0.661-0.785z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M23.759 18.545c0.145-0.275 0.217-0.533 0.217-0.774 0-0.204-0.078-0.395-0.234-0.575s-0.353-0.27-0.59-0.27c-0.199 0-0.367 0.061-0.504 0.185s-0.265 0.294-0.384 0.511c-0.213 0.369-0.458 0.644-0.735 0.824s-0.61 0.27-0.998 0.27c-0.289 0-0.554-0.056-0.796-0.167s-0.448-0.275-0.618-0.49c-0.17-0.215-0.301-0.476-0.391-0.781s-0.135-0.64-0.135-1.005c0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27s0.506 0.45 0.742 0.81c0.133 0.185 0.252 0.318 0.359 0.401s0.24 0.124 0.401 0.124c0.246 0 0.456-0.081 0.629-0.242s0.259-0.357 0.259-0.59c0-0.227-0.077-0.472-0.231-0.735s-0.377-0.51-0.668-0.742c-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 1.174 0.336 2.111 1.009 2.809s1.608 1.048 2.806 1.048c0.564 0 1.070-0.076 1.52-0.227s0.823-0.352 1.119-0.6 0.516-0.51 0.661-0.785z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M3 7.9c0-1.049 0.895-1.9 1.997-1.9h22.006c1.103 0 1.997 0.859 1.997 1.9v16.201c0 1.049-0.895 1.9-1.997 1.9h-22.006c-1.103 0-1.997-0.859-1.997-1.9v-16.201zM5 24.1c-0.001-0.005 22-0.005 22-0.005v-16.196c0 0.005-22 0.005-22 0.005v16.196z'%3E%3C/path%3E%3C/svg%3E\")}.playkit-icon-closed-captions-off{background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 32 32' width='36' height='36' fill-rule='nonzero'%3E%3Cpath fill='%23fff' d='M30.133 6.838l-1.143 0.863c0.007 0.065 0.011 0.131 0.011 0.198v16.201c0 1.049-0.895 1.9-1.997 1.9h-22.006c-0.080 0-0.159-0.005-0.236-0.013l-1.128 0.851c-0.463 0.349-1.121 0.257-1.471-0.206s-0.257-1.121 0.206-1.471l26.5-20c0.463-0.349 1.121-0.257 1.471 0.206s0.257 1.121-0.206 1.471zM27 9.202l-4.619 3.486c0.222 0.109 0.421 0.233 0.596 0.373 0.291 0.232 0.514 0.479 0.668 0.742s0.231 0.508 0.231 0.735c0 0.232-0.086 0.429-0.259 0.59s-0.382 0.242-0.629 0.242c-0.161 0-0.295-0.041-0.401-0.124s-0.226-0.217-0.359-0.401c-0.237-0.36-0.484-0.63-0.742-0.81-0.164-0.114-0.357-0.193-0.578-0.234l-2.249 1.697c-0.045 0.237-0.068 0.495-0.068 0.774 0 0.365 0.045 0.7 0.135 1.005s0.22 0.566 0.391 0.781c0.171 0.215 0.377 0.379 0.618 0.49s0.507 0.167 0.796 0.167c0.388 0 0.721-0.090 0.998-0.27s0.522-0.455 0.735-0.824c0.118-0.218 0.246-0.388 0.384-0.511s0.305-0.185 0.504-0.185c0.237 0 0.433 0.090 0.59 0.27s0.234 0.372 0.234 0.575c0 0.241-0.072 0.5-0.217 0.774s-0.365 0.536-0.661 0.785-0.669 0.449-1.119 0.6c-0.45 0.152-0.957 0.227-1.52 0.227-1.198 0-2.133-0.349-2.806-1.048-0.536-0.557-0.858-1.265-0.967-2.123l-1.382 1.043c-0.033 0.165-0.096 0.337-0.19 0.516-0.145 0.275-0.365 0.536-0.661 0.785s-0.669 0.449-1.119 0.6c-0.246 0.083-0.508 0.143-0.788 0.18l-5.283 3.987c5.615-0.003 19.737-0.003 19.737-0.003v-14.893z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M4.997 6h19.546l-2.492 1.903c-6.487 0.002-17.051 0.002-17.051 0.002v13.019l-2 1.527v-14.551c0-1.049 0.895-1.9 1.997-1.9z'%3E%3C/path%3E %3Cpath fill='%23fff' d='M12.841 14.034c0.179 0.125 0.353 0.293 0.521 0.504l1.399-1.068c-0.121-0.141-0.264-0.277-0.428-0.409-0.291-0.232-0.646-0.421-1.066-0.568s-0.88-0.22-1.382-0.22c-0.81 0-1.506 0.167-2.088 0.501s-1.028 0.806-1.335 1.417-0.462 1.314-0.462 2.11c0 0.77 0.144 1.437 0.433 2.002l1.598-1.22c-0.056-0.252-0.085-0.522-0.085-0.81 0-0.777 0.175-1.389 0.526-1.836s0.812-0.671 1.385-0.671c0.398 0 0.726 0.090 0.984 0.27z'%3E%3C/path%3E%3C/svg%3E\")}@keyframes playkit-openDropmenu{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.playkit-dropdown{position:relative;font-size:15px}.playkit-dropdown .playkit-label-badge{position:relative}.playkit-dropdown .playkit-label-badge:after{top:-5px;right:-18px}.playkit-dropdown.playkit-active .playkit-dropdown-menu{display:block;opacity:1}.playkit-dropdown.playkit-active .playkit-dropdown-button .playkit-icon-arrow-down{transform:rotate(180deg)}.playkit-dropdown .playkit-dropdown-button{font-weight:bold;line-height:18px;color:#fff;cursor:pointer;padding-left:20px;display:flex}.playkit-dropdown .playkit-dropdown-button .playkit-icon{width:16px;height:16px;vertical-align:middle;margin-left:6px;transition:150ms transform;will-change:transform}.playkit-dropdown .playkit-dropdown-button>.playkit-label-badge.playkit-badge-icon{margin-right:13px}.playkit-dropdown-menu{display:block;opacity:1;position:absolute;background-color:#333;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border-radius:4px;padding:6px 0;z-index:5;animation:playkit-openDropmenu 100ms ease-out forwards;max-height:220px;overflow-y:auto;font-size:15px;text-align:left;font-weight:normal}.playkit-dropdown-menu.playkit-top{margin-bottom:10px;bottom:100%}.playkit-dropdown-menu.playkit-bottom{margin-top:10px;top:100%}.playkit-dropdown-menu.playkit-right{left:0}.playkit-dropdown-menu.playkit-left{right:0}.playkit-dropdown-menu.playkit-stick-bottom{bottom:-95px;margin:5px 0}.playkit-dropdown-menu .playkit-dropdown-menu-item{display:flex;justify-content:space-between;align-items:center;padding:2px 10px 2px 16px;white-space:nowrap;min-height:30px;cursor:pointer}.playkit-dropdown-menu .playkit-dropdown-menu-item:hover{color:#fff}.playkit-dropdown-menu .playkit-dropdown-menu-item.playkit-active .playkit-menu-icon-container{opacity:1}.playkit-dropdown-menu .playkit-dropdown-menu-item .playkit-icon-check-active{display:inline-block;margin-left:16px;vertical-align:middle;width:24px;height:24px}.playkit-dropdown-menu .playkit-dropdown-menu-item .playkit-menu-icon-container{opacity:0}.playkit-dropdown-menu .playkit-dropdown-menu-item>.playkit-label-badge.playkit-badge-icon{margin-right:5px}.playkit-player .playkit-control-button{width:32px;height:32px;background:rgba(0,0,0,0);display:inline-block;opacity:.8;border:none;padding:0;cursor:pointer}.playkit-player .playkit-control-button.playkit-button-badge{position:relative}.playkit-player .playkit-control-button.playkit-button-badge:after{top:-4px;right:-1px}.playkit-player .playkit-control-button i{width:32px;height:32px}.playkit-player .playkit-control-button.playkit-active{opacity:1}.playkit-player .playkit-control-button:disabled{opacity:.4;cursor:default}.playkit-player .playkit-control-button.playkit-control-button-rounded{width:36px;height:36px;padding:2px}.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled):hover{opacity:1}.playkit-player:not(.playkit-touch) .playkit-control-button:not(:disabled).playkit-control-button-rounded:hover{background-color:rgba(0,0,0,.4);border-radius:18px}.playkit-player .playkit-control-button-container{display:inline-block;position:relative;vertical-align:top}.playkit-player.playkit-touch .playkit-player .playkit-control-button-container{position:static}.playkit-player.playkit-touch .playkit-control-button{position:relative}.playkit-player.playkit-state-idle .playkit-no-idle-control{display:none}.playkit-rotate{-moz-animation:playkit-spin .3s 1 linear;-o-animation:playkit-spin .3s 1 linear;-webkit-animation:playkit-spin .3s 1 linear;animation:playkit-spin .3s 1 linear}.playkit-reverse-rotate{-moz-animation:playkit-reverse-spin .3s 1 linear;-o-animation:playkit-reverse-spin .3s 1 linear;-webkit-animation:playkit-reverse-spin .3s 1 linear;animation:playkit-reverse-spin .3s 1 linear}@-webkit-keyframes playkit-spin{0%{-webkit-transform:rotate(359deg)}100%{-webkit-transform:rotate(0deg)}}@-moz-keyframes playkit-spin{0%{-moz-transform:rotate(359deg)}100%{-moz-transform:rotate(0deg)}}@-o-keyframes playkit-spin{0%{-o-transform:rotate(359deg)}100%{-o-transform:rotate(0deg)}}@-ms-keyframes playkit-spin{0%{-ms-transform:rotate(359deg)}100%{-ms-transform:rotate(0deg)}}@keyframes playkit-spin{0%{transform:rotate(359deg)}100%{transform:rotate(0deg)}}@-webkit-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-moz-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-o-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-ms-keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@keyframes playkit-reverse-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}.playkit-upper-bar-icon{width:36px;height:36px;border-radius:4px;padding:2px;cursor:pointer;color:var(--playkit-tone-1-color);display:flex;align-items:center;justify-content:center;opacity:.8;border:none;background-color:rgba(0,0,0,0);margin:0 4px}.playkit-upper-bar-icon:hover{background-color:var(--playkit-tone-4-color);opacity:1}.playkit-upper-bar-icon:active{background-color:var(--playkit-tone-6-color);opacity:1}.playkit-upper-bar-icon:disabled{opacity:.4}.playkit-player a{font-size:15px;line-height:18px;cursor:pointer;--primary-hover-color: hsl(var(--playkit-primary-hsl-hue) var(--playkit-hsl-saturation) calc(var(--playkit-hsl-lightness) - 10%))}.playkit-player a:hover{color:var(--primary-hover-color)}.playkit-player a:active{opacity:.7}.playkit-emptyUrl a{cursor:auto;pointer-events:none}.playkit-player{overflow:hidden;user-select:none;width:100%;height:100%;position:relative;outline:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:none;font-family:Lato,Helvetica Neue,Segoe UI,sans-serif}.playkit-player:-webkit-full-screen{width:100%;height:100%;max-width:none}.playkit-player *{box-sizing:border-box;outline:none}.playkit-player ::selection{background-color:rgba(0,0,0,.1)}.playkit-player video{width:100%;left:0}.playkit-player video::-webkit-media-controls-panel-container,.playkit-player video::-webkit-media-controls{display:none !important;-webkit-appearance:none}.playkit-player video::-webkit-media-controls-start-playback-button{display:none !important;-webkit-appearance:none}.playkit-player .playkit-player-gui{overflow:hidden;font-size:0}.playkit-player .playkit-player-gui label{margin-bottom:0}.playkit-player .overlay-portal{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.playkit-player.playkit-overlay-active .overlay-portal{z-index:11;pointer-events:initial}.playkit-player.playkit-nav *:focus{outline:1px solid var(--playkit-tab-focus-color) !important}.playkit-player [id^=\"playkit-ads-container\"]{transition:transform 100ms}.playkit-player [id^=\"playkit-ads-container\"][data-adtype=\"overlay\"]{z-index:1}.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-hover [id^=\"playkit-ads-container\"],.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-paused [id^=\"playkit-ads-container\"],.playkit-player:not(.playkit-ad-break).playkit-metadata-loaded.playkit-state-idle [id^=\"playkit-ads-container\"]{transform:translateY(-60px);-webkit-transform:translateY(-60px);-ms-transform:translateY(-60px)}.playkit-player.playkit-pre-playback,.playkit-player.playkit-casting,.playkit-player.playkit-metadata-loaded.playkit-hover,.playkit-player.playkit-state-paused,.playkit-player.playkit-state-idle,.playkit-player.playkit-ad-break,.playkit-player.playkit-menu-active,.playkit-player.playkit-overlay-active{cursor:auto}.playkit-player video::-webkit-media-text-track-container{max-height:none}.playkit-player.playkit-iOS video::-webkit-media-text-track-container{position:absolute;top:0;bottom:0;left:0;right:0}.playkit-player.playkit-state-paused video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle video::-webkit-media-text-track-container,.playkit-player.playkit-hover video::-webkit-media-text-track-container{padding:0 0 50px 0}.playkit-player.playkit-state-paused.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-state-paused.playkit-iOS video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-state-idle.playkit-iOS video::-webkit-media-text-track-container,.playkit-player.playkit-hover.playkit-Safari video::-webkit-media-text-track-container,.playkit-player.playkit-hover.playkit-iOS video::-webkit-media-text-track-container{padding:initial;max-height:calc(100% - 50px)}.playkit-player.playkit-state-paused.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display,.playkit-player.playkit-state-idle.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display,.playkit-player.playkit-hover.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-display{transform:translateY(-50px);-webkit-transform:translateY(-50px);-ms-transform:translateY(-50px)}.playkit-player.playkit-fullscreen.playkit-iOS video::-webkit-media-text-track-container{max-height:none}.playkit-player.playkit-overlay-active .playkit-subtitles{visibility:hidden}.playkit-player .playkit-subtitles{top:50px;transform:translateY(0px);-webkit-transform:translateY(0px);-ms-transform:translateY(0px);transition:ease-in 100ms}.playkit-player:not(.playkit-overlay-active).playkit-state-paused .playkit-subtitles,.playkit-player:not(.playkit-overlay-active).playkit-state-idle .playkit-subtitles,.playkit-player:not(.playkit-overlay-active).playkit-hover .playkit-subtitles{transform:translateY(-50px);-webkit-transform:translateY(-50px);-ms-transform:translateY(-50px)}.playkit-player:not(.playkit-overlay-active).playkit-fullscreen.playkit-iOS .playkit-subtitles{transform:translateY(0px);-webkit-transform:translateY(0px);-ms-transform:translateY(0px)}.playkit-video-player{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--playkit-player-background-color);transition:all 500ms;transition-property:left,right,bottom,top,width,height;display:flex}.playkit-overlay-active .playkit-video-player{filter:blur(16px)}@keyframes playkit-openOverlay{from{opacity:0}to{opacity:1}}.playkit-overlay{position:absolute;width:100%;height:100%;display:none;opacity:0;animation:playkit-openOverlay 100ms ease-in-out forwards;z-index:11}.playkit-overlay.playkit-active{display:block;opacity:1}.playkit-overlay .playkit-overlay-contents{position:absolute;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7);z-index:4;text-align:center;color:#fff;padding:60px 20px 30px 20px;overflow-y:auto}.playkit-overlay .playkit-title{font-size:24px;font-weight:bold;line-height:29px;margin-bottom:60px}.playkit-overlay .playkit-close-overlay{position:absolute;top:48px;right:48px;z-index:5;cursor:pointer}.playkit-overlay .playkit-close-overlay .playkit-icon-close{width:24px;height:24px}.playkit-overlay .playkit-overlay-screen{display:none}.playkit-overlay .playkit-overlay-screen.playkit-active{display:block}.playkit-player.playkit-size-md .playkit-overlay .playkit-overlay-contents{padding:36px 20px}.playkit-player.playkit-size-md .playkit-overlay .playkit-close-overlay{top:38px}.playkit-player.playkit-size-md .playkit-overlay .playkit-title{margin-bottom:24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-overlay-contents,.playkit-player.playkit-size-xs .playkit-overlay .playkit-overlay-contents{padding:16px 24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-close-overlay,.playkit-player.playkit-size-xs .playkit-overlay .playkit-close-overlay{top:15px;right:24px}.playkit-player.playkit-size-sm .playkit-overlay .playkit-title,.playkit-player.playkit-size-xs .playkit-overlay .playkit-title{font-size:20px;line-height:19px;margin-bottom:24px}@keyframes playkit-openSmartContainer{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes playkit-closeSmartContainer{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(10px)}}.playkit-player:not(.playkit-touch) .playkit-smart-container{background-color:#222;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border-radius:4px;position:absolute;right:0px;min-width:193px;font-size:15px;z-index:10;display:block;animation:playkit-openSmartContainer 100ms ease-out forwards}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-leaving{animation:playkit-closeSmartContainer 100ms ease-out forwards}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top{bottom:100%;margin-bottom:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-top:before{display:block;content:\" \";position:absolute;bottom:-6px;left:0;width:100%;height:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-bottom{top:100%;margin-top:6px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-right{left:0px}.playkit-player:not(.playkit-touch) .playkit-smart-container.playkit-left{right:0px}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item{margin:16px;color:rgba(244,244,244,.8);white-space:nowrap;display:flex;justify-content:space-between}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon{display:none}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select{align-self:flex-end}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown span:not(.playkit-badge-icon){overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.playkit-player:not(.playkit-touch) .playkit-smart-container .playkit-smart-container-item.playkit-select-menu-item select{text-align-last:right}.playkit-player.playkit-touch .playkit-smart-container-item,.playkit-player.playkit-size-sm .playkit-smart-container-item,.playkit-player.playkit-size-xs .playkit-smart-container-item{width:300px;max-width:100%;margin:16px auto;color:rgba(244,244,244,.8);white-space:nowrap;text-align:left;display:flex;justify-content:space-between}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label{font-size:16px;color:rgba(255,255,255,.8);margin-right:20px}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item label .playkit-label-icon{width:24px;height:24px;display:inline-block;vertical-align:middle;margin-right:16px}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item .playkit-dropdown,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select{align-self:flex-end}.playkit-player.playkit-touch .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-sm .playkit-smart-container-item.playkit-select-menu-item select,.playkit-player.playkit-size-xs .playkit-smart-container-item.playkit-select-menu-item select{text-align-last:right;min-width:1px;line-height:24px}.playkit-player.playkit-touch.playkit-Windows select option,.playkit-player.playkit-size-sm.playkit-Windows select option,.playkit-player.playkit-size-xs.playkit-Windows select option{color:#000;background-color:#fff}.playkit-overlay.playkit-cvaa-overlay .playkit-sample{border:2px solid rgba(255,255,255,.2);border-radius:4px;font-size:16px;font-weight:bold;line-height:36px;text-align:center;padding:0 31px;display:inline-block;margin:0 12px;position:relative}.playkit-overlay.playkit-cvaa-overlay .playkit-sample:not(.playkit-custom){cursor:pointer}.playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-black-bg{background-color:#000}.playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-yellow-text{color:#faff00}.playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick{height:16px;width:16px;border-radius:8px;background-color:var(--playkit-primary-color);position:absolute;top:-5px;right:-5px}.playkit-overlay.playkit-cvaa-overlay .playkit-sample .playkit-active-tick .playkit-icon{vertical-align:top}.playkit-overlay.playkit-cvaa-overlay .playkit-sample span{font-size:16px !important;line-height:1;vertical-align:middle}.playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa{margin-top:50px;height:40px;width:400px;max-width:100%;border:2px solid rgba(255,255,255,.2);border-radius:4px;font-size:16px;font-weight:bold;line-height:38px;text-align:center;display:inline-block;color:#fff;text-decoration:none;cursor:pointer}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied{margin-top:50px}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied a{color:var(--playkit-primary-brighter-color)}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form{width:300px;max-width:100%;margin:0 auto}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a{color:#fff;line-height:36px;text-decoration:none}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:hover,.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form a:focus{text-decoration:underline}.playkit-overlay.playkit-cvaa-overlay .playkit-custom-caption-form .playkit-slider{float:right;width:100px;margin-top:5px}.playkit-overlay.playkit-cvaa-overlay .playkit-preview-container{width:100%;text-align:center;font-size:16px}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample{width:30%;margin:2.33%;padding:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:first-child{margin-left:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample:last-child{margin-right:0}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-sample.playkit-custom{width:auto;padding:0 10px}.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-button-save-cvaa,.playkit-player.playkit-size-sm .playkit-overlay.playkit-cvaa-overlay .playkit-custom-captions-applied{margin-top:20px}.playkit-font-size,.playkit-font-color,.playkit-font-family,.playkit-font-style,.playkit-font-opacity,.playkit-background-color,.playkit-background-opacity{background:initial}.playkit-loading-backdrop{position:absolute;top:50%;left:50%;transition:100ms opacity;opacity:0;z-index:5}.playkit-loading-backdrop.playkit-show{opacity:1}.playkit-loading-backdrop.playkit-show .playkit-spinner-container{display:block}.playkit-loading-backdrop .playkit-spinner-container{display:none;position:absolute;top:50%;left:50%;transform:translate3d(-50%, -50%, 0)}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button{transition:400ms transform}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-pause{transition:400ms opacity;opacity:0;display:none}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button .playkit-icon-play{transition:400ms opacity;opacity:1;display:block}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing{transform:rotate(360deg)}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-pause{opacity:1;display:block}.playkit-control-button-container.playkit-control-play-pause .playkit-control-button.playkit-is-playing .playkit-icon-play{opacity:0;display:none}.playkit-control-button-container.playkit-control-volume,.playkit-control-button-container.playkit-volume-control{display:inline-block !important}.playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-volume-control-bar,.playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-volume-control-bar{display:block !important}.playkit-control-button-container.playkit-control-volume.playkit-is-muted .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-waves{opacity:0;-webkit-transform:translateX(-5px);-ms-transform:translateX(-5px);transform:translateX(-5px)}.playkit-control-button-container.playkit-control-volume.playkit-is-muted .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control.playkit-is-muted .playkit-icon-volume-mute{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.playkit-control-button-container.playkit-control-volume.playkit-dragging-active .playkit-volume-control-bar,.playkit-control-button-container.playkit-volume-control.playkit-dragging-active .playkit-volume-control-bar{display:block}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves{-webkit-transform:translateX(0px);-ms-transform:translateX(0px);transform:translateX(0px)}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute{opacity:1;-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0)}.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-waves,.playkit-control-button-container.playkit-control-volume .playkit-icon-volume-mute,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-waves,.playkit-control-button-container.playkit-volume-control .playkit-icon-volume-mute{transition:300ms transform,300ms opacity}.playkit-control-button-container.playkit-control-volume i,.playkit-control-button-container.playkit-volume-control i{position:absolute;top:0;left:0}.playkit-volume-control-bar{position:absolute;z-index:2;bottom:38px;left:0;height:112px;width:34px;border-radius:4px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);background-color:#333;padding:6px;display:none}.playkit-volume-control-bar:before{position:absolute;width:34px;height:14px;bottom:-8px;left:0;content:\" \";display:block}.playkit-volume-control-bar .playkit-bar{background-color:#424242;height:100%;position:relative;cursor:pointer}.playkit-volume-control-bar .playkit-progress{position:absolute;bottom:0;left:0;width:100%;border-radius:0 0 2px 2px;background-color:var(--playkit-primary-color)}.playkit-player.playkit-smart-container-open .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-player.playkit-smart-container-open .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-size-ty .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-size-ty .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-touch .playkit-control-button-container.playkit-control-volume.playkit-hover .playkit-control-volume-bar,.playkit-touch .playkit-control-button-container.playkit-volume-control.playkit-hover .playkit-control-volume-bar{display:none !important}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button{transition:100ms transform;transform:scale(1)}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize{display:block}.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover{transform:scale(1.1)}.playkit-player .playkit-seek-bar{padding:12px 0 12px 0;cursor:pointer;position:relative}.playkit-player .playkit-seek-bar:hover .playkit-time-preview,.playkit-player .playkit-seek-bar:hover .playkit-frame-preview:not(.playkit-hide-frame-preview),.playkit-player .playkit-seek-bar.playkit-hover .playkit-time-preview,.playkit-player .playkit-seek-bar.playkit-hover .playkit-frame-preview:not(.playkit-hide-frame-preview){display:block}.playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-scrubber,.playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-scrubber{transform:scale(1)}.playkit-player .playkit-seek-bar:hover .playkit-progress-bar .playkit-virtual-progress,.playkit-player .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-virtual-progress{display:block}.playkit-player .playkit-seek-bar.playkit-ad-break{cursor:initial}.playkit-player .playkit-seek-bar.playkit-ad-break .playkit-progress-bar .playkit-progress{background-color:var(--playkit-ads-color)}.playkit-player .playkit-seek-bar.playkit-live .playkit-progress-bar .playkit-progress{background-color:var(--playkit-live-color)}.playkit-player .playkit-seek-bar .playkit-progress-bar{width:100%;height:4px;background-color:rgba(255,255,255,.3);border-radius:2px;position:absolute;transition:height 200ms ease,transform 200ms ease}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-progress{position:absolute;top:0;left:0;height:100%;border-radius:inherit;background-color:var(--playkit-primary-color)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress{display:none}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-buffered,.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress{position:absolute;top:0;left:0;height:100%;border-radius:inherit}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-buffered{background-color:rgba(255,255,255,.3)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress-indicator{width:1px;height:100%;background-color:var(--playkit-tone-1-color);float:right}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber{position:absolute;cursor:pointer;display:block;top:-6px;right:-8px;border-radius:8px;height:16px;width:16px;background-color:var(--playkit-tone-1-color);box-shadow:0 0 31px 0 rgba(0,0,0,.3);transform:scale(0);transition:100ms transform;z-index:1;pointer-events:none}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-scrubber:active{opacity:1;cursor:grabbing}.playkit-player .playkit-seek-bar .playkit-frame-preview{position:absolute;bottom:20px;left:0}.playkit-player .playkit-seek-bar .playkit-time-preview{position:absolute;bottom:26px;left:0;height:22px;min-width:48px;padding:0 3px;text-align:center;border-radius:3px;background-color:rgba(0,0,0,.7);font-size:13px;font-weight:bold;line-height:22px;color:#fff;z-index:1;pointer-events:none}.playkit-player .playkit-seek-bar .playkit-time-preview,.playkit-player .playkit-seek-bar .playkit-frame-preview{display:none}.playkit-player .playkit-seek-bar .playkit-non-sticky:hover{display:none}.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar:hover .playkit-progress-bar,.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar{height:8px;border-radius:4px;transform:translateY(-2px)}.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar:hover .playkit-progress-bar .playkit-scrubber,.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar .playkit-scrubber{top:-4px}.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress,.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-time-preview,.playkit-player.playkit-touch .playkit-seek-bar .playkit-progress-bar .playkit-frame-preview{display:none}.playkit-player.playkit-size-ty .playkit-seek-bar{padding:12px 0;cursor:pointer;position:relative;float:left;width:calc(100% - 45px);margin:1px 0}.playkit-player.playkit-size-ty .playkit-seek-bar .playkit-frame-preview{display:none}.playkit-player.playkit-size-ty .playkit-seek-bar .playkit-time-preview{bottom:16px}.playkit-frame-preview .playkit-frame-preview-img-container{border:2px solid rgba(255,255,255,.2);border-radius:4px}.playkit-frame-preview .playkit-frame-preview-img-container .playkit-frame-preview-img{background-size:auto 100%;width:100%;height:100%;position:relative}.playkit-player .playkit-time-display{display:inline-block;line-height:32px;vertical-align:top;font-size:14px;padding:0 23px;font-weight:bold}.playkit-touch .playkit-time-display{padding-left:0}.playkit-player.playkit-size-md .playkit-time-display{padding:0 12px}.playkit-player.playkit-size-xs .playkit-time-display,.playkit-player.playkit-size-sm .playkit-time-display{padding:0 12px 0 0}.playkit-player .playkit-video-playing-title{font-size:15px;font-weight:bold;line-height:18px;padding:6px 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.playkit-player .playkit-bottom-bar{background:linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);color:#fff;visibility:hidden;height:auto;max-height:0;transition:100ms max-height ease-in-out,100ms visibility ease-in-out,0ms padding linear 100ms;width:100%;margin-top:auto;bottom:0;left:0;z-index:1;pointer-events:auto;position:relative;padding:0}.playkit-player .playkit-bottom-bar.playkit-hide{display:none}.playkit-player .playkit-bottom-bar .playkit-left-controls{float:left;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-left-controls .playkit-control-button-container:first-child{margin-left:0px}.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area{position:relative;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-right-controls{float:right;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-right-controls .playkit-control-button-container:last-child{margin-right:0px}.playkit-player .playkit-bottom-bar .playkit-control-button-container{margin:0 6px}.playkit-player.playkit-size-ty .playkit-left-controls{display:none}.playkit-player.playkit-size-ty .playkit-control-button-container{display:none;margin:0}.playkit-player.playkit-size-xs .playkit-left-controls .playkit-control-button-container{display:none}.playkit-player.playkit-size-xs .playkit-control-button-container,.playkit-player.playkit-size-sm .playkit-control-button-container{margin:0 3px}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-bottom-bar,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-bottom-bar{visibility:visible;padding:0 16px 4px;max-height:60px;transition:100ms max-height ease-in-out,100ms visibility ease-in-out}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-bottom-bar.playkit-line-break{max-height:92px}.playkit-player.playkit-size-sm .playkit-bottom-bar{padding:0 8px 4px}.playkit-player.playkit-size-sm .playkit-bottom-bar .playkit-time-display{padding-left:0}.playkit-player .playkit-bottom-bar .playkit-left-controls>*,.playkit-player .playkit-bottom-bar .playkit-right-controls>*,.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area>*{pointer-events:auto}.playkit-player .playkit-top-bar{background:linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.6) 100%);color:#fff;visibility:hidden;position:relative;height:auto;min-height:60px;max-height:60px;margin-top:-60px;transition:100ms visibility ease-in-out,100ms margin-top ease-in-out,100ms min-height ease-in-out;width:100%;top:0;left:0;z-index:1;pointer-events:auto}.playkit-player .playkit-top-bar .playkit-top-bar-area{position:absolute;top:0;left:0;height:calc(100% - 28px);width:calc(100% - 32px);margin:14px 16px;pointer-events:none}.playkit-player .playkit-top-bar .playkit-top-bar-area:empty{margin:0;height:0;width:0}.playkit-player .playkit-top-bar.playkit-disabled{pointer-events:none}.playkit-player .playkit-top-bar.playkit-hide{display:none}.playkit-player .playkit-top-bar .playkit-left-controls{float:left;text-align:left;min-width:0;margin:14px 0 14px 16px;pointer-events:none}.playkit-player .playkit-top-bar .playkit-left-controls:empty{margin:0}.playkit-player .playkit-top-bar .playkit-right-controls{float:right;text-align:left;margin:14px 16px 14px 0;pointer-events:none}.playkit-player .playkit-top-bar .playkit-right-controls:empty{margin:0}.playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container{margin:0 6px}.playkit-player .playkit-top-bar .playkit-right-controls .playkit-control-button-container:last-child{margin-right:0}.playkit-player.playkit-casting:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-state-paused:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-state-idle:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-ad-break:not(.playkit-overlay-active) .playkit-top-bar,.playkit-player.playkit-menu-active:not(.playkit-overlay-active) .playkit-top-bar{visibility:visible;margin-top:0;min-height:16px}.playkit-player .playkit-top-bar .playkit-left-controls>*,.playkit-player .playkit-top-bar .playkit-right-controls>*,.playkit-player .playkit-top-bar .playkit-top-bar-area>*{pointer-events:auto}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-left-controls{margin:14px 0 14px 8px}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-left-controls:empty{margin:0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-right-controls{margin:14px 8px 14px 0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-right-controls:empty{margin:0}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-top-bar-area{width:calc(100% - 16px);margin:14px 8px}.playkit-player.playkit-size-sm .playkit-top-bar .playkit-top-bar-area:empty{margin:0}@keyframes playkit-overlayActionIconIn{0%{opacity:0;transform:scale(0)}10%{opacity:.1;transform:scale(0.1)}20%{opacity:.3;transform:scale(0.2)}30%{opacity:.5;transform:scale(0.3)}40%{opacity:.7;transform:scale(0.4)}50%{opacity:.9;transform:scale(0.5)}60%{opacity:.9;transform:scale(0.5)}70%{opacity:.9;transform:scale(0.5)}75%{opacity:.9;transform:scale(0.5)}80%{opacity:1;transform:scale(0.5)}85%{opacity:1;transform:scale(0.5)}90%{opacity:1;transform:scale(0.5)}93%{opacity:.7;transform:scale(0.5)}95%{opacity:.5;transform:scale(0.5)}98%{opacity:.2;transform:scale(0.5)}100%{opacity:0;transform:scale(0.5)}}.playkit-overlay-action .playkit-icon{width:144px;height:144px;position:absolute;top:50%;left:50%;margin:-72px 0 0 -72px;opacity:0}.playkit-player:not(.playkit-touch):not(.playkit-size-sm) .playkit-overlay-action.playkit-in .playkit-icon{animation:playkit-overlayActionIconIn 300ms linear forwards}.playkit-pre-playback-play-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button{z-index:1;position:absolute;top:50%;left:50%;height:108px;width:108px;border:2px solid rgba(255,255,255,.2);background-color:rgba(0,0,0,.5);transform:translate(-50%, -50%);-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);border-radius:54px;padding:20px;cursor:pointer}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:hover{border:2px solid rgba(255,255,255,.4)}.playkit-pre-playback-play-overlay .playkit-pre-playback-play-button:active{opacity:.7;transform:scale(1) translate(-50%, -50%)}.playkit-pre-playback .playkit-bottom-bar,.playkit-pre-playback .playkit-top-bar{opacity:0;display:none}.playkit-player.playkit-size-ty .playkit-pre-playback-play-button{width:75px;height:75px;padding:12px}.playkit-player.playkit-size-xs .playkit-pre-playback-play-button{width:85px;height:85px;padding:15px}.playkit-player .playkit-btn-skip-ad{font-weight:lighter;position:absolute;bottom:60px;right:16px;line-height:36px}.playkit-player .playkit-skip-ad{color:#fff;font-size:20px;font-weight:lighter;line-height:24px;text-shadow:0 0 6px rgba(0,0,0,.6);position:absolute;bottom:66px;right:16px}.playkit-row{display:block}.playkit-row:after{content:\"\";clear:both;display:block}.playkit-d-inline-block{display:inline-block}.playkit-mobile-hidden-select{display:block;opacity:0;position:absolute;top:0;left:0px;width:100%;height:100%}.playkit-font-size-base,.playkit-ad-notice{font-size:15px}.playkit-ad-notice{pointer-events:none}.playkit-live-tag{display:inline-block;background-color:var(--playkit-live-color);color:#fff;border-radius:4px;padding:3px 4px;margin:5px 10px;text-transform:uppercase;font-size:15px;cursor:default}.playkit-live-tag.playkit-non-live-playhead{background-color:#666;cursor:pointer}.playkit-player.playkit-size-sm .playkit-live-tag{margin-left:0}.playkit-interactive-area .playkit-unmute-button-container{top:0;left:0}.playkit-unmute-button-container{display:inline-block;position:absolute;top:16px;left:16px;z-index:15}.playkit-unmute-button-container a{color:#fff}.playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button{max-width:64px}.playkit-unmute-button-container.playkit-show-icon-only .playkit-btn.playkit-unmute-button span{transform:translateX(10px);opacity:0}.playkit-btn.playkit-unmute-button{font-size:15px;max-width:200px;transition:max-width 200ms;padding:0 16px;white-space:nowrap}.playkit-btn.playkit-unmute-button span{transform:translateX(0px);opacity:1;transition:transform 100ms,opacity 100ms;display:inline-block;color:#fff}.playkit-btn.playkit-unmute-button.playkit-has-top-bar{transition:100ms transform}.playkit-unmute-icon-container{width:32px;height:32px;display:inline-block;vertical-align:top;position:relative;margin-right:3px}.playkit-unmute-icon-container i{position:absolute;top:0;left:0}.playkit-player.playkit-hover .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-state-paused .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-state-idle .playkit-unmute-button-container.playkit-has-top-bar,.playkit-player.playkit-menu-active .playkit-unmute-button-container.playkit-has-top-bar{transform:translateY(32px)}.playkit-overlay.playkit-error-overlay{background-color:var(--playkit-tone-7-color);font-size:0em}.playkit-overlay-contents .playkit-error-overlay{padding-top:20px}.playkit-error-overlay{position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column;height:100%}.playkit-error-overlay .playkit-copy-url-row{display:flex;margin-bottom:10px}.playkit-error-overlay .playkit-svg-container{flex:4;display:flex;justify-content:space-around;flex-flow:column}.playkit-error-overlay .playkit-headline{color:var(--playkit-tone-1-color);font-size:18px;margin:10px 0 14px 0;flex:1}.playkit-error-overlay .playkit-error-session{font-size:14px;color:var(--playkit-tone-2-color);margin:auto;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.playkit-error-overlay .playkit-control-button-container{flex:5}.playkit-error-overlay .playkit-retry-btn{height:36px;width:auto;min-width:120px;padding:0 8px;border:2px solid var(--playkit-tone-7-color);border-radius:18px;background-color:#000;color:var(--playkit-tone-1-color);font-size:15px;font-weight:bold;line-height:32px;cursor:pointer}.playkit-error-overlay .playkit-error-text{height:0px;visibility:hidden}.playkit-link-options-container{width:auto}.playkit-link-options-container .playkit-copy-url-row .playkit-input-copy-url{margin:0}.playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url{margin-left:8px;height:32px;width:32px}.playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url .playkit-icon{height:24px;width:24px;margin-top:-3px}.playkit-slider{height:8px;border-radius:4px;background-color:rgba(255,255,255,.2)}.playkit-slider .playkit-progress{background-color:var(--playkit-primary-color);height:8px;border-radius:4px;position:relative}.playkit-slider .playkit-progress .playkit-handle{height:12px;width:12px;border-radius:5px;background-color:#fff;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);position:absolute;right:0;top:0px;transform:translate3d(6px, -2px, 0);cursor:pointer}.playkit-player .playkit-learn-more{font-weight:lighter}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button{transition:100ms transform;transform:scale(1)}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button .playkit-icon-minimize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-maximize{display:none}.playkit-player .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button.playkit-is-fullscreen .playkit-icon-minimize{display:block}.playkit-player:not(.playkit-touch) .playkit-control-button-container.playkit-control-fullscreen .playkit-control-button:hover{transform:scale(1.1)}.playkit-player .playkit-watermark{position:absolute;transition:visibility 0s 1s,opacity 1s linear,transform ease-out 100ms}.playkit-player .playkit-watermark.playkit-hide-watermark{visibility:hidden;opacity:0}.playkit-player .playkit-watermark.playkit-top{top:0}.playkit-player .playkit-watermark.playkit-bottom{bottom:0}.playkit-player .playkit-watermark.playkit-right{right:0}.playkit-player .playkit-watermark.playkit-left{left:0}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button .playkit-icon-vr-stereo-full{display:none}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo{display:none}.playkit-control-button-container.playkit-control-vr-stereo .playkit-control-button.playkit-vr-stereo-mode .playkit-icon-vr-stereo-full{display:block}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button .playkit-icon-closed-captions-on{display:none}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button.playkit-cc-on .playkit-icon-closed-captions-off{display:none}.playkit-control-button-container.playkit-control-closed-captions .playkit-control-button.playkit-cc-on .playkit-icon-closed-captions-on{display:block}.playkit-player .playkit-cast-button{display:block;width:28px;height:30px;background-color:rgba(255,255,255,0);border:none;cursor:pointer;--connected-color: var(--playkit-tone-2-color);--disconnected-color: var(--playkit-tone-2-color)}.playkit-player .playkit-cast-button:hover{--connected-color: #ffffffff;--disconnected-color: #ffffffff}.playkit-player .playkit-cast-button.playkit-cast-button-active{--connected-color: rgba(1, 172, 205, 0.8)}.playkit-player .playkit-cast-button.playkit-cast-button-active:hover{--connected-color: var(--playkit-primary-color)}.playkit-player .playkit-cast-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.playkit-player .playkit-cast-overlay .playkit-cast-poster{all:inherit;background-size:contain;background:#000 no-repeat center center}.playkit-player .playkit-cast-overlay .playkit-cast-poster.playkit-has-poster{background-color:#000}.playkit-player .playkit-cast-overlay .playkit-cast-black-cover{all:inherit;background:linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, 0) 100%)}.playkit-player .playkit-cast-box .playkit-cast-icon{position:absolute;bottom:0;left:46px;height:128px}.playkit-player .playkit-cast-box .playkit-cast-icon .playkit-icon{width:30px;height:22px;color:rgba(255,255,255,.6);opacity:.6}.playkit-player .playkit-cast-box .playkit-cast-connecting-spinner{height:21px;width:21px;-webkit-animation:playkit-spin .9s infinite linear;border:3px solid rgba(255,255,255,.4);border-top-color:rgba(255,255,255,.8);border-radius:100%}.playkit-player .playkit-cast-box .playkit-cast-text{position:absolute;bottom:0;left:89px;height:128px;font-weight:lighter}.playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-status{display:inline-block;margin-top:3px;font-size:16px;color:rgba(255,255,255,.6);float:left;font-weight:inherit}.playkit-player .playkit-cast-box .playkit-cast-text .playkit-cast-device{left:0;display:inline-block;font-weight:inherit;font-size:25px;color:#fff;line-height:40px}@keyframes playkit-castOnTVAnimation{0%{opacity:0;transform:rotateY(70deg)}33%{opacity:.3;transform:rotateY(50deg)}66%{opacity:.6;transform:rotateY(30deg)}100%{opacity:1;transform:rotateY(0)}}.playkit-player .playkit-cast-on-tv-button-container{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.playkit-player .playkit-cast-on-tv-button-container span{font-weight:lighter;color:#fff}.playkit-player .playkit-cast-on-tv-button-container.playkit-show-cast-on-tv{animation:playkit-castOnTVAnimation 300ms linear forwards}.playkit-player .playkit-btn.playkit-cast-on-tv-button{font-size:15px;max-width:200px;transition:max-width 200ms;padding:0 16px;white-space:nowrap;position:absolute;bottom:0;transform:translate(-50%, -50%);left:50%}.playkit-player .playkit-btn.playkit-cast-on-tv-button span{transform:translateX(0px);opacity:1;transition:transform 100ms,opacity 100ms;display:inline-block}.playkit-player .playkit-cast-on-tv-icon-container{width:32px;height:32px;display:inline-block;vertical-align:top;position:relative;margin-right:3px}.playkit-player .playkit-cast-on-tv-icon-container i{position:absolute;top:0;left:0}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview{position:absolute;bottom:35px;width:280px;height:72px;display:flex;border-radius:4px;box-shadow:0px 0px 0px 1px rgba(0,0,0,.2),0px 8px 60px -16px rgba(0,0,0,.2);opacity:0;transition:400ms opacity;pointer-events:none}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview:hover{opacity:0 !important}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-img{width:128px;height:inherit;border-radius:4px 0 0 4px;background-size:contain;background-repeat:round}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text{width:152px;height:inherit;padding:8px;background-color:rgba(0,0,0,.7);border-radius:0 4px 4px 0}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-title{font-size:14px;font-weight:400;margin-bottom:3px;opacity:.7}.playkit-control-button-container.playkit-control-playlist-button .playkit-poster-preview .playkit-poster-preview-text .playkit-poster-preview-text-name{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}.playkit-control-button-container.playkit-control-playlist-button:hover .playkit-poster-preview{opacity:1}.playkit-icon-picture-in-picture-stop{display:none}.playkit-is-in-picture-in-picture .playkit-icon-picture-in-picture-start{display:none}.playkit-is-in-picture-in-picture .playkit-icon-picture-in-picture-stop{display:block}.playkit-player-gui>.playkit-playback-controls,.playkit-center-playback-controls{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);-webkit-transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%);white-space:nowrap;z-index:1}.playkit-bottom-bar .playkit-playback-controls{display:inline}.playkit-player.playkit-size-sm.playkit-state-idle .playkit-control-playlist-button,.playkit-player.playkit-size-xs.playkit-state-idle .playkit-control-playlist-button,.playkit-player.playkit-touch.playkit-state-idle .playkit-control-playlist-button{display:none}.playkit-player.playkit-size-sm:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle) .playkit-bottom-bar .playkit-playback-controls{display:none}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls{display:block}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-control-button,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-control-button{width:auto;height:auto;padding:0 16px;-webkit-filter:drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5));filter:drop-shadow(0px 0px 8px rgba(0, 0, 0, 0.5))}.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-size-sm:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-size-xs:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-player-gui>.playkit-playback-controls .playkit-icon,.playkit-player.playkit-touch:not(.playkit-state-idle).playkit-hover .playkit-center-playback-controls .playkit-icon{width:64px;height:64px}.playkit-player.playkit-overlay-active .playkit-gui-area .playkit-playback-controls{opacity:0;visibility:hidden}@keyframes playkit-slideIn{0%{right:-160px}100%{right:0}}.playkit-player .playkit-playlist-countdown{display:flex;height:72px;position:absolute;right:0;bottom:0;border-radius:4px;transition:opacity 400ms,bottom 300ms;cursor:pointer;box-shadow:0px 0px 0px 1px rgba(0,0,0,.2),0px 8px 60px -16px rgba(0,0,0,.2)}.playkit-player .playkit-playlist-countdown.playkit-slideIn{right:-160px;animation:playkit-slideIn 500ms 500ms forwards}.playkit-player .playkit-playlist-countdown.playkit-hidden{pointer-events:none;opacity:0}.playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{width:0}.playkit-player .playkit-playlist-countdown.playkit-hidden .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content{opacity:0}.playkit-player .playkit-playlist-countdown.playkit-canceled{bottom:-50px;opacity:0}.playkit-player .playkit-playlist-countdown:hover .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{background-color:#000}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-poster{width:128px;height:inherit;border-radius:4px 0 0 4px;background-size:contain;background-repeat:round}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:152px;height:inherit}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{width:inherit;border-radius:0 4px 3px 0;background-color:rgba(0,0,0,.7);height:inherit;transition:width 500ms 1000ms}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content{width:inherit;transition:opacity 300ms 1200ms}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{width:100%;padding:10px;font-size:14px;font-weight:400;text-align:left;color:#fff;float:left;line-height:initial}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{margin-bottom:12px;opacity:.7}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title .playkit-playlist-countdown-time-left{display:inline;margin-left:4px}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{position:absolute;top:5px;right:5px;width:24px;height:24px}.playkit-player .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel *{width:inherit;height:inherit}.playkit-player.playkit-size-md .playkit-playlist-countdown{height:54px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-poster{width:96px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:152px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{padding:8px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{margin-bottom:4px}.playkit-player.playkit-size-md .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{top:3px;right:3px}.playkit-player.playkit-size-sm .playkit-playlist-countdown,.playkit-player.playkit-size-xs .playkit-playlist-countdown,.playkit-player.playkit-size-ty .playkit-playlist-countdown{z-index:1;height:36px;margin:8px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-poster,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-poster,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-poster{display:none}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder{width:108px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background{transition:width 500ms;border-radius:2px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text{width:90%;padding:3px 0 0 4px}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-title{font-size:12px;margin-bottom:0}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-text .playkit-playlist-countdown-text-name{font-size:12px;font-weight:400}.playkit-player.playkit-size-sm .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel,.playkit-player.playkit-size-xs .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel,.playkit-player.playkit-size-ty .playkit-playlist-countdown .playkit-playlist-countdown-content-placeholder .playkit-playlist-countdown-content-background .playkit-playlist-countdown-content .playkit-playlist-countdown-cancel{top:0;right:0}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay{position:absolute;width:100%;height:100%;background-color:rgba(0,0,0,.5)}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content{position:relative;top:50%;transform:translateY(-50%)}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text{position:absolute;width:100%;top:-90px;font-size:15px;color:#fff;padding:4px 8px 12px 8px;text-align:center}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-title{padding:4px;font-weight:100}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name{padding:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{position:relative;margin:auto;width:384px}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio{width:100%;padding-top:56%}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster{position:absolute;top:0;left:0;bottom:0;right:0;border:2px solid rgba(255,255,255,.2);border-radius:4px;cursor:pointer}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img{height:100%;border-radius:3px;background-size:contain;background-repeat:round}.playkit-player.playkit-state-idle .playkit-playlist-next-screen-overlay .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:64px;height:64px}.playkit-player.playkit-state-idle.playkit-size-lg .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:37.5%}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text{top:-58px}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-text .playkit-playlist-next-screen-text-name{padding:0}.playkit-player.playkit-state-idle.playkit-size-md .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:42%}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder{width:32px}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster{border:0}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-playlist-next-screen-poster-img{display:none}.playkit-player.playkit-state-idle.playkit-size-sm .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon,.playkit-player.playkit-state-idle.playkit-size-xs .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon,.playkit-player.playkit-state-idle.playkit-size-ty .playkit-playlist-next-screen-content .playkit-playlist-next-screen-poster-placeholder .playkit-playlist-next-screen-poster-aspect-ratio .playkit-playlist-next-screen-poster .playkit-icon{width:32px;height:32px}.playkit-picture-in-picture-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster{all:inherit;background-size:contain;background:#000 no-repeat center center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster.playkit-has-poster{background-color:#000}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-poster .playkit-dark-layer{background-color:rgba(0,0,0,.4);position:absolute;top:0;left:0;width:100%;height:100%}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control{position:absolute;display:flex;flex-direction:column;height:100%}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control::after{content:\"\";flex:3}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-control::before{content:\"\";flex:1}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-text{color:var(--playkit-tone-1-color);font-size:18px;white-space:nowrap;overflow:hidden}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-button{height:36px;width:120px;border:2px solid var(--playkit-tone-6-color);border-radius:18px;background-color:var(--playkit-tone-7-color);color:var(--playkit-tone-1-color);font-size:15px;font-weight:bold;line-height:30px;cursor:pointer;margin-top:20px;align-self:center}.playkit-picture-in-picture-overlay .playkit-picture-in-picture-button:hover{background-color:var(--playkit-tone-6-color)}.playkit-copy-url-row .playkit-input-copy-url{margin:0}.playkit-copy-url-row .playkit-btn-copy-url{margin:0 8px}.playkit-copy-url-row .playkit-btn-copy-url .playkit-icon{height:24px;width:24px;margin-top:-3px;display:none}.playkit-copy-url-row .playkit-btn-copy-url .playkit-icon-copy{display:block}.playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-copy{display:none}.playkit-copy-url-row .playkit-btn-copy-url.playkit-copied .playkit-icon-check{display:block}.playkit-IE.playkit-player .playkit-tooltip .playkit-tooltip-label{white-space:nowrap}.playkit-player .playkit-tooltip{position:relative;display:inline-block;height:100%;width:100%}.playkit-player .playkit-tooltip .playkit-tooltip-label{visibility:hidden;background-color:var(--playkit-tooltip-background-color);color:var(--playkit-tooltip-color);text-align:center;padding:4px 6px;border-radius:4px;position:absolute;line-height:normal;font-weight:bold;font-size:13px;opacity:0;transition:opacity 1s;width:max-content;display:table}.playkit-player .playkit-tooltip .playkit-tooltip-label:after{content:\"\";position:absolute;border-width:5px;border-style:solid;border-radius:3px;color:var(--playkit-tooltip-background-color);z-index:-1}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top{bottom:calc(100% + 10px);left:50%;transform:translate(-50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top:after{bottom:-4px;left:50%;transform:translate(-50%) rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-left{bottom:calc(100% + 10px);left:50%;transform:translate(-100%);margin-left:16px}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-left:after{bottom:-4px;right:0;margin-right:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-right{bottom:calc(100% + 10px);left:50%;transform:translate(-16px)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-top-right:after{bottom:-4px;left:0;margin-left:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom{top:calc(100% + 10px);left:50%;transform:translate(-50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom:after{top:-4px;left:50%;margin-left:-5px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-right{top:calc(100% + 10px);left:50%;transform:translate(-16px)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-right:after{top:-4px;left:0;margin-left:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-left{top:calc(100% + 10px);transform:translate(-100%);left:50%;margin-left:16px}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-bottom-left:after{top:-4px;right:0;margin-right:11px;transform:rotate(45deg) skew(5deg, 5deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-left{top:50%;right:calc(100% + 10px);transform:translate(0, -50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-left:after{top:50%;left:100%;margin-left:-6px;margin-top:-5px;transform:rotate(135deg) skew(10deg, 10deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-right{top:50%;left:calc(100% + 10px);transform:translate(0, -50%)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-tooltip-right:after{top:50%;right:100%;margin-top:-5px;margin-right:-6px;transform:rotate(135deg) skew(10deg, 10deg)}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-show{visibility:visible;opacity:1}.playkit-player .playkit-tooltip .playkit-tooltip-label.playkit-hide{transition:opacity .15s ease-in-out}.playkit-side-panel{position:absolute;overflow:hidden;transition:all 500ms;transition-property:left,right,bottom,top,opacity;z-index:1}.playkit-vertical-side-panel{height:100%}.playkit-horizontal-side-panel{height:0;left:0;right:0}.playkit-side-panel-content{width:100%;height:100%}.playkit-player.playkit-overlay-active .playkit-interactive-area{filter:blur(16px)}.playkit-interactive-area{pointer-events:none;position:relative;top:0;margin:16px;transition:margin 100ms ease-in-out;flex:1}.playkit-player.playkit-size-sm .playkit-interactive-area{margin:8px}.playkit-player.playkit-casting:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-metadata-loaded.playkit-hover:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-state-paused:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-state-idle:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-ad-break:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area,.playkit-player.playkit-menu-active:not(.playkit-overlay-active).playkit-size-sm .playkit-interactive-area{margin:0px 8px}.playkit-player.playkit-casting .playkit-interactive-area,.playkit-player.playkit-metadata-loaded.playkit-hover .playkit-interactive-area,.playkit-player.playkit-state-paused .playkit-interactive-area,.playkit-player.playkit-state-idle .playkit-interactive-area,.playkit-player.playkit-ad-break .playkit-interactive-area,.playkit-player.playkit-menu-active .playkit-interactive-area{margin:0px 16px}.playkit-video-area{pointer-events:none;transition:all 500ms;transition-property:left,right,bottom,top,width,height}.playkit-gui-area{pointer-events:none;transition:all 500ms;transition-property:left,right,bottom,top;display:flex;flex-flow:column nowrap}@keyframes playkit-kaltura-spinner{0%{transform:rotate(0deg) scale(0.7);opacity:1}70%{transform:rotate(360deg) scale(0.7);opacity:1}82%{transform:rotate(360deg) scale(0);opacity:0}87%{transform:rotate(360deg) scale(0.9);opacity:1}100%{transform:rotate(360deg) scale(0.7);opacity:1}}.playkit-spinner{width:100px;height:100px;position:relative;animation:playkit-kaltura-spinner 2.5s infinite}.playkit-spinner span{width:8px;height:8px;background-color:#fff;display:block;border-radius:8px;position:absolute;top:50%;left:50%;margin-top:-4px;margin-left:-4px}.playkit-spinner span:nth-child(1){transform:rotate(45deg) translateX(-25px) translateY(-25px);background-color:#da1f26}.playkit-spinner span:nth-child(2){transform:rotate(90deg) translateX(-25px) translateY(-25px);background-color:#06a885}.playkit-spinner span:nth-child(3){transform:rotate(135deg) translateX(-25px) translateY(-25px);background-color:#009344}.playkit-spinner span:nth-child(4){transform:rotate(180deg) translateX(-25px) translateY(-25px);background-color:#f8a61a}.playkit-spinner span:nth-child(5){transform:rotate(225deg) translateX(-25px) translateY(-25px);background-color:#1b4a97}.playkit-spinner span:nth-child(6){transform:rotate(270deg) translateX(-25px) translateY(-25px);background-color:#00abcc}.playkit-spinner span:nth-child(7){transform:rotate(315deg) translateX(-25px) translateY(-25px);background-color:#b1d238}.playkit-spinner span:nth-child(8){transform:rotate(360deg) translateX(-25px) translateY(-25px);background-color:#fcd203}.playkit-switch{position:relative;display:inline-block;width:32px;height:16px}.playkit-switch .playkit-toggle-input{opacity:0;width:0;height:0}.playkit-switch .playkit-toggle-input:checked+.playkit-slider{background-color:#2196f3}.playkit-switch .playkit-toggle-input:focus+.playkit-slider{box-shadow:0 0 1px #2196f3}.playkit-switch .playkit-toggle-input:checked+.playkit-slider:before{transform:translateX(14px);-webkit-transform:translateX(14px);-ms-transform:translateX(14px)}.playkit-switch .playkit-slider{height:100%;position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.4s;transition:.4s;border-radius:34px}.playkit-switch .playkit-slider:before{position:absolute;content:\"\";height:12px;width:12px;left:3px;top:2px;background-color:#fff;-webkit-transition:.3s;transition:.3s;border-radius:50%}",""]),t.locals={primaryColor:"var(--playkit-primary-color)",primaryDarkerColor:"var(--playkit-primary-darker-color)",primaryBrighterColor:"var(--playkit-primary-brighter-color)",primaryTextContrastColor:"var(--playkit-primary-text-contrast-color)",secondaryColor:"var(--playkit-secondary-color)",secondaryDarkerColor:"var(--playkit-secondary-darker-color)",secondaryBrighterColor:"var(--playkit-secondary-brighter-color)",secondaryTextContrastColor:"var(--playkit-secondary-text-contrast-color)",successDarkerColor:"var(--playkit-success-darker-color)",successBrighterColor:"var(--playkit-success-brighter-color)",successTextContrastColor:"var(--playkit-success-text-contrast-color)",dangerColor:"var(--playkit-danger-color)",dangerDarkerColor:"var(--playkit-danger-darker-color)",dangerBrighterColor:"var(--playkit-danger-brighter-color)","danger-text-contrast-color":"var(--playkit-danger-text-contrast-color)",dangerTextContrastColor:"var(--playkit-danger-text-contrast-color)",warningColor:"var(--playkit-warning-color)",warningDarkerColor:"var(--playkit-warning-darker-color)",warningBrighterColor:"var(--playkit-warning-brighter-color)",warningTextContrastColor:"var(--playkit-warning-text-contrast-color)",tone1Color:"var(--playkit-tone-1-color)",tone2Color:"var(--playkit-tone-2-color)",tone3Color:"var(--playkit-tone-3-color)",tone4Color:"var(--playkit-tone-4-color)",tone5Color:"var(--playkit-tone-5-color)",tone6Color:"var(--playkit-tone-6-color)",tone7Color:"var(--playkit-tone-7-color)",tone8Color:"var(--playkit-tone-8-color)",liveColor:"var(--playkit-live-color)",playerBackgroundColor:"var(--playkit-player-background-color)",tabFocusColor:"var(--playkit-tab-focus-color)",tooltipBackgroundColor:"var(--playkit-tooltip-background-color)",tooltipColor:"var(--playkit-tooltip-color)",adsColor:"var(--playkit-ads-color)",progressBarHeight:"4px",progressBarBorderRadius:"2px",defaultTransitionTime:"500",bottomBarMaxHeight:"60",brandColor:"#006bff",white:"#fff",player:"playkit-player",row:"playkit-row","d-inline-block":"playkit-d-inline-block",dInlineBlock:"playkit-d-inline-block","mobile-hidden-select":"playkit-mobile-hidden-select",mobileHiddenSelect:"playkit-mobile-hidden-select","font-size-base":"playkit-font-size-base",fontSizeBase:"playkit-font-size-base","ad-notice":"playkit-ad-notice",adNotice:"playkit-ad-notice","form-group":"playkit-form-group",formGroup:"playkit-form-group","has-error":"playkit-has-error",hasError:"playkit-has-error","form-control":"playkit-form-control",formControl:"playkit-form-control","has-icon":"playkit-has-icon",hasIcon:"playkit-has-icon",icon:"playkit-icon",checkbox:"playkit-checkbox","form-group-row":"playkit-form-group-row",formGroupRow:"playkit-form-group-row",dropdown:"playkit-dropdown",btn:"playkit-btn","btn-block":"playkit-btn-block",btnBlock:"playkit-btn-block","btn-dark-transparent":"playkit-btn-dark-transparent",btnDarkTransparent:"playkit-btn-dark-transparent","btn-branded":"playkit-btn-branded",btnBranded:"playkit-btn-branded","btn-rounded":"playkit-btn-rounded",btnRounded:"playkit-btn-rounded","btn-borderless":"playkit-btn-borderless",btnBorderless:"playkit-btn-borderless","only-icon":"playkit-only-icon",onlyIcon:"playkit-only-icon","only-label":"playkit-only-label",onlyLabel:"playkit-only-label","size-sm":"playkit-size-sm",sizeSm:"playkit-size-sm","size-xs":"playkit-size-xs",sizeXs:"playkit-size-xs","badge-icon":"playkit-badge-icon",badgeIcon:"playkit-badge-icon","icon-maximize":"playkit-icon-maximize",iconMaximize:"playkit-icon-maximize","icon-minimize":"playkit-icon-minimize",iconMinimize:"playkit-icon-minimize","icon-play":"playkit-icon-play",iconPlay:"playkit-icon-play","icon-pause":"playkit-icon-pause",iconPause:"playkit-icon-pause","icon-volume-base":"playkit-icon-volume-base",iconVolumeBase:"playkit-icon-volume-base","icon-volume-waves":"playkit-icon-volume-waves",iconVolumeWaves:"playkit-icon-volume-waves","icon-volume-wave":"playkit-icon-volume-wave",iconVolumeWave:"playkit-icon-volume-wave","icon-volume-mute":"playkit-icon-volume-mute",iconVolumeMute:"playkit-icon-volume-mute","icon-close":"playkit-icon-close",iconClose:"playkit-icon-close","icon-settings":"playkit-icon-settings",iconSettings:"playkit-icon-settings","icon-check":"playkit-icon-check",iconCheck:"playkit-icon-check","icon-check-active":"playkit-icon-check-active",iconCheckActive:"playkit-icon-check-active","icon-language":"playkit-icon-language",iconLanguage:"playkit-icon-language","icon-quality":"playkit-icon-quality",iconQuality:"playkit-icon-quality","icon-captions":"playkit-icon-captions",iconCaptions:"playkit-icon-captions","icon-speed":"playkit-icon-speed",iconSpeed:"playkit-icon-speed","icon-speed-down":"playkit-icon-speed-down",iconSpeedDown:"playkit-icon-speed-down","icon-speed-up":"playkit-icon-speed-up",iconSpeedUp:"playkit-icon-speed-up","icon-audio":"playkit-icon-audio",iconAudio:"playkit-icon-audio","icon-arrow-down":"playkit-icon-arrow-down",iconArrowDown:"playkit-icon-arrow-down","icon-start-over":"playkit-icon-start-over",iconStartOver:"playkit-icon-start-over","icon-seek-end":"playkit-icon-seek-end",iconSeekEnd:"playkit-icon-seek-end","icon-rewind":"playkit-icon-rewind",iconRewind:"playkit-icon-rewind","icon-rewind-10":"playkit-icon-rewind-10",iconRewind10:"playkit-icon-rewind-10","icon-forward":"playkit-icon-forward",iconForward:"playkit-icon-forward","icon-forward-10":"playkit-icon-forward-10",iconForward10:"playkit-icon-forward-10","icon-vr-stereo":"playkit-icon-vr-stereo",iconVrStereo:"playkit-icon-vr-stereo","icon-vr-stereo-full":"playkit-icon-vr-stereo-full",iconVrStereoFull:"playkit-icon-vr-stereo-full","icon-chromecast":"playkit-icon-chromecast",iconChromecast:"playkit-icon-chromecast","icon-chromecast-brand":"playkit-icon-chromecast-brand",iconChromecastBrand:"playkit-icon-chromecast-brand","icon-next":"playkit-icon-next",iconNext:"playkit-icon-next","icon-prev":"playkit-icon-prev",iconPrev:"playkit-icon-prev","icon-picture-in-picture-start":"playkit-icon-picture-in-picture-start",iconPictureInPictureStart:"playkit-icon-picture-in-picture-start","icon-picture-in-picture-stop":"playkit-icon-picture-in-picture-stop",iconPictureInPictureStop:"playkit-icon-picture-in-picture-stop","icon-advanced-audio-description":"playkit-icon-advanced-audio-description",iconAdvancedAudioDescription:"playkit-icon-advanced-audio-description","icon-quality-hd":"playkit-icon-quality-hd",iconQualityHd:"playkit-icon-quality-hd","icon-quality-hd-active":"playkit-icon-quality-hd-active",iconQualityHdActive:"playkit-icon-quality-hd-active","icon-quality-4k":"playkit-icon-quality-4k",iconQuality4K:"playkit-icon-quality-4k","icon-quality-4k-active":"playkit-icon-quality-4k-active",iconQuality4KActive:"playkit-icon-quality-4k-active","icon-quality-8k":"playkit-icon-quality-8k",iconQuality8K:"playkit-icon-quality-8k","icon-quality-8k-active":"playkit-icon-quality-8k-active",iconQuality8KActive:"playkit-icon-quality-8k-active","icon-closed-captions-on":"playkit-icon-closed-captions-on",iconClosedCaptionsOn:"playkit-icon-closed-captions-on","icon-closed-captions-off":"playkit-icon-closed-captions-off",iconClosedCaptionsOff:"playkit-icon-closed-captions-off","label-badge":"playkit-label-badge",labelBadge:"playkit-label-badge",active:"playkit-active","dropdown-menu":"playkit-dropdown-menu",dropdownMenu:"playkit-dropdown-menu","dropdown-button":"playkit-dropdown-button",dropdownButton:"playkit-dropdown-button",openDropmenu:"playkit-openDropmenu",top:"playkit-top",bottom:"playkit-bottom",right:"playkit-right",left:"playkit-left","stick-bottom":"playkit-stick-bottom",stickBottom:"playkit-stick-bottom","dropdown-menu-item":"playkit-dropdown-menu-item",dropdownMenuItem:"playkit-dropdown-menu-item","menu-icon-container":"playkit-menu-icon-container",menuIconContainer:"playkit-menu-icon-container","control-button":"playkit-control-button",controlButton:"playkit-control-button","button-badge":"playkit-button-badge",buttonBadge:"playkit-button-badge","control-button-rounded":"playkit-control-button-rounded",controlButtonRounded:"playkit-control-button-rounded",touch:"playkit-touch","control-button-container":"playkit-control-button-container",controlButtonContainer:"playkit-control-button-container","state-idle":"playkit-state-idle",stateIdle:"playkit-state-idle","no-idle-control":"playkit-no-idle-control",noIdleControl:"playkit-no-idle-control",rotate:"playkit-rotate",spin:"playkit-spin","reverse-rotate":"playkit-reverse-rotate",reverseRotate:"playkit-reverse-rotate","reverse-spin":"playkit-reverse-spin",reverseSpin:"playkit-reverse-spin","upper-bar-icon":"playkit-upper-bar-icon",upperBarIcon:"playkit-upper-bar-icon",emptyUrl:"playkit-emptyUrl","player-gui":"playkit-player-gui",playerGui:"playkit-player-gui","overlay-active":"playkit-overlay-active",overlayActive:"playkit-overlay-active",nav:"playkit-nav","ad-break":"playkit-ad-break",adBreak:"playkit-ad-break","metadata-loaded":"playkit-metadata-loaded",metadataLoaded:"playkit-metadata-loaded",hover:"playkit-hover","state-paused":"playkit-state-paused",statePaused:"playkit-state-paused","pre-playback":"playkit-pre-playback",prePlayback:"playkit-pre-playback",casting:"playkit-casting","menu-active":"playkit-menu-active",menuActive:"playkit-menu-active",iOS:"playkit-iOS",iOs:"playkit-iOS",Safari:"playkit-Safari",safari:"playkit-Safari",fullscreen:"playkit-fullscreen","video-player":"playkit-video-player",videoPlayer:"playkit-video-player",overlay:"playkit-overlay",openOverlay:"playkit-openOverlay","overlay-contents":"playkit-overlay-contents",overlayContents:"playkit-overlay-contents",title:"playkit-title","close-overlay":"playkit-close-overlay",closeOverlay:"playkit-close-overlay","overlay-screen":"playkit-overlay-screen",overlayScreen:"playkit-overlay-screen","size-md":"playkit-size-md",sizeMd:"playkit-size-md","smart-container":"playkit-smart-container",smartContainer:"playkit-smart-container",openSmartContainer:"playkit-openSmartContainer",leaving:"playkit-leaving",closeSmartContainer:"playkit-closeSmartContainer","smart-container-item":"playkit-smart-container-item",smartContainerItem:"playkit-smart-container-item","select-menu-item":"playkit-select-menu-item",selectMenuItem:"playkit-select-menu-item","label-icon":"playkit-label-icon",labelIcon:"playkit-label-icon",Windows:"playkit-Windows",windows:"playkit-Windows","cvaa-overlay":"playkit-cvaa-overlay",cvaaOverlay:"playkit-cvaa-overlay",sample:"playkit-sample",custom:"playkit-custom","black-bg":"playkit-black-bg",blackBg:"playkit-black-bg","yellow-text":"playkit-yellow-text",yellowText:"playkit-yellow-text","active-tick":"playkit-active-tick",activeTick:"playkit-active-tick","button-save-cvaa":"playkit-button-save-cvaa",buttonSaveCvaa:"playkit-button-save-cvaa","custom-captions-applied":"playkit-custom-captions-applied",customCaptionsApplied:"playkit-custom-captions-applied","custom-caption-form":"playkit-custom-caption-form",customCaptionForm:"playkit-custom-caption-form",slider:"playkit-slider","preview-container":"playkit-preview-container",previewContainer:"playkit-preview-container","font-size":"playkit-font-size",fontSize:"playkit-font-size","font-color":"playkit-font-color",fontColor:"playkit-font-color","font-family":"playkit-font-family",fontFamily:"playkit-font-family","font-style":"playkit-font-style",fontStyle:"playkit-font-style","font-opacity":"playkit-font-opacity",fontOpacity:"playkit-font-opacity","background-color":"playkit-background-color",backgroundColor:"playkit-background-color","background-opacity":"playkit-background-opacity",backgroundOpacity:"playkit-background-opacity","loading-backdrop":"playkit-loading-backdrop",loadingBackdrop:"playkit-loading-backdrop",show:"playkit-show","spinner-container":"playkit-spinner-container",spinnerContainer:"playkit-spinner-container","control-play-pause":"playkit-control-play-pause",controlPlayPause:"playkit-control-play-pause","is-playing":"playkit-is-playing",isPlaying:"playkit-is-playing","control-volume":"playkit-control-volume",controlVolume:"playkit-control-volume","volume-control":"playkit-volume-control",volumeControl:"playkit-volume-control","volume-control-bar":"playkit-volume-control-bar",volumeControlBar:"playkit-volume-control-bar","is-muted":"playkit-is-muted",isMuted:"playkit-is-muted","dragging-active":"playkit-dragging-active",draggingActive:"playkit-dragging-active",bar:"playkit-bar",progress:"playkit-progress","smart-container-open":"playkit-smart-container-open",smartContainerOpen:"playkit-smart-container-open","control-volume-bar":"playkit-control-volume-bar",controlVolumeBar:"playkit-control-volume-bar","size-ty":"playkit-size-ty",sizeTy:"playkit-size-ty","control-fullscreen":"playkit-control-fullscreen",controlFullscreen:"playkit-control-fullscreen","is-fullscreen":"playkit-is-fullscreen",isFullscreen:"playkit-is-fullscreen","seek-bar":"playkit-seek-bar",seekBar:"playkit-seek-bar","time-preview":"playkit-time-preview",timePreview:"playkit-time-preview","frame-preview":"playkit-frame-preview",framePreview:"playkit-frame-preview","hide-frame-preview":"playkit-hide-frame-preview",hideFramePreview:"playkit-hide-frame-preview","progress-bar":"playkit-progress-bar",progressBar:"playkit-progress-bar",scrubber:"playkit-scrubber","virtual-progress":"playkit-virtual-progress",virtualProgress:"playkit-virtual-progress",live:"playkit-live",buffered:"playkit-buffered","virtual-progress-indicator":"playkit-virtual-progress-indicator",virtualProgressIndicator:"playkit-virtual-progress-indicator","non-sticky":"playkit-non-sticky",nonSticky:"playkit-non-sticky","frame-preview-img-container":"playkit-frame-preview-img-container",framePreviewImgContainer:"playkit-frame-preview-img-container","frame-preview-img":"playkit-frame-preview-img",framePreviewImg:"playkit-frame-preview-img","time-display":"playkit-time-display",timeDisplay:"playkit-time-display","video-playing-title":"playkit-video-playing-title",videoPlayingTitle:"playkit-video-playing-title","bottom-bar":"playkit-bottom-bar",bottomBar:"playkit-bottom-bar",hide:"playkit-hide","left-controls":"playkit-left-controls",leftControls:"playkit-left-controls","bottom-bar-area":"playkit-bottom-bar-area",bottomBarArea:"playkit-bottom-bar-area","right-controls":"playkit-right-controls",rightControls:"playkit-right-controls","line-break":"playkit-line-break",lineBreak:"playkit-line-break","top-bar":"playkit-top-bar",topBar:"playkit-top-bar","top-bar-area":"playkit-top-bar-area",topBarArea:"playkit-top-bar-area",disabled:"playkit-disabled","overlay-action":"playkit-overlay-action",overlayAction:"playkit-overlay-action",in:"playkit-in",overlayActionIconIn:"playkit-overlayActionIconIn","pre-playback-play-overlay":"playkit-pre-playback-play-overlay",prePlaybackPlayOverlay:"playkit-pre-playback-play-overlay","pre-playback-play-button":"playkit-pre-playback-play-button",prePlaybackPlayButton:"playkit-pre-playback-play-button","btn-skip-ad":"playkit-btn-skip-ad",btnSkipAd:"playkit-btn-skip-ad","skip-ad":"playkit-skip-ad",skipAd:"playkit-skip-ad","live-tag":"playkit-live-tag",liveTag:"playkit-live-tag","non-live-playhead":"playkit-non-live-playhead",nonLivePlayhead:"playkit-non-live-playhead","interactive-area":"playkit-interactive-area",interactiveArea:"playkit-interactive-area","unmute-button-container":"playkit-unmute-button-container",unmuteButtonContainer:"playkit-unmute-button-container","show-icon-only":"playkit-show-icon-only",showIconOnly:"playkit-show-icon-only","unmute-button":"playkit-unmute-button",unmuteButton:"playkit-unmute-button","has-top-bar":"playkit-has-top-bar",hasTopBar:"playkit-has-top-bar","unmute-icon-container":"playkit-unmute-icon-container",unmuteIconContainer:"playkit-unmute-icon-container","error-overlay":"playkit-error-overlay",errorOverlay:"playkit-error-overlay","copy-url-row":"playkit-copy-url-row",copyUrlRow:"playkit-copy-url-row","svg-container":"playkit-svg-container",svgContainer:"playkit-svg-container",headline:"playkit-headline","error-session":"playkit-error-session",errorSession:"playkit-error-session","retry-btn":"playkit-retry-btn",retryBtn:"playkit-retry-btn","error-text":"playkit-error-text",errorText:"playkit-error-text","link-options-container":"playkit-link-options-container",linkOptionsContainer:"playkit-link-options-container","input-copy-url":"playkit-input-copy-url",inputCopyUrl:"playkit-input-copy-url","btn-copy-url":"playkit-btn-copy-url",btnCopyUrl:"playkit-btn-copy-url",handle:"playkit-handle","learn-more":"playkit-learn-more",learnMore:"playkit-learn-more",watermark:"playkit-watermark","hide-watermark":"playkit-hide-watermark",hideWatermark:"playkit-hide-watermark","control-vr-stereo":"playkit-control-vr-stereo",controlVrStereo:"playkit-control-vr-stereo","vr-stereo-mode":"playkit-vr-stereo-mode",vrStereoMode:"playkit-vr-stereo-mode","control-closed-captions":"playkit-control-closed-captions",controlClosedCaptions:"playkit-control-closed-captions","cc-on":"playkit-cc-on",ccOn:"playkit-cc-on","cast-button":"playkit-cast-button",castButton:"playkit-cast-button","cast-button-active":"playkit-cast-button-active",castButtonActive:"playkit-cast-button-active","cast-overlay":"playkit-cast-overlay",castOverlay:"playkit-cast-overlay","cast-poster":"playkit-cast-poster",castPoster:"playkit-cast-poster","has-poster":"playkit-has-poster",hasPoster:"playkit-has-poster","cast-black-cover":"playkit-cast-black-cover",castBlackCover:"playkit-cast-black-cover","cast-box":"playkit-cast-box",castBox:"playkit-cast-box","cast-icon":"playkit-cast-icon",castIcon:"playkit-cast-icon","cast-connecting-spinner":"playkit-cast-connecting-spinner",castConnectingSpinner:"playkit-cast-connecting-spinner","cast-text":"playkit-cast-text",castText:"playkit-cast-text","cast-status":"playkit-cast-status",castStatus:"playkit-cast-status","cast-device":"playkit-cast-device",castDevice:"playkit-cast-device","cast-on-tv-button-container":"playkit-cast-on-tv-button-container",castOnTvButtonContainer:"playkit-cast-on-tv-button-container","show-cast-on-tv":"playkit-show-cast-on-tv",showCastOnTv:"playkit-show-cast-on-tv",castOnTVAnimation:"playkit-castOnTVAnimation",castOnTvAnimation:"playkit-castOnTVAnimation","cast-on-tv-button":"playkit-cast-on-tv-button",castOnTvButton:"playkit-cast-on-tv-button","cast-on-tv-icon-container":"playkit-cast-on-tv-icon-container",castOnTvIconContainer:"playkit-cast-on-tv-icon-container","control-playlist-button":"playkit-control-playlist-button",controlPlaylistButton:"playkit-control-playlist-button","poster-preview":"playkit-poster-preview",posterPreview:"playkit-poster-preview","poster-preview-img":"playkit-poster-preview-img",posterPreviewImg:"playkit-poster-preview-img","poster-preview-text":"playkit-poster-preview-text",posterPreviewText:"playkit-poster-preview-text","poster-preview-text-title":"playkit-poster-preview-text-title",posterPreviewTextTitle:"playkit-poster-preview-text-title","poster-preview-text-name":"playkit-poster-preview-text-name",posterPreviewTextName:"playkit-poster-preview-text-name","is-in-picture-in-picture":"playkit-is-in-picture-in-picture",isInPictureInPicture:"playkit-is-in-picture-in-picture","playback-controls":"playkit-playback-controls",playbackControls:"playkit-playback-controls","center-playback-controls":"playkit-center-playback-controls",centerPlaybackControls:"playkit-center-playback-controls","gui-area":"playkit-gui-area",guiArea:"playkit-gui-area","playlist-countdown":"playkit-playlist-countdown",playlistCountdown:"playkit-playlist-countdown",slideIn:"playkit-slideIn",hidden:"playkit-hidden","playlist-countdown-content-placeholder":"playkit-playlist-countdown-content-placeholder",playlistCountdownContentPlaceholder:"playkit-playlist-countdown-content-placeholder","playlist-countdown-content-background":"playkit-playlist-countdown-content-background",playlistCountdownContentBackground:"playkit-playlist-countdown-content-background","playlist-countdown-content":"playkit-playlist-countdown-content",playlistCountdownContent:"playkit-playlist-countdown-content",canceled:"playkit-canceled","playlist-countdown-poster":"playkit-playlist-countdown-poster",playlistCountdownPoster:"playkit-playlist-countdown-poster","playlist-countdown-text":"playkit-playlist-countdown-text",playlistCountdownText:"playkit-playlist-countdown-text","playlist-countdown-text-title":"playkit-playlist-countdown-text-title",playlistCountdownTextTitle:"playkit-playlist-countdown-text-title","playlist-countdown-time-left":"playkit-playlist-countdown-time-left",playlistCountdownTimeLeft:"playkit-playlist-countdown-time-left","playlist-countdown-text-name":"playkit-playlist-countdown-text-name",playlistCountdownTextName:"playkit-playlist-countdown-text-name","playlist-countdown-cancel":"playkit-playlist-countdown-cancel",playlistCountdownCancel:"playkit-playlist-countdown-cancel","playlist-next-screen-overlay":"playkit-playlist-next-screen-overlay",playlistNextScreenOverlay:"playkit-playlist-next-screen-overlay","playlist-next-screen-content":"playkit-playlist-next-screen-content",playlistNextScreenContent:"playkit-playlist-next-screen-content","playlist-next-screen-text":"playkit-playlist-next-screen-text",playlistNextScreenText:"playkit-playlist-next-screen-text","playlist-next-screen-text-title":"playkit-playlist-next-screen-text-title",playlistNextScreenTextTitle:"playkit-playlist-next-screen-text-title","playlist-next-screen-text-name":"playkit-playlist-next-screen-text-name",playlistNextScreenTextName:"playkit-playlist-next-screen-text-name","playlist-next-screen-poster-placeholder":"playkit-playlist-next-screen-poster-placeholder",playlistNextScreenPosterPlaceholder:"playkit-playlist-next-screen-poster-placeholder","playlist-next-screen-poster-aspect-ratio":"playkit-playlist-next-screen-poster-aspect-ratio",playlistNextScreenPosterAspectRatio:"playkit-playlist-next-screen-poster-aspect-ratio","playlist-next-screen-poster":"playkit-playlist-next-screen-poster",playlistNextScreenPoster:"playkit-playlist-next-screen-poster","playlist-next-screen-poster-img":"playkit-playlist-next-screen-poster-img",playlistNextScreenPosterImg:"playkit-playlist-next-screen-poster-img","size-lg":"playkit-size-lg",sizeLg:"playkit-size-lg","picture-in-picture-overlay":"playkit-picture-in-picture-overlay",pictureInPictureOverlay:"playkit-picture-in-picture-overlay","picture-in-picture-poster":"playkit-picture-in-picture-poster",pictureInPicturePoster:"playkit-picture-in-picture-poster","dark-layer":"playkit-dark-layer",darkLayer:"playkit-dark-layer","picture-in-picture-control":"playkit-picture-in-picture-control",pictureInPictureControl:"playkit-picture-in-picture-control","picture-in-picture-text":"playkit-picture-in-picture-text",pictureInPictureText:"playkit-picture-in-picture-text","picture-in-picture-button":"playkit-picture-in-picture-button",pictureInPictureButton:"playkit-picture-in-picture-button","icon-copy":"playkit-icon-copy",iconCopy:"playkit-icon-copy",copied:"playkit-copied",IE:"playkit-IE",ie:"playkit-IE",tooltip:"playkit-tooltip","tooltip-label":"playkit-tooltip-label",tooltipLabel:"playkit-tooltip-label","tooltip-top":"playkit-tooltip-top",tooltipTop:"playkit-tooltip-top","tooltip-top-left":"playkit-tooltip-top-left",tooltipTopLeft:"playkit-tooltip-top-left","tooltip-top-right":"playkit-tooltip-top-right",tooltipTopRight:"playkit-tooltip-top-right","tooltip-bottom":"playkit-tooltip-bottom",tooltipBottom:"playkit-tooltip-bottom","tooltip-bottom-right":"playkit-tooltip-bottom-right",tooltipBottomRight:"playkit-tooltip-bottom-right","tooltip-bottom-left":"playkit-tooltip-bottom-left",tooltipBottomLeft:"playkit-tooltip-bottom-left","tooltip-left":"playkit-tooltip-left",tooltipLeft:"playkit-tooltip-left","tooltip-right":"playkit-tooltip-right",tooltipRight:"playkit-tooltip-right","side-panel":"playkit-side-panel",sidePanel:"playkit-side-panel","vertical-side-panel":"playkit-vertical-side-panel",verticalSidePanel:"playkit-vertical-side-panel","horizontal-side-panel":"playkit-horizontal-side-panel",horizontalSidePanel:"playkit-horizontal-side-panel","side-panel-content":"playkit-side-panel-content",sidePanelContent:"playkit-side-panel-content","video-area":"playkit-video-area",videoArea:"playkit-video-area",spinner:"playkit-spinner","kaltura-spinner":"playkit-kaltura-spinner",kalturaSpinner:"playkit-kaltura-spinner",switch:"playkit-switch","toggle-input":"playkit-toggle-input",toggleInput:"playkit-toggle-input"},e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(n=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"Event",(function(){return T})),n.d(t,"EventType",(function(){return ff})),n.d(t,"h",(function(){return N})),n.d(t,"createPortal",(function(){return Xe})),n.d(t,"preact",(function(){return r})),n.d(t,"redux",(function(){return a})),n.d(t,"preacti18n",(function(){return o})),n.d(t,"preactHooks",(function(){return i})),n.d(t,"style",(function(){return pr.a})),n.d(t,"Reducers",(function(){return k})),n.d(t,"Presets",(function(){return E})),n.d(t,"Components",(function(){return _})),n.d(t,"Utils",(function(){return m})),n.d(t,"reducers",(function(){return k})),n.d(t,"presets",(function(){return E})),n.d(t,"components",(function(){return _})),n.d(t,"utils",(function(){return m})),n.d(t,"UIManager",(function(){return df})),n.d(t,"VERSION",(function(){return hf})),n.d(t,"NAME",(function(){return gf})),n.d(t,"SidePanelPositions",(function(){return Jn})),n.d(t,"SidePanelModes",(function(){return er})),n.d(t,"ReservedPresetNames",(function(){return tr})),n.d(t,"ReservedPresetAreas",(function(){return nr}));var r={};n.r(r),n.d(r,"render",(function(){return ne})),n.d(r,"hydrate",(function(){return re})),n.d(r,"createElement",(function(){return N})),n.d(r,"h",(function(){return N})),n.d(r,"Fragment",(function(){return j})),n.d(r,"createRef",(function(){return F})),n.d(r,"isValidElement",(function(){return w})),n.d(r,"Component",(function(){return B})),n.d(r,"cloneElement",(function(){return ie})),n.d(r,"createContext",(function(){return ae})),n.d(r,"toChildArray",(function(){return W})),n.d(r,"__u",(function(){return ee})),n.d(r,"options",(function(){return A}));var i={};n.r(i),n.d(i,"useState",(function(){return ye})),n.d(i,"useReducer",(function(){return ve})),n.d(i,"useEffect",(function(){return me})),n.d(i,"useLayoutEffect",(function(){return be})),n.d(i,"useRef",(function(){return _e})),n.d(i,"useImperativeHandle",(function(){return Ee})),n.d(i,"useMemo",(function(){return ke})),n.d(i,"useCallback",(function(){return Te})),n.d(i,"useContext",(function(){return Ae})),n.d(i,"useDebugValue",(function(){return we})),n.d(i,"useErrorBoundary",(function(){return Se}));var a={};n.r(a),n.d(a,"Provider",(function(){return ut})),n.d(a,"connectAdvanced",(function(){return Tt})),n.d(a,"ReactReduxContext",(function(){return at})),n.d(a,"connect",(function(){return $t})),n.d(a,"batch",(function(){return rt})),n.d(a,"useDispatch",(function(){return tn})),n.d(a,"createDispatchHook",(function(){return en})),n.d(a,"useSelector",(function(){return an})),n.d(a,"createSelectorHook",(function(){return rn})),n.d(a,"useStore",(function(){return Jt})),n.d(a,"createStoreHook",(function(){return Zt})),n.d(a,"shallowEqual",(function(){return wt}));var o={};n.r(o),n.d(o,"default",(function(){return wn})),n.d(o,"IntlProvider",(function(){return pn})),n.d(o,"Localizer",(function(){return En})),n.d(o,"MarkupText",(function(){return kn})),n.d(o,"Text",(function(){return bn})),n.d(o,"intl",(function(){return dn})),n.d(o,"withText",(function(){return An}));var s={};n.r(s),n.d(s,"types",(function(){return Qn})),n.d(s,"SidePanelOrientation",(function(){return Zn})),n.d(s,"SidePanelPositions",(function(){return Jn})),n.d(s,"SidePanelModes",(function(){return er})),n.d(s,"ReservedPresetNames",(function(){return tr})),n.d(s,"ReservedPresetAreas",(function(){return nr})),n.d(s,"initialState",(function(){return ar})),n.d(s,"default",(function(){return or})),n.d(s,"actions",(function(){return sr}));var l={};n.r(l),n.d(l,"types",(function(){return gr})),n.d(l,"initialState",(function(){return yr})),n.d(l,"default",(function(){return vr})),n.d(l,"actions",(function(){return mr}));var u={};n.r(u),n.d(u,"types",(function(){return _r})),n.d(u,"initialState",(function(){return Er})),n.d(u,"default",(function(){return kr})),n.d(u,"actions",(function(){return Tr}));var c={};n.r(c),n.d(c,"types",(function(){return Fi})),n.d(c,"initialState",(function(){return ji})),n.d(c,"default",(function(){return Bi})),n.d(c,"actions",(function(){return Vi}));var p={};n.r(p),n.d(p,"types",(function(){return Ki})),n.d(p,"initialState",(function(){return Gi})),n.d(p,"default",(function(){return zi})),n.d(p,"actions",(function(){return Wi}));var d={};n.r(d),n.d(d,"types",(function(){return qi})),n.d(d,"initialState",(function(){return Xi})),n.d(d,"default",(function(){return $i})),n.d(d,"actions",(function(){return Qi}));var f={};n.r(f),n.d(f,"types",(function(){return Ji})),n.d(f,"initialState",(function(){return ea})),n.d(f,"default",(function(){return ta})),n.d(f,"actions",(function(){return na}));var h={};n.r(h),n.d(h,"types",(function(){return ia})),n.d(h,"initialState",(function(){return aa})),n.d(h,"default",(function(){return oa})),n.d(h,"actions",(function(){return sa}));var g={};n.r(g),n.d(g,"types",(function(){return ua})),n.d(g,"initialState",(function(){return ca})),n.d(g,"default",(function(){return pa})),n.d(g,"actions",(function(){return da}));var y={};n.r(y),n.d(y,"types",(function(){return ha})),n.d(y,"initialState",(function(){return ga})),n.d(y,"default",(function(){return ya})),n.d(y,"actions",(function(){return va}));var v={};n.r(v),n.d(v,"types",(function(){return ka})),n.d(v,"initialState",(function(){return Ta})),n.d(v,"default",(function(){return Aa})),n.d(v,"actions",(function(){return wa}));var m={};n.r(m),n.d(m,"bindActions",(function(){return ur})),n.d(m,"KeyMap",(function(){return Ln})),n.d(m,"getLogger",(function(){return Dn})),n.d(m,"withKeyboardA11y",(function(){return Va})),n.d(m,"toHHMMSS",(function(){return Ha})),n.d(m,"toSecondsFromHHMMSS",(function(){return Ka})),n.d(m,"formatOnlyNumbersInput",(function(){return Ga}));var b={};n.r(b),n.d(b,"isPlayingAdOrPlayback",(function(){return ko}));var _={};n.r(_),n.d(_,"AdLearnMore",(function(){return Nl})),n.d(_,"AdSkip",(function(){return jl})),n.d(_,"AdNotice",(function(){return Bl})),n.d(_,"BaseComponent",(function(){return Zl})),n.d(_,"BottomBar",(function(){return tu})),n.d(_,"CVAAOverlay",(function(){return Mu})),n.d(_,"DropDown",(function(){return yu})),n.d(_,"EngineConnector",(function(){return Ra})),n.d(_,"ErrorOverlay",(function(){return Ju})),n.d(_,"EventDispatcherProvider",(function(){return Jr})),n.d(_,"withEventDispatcher",(function(){return fi})),n.d(_,"Keyboard",(function(){return Ss})),n.d(_,"withKeyboardEvent",(function(){return Fs})),n.d(_,"KeyboardEventProvider",(function(){return Ps})),n.d(_,"Icon",(function(){return _o})),n.d(_,"IconType",(function(){return vo})),n.d(_,"IconState",(function(){return bo})),n.d(_,"BadgeType",(function(){return mo})),n.d(_,"LiveTag",(function(){return nc})),n.d(_,"Loading",(function(){return no})),n.d(_,"Menu",(function(){return pu})),n.d(_,"Overlay",(function(){return ju})),n.d(_,"OverlayAction",(function(){return Io})),n.d(_,"OverlayPortal",(function(){return sc})),n.d(_,"PlayerProvider",(function(){return Ar})),n.d(_,"withPlayer",(function(){return Sr})),n.d(_,"PrePlaybackPlayOverlay",(function(){return Ko})),n.d(_,"SeekBarLivePlaybackContainer",(function(){return cc})),n.d(_,"SeekBarPlaybackContainer",(function(){return Od})),n.d(_,"withLogger",(function(){return jn})),n.d(_,"Shell",(function(){return ki})),n.d(_,"PLAYER_SIZE",(function(){return Ei})),n.d(_,"Slider",(function(){return _u})),n.d(_,"SmartContainer",(function(){return fc})),n.d(_,"SmartContainerItem",(function(){return hc})),n.d(_,"TimeDisplay",(function(){return yc})),n.d(_,"TimeDisplayAdsContainer",(function(){return bc})),n.d(_,"TimeDisplayPlaybackContainer",(function(){return kc})),n.d(_,"Tooltip",(function(){return Oo})),n.d(_,"ToolTipType",(function(){return Ro})),n.d(_,"TopBar",(function(){return Sc})),n.d(_,"UnmuteIndication",(function(){return Rc})),n.d(_,"VideoPlayer",(function(){return Ma})),n.d(_,"Watermark",(function(){return Nc})),n.d(_,"Logo",(function(){return Bc})),n.d(_,"CastOverlay",(function(){return Wc})),n.d(_,"CastBeforePlay",(function(){return ep})),n.d(_,"CastAfterPlay",(function(){return ip})),n.d(_,"PlaylistButton",(function(){return dp})),n.d(_,"PrevNext",(function(){return op})),n.d(_,"PlaylistNextScreen",(function(){return Ep})),n.d(_,"PictureInPicture",(function(){return wp})),n.d(_,"PlaybackControls",(function(){return Sp})),n.d(_,"CopyButton",(function(){return Wu})),n.d(_,"ButtonControl",(function(){return ts})),n.d(_,"Button",(function(){return Bo})),n.d(_,"ToggleSwitch",(function(){return Op})),n.d(_,"AudioMenu",(function(){return Bp})),n.d(_,"CaptionsMenu",(function(){return Xp})),n.d(_,"SpeedMenu",(function(){return nd})),n.d(_,"QualityMenu",(function(){return sd})),n.d(_,"HeightResolution",(function(){return rd})),n.d(_,"getLabelBadgeType",(function(){return id})),n.d(_,"AdvancedAudioDescToggle",(function(){return pd})),n.d(_,"PlayerArea",(function(){return qn})),n.d(_,"withPlayerPreset",(function(){return Ni})),n.d(_,"Remove",(function(){return Hn})),n.d(_,"VideoArea",(function(){return bd})),n.d(_,"GuiArea",(function(){return oo})),n.d(_,"InteractiveArea",(function(){return _d})),n.d(_,"KeyboardControl",(function(){return Ss})),n.d(_,"Cast",(function(){return qs})),n.d(_,"CastControl",(function(){return qs})),n.d(_,"Fullscreen",(function(){return rl})),n.d(_,"FullscreenControl",(function(){return rl})),n.d(_,"PlayPause",(function(){return ll})),n.d(_,"PlayPauseControl",(function(){return ll})),n.d(_,"Rewind",(function(){return ps})),n.d(_,"RewindControl",(function(){return ps})),n.d(_,"Forward",(function(){return ms})),n.d(_,"ForwardControl",(function(){return ms})),n.d(_,"SeekBar",(function(){return Id})),n.d(_,"SeekBarControl",(function(){return Id})),n.d(_,"Settings",(function(){return ml})),n.d(_,"SettingsControl",(function(){return ml})),n.d(_,"Volume",(function(){return Sl})),n.d(_,"VolumeControl",(function(){return Sl})),n.d(_,"VrStereo",(function(){return Pl})),n.d(_,"VrStereoControl",(function(){return Pl})),n.d(_,"ClosedCaptions",(function(){return Rl})),n.d(_,"ClosedCaptionsControl",(function(){return Rl}));var E={};n.r(E),n.d(E,"idleUI",(function(){return lo})),n.d(E,"playbackUI",(function(){return Gd})),n.d(E,"adsUI",(function(){return qd})),n.d(E,"errorUI",(function(){return $d})),n.d(E,"liveUI",(function(){return Jd})),n.d(E,"imgUI",(function(){return nf}));var k={};n.r(k),n.d(k,"config",(function(){return l})),n.d(k,"cvaa",(function(){return f})),n.d(k,"engine",(function(){return u})),n.d(k,"getters",(function(){return b})),n.d(k,"loading",(function(){return d})),n.d(k,"overlayAction",(function(){return g})),n.d(k,"playlist",(function(){return y})),n.d(k,"seekbar",(function(){return c})),n.d(k,"setting",(function(){return h})),n.d(k,"shell",(function(){return s})),n.d(k,"volume",(function(){return p})),n.d(k,"overlay",(function(){return v}));var T={};n.r(T),n.d(T,"withEventManager",(function(){return Br})),n.d(T,"EventType",(function(){return On}));var A,w,S,C,x,I,P,D={},R=[],O=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function L(e,t){for(var n in t)e[n]=t[n];return e}function M(e){var t=e.parentNode;t&&t.removeChild(e)}function N(e,t,n){var r,i=arguments,a={};for(r in t)"key"!==r&&"ref"!==r&&(a[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(i[r]);if(null!=n&&(a.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===a[r]&&(a[r]=e.defaultProps[r]);return U(e,a,t&&t.key,t&&t.ref,null)}function U(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(a.__v=a),A.vnode&&A.vnode(a),a}function F(){return{current:null}}function j(e){return e.children}function B(e,t){this.props=e,this.context=t}function V(e,t){if(null==t)return e.__?V(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?V(e):null}function H(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return H(e)}}function K(e){(!e.__d&&(e.__d=!0)&&S.push(e)&&!G.__r++||x!==A.debounceRendering)&&((x=A.debounceRendering)||C)(G)}function G(){for(var e;G.__r=S.length;)e=S.sort((function(e,t){return e.__v.__b-t.__v.__b})),S=[],e.some((function(e){var t,n,r,i,a,o,s;e.__d&&(o=(a=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=L({},a)).__v=r,i=Q(s,a,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==o?V(a):o),Z(n,a),i!=o&&H(a)))}))}function z(e,t,n,r,i,a,o,s,l,u){var c,p,d,f,h,g,y,v=r&&r.__k||R,m=v.length;for(l==D&&(l=null!=o?o[0]:m?V(r,0):null),n.__k=[],c=0;c<t.length;c++)if(null!=(f=n.__k[c]=null==(f=t[c])||"boolean"==typeof f?null:"string"==typeof f||"number"==typeof f?U(null,f,null,null,f):Array.isArray(f)?U(j,{children:f},null,null,null):null!=f.__e||null!=f.__c?U(f.type,f.props,f.key,null,f.__v):f)){if(f.__=n,f.__b=n.__b+1,null===(d=v[c])||d&&f.key==d.key&&f.type===d.type)v[c]=void 0;else for(p=0;p<m;p++){if((d=v[p])&&f.key==d.key&&f.type===d.type){v[p]=void 0;break}d=null}h=Q(e,f,d=d||D,i,a,o,s,l,u),(p=f.ref)&&d.ref!=p&&(y||(y=[]),d.ref&&y.push(d.ref,null,f),y.push(p,f.__c||h,f)),null!=h?(null==g&&(g=h),l=Y(e,f,d,v,o,h,l),"option"==n.type?e.value="":"function"==typeof n.type&&(n.__d=l)):l&&d.__e==l&&l.parentNode!=e&&(l=V(d))}if(n.__e=g,null!=o&&"function"!=typeof n.type)for(c=o.length;c--;)null!=o[c]&&M(o[c]);for(c=m;c--;)null!=v[c]&&ee(v[c],v[c]);if(y)for(c=0;c<y.length;c++)J(y[c],y[++c],y[++c])}function W(e){return null==e||"boolean"==typeof e?[]:Array.isArray(e)?R.concat.apply([],e.map(W)):[e]}function Y(e,t,n,r,i,a,o){var s,l,u;if(void 0!==t.__d)s=t.__d,t.__d=void 0;else if(i==n||a!=o||null==a.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(a),s=null;else{for(l=o,u=0;(l=l.nextSibling)&&u<r.length;u+=2)if(l==a)break e;e.insertBefore(a,o),s=o}return void 0!==s?s:a.nextSibling}function q(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===O.test(t)?n+"px":null==n?"":n}function X(e,t,n,r,i){var a,o,s,l,u;if(i?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(a=e.style,"string"==typeof n)a.cssText=n;else{if("string"==typeof r&&(a.cssText="",r=null),r)for(l in r)n&&l in n||q(a,l,"");if(n)for(u in n)r&&n[u]===r[u]||q(a,u,n[u])}else"o"===t[0]&&"n"===t[1]?(o=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,$,o),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,$,o)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function $(e){this.l[e.type](A.event?A.event(e):e)}function Q(e,t,n,r,i,a,o,s,l){var u,c,p,d,f,h,g,y,v,m,b,_=t.type;if(void 0!==t.constructor)return null;(u=A.__b)&&u(t);try{e:if("function"==typeof _){if(y=t.props,v=(u=_.contextType)&&r[u.__c],m=u?v?v.props.value:u.__:r,n.__c?g=(c=t.__c=n.__c).__=c.__E:("prototype"in _&&_.prototype.render?t.__c=c=new _(y,m):(t.__c=c=new B(y,m),c.constructor=_,c.render=te),v&&v.sub(c),c.props=y,c.state||(c.state={}),c.context=m,c.__n=r,p=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=_.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=L({},c.__s)),L(c.__s,_.getDerivedStateFromProps(y,c.__s))),d=c.props,f=c.state,p)null==_.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==_.getDerivedStateFromProps&&y!==d&&null!=c.componentWillReceiveProps&&c.componentWillReceiveProps(y,m),!c.__e&&null!=c.shouldComponentUpdate&&!1===c.shouldComponentUpdate(y,c.__s,m)||t.__v===n.__v){c.props=y,c.state=c.__s,t.__v!==n.__v&&(c.__d=!1),c.__v=t,t.__e=n.__e,t.__k=n.__k,c.__h.length&&o.push(c),function e(t,n,r){var i,a;for(i=0;i<t.__k.length;i++)(a=t.__k[i])&&(a.__=t,a.__e&&("function"==typeof a.type&&a.__k.length>1&&e(a,n,r),n=Y(r,a,a,t.__k,null,a.__e,n),"function"==typeof t.type&&(t.__d=n)))}(t,s,e);break e}null!=c.componentWillUpdate&&c.componentWillUpdate(y,c.__s,m),null!=c.componentDidUpdate&&c.__h.push((function(){c.componentDidUpdate(d,f,h)}))}c.context=m,c.props=y,c.state=c.__s,(u=A.__r)&&u(t),c.__d=!1,c.__v=t,c.__P=e,u=c.render(c.props,c.state,c.context),c.state=c.__s,null!=c.getChildContext&&(r=L(L({},r),c.getChildContext())),p||null==c.getSnapshotBeforeUpdate||(h=c.getSnapshotBeforeUpdate(d,f)),b=null!=u&&u.type==j&&null==u.key?u.props.children:u,z(e,Array.isArray(b)?b:[b],t,n,r,i,a,o,s,l),c.base=t.__e,c.__h.length&&o.push(c),g&&(c.__E=c.__=null),c.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=function(e,t,n,r,i,a,o,s){var l,u,c,p,d,f=n.props,h=t.props;if(i="svg"===t.type||i,null!=a)for(l=0;l<a.length;l++)if(null!=(u=a[l])&&((null===t.type?3===u.nodeType:u.localName===t.type)||e==u)){e=u,a[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,h.is&&{is:h.is}),a=null,s=!1}if(null===t.type)f!==h&&e.data!=h&&(e.data=h);else{if(null!=a&&(a=R.slice.call(e.childNodes)),c=(f=n.props||D).dangerouslySetInnerHTML,p=h.dangerouslySetInnerHTML,!s){if(null!=a)for(f={},d=0;d<e.attributes.length;d++)f[e.attributes[d].name]=e.attributes[d].value;(p||c)&&(p&&c&&p.__html==c.__html||(e.innerHTML=p&&p.__html||""))}(function(e,t,n,r,i){var a;for(a in n)"children"===a||"key"===a||a in t||X(e,a,null,n[a],r);for(a in t)i&&"function"!=typeof t[a]||"children"===a||"key"===a||"value"===a||"checked"===a||n[a]===t[a]||X(e,a,t[a],n[a],r)})(e,h,f,i,s),p?t.__k=[]:(l=t.props.children,z(e,Array.isArray(l)?l:[l],t,n,r,"foreignObject"!==t.type&&i,a,o,D,s)),s||("value"in h&&void 0!==(l=h.value)&&l!==e.value&&X(e,"value",l,f.value,!1),"checked"in h&&void 0!==(l=h.checked)&&l!==e.checked&&X(e,"checked",l,f.checked,!1))}return e}(n.__e,t,n,r,i,a,o,l);(u=A.diffed)&&u(t)}catch(e){t.__v=null,A.__e(e,t,n)}return t.__e}function Z(e,t){A.__c&&A.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){A.__e(e,t.__v)}}))}function J(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){A.__e(e,n)}}function ee(e,t,n){var r,i,a;if(A.unmount&&A.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||J(r,null,t)),n||"function"==typeof e.type||(n=null!=(i=e.__e)),e.__e=e.__d=void 0,null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){A.__e(e,t)}r.base=r.__P=null}if(r=e.__k)for(a=0;a<r.length;a++)r[a]&&ee(r[a],t,n);null!=i&&M(i)}function te(e,t,n){return this.constructor(e,n)}function ne(e,t,n){var r,i,a;A.__&&A.__(e,t),i=(r=n===I)?null:n&&n.__k||t.__k,e=N(j,null,[e]),a=[],Q(t,(r?t:n||t).__k=e,i||D,D,void 0!==t.ownerSVGElement,n&&!r?[n]:i?null:t.childNodes.length?R.slice.call(t.childNodes):null,a,n||D,r),Z(a,e)}function re(e,t){ne(e,t,I)}function ie(e,t){var n,r;for(r in t=L(L({},e.props),t),arguments.length>2&&(t.children=R.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return U(e.type,n,t.key||e.key,t.ref||e.ref,null)}function ae(e){var t={},n={__c:"__cC"+P++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,K(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}A={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return K(n.__E=n)}catch(t){e=t}throw e}},w=function(e){return null!=e&&void 0===e.constructor},B.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=L({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&L(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),K(this))},B.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),K(this))},B.prototype.render=j,S=[],C="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,G.__r=0,I=D,P=0;var oe,se,le,ue=0,ce=[],pe=A.__r,de=A.diffed,fe=A.__c,he=A.unmount;function ge(e,t){A.__h&&A.__h(se,e,ue||t),ue=0;var n=se.__H||(se.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ye(e){return ue=1,ve(Re,e)}function ve(e,t,n){var r=ge(oe++,2);return r.t=e,r.__c||(r.__c=se,r.__=[n?n(t):Re(void 0,t),function(e){var t=r.t(r.__[0],e);r.__[0]!==t&&(r.__=[t,r.__[1]],r.__c.setState({}))}]),r.__}function me(e,t){var n=ge(oe++,3);!A.__s&&De(n.__H,t)&&(n.__=e,n.__H=t,se.__H.__h.push(n))}function be(e,t){var n=ge(oe++,4);!A.__s&&De(n.__H,t)&&(n.__=e,n.__H=t,se.__h.push(n))}function _e(e){return ue=5,ke((function(){return{current:e}}),[])}function Ee(e,t,n){ue=6,be((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function ke(e,t){var n=ge(oe++,7);return De(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function Te(e,t){return ue=8,ke((function(){return e}),t)}function Ae(e){var t=se.context[e.__c],n=ge(oe++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(se)),t.props.value):e.__}function we(e,t){A.useDebugValue&&A.useDebugValue(t?t(e):e)}function Se(e){var t=ge(oe++,10),n=ye();return t.__=e,se.componentDidCatch||(se.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Ce(){ce.some((function(e){if(e.__P)try{e.__H.__h.forEach(Ie),e.__H.__h.forEach(Pe),e.__H.__h=[]}catch(t){return e.__H.__h=[],A.__e(t,e.__v),!0}})),ce=[]}A.__r=function(e){pe&&pe(e),oe=0;var t=(se=e.__c).__H;t&&(t.__h.forEach(Ie),t.__h.forEach(Pe),t.__h=[])},A.diffed=function(e){de&&de(e);var t=e.__c;t&&t.__H&&t.__H.__h.length&&(1!==ce.push(t)&&le===A.requestAnimationFrame||((le=A.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),xe&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);xe&&(t=requestAnimationFrame(n))})(Ce))},A.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ie),e.__h=e.__h.filter((function(e){return!e.__||Pe(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],A.__e(n,e.__v)}})),fe&&fe(e,t)},A.unmount=function(e){he&&he(e);var t=e.__c;if(t&&t.__H)try{t.__H.__.forEach(Ie)}catch(e){A.__e(e,t.__v)}};var xe="function"==typeof requestAnimationFrame;function Ie(e){"function"==typeof e.u&&e.u()}function Pe(e){e.u=e.__()}function De(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function Re(e,t){return"function"==typeof t?t(e):t}function Oe(e,t){for(var n in t)e[n]=t[n];return e}function Le(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}var Me=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return Le(this.props,e)||Le(this.state,t)},r}(B),Ne=A.__b;A.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ne&&Ne(e)};var Ue="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Fe(e){function t(t,n){var r=Oe({},t);return delete r.ref,e(r,(n=t.ref||n)&&("object"!=typeof n||"current"in n)?n:null)}return t.$$typeof=Ue,t.render=t,t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var je=function(e,t){return e?W(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},Be={map:je,forEach:je,count:function(e){return e?W(e).length:0},only:function(e){if(1!==(e=W(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:W},Ve=A.__e;function He(e){return e&&((e=Oe({},e)).__c=null,e.__k=e.__k&&e.__k.map(He)),e}function Ke(){this.__u=0,this.o=null,this.__b=null}function Ge(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function ze(){this.i=null,this.l=null}A.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return r.__c(e,t.__c);Ve(e,t,n)},(Ke.prototype=new B).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=Ge(n.__v),i=!1,a=function(){i||(i=!0,r?r(o):o())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){a(),t.__c&&t.__c()};var o=function(){var e;if(!--n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(a,a)},Ke.prototype.render=function(e,t){return this.__b&&(this.__v.__k&&(this.__v.__k[0]=He(this.__b)),this.__b=null),[N(j,null,t.u?null:e.children),t.u&&e.fallback]};var We=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(ze.prototype=new B).u=function(e){var t=this,n=Ge(t.__v),r=t.l.get(e);return r[0]++,function(i){var a=function(){t.props.revealOrder?(r.push(i),We(t,e,r)):i()};n?n(a):a()}},ze.prototype.render=function(e){this.i=null,this.l=new Map;var t=W(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},ze.prototype.componentDidUpdate=ze.prototype.componentDidMount=function(){var e=this;e.l.forEach((function(t,n){We(e,n,t)}))};var Ye=function(){function e(){}var t=e.prototype;return t.getChildContext=function(){return this.props.context},t.render=function(e){return e.children},e}();function qe(e){var t=this,n=e.container,r=N(Ye,{context:t.context},e.vnode);return t.s&&t.s!==n&&(t.v.parentNode&&t.s.removeChild(t.v),ee(t.h),t.p=!1),e.vnode?t.p?(n.__k=t.__k,ne(r,n),t.__k=n.__k):(t.v=document.createTextNode(""),re("",n),n.appendChild(t.v),t.p=!0,t.s=n,ne(r,n,t.v),t.__k=t.v.__k):t.p&&(t.v.parentNode&&t.s.removeChild(t.v),ee(t.h)),t.h=r,t.componentWillUnmount=function(){t.v.parentNode&&t.s.removeChild(t.v),ee(t.h)},null}function Xe(e,t){return N(qe,{vnode:e,container:t})}var $e=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;B.prototype.isReactComponent={};var Qe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Ze=A.event;function Je(e,t){e["UNSAFE_"+t]&&!e[t]&&Object.defineProperty(e,t,{configurable:!1,get:function(){return this["UNSAFE_"+t]},set:function(e){this["UNSAFE_"+t]=e}})}A.event=function(e){Ze&&(e=Ze(e)),e.persist=function(){};var t=!1,n=!1,r=e.stopPropagation;e.stopPropagation=function(){r.call(e),t=!0};var i=e.preventDefault;return e.preventDefault=function(){i.call(e),n=!0},e.isPropagationStopped=function(){return t},e.isDefaultPrevented=function(){return n},e.nativeEvent=e};var et={configurable:!0,get:function(){return this.class}},tt=A.vnode;function nt(e){return!!e&&e.$$typeof===Qe}A.vnode=function(e){e.$$typeof=Qe;var t=e.type,n=e.props;if(t){if(n.class!=n.className&&(et.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",et)),"function"!=typeof t){var r,i,a;for(a in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===t&&(W(n.children).forEach((function(e){-1!=n.value.indexOf(e.props.value)&&(e.props.selected=!0)})),delete n.value),n)if(r=$e.test(a))break;if(r)for(a in i=e.props={},n)i[$e.test(a)?a.replace(/[A-Z0-9]/,"-$&").toLowerCase():a]=n[a]}!function(t){var n=e.type,r=e.props;if(r&&"string"==typeof n){var i={};for(var a in r)/^on(Ani|Tra|Tou)/.test(a)&&(r[a.toLowerCase()]=r[a],delete r[a]),i[a.toLowerCase()]=a;if(i.ondoubleclick&&(r.ondblclick=r[i.ondoubleclick],delete r[i.ondoubleclick]),i.onbeforeinput&&(r.onbeforeinput=r[i.onbeforeinput],delete r[i.onbeforeinput]),i.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var o=i.oninput||"oninput";r[o]||(r[o]=r[i.onchange],delete r[i.onchange])}}}(),"function"==typeof t&&!t.m&&t.prototype&&(Je(t.prototype,"componentWillMount"),Je(t.prototype,"componentWillReceiveProps"),Je(t.prototype,"componentWillUpdate"),t.m=!0)}tt&&tt(e)};var rt=function(e,t){return e(t)},it={useState:ye,useReducer:ve,useEffect:me,useLayoutEffect:be,useRef:_e,useImperativeHandle:Ee,useMemo:ke,useCallback:Te,useContext:Ae,useDebugValue:we,version:"16.8.0",Children:Be,render:function(e,t,n){if(null==t.__k)for(;t.firstChild;)t.removeChild(t.firstChild);return ne(e,t),"function"==typeof n&&n(),e?e.__c:null},hydrate:function(e,t,n){return re(e,t),"function"==typeof n&&n(),e?e.__c:null},unmountComponentAtNode:function(e){return!!e.__k&&(ne(null,e),!0)},createPortal:Xe,createElement:N,createContext:ae,createFactory:function(e){return N.bind(null,e)},cloneElement:function(e){return nt(e)?ie.apply(null,arguments):e},createRef:F,Fragment:j,isValidElement:nt,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:B,PureComponent:Me,memo:function(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:Le(this.props,e)}function r(t){return this.shouldComponentUpdate=n,N(e,t)}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(e.displayName||e.name)+")",r.t=!0,r},forwardRef:Fe,unstable_batchedUpdates:rt,StrictMode:j,Suspense:Ke,SuspenseList:ze,lazy:function(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return N(n,i)}return i.displayName="Lazy",i.t=!0,i}},at=(n(7),it.createContext(null)),ot=function(e){e()},st={notify:function(){}},lt=function(){function e(e,t){this.store=e,this.parentSub=t,this.unsubscribe=null,this.listeners=st,this.handleChangeWrapper=this.handleChangeWrapper.bind(this)}var t=e.prototype;return t.addNestedSub=function(e){return this.trySubscribe(),this.listeners.subscribe(e)},t.notifyNestedSubs=function(){this.listeners.notify()},t.handleChangeWrapper=function(){this.onStateChange&&this.onStateChange()},t.isSubscribed=function(){return Boolean(this.unsubscribe)},t.trySubscribe=function(){this.unsubscribe||(this.unsubscribe=this.parentSub?this.parentSub.addNestedSub(this.handleChangeWrapper):this.store.subscribe(this.handleChangeWrapper),this.listeners=function(){var e=ot,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())},t.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null,this.listeners.clear(),this.listeners=st)},e}(),ut=function(e){var t=e.store,n=e.context,r=e.children,i=ke((function(){var e=new lt(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),a=ke((function(){return t.getState()}),[t]);me((function(){var e=i.subscription;return e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[i,a]);var o=n||at;return it.createElement(o.Provider,{value:i},r)};function ct(){return(ct=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function pt(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}var dt=n(2),ft=n.n(dt),ht=n(1),gt="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?be:me,yt=[],vt=[null,null];function mt(e,t){var n=e[1];return[t.payload,n+1]}function bt(e,t,n){gt((function(){return e.apply(void 0,t)}),n)}function _t(e,t,n,r,i,a,o){e.current=r,t.current=i,n.current=!1,a.current&&(a.current=null,o())}function Et(e,t,n,r,i,a,o,s,l,u){if(e){var c=!1,p=null,d=function(){if(!c){var e,n,d=t.getState();try{e=r(d,i.current)}catch(e){n=e,p=e}n||(p=null),e===a.current?o.current||l():(a.current=e,s.current=e,o.current=!0,u({type:"STORE_UPDATED",payload:{error:n}}))}};return n.onStateChange=d,n.trySubscribe(),d(),function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,p)throw p}}}var kt=function(){return[null,0]};function Tt(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,i=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,a=n.methodName,o=void 0===a?"connectAdvanced":a,s=n.renderCountProp,l=void 0===s?void 0:s,u=n.shouldHandleStateChanges,c=void 0===u||u,p=n.storeKey,d=void 0===p?"store":p,f=(n.withRef,n.forwardRef),h=void 0!==f&&f,g=n.context,y=void 0===g?at:g,v=pt(n,["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"]),m=y;return function(t){var n=t.displayName||t.name||"Component",r=i(n),a=ct({},v,{getDisplayName:i,methodName:o,renderCountProp:l,shouldHandleStateChanges:c,storeKey:d,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure,u=s?ke:function(e){return e()};function p(n){var r=ke((function(){var e=n.reactReduxForwardedRef,t=pt(n,["reactReduxForwardedRef"]);return[n.context,e,t]}),[n]),i=r[0],o=r[1],s=r[2],l=ke((function(){return i&&i.Consumer&&Object(ht.isContextConsumer)(it.createElement(i.Consumer,null))?i:m}),[i,m]),p=Ae(l),d=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(p)&&Boolean(p.store);var f=d?n.store:p.store,h=ke((function(){return function(t){return e(t.dispatch,a)}(f)}),[f]),g=ke((function(){if(!c)return vt;var e=new lt(f,d?null:p.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[f,d,p]),y=g[0],v=g[1],b=ke((function(){return d?p:ct({},p,{subscription:y})}),[d,p,y]),_=ve(mt,yt,kt),E=_[0][0],k=_[1];if(E&&E.error)throw E.error;var T=_e(),A=_e(s),w=_e(),S=_e(!1),C=u((function(){return w.current&&s===A.current?w.current:h(f.getState(),s)}),[f,E,s]);bt(_t,[A,T,S,s,C,w,v]),bt(Et,[c,f,y,h,A,T,S,w,v,k],[f,y,h]);var x=ke((function(){return it.createElement(t,ct({},C,{ref:o}))}),[o,t,C]);return ke((function(){return c?it.createElement(l.Provider,{value:b},x):x}),[l,x,b])}var f=s?it.memo(p):p;if(f.WrappedComponent=t,f.displayName=r,h){var g=it.forwardRef((function(e,t){return it.createElement(f,ct({},e,{reactReduxForwardedRef:t}))}));return g.displayName=r,g.WrappedComponent=t,ft()(g,t)}return ft()(f,t)}}function At(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function wt(e,t){if(At(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!At(e[n[i]],t[n[i]]))return!1;return!0}var St=n(3),Ct=function(){return Math.random().toString(36).substring(7).split("").join(".")},xt={INIT:"@@redux/INIT"+Ct(),REPLACE:"@@redux/REPLACE"+Ct(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+Ct()}};function It(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Pt(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function.");if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error("Expected the enhancer to be a function.");return n(Pt)(e,t)}if("function"!=typeof e)throw new Error("Expected the reducer to be a function.");var i=e,a=t,o=[],s=o,l=!1;function u(){s===o&&(s=o.slice())}function c(){if(l)throw new Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function p(e){if("function"!=typeof e)throw new Error("Expected the listener to be a function.");if(l)throw new Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api-reference/store#subscribelistener for more details.");var t=!0;return u(),s.push(e),function(){if(t){if(l)throw new Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api-reference/store#subscribelistener for more details.");t=!1,u();var n=s.indexOf(e);s.splice(n,1),o=null}}}function d(e){if(!It(e))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===e.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(l)throw new Error("Reducers may not dispatch actions.");try{l=!0,a=i(a,e)}finally{l=!1}for(var t=o=s,n=0;n<t.length;n++)(0,t[n])();return e}function f(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");i=e,d({type:xt.REPLACE})}function h(){var e,t=p;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new TypeError("Expected the observer to be an object.");function n(){e.next&&e.next(c())}return n(),{unsubscribe:t(n)}}})[St.a]=function(){return this},e}return d({type:xt.INIT}),(r={dispatch:d,subscribe:p,getState:c,replaceReducer:f})[St.a]=h,r}function Dt(e,t){var n=t&&t.type;return"Given "+(n&&'action "'+String(n)+'"'||"an action")+', reducer "'+e+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function Rt(e,t){return function(){return t(e.apply(this,arguments))}}function Ot(e,t){if("function"==typeof e)return Rt(e,t);if("object"!=typeof e||null===e)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===e?"null":typeof e)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');var n={};for(var r in e){var i=e[r];"function"==typeof i&&(n[r]=Rt(i,t))}return n}function Lt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mt(e,t){var n=Object.keys(e);return Object.getOwnPropertySymbols&&n.push.apply(n,Object.getOwnPropertySymbols(e)),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(n,!0).forEach((function(t){Lt(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ut(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function Ft(e){return function(t,n){var r=e(t,n);function i(){return r}return i.dependsOnOwnProps=!1,i}}function jt(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Bt(e,t){return function(t,n){n.displayName;var r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=jt(e);var i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=jt(i),i=r(t,n)),i},r}}var Vt=[function(e){return"function"==typeof e?Bt(e):void 0},function(e){return e?void 0:Ft((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?Ft((function(t){return Ot(e,t)})):void 0}],Ht=[function(e){return"function"==typeof e?Bt(e):void 0},function(e){return e?void 0:Ft((function(){return{}}))}];function Kt(e,t,n){return ct({},n,{},e,{},t)}var Gt=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var r,i=n.pure,a=n.areMergedPropsEqual,o=!1;return function(t,n,s){var l=e(t,n,s);return o?i&&a(l,r)||(r=l):(o=!0,r=l),r}}}(e):void 0},function(e){return e?void 0:function(){return Kt}}];function zt(e,t,n,r){return function(i,a){return n(e(i,a),t(r,a),a)}}function Wt(e,t,n,r,i){var a,o,s,l,u,c=i.areStatesEqual,p=i.areOwnPropsEqual,d=i.areStatePropsEqual,f=!1;function h(i,f){var h,g,y=!p(f,o),v=!c(i,a);return a=i,o=f,y&&v?(s=e(a,o),t.dependsOnOwnProps&&(l=t(r,o)),u=n(s,l,o)):y?(e.dependsOnOwnProps&&(s=e(a,o)),t.dependsOnOwnProps&&(l=t(r,o)),u=n(s,l,o)):v?(h=e(a,o),g=!d(h,s),s=h,g&&(u=n(s,l,o)),u):u}return function(i,c){return f?h(i,c):(s=e(a=i,o=c),l=t(r,o),u=n(s,l,o),f=!0,u)}}function Yt(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,a=pt(t,["initMapStateToProps","initMapDispatchToProps","initMergeProps"]),o=n(e,a),s=r(e,a),l=i(e,a);return(a.pure?Wt:zt)(o,s,l,e,a)}function qt(e,t,n){for(var r=t.length-1;r>=0;r--){var i=t[r](e);if(i)return i}return function(t,r){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+r.wrappedComponentName+".")}}function Xt(e,t){return e===t}var $t=function(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Tt:n,i=t.mapStateToPropsFactories,a=void 0===i?Ht:i,o=t.mapDispatchToPropsFactories,s=void 0===o?Vt:o,l=t.mergePropsFactories,u=void 0===l?Gt:l,c=t.selectorFactory,p=void 0===c?Yt:c;return function(e,t,n,i){void 0===i&&(i={});var o=i,l=o.pure,c=void 0===l||l,d=o.areStatesEqual,f=void 0===d?Xt:d,h=o.areOwnPropsEqual,g=void 0===h?wt:h,y=o.areStatePropsEqual,v=void 0===y?wt:y,m=o.areMergedPropsEqual,b=void 0===m?wt:m,_=pt(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=qt(e,a,"mapStateToProps"),k=qt(t,s,"mapDispatchToProps"),T=qt(n,u,"mergeProps");return r(p,ct({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:k,initMergeProps:T,pure:c,areStatesEqual:f,areOwnPropsEqual:g,areStatePropsEqual:v,areMergedPropsEqual:b},_))}}();function Qt(){return Ae(at)}function Zt(e){void 0===e&&(e=at);var t=e===at?Qt:function(){return Ae(e)};return function(){return t().store}}var Jt=Zt();function en(e){void 0===e&&(e=at);var t=e===at?Jt:Zt(e);return function(){return t().dispatch}}var tn=en(),nn=function(e,t){return e===t};function rn(e){void 0===e&&(e=at);var t=e===at?Qt:function(){return Ae(e)};return function(e,n){void 0===n&&(n=nn);var r=t(),i=function(e,t,n,r){var i,a=ve((function(e){return e+1}),0)[1],o=ke((function(){return new lt(n,r)}),[n,r]),s=_e(),l=_e(),u=_e(),c=_e(),p=n.getState();try{i=e!==l.current||p!==u.current||s.current?e(p):c.current}catch(e){throw s.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+s.current.stack+"\n\n"),e}return gt((function(){l.current=e,u.current=p,c.current=i,s.current=void 0})),gt((function(){function e(){try{var e=l.current(n.getState());if(t(e,c.current))return;c.current=e}catch(e){s.current=e}a()}return o.onStateChange=e,o.trySubscribe(),e(),function(){return o.tryUnsubscribe()}}),[n,o]),i}(e,n,r.store,r.subscription);return we(i),i}}var an=rn();ot=rt;var on=n(4),sn=n.n(on);function ln(e){return null!=e}function un(e,t){for(var n in t)e[n]=t[n];return e}var cn=/[?&#]intl=show/,pn=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getChildContext=function(){var e=this.props,t=e.scope,n=e.definition,r=e.mark,i=un({},this.context.intl||{});return t&&(i.scope=t),n&&(i.dictionary=function e(t,n){var r=un({},t);for(var i in n)n.hasOwnProperty(i)&&(t[i]&&n[i]&&"object"==typeof t[i]&&"object"==typeof n[i]?r[i]=e(t[i],n[i]):r[i]=t[i]||n[i]);return r}(i.dictionary||{},n)),(r||"undefined"!=typeof location&&String(location).match(cn))&&(i.mark=!0),{intl:i}},t.prototype.render=function(e){return e.children},t}(B);function dn(e,t){if(arguments.length<2)return t=e,function(e){return dn(e,t)};function n(n){return N(pn,t||{},N(e,n))}return n.getWrappedComponent=e&&e.getWrappedComponent||function(){return e},n}var fn,hn={};function gn(e,t){return fn=t||hn,e&&e.replace(/\{\{([\w.-]+)\}\}/g,yn)}function yn(e,t){for(var n=t.split("."),r=fn,i=0;i<n.length;i++)if(null==(r=r[n[i]]))return"";return"string"==typeof r&&r.match(/\{\{/)&&(r=gn(r,fn)),r}function vn(e,t,n,r,i,a){t&&(e=t+"."+e);var o=n&&sn()(n,e);return(i||0===i)&&o&&"object"==typeof o&&(o=o.splice?o[i]||o[0]:0===i&&ln(o.none)?o.none:1===i&&ln(o.one||o.singular)?o.one||o.singular:o.some||o.many||o.plural||o.other||o),o&&gn(o,r)||a||null}function mn(e,t){var n=e.value,r=e.id,i=t.intl;if(i&&i.mark){var a="dictionary"+(i&&i.scope?"."+i.scope:"")+"."+r;return N("mark",{style:{background:n?sn()(i,a)?"rgba(119,231,117,.5)":"rgba(229,226,41,.5)":"rgba(228,147,51,.5)"},title:r},n)}return n}function bn(e,t){var n=e.id,r=e.children,i=e.plural,a=e.fields,o=t.intl;return N(mn,{id:n,value:vn(n,o&&o.scope,o&&o.dictionary,a,i,r)})}function _n(e,t,n){var r={};for(var i in t=t||{},e=function(e){if("string"==typeof(e=e||{})&&(e=e.split(",")),"join"in e){for(var t={},n=0;n<e.length;n++){var r=e[n].trim();r&&(t[r.split(".").pop()]=r)}return t}return e}(e))if(e.hasOwnProperty(i)&&e[i]){var a=e[i];n||"string"!=typeof a?a.type===bn&&(a=un({fallback:a.props.children},a.props),r[i]=vn(a.id,t.scope,t.dictionary,a.fields,a.plural,a.fallback)):r[i]=vn(a,t.scope,t.dictionary)}return r}function En(e,t){var n=e.children,r=t.intl;return n&&n.length?n.map((function(e){return ie(e,_n(e.props,r,!0))})):n&&ie(n,_n(n.props,r,!0))}function kn(e){return N(En,null,N(Tn,{html:N(bn,e),id:e.id}))}function Tn(e){var t=e.html,n=e.id,r=t?"string"==typeof t?N("span",{dangerouslySetInnerHTML:{__html:t}}):N("span",null,t):t;return N(mn,{id:n,value:r})}function An(e){return function(t){function n(n,r){var i=_n("function"==typeof e?e(n,r):e,r.intl);return N(t,un(un({},n),i))}return n.getWrappedComponent=t&&t.getWrappedComponent||function(){return t},n}}dn.intl=dn,dn.IntlProvider=pn,dn.Text=bn,dn.MarkupText=kn,dn.Localizer=En,dn.withText=An;var wn=dn;function Sn(e){return e&&"object"==typeof e&&!Array.isArray(e)}function Cn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(!n.length)return e;var i=n.shift();if(Sn(e)&&Sn(i))for(var a in i){var o,s;Sn(i[a])?(e[a]||Object.assign(e,((o={})[a]={},o)),Cn(e[a],i[a])):Object.assign(e,((s={})[a]=i[a],s))}return Cn.apply(void 0,[e].concat(n))}var xn={get:function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}}},In={};function Pn(e){return xn.get(e)}var Dn=Pn,Rn="playkit-ui",On={UI_CLICKED:Rn+"-uiclicked",UI_VISIBILITY_CHANGED:Rn+"-uivisibilitychanged",GUI_RESIZE:Rn+"-guiresize",PLAYER_RESIZE:Rn+"-playerresize",VIDEO_RESIZE:Rn+"-videoresize",UI_PRESET_CHANGE:Rn+"-uipresetchange",USER_CLICKED_PLAY:Rn+"-userclickedplay",USER_CLICKED_PAUSE:Rn+"-userclickedpause",USER_CLICKED_REWIND:Rn+"-userclickedrewind",USER_CLICKED_FORWARD:Rn+"-userclickedforward",USER_CLICKED_LIVE_TAG:Rn+"-userclickedlivetag",USER_CLICKED_MUTE:Rn+"-userclickedmute",USER_CLICKED_UNMUTE:Rn+"-userclickedunmute",USER_CLICKED_ADVANCED_AUDIO_DESCRIPTION:Rn+"-userclickedadvancedaudiodescription",USER_CHANGED_VOLUME:Rn+"-userchangedvolume",USER_SELECTED_CAPTION_TRACK:Rn+"-userselectedcaptiontrack",USER_SHOWED_CAPTIONS:Rn+"-usershowedcaptions",USER_HID_CAPTIONS:Rn+"-userhidcaptions",USER_SELECTED_AUDIO_TRACK:Rn+"-userselectedaudiotrack",USER_SELECTED_QUALITY_TRACK:Rn+"-userselectedqualitytrack",USER_ENTERED_FULL_SCREEN:Rn+"-userenteredfullscreen",USER_EXITED_FULL_SCREEN:Rn+"-userexitedfullscreen",USER_ENTERED_PICTURE_IN_PICTURE:Rn+"-userenteredpictureinpicture",USER_EXITED_PICTURE_IN_PICTURE:Rn+"-userexitedpictureinpicture",USER_SELECTED_CAPTIONS_STYLE:Rn+"-userselectedcaptionsstyle",USER_SELECTED_SPEED:Rn+"-userselectedspeed",USER_SEEKED:Rn+"-userseeked",RESIZE:Rn+"-resize"},Ln={TAB:9,ENTER:13,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,P:80,C:67,F:70,M:77,SEMI_COLON:186,COMMA:188,PERIOD:190};function Mn(){return(Mn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Nn,Un,Fn,jn=function(e){return function(t){return function(n){var r,i;function a(){var t;return(t=n.call(this)||this).logger=Dn("UI "+e),t.logger.debug("Initialized"),t}return i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,a.prototype.render=function(){return N(t,Mn({},this.props,{logger:this.logger}))},a}(B)}};function Bn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hn="remove";function Kn(e,t){return e[t]=e[t]||{before:[],after:[],replace:null},e[t]}var Gn,zn,Wn,Yn={playerAreaComponents:null,hasPositionedComponents:!1,presetComponentsOnlyMode:!0},qn=jn("PlayerArea")(Nn=$t((function(e){return{activePresetName:e.shell.activePresetName}}))((Fn=Un=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vn(Bn(t=e.call.apply(e,[this].concat(r))||this),"_updateAreaComponents",(function(e){var n=t.props,r=n.activePresetName,i=n.name;t.props.logger.debug("Player area '"+i+"' in preset '"+r+"' - update children components");var a={},o={appendedComponents:[],positionedComponentMap:a},s=!1;e.forEach((function(e){e.beforeComponent?(Kn(a,e.beforeComponent).before.push(e),s=!0):e.afterComponent?(Kn(a,e.afterComponent).after.push(e),s=!0):e.replaceComponent?(Kn(a,e.replaceComponent).replace=e,s=!0):o.appendedComponents.push(e)})),t.setState({playerAreaComponents:o,hasPositionedComponents:s,presetComponentsOnlyMode:!1})})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e,t){return e.shouldUpdate||this.state.playerAreaComponents!==t.playerAreaComponents||e.activePresetName!==this.props.activePresetName},i.componentDidUpdate=function(e){e.activePresetName!==this.props.activePresetName&&this._registerListener()},i._unregisterListener=function(){this.props.logger.debug("Player area '"+this.props.name+"' - unregister to changes"),"function"==typeof this._unregisterListenerCallback&&(this._unregisterListenerCallback(),this._unregisterListenerCallback=null)},i._registerListener=function(){var e=this.props,t=e.activePresetName,n=e.name;this._unregisterListener(),t&&n&&(this.props.logger.debug("Player area '"+n+"' in preset '"+t+"' - register to changes"),this._unregisterListenerCallback=this.context.playerAreaComponentsStore.listen(t,n,this._updateAreaComponents))},i.componentDidMount=function(){this.props.logger.debug("Player area '"+this.props.name+"' - handle did mount"),this.setState(Yn),this._registerListener(),this._actualChildren=[]},i.componentWillUpdate=function(e){var t=e.children;this._actualChildren=t&&t.type===j?t.props.children:t},i.componentWillUnmount=function(){var e=this.props.name;this.props.logger.debug("Player area '"+e+"' - handle will unmount"),this._unregisterListener()},i._renderUIComponent=function(e){return e.get?N(e.get,e.props):null},i.renderContent=function(e){return N(j,null,e)},i._getPositionedComponents=function(e){var t=this,n=this.state.playerAreaComponents,r=[];return W(e).forEach((function(e){if("div"===e.type||e.type===j)return e.props.children=t._getPositionedComponents(e.props.children),void r.push(e);var i,a=(i=e)&&i.type?i.type.displayName:null;if(a){var o=n.positionedComponentMap[a];if(o){var s=o.replace,l=o.before,u=o.after;if(s){if(s.get===Hn)return;return"string"!=typeof s.get&&(s.props=s.props||{},s.props.replacedComponentProps=e.props),void r.push(t._renderUIComponent(s))}l.length&&l.forEach((function(e){r.push(t._renderUIComponent(e))})),r.push(e),u.length&&u.forEach((function(e){r.push(t._renderUIComponent(e))}))}else r.push(e)}else r.push(e)})),r},i.render=function(){var e,t=this,n=this.props.show,r=this.state,i=r.playerAreaComponents,a=r.hasPositionedComponents;if(r.presetComponentsOnlyMode)return this.renderContent(this._actualChildren);if(!i||!n)return null;var o,s=[];a?s=this._getPositionedComponents(this._actualChildren):(o=s).push.apply(o,W(this._actualChildren));var l=i.appendedComponents.map((function(e){return t._renderUIComponent(e)})),u=s.length;return(e=s).splice.apply(e,[u,0].concat(l)),this.renderContent(s)},r}(B),Vn(Un,"defaultProps",{show:!0}),Nn=Fn))||Nn)||Nn,Xn=function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(e[n[i]]!==t[n[i]])return!1;return!0};function $n(){return($n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Qn={ADD_PLAYER_CLASS:"shell/ADD_PLAYER_CLASS",REMOVE_PLAYER_CLASS:"shell/REMOVE_PLAYER_CLASS",UPDATE_IS_MOBILE:"shell/UPDATE_IS_MOBILE",UPDATE_PLAYER_SIZE:"shell/UPDATE_PLAYER_SIZE",UPDATE_IS_SMALL_SIZE:"shell/UPDATE_IS_SMALL_SIZE",UPDATE_GUI_CLIENT_RECT:"shell/UPDATE_GUI_CLIENT_RECT",UPDATE_PLAYER_CLIENT_RECT:"shell/UPDATE_PLAYER_CLIENT_RECT",UPDATE_VIDEO_CLIENT_RECT:"shell/UPDATE_VIDEO_CLIENT_RECT",UPDATE_DOCUMENT_WIDTH:"shell/UPDATE_DOCUMENT_WIDTH",UPDATE_PLAYER_HOVER_STATE:"shell/UPDATE_PLAYER_HOVER_STATE",UPDATE_PLAYER_NAV_STATE:"shell/UPDATE_PLAYER_NAV_STATE",UPDATE_SMART_CONTAINER_OPEN:"shell/UPDATE_SMART_CONTAINER_OPEN",UPDATE_ACTIVE_PRESET_NAME:"shell/UPDATE_ACTIVE_PRESET_NAME",UPDATE_SIDE_PANEL_MODE:"shell/UPDATE_SIDE_PANEL_MODE",UPDATE_SIDE_PANEL_SIZE:"shell/UPDATE_SIDE_PANEL_SIZE",UPDATE_PRESET_SETTINGS:"shell/UPDATE_PRESET_SETTINGS",UPDATE_LAYOUT_STYLES:"shell/UPDATE_LAYOUT_STYLES"},Zn={VERTICAL:"vertical",HORIZONTAL:"horizontal"},Jn={LEFT:"left",TOP:"top",BOTTOM:"bottom",RIGHT:"right"},er={ALONGSIDE:"alongside",HIDDEN:"hidden",OVER:"over"},tr={Playback:"Playback",Live:"Live",Ads:"Ads",Error:"Error",Idle:"Idle"},nr={PlayerArea:"PlayerArea",PresetArea:"PresetArea",InteractiveArea:"InteractiveArea",VideoArea:"VideoArea",GuiArea:"GuiArea",TopBar:"TopBar",BottomBar:"BottomBar",PresetFloating:"PresetFloating",TopBarLeftControls:"TopBarLeftControls",TopBarRightControls:"TopBarRightControls",BottomBarLeftControls:"BottomBarLeftControls",BottomBarRightControls:"BottomBarRightControls",SidePanelTop:"SidePanelTop",SidePanelLeft:"SidePanelLeft",SidePanelRight:"SidePanelRight",SidePanelBottom:"SidePanelBottom",SeekBar:"SeekBar",LoadingSpinner:"LoadingSpinner"},rr={x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0},ir={position:"absolute",left:0,right:0,top:0,bottom:0},ar={playerClasses:[],guiClientRect:rr,playerClientRect:rr,videoClientRect:rr,layoutStyles:{video:ir,gui:ir,sidePanels:(Gn={},Gn[Jn.LEFT]={},Gn[Jn.RIGHT]={},Gn[Jn.TOP]={},Gn[Jn.BOTTOM]={},Gn)},playerHover:!1,playerNav:!1,smartContainerOpen:!1,activePresetName:"",sidePanelsModes:(zn={},zn[Jn.LEFT]=er.HIDDEN,zn[Jn.RIGHT]=er.HIDDEN,zn[Jn.TOP]=er.HIDDEN,zn[Jn.BOTTOM]=er.HIDDEN,zn),sidePanelsSizes:(Wn={},Wn[Zn.VERTICAL]={min:240,max:480,ratio:.33},Wn[Zn.HORIZONTAL]={min:144,max:288,ratio:.33},Wn),presetSettings:{allowSidePanels:!1,allowPlayerArea:!1}},or=function(e,t){var n;switch(void 0===e&&(e=ar),t.type){case Qn.ADD_PLAYER_CLASS:return e.playerClasses.includes(t.className)?e:$n({},e,{playerClasses:[].concat(e.playerClasses,[t.className])});case Qn.REMOVE_PLAYER_CLASS:return $n({},e,{playerClasses:e.playerClasses.filter((function(e){return e!==t.className}))});case Qn.UPDATE_IS_MOBILE:return $n({},e,{isMobile:t.isMobile});case Qn.UPDATE_PLAYER_SIZE:return $n({},e,{playerSize:t.playerSize});case Qn.UPDATE_IS_SMALL_SIZE:return $n({},e,{isSmallSize:t.isSmallSize});case Qn.UPDATE_GUI_CLIENT_RECT:return $n({},e,{guiClientRect:t.guiClientRect});case Qn.UPDATE_PLAYER_CLIENT_RECT:return $n({},e,{playerClientRect:t.playerClientRect});case Qn.UPDATE_LAYOUT_STYLES:var r,i=e.layoutStyles,a=i.sidePanels,o=i.video,s=i.gui,l=t.layoutStyles,u=l.sidePanels,c=l.video,p=l.gui;return $n({},e,{layoutStyles:{sidePanels:(r={},r[Jn.LEFT]=Xn(a[Jn.LEFT],u[Jn.LEFT])?a[Jn.LEFT]:u[Jn.LEFT],r[Jn.RIGHT]=Xn(a[Jn.RIGHT],u[Jn.RIGHT])?a[Jn.RIGHT]:u[Jn.RIGHT],r[Jn.TOP]=Xn(a[Jn.TOP],u[Jn.TOP])?a[Jn.TOP]:u[Jn.TOP],r[Jn.BOTTOM]=Xn(a[Jn.BOTTOM],u[Jn.BOTTOM])?a[Jn.BOTTOM]:u[Jn.BOTTOM],r),video:Xn(o,c)?o:c,gui:Xn(s,p)?s:p}});case Qn.UPDATE_VIDEO_CLIENT_RECT:return $n({},e,{videoClientRect:t.videoClientRect});case Qn.UPDATE_DOCUMENT_WIDTH:return $n({},e,{documentWidth:t.documentWidth});case Qn.UPDATE_PLAYER_HOVER_STATE:return $n({},e,{playerHover:t.hover});case Qn.UPDATE_PLAYER_NAV_STATE:return $n({},e,{playerNav:t.nav});case Qn.UPDATE_SMART_CONTAINER_OPEN:return $n({},e,{smartContainerOpen:t.open});case Qn.UPDATE_ACTIVE_PRESET_NAME:return $n({},e,{activePresetName:t.activePresetName});case Qn.UPDATE_SIDE_PANEL_MODE:return $n({},e,{sidePanelsModes:$n({},e.sidePanelsModes,(n={},n[t.position]=t.sidePanelMode,n))});case Qn.UPDATE_SIDE_PANEL_SIZE:var d,f=t.options,h=f.ratio,g=f.min,y=f.max,v=e.sidePanelsSizes[t.orientation],m={ratio:"number"==typeof h&&h<=1?h:v.ratio,min:"number"==typeof g?g:v.min,max:"number"==typeof y?y:v.max};return $n({},e,{sidePanelsSizes:$n({},e.sidePanelsSizes,(d={},d[t.orientation]=m,d))});case Qn.UPDATE_PRESET_SETTINGS:return $n({},e,{presetSettings:$n({},{allowSidePanels:!1,allowPlayerArea:!1},t.presetSettings||{})});default:return e}},sr={addPlayerClass:function(e){return{type:Qn.ADD_PLAYER_CLASS,className:e}},removePlayerClass:function(e){return{type:Qn.REMOVE_PLAYER_CLASS,className:e}},updateIsMobile:function(e){return{type:Qn.UPDATE_IS_MOBILE,isMobile:e}},updatePlayerSize:function(e){return{type:Qn.UPDATE_PLAYER_SIZE,playerSize:e}},updateIsSmallSize:function(e){return{type:Qn.UPDATE_IS_SMALL_SIZE,isSmallSize:e}},updateGuiClientRect:function(e){return{type:Qn.UPDATE_GUI_CLIENT_RECT,guiClientRect:e}},updatePlayerClientRect:function(e){return{type:Qn.UPDATE_PLAYER_CLIENT_RECT,playerClientRect:e}},updateVideoClientRect:function(e){return{type:Qn.UPDATE_VIDEO_CLIENT_RECT,videoClientRect:e}},updateDocumentWidth:function(e){return{type:Qn.UPDATE_DOCUMENT_WIDTH,documentWidth:e}},updatePlayerHoverState:function(e){return{type:Qn.UPDATE_PLAYER_HOVER_STATE,hover:e}},updatePlayerNavState:function(e){return{type:Qn.UPDATE_PLAYER_NAV_STATE,nav:e}},updateSmartContainerOpen:function(e){return{type:Qn.UPDATE_SMART_CONTAINER_OPEN,open:e}},updateActivePresetName:function(e){return{type:Qn.UPDATE_ACTIVE_PRESET_NAME,activePresetName:e}},updateSidePanelMode:function(e,t){return{type:Qn.UPDATE_SIDE_PANEL_MODE,position:e,sidePanelMode:t}},updateSidePanelSize:function(e,t){return{type:Qn.UPDATE_SIDE_PANEL_SIZE,orientation:e,options:t}},updatePresetSettings:function(e){return{type:Qn.UPDATE_PRESET_SETTINGS,presetSettings:e}},updateLayoutStyles:function(e){return{type:Qn.UPDATE_LAYOUT_STYLES,layoutStyles:e}}};function lr(){return(lr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ur(e){return function(t){return lr({},Ot(e,t))}}var cr=n(0),pr=n.n(cr);function dr(e,t,n){var r=n.config.components&&n.config.components[e];return r?Cn(t,r):t}function fr(e,t,n){return n.componentAlias===e?Cn(t,n.config):t}function hr(){return(hr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gr={UPDATE:"config/UPDATE",UPDATE_COMPONENT:"config/UPDATE_COMPONENT",RESET:"config/RESET"},yr={forceTouchUI:!1,showCCButton:!0,settings:{showAudioMenu:!0,showCaptionsMenu:!0,showQualityMenu:!0,showSpeedMenu:!0,showAdvancedAudioDescToggle:!1,showAdvancedCaptionsMenu:!0},hoverTimeout:3e3,components:{watermark:{},seekbar:{},vrStereo:{},logo:{},fullscreen:{},sidePanels:{}}},vr=function(e,t){switch(void 0===e&&(e=yr),t.type){case gr.UPDATE:return hr({},e,Cn({},e,t.config));case gr.UPDATE_COMPONENT:var n;return hr({},e,{components:hr({},e.components,(n={},n[t.componentAlias]=Cn({},e.components[t.componentAlias],t.config),n))});default:return e}},mr={updateConfig:function(e){return{type:gr.UPDATE,config:e}},updateComponentConfig:function(e,t){return{type:gr.UPDATE_COMPONENT,componentAlias:e,config:t}}};function br(){return(br=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _r={UPDATE_PLAYER_STATE:"engine/UPDATE_PLAYER_STATE",UPDATE_PRE_PLAYBACK:"engine/UPDATE_PRE_PLAYBACK",UPDATE_IS_PLAYING:"engine/UPDATE_IS_PLAYING",UPDATE_IS_PAUSED:"engine/UPDATE_IS_PAUSED",UPDATE_IS_SEEKING:"engine/UPDATE_IS_SEEKING",UPDATE_LAST_SEEK_POINT:"engine/UPDATE_LAST_SEEK_POINT",UPDATE_IS_CHANGING_SOURCE:"engine/UPDATE_IS_CHANGING_SOURCE",UPDATE_IS_ENDED:"engine/UPDATE_IS_ENDED",UPDATE_IS_PLAYBACK_STARTED:"engine/UPDATE_IS_PLAYBACK_STARTED",UPDATE_IS_PLAYBACK_ENDED:"engine/UPDATE_IS_PLAYBACK_ENDED",UPDATE_CURRENT_TIME:"engine/UPDATE_CURRENT_TIME",UPDATE_DURATION:"engine/UPDATE_DURATION",UPDATE_VOLUME:"engine/UPDATE_VOLUME",UPDATE_MUTED:"engine/UPDATE_MUTED",UPDATE_METADATA_LOADING_STATUS:"engine/UPDATE_METADATA_LOADING_STATUS",UPDATE_DATA_LOADING_STATUS:"engine/UPDATE_DATA_LOADING_STATUS",UPDATE_AUDIO_TRACKS:"engine/UPDATE_AUDIO_TRACKS",UPDATE_VIDEO_TRACKS:"engine/UPDATE_VIDEO_TRACKS",UPDATE_TEXT_TRACKS:"engine/UPDATE_TEXT_TRACKS",UPDATE_AD_BREAK:"engine/UPDATE_AD_BREAK",UPDATE_AD_BREAK_PROGRESS:"engine/UPDATE_AD_BREAK_PROGRESS",UPDATE_AD_BREAK_COMPLETED:"engine/UPDATE_AD_BREAK_COMPLETED",UPDATE_AD_IS_PLAYING:"engine/UPDATE_AD_IS_PLAYING",UPDATE_AD_SKIP_TIME_OFFSET:"engine/UPDATE_AD_SKIP_TIME_OFFSET",UPDATE_AD_SKIPPABLE_STATE:"engine/UPDATE_AD_SKIPPABLE_STATE",UPDATE_AD_URL:"engine/UPDATE_AD_URL",UPDATE_AD_IS_LINEAR:"engine/UPDATE_AD_IS_LINEAR",UPDATE_AD_IS_BUMPER:"engine/UPDATE_AD_IS_BUMPER",UPDATE_AD_CONTENT_TYPE:"engine/UPDATE_AD_CONTENT_TYPE",UPDATE_PLAYER_POSTER:"engine/UPDATE_PLAYER_POSTER",UPDATE_IS_LIVE:"engine/UPDATE_IS_LIVE",UPDATE_IS_DVR:"engine/UPDATE_IS_DVR",UPDATE_IS_IMG:"engine/UPDATE_IS_IMG",UPDATE_ERROR:"engine/ERROR",UPDATE_IS_IDLE:"engine/UPDATE_IS_IDLE",UPDATE_FALLBACK_TO_MUTED_AUTOPLAY:"engine/UPDATE_FALLBACK_TO_MUTED_AUTOPLAY",UPDATE_IS_VR:"engine/UPDATE_IS_VR",UPDATE_VR_STEREO_MODE:"engine/UPDATE_VR_STEREO_MODE",UPDATE_IS_CASTING:"engine/UPDATE_IS_CASTING",UPDATE_CAST_SESSION:"engine/UPDATE_CAST_SESSION",UPDATE_IS_CAST_AVAILABLE:"engine/UPDATE_IS_CAST_AVAILABLE",UPDATE_PLAYLIST:"engine/UPDATE_PLAYLIST",UPDATE_PICTURE_IN_PICTURE_SUPPORTED:"engine/UPDATE_PICTURE_IN_PICTURE_SUPPORTED",UPDATE_PICTURE_IN_PICTURE_MODE:"engine/UPDATE_PICTURE_IN_PICTURE_MODE",UPDATE_FULLSCREEN:"engine/UPDATE_FULLSCREEN"},Er={isIdle:!1,isPlaying:!1,isPaused:!1,isSeeking:!1,isEnded:!1,isPlaybackStarted:!1,isPlaybackEnded:!1,isChangingSource:!1,prePlayback:!0,metadataLoaded:!1,dataLoaded:!1,playerState:{previousState:"",currentState:""},fallbackToMutedAutoPlay:!1,poster:"",currentTime:0,lastSeekPoint:0,duration:0,volume:1,muted:!1,videoTracks:[],audioTracks:[],textTracks:[],adIsLinear:!1,adBreak:!1,adIsPlaying:!1,adSkipTimeOffset:0,adSkippableState:!1,adIsBumper:!1,adContentType:null,isLive:!1,isDvr:!1,isImg:!1,adProgress:{currentTime:0,duration:0},adUrl:"",hasError:!1,isVr:!1,vrStereoMode:!1,isCasting:!1,castSession:null,isCastAvailable:!1,pictureInPictureSupported:!1,isInPictureInPicture:!1,playlist:null,fullscreen:!1},kr=function(e,t){switch(void 0===e&&(e=Er),t.type){case gr.UPDATE:return dr("engine",e,t);case gr.UPDATE_COMPONENT:return fr("engine",e,t);case _r.UPDATE_ERROR:return br({},e,{hasError:t.hasError});case _r.UPDATE_PLAYER_STATE:return br({},e,{playerState:t.playerState});case _r.UPDATE_PRE_PLAYBACK:return br({},e,{prePlayback:t.prePlayback});case _r.UPDATE_IS_PLAYING:return br({},e,{isPlaying:t.isPlaying});case _r.UPDATE_IS_PAUSED:return br({},e,{isPaused:t.isPaused});case _r.UPDATE_IS_SEEKING:return br({},e,{isSeeking:t.isSeeking});case _r.UPDATE_LAST_SEEK_POINT:return br({},e,{lastSeekPoint:t.lastSeekPoint});case _r.UPDATE_IS_ENDED:return br({},e,{isEnded:t.isEnded});case _r.UPDATE_IS_PLAYBACK_STARTED:return br({},e,{isPlaybackStarted:t.isPlaybackStarted});case _r.UPDATE_IS_PLAYBACK_ENDED:return br({},e,{isPlaybackEnded:t.isPlaybackEnded});case _r.UPDATE_CURRENT_TIME:return br({},e,{currentTime:t.currentTime});case _r.UPDATE_DURATION:return br({},e,{duration:t.duration});case _r.UPDATE_VOLUME:return br({},e,{volume:t.volume});case _r.UPDATE_MUTED:return br({},e,{muted:t.muted});case _r.UPDATE_METADATA_LOADING_STATUS:return br({},e,{metadataLoaded:t.metadataLoaded});case _r.UPDATE_DATA_LOADING_STATUS:return br({},e,{dataLoaded:t.dataLoaded});case _r.UPDATE_AUDIO_TRACKS:return br({},e,{audioTracks:t.tracks});case _r.UPDATE_VIDEO_TRACKS:return br({},e,{videoTracks:t.tracks});case _r.UPDATE_TEXT_TRACKS:return br({},e,{textTracks:t.tracks});case _r.UPDATE_AD_BREAK:return br({},e,{adBreak:t.adBreak});case _r.UPDATE_AD_BREAK_PROGRESS:return br({},e,{adProgress:t.adProgress});case _r.UPDATE_AD_BREAK_COMPLETED:return br({},e,{adProgress:{currentTime:e.adProgress.duration,duration:e.adProgress.duration}});case _r.UPDATE_AD_IS_PLAYING:return br({},e,{adIsPlaying:t.adIsPlaying});case _r.UPDATE_AD_IS_LINEAR:return br({},e,{adIsLinear:t.adIsLinear});case _r.UPDATE_AD_SKIP_TIME_OFFSET:return br({},e,{adSkipTimeOffset:t.adSkipTimeOffset});case _r.UPDATE_AD_SKIPPABLE_STATE:return br({},e,{adSkippableState:t.adSkippableState});case _r.UPDATE_AD_URL:return br({},e,{adUrl:t.adUrl});case _r.UPDATE_AD_IS_BUMPER:return br({},e,{adIsBumper:t.adIsBumper});case _r.UPDATE_AD_CONTENT_TYPE:return br({},e,{adContentType:t.adContentType});case _r.UPDATE_PLAYER_POSTER:return br({},e,{poster:t.poster});case _r.UPDATE_IS_LIVE:return br({},e,{isLive:t.isLive});case _r.UPDATE_IS_DVR:return br({},e,{isDvr:t.isDvr});case _r.UPDATE_IS_IMG:return br({},e,{isImg:t.isImg});case _r.UPDATE_IS_IDLE:return br({},e,{isIdle:t.IsIdle});case _r.UPDATE_FALLBACK_TO_MUTED_AUTOPLAY:return br({},e,{fallbackToMutedAutoPlay:t.fallback});case _r.UPDATE_IS_VR:return br({},e,{isVr:t.isVr});case _r.UPDATE_VR_STEREO_MODE:return br({},e,{vrStereoMode:t.vrStereoMode});case _r.UPDATE_IS_CASTING:return br({},e,{isCasting:t.isCasting});case _r.UPDATE_CAST_SESSION:return br({},e,{castSession:t.castSession});case _r.UPDATE_IS_CAST_AVAILABLE:return br({},e,{isCastAvailable:t.isCastAvailable});case _r.UPDATE_IS_CHANGING_SOURCE:return br({},e,{isChangingSource:t.isChangingSource});case _r.UPDATE_PLAYLIST:return br({},e,{playlist:t.playlist});case _r.UPDATE_PICTURE_IN_PICTURE_SUPPORTED:return br({},e,{isPictureInPictureSupported:t.isPictureInPictureSupported});case _r.UPDATE_PICTURE_IN_PICTURE_MODE:return br({},e,{isInPictureInPicture:t.isInPictureInPicture});case _r.UPDATE_FULLSCREEN:return br({},e,{fullscreen:t.fullscreen});default:return e}},Tr={updateHasError:function(e){return{type:_r.UPDATE_ERROR,hasError:e}},updatePlayerState:function(e,t){return{type:_r.UPDATE_PLAYER_STATE,playerState:{prevoiusState:e,currentState:t}}},updatePrePlayback:function(e){return{type:_r.UPDATE_PRE_PLAYBACK,prePlayback:e}},updateIsPlaying:function(e){return{type:_r.UPDATE_IS_PLAYING,isPlaying:e}},updateIsPaused:function(e){return{type:_r.UPDATE_IS_PAUSED,isPaused:e}},updateIsSeeking:function(e){return{type:_r.UPDATE_IS_SEEKING,isSeeking:e}},updateLastSeekPoint:function(e){return{type:_r.UPDATE_LAST_SEEK_POINT,lastSeekPoint:e}},updateIsEnded:function(e){return{type:_r.UPDATE_IS_ENDED,isEnded:e}},updateIsPlaybackStarted:function(e){return{type:_r.UPDATE_IS_PLAYBACK_STARTED,isPlaybackStarted:e}},updateIsPlaybackEnded:function(e){return{type:_r.UPDATE_IS_PLAYBACK_ENDED,isPlaybackEnded:e}},updateCurrentTime:function(e){return{type:_r.UPDATE_CURRENT_TIME,currentTime:e}},updateDuration:function(e){return{type:_r.UPDATE_DURATION,duration:e}},updateVolume:function(e){return{type:_r.UPDATE_VOLUME,volume:e}},updateMuted:function(e){return{type:_r.UPDATE_MUTED,muted:e}},updateMetadataLoadingStatus:function(e){return{type:_r.UPDATE_METADATA_LOADING_STATUS,metadataLoaded:e}},updateDataLoadingStatus:function(e){return{type:_r.UPDATE_DATA_LOADING_STATUS,dataLoaded:e}},updateAudioTracks:function(e){return{type:_r.UPDATE_AUDIO_TRACKS,tracks:e}},updateVideoTracks:function(e){return{type:_r.UPDATE_VIDEO_TRACKS,tracks:e}},updateTextTracks:function(e){return{type:_r.UPDATE_TEXT_TRACKS,tracks:e}},updateAdBreak:function(e){return{type:_r.UPDATE_AD_BREAK,adBreak:e}},updateAdBreakProgress:function(e,t){return{type:_r.UPDATE_AD_BREAK_PROGRESS,adProgress:{currentTime:e,duration:t}}},updateAdBreakCompleted:function(){return{type:_r.UPDATE_AD_BREAK_COMPLETED}},updateAdIsPlaying:function(e){return{type:_r.UPDATE_AD_IS_PLAYING,adIsPlaying:e}},updateAdSkipTimeOffset:function(e){return{type:_r.UPDATE_AD_SKIP_TIME_OFFSET,adSkipTimeOffset:e}},updateAdSkippableState:function(e){return{type:_r.UPDATE_AD_SKIPPABLE_STATE,adSkippableState:e}},updateAdClickUrl:function(e){return{type:_r.UPDATE_AD_URL,adUrl:e}},updateAdIsLinear:function(e){return{type:_r.UPDATE_AD_IS_LINEAR,adIsLinear:e}},updateAdIsBumper:function(e){return{type:_r.UPDATE_AD_IS_BUMPER,adIsBumper:e}},updateAdContentType:function(e){return{type:_r.UPDATE_AD_CONTENT_TYPE,adContentType:e}},updatePlayerPoster:function(e){return{type:_r.UPDATE_PLAYER_POSTER,poster:e}},updateIsLive:function(e){return{type:_r.UPDATE_IS_LIVE,isLive:e}},updateIsDvr:function(e){return{type:_r.UPDATE_IS_DVR,isDvr:e}},updateIsImg:function(e){return{type:_r.UPDATE_IS_IMG,isImg:e}},updateIsIdle:function(e){return{type:_r.UPDATE_IS_IDLE,IsIdle:e}},updateFallbackToMutedAutoPlay:function(e){return{type:_r.UPDATE_FALLBACK_TO_MUTED_AUTOPLAY,fallback:e}},updateIsVr:function(e){return{type:_r.UPDATE_IS_VR,isVr:e}},updateVrStereoMode:function(e){return{type:_r.UPDATE_VR_STEREO_MODE,vrStereoMode:e}},updateIsCasting:function(e){return{type:_r.UPDATE_IS_CASTING,isCasting:e}},updateCastSession:function(e){return{type:_r.UPDATE_CAST_SESSION,castSession:e}},updateIsCastAvailable:function(e){return{type:_r.UPDATE_IS_CAST_AVAILABLE,isCastAvailable:e}},updateIsChangingSource:function(e){return{type:_r.UPDATE_IS_CHANGING_SOURCE,isChangingSource:e}},updatePlaylist:function(e){return{type:_r.UPDATE_PLAYLIST,playlist:e}},updatePictureInPictureSupport:function(e){return{type:_r.UPDATE_PICTURE_IN_PICTURE_SUPPORTED,isPictureInPictureSupported:e}},updateIsInPictureInPicture:function(e){return{type:_r.UPDATE_PICTURE_IN_PICTURE_MODE,isInPictureInPicture:e}},updateFullscreen:function(e){return{type:_r.UPDATE_FULLSCREEN,fullscreen:e}}},Ar=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getChildContext=function(){return{player:this.props.player}},i.render=function(){return this.props.children&&W(this.props.children)[0]||null},r}(B);function wr(){return(wr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Sr=function(e){return function(t){var n,r;function i(){return t.apply(this,arguments)||this}return r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,i.prototype.render=function(){var t=this.context.player;return N(e,wr({},this.props,{player:t}))},i}(B)};function Cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var xr,Ir,Pr=function(){function e(){this._map=new Map}var t=e.prototype;return t.push=function(e,t){if(this._map.has(e)){var n=this._map.get(e);Array.isArray(n)&&(n.push(t),this._map.set(e,n))}else this._map.set(e,[t])},t.set=function(e,t){this._map.set(e,t)},t.has=function(e){return this._map.has(e)},t.get=function(e){var t=this._map.get(e);return t?t.slice():[]},t.getAll=function(){for(var e,t=[],n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Cr(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._map.values());!(e=n()).done;){var r=e.value;t=t.concat(r)}return t},t.remove=function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n))for(var r=0;r<n.length;++r)n[r]===t&&(n.splice(r,1),--r)}},t.keys=function(){return this._map.keys()},t.clear=function(){this._map.clear()},e}(),Dr=function(){function e(e,t){this.bubbles=!1,this.cancelable=!1,this.defaultPrevented=!1,this.timeStamp=window.performance?window.performance.now():Date.now(),this.type=e,this.isTrusted=!1,this.currentTarget=null,this.target=null,this.stopped=!1,t&&(this.payload=t)}var t=e.prototype;return t.preventDefault=function(){},t.stopImmediatePropagation=function(){this.stopped=!0},t.stopPropagation=function(){},e}();Ir=On,"Type"in(xr=Dr)?Object.defineProperty(xr,"Type",{value:Ir,enumerable:!0,configurable:!0,writable:!0}):xr.Type=Ir;var Rr=function(){function e(){this._listeners=new Pr,this.dispatchTarget=this,this.__logger=Dn("UI FakeEventTarget")}var t=e.prototype;return t.addEventListener=function(e,t){this._listeners.push(e,t)},t.removeEventListener=function(e,t){this._listeners.remove(e,t)},t.dispatchEvent=function(e){for(var t=this._listeners.get(e.type)||[],n=0;n<t.length;++n){e.target=this.dispatchTarget,e.currentTarget=this.dispatchTarget;var r=t[n];try{r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(t){this.__logger.error("Error occurred when handling event: "+e.type+".",t)}if(e.stopped)break}return e.defaultPrevented},e}();function Or(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Lr=function(){function e(){this._bindingMap=new Pr}var t=e.prototype;return t.destroy=function(){return this.removeAll(),this._bindingMap=null,Promise.resolve()},t.listenOnce=function(e,t,n,r){var i=this;this.listen(e,t,(function r(a){i.unlisten(e,t,r),n.call(i,a)}),r)},t.listen=function(e,t,n,r){var i=new Mr(e,t,n,r);this._bindingMap&&this._bindingMap.push(t,i)},t.unlisten=function(e,t,n){if(this._bindingMap)for(var r=this._bindingMap.get(t),i=0;i<r.length;++i){var a=r[i];a.target!==e||a.listener!==n&&n||(a.unlisten(),this._bindingMap&&this._bindingMap.remove(t,a))}},t.removeAll=function(){if(this._bindingMap){for(var e,t=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Or(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Or(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(this._bindingMap.getAll());!(e=t()).done;)e.value.unlisten();this._bindingMap&&this._bindingMap.clear()}},e}(),Mr=function(){function e(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.options=r,this.target.addEventListener(t,n,!1)}return e.prototype.unlisten=function(){this.target&&(this.target.removeEventListener(this.type,this.listener,this.options),this.target=null,this.listener=null,this.options=null)},e}();function Nr(){return(Nr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ur(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jr,Br=function(e){return function(t){var n,r;function i(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fr(Ur(e=t.call.apply(t,[this].concat(r))||this),"eventManager",new Lr),e}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a=i.prototype;return a.componentWillUnmount=function(){this.eventManager&&(this.eventManager.destroy(),this.eventManager=null)},a.render=function(){return N(e,Nr({},this.props,{eventManager:this.eventManager}))},i}(B)},Vr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_AUDIO_TRACK)||this).payload={audioTrack:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Hr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_CAPTION_TRACK)||this).payload={captionTrack:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Kr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_CAPTIONS_STYLE)||this).payload={captionsStyle:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Gr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_QUALITY_TRACK)||this).payload={qualityTrack:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),zr=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,Dr.Type.USER_SEEKED)||this).payload={from:t,to:n},r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Wr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_SELECTED_SPEED)||this).payload={speed:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Yr=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.UI_VISIBILITY_CHANGED)||this).payload={visible:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),qr=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,Dr.Type.USER_CLICKED_REWIND)||this).payload={from:t,to:n},r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Xr=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,Dr.Type.USER_CLICKED_FORWARD)||this).payload={from:t,to:n},r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),$r=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.USER_CHANGED_VOLUME)||this).payload={volume:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr);function Qr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Jr=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Zr(Qr(t=e.call.apply(e,[this].concat(r))||this),"_notifyClick",(function(e){return ni(t.props.store,e,t.props.player)})),Zr(Qr(t),"_notifyChange",(function(e){return ti(t.props.store,e,t.props.player)})),Zr(Qr(t),"_notifyHoverChange",(function(e){return ei(t.props.store,e,t.props.player)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getChildContext=function(){return{notifyClick:this._notifyClick,notifyChange:this._notifyChange,notifyHoverChange:this._notifyHoverChange}},i.render=function(){return this.props.children&&W(this.props.children)[0]||null},r}(B);function ei(e,t,n){var r=e.getState().engine,i=e.getState().shell;!r.adBreak&&r.isPlaying&&i.playerHover!==t.payload.hover&&n.dispatchEvent(new Yr(t.payload.hover))}function ti(e,t,n){switch(t.name){case"Volume":n.dispatchEvent(new $r(t.payload.volume));break;case"SeekBarPlaybackContainer":case"SeekBarLivePlaybackContainer":n.dispatchEvent(new zr(t.payload.from,t.payload.to));break;case"ActivePreset":n.dispatchEvent(new Dr(Dr.Type.UI_PRESET_CHANGE,t.payload))}}function ni(e,t,n){switch(t.name){case"Keyboard":si[t.payload.key](e,t,n);break;case"OverlayAction":!function(e,t,n){"PlayPause"===t.payload.type?ri(e,0,n):"Fullscreen"===t.payload.type&&ai(0,0,n)}(e,t,n);break;case"Settings":!function(e,t,n){t.payload.type===n.Track.VIDEO?n.dispatchEvent(new Gr(t.payload.track)):"speed"===t.payload.type?n.dispatchEvent(new Wr(t.payload.speed)):"AdvancedAudioDescription"===t.payload.type&&n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_ADVANCED_AUDIO_DESCRIPTION,t.payload))}(0,t,n);break;case"CVAAOverlay":n.dispatchEvent(new Kr(t.payload.textStyle));break;case"Fullscreen":ai(0,0,n);break;case"Language":!function(e,t,n){t.payload.type===n.Track.AUDIO?n.dispatchEvent(new Vr(t.payload.track)):t.payload.type===n.Track.TEXT&&n.dispatchEvent(new Hr(t.payload.track))}(0,t,n);break;case"Shell":n.dispatchEvent(new Dr(Dr.Type.UI_CLICKED));break;case"Rewind":n.dispatchEvent(new qr(t.payload.from,t.payload.to));break;case"Forward":n.dispatchEvent(new Xr(t.payload.from,t.payload.to));break;case"LiveTag":n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_LIVE_TAG));break;case"PrePlaybackPlayOverlay":case"PlayPause":ri(e,0,n);break;case"Volume":ii(e,0,n);break;case"PictureInPicture":oi(0,0,n);break;case"ClosedCaptions":!function(e,t,n){t.payload?n.dispatchEvent(new Dr(Dr.Type.USER_HID_CAPTIONS)):n.dispatchEvent(new Dr(Dr.Type.USER_SHOWED_CAPTIONS))}(0,t,n)}}function ri(e,t,n){var r=e.getState().engine;r.adBreak?r.adIsPlaying?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PLAY)):r.isPlaying?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PLAY))}function ii(e,t,n){e.getState().engine.muted?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_MUTE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_UNMUTE))}function ai(e,t,n){n.isFullscreen()?n.dispatchEvent(new Dr(Dr.Type.USER_EXITED_FULL_SCREEN)):n.dispatchEvent(new Dr(Dr.Type.USER_ENTERED_FULL_SCREEN))}function oi(e,t,n){n.isInPictureInPicture()?n.dispatchEvent(new Dr(Dr.Type.USER_EXITED_PICTURE_IN_PICTURE)):n.dispatchEvent(new Dr(Dr.Type.USER_ENTERED_PICTURE_IN_PICTURE))}var si=((jr={})[Ln.SPACE]=function(e,t,n){ri(e,0,n)},jr[Ln.UP]=function(e,t,n){n.dispatchEvent(new $r(t.payload.volume))},jr[Ln.DOWN]=function(e,t,n){n.dispatchEvent(new $r(t.payload.volume))},jr[Ln.F]=function(e,t,n){ai(0,0,n)},jr[Ln.P]=function(e,t,n){oi(0,0,n)},jr[Ln.ESC]=function(e,t,n){ai(0,0,n)},jr[Ln.LEFT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},jr[Ln.RIGHT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},jr[Ln.HOME]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},jr[Ln.END]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},jr[Ln.M]=function(e,t,n){ii(e,0,n)},jr[Ln.SEMI_COLON]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},jr[Ln.PERIOD]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},jr[Ln.COMMA]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},jr[Ln.C]=function(e,t,n){n.dispatchEvent(new Hr(t.payload.track))},jr);function li(){return(li=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ui,ci,pi,di,fi=function(e){return function(t){return function(n){var r,i;function a(){return n.apply(this,arguments)||this}i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var o=a.prototype;return o.notifyClick=function(t){this.context.notifyClick({name:e,payload:t})},o.notifyChange=function(t){this.context.notifyChange({name:e,payload:t})},o.notifyHoverChange=function(t){this.context.notifyHoverChange({name:e,payload:t})},o.render=function(){var e=this;return N(t,li({},this.props,{notifyHoverChange:function(t){return e.notifyHoverChange(t)},notifyChange:function(t){return e.notifyChange(t)},notifyClick:function(t){return e.notifyClick(t)}}))},a}(B)}},hi=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.destroy=function(){this._observer&&this._observer.disconnect(),this._observer=null,this._el=null},i.init=function(e){this._observer||(this._el=e,window.ResizeObserver?this._createNativeObserver():this._createIframeObserver(),this._el instanceof HTMLElement&&this._observer&&this._observer.observe(this._el))},i._createNativeObserver=function(){var e=this;this._observer=new window.ResizeObserver((function(t){t.forEach((function(){e._triggerResize()}))}))},i._createIframeObserver=function(){this._observer=new gi(this._triggerResize.bind(this))},i._triggerResize=function(){this.dispatchEvent(new Dr(Dr.Type.RESIZE))},r}(Rr),gi=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_observersStore",{}),this._onChangeCallback=e}var t=e.prototype;return t.observe=function(e){var t=this,n=this._createIframe(),r=e.getAttribute("id");this._observersStore[r]=n,e.appendChild(n),n.contentWindow.onresize=function(){return t._onChangeCallback()}},t.disconnect=function(){for(var e in this._observersStore){var t=document.getElementById(e),n=this._observersStore[e];n.onresize=null,t&&(t.removeChild(n),delete this._observersStore[t.getAttribute("id")])}},t._createIframe=function(){var e=document.createElement("iframe");return e.className="playkit-size-iframe",e},e}(),yi=function(e,t,n){var r;return void 0===n&&(n=!0),function(){for(var i=arguments.length,a=new Array(i),o=0;o<i;o++)a[o]=arguments[o];var s=void 0;n&&!r&&e.apply(s,a),clearTimeout(r),r=setTimeout((function(){r=null,n||e.apply(s,a)}),t)}};function vi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bi(){return(bi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var _i,Ei={TINY:"tiny",EXTRA_SMALL:"extrasmall",SMALL:"small",MEDIUM:"medium",LARGE:"large",EXTRA_LARGE:"extralarge"},ki=(ui=$t((function(e){return{targetId:e.config.targetId,forceTouchUI:e.config.forceTouchUI,hoverTimeout:e.config.hoverTimeout,metadataLoaded:e.engine.metadataLoaded,currentState:e.engine.playerState.currentState,playerClasses:e.shell.playerClasses,isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,isCasting:e.engine.isCasting,guiClientRect:e.shell.guiClientRect,playerHover:e.shell.playerHover,playerNav:e.shell.playerNav,seekbarDraggingActive:e.seekbar.draggingActive,seekbarHoverActive:e.seekbar.hoverActive,volumeHoverActive:e.volume.hover,adBreak:e.engine.adBreak,prePlayback:e.engine.prePlayback,smartContainerOpen:e.shell.smartContainerOpen,fullscreen:e.engine.fullscreen,fallbackToMutedAutoPlay:e.engine.fallbackToMutedAutoPlay,playlist:e.engine.playlist}}),ur(bi({},sr,Tr))),ci=jn("Shell"),pi=fi("Shell"),ui(di=Sr(di=Br(di=ci(di=pi(di=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return mi(vi(t=e.call.apply(e,[this].concat(r))||this),"onMouseOver",(function(){t.props.isMobile||t.state.nav&&(t.setState({nav:!1}),t.props.updatePlayerNavState(!1))})),mi(vi(t),"onMouseLeave",(function(e){Object.prototype.hasOwnProperty.call(e,"toElement")&&(t.props.isMobile||t.state.hover&&t._updatePlayerHover(!1))})),mi(vi(t),"onMouseMove",(function(){t.props.isMobile||t._updatePlayerHoverState()})),mi(vi(t),"onMouseUp",(function(){t.unMuteFallback(),t.props.notifyClick(),t._startHoverTimeout()})),mi(vi(t),"onTouchEnd",(function(e){t.props.prePlayback||(t.props.fallbackToMutedAutoPlay&&(t.props.player.muted=!1),t.state.hover||e.stopPropagation(),t._updatePlayerHoverState())})),mi(vi(t),"onKeyDown",(function(e){t.state.nav||e.keyCode!==Ln.TAB||(t.setState({nav:!0}),t.props.updatePlayerNavState(!0)),!t.state.nav||e.keyCode!==Ln.ENTER&&e.keyCode!==Ln.SPACE||(t.unMuteFallback(),e.srcElement.contains(t._playerRef)&&(e.preventDefault(),t.props.player.paused?t.props.player.play():t.props.player.pause()))})),mi(vi(t),"_onWindowResize",(function(){t._updatePlayerClientRect(),document.body&&t.props.updateDocumentWidth(document.body.clientWidth)})),mi(vi(t),"_updatePlayerClientRect",(function(){var e=document.getElementById(t.props.targetId);e&&t.props.updatePlayerClientRect(e.getBoundingClientRect())})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.unMuteFallback=function(){this.props.fallbackToMutedAutoPlay&&(this.props.player.muted=!1)},i.componentWillMount=function(){var e=this.props,t=e.player,n=e.forceTouchUI;this._environmentClasses=["playkit-"+t.env.os.name.replace(/ /g,"-"),"playkit-"+t.env.browser.name.replace(/ /g,"-")];var r=t.env,i=r.isIPadOS,a=r.isTablet,o=r.isMobile;this.props.updateIsMobile(i||a||o||n)},i.componentDidMount=function(){var e=this,t=this.props,n=t.player,r=t.eventManager;r.listen(window,"resize",yi(this._onWindowResize,100)),r.listen(document,"scroll",yi(this._updatePlayerClientRect,100)),this._playerResizeWatcher=new hi,this._playerResizeWatcher.init(document.getElementById(this.props.targetId)),r.listen(this._playerResizeWatcher,Dr.Type.RESIZE,yi(this._onWindowResize,100)),r.listen(n,n.Event.FIRST_PLAY,(function(){return e._onWindowResize()})),this._onWindowResize()},i.componentWillUnmount=function(){this._clearHoverTimeout(),this._playerResizeWatcher.destroy()},i._updatePlayerHoverState=function(){this.props.prePlayback||(this.state.hover||this._updatePlayerHover(!0),this._startHoverTimeout())},i._updatePlayerHover=function(e){this.props.updatePlayerHoverState(e),this.props.notifyHoverChange({hover:e}),this.setState({hover:e})},i._canEndHoverState=function(){return!this.props.seekbarDraggingActive&&!this.props.seekbarHoverActive&&!this.props.volumeHoverActive&&!this.props.smartContainerOpen&&(!this.props.player.paused||this.props.adBreak)},i._startHoverTimeout=function(){var e=this;this._clearHoverTimeout(),this.props.hoverTimeout&&(this.hoverTimeout=setTimeout((function(){e._canEndHoverState()&&e._updatePlayerHover(!1)}),this.props.hoverTimeout))},i._clearHoverTimeout=function(){this.hoverTimeout&&(clearTimeout(this.hoverTimeout),this.hoverTimeout=null)},i.componentDidUpdate=function(e){(this.state.hover!==this.props.playerHover||"playing"===this.props.currentState&&"paused"===e.currentState||!this.props.prePlayback&&e.prePlayback||!this.props.adBreak&&e.adBreak||this.props.adBreak&&!e.adBreak)&&(this.state.hover!==this.props.playerHover&&this.props.notifyHoverChange({hover:this.props.playerHover}),this._updatePlayerHoverState())},i.render=function(e){var t=this,n=[pr.a.player,pr.a.skinDefault].concat(this._environmentClasses).concat(e.playerClasses);return this.props.prePlayback&&n.push(pr.a.prePlayback),this.props.isCasting&&n.push("playkit-casting"),this.props.isMobile&&n.push(pr.a.touch),this.props.playerNav&&n.push(pr.a.nav),(this.props.playerHover||this.props.playerNav)&&n.push(pr.a.hover),this.props.metadataLoaded&&n.push(pr.a.metadataLoaded),this.props.adBreak&&n.push(pr.a.adBreak),this.props.metadataLoaded&&n.push(pr.a["state-"+this.props.currentState]),this.props.seekbarDraggingActive&&n.push(pr.a.hover),this.props.fullscreen&&n.push(pr.a.fullscreen),this.props.playlist&&n.push(pr.a.playlist),this.props.guiClientRect&&(this.props.guiClientRect.width<=280?(n.push(pr.a.sizeTy),this.props.updatePlayerSize(Ei.TINY)):this.props.guiClientRect.width<=380?(n.push(pr.a.sizeXs),this.props.updatePlayerSize(Ei.EXTRA_SMALL)):this.props.guiClientRect.width<=480?(n.push(pr.a.sizeSm),this.props.updatePlayerSize(Ei.SMALL)):this.props.guiClientRect.width<=768?(n.push(pr.a.sizeMd),this.props.updatePlayerSize(Ei.MEDIUM)):this.props.guiClientRect.width<=1024?(n.push(pr.a.sizeLg),this.props.updatePlayerSize(Ei.LARGE)):this.props.updatePlayerSize(Ei.EXTRA_LARGE),this.props.updateIsSmallSize([Ei.SMALL,Ei.EXTRA_SMALL].includes(this.props.playerSize))),n.push("notranslate"),N("div",{tabIndex:"0",ref:function(e){return t._playerRef=e},"aria-label":"Video Player",className:n=n.join(" "),onTouchEnd:this.onTouchEnd,onMouseUp:this.onMouseUp,onMouseOver:this.onMouseOver,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,onKeyDown:this.onKeyDown},e.children)},r}(B))||di)||di)||di)||di)||di);function Ti(){return(Ti=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ai(e){var t,n=e.sidePanelsSizes,r=e.sidePanelsModes,i=e.playerClientRect,a=e.isVideo,o=n[Zn.VERTICAL],s=i.width,l=Math.max(o.min,Math.min(o.max,s*o.ratio)),u=r[Jn.LEFT],c=r[Jn.RIGHT],p=s-(t=a?u===er.ALONGSIDE&&c===er.ALONGSIDE?2:1:u!==er.HIDDEN&&c!==er.HIDDEN?2:1)*l;return s<480&&(p=s,l=s),{verticalPanelWidth:l,videoWidth:p,verticalPanelCount:t}}function wi(e){var t,n=e.sidePanelsSizes,r=e.sidePanelsModes,i=e.playerClientRect,a=e.isVideo,o=n[Zn.HORIZONTAL],s=i.height,l=Math.max(o.min,Math.min(o.max,s*o.ratio)),u=r[Jn.TOP],c=r[Jn.BOTTOM],p=s-(t=a?u===er.ALONGSIDE&&c===er.ALONGSIDE?2:1:u!==er.HIDDEN&&c!==er.HIDDEN?2:1)*l;return i.width<480&&(p=s,l=s),{horizontalPanelHeight:l,videoHeight:p,horizontalPanelCount:t}}function Si(e){var t=e.sidePanelsModes,n=e.allowSidePanels,r={position:"absolute",left:0,right:0,top:0,bottom:0},i=n?t[Jn.LEFT]:er.HIDDEN,a=n?t[Jn.RIGHT]:er.HIDDEN,o=n?t[Jn.TOP]:er.HIDDEN,s=n?t[Jn.BOTTOM]:er.HIDDEN;if(e.playerClientRect.width>480){if(i===er.ALONGSIDE||a===er.ALONGSIDE){var l=Ai(Ti({},e,{isVideo:!0})),u=l.verticalPanelWidth,c=l.videoWidth;r.left=i===er.ALONGSIDE?u:0,r.right=a===er.ALONGSIDE?u:0,r.width=c,r.position="absolute"}if(o===er.ALONGSIDE||s===er.ALONGSIDE){var p=wi(Ti({},e,{isVideo:!0})),d=p.horizontalPanelHeight,f=p.videoHeight;r.top=o===er.ALONGSIDE?d:0,r.bottom=s===er.ALONGSIDE?d:0,r.height=f,r.position="absolute"}}return r}function Ci(e){var t=e.position,n=e.sidePanelsModes,r=n[Jn.LEFT],i=n[Jn.RIGHT],a=n[Jn.TOP],o=n[Jn.BOTTOM];if(-1!==[Jn.RIGHT,Jn.LEFT].indexOf(t)){var s={},l=Ai(e).verticalPanelWidth;return s.width=l,t===Jn.RIGHT?(i===er.HIDDEN?(s.right=-l,s.opacity=0):(s.right=0,s.opacity=1),s):(r===er.HIDDEN?(s.left=-l,s.opacity=0):(s.left=0,s.opacity=1),s)}var u={},c=wi(e).horizontalPanelHeight,p=Ai(e).verticalPanelWidth;return u.height=c,r!==er.HIDDEN&&(u.left=p),i!==er.HIDDEN&&(u.right=p),t===Jn.TOP?(a===er.HIDDEN?(u.top=-c,u.opacity=0):(u.top=0,u.opacity=1),u):(o===er.HIDDEN?(u.bottom=-c,u.opacity=0):(u.bottom=0,u.opacity=1),u)}function xi(){return(xi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ii(e){var t,n;return e.allowSidePanels?((t={})[Jn.TOP]=Ci(xi({},e,{position:Jn.TOP})),t[Jn.BOTTOM]=Ci(xi({},e,{position:Jn.BOTTOM})),t[Jn.RIGHT]=Ci(xi({},e,{position:Jn.RIGHT})),t[Jn.LEFT]=Ci(xi({},e,{position:Jn.LEFT})),t):((n={})[Jn.TOP]={},n[Jn.BOTTOM]={},n[Jn.RIGHT]={},n[Jn.LEFT]={},n)}var Pi,Di=$t((function(e){return{sidePanelsModes:e.shell.sidePanelsModes,sidePanelsSizes:e.shell.sidePanelsSizes,allowSidePanels:e.shell.presetSettings.allowSidePanels,playerClientRect:e.shell.playerClientRect}}),ur(sr))(_i=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e){var t=this.props,n=t.sidePanelsModes,r=t.sidePanelsSizes,i=t.allowSidePanels,a=t.playerClientRect,o=e.sidePanelsModes,s=e.sidePanelsSizes,l=e.allowSidePanels,u=e.playerClientRect;return!(n===o&&r===s&&i===l&&a===u)},i.componentDidUpdate=function(){var e={sidePanelsModes:this.props.sidePanelsModes,sidePanelsSizes:this.props.sidePanelsSizes,playerClientRect:this.props.playerClientRect,allowSidePanels:this.props.allowSidePanels},t=function(e){var t=e.sidePanelsModes,n=e.playerClientRect,r=e.allowSidePanels,i={position:"absolute",left:0,right:0,top:0,bottom:0},a=n.width,o=n.height,s=r?t[Jn.LEFT]:er.HIDDEN,l=r?t[Jn.RIGHT]:er.HIDDEN,u=r?t[Jn.TOP]:er.HIDDEN,c=r?t[Jn.BOTTOM]:er.HIDDEN;if(n.width>480){if(s!==er.HIDDEN||l!==er.HIDDEN){var p=Ai(e).verticalPanelWidth;s!==er.HIDDEN&&(i.left=p),l!==er.HIDDEN&&(i.right=p)}if(u!==er.HIDDEN||c!==er.HIDDEN){var d=wi(e).horizontalPanelHeight;u!==er.HIDDEN&&(i.top=d),c!==er.HIDDEN&&(i.bottom=d)}a=a-i.right-i.left,o=o-i.top-i.bottom}var f=n.left+(s!==er.HIDDEN?i.left:0),h=n.top+(u!==er.HIDDEN?i.top:0);return{style:i,rect:{x:f,y:h,width:a,height:o,top:h,right:n.right+(l!==er.HIDDEN?i.right:0),bottom:n.bottom+(c!==er.HIDDEN?i.bottom:0),left:f}}}(e),n=t.style,r=t.rect;this.props.updateLayoutStyles({gui:n,video:Si(e),sidePanels:Ii(e)}),this.props.updateGuiClientRect(r)},i.render=function(){return null},r}(B))||_i;function Ri(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Li=jn("PlayerAreaProvider")(Pi=$t((function(e){return{activePresetName:e.shell.activePresetName}}))(Pi=function(e){var t,n;function r(){var t;return Oi(Ri(t=e.call(this)||this),"_validateComponentData",(function(e){var n=e.container||e.area;return!!(e.get&&e.presets&&n)||(t.props.logger.warn("component data with label '"+(e.label||"")+"' is invalid (did you remember to set 'get', 'presets' and 'area'?)"),!1)})),Oi(Ri(t),"_addNewComponentAndUpdateListeners",(function(e){return t._addNewComponent(e,!0)})),Oi(Ri(t),"_addNewComponent",(function(e,n){var r=Object.assign({},e);if(r.container&&(r.area=r.area||r.container,delete r.container),!t._validateComponentData(r))return function(){};var i=r.area;return r.presets.forEach((function(e){if((t._componentsByPreset[e]||(t._componentsByPreset[e]=[])).push(r),n){var a=t._findListeners(i,e);t._emitListeners(a)}})),function(){t._removeNewComponent(r)}})),Oi(Ri(t),"_removeNewComponent",(function(e){t._validateComponentData(e)&&e.presets.forEach((function(n){var r=t._componentsByPreset[n]||[],i=r.indexOf(e);if(-1!==i){r.splice(i,1);var a=t._findListeners(e.area,e.presetName);t._emitListeners(a)}}))})),Oi(Ri(t),"_findListeners",(function(e,n){return e?t._listeners.filter((function(t){return(!n||t.presetName===n)&&t.areaName===e})):[]})),Oi(Ri(t),"_listen",(function(e,n,r){if(!e||!n||!r)return function(){};var i=t._findListeners(n,e);i&&i.length>0&&(t.props.logger.warn("Another component is already registered to updates for player area '"+n+"' in preset '"+e+"'. Unlisten to previous listener"),i.forEach((function(e){t._unlisten(e)})));var a={presetName:e,areaName:n,callback:r};return t._listeners.push(a),t._emitListeners([a]),function(){t._unlisten(a)}})),Oi(Ri(t),"_unlisten",(function(e){var n=t._listeners.indexOf(e);-1!==n&&t._listeners.splice(n,1)})),Oi(Ri(t),"_getAreaComponents",(function(e,n){if(!n||!e)return[];var r=t._componentsByPreset[e];return(r?r.filter((function(e){return e.area===n})):[])||[]})),t._listeners=[],t._componentsByPreset={},t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._initializePlayerComponents=function(){this.props.uiComponents&&this.props.uiComponents.length>0&&(this.props.uiComponents.forEach(this._addNewComponent),this._emitAllListeners())},i._emitListeners=function(e){var t=this,n=this.props.activePresetName;(e||[]).forEach((function(e){var r=e.presetName===n?t._getAreaComponents(n,e.areaName):[];try{e.callback(r)}catch(n){t.props.logger.error("Error occurred when handling player area "+e.areaName+" of preset "+e.presetName+".",n)}}))},i._emitAllListeners=function(){this._emitListeners(this._listeners)},i.componentDidMount=function(){this.props.setApi(this._addNewComponentAndUpdateListeners),this._initializePlayerComponents()},i.componentDidUpdate=function(e){e.activePresetName!==this.props.activePresetName&&this._emitAllListeners()},i.getChildContext=function(){return{playerAreaComponentsStore:{listen:this._listen,addNewComponent:this._addNewComponentAndUpdateListeners,getAreaComponents:this._getAreaComponents}}},i.render=function(e){return N(j,null,N(Di,null),e.children)},r}(B))||Pi)||Pi,Mi={allowSidePanels:!1,allowPlayerArea:!1},Ni=function(e){return function(t){var n;return $t(null,ur(sr))(n=function(n){var r,i;function a(){return n.apply(this,arguments)||this}i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var o=a.prototype;return o.componentDidMount=function(){var t=Object.assign({},Mi,e),n=t.allowSidePanels,r=t.allowPlayerArea;this.props.updatePresetSettings({allowSidePanels:n,allowPlayerArea:r})},o.shouldComponentUpdate=function(){return!1},o.render=function(e){return N(t,e)},a}(B))||n}};function Ui(){return(Ui=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Fi={UPDATE_SEEKBAR_DRAGGING_STATUS:"seekbar/UPDATE_SEEKBAR_DRAGGING_STATUS",UPDATE_SEEKBAR_HOVER_ACTIVE:"seekbar/UPDATE_SEEKBAR_HOVER_ACTIVE",UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE:"seekbar/UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE",UPDATE_SEEKBAR_CLIENT_RECT:"seekbar/UPDATE_SEEKBAR_CLIENT_RECT",UPDATE_HIDE_SEEKBAR_PREVIEW:"seekbar/UPDATE_HIDE_SEEKBAR_PREVIEW",UPDATE_HIDE_SEEKBAR_TIME_BUBBLE:"seekbar/UPDATE_HIDE_SEEKBAR_TIME_BUBBLE",UPDATE_CURRENT_TIME:"seekbar/UPDATE_CURRENT_TIME",UPDATE_VIRTUAL_TIME:"seekbar/UPDATE_VIRTUAL_TIME"},ji={currentTime:0,virtualTime:0,draggingActive:!1,hoverActive:!1,previewHoverActive:!1,clientRect:{x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0},hidePreview:!1,hideTimeBubble:!1},Bi=function(e,t){switch(void 0===e&&(e=ji),t.type){case Fi.UPDATE_SEEKBAR_DRAGGING_STATUS:return Ui({},e,{draggingActive:t.draggingActive});case Fi.UPDATE_SEEKBAR_HOVER_ACTIVE:return Ui({},e,{hoverActive:t.hoverActive});case Fi.UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE:return Ui({},e,{previewHoverActive:t.previewHoverActive});case Fi.UPDATE_SEEKBAR_CLIENT_RECT:return Ui({},e,{clientRect:t.clientRect});case Fi.UPDATE_HIDE_SEEKBAR_PREVIEW:return Ui({},e,{hidePreview:t.hidePreview});case Fi.UPDATE_HIDE_SEEKBAR_TIME_BUBBLE:return Ui({},e,{hideTimeBubble:t.hideTimeBubble});case Fi.UPDATE_CURRENT_TIME:return Ui({},e,{currentTime:t.currentTime});case Fi.UPDATE_VIRTUAL_TIME:return Ui({},e,{virtualTime:t.virtualTime});default:return e}},Vi={updateSeekbarDraggingStatus:function(e){return{type:Fi.UPDATE_SEEKBAR_DRAGGING_STATUS,draggingActive:e}},updateSeekbarHoverActive:function(e){return{type:Fi.UPDATE_SEEKBAR_HOVER_ACTIVE,hoverActive:e}},updateSeekbarPreviewHoverActive:function(e){return{type:Fi.UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE,previewHoverActive:e}},updateSeekbarClientRect:function(e){return{type:Fi.UPDATE_SEEKBAR_CLIENT_RECT,clientRect:e}},updateHideSeekbarPreview:function(e){return{type:Fi.UPDATE_HIDE_SEEKBAR_PREVIEW,hidePreview:e}},updateHideSeekbarTimeBubble:function(e){return{type:Fi.UPDATE_HIDE_SEEKBAR_TIME_BUBBLE,hideTimeBubble:e}},updateCurrentTime:function(e){return{type:Fi.UPDATE_CURRENT_TIME,currentTime:e}},updateVirtualTime:function(e){return{type:Fi.UPDATE_VIRTUAL_TIME,virtualTime:e}}};function Hi(){return(Hi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ki={UPDATE_VOLUME_DRAGGING_STATUS:"volume/UPDATE_VOLUME_DRAGGING_STATUS",UPDATE_HOVER:"volume/UPDATE_HOVER"},Gi={draggingActive:!1,hover:!1},zi=function(e,t){switch(void 0===e&&(e=Gi),t.type){case Ki.UPDATE_VOLUME_DRAGGING_STATUS:return Hi({},e,{draggingActive:t.draggingActive});case Ki.UPDATE_HOVER:return Hi({},e,{hover:t.hover});default:return e}},Wi={updateVolumeDraggingStatus:function(e){return{type:Ki.UPDATE_VOLUME_DRAGGING_STATUS,draggingActive:e}},updateVolumeHover:function(e){return{type:Ki.UPDATE_HOVER,hover:e}}};function Yi(){return(Yi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var qi={UPDATE_LOADING_SPINNER_STATE:"loading/UPDATE_LOADING_SPINNER_STATE"},Xi={show:!1},$i=function(e,t){switch(void 0===e&&(e=Xi),t.type){case gr.UPDATE:return dr("loading",e,t);case gr.UPDATE_COMPONENT:return fr("loading",e,t);case qi.UPDATE_LOADING_SPINNER_STATE:return Yi({},e,{show:t.show});default:return e}},Qi={updateLoadingSpinnerState:function(e){return{type:qi.UPDATE_LOADING_SPINNER_STATE,show:e}}};function Zi(){return(Zi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ji={UPDATE_CAPTIONS_STYLE:"cvaa/UPDATE_CAPTIONS_STYLE"},ea={style:"default"},ta=function(e,t){switch(void 0===e&&(e=ea),t.type){case Ji.UPDATE_CAPTIONS_STYLE:return Zi({},e,{style:t.style});default:return e}},na={updateCaptionsStyle:function(e){return{type:Ji.UPDATE_CAPTIONS_STYLE,style:e}}};function ra(){return(ra=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ia={UPDATE_QUALITY:"settings/UPDATE_QUALITY",UPDATE_SPEED:"settings/UPDATE_SPEED",UPDATE_AUDIO:"settings/UPDATE_AUDIO",UPDATE_ADVANCED_AUDIO_DESC:"settings/UPDATE_ADVANCED_AUDIO_DESC"},aa={quality:1,speed:2,advancedAudioDesc:!1},oa=function(e,t){switch(void 0===e&&(e=aa),t.type){case ia.UPDATE_QUALITY:return ra({},e,{quality:t.quality});case ia.UPDATE_SPEED:return ra({},e,{speed:t.speed});case ia.UPDATE_AUDIO:return ra({},e,{speed:t.audio});case ia.UPDATE_ADVANCED_AUDIO_DESC:return ra({},e,{advancedAudioDesc:t.isChecked});default:return e}},sa={updateQuality:function(e){return{type:ia.UPDATE_QUALITY,quality:e}},updateSpeed:function(e){return{type:ia.UPDATE_SPEED,speed:e}},updateAudio:function(e){return{type:ia.UPDATE_AUDIO,audio:e}},updateAdvancedAudioDesc:function(e){return{type:ia.UPDATE_ADVANCED_AUDIO_DESC,isChecked:e}}};function la(){return(la=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ua={UPDATE_ACTION_ICON:"overlay-action/UPDATE_ACTION_ICON"},ca={iconType:null},pa=function(e,t){switch(void 0===e&&(e=ca),t.type){case ua.UPDATE_ACTION_ICON:return la({},e,{iconType:t.iconType});default:return e}},da={updateOverlayActionIcon:function(e){return{type:ua.UPDATE_ACTION_ICON,iconType:e}}};function fa(){return(fa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ha={UPDATE_PLAYLIST_COUNTDOWN_CANCELED:"playlist-countdown/UPDATE_PLAYLIST_COUNTDOWN_CANCELED"},ga={countdownCanceled:!1},ya=function(e,t){switch(void 0===e&&(e=ga),t.type){case ha.UPDATE_PLAYLIST_COUNTDOWN_CANCELED:return fa({},e,{countdownCanceled:t.countdownCanceled});default:return e}},va={updatePlaylistCountdownCanceled:function(e){return{type:ha.UPDATE_PLAYLIST_COUNTDOWN_CANCELED,countdownCanceled:e}}};function ma(){return(ma=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ba,_a,Ea,ka={UPDATE_OVERLAY:"overlay/UPDATE_OVERLAY"},Ta={isOpen:!1},Aa=function(e,t){switch(void 0===e&&(e=Ta),t.type){case ka.UPDATE_OVERLAY:return ma({},e,{isOpen:t.isOpen});default:return e}},wa={updateOverlay:function(e){return{type:ka.UPDATE_OVERLAY,isOpen:e}}},Sa=function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];"function"==typeof e[i]&&(n[i]=e[i])}var a,o=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:xt.INIT}))throw new Error('Reducer "'+t+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:xt.PROBE_UNKNOWN_ACTION()}))throw new Error('Reducer "'+t+"\" returned undefined when probed with a random type. Don't try to handle "+xt.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')}))}(n)}catch(e){a=e}return function(e,t){if(void 0===e&&(e={}),a)throw a;for(var r=!1,i={},s=0;s<o.length;s++){var l=o[s],u=n[l],c=e[l],p=u(c,t);if(void 0===p){var d=Dt(l,t);throw new Error(d)}i[l]=p,r=r||p!==c}return(r=r||o.length!==Object.keys(e).length)?i:e}}({config:vr,engine:kr,shell:or,seekbar:Bi,volume:zi,loading:$i,cvaa:ta,settings:oa,overlayAction:pa,playlist:ya,overlay:Aa}),Ca=n(6);function xa(){return(xa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ia,Pa,Da=Vi.updateCurrentTime,Ra=(ba=$t(kr,ur(xa({},Tr,Qi,sr,{seekbarUpdateCurrentTime:Da}))),_a=jn("EngineConnector"),ba(Ea=Sr(Ea=Br(Ea=_a(Ea=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props,n=t.player,r=t.eventManager,i=n.Track;this.props.updatePrePlayback(!n.config.playback.autoplay),r.listen(n,n.Event.PLAYER_RESET,(function(t){e.props.updateCurrentTime(0),e.props.seekbarUpdateCurrentTime(0),t.payload.isChangeMedia||e.props.updateIsIdle(!0),e.props.updateIsPlaybackStarted(!1),e.props.updateDataLoadingStatus(!1)})),r.listen(n,n.Event.SOURCE_SELECTED,(function(){e.props.updateIsCastAvailable(n.isCastAvailable()),e.props.updateIsLive(n.isLive()),e.props.updateIsVr(n.isVr()),e.props.updateIsImg(n.isUntimedImg()),e.props.updateIsInPictureInPicture(n.isInPictureInPicture()),n.config.playback.autoplay?e.props.updateLoadingSpinnerState(!0):e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.CHANGE_SOURCE_STARTED,(function(){e.props.updatePrePlayback(!n.config.playback.autoplay&&!e.props.engine.isPlaybackStarted),e.props.updateIsChangingSource(!0),e.props.updateFallbackToMutedAutoPlay(!1),e.props.updateAdBreak(!1),e.props.updateAdIsPlaying(!1),e.props.updateIsPlaying(!1),e.props.updateIsEnded(!1),e.props.updateIsPlaybackEnded(!1),e.props.updateLastSeekPoint(0),e.props.updateIsPaused(!1),e.props.engine.isCasting&&e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.CHANGE_SOURCE_ENDED,(function(){e.props.updateIsChangingSource(!1),e.props.updatePlayerPoster(n.poster),e.props.updateIsIdle(!1)})),r.listen(n,n.Event.PLAYER_STATE_CHANGED,(function(t){e.props.updatePlayerState(t.payload.oldState.type,t.payload.newState.type)})),r.listen(n,n.Event.TIME_UPDATE,(function(){e.props.updateCurrentTime(n.currentTime)})),r.listen(n,n.Event.DURATION_CHANGE,(function(){e.props.updateDuration(n.isLive()?n.liveDuration:n.duration)})),r.listen(n,n.Event.LOADED_DATA,(function(){e.props.updateDuration(n.isLive()?n.liveDuration:n.duration),e.props.updatePictureInPictureSupport(n.isPictureInPictureSupported()),e.props.updateDataLoadingStatus(!0)})),r.listen(n,n.Event.LOADED_METADATA,(function(){e.props.updateMuted(n.muted),e.props.updateMetadataLoadingStatus(!0),e.props.updateIsLive(n.isLive()),e.props.updateIsDvr(n.isDvr()),e.props.updatePlayerPoster(n.poster)})),r.listen(n,n.Event.VOLUME_CHANGE,(function(){e.props.updateVolume(n.volume)})),r.listen(n,n.Event.MUTE_CHANGE,(function(){e.props.updateMuted(n.muted),e.props.engine.fallbackToMutedAutoPlay&&e.props.updateFallbackToMutedAutoPlay(n.muted)})),r.listen(n,n.Event.PLAYBACK_START,(function(){e.props.updatePrePlayback(!1),e.props.updateIsPlaybackStarted(!0),e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AUTOPLAY_FAILED,(function(){e.props.updatePrePlayback(!0)})),r.listen(n,n.Event.FIRST_PLAY,(function(){e.props.updatePrePlayback(!1)})),r.listen(n,n.Event.PLAY,(function(){e.props.updateIsPlaying(!0),e.props.updateIsEnded(!1),e.props.updateIsPaused(!1),e.props.updateIsPlaybackEnded(!1)})),r.listen(n,n.Event.PAUSE,(function(){e.props.updateIsPlaying(!1),e.props.updateIsPaused(!0)})),r.listen(n,n.Event.SEEKING,(function(){e.props.updateIsSeeking(!0)})),r.listen(n,n.Event.SEEKED,(function(){e.props.updateIsSeeking(!1),e.props.updateLastSeekPoint(n.currentTime),e.props.updateIsPlaybackEnded(!1)})),r.listen(n,n.Event.ENDED,(function(){e.props.updateIsEnded(!0),e.props.updateIsPlaying(!1),e.props.updateIsPaused(!0)})),r.listen(n,n.Event.PLAYBACK_ENDED,(function(){e.props.updateIsPlaybackEnded(!0)})),r.listen(n,n.Event.TRACKS_CHANGED,(function(){var t=n.getTracks(i.AUDIO),r=n.getTracks(i.VIDEO),a=n.getTracks(i.TEXT);e.props.updateAudioTracks(t),e.props.updateVideoTracks(r),e.props.updateTextTracks(a)})),r.listen(n,n.Event.TEXT_TRACK_CHANGED,(function(){var t=n.getTracks(i.TEXT);e.props.updateTextTracks(t)})),r.listen(n,n.Event.AUDIO_TRACK_CHANGED,(function(){var t=n.getTracks(i.AUDIO);e.props.updateAudioTracks(t)})),r.listen(n,n.Event.VIDEO_TRACK_CHANGED,(function(){var t=n.getTracks(i.VIDEO);e.props.updateVideoTracks(t)})),r.listen(n,n.Event.AD_BREAK_START,(function(){e.props.updateHasError(!1),e.props.updateAdBreak(!0)})),r.listen(n,n.Event.AD_BREAK_END,(function(){e.props.updateAdBreak(!1)})),r.listen(n,n.Event.ALL_ADS_COMPLETED,(function(){e.props.updateAdBreak(!1)})),r.listen(n,n.Event.AD_PROGRESS,(function(t){var n=t.payload.adProgress.currentTime,r=t.payload.adProgress.duration;e.props.updateAdBreakProgress(n,r)})),r.listen(n,n.Event.AD_COMPLETED,(function(){e.props.updateAdBreakCompleted()})),r.listen(n,n.Event.AD_STARTED,(function(t){var n=t.payload.ad;e.props.updateLoadingSpinnerState(!1),e.props.updateAdIsPlaying(!0),e.props.updatePrePlayback(!1),e.props.updateAdIsBumper(n.bumper),e.props.updateAdContentType(n.contentType)})),r.listen(n,n.Event.AD_RESUMED,(function(){e.props.updateAdIsPlaying(!0)})),r.listen(n,n.Event.AD_PAUSED,(function(){e.props.updateAdIsPlaying(!1)})),r.listen(n,n.Event.AD_ERROR,(function(t){t.payload.severity===n.Error.Severity.CRITICAL&&e.props.updateAdBreak(!1)})),r.listen(n,n.Event.FALLBACK_TO_MUTED_AUTOPLAY,(function(){e.props.updateFallbackToMutedAutoPlay(!0)})),r.listen(n,n.Event.AD_LOADED,(function(t){var n=t.payload.ad;e.props.updateAdIsLinear(n.linear),e.props.updateAdIsBumper(n.bumper),e.props.updateAdClickUrl(n.clickThroughUrl),e.props.updateAdSkipTimeOffset(n.skipOffset),e.props.updateAdSkippableState(n.skippable)})),r.listen(n,n.Event.VR_STEREO_MODE_CHANGED,(function(t){e.props.updateVrStereoMode(t.payload.mode)})),r.listen(n,n.Event.ERROR,(function(t){t.payload.severity===n.Error.Severity.CRITICAL&&(e.props.updateIsIdle(!1),e.props.updateHasError(!0))})),r.listen(n,n.Event.Cast.CAST_SESSION_STARTED,(function(t){var n=t.payload.session;e.props.updateIsCasting(!0),e.props.updateCastSession(n),n.resuming&&e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.Cast.CAST_SESSION_ENDED,(function(){e.props.updateIsCasting(!1),e.props.updateCastSession(null)})),r.listen(n,n.Event.Cast.CAST_AVAILABLE,(function(t){var n=t.payload.available;e.props.updateIsCastAvailable(n)})),r.listen(n,n.Event.Playlist.PLAYLIST_ITEM_CHANGED,(function(){e.props.updatePlaylist({next:n.playlist.next,prev:n.playlist.prev})})),r.listen(n,n.Event.ENTER_PICTURE_IN_PICTURE,(function(){e.props.updateIsInPictureInPicture(!0)})),r.listen(n,n.Event.LEAVE_PICTURE_IN_PICTURE,(function(){e.props.updateIsInPictureInPicture(!1)})),r.listen(n,n.Event.PRESENTATION_MODE_CHANGED,(function(){e.props.updateIsInPictureInPicture(n.isInPictureInPicture()),e.props.updateFullscreen(n.isFullscreen())})),r.listen(n,n.Event.ENTER_FULLSCREEN,(function(){e.props.updateFullscreen(!0)})),r.listen(n,n.Event.EXIT_FULLSCREEN,(function(){e.props.updateFullscreen(!1)}))},i.shouldComponentUpdate=function(){return!1},i.render=function(){return N("span",null)},r}(B))||Ea)||Ea)||Ea)||Ea);function Oa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function La(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ra.displayName="EngineConnector";var Ma=(Ia=$t((function(e){return{videoStyles:e.shell.layoutStyles.video,targetId:e.config.targetId}}),ur(sr)),Sr(Pa=Br(Pa=Ia(Pa=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return La(Oa(t=e.call.apply(e,[this].concat(r))||this),"_onVideoResize",(function(){var e=t.props.player.getVideoElement();e&&t.props.updateVideoClientRect(e.getBoundingClientRect())})),La(Oa(t),"_setRef",(function(e){t._videoResizeWatcher&&(t.props.eventManager.unlisten(t._videoResizeWatcher,Dr.Type.RESIZE,t._onVideoResize),t._videoResizeWatcher.destroy()),e&&(t._el=e),t._el?t._el.appendChild(t.props.player.getView()):t.props.updateVideoClientRect({x:0,y:0,width:0,height:0,top:0,right:0,bottom:0,left:0})})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e){return e.videoStyles!==this.props.videoStyles},i.componentDidMount=function(){var e=this,t=this.props,n=t.eventManager,r=t.player;n.listen(r,r.Event.SOURCE_SELECTED,(function(){return e._onVideoResize()}));var i=new hi;i.init(this._el),this._videoResizeWatcher=i,this.props.eventManager.listen(this._videoResizeWatcher,Dr.Type.RESIZE,this._onVideoResize)},i.componentWillUnmount=function(){this._videoResizeWatcher.destroy()},i.render=function(){var e=this.props,t=e.videoStyles;return N("div",{id:e.targetId+"-video",className:pr.a.videoPlayer,style:t,ref:this._setRef},N(qn,{name:"VideoContainer"}))},r}(B))||Pa)||Pa)||Pa);function Na(){return(Na=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Ua(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Fa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ja(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ba,Va=function(e){return function(t){var n,r;function i(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ja(Fa(e=t.call.apply(t,[this].concat(r))||this),"_accessibleChildren",[]),ja(Fa(e),"_isModal",!1),ja(Fa(e),"onKeyDown",(function(t){switch(t.keyCode){case Ln.ESC:e.props.onClose&&(e.props.onClose(),t.stopPropagation());break;case Ln.DOWN:case Ln.UP:if(document.activeElement&&!e._isModal){var n=e._accessibleChildren.indexOf(document.activeElement);n=(n+(t.keyCode==Ln.DOWN?1:-1)+e._accessibleChildren.length)%e._accessibleChildren.length,e._accessibleChildren[n].focus(),t.preventDefault(),t.stopPropagation()}break;case Ln.TAB:e._isModal?t.shiftKey||document.activeElement!==e._accessibleChildren[e._accessibleChildren.length-1]?t.shiftKey&&document.activeElement===e._accessibleChildren[0]&&(e._accessibleChildren[e._accessibleChildren.length-1].focus(),t.preventDefault(),t.stopPropagation()):(e._accessibleChildren[0].focus(),t.preventDefault(),t.stopPropagation()):(e._previouslyActiveElement=null,e.props.onClose&&e.props.onClose())}})),ja(Fa(e),"setDefaultFocusedElement",(function(t){t&&(e._defaultFocusedElement=t)})),ja(Fa(e),"addAccessibleChild",(function(t){t&&-1==e._accessibleChildren.indexOf(t)&&e._accessibleChildren.push(t)})),ja(Fa(e),"clearAccessibleChildren",(function(){e._accessibleChildren=[]})),ja(Fa(e),"focusOnDefault",(function(){var t=e._defaultFocusedElement||e._accessibleChildren.length&&e._accessibleChildren[0];t&&(e._previouslyActiveElement=document.activeElement,t.focus())})),ja(Fa(e),"setIsModel",(function(t){e.isModal=t})),e}r=t,(n=i).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r;var a,o,s=i.prototype;return s.componentDidMount=function(){this.focusOnDefault()},s.componentWillUnmount=function(){this._previouslyActiveElement&&this._previouslyActiveElement.focus()},s.render=function(t){return N(e,Na({},t,{setDefaultFocusedElement:this.setDefaultFocusedElement,focusOnDefault:this.focusOnDefault,addAccessibleChild:this.addAccessibleChild,clearAccessibleChildren:this.clearAccessibleChildren,handleKeyDown:this.onKeyDown,setIsModal:this.setIsModel}))},a=i,(o=[{key:"isModal",set:function(e){this._isModal=e}}])&&Ua(a.prototype,o),i}(B)};function Ha(e){var t=parseInt(e,10),n=Math.floor(t/3600),r=Math.floor((t-3600*n)/60),i=t-3600*n-60*r;return n<10&&(n="0"+n),r<10&&(r="0"+r),i<10&&(i="0"+i),("00"!==n?n+":":"")+r+":"+i}function Ka(e){for(var t=e.split(":"),n=0,r=1,i=t.length-1;i>=0;i--){var a=parseInt(t[i]);if(isNaN(a)||a>59){n=0;break}n+=a*r,r*=60}return n}function Ga(e){var t=parseInt(e);return t<10?"00:0"+e:t<=59?"00:"+e:Ha(t)}function za(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Wa,Ya,qa,Xa,$a,Qa=fi("ActivePreset")(Ba=$t((function(e){return{state:{shell:e.shell,engine:{adBreak:e.engine.adBreak,isLive:e.engine.isLive,hasError:e.engine.hasError,isIdle:e.engine.isIdle,isVr:e.engine.isVr,isImg:e.engine.isImg,playlist:e.engine.playlist}},config:e.config}}),ur(sr))(Ba=function(e){var t,n;function r(){var t;return t=e.call(this)||this,r.logger=Dn("ActivePreset"),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getMatchedUI=function(e,t){for(var n,r,i=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return za(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?za(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(r=i()).done;){var a=r.value;if(void 0===a.condition||a.condition(t)){n=a;break}}return n},i.render=function(e){var t,n=this.props,i=n.uis,a=n.state.shell.activePresetName;if(i.length>0){var o=(t=this.getMatchedUI(i,e.state))?t.template(e):i[i.length-1].template(e),s=o&&o.type.displayName||"";return a!==s&&(e.notifyChange({from:a,to:s}),e.updateActivePresetName(s),e.updatePresetSettings(null),r.logger.debug("update active preset to '"+a+"' and reset preset settings")),o}},r}(B))||Ba)||Ba,Za=$t((function(e){return{sidePanelsStyles:e.shell.layoutStyles.sidePanels,playerClientRect:e.shell.playerClientRect}}))(Wa=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e){var t=this.props,n=t.sidePanelsStyles,r=t.position,i=e.sidePanelsStyles,a=e.position;return n[r]!==i[a]},i.render=function(e){var t=e.position,n=e.sidePanelsStyles,r=-1!==[Jn.RIGHT,Jn.LEFT].indexOf(t)?"verticalSidePanel":"horizontalSidePanel",i=[pr.a.sidePanel,pr.a[r]],a="SidePanel"+(t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());return N("div",{style:n[t],className:i.join(" ")},N("div",{className:pr.a.sidePanelContent},N(qn,{name:a})))},r}(B))||Wa,Ja=$t((function(e){return{allowSidePanels:e.shell.presetSettings.allowSidePanels,allowPlayerArea:e.shell.presetSettings.allowPlayerArea,sidePanelsConfig:e.config.components.sidePanels}}),ur(sr))(Ya=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(){var e=this.props.sidePanelsConfig,t=e.verticalSizes,n=e.horizontalSizes;t&&this.props.updateSidePanelSize(Zn.VERTICAL,t),n&&this.props.updateSidePanelSize(Zn.HORIZONTAL,n)},i.render=function(){var e=this.props,t=e.uis,n=e.playerContainer,r=e.allowSidePanels,i=e.allowPlayerArea;return N(j,null,N(Qa,{uis:t,playerContainer:n}),r?N(j,null,N(Za,{position:Jn.RIGHT}),N(Za,{position:Jn.LEFT}),N(Za,{position:Jn.TOP}),N(Za,{position:Jn.BOTTOM})):void 0,i?N(qn,{name:"PlayerArea"}):void 0)},r}(B))||Ya,eo=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return N("div",{className:pr.a.spinner},Array(8).fill(0).map((function(e,t){return N("span",{key:t+1})})))},r}(B);eo.displayName="Spinner";var to,no=(qa=$t((function(e){return{show:e.loading.show,isMobile:e.shell.isMobile,adBreak:e.engine.adBreak,adIsLinear:e.engine.adIsLinear}}),ur(Qi)),Xa=jn("Loading"),qa($a=Sr($a=Br($a=Xa($a=function(e){var t,n;function r(){return e.call(this)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props,n=t.player,r=t.eventManager;r.listen(n,n.Event.PLAYER_STATE_CHANGED,(function(t){var r=n.State;t.payload.newState.type===r.IDLE||t.payload.newState.type===r.PLAYING||t.payload.newState.type===r.PAUSED?e.props.updateLoadingSpinnerState(!1):e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AD_BREAK_START,(function(){e.props.updateLoadingSpinnerState(!0)})),r.listen(n,n.Event.AD_PROGRESS,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.AD_STARTED,(function(){e.props.adIsLinear&&e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.ALL_ADS_COMPLETED,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.AUTOPLAY_FAILED,(function(){e.props.updateLoadingSpinnerState(!1)})),r.listen(n,n.Event.PLAYING,(function(){e.props.updateLoadingSpinnerState(!1)}))},i.render=function(e){if(e.show)return N("div",{className:[pr.a.loadingBackdrop,pr.a.show].join(" ")},N("div",{className:pr.a.spinnerContainer},N(qn,{name:nr.LoadingSpinner},N(eo,null))))},r}(B))||$a)||$a)||$a)||$a);function ro(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function io(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}no.displayName="Loading";var ao,oo=$t((function(e){return{guiStyles:e.shell.layoutStyles.gui}}))(to=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return io(ro(t=e.call.apply(e,[this].concat(r))||this),"_setRef",(function(e){e&&(t._ref=e,t.setState((function(e){return{render:!e.render}})))})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e,t){return e.guiStyles!==this.props.guiStyles||t.render!==this.state.render},i.render=function(){var e=this.props,t=e.guiStyles,n=W(e.children),r=n[0],i=n[1];return N("div",{ref:this._setRef,style:t,className:pr.a.guiArea},N("div",{style:{pointerEvents:"auto"}},N(qn,{name:"GuiArea"},r)),"function"==typeof i?i({containerRef:this._ref}):i)},r}(B))||to,so=Ni({allowSidePanels:!0,allowPlayerArea:!0})(ao=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N(oo,null,N(no,null))))},r}(B))||ao;function lo(e){return N(so,e)}function uo(){return(uo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function co(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function po(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}so.displayName="Idle";var fo,ho,go,yo,vo={Maximize:"maximize",Minimize:"minimize",Play:"play",Pause:"pause",VolumeBase:"volume-base",VolumeWaves:"volume-waves",VolumeWave:"volume-wave",VolumeMute:"volume-mute",Close:"close",Settings:"settings",Check:"check",CheckActive:"check-active",Language:"language",Quality:"quality",Captions:"captions",Speed:"speed",SpeedDown:"speed-down",SpeedUp:"speed-up",Audio:"audio",ArrowDown:"arrow-down",StartOver:"start-over",SeekEnd:"seek-end",Rewind:"rewind",Rewind10:"rewind10",Forward:"forward",Forward10:"forward10",vrStereo:"vr-stereo",vrStereoFull:"vr-stereo-full",Cast:"cast",CastBrand:"cast-brand",Next:"next",Prev:"prev",PictureInPictureStart:"picture-in-picture-start",PictureInPictureStop:"picture-in-picture-stop",ClosedCaptionsOn:"closed-captions-on",ClosedCaptionsOff:"closed-captions-off",AdvancedAudioDescription:"advanced-audio-description"},mo={qualityHd:pr.a.badgeIcon+" "+pr.a.iconQualityHd,qualityHdActive:pr.a.badgeIcon+" "+pr.a.iconQualityHdActive,quality4k:pr.a.badgeIcon+" "+pr.a.iconQuality4K,quality4kActive:pr.a.badgeIcon+" "+pr.a.iconQuality4KActive,quality8k:pr.a.badgeIcon+" "+pr.a.iconQuality8K,quality8kActive:pr.a.badgeIcon+" "+pr.a.iconQuality8KActive},bo={INACTIVE:0,ACTIVE:1},_o=function(e){var t,n;function r(t){var n;po(co(n=e.call(this,t)||this),"_defaultColor",pr.a.white),po(co(n),"_activeColor",pr.a.brandColor),po(co(n),"_className",""),po(co(n),"createDynamicIconClass",(function(e){var t=e.path,r=e.state,i=e.color,a=e.activeColor,o=e.width,s=e.height,l=e.viewBox,u=e.fillRule,c=n.getFillColor(r,i,a),p=n.getPathTag(t,c),d=n.getSVGUrl(p,o,s,l,u),f="."+n._className+" { background-image: "+d+"; }",h=document.getElementById(gf);h&&h.appendChild(document.createTextNode(f))})),po(co(n),"getSVGUrl",(function(e,t,n,r,i){void 0===t&&(t=36),void 0===n&&(n=36),void 0===r&&(r="0 0 1024 1024"),void 0===i&&(i="nonzero");for(var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="'+r+'" width="'+t+'" height="'+n+'" fill-rule="'+i+'">'+e+"</svg>",o=[['"',"'"],["%","%25"],["&","%26"],["#","%23"],["{","%7B"],["}","%7D"],["<","%3C"],[">","%3E"]],s=Math.ceil(a.length/2e3),l=0,u="",c=0;c<s;c++){for(var p=a.slice(l,l+2e3-1),d=0;d<o.length;d++)p=p.split(o[d][0]).join(o[d][1]);u=""+u+p,l+=2e3}return'url("data:image/svg+xml,'+u+'")'})),po(co(n),"getFillColor",(function(e,t,r){return e===bo.ACTIVE?r||n._activeColor:t||n._defaultColor})),po(co(n),"getPathTag",(function(e,t){return Array.isArray(e)||(e=[e]),e.map((function(e){var n="string"==typeof e?{d:e,fill:t}:uo({},e,{fill:t});return"<path "+Object.keys(n).map((function(e){return e+'="'+n[e]+'"'})).join(" ")+" />"})).join(" ")}));var r=t.path,i=t.id;if(r&&i){n._className="playkit-icon-"+i;var a=Array.from(document.styleSheets).find((function(e){return e.ownerNode.id===gf}));a&&Array.from(a.rules).find((function(e){return e.selectorText==="."+n._className}))||n.createDynamicIconClass(t)}return n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUpdate=function(e){this._className&&this.props.state!==e.state&&this.createDynamicIconClass(e)},i.render=function(e){if(this._className)return N("i",{className:[pr.a.icon,this._className].join(" ")});switch(e.type){case vo.Maximize:return N("i",{className:[pr.a.icon,pr.a.iconMaximize].join(" ")});case vo.Minimize:return N("i",{className:[pr.a.icon,pr.a.iconMinimize].join(" ")});case vo.Play:return N("i",{className:[pr.a.icon,pr.a.iconPlay].join(" ")});case vo.Pause:return N("i",{className:[pr.a.icon,pr.a.iconPause].join(" ")});case vo.VolumeBase:return N("i",{className:[pr.a.icon,pr.a.iconVolumeBase].join(" ")});case vo.VolumeWaves:return N("i",{className:[pr.a.icon,pr.a.iconVolumeWaves].join(" ")});case vo.VolumeWave:return N("i",{className:[pr.a.icon,pr.a.iconVolumeWave].join(" ")});case vo.VolumeMute:return N("i",{className:[pr.a.icon,pr.a.iconVolumeMute].join(" ")});case vo.Close:return N("i",{className:[pr.a.icon,pr.a.iconClose].join(" ")});case vo.Settings:return N("i",{className:[pr.a.icon,pr.a.iconSettings].join(" ")});case vo.Check:return N("i",{className:[pr.a.icon,pr.a.iconCheck].join(" ")});case vo.CheckActive:return N("i",{className:[pr.a.icon,pr.a.iconCheckActive].join(" ")});case vo.Language:return N("i",{className:[pr.a.icon,pr.a.iconLanguage].join(" ")});case vo.Quality:return N("i",{className:[pr.a.icon,pr.a.iconQuality].join(" ")});case vo.Captions:return N("i",{className:[pr.a.icon,pr.a.iconCaptions].join(" ")});case vo.Speed:return N("i",{className:[pr.a.icon,pr.a.iconSpeed].join(" ")});case vo.SpeedDown:return N("i",{className:[pr.a.icon,pr.a.iconSpeedDown].join(" ")});case vo.SpeedUp:return N("i",{className:[pr.a.icon,pr.a.iconSpeedUp].join(" ")});case vo.Audio:return N("i",{className:[pr.a.icon,pr.a.iconAudio].join(" ")});case vo.ArrowDown:return N("i",{className:[pr.a.icon,pr.a.iconArrowDown].join(" ")});case vo.StartOver:return N("i",{className:[pr.a.icon,pr.a.iconStartOver].join(" ")});case vo.SeekEnd:return N("i",{className:[pr.a.icon,pr.a.iconSeekEnd].join(" ")});case vo.Rewind:return N("i",{className:[pr.a.icon,pr.a.iconRewind].join(" ")});case vo.Rewind10:return N("i",{className:[pr.a.icon,pr.a.iconRewind10].join(" ")});case vo.Forward:return N("i",{className:[pr.a.icon,pr.a.iconForward].join(" ")});case vo.Forward10:return N("i",{className:[pr.a.icon,pr.a.iconForward10].join(" ")});case vo.vrStereo:return N("i",{className:[pr.a.icon,pr.a.iconVrStereo].join(" ")});case vo.vrStereoFull:return N("i",{className:[pr.a.icon,pr.a.iconVrStereoFull].join(" ")});case vo.Cast:return N("i",{className:[pr.a.icon,pr.a.iconChromecast].join(" ")});case vo.CastBrand:return N("i",{className:[pr.a.icon,pr.a.iconChromecastBrand].join(" ")});case vo.Next:return N("i",{className:[pr.a.icon,pr.a.iconNext].join(" ")});case vo.Prev:return N("i",{className:[pr.a.icon,pr.a.iconPrev].join(" ")});case vo.PictureInPictureStart:return N("i",{className:[pr.a.icon,pr.a.iconPictureInPictureStart].join(" ")});case vo.PictureInPictureStop:return N("i",{className:[pr.a.icon,pr.a.iconPictureInPictureStop].join(" ")});case vo.ClosedCaptionsOn:return N("i",{className:[pr.a.icon,pr.a.iconClosedCaptionsOn].join(" ")});case vo.ClosedCaptionsOff:return N("i",{className:[pr.a.icon,pr.a.iconClosedCaptionsOff].join(" ")});case vo.AdvancedAudioDescription:return N("i",{className:[pr.a.icon,pr.a.iconAdvancedAudioDescription].join(" ")})}},r}(B),Eo=_o,ko=function(e){return e.adBreak&&e.adIsPlaying||!e.adBreak&&e.isPlaying};function To(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ao(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wo(){return(wo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var So,Co,xo,Io=(fo=$t((function(e){return{isPlayingAdOrPlayback:ko(e.engine),iconType:e.overlayAction.iconType,playerHover:e.shell.playerHover,isMobile:e.shell.isMobile,guiStyles:e.shell.layoutStyles.gui,isSmartContainerOpen:e.shell.smartContainerOpen,fullscreenConfig:e.config.components.fullscreen,seekbarDraggingActive:e.seekbar.draggingActive}}),ur(wo({},da,sr))),ho=jn("OverlayAction"),go=fi("OverlayAction"),fo(yo=Sr(yo=ho(yo=go(yo=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ao(To(t=e.call.apply(e,[this].concat(r))||this),"_iconTimeout",null),Ao(To(t),"_pointerDownPosX",NaN),Ao(To(t),"_pointerDownPosY",NaN),Ao(To(t),"_firstClickTime",0),Ao(To(t),"_clickTimeout",null),Ao(To(t),"togglePlayPause",(function(){t.props.isPlayingAdOrPlayback?(t.props.player.pause(),t.props.updateOverlayActionIcon(vo.Pause)):(t.props.player.play(),t.props.updateOverlayActionIcon(vo.Play)),t.props.updatePlayerHoverState(!0),t.props.notifyClick({type:"PlayPause"})})),Ao(To(t),"onOverlayPointerDown",(function(e){t._pointerDownPosX=e.clientX||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientX,t._pointerDownPosY=e.clientY||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientY})),Ao(To(t),"onOverlayMouseUp",(function(e){t.isDragging(e)||t.overlayClick()})),Ao(To(t),"onOverlayTouchEnd",(function(e){e.preventDefault(),t.props.playerHover&&!t.isDragging(e)&&t.togglePlayPause()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUnmount=function(){this.cancelClickTimeout(),this.cancelIconTimeout()},i.toggleFullscreen=function(){this.props.player.isFullscreen()?(this.props.logger.debug("Exit fullscreen"),this.props.player.exitFullscreen()):(this.props.logger.debug("Enter fullscreen"),this.props.player.enterFullscreen()),this.props.notifyClick({type:"Fullscreen"})},i.isDragging=function(e){var t=e.clientX||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientX,n=e.clientY||e.changedTouches&&e.changedTouches[0]&&e.changedTouches[0].clientY;return this.props.seekbarDraggingActive||Math.abs(t-this._pointerDownPosX)>5||Math.abs(n-this._pointerDownPosY)>5},i.overlayClick=function(){var e=this;if(!this.props.isSmartContainerOpen){if(!this.props.fullscreenConfig.disableDoubleClick){var t=Date.now();if(t-this._firstClickTime<200)return this.cancelClickTimeout(),void this.toggleFullscreen();if(t-this._firstClickTime<500)return this.cancelClickTimeout(),this.togglePlayPause(),this.toggleFullscreen(),void(this._firstClickTime=0);this._firstClickTime=t}this._clickTimeout=setTimeout((function(){e._clickTimeout=null,e.togglePlayPause()}),200)}},i.cancelClickTimeout=function(){this._clickTimeout&&(clearTimeout(this._clickTimeout),this._clickTimeout=null)},i.cancelIconTimeout=function(){this._iconTimeout&&(clearTimeout(this._iconTimeout),this._iconTimeout=null)},i.shouldComponentUpdate=function(e){return e.iconType&&this.toggleOverlayActionIcon(e.iconType),!0},i.toggleOverlayActionIcon=function(e){var t=this,n=function(){t.setState({animation:!0,iconType:e},(function(){t._iconTimeout=setTimeout((function(){t._iconTimeout=null,t.setState({animation:!1})}),300)}))};null!==this._iconTimeout?(this.cancelIconTimeout(),this.setState({animation:!1},(function(){t.forceUpdate(),n()}))):n()},i.render=function(){return N("div",{style:this.props.guiStyles,className:pr.a.overlayAction+" "+(this.state.animation?pr.a.in:""),onMouseDown:this.onOverlayPointerDown,onTouchStart:this.onOverlayPointerDown,onMouseUp:this.onOverlayMouseUp,onTouchEnd:this.onOverlayTouchEnd},this.state.animation?this.renderIcons():void 0)},i.renderIcons=function(){return Array.isArray(this.state.iconType)?this.state.iconType.map((function(e,t){return N(Eo,{key:t,type:e})})):N(Eo,{type:this.state.iconType})},i.componentDidUpdate=function(){this.state.animation&&this.props.updateOverlayActionIcon(null)},r}(B))||yo)||yo)||yo)||yo);function Po(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Do(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Io.displayName="OverlayAction";var Ro={Top:"top",Bottom:"bottom",TopRight:"top-right",TopLeft:"top-left",BottomRight:"bottom-right",BottomLeft:"bottom-left",Left:"left",Right:"right"},Oo=$t((function(e){return{playerClientRect:e.shell.playerClientRect,guiClientRect:e.shell.guiClientRect,isMobile:e.shell.isMobile}}))(So=Br((xo=Co=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Do(Po(t=e.call.apply(e,[this].concat(r))||this),"_hoverTimeout",null),Do(Po(t),"lastAlternativeTypeIndex",-1),Do(Po(t),"showTooltip",(function(){t.setState({showTooltip:!0})})),Do(Po(t),"hideTooltip",(function(){t.setState({showTooltip:!1})})),Do(Po(t),"handleFocusOnChildren",(function(){var e=t.props.children.props.onFocus;t.showTooltip(),e&&e()})),Do(Po(t),"handleBlurOnChildren",(function(){var e=t.props.children.props.onBlur;t.hideTooltip(),e&&e()})),Do(Po(t),"onMouseOver",(function(){t._clearHoverTimeout(),t._hoverTimeout=setTimeout((function(){t.showTooltip()}),750)})),Do(Po(t),"onMouseLeave",(function(){t.hideTooltip(),t._clearHoverTimeout()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._clearHoverTimeout=function(){this._hoverTimeout&&(clearTimeout(this._hoverTimeout),this._hoverTimeout=null)},i.getAlternateType=function(){var e=this;return Object.values(Ro).find((function(t,n){return n>e.lastAlternativeTypeIndex&&t!=e.props.type&&(e.lastAlternativeTypeIndex=n,!0)}))},i.isToolTipInBoundaries=function(){var e=this.textElement.getBoundingClientRect(),t=this.props.playerClientRect;return e.top>t.top+5&&e.bottom<t.bottom-5&&e.right<t.right-5&&e.left>t.left+5},i.componentWillMount=function(){this.setState({valid:!1,type:this.props.type})},i.componentDidMount=function(){var e=this;this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)}))},i.handleClickOutside=function(e){var t;!(null==(t=this.tooltipElement)?void 0:t.contains(e.target))&&this.state.showTooltip&&this.hideTooltip()},i.componentDidUpdate=function(e){if(this.props.guiClientRect!==e.guiClientRect)this.lastAlternativeTypeIndex=-1,this.setState({valid:!1,type:this.props.type});else if(this.state.showTooltip)if(this.isToolTipInBoundaries())this.state.valid||this.setState({valid:!0});else{var t=this.getAlternateType();t&&this.setState({valid:!1,type:t})}},i.componentWillUnmount=function(){this._clearHoverTimeout()},i.render=function(e){var t=this,n=[pr.a.tooltipLabel,pr.a["tooltip-"+this.state.type]];if(this.state.showTooltip&&this.state.valid?n.push(pr.a.show):n.push(pr.a.hide),e.isMobile)return W(e.children)[0];var r=ie(e.children,{onFocus:this.handleFocusOnChildren,onBlur:this.handleBlurOnChildren});return N("div",{className:pr.a.tooltip,onMouseOver:this.onMouseOver,onMouseLeave:this.onMouseLeave,ref:function(e){return e?t.tooltipElement=e:void 0}},r,N("span",{style:{maxWidth:e.maxWidth},ref:function(e){return e?t.textElement=e:void 0},className:n.join(" ")},e.label))},r}(B),Do(Co,"defaultProps",{type:Ro.Top,maxWidth:"240px"}),So=xo))||So)||So;function Lo(){return(Lo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Mo,No,Uo,Fo,jo,Bo=Fe((function(e,t){return N("button",Lo({type:"button",ref:t},e))}));function Vo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ho(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Bo.displayName="Button";var Ko=(Mo=$t((function(e){return{prePlayback:e.engine.prePlayback,isPlaybackEnded:e.engine.isPlaybackEnded,playlist:e.engine.playlist,loading:e.loading.show}}),ur(Qi)),No=jn("PrePlaybackPlayOverlay"),Uo=fi("PrePlaybackPlayOverlay"),Fo=An({startOverText:"controls.startOver",playText:"controls.play"}),Mo(jo=Sr(jo=No(jo=Uo(jo=Fo(jo=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Ho(Vo(t=e.call.apply(e,[this].concat(r))||this),"handleClick",(function(){t.props.player.getView().focus(),t.props.playlist&&t.props.isPlaybackEnded?t.props.player.playlist.playNext():t.props.player.play(),t.props.notifyClick()})),Ho(Vo(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.handleClick()})),Ho(Vo(t),"onMouseOver",(function(e){e.stopPropagation()})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=e.isPlaybackEnded&&!e.player.config.playback.loop&&!(e.playlist&&e.playlist.next);if((e.prePlayback||t)&&!e.loading){var n=e.isPlaybackEnded?e.startOverText:e.playText;return N("div",{className:pr.a.prePlaybackPlayOverlay,onMouseOver:this.onMouseOver,onClick:this.handleClick},N(Bo,{className:pr.a.prePlaybackPlayButton,tabIndex:"0","aria-label":n,onKeyDown:this.onKeyDown},N(Oo,{label:n},e.isPlaybackEnded?N(Eo,{type:vo.StartOver}):N(Eo,{type:vo.Play}))))}},r}(B))||jo)||jo)||jo)||jo)||jo);function Go(){return(Go=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function zo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ko.displayName="PrePlaybackPlayOverlay";var Yo=function(e){return function(t){return Br(function(n){var r,i;function a(){for(var t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Wo(zo(t=n.call.apply(n,[this].concat(i))||this),"ref",{current:null}),Wo(zo(t),"animate",(function(){t.ref.current&&(t.ref.current.classList.add(e),t.props.eventManager.listenOnce(t.ref.current,"animationend",(function(){t.ref.current.classList.remove(e)})))})),t}return i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,a.prototype.render=function(){return N(t,Go({},this.props,{innerRef:this.ref,animate:this.animate}))},a}(B))}};function qo(){return(qo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Xo,$o,Qo,Zo,Jo,es,ts=Fe((function(e,t){var n=e.className,r=e.children,i=e.name,a=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,["className","children","name"]),o=[pr.a.controlButtonContainer,"playkit-control-"+ns(i)];if(n){var s=Array.isArray(n)?n:[n];o=o.concat(s)}return N("div",qo({className:o.join(" "),ref:t},a),r)})),ns=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()};function rs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function is(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var as,os,ss,ls,us,cs,ps=(Xo=$t((function(e){return{isDvr:e.engine.isDvr,isLive:e.engine.isLive}})),$o=jn("Rewind"),Qo=fi("Rewind"),Zo=Yo(pr.a.rotate),Jo=An({rewindText:"controls.rewind"}),Xo(es=Sr(es=$o(es=Qo(es=Zo(es=Jo(es=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return is(rs(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){var e,n=t.props.player;t.props.animate();var r=t.props.step||10,i=n.currentTime,a=n.isLive()?n.getStartTimeOfDvrWindow():0;n.currentTime-r<a?t.props.isDvr||(e=a):e=n.currentTime-r,n.currentTime=e,t.props.notifyClick({from:i,to:e})})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return e.isLive&&!e.isDvr?void 0:N(ts,{name:"Rewind",className:pr.a.noIdleControl},N(Oo,{label:this.props.rewindText},N(Bo,{tabIndex:"0","aria-label":this.props.rewindText,className:""+pr.a.controlButton,ref:this.props.innerRef,onClick:this.onClick},N(Eo,{type:e.step&&10!==e.step?vo.Rewind:vo.Rewind10}))))},r}(B))||es)||es)||es)||es)||es)||es);function ds(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ps.displayName="Rewind";var hs,gs,ys,vs,ms=(as=$t((function(e){return{isDvr:e.engine.isDvr,isLive:e.engine.isLive}})),os=jn("Forward"),ss=fi("Forward"),ls=Yo(pr.a.reverseRotate),us=An({forwardText:"controls.forward"}),as(cs=Sr(cs=os(cs=ss(cs=ls(cs=us(cs=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return fs(ds(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){var e,n=t.props.player;t.props.animate();var r=t.props.step||10,i=n.currentTime,a=n.isLive()?n.liveDuration:n.duration;n.currentTime+r>a?n.isOnLiveEdge()||(e=a):e=n.currentTime+r,n.currentTime=e,t.props.notifyClick({from:i,to:e})})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return e.isLive&&!e.isDvr?void 0:N(ts,{name:"Forward",className:pr.a.noIdleControl},N(Oo,{label:this.props.forwardText},N(Bo,{tabIndex:"0","aria-label":this.props.forwardText,className:""+pr.a.controlButton,ref:this.props.innerRef,onClick:this.onClick},N(Eo,{type:e.step&&10!==e.step?vo.Forward:vo.Forward10}))))},r}(B))||cs)||cs)||cs)||cs)||cs)||cs);function bs(){return(bs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function _s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Es(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ms.displayName="Forward";var ks,Ts,As,ws={preventDefault:!1,payload:null},Ss=(hs=$t((function(e){return{isPlayingAdOrPlayback:ko(e.engine),playerNav:e.shell.playerNav,textTracks:e.engine.textTracks,overlayOpen:e.overlay.isOpen}}),ur(Object.assign({},sr,da))),gs=jn("Keyboard"),ys=fi("Keyboard"),hs(vs=Sr(vs=gs(vs=ys(vs=function(e){var t,n;function r(t){var n,r;Es(_s(r=e.call(this)||this),"_lastActiveTextLanguage",""),Es(_s(r),"_hoverTimeout",null),Es(_s(r),"keyboardHandlers",((n={})[Ln.SPACE]=function(){return r.props.isPlayingAdOrPlayback?(r.props.player.pause(),r.props.updateOverlayActionIcon(vo.Pause)):(r.props.player.play(),r.props.updateOverlayActionIcon(vo.Play)),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:!0}},n[Ln.UP]=function(){var e=(Math.round(100*r.props.player.volume)+5)/100;return e=e>1?1:e,r.props.logger.debug("Changing volume. "+r.props.player.volume+" => "+e),r.props.player.muted&&(r.props.player.muted=!1),r.props.player.volume=e,r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]),{preventDefault:!0,payload:{volume:r.props.player.volume}}},n[Ln.DOWN]=function(){var e=(Math.round(100*r.props.player.volume)-5)/100;return e=e<0?0:e,r.props.logger.debug("Changing volume. "+r.props.player.volume+" => "+e),r.props.player.volume=e,0===e?(r.props.player.muted=!0,r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute])):r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWave]),{preventDefault:!0,payload:{volume:r.props.player.volume}}},n[Ln.F]=function(){return r.props.player.isFullscreen()?{preventDefault:!0,payload:null}:(r.props.logger.debug("Enter fullscreen"),r.props.player.enterFullscreen(),{preventDefault:!0,payload:!0})},n[Ln.P]=function(){return r.props.player.isInPictureInPicture()?(r.props.logger.debug("Exit Picture In Picture"),r.props.player.exitPictureInPicture()):(r.props.logger.debug("Enter Picture In Picture"),r.props.player.enterPictureInPicture()),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:!0}},n[Ln.ESC]=function(){return r.props.player.isFullscreen()?(r.props.logger.debug("Exit fullscreen"),r.props.player.exitFullscreen(),{preventDefault:!0,payload:!0}):{preventDefault:!0,payload:null}},n[Ln.LEFT]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime-5,t=r.props.player.currentTime,n=e>0?e:0;return r.props.logger.debug("Seek. "+t+" => "+n),r.props.player.currentTime=n,r.props.updateOverlayActionIcon(vo.Rewind),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:n}}}return{preventDefault:!0,payload:null}},n[Ln.RIGHT]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime+5,t=r.props.player.currentTime,n=e>r.props.player.duration?r.props.player.duration:e;return r.props.logger.debug("Seek. "+t+" => "+n),r.props.player.currentTime=e>r.props.player.duration?r.props.player.duration:e,r.props.updateOverlayActionIcon(vo.Forward),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:n}}}return{preventDefault:!0,payload:null}},n[Ln.HOME]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime;return r.props.logger.debug("Seek. "+e+" => 0"),r.props.player.currentTime=0,r.props.updateOverlayActionIcon(vo.StartOver),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:0}}}return{preventDefault:!0,payload:null}},n[Ln.END]=function(){if((!r.props.player.ads||!r.props.player.ads.isAdBreak())&&(!r.props.player.isLive()||r.props.player.isDvr())){var e=r.props.player.currentTime,t=r.props.player.duration;return r.props.logger.debug("Seek. "+e+" => "+t),r.props.player.currentTime=t,r.props.updateOverlayActionIcon(vo.SeekEnd),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:t}}}return{preventDefault:!0,payload:null}},n[Ln.M]=function(){return r.props.logger.debug(r.props.player.muted?"Umnute":"Mute"),r.props.player.muted=!r.props.player.muted,r.props.player.muted?r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute]):r.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]),{preventDefault:!0,payload:!0}},n[Ln.SEMI_COLON]=function(e){return e.shiftKey?r.props.player.playbackRate!==r.props.player.defaultPlaybackRate?(r.props.logger.debug("Changing playback rate. "+r.props.player.playbackRate+" => "+r.props.player.defaultPlaybackRate),r.props.player.playbackRate=r.props.player.defaultPlaybackRate,r.props.updateOverlayActionIcon(vo.Speed),{preventDefault:!0,payload:{speed:r.props.player.defaultPlaybackRate}}):{preventDefault:!0,payload:null}:ws},n[Ln.PERIOD]=function(e){if(e.shiftKey){var t=r.props.player.playbackRate,n=r.props.player.playbackRates.indexOf(t);return n<r.props.player.playbackRates.length-1?(r.props.logger.debug("Changing playback rate. "+t+" => "+r.props.player.playbackRates[n+1]),r.props.player.playbackRate=r.props.player.playbackRates[n+1],r.props.updateOverlayActionIcon(vo.SpeedUp),{preventDefault:!0,payload:{speed:r.props.player.playbackRates[n+1]}}):{preventDefault:!0,payload:null}}return ws},n[Ln.COMMA]=function(e){if(e.shiftKey){var t=r.props.player.playbackRate,n=r.props.player.playbackRates.indexOf(t);return n>0?(r.props.logger.debug("Changing playback rate. "+t+" => "+r.props.player.playbackRates[n-1]),r.props.player.playbackRate=r.props.player.playbackRates[n-1],r.props.updateOverlayActionIcon(vo.SpeedDown),{preventDefault:!0,payload:{speed:r.props.player.playbackRates[n-1]}}):{preventDefault:!0,payload:null}}return ws},n[Ln.C]=function(e){var t=r.props.player.getActiveTracks().text;if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return ws;if(t){if("off"===t.language&&r._lastActiveTextLanguage){r.props.logger.debug("Changing text track to language",r._lastActiveTextLanguage);var n=r.props.player.getTracks("text").find((function(e){return e.language===r._lastActiveTextLanguage}));return r.props.player.selectTrack(n),{preventDefault:!0,payload:{track:n}}}"off"===t.language||r._lastActiveTextLanguage||(r.props.logger.debug("Hiding text track"),r._lastActiveTextLanguage=t.language,r.props.player.hideTextTrack())}return{preventDefault:!0,payload:null}},n));var i=document.getElementById(t.config.targetId);return i?(i.onkeydown=function(e){var t=e.target instanceof Node&&e.target.nodeName||"";if(-1===["INPUT","SELECT","TEXTAREA"].indexOf(t)&&!r.props.overlayOpen&&!r.props.playerNav&&"function"==typeof r.keyboardHandlers[e.keyCode]){r.props.logger.debug("KeyDown -> keyName: "+function(e){for(var t in Ln)if(Ln[t]===e)return t;return"NOT_FOUND"}(e.keyCode)+", shiftKey: "+e.shiftKey.toString());var n=r.keyboardHandlers[e.keyCode](e),i=n.preventDefault,a=n.payload;i&&e.preventDefault(),a&&r.props.notifyClick(bs({key:e.keyCode},a))}},r):_s(r)}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.componentWillReceiveProps=function(e){var t=this.props.textTracks.find((function(e){return e.active})),n=e.textTracks.find((function(e){return e.active}));t&&"off"!==t.language&&n&&"off"===n.language?this._lastActiveTextLanguage=t.language:n&&"off"!==n.language&&(this._lastActiveTextLanguage="")},r}(B))||vs)||vs)||vs)||vs);function Cs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Is=["keydown","keyup"],Ps=(ks=$t((function(e){return{playerNav:e.shell.playerNav,overlayOpen:e.overlay.isOpen}})),Ts=jn("KEYBOARD_PROVIDER"),ks(As=Br(As=Ts(As=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xs(Cs(t=e.call.apply(e,[this].concat(r))||this),"_keyboardListeners",[]),xs(Cs(t),"_isKeyboardEnable",!1),xs(Cs(t),"_componentToHandle",null),xs(Cs(t),"_addKeyboardHandler",(function(e,n,r,i){var a=t._createKeyCode(n,r);t._keyboardListeners[a]?t.props.logger.warn("Combination of key "+r.code+" altKey "+(!!r.altKey).toString()+" ctrlKey "+(!!r.ctrlKey).toString()+"\n metaKey "+(!!r.metaKey).toString()+" shiftKey "+(!!r.shiftKey).toString()+" already exist"):t._keyboardListeners[a]={callback:i,componentName:e}})),xs(Cs(t),"_removeKeyboardHandler",(function(e,n){var r=t._createKeyCode(e,n);t._keyboardListeners[r]&&delete t._keyboardListeners[r]})),xs(Cs(t),"_updateIsKeyboardEnabled",(function(e){t._isKeyboardEnable=e})),xs(Cs(t),"_setKeyboardEventToScope",(function(e){t._componentToHandle=e})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props,n=t.eventManager,r=t.playerContainer;this.keyEventHandler=this._keyEventHandler.bind(this),Is.forEach((function(t){n.listen(r,t,e.keyEventHandler)}))},i.shouldComponentUpdate=function(){return!1},i._keyEventHandler=function(e){var t=this._createKeyCode(e.type,{code:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}),n=e.target instanceof Node&&e.target.nodeName||"";-1!==["INPUT","SELECT","TEXTAREA"].indexOf(n)||!this._shouldHandleKeyboardEvents()||!this._keyboardListeners[t]||"function"!=typeof this._keyboardListeners[t].callback||this._componentToHandle&&this._keyboardListeners[t].componentName!==this._componentToHandle||(e.preventDefault(),e.stopPropagation(),this._keyboardListeners[t].callback(e))},i._shouldHandleKeyboardEvents=function(){return this._isKeyboardEnable&&!this.props.playerNav&&!this.props.overlayOpen},i._createKeyCode=function(e,t){var n=Is.indexOf(e),r=t.altKey?1:0,i=t.ctrlKey?1:0,a=t.metaKey?1:0,o=t.shiftKey?1:0;return parseInt(""+n+t.code+r+i+a+o)},i.getChildContext=function(){return{addKeyboardHandler:this._addKeyboardHandler,removeKeyboardHandler:this._removeKeyboardHandler,updateIsKeyboardEnabled:this._updateIsKeyboardEnabled,setKeyboardEventToScope:this._setKeyboardEventToScope}},i.render=function(){return this.props.children&&W(this.props.children)[0]||null},r}(B))||As)||As)||As);function Ds(){return(Ds=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Rs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Os(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ls,Ms,Ns,Us,Fs=function(e){return function(t){return function(n){var r,i;function a(){for(var t,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return Os(Rs(t=n.call.apply(n,[this].concat(i))||this),"keyboardEventHandlers",[]),Os(Rs(t),"_updateIsKeyboardEnabled",(function(e){t.context.updateIsKeyboardEnabled(e)})),Os(Rs(t),"_setKeyboardEventToScope",(function(n){n?t.context.setKeyboardEventToScope(e):t.context.setKeyboardEventToScope(null)})),t}i=n,(r=a).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i;var o=a.prototype;return o.componentDidMount=function(){var t=this;this.keyboardEventHandlers.forEach((function(n){var r=n.eventType?n.eventType:Is[0];t._addKeyboardHandler(e,r,n.key,n.action)}))},o.componentWillUnmount=function(){var e=this;this.keyboardEventHandlers.forEach((function(t){var n=t.eventType?t.eventType:Is[0];e._removeKeyboardHandler(n,t.key)}))},o.registerKeyboardEvents=function(e){this.keyboardEventHandlers=e},o._addKeyboardHandler=function(e,t,n,r){this.context.addKeyboardHandler(e,t,n,r)},o._removeKeyboardHandler=function(e,t){this.context.removeKeyboardHandler(e,t)},o.render=function(){var e=this;return N(t,Ds({},this.props,{setKeyboardEventToScope:function(t){return e._setKeyboardEventToScope(t)},updateIsKeyboardEnabled:function(t){return e._updateIsKeyboardEnabled(t)},registerKeyboardEvents:function(t){return e.registerKeyboardEvents(t)}}))},a}(B)}},js="chromecast";function Bs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vs(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Hs,Ks,Gs,zs,Ws,Ys,qs=(Ls=$t((function(e){return{isCasting:e.engine.isCasting,isCastAvailable:e.engine.isCastAvailable}})),Ms=jn("Cast"),Ns=An({castText:"cast.play_on_tv"}),Ls(Us=Sr(Us=Br(Us=Ms(Us=Ns(Us=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Vs(Bs(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){t.props.player.setIsCastInitiator(js,!0),t.props.eventManager.listenOnce(t.props.player,t.props.player.Event.Cast.CAST_SESSION_START_FAILED,(function(){return t.props.player.setIsCastInitiator(js,!1)}))})),Vs(Bs(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.props.player.startCasting(js)})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){if(e.isCasting||e.isCastAvailable){var t=e.isCasting?pr.a.castButton+" "+pr.a.castButtonActive:pr.a.castButton;return N("div",{role:"button","aria-label":this.props.castText,className:pr.a.controlButtonContainer,onClick:this.onClick,onKeyDown:this.onKeyDown},N(Oo,{label:this.props.castText},N("google-cast-launcher",{className:t,tabIndex:"0"})))}},r}(B))||Us)||Us)||Us)||Us)||Us);function Xs(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}qs.displayName="Cast";var Qs,Zs,Js,el,tl,nl,rl=(Hs=$t((function(e){return{isInFullscreen:e.engine.fullscreen,targetId:e.config.targetId}})),Ks=jn("Fullscreen"),Gs=Fs("Fullscreen"),zs=fi("Fullscreen"),Ws=An({fullscreenText:"controls.fullscreen",fullscreenExitText:"controls.fullscreenExit"}),Hs(Ys=Sr(Ys=Ks(Ys=Gs(Ys=zs(Ys=Ws(Ys=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return $s(Xs(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.F},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.ESC},action:function(e){t.handleKeydown(e)}}]),$s(Xs(t),"toggleFullscreen",(function(){var e=t.props,n=e.targetId,r=e.logger,i=e.player;r.debug("Toggle fullscreen");var a=document.getElementById(n);i.isFullscreen()?i.exitFullscreen():i.enterFullscreen(),a&&a.focus(),t.props.notifyClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.handleKeydown=function(e){switch(e.keyCode){case Ln.F:this.props.player.isFullscreen()||this.toggleFullscreen();break;case Ln.ESC:this.props.player.isFullscreen()&&this.toggleFullscreen()}},i.render=function(){return N(ts,{name:"Fullscreen"},N(Oo,{label:this.props.isInFullscreen?this.props.fullscreenExitText:this.props.fullscreenText},N(Bo,{tabIndex:"0","aria-label":this.props.isInFullscreen?this.props.fullscreenExitText:this.props.fullscreenText,className:this.props.isInFullscreen?[pr.a.controlButton,pr.a.isFullscreen].join(" "):pr.a.controlButton,onClick:this.toggleFullscreen},N(Eo,{type:vo.Maximize}),N(Eo,{type:vo.Minimize}))))},r}(B))||Ys)||Ys)||Ys)||Ys)||Ys)||Ys);function il(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function al(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ol(){return(ol=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}rl.displayName="Fullscreen";var sl,ll=(Qs=$t((function(e){return{isPlayingAdOrPlayback:ko(e.engine),isPlaying:e.engine.isPlaying,adBreak:e.engine.adBreak,isPlaybackEnded:e.engine.isPlaybackEnded}}),ur(ol({},sr,sa,da))),Zs=Fs("PlayPause"),Js=jn("PlayPause"),el=fi("PlayPause"),tl=An({startOverText:"controls.startOver",pauseText:"controls.pause",playText:"controls.play"}),Qs(nl=Sr(nl=Zs(nl=Js(nl=el(nl=tl(nl=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return al(il(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.SPACE},action:function(){t.props.isPlayingAdOrPlayback?t.props.updateOverlayActionIcon(vo.Pause):t.props.updateOverlayActionIcon(vo.Play),t.togglePlayPause(),t.props.updatePlayerHoverState(!0)}}]),al(il(t),"togglePlayPause",(function(){t.props.logger.debug("Toggle play"),t.props.isPlayingAdOrPlayback?t.props.player.pause():t.props.player.play(),t.props.notifyClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.render=function(e){var t=this.props.isPlayingAdOrPlayback?[pr.a.controlButton,pr.a.isPlaying].join(" "):pr.a.controlButton,n=e.isPlaybackEnded&&!this.props.adBreak,r=this.props.isPlayingAdOrPlayback?this.props.pauseText:this.props.playText,i=n?this.props.startOverText:r;return N(ts,{name:"PlayPause"},N(Oo,{label:i},N(Bo,{tabIndex:"0","aria-label":i,className:t,onClick:this.togglePlayPause},n?N(Eo,{type:vo.StartOver}):N("div",null,N(Eo,{type:vo.Play}),N(Eo,{type:vo.Pause})))))},r}(B))||nl)||nl)||nl)||nl)||nl)||nl);function ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pl(){return(pl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}ll.displayName="PlayPause";var dl,fl,hl,gl,yl,vl,ml=$t((function(e){return{audioTracks:e.engine.audioTracks,textTracks:e.engine.textTracks,videoTracks:e.engine.videoTracks,isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,isLive:e.engine.isLive,showQualityMenu:e.config.settings.showQualityMenu,showAudioMenu:e.config.settings.showAudioMenu,showCaptionsMenu:e.config.settings.showCaptionsMenu,showSpeedMenu:e.config.settings.showSpeedMenu,showAdvancedAudioDescToggle:e.config.settings.showAdvancedAudioDescToggle}}),ur(pl({},sa,da)))(sl=An({buttonLabel:"controls.settings"})(sl=Sr(sl=Br(sl=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cl(ul(t=e.call.apply(e,[this].concat(r))||this),"onControlButtonClick",(function(){t.setState((function(e){return{smartContainerOpen:!e.smartContainerOpen}}))})),cl(ul(t),"toggleCVAAOverlay",(function(){t.setState((function(e){return{cvaaOverlay:!e.cvaaOverlay}}))})),cl(ul(t),"onCVAAOverlayClose",(function(){t.toggleCVAAOverlay(),t.onControlButtonClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillMount=function(){this.setState({smartContainerOpen:!1,cvaaOverlay:!1})},i.componentDidMount=function(){var e=this;this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)}))},i.handleClickOutside=function(e){this.state.cvaaOverlay||this.props.isMobile||this.props.isSmallSize||!this._controlSettingsElement||this._controlSettingsElement.contains(e.target)||!this.state.smartContainerOpen||this.setState({smartContainerOpen:!1})},i.getButtonBadgeType=function(){var e,t,n=null==(e=this.props.player.getActiveTracks())||null==(t=e.video)?void 0:t.height;return n?id(n):null},i.render=function(e){var t=this,n=e.showAudioMenu&&e.audioTracks.length>1,r=n&&e.showAdvancedAudioDescToggle,i=e.showCaptionsMenu&&e.textTracks.length>1,a=e.showQualityMenu&&e.videoTracks.length>1,o=e.showSpeedMenu&&e.player.playbackRates.length>1&&!e.isLive;if((n||i||a||o)&&!(e.isLive&&e.videoTracks.length<=1)){var s=this.getButtonBadgeType()||"",l=document.getElementById(this.props.player.config.targetId)||document;return N(ts,{name:"Settings",ref:function(e){return e?t._controlSettingsElement=e:void 0}},N(Oo,{label:e.buttonLabel},N(Bo,{tabIndex:"0","aria-label":e.buttonLabel,className:[pr.a.controlButton,pr.a.buttonBadge,mo[s+"Active"],this.state.smartContainerOpen?pr.a.active:""].join(" "),onClick:this.onControlButtonClick},N(Eo,{type:vo.Settings}))),this.state.smartContainerOpen&&!this.state.cvaaOverlay&&N(fc,{targetId:e.player.config.targetId,title:N(bn,{id:"settings.title"}),onClose:this.onControlButtonClick},r&&N(pd,null),n&&N(Bp,null),i&&N(Xp,{onAdvancedCaptionsClick:this.toggleCVAAOverlay}),a&&N(sd,null),o&&N(nd,null)),this.state.cvaaOverlay?Xe(N(Mu,{onClose:this.onCVAAOverlayClose}),l.querySelector(".overlay-portal")):N("div",null))}},r}(B))||sl)||sl)||sl)||sl;function bl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function El(){return(El=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}ml.displayName="Settings";var kl,Tl,Al,wl,Sl=(dl=$t((function(e){return{isDraggingActive:e.volume.draggingActive,volume:e.engine.volume,muted:e.engine.muted,isMobile:e.shell.isMobile}}),ur(El({},Wi,Tr,da))),fl=Fs("Volume"),hl=jn("Volume"),gl=fi("Volume"),yl=An((function(e){return{tooltipLabel:e.muted?N(bn,{id:"controls.unmute"},"Unmute"):N(bn,{id:"controls.mute"},"Mute"),volBtnAriaLabel:e.muted?N(bn,{id:"volume.muted_click_to_unmute"},"Muted. Click to unmute"):N(bn,{id:"volume.volume_click_to_mute",fields:{vol:(100*e.player.volume).toFixed()}},100*e.player.volume+" volume. Click to mute")}})),dl(vl=Sr(vl=Br(vl=fl(vl=hl(vl=gl(vl=yl(vl=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return _l(bl(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.UP},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.DOWN},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.M},action:function(e){t.handleKeydown(e)}}]),_l(bl(t),"onVolumeProgressBarMouseDown",(function(){t.props.updateVolumeDraggingStatus(!0)})),_l(bl(t),"onVolumeProgressBarMouseMove",(function(e){t.props.isDraggingActive&&t.changeVolume(e)})),_l(bl(t),"onMouseOver",(function(){t.props.isMobile||(t.props.updateVolumeHover(!0),t.setState({hover:!0}))})),_l(bl(t),"onMouseOut",(function(){t.props.isMobile||(t.props.updateVolumeHover(!1),t.setState({hover:!1}))})),_l(bl(t),"onKeyDown",(function(e){switch(e.keyCode){case Ln.UP:case Ln.DOWN:case Ln.ENTER:case Ln.SPACE:e.preventDefault(),e.stopPropagation(),t.handleKeydown(e);break;default:t.setState({hover:!1})}})),_l(bl(t),"onFocus",(function(){t.state.hover||t.setState({hover:!0})})),_l(bl(t),"onTouchEnd",(function(e){e.stopImmediatePropagation()})),_l(bl(t),"onVolumeProgressBarMouseUp",(function(e){t.props.isDraggingActive&&(t.props.updateVolumeDraggingStatus(!1),t.changeVolume(e))})),_l(bl(t),"toggleMute",(function(){var e=t.props.player;0===e.volume?(t.props.logger.debug("Toggle mute. Volume is 0, set mute to false & volume to 0.5"),e.muted=!1,e.volume=.5):(t.props.logger.debug("Toggle mute. "+e.muted+" => "+!e.muted),e.muted=!e.muted),t.props.notifyClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props.player;this.props.eventManager.listen(t,t.Event.LOADED_METADATA,(function(){e.props.updateVolume(t.volume),e.props.updateMuted(t.muted)})),this.props.eventManager.listen(t,t.Event.VOLUME_CHANGE,(function(){e.props.updateMuted(t.muted),e.props.updateVolume(t.volume)})),this.props.eventManager.listen(document,"mouseup",this.onVolumeProgressBarMouseUp),this.props.eventManager.listen(document,"mousemove",this.onVolumeProgressBarMouseMove),this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)})),this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.handleClickOutside=function(e){!this.props.isMobile&&this._volumeControlElement&&!this._volumeControlElement.contains(e.target)&&this.state.hover&&this.setState({hover:!1})},i.getVolumeProgressHeight=function(){return this.props.muted?"0%":Math.round(100*this.props.volume)+"%"},i.handleKeydown=function(e){var t,n=this,r=this.props.player,i=function(e){e===r.volume||e>100||e<0||(r.muted=e<5,r.volume=e/100,n.props.notifyChange({volume:r.volume}))};switch(e.keyCode){case Ln.UP:this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]),i(t=Math.min(Math.round(100*r.volume)+5,100));break;case Ln.DOWN:0===(t=Math.max(Math.round(100*r.volume)-5,0))?this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute]):this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWave]),i(t);break;case Ln.M:r.muted?this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeWaves]):this.props.updateOverlayActionIcon([vo.VolumeBase,vo.VolumeMute]),this.toggleMute();break;case Ln.ENTER:case Ln.SPACE:this.toggleMute()}},i.changeVolume=function(e){var t,n=this.props.player,r=this._volumeProgressBarElement.getBoundingClientRect();t=r.height>r.width?this._getVerticalVolume(r,e):this._getHorizontalVolume(r,e),(t=parseFloat(t.toFixed(2)))<=1&&t>=0&&(this.props.logger.debug("Change volume from "+n.volume+" => "+t),n.volume=t,this.props.muted&&(n.muted=!1),this.props.notifyChange({volume:n.volume}))},i._getHorizontalVolume=function(e,t){var n=e.width,r=e.left,i=t.clientX;return 0!=n?(i-r)/n:0},i._getVerticalVolume=function(e,t){var n=e.height,r=e.top,i=t.clientY;return 0!=n?1-(i-r)/n:0},i.render=function(){var e=this;if(!this.props.player.isImage()){var t=this.props,n=t.player,r=t.isDraggingActive,i=t.muted,a=t.volume,o=t.smartContainerOpen,s=[pr.a.volumeControl];return r&&s.push(pr.a.draggingActive),(i||0===a)&&s.push(pr.a.isMuted),this.state.hover&&!o&&s.push(pr.a.hover),N(ts,{role:"application",name:"Volume",ref:function(t){return t?e._volumeControlElement=t:void 0},className:s,onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut},N(Oo,{label:this.props.tooltipLabel,type:this.props.toolTipType?this.props.toolTipType:Ro.Left},N(Bo,{tabIndex:"0","aria-live":"polite","aria-label":this.props.volBtnAriaLabel,className:pr.a.controlButton,onMouseUp:this.toggleMute,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown,onFocus:this.onFocus},N(Eo,{type:vo.VolumeBase}),N(Eo,{type:vo.VolumeWaves}),N(Eo,{type:vo.VolumeMute}))),N("div",{className:pr.a.volumeControlBar,role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":100*n.volume,"aria-valuetext":100*n.volume+"% volume "+(n.muted?"muted":"")},N("div",{className:pr.a.bar,ref:function(t){return t?e._volumeProgressBarElement=t:void 0},onMouseDown:this.onVolumeProgressBarMouseDown},N("div",{className:pr.a.progress,style:{height:this.getVolumeProgressHeight()}}))))}},r}(B))||vl)||vl)||vl)||vl)||vl)||vl)||vl);function Cl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Il(){return(Il=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Sl.displayName="Volume";var Pl=(kl=$t((function(e){return{isVr:e.engine.isVr,vrStereoMode:e.engine.vrStereoMode,config:e.config.components.vrStereo}}),ur(Il({},sr,Tr))),Tl=jn("VrStereo"),Al=An({vrStereoText:"controls.vrStereo"}),kl(wl=Sr(wl=Tl(wl=Al(wl=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xl(Cl(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){t.props.player.toggleVrStereoMode(),t.props.updateVrStereoMode(!t.props.vrStereoMode)})),xl(Cl(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.onClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._shouldRender=function(){var e=this.props.config;return this.props.isVr&&!(0===Object.keys(e).length&&e.constructor===Object)},i.componentWillMount=function(){this.props.updateVrStereoMode(this.props.config.vrStereoMode)},i.render=function(){if(this._shouldRender())return N(ts,{name:"VrStereo"},N(Oo,{label:this.props.vrStereoText},N(Bo,{tabIndex:"0","aria-label":this.props.vrStereoText,className:this.props.vrStereoMode?[pr.a.controlButton,pr.a.vrStereoMode].join(" "):pr.a.controlButton,onClick:this.onClick,onKeyDown:this.onKeyDown},N(Eo,{type:vo.vrStereo}),N(Eo,{type:vo.vrStereoFull}))))},r}(B))||wl)||wl)||wl)||wl);Pl.displayName="VrStereo";var Dl,Rl=$t((function(e){return{textTracks:e.engine.textTracks,showCCButton:e.config.showCCButton}}))(jn("ClosedCaptions")(fi("ClosedCaptions")(An({closedCaptionsOnText:"controls.closedCaptionsOn",closedCaptionsOffText:"controls.closedCaptionsOff"})((function(e,t){var n,r=ye(!1),i=r[0],a=r[1],o=e.textTracks,s=t.player,l=o.find((function(e){return e.active}));if(me((function(){a("off"!==(null==l?void 0:l.language))}),[l]),(null==(n=e.textTracks)?void 0:n.length)&&e.showCCButton)return N(ts,{name:"ClosedCaptions"},i?N(Oo,{label:e.closedCaptionsOnText},N(Bo,{tabIndex:"0","aria-label":e.closedCaptionsOnText,className:[pr.a.controlButton,pr.a.ccOn].join(" "),onClick:function(){e.notifyClick(!0),s.hideTextTrack()}},N(Eo,{type:vo.ClosedCaptionsOn}))):N(Oo,{label:e.closedCaptionsOffText},N(Bo,{tabIndex:"0","aria-label":e.closedCaptionsOffText,className:pr.a.controlButton,onClick:function(){e.notifyClick(!1),s.showTextTrack()}},N(Eo,{type:vo.ClosedCaptionsOff}))))})))));Rl.displayName="ClosedCaptions";var Ol,Ll,Ml,Nl=$t((function(e){return{url:e.engine.adUrl}}))(Dl=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return N("a",{href:e.url,target:"_blank",rel:"noreferrer",className:[pr.a.btn,pr.a.btnDarkTransparent,pr.a.learnMore].join(" ")},N(bn,{id:"ads.learn_more"}))},r}(B))||Dl;function Ul(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Fl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Nl.displayName="AdLearnMore";var jl=(Ol=$t((function(e){return{currentTime:e.engine.adProgress.currentTime,duration:e.engine.adProgress.duration,adSkipTimeOffset:e.engine.adSkipTimeOffset,adSkippableState:e.engine.adSkippableState}})),Ll=jn("AdSkip"),Ol(Ml=Sr(Ml=Ll(Ml=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Fl(Ul(t=e.call.apply(e,[this].concat(r))||this),"skipAd",(function(){t.props.player.ads.skipAd()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getSkipTimeOffset=function(){return Math.ceil(this.props.adSkipTimeOffset-this.props.currentTime)},i.render=function(){return this.props.adSkippableState?this.getSkipTimeOffset()<=0?N(En,null,N("a",{className:[pr.a.btn,pr.a.btnBranded,pr.a.btnSkipAd].join(" "),onClick:this.skipAd},N(bn,{id:"ads.skip_ad"}))):N(En,null,N("span",{className:pr.a.skipAd},N(bn,{id:"ads.skip_in"})," "+this.getSkipTimeOffset())):void 0},r}(B))||Ml)||Ml)||Ml);jl.displayName="AdSkip";var Bl=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return N("span",{className:pr.a.adNotice},N(bn,{id:"ads.ad_notice"}))},r}(B);Bl.displayName="AdNotice";var Vl,Hl=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.PLAYER_RESIZE)||this).payload={playerSize:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Kl=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.GUI_RESIZE)||this).payload={guiSize:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),Gl=function(e){var t,n;function r(t){var n;return(n=e.call(this,Dr.Type.VIDEO_RESIZE)||this).payload={videoSize:t},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(Dr),zl="event-dispatcher-middleware/COMPONENT_CLICKED",Wl="event-dispatcher-middleware/COMPONENT_CHANGED";function Yl(e,t,n){var r=e.getState().engine;r.adBreak?r.adIsPlaying?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PLAY)):r.isPlaying?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PAUSE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_PLAY))}function ql(e,t,n){e.getState().engine.muted?n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_MUTE)):n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_UNMUTE))}function Xl(e,t,n){n.isFullscreen()?n.dispatchEvent(new Dr(Dr.Type.USER_EXITED_FULL_SCREEN)):n.dispatchEvent(new Dr(Dr.Type.USER_ENTERED_FULL_SCREEN))}var $l,Ql=((Vl={})[Ln.SPACE]=function(e,t,n){Yl(e,0,n)},Vl[Ln.UP]=function(e,t,n){n.dispatchEvent(new $r(t.payload.volume))},Vl[Ln.DOWN]=function(e,t,n){n.dispatchEvent(new $r(t.payload.volume))},Vl[Ln.F]=function(e,t,n){Xl(0,0,n)},Vl[Ln.P]=function(e,t,n){!function(e,t,n){n.isInPictureInPicture()?n.dispatchEvent(new Dr(Dr.Type.USER_EXITED_PICTURE_IN_PICTURE)):n.dispatchEvent(new Dr(Dr.Type.USER_ENTERED_PICTURE_IN_PICTURE))}(0,0,n)},Vl[Ln.ESC]=function(e,t,n){Xl(0,0,n)},Vl[Ln.LEFT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Vl[Ln.RIGHT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Vl[Ln.HOME]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Vl[Ln.END]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Vl[Ln.M]=function(e,t,n){ql(e,0,n)},Vl[Ln.SEMI_COLON]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Vl[Ln.PERIOD]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Vl[Ln.COMMA]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Vl[Ln.C]=function(e,t,n){n.dispatchEvent(new Hr(t.payload.track))},Vl),Zl=function(e){var t,n;function r(t){var n;return void 0===t&&(t={config:{}}),(n=e.call(this)||this).name=t.name,n.config=t.config,n.player=t.player,n.eventManager=new Lr,n.logger=Dn("UI "+n.name),n.logger.debug("Initialized"),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.notifyClick=function(e){this.context.store.dispatch({type:zl,name:this.name,payload:e})},i.notifyChange=function(e){this.context.store.dispatch({type:Wl,name:this.name,payload:e})},i.componentWillUnmount=function(){this.eventManager.removeAll()},r}(B);function Jl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Zl,"defaultProps",{});var tu=$t((function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded,guiClientRect:e.shell.guiClientRect}}),ur(sr))($l=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return eu(Jl(t=e.call.apply(e,[this].concat(r))||this),"_ref",{current:null}),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(){var e=this._ref.current.scrollHeight>pr.a.bottomBarMaxHeight;this.state.lineBreak!==e&&this.setState({lineBreak:e})},i.render=function(e){var t=e.leftControls,n=e.rightControls,r=[pr.a.bottomBar];return e.isCasting&&e.isPlaybackEnded&&r.push(pr.a.hide),this.state.lineBreak&&r.push(pr.a.lineBreak),N("div",{ref:this._ref,className:r.join(" ")},N("div",{className:pr.a.bottomBarArea},N(qn,{name:"BottomBar"},e.children)),N("div",{className:pr.a.leftControls},N(qn,{name:"BottomBarLeftControls"},t)),N("div",{className:pr.a.rightControls},N(qn,{name:"BottomBarRightControls"},n)))},r}(B))||$l;tu.displayName="BottomBar";var nu,ru=function(e){var t=_e(null);return me((function(){var n;e.isActive&&(null==(n=t)||n.focus())}),[]),N("div",{role:"button",tabIndex:"0",ref:function(n){t=n,e.addAccessibleChild(n)},className:e.classNames.join(" "),onClick:e.changeCaptionsStyle,onKeyDown:function(t){t.keyCode===Ln.ENTER&&e.changeCaptionsStyle()}},e.children,e.isActive?N("div",{className:pr.a.activeTick},N(Eo,{type:vo.Check})):void 0)};function iu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ou,su=Sr(nu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return au(iu(t=e.call.apply(e,[this].concat(r))||this),"transitionToState",(function(){t.props.transitionToState(t.props.cvaaOverlayState.CustomCaptions)})),au(iu(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.transitionToState()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillMount=function(){var e=this.props.player;this.captionsStyleDefault=e.TextStyle.fromJson({backgroundOpacity:e.TextStyle.StandardOpacities.TRANSPARENT}),this.captionsStyleYellow=e.TextStyle.fromJson({backgroundOpacity:e.TextStyle.StandardOpacities.TRANSPARENT,fontColor:e.TextStyle.StandardColors.YELLOW}),this.captionsStyleBlackBG=e.TextStyle.fromJson({backgroundColor:e.TextStyle.StandardColors.BLACK,fontColor:e.TextStyle.StandardColors.WHITE})},i.render=function(e){var t=this;return N("div",{className:[pr.a.overlayScreen,pr.a.active].join(" ")},N("div",{className:pr.a.title},N(bn,{id:"cvaa.title"})),N("div",null,N(ru,{addAccessibleChild:e.addAccessibleChild,classNames:[pr.a.sample],changeCaptionsStyle:function(){return e.changeCaptionsStyle(t.captionsStyleDefault)},isActive:e.player.textStyle.isEqual(this.captionsStyleDefault)},N(bn,{id:"cvaa.sample_caption_tag",fields:{number:"1"}})),N(ru,{addAccessibleChild:e.addAccessibleChild,classNames:[pr.a.sample,pr.a.blackBg],changeCaptionsStyle:function(){return e.changeCaptionsStyle(t.captionsStyleBlackBG)},isActive:e.player.textStyle.isEqual(this.captionsStyleBlackBG)},N(bn,{id:"cvaa.sample_caption_tag",fields:{number:"2"}})),N(ru,{addAccessibleChild:e.addAccessibleChild,classNames:[pr.a.sample,pr.a.yellowText],changeCaptionsStyle:function(){return e.changeCaptionsStyle(t.captionsStyleYellow)},isActive:e.player.textStyle.isEqual(this.captionsStyleYellow)},N(bn,{id:"cvaa.sample_caption_tag",fields:{number:"3"}}))),this.isAdvancedStyleApplied()?N("div",{className:pr.a.customCaptionsApplied},N("div",{className:[pr.a.sample,pr.a.custom].join(" "),style:e.customTextStyle.toCSS()},N(bn,{id:"cvaa.sample_custom_caption_tag"}),N("div",{className:pr.a.activeTick},N(Eo,{type:vo.Check}))),N("a",{role:"button",tabIndex:"0","aria-haspopup":"true",onClick:this.transitionToState,ref:function(t){e.addAccessibleChild(t)},onKeyDown:this.onKeyDown},N(bn,{id:"cvaa.edit_caption"}))):N("a",{role:"button","aria-haspopup":"true",tabIndex:"0",className:pr.a.buttonSaveCvaa,onClick:this.transitionToState,ref:function(t){e.addAccessibleChild(t)},onKeyDown:this.onKeyDown},N(bn,{id:"cvaa.set_custom_caption"})))},i.isAdvancedStyleApplied=function(){var e=this.props.player;return!e.textStyle.isEqual(this.captionsStyleDefault)&&!e.textStyle.isEqual(this.captionsStyleBlackBG)&&!e.textStyle.isEqual(this.captionsStyleYellow)},r}(B))||nu;function lu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function cu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pu=$t((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,guiClientRect:e.shell.guiClientRect}}))(ou=Br(ou=Va(ou=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cu(lu(t=e.call.apply(e,[this].concat(r))||this),"handleClickOutside",(function(e){t.props.isMobile||t.props.isSmallSize||!t._menuElement||t._menuElement.contains(e.target)||t.props.onClose()})),cu(lu(t),"onChange",(function(e){t.onSelect(t.props.options[e.target.value])})),t}uu(t,e);var n=t.prototype;return n.componentWillMount=function(){this.setState({position:[pr.a.top,pr.a.left]})},n.componentDidMount=function(){this.props.eventManager.listen(document,"click",this.handleClickOutside),this.props.isMobile||this.props.isSmallSize||this.setState({position:this.getPosition()})},n.getPosition=function(){var e=this._menuElement.getBoundingClientRect(),t=this.props.guiClientRect;return e.top>=t.top?[pr.a.top,pr.a.left]:e.bottom+e.height<t.bottom?[pr.a.bottom,pr.a.left]:(this._menuElement.style.maxHeight=.8*t.height+"px",[pr.a.stickBottom,pr.a.left])},n.isSelected=function(e){return e.active},n.onSelect=function(e){this.props.onMenuChosen(e.value),this.props.options.filter((function(e){return e.active})).forEach((function(e){e.active=!1})),this.props.options.filter((function(t){return t.value===e.value}))[0].active=!0},n.renderNativeSelect=function(e){var t=this,n=this.props.hideSelect?pr.a.mobileHiddenSelect:"";return N("select",{"aria-labelledby":e,role:"listbox",ref:function(e){t.props.pushRef&&t.props.pushRef(e)},className:n+=" "+pr.a.dropdown,onChange:this.onChange},this.props.options.map((function(e,n){return N("option",{role:"option","aria-selected":t.isSelected(e)?"true":"",selected:t.isSelected(e),value:n,key:n},e.label)})))},n.render=function(e){var t=this;return e.clearAccessibleChildren(),e.isMobile||e.isSmallSize?this.renderNativeSelect(e.labelledby):N("div",{role:"menu",onKeyDown:e.handleKeyDown,ref:function(e){return e?t._menuElement=e:void 0},className:[pr.a.dropdownMenu].concat(this.state.position).join(" ")},e.options.map((function(n,r){return N(fu,{setDefaultFocusedElement:e.setDefaultFocusedElement,addAccessibleChild:e.addAccessibleChild,isSelected:t.isSelected,onSelect:function(e){t.onSelect(e)},key:r,data:n})})))},t}(B))||ou)||ou)||ou;pu.displayName="Menu";var du,fu=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return cu(lu(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(e){e.stopPropagation(),t.props.onSelect(t.props.data)})),cu(lu(t),"onKeyDown",(function(e){switch(e.keyCode){case Ln.ENTER:t.props.onSelect(t.props.data),e.stopPropagation()}})),t}return uu(t,e),t.prototype.render=function(e){var t=this,n=e.data.badgeType&&!e.isSelected(e.data)?mo[e.data.badgeType]:mo[e.data.badgeType+"Active"];return N("div",{role:"menuitemradio",tabIndex:"-1","aria-checked":e.isSelected(e.data)?"true":"false",ref:function(n){t.props.addAccessibleChild(n),e.isSelected(e.data)&&e.setDefaultFocusedElement(n)},className:e.isSelected(e.data)?[pr.a.dropdownMenuItem,pr.a.active].join(" "):pr.a.dropdownMenuItem,onClick:this.onClick,onKeyDown:this.onKeyDown},N("span",{className:n?[pr.a.labelBadge,n].join(" "):""},e.data.label),N("span",{className:[pr.a.menuIconContainer,pr.a.active].join(" ")},N(Eo,{type:vo.CheckActive})))},t}(B);function hu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var yu=$t((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize}}))(du=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return gu(hu(t=e.call.apply(e,[this].concat(r))||this),"onMenuChosen",(function(e){t.props.onMenuChosen(e),t.setState({dropMenuActive:!1})})),gu(hu(t),"onClick",(function(){t.state.dropMenuActive||setTimeout((function(){return t.toggleDropDown()}))})),gu(hu(t),"onKeyDown",(function(e){switch(e.keyCode){case Ln.ENTER:t.onClick();break;case Ln.SPACE:e.preventDefault(),t.onClick();break;case Ln.ESC:t.state.dropMenuActive&&(t.onClose(),e.stopPropagation())}})),gu(hu(t),"onClose",(function(){t.setState({dropMenuActive:!1})})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillMount=function(){this.setState({dropMenuActive:!1})},i.componentDidMount=function(){this.props.registerParentSelectedCallback&&this.props.registerParentSelectedCallback(this.toggleDropDown.bind(this))},i.isSelected=function(e){return e.active},i.getActiveOption=function(){return this.props.options.find((function(e){return e.active}))||this.props.options[0]||{label:"Unlabled"}},i.renderNativeSelect=function(e){return N(pu,{labelledby:e,pushRef:this.props.pushRef,options:this.props.options,onMenuChosen:this.onMenuChosen,onClose:this.onClose})},i.render=function(e){var t,n,r=this,i=e.name+"Active",a=this.getActiveOption(),o=(null==a||null==(t=a.dropdownOptions)?void 0:t.label)||a.label,s=mo[a.badgeType||(null==a||null==(n=a.dropdownOptions)?void 0:n.badgeType)];return e.isMobile||e.isSmallSize?this.renderNativeSelect(e.name):N("div",{name:e.name,className:this.state.dropMenuActive?[pr.a.dropdown,pr.a.active].join(" "):pr.a.dropdown,ref:function(e){return e?r._el=e:void 0}},N("div",{tabIndex:e.tabbable?0:-1,ref:function(t){e.pushRef&&e.pushRef(t)},role:"menuitem","aria-haspopup":"true","aria-expanded":this.state.dropMenuActive?"true":"false","aria-labelledby":[e.name,i].join(" "),className:pr.a.dropdownButton,onClick:this.onClick,onKeyDown:this.onKeyDown},N("span",{id:i,className:s?[pr.a.labelBadge,s].join(" "):""},o),N(Eo,{type:vo.ArrowDown}),this.state.dropMenuActive?N(pu,{parentEl:this._el,options:e.options,onMenuChosen:this.onMenuChosen,onClose:this.onClose}):void 0))},i.toggleDropDown=function(){this.setState((function(e){return{dropMenuActive:!e.dropMenuActive}}))},r}(B))||du;yu.displayName="DropDown";var vu=function(e){return N("div",{className:e.classNames.join(" ")},N("label",{id:e.styleName},N(bn,{id:e.labelId})),N(yu,{name:e.styleName,pushRef:function(t){e.addAccessibleChild(t)},tabbable:!0,onMenuChosen:function(t){var n={};n[e.styleName]=t,e.changeCustomStyle(n)},options:e.options}))};function mu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function bu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var _u=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return bu(mu(t=e.call.apply(e,[this].concat(r))||this),"mouseDownHandler",(function(e){t._sliderElementOffsetLeft=t._sliderElement.getBoundingClientRect().left,t.state.dragging||t.setState((function(n){return{dragging:!0,value:t.mouseEventToValue(e,n)}}),(function(){t.props.onChange(t.mouseEventToValue(e,t.state))}))})),bu(mu(t),"onKeyDown",(function(e){e.keyCode!==Ln.LEFT&&e.keyCode!==Ln.RIGHT||t.onKeyboardDragging(e)})),bu(mu(t),"mouseMoveHandler",(function(e){t.state.dragging&&t.setState((function(n){return{value:t.mouseEventToValue(e,n)}}),(function(){t.props.onChange(t.mouseEventToValue(e,t.state))}))})),bu(mu(t),"mouseUpHandler",(function(e){t.state.dragging&&t.setState((function(n){return{value:t.mouseEventToValue(e,n),dragging:!1}}),(function(){t.props.onChange(t.mouseEventToValue(e,t.state))}))})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillMount=function(){this.setState({value:this.props.value||0,min:this.props.min||0,max:this.props.max||100,dragging:!1}),document.addEventListener("mouseup",this.mouseUpHandler),document.addEventListener("mousemove",this.mouseMoveHandler),document.addEventListener("touchend",this.mouseUpHandler),document.addEventListener("touchmove",this.mouseMoveHandler)},i.componentWillUnmount=function(){document.removeEventListener("mouseup",this.mouseUpHandler),document.removeEventListener("mousemove",this.mouseMoveHandler),document.removeEventListener("touchend",this.mouseUpHandler),document.removeEventListener("touchmove",this.mouseMoveHandler)},i.componentDidMount=function(){this.sliderWidth=this._sliderElement.clientWidth,this._sliderElementOffsetLeft=this._sliderElement.getBoundingClientRect().left},i.onKeyboardDragging=function(e){var t=this;e.stopPropagation(),this._sliderElementOffsetLeft=this._sliderElement.getBoundingClientRect().left;var n=this.props.value;switch(e.keyCode){case Ln.RIGHT:(n+=5)>this.state.max&&(n=this.state.max);break;case Ln.LEFT:(n-=5)<this.state.min&&(n=this.state.min)}this.setState({value:n,dragging:!1},(function(){t.props.onChange(n)}))},i.mouseEventToValue=function(e,t){var n=(e.touches&&e.touches.length>0?e.touches[0].clientX:e.changedTouches?e.changedTouches[0].pageX:e.clientX)-this._sliderElement.getBoundingClientRect().left,r=Math.round(n/this._sliderElement.clientWidth*100);return this.getValueByPersentage(r)<t.min?t.min:this.getValueByPersentage(r)>t.max?t.max:this.getValueByPersentage(r)},i.getValueByPersentage=function(e){return this.state.max/100*e},i.getPercentageByValue=function(){return Math.round(this.state.value/this.state.max*100)},i.render=function(e){var t=this;return N("div",{role:"slider","aria-valuemin":this.state.min,"aria-valuenow":this.state.value,"aria-valuemax":this.state.max,"aria-labelledby":e.name,tabIndex:"0",ref:function(n){n&&(t._sliderElement=n,e.pushRef&&e.pushRef(n))},className:pr.a.slider,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler,onKeyDown:this.onKeyDown},N("div",{className:pr.a.progress,style:{width:this.getPercentageByValue()+"%"}},N("div",{className:pr.a.handle,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler})))},r}(B);_u.displayName="Slider";var Eu,ku=function(e){return N("div",{className:e.classNames.join(" ")},N("label",{id:e.styleName},N(bn,{id:e.labelId})),N(_u,{name:e.styleName,pushRef:function(t){e.addAccessibleChild(t)},min:0,max:100,value:100*e.value,onChange:function(t){var n={};n[e.styleName]=t/100,e.changeCustomStyle(n)}}))};function Tu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Au(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var wu,Su,Cu,xu,Iu=Sr(Eu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Au(Tu(t=e.call.apply(e,[this].concat(r))||this),"changeCaptionsStyle",(function(){t.props.changeCaptionsStyle(t.props.customTextStyle)})),Au(Tu(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.changeCaptionsStyle()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.focusOnDefault()},i.render=function(e){var t=this.props.player,n=t.TextStyle.FontFamily,r=t.TextStyle.EdgeStyles,i=t.TextStyle.StandardColors,a=t.TextStyle.FontSizes.map((function(t){return{value:t.label,label:t.label,active:e.customTextStyle.fontSize===t.label}})),o=Object.keys(i).map((function(t){return{value:i[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.fontColor.every((function(e,n){return e===i[t][n]}))}})),s=Object.keys(n).map((function(t){return{value:n[t],label:n[t],active:e.customTextStyle.fontFamily===n[t]}})),l=Object.keys(r).map((function(t){return{value:r[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.fontEdge===r[t]}})),u=Object.keys(i).map((function(t){return{value:i[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.backgroundColor.every((function(e,n){return e===i[t][n]}))}}));return N("div",{className:[pr.a.overlayScreen,pr.a.active].join(" ")},N("form",{className:[pr.a.form,pr.a.customCaptionForm].join(" ")},N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.size_label",options:a,classNames:[pr.a.formGroupRow,pr.a.fontSize],styleName:"fontSize",changeCustomStyle:e.changeCustomStyle}),N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_color_label",options:o,classNames:[pr.a.formGroupRow,pr.a.fontColor],styleName:"fontColor",changeCustomStyle:e.changeCustomStyle}),N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_family_label",options:s,classNames:[pr.a.formGroupRow,pr.a.fontFamily],styleName:"fontFamily",changeCustomStyle:e.changeCustomStyle}),N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_style_label",options:l,classNames:[pr.a.formGroupRow,pr.a.fontStyle],styleName:"fontEdge",changeCustomStyle:e.changeCustomStyle}),N(ku,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_opacity_label",value:e.customTextStyle.fontOpacity,classNames:[pr.a.formGroupRow,pr.a.fontOpacity],styleName:"fontOpacity",changeCustomStyle:e.changeCustomStyle}),N(vu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.background_color_label",options:u,classNames:[pr.a.formGroupRow,pr.a.backgroundColor],styleName:"backgroundColor",changeCustomStyle:e.changeCustomStyle}),N(ku,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.background_opacity_label",value:e.customTextStyle.backgroundOpacity,classNames:[pr.a.formGroupRow,pr.a.backgroundOpacity],styleName:"backgroundOpacity",changeCustomStyle:e.changeCustomStyle}),N("div",{className:pr.a.formGroupRow},N("a",{role:"button",tabIndex:"0",ref:function(t){e.addAccessibleChild(t)},onClick:this.changeCaptionsStyle,onKeyDown:this.onKeyDown,className:[pr.a.btn,pr.a.btnBranded,pr.a.btnBlock].join(" ")},N(bn,{id:"cvaa.apply"}))),N("div",{className:pr.a.previewContainer},N("span",{style:e.getPreviewStyle()},N(bn,{id:"cvaa.caption_preview"})))))},r}(B))||Eu;function Pu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Du(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ru(){return(Ru=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Ou,Lu={Main:"main",CustomCaptions:"custom-captions"},Mu=(wu=$t((function(e){return{style:e.cvaa.style}}),ur(Ru({},na,sr))),Su=jn("CVAAOverlay"),Cu=fi("CVAAOverlay"),wu(xu=Sr(xu=Su(xu=Cu(xu=Va(xu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Du(Pu(t=e.call.apply(e,[this].concat(r))||this),"transitionToState",(function(e){t.setState({activeWindow:e})})),Du(Pu(t),"changeCaptionsStyle",(function(e){t.props.updateCaptionsStyle(e),t.props.player.textStyle=e,t.props.onClose(),t.props.notifyClick({textStyle:e})})),Du(Pu(t),"getPreviewStyle",(function(){return"font-size: "+100*t.state.customTextStyle.implicitFontScale+"%!important; "+t.state.customTextStyle.toCSS()})),Du(Pu(t),"changeCustomStyle",(function(e){t.setState((function(t){var n=t.customTextStyle.clone();return{customTextStyle:Object.assign(n,e)}}))})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUnmount=function(){this.setState({activeWindow:Lu.Main})},i.componentWillMount=function(){var e=this.props.player;this.setState({activeWindow:Lu.Main,customTextStyle:e.textStyle}),this.props.setIsModal(!0)},i.render=function(e){return e.clearAccessibleChildren(),N(ju,{open:!0,handleKeyDown:this.props.handleKeyDown,addAccessibleChild:this.props.addAccessibleChild,onClose:e.onClose,type:"cvaa"},this.state.activeWindow===Lu.Main?N(su,{cvaaOverlayState:Lu,addAccessibleChild:e.addAccessibleChild,captionsStyleDefault:this.captionsStyleDefault,captionsStyleBlackBG:this.captionsStyleBlackBG,captionsStyleYellow:this.captionsStyleYellow,changeCaptionsStyle:this.changeCaptionsStyle,transitionToState:this.transitionToState,customTextStyle:this.state.customTextStyle}):N(Iu,{addAccessibleChild:e.addAccessibleChild,focusOnDefault:this.props.focusOnDefault,changeCaptionsStyle:this.changeCaptionsStyle,changeCustomStyle:this.changeCustomStyle,getPreviewStyle:this.getPreviewStyle,customTextStyle:this.state.customTextStyle}))},r}(B))||xu)||xu)||xu)||xu)||xu);function Nu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Uu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fu(){return(Fu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Mu.displayName="CVAAOverlay";var ju=$t((function(e){return{overlayOpen:e.overlay.isOpen}}),ur(Fu({},sr,wa)))(Ou=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Uu(Nu(t=e.call.apply(e,[this].concat(r))||this),"_timeoutId",null),Uu(Nu(t),"onCloseButtonKeyDown",(function(e){e.keyCode!==Ln.ENTER&&e.keyCode!==Ln.SPACE||(e.preventDefault(),t.props.onClose())})),Uu(Nu(t),"onKeyDown",(function(e){t.props.handleKeyDown&&t.props.handleKeyDown(e)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this._timeoutId=setTimeout((function(){return e.props.addPlayerClass(pr.a.overlayActive)}),0)},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null),this.props.removePlayerClass(pr.a.overlayActive)},i.renderCloseButton=function(e){return e.permanent?void 0:N(En,null,N("a",{role:"button",ref:function(t){e.addAccessibleChild&&e.addAccessibleChild(t)},tabIndex:"0",onClick:function(){e.updateOverlay(!1),e.onClose()},onKeyDown:this.onCloseButtonKeyDown,"aria-label":N(bn,{id:"overlay.close"}),className:pr.a.closeOverlay},N(Eo,{type:vo.Close})))},i.render=function(e){var t=[pr.a.overlay];if(e.type){var n=pr.a[e.type+"-overlay"]?pr.a[e.type+"-overlay"]:e.type+"-overlay";t.push(n)}return e.open&&(this.props.updateOverlay(e.open),t.push(pr.a.active)),N("div",{tabIndex:"-1",className:t.join(" "),role:"dialog",onKeyDown:this.onKeyDown},N("div",{className:pr.a.overlayContents},e.children),this.renderCloseButton(e))},r}(B))||Ou;function Bu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ju.displayName="Overlay";var Hu,Ku,Gu,zu=[{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7 4C5.89543 4 5 4.89543 5 6V13C5 14.1046 5.89543 15 7 15H11C12.1046 15 13 14.1046 13 13V6C13 4.89543 12.1046 4 11 4H7ZM7 6H11V13H7V6Z"},{d:"M15 11H16V18H12V17.2H10V18.1C10 19.2458 10.9971 20 12 20H16C17.0029 20 18 19.2458 18 18.1V10.9C18 9.75416 17.0029 9 16 9H15V11Z"}],Wu=function(e){var t,n;function r(t){var n;return Vu(Bu(n=e.call(this,t)||this),"_timeoutId",null),Vu(Bu(n),"copy",(function(){try{n.props.copy(),n.setState({copySuccess:!0}),n._timeoutId=setTimeout((function(){n.setState({copySuccess:!1})}),2e3)}catch(e){n.setState({copySuccess:!1})}})),Vu(Bu(n),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&n.copy()})),n.setState({copySuccess:!1}),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},i.render=function(e){var t=[pr.a.btnCopyUrl,pr.a.btnBorderless,pr.a.onlyIcon].join(" ");return t+=this.state.copySuccess?" "+pr.a.copied:"",N(En,null,N(ts,{name:"CopyButton"},N(Oo,{label:N(bn,{id:"copy.button"})},N(Bo,{tabIndex:"0",ref:function(t){e.addAccessibleChild&&e.addAccessibleChild(t)},className:t,onClick:this.copy,onKeyDown:this.onKeyDown},N(_o,{id:"copy",color:"#fff",path:zu,width:"24",height:"24",viewBox:"0 0 24 24"}),N(_o,{type:vo.Check})))))},r}(B);function Yu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Vu(Wu,"defaultProps",{icon:vo.Copy}),Wu.displayName="CopyButton";var Xu,$u,Qu,Zu,Ju=(Hu=$t((function(e){return{hasError:e.engine.hasError}}),ur(Tr)),Ku=jn("ErrorOverlay"),Hu(Gu=Sr(Gu=Ku(Gu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qu(Yu(t=e.call.apply(e,[this].concat(r))||this),"copyError",(function(){var e=window.getSelection(),n=document.createRange();n.selectNode(t.sessionEl),e.removeAllRanges(),e.addRange(n),document.execCommand("copy")})),qu(Yu(t),"handleClick",(function(){var e=t.props.player.getMediaInfo();t.props.player.loadMedia(e)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.renderSessionID=function(){var e=this,t=this.props.player,n=t&&t.config&&t.config.session&&t.config.session.id;return n?N("div",{className:pr.a.linkOptionsContainer},N("div",{className:pr.a.copyUrlRow},N("div",{ref:function(t){return t?e.sessionEl=t:void 0},className:pr.a.errorSession},N(bn,{id:"error.default_session_text"})," "," "+n),N(Wu,{copy:this.copyError}))):void 0},i.renderRetryButton=function(){if(this.props.player.getMediaInfo())return N("div",{className:pr.a.controlButtonContainer,onClick:this.handleClick},N(Bo,{className:[pr.a.controlButton,pr.a.retryBtn].join(" ")},N(bn,{id:"error.retry"})))},i.render=function(){return this.props&&this.props.hasError?N("div",{className:"overlay-portal"},N(ju,{open:!0,permanent:!0,type:"error"},N("div",{className:pr.a.errorOverlay},N("p",{className:pr.a.errorText}),N("div",{className:pr.a.svgContainer},N("svg",{width:"124",height:"110",viewBox:"0 0 124 110",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},N("defs",null,N("polygon",{id:"path-1",points:"58.0906294 70 50.7492774 88.8201923 60.1881585 88.8201923 54.22331 107 73.8876457 84.2307692 64.0554779 84.2307692 70.6102564 70"})),N("g",{id:"Player-v3",fill:"none",fillRule:"evenodd"},N("g",{id:"Desktop---Default---Error",transform:"translate(-365 -103)"},N("g",{id:"Cloud",transform:"translate(366 104)"},N("path",{d:"M63.5662942,30.179068 C61.0506558,29.4162424 58.3339083,29 55.5,29 C42.5213084,29 32,37.7304474 32,48.5 C32,48.6497107 32.0020332,48.7990274 32.0060779,48.947932 L32.0060779,48.947932 C20.975194,51.4855427 13,58.8323573 13,67.5 C13,71.2164926 14.4662425,74.6901504 17.0109182,77.6459815 C17.3714483,67.0552274 26.624181,58.1393462 39.3259742,55.0194402 L39.3259742,55.0194402 C39.3212229,54.8326784 39.3188345,54.6453999 39.3188345,54.4576271 C39.3188345,41.956968 49.9040267,31.6467441 63.5662942,30.179068 Z",id:"Combined-Shape",fillOpacity:".08",fill:"#2E2E2E"}),N("path",{d:"M31.0032591,48.1614253 C31.2192187,36.9518144 42.1402046,28 55.5,28 C64.749856,28 73.0886419,32.3249294 77.2653132,39.0733535 C84.8537029,39.7078593 90.7909537,44.3809769 90.9945979,50.1913309 C102.911627,51.5069936 112,59.4322556 112,69 C112,79.5603607 100.981582,88 87.5,88 C84.4639246,88 81.503099,87.5724513 78.7283559,86.7489741 C74.6488476,88.1943213 69.4726739,89 64,89 C58.7323857,89 53.737093,88.2538247 49.7263698,86.9058736 C46.7827225,87.6274324 43.6763865,88 40.5,88 C24.8190401,88 12,78.9101352 12,67.5 C12,58.659353 19.7679337,51.004786 31.0032591,48.1614253 Z",id:"Combined-Shape",stroke:"#666",strokeWidth:"2"}),N("g",{id:"Path-8",strokeLinecap:"round",strokeLinejoin:"round"},N("use",{fill:"#666",xlinkHref:"#path-1"}),N("path",{stroke:"#1D1D1D",strokeWidth:"2",d:"M65.6170644,83.2307692 L76.0725949,83.2307692 L51.7165365,111.432521 L58.8076053,89.8201923 L49.2858112,89.8201923 L57.4073201,69 L72.1718429,69 L65.6170644,83.2307692 Z"})),N("path",{d:"M59.9991166,0 L59.9991166,7.04768642 C59.9991166,7.59997117 60.4468318,8.04768642 60.9991166,8.04768642 C61.5514013,8.04768642 61.9991166,7.59997117 61.9991166,7.04768642 L61.9991166,0 C61.9991166,-0.55228475 61.5514013,-1 60.9991166,-1 C60.4468318,-1 59.9991166,-0.55228475 59.9991166,0 Z M95.3084192,8.85153517 L90.7782537,14.2503762 C90.4232519,14.6734508 90.4784359,15.3042064 90.9015106,15.6592082 C91.3245852,16.01421 91.9553408,15.9590261 92.3103426,15.5359514 L96.8405081,10.1371104 C97.1955099,9.71403572 97.140326,9.08328013 96.7172513,8.72827833 C96.2941766,8.37327654 95.663421,8.4284605 95.3084192,8.85153517 Z M121.628196,36.6783398 L114.687579,37.9021577 C114.143685,37.9980609 113.780517,38.5167193 113.87642,39.0606136 C113.972323,39.6045079 114.490981,39.9676764 115.034876,39.8717732 L121.975492,38.6479553 C122.519386,38.552052 122.882555,38.0333936 122.786652,37.4894993 C122.690748,36.945605 122.17209,36.5824365 121.628196,36.6783398 Z M0.0227411046,38.6479553 L6.96335733,39.8717732 C7.50725163,39.9676764 8.02591002,39.6045079 8.12181326,39.0606136 C8.2177165,38.5167193 7.85454799,37.9980609 7.31065368,37.9021577 L0.37003746,36.6783398 C-0.173856844,36.5824365 -0.69251523,36.945605 -0.788418471,37.4894993 C-0.884321711,38.0333936 -0.521153199,38.552052 0.0227411046,38.6479553 Z M25.157725,10.1371104 L29.6878905,15.5359514 C30.0428923,15.9590261 30.6736479,16.01421 31.0967226,15.6592082 C31.5197972,15.3042064 31.5749812,14.6734508 31.2199794,14.2503762 L26.6898139,8.85153517 C26.3348121,8.4284605 25.7040565,8.37327654 25.2809818,8.72827833 C24.8579072,9.08328013 24.8027232,9.71403572 25.157725,10.1371104 Z",id:"Path-9",fill:"#666",fillRule:"nonzero"})))))),N("div",{className:pr.a.headline},this.props.errorHead?this.props.errorHead:N(bn,{id:"error.default_error"})),this.renderSessionID(),this.renderRetryButton()))):void 0},r}(B))||Gu)||Gu)||Gu);function ec(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function tc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ju.displayName="ErrorOverlay";var nc=(Xu=$t((function(e){return{isLive:e.engine.isLive,isDvr:e.engine.isDvr,currentTime:e.engine.currentTime,duration:e.engine.duration}})),$u=jn("LiveTag"),Qu=fi("LiveTag"),Xu(Zu=Sr(Zu=$u(Zu=Qu(Zu=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return tc(ec(t=e.call.apply(e,[this].concat(r))||this),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&t.onClick()})),tc(ec(t),"onClick",(function(){t.isOnLiveEdge()||(t.props.player.seekToLiveEdge(),t.props.player.paused&&t.props.player.play()),t.props.notifyClick()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.isOnLiveEdge=function(){return this.props.player.isOnLiveEdge()},i.render=function(e){var t=[pr.a.liveTag];return e.isDvr&&!this.isOnLiveEdge()&&t.push(pr.a.nonLivePlayhead),N("div",{tabIndex:"0",className:t.join(" "),onClick:this.onClick,onKeyDown:this.onKeyDown},N(bn,{id:"controls.live"}))},r}(B))||Zu)||Zu)||Zu)||Zu);nc.displayName="LiveTag";var rc,ic,ac,oc,sc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(){return!1},i.render=function(e){return N("div",{className:"overlay-portal","aria-live":"polite"},e.children)},r}(B);function lc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}sc.displayName="OverlayPortal";var uc,cc=(rc=$t((function(e){return{currentTime:e.seekbar.currentTime,virtualTime:e.seekbar.virtualTime,isDraggingActive:e.seekbar.draggingActive,isMobile:e.shell.isMobile,poster:e.engine.poster,isDvr:e.engine.isDvr,dataLoaded:e.engine.dataLoaded}}),ur(Vi)),ic=fi("SeekBarLivePlaybackContainer"),ac=jn("SeekBarLivePlaybackContainer"),rc(oc=Sr(oc=Br(oc=ic(oc=ac(oc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.componentDidMount=function(){var e=this.props,t=e.eventManager,n=e.player,r=e.isDraggingActive,i=e.updateCurrentTime;t.listen(n,n.Event.TIME_UPDATE,(function(){r||i(Math.max(n.normalizedCurrentTime,0))})),t.listen(n,n.Event.LOADED_DATA,(function(){i(Math.max(n.normalizedCurrentTime,0))}))},o.render=function(e){var t=this;if(e.isDvr)return N(Id,{playerElement:this.props.playerContainer,showFramePreview:this.props.showFramePreview,showTimeBubble:this.props.showTimeBubble,changeCurrentTime:function(e){t.props.player.isOnLiveEdge()&&e===t.duration||(t.props.player.normalizedCurrentTime=e)},playerPoster:this.props.poster,updateSeekbarDraggingStatus:function(e){return t.props.updateSeekbarDraggingStatus(e)},updateSeekbarHoverActive:function(e){return t.props.updateSeekbarHoverActive(e)},updateSeekbarClientRect:function(e){return t.props.updateSeekbarClientRect(e)},updateCurrentTime:function(e){return t.props.updateCurrentTime(e)},updateVirtualTime:function(e){return t.props.updateVirtualTime(e)},isDvr:this.props.isDvr,currentTime:this.currentTime,virtualTime:this.props.virtualTime,duration:this.duration,isDraggingActive:this.props.isDraggingActive,isMobile:this.props.isMobile,notifyChange:function(e){return t.props.notifyChange(e)},forceFullProgress:this.props.player.isOnLiveEdge(),dataLoaded:this.props.dataLoaded})},i=r,(a=[{key:"currentTime",get:function(){return Math.min(this.props.currentTime,this.duration)}},{key:"duration",get:function(){return this.props.player.normalizedDuration}}])&&lc(i.prototype,a),r}(B))||oc)||oc)||oc)||oc)||oc);function pc(){return(pc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function dc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}cc.displayName="SeekBarLivePlaybackContainer";var fc=$t((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize}}),ur(sr))(uc=Va(uc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.componentWillMount=function(){this.props.addPlayerClass(pr.a.smartContainerOpen),this.props.updateSmartContainerOpen(!0)},o.componentWillUnmount=function(){this.props.removePlayerClass(pr.a.smartContainerOpen),this.props.updateSmartContainerOpen(!1)},o.componentDidMount=function(){this.props.setIsModal(this.isPortal)},o.render=function(e){var t=document.getElementById(this.props.targetId)||document;return e.clearAccessibleChildren(),this.isPortal?Xe(N(ju,{open:!0,onClose:e.onClose,handleKeyDown:this.props.handleKeyDown,addAccessibleChild:this.props.addAccessibleChild},N("div",{className:pr.a.title},e.title),this.renderChildren(e)),t.querySelector(".overlay-portal")):N("div",{onKeyDown:e.handleKeyDown,tabIndex:"-1",className:[pr.a.smartContainer,pr.a.top,pr.a.left].join(" ")},this.renderChildren(e))},o.renderChildren=function(e){var t=this;return W(e.children).map((function(n){if(n)return ie(n,pc({pushRef:function(t){e.addAccessibleChild(t)}},t.props))}))},i=r,(a=[{key:"isPortal",get:function(){return this.props.isMobile||this.props.isSmallSize}}])&&dc(i.prototype,a),r}(B))||uc)||uc;fc.displayName="SmartContainer";var hc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=e.label&&e.label.toLowerCase();return N("div",{className:[pr.a.smartContainerItem,pr.a.selectMenuItem].join(" ")},N("label",{id:t,htmlFor:t},e.icon?N("div",{className:pr.a.labelIcon},N(Eo,{type:e.icon})):void 0,e.label),e.options&&e.options.length?N(yu,{pushRef:function(t){e.pushRef(t)},name:t,onMenuChosen:function(t){return e.onMenuChosen(t)},options:e.options}):N("div",{style:{paddingLeft:"20px"}},N(Op,{pushRef:function(t){e.pushRef(t)},name:t,isChecked:e.isChecked,onMenuChosen:function(t){return e.onMenuChosen(t)}})))},r}(B);hc.displayName="SmartContainerItem";var gc,yc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getTimeDisplay=function(e,t,n){var r=n||"current / total",i=Ha(e),a=Ha(t),o=Ha(t-e);return(r=(r=r.replace(/current/g,i)).replace(/total/g,a)).replace(/left/g,o)},i.render=function(e){return N("div",{className:pr.a.timeDisplay},N("span",null,this.getTimeDisplay(e.currentTime,e.duration,e.format)))},r}(B);function vc(){return(vc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}yc.displayName="TimeDisplay";var mc,bc=$t((function(e){return{adProgress:e.engine.adProgress}}))(gc=jn("TimeDisplayAdsContainer")(gc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return N(yc,vc({currentTime:Math.round(e.adProgress.currentTime),duration:Math.round(e.adProgress.duration)},e))},r}(B))||gc)||gc;function _c(){return(_c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}bc.displayName="TimeDisplayAdsContainer";var Ec,kc=$t((function(e){return{currentTime:e.engine.currentTime,duration:e.engine.duration}}))(mc=jn("TimeDisplayPlaybackContainer")(mc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return N(yc,_c({currentTime:e.currentTime,duration:e.duration},e))},r}(B))||mc)||mc;kc.displayName="TimeDisplayPlaybackContainer";var Tc,Ac,wc,Sc=$t((function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded}}))(Ec=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=e.disabled,n=e.isPlaybackEnded,r=e.isCasting,i=e.leftControls,a=e.rightControls,o=[pr.a.topBar];return t&&o.push(pr.a.disabled),r&&n&&o.push(pr.a.hide),N("div",{className:o.join(" ")},N("div",{className:pr.a.topBarArea},N(qn,{name:"TopBar"})),e.children,N("div",{className:pr.a.leftControls},N(qn,{name:"TopBarLeftControls"},i)),N("div",{className:pr.a.rightControls},N(qn,{name:"TopBarRightControls"},a)))},r}(B))||Ec;function Cc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Sc.displayName="TopBar";var Ic,Pc,Dc,Rc=(Tc=$t((function(e){return{fallbackToMutedAutoPlay:e.engine.fallbackToMutedAutoPlay}}),null),Ac=jn("UnmuteIndication"),Tc(wc=Sr(wc=Br(wc=Ac(wc=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xc(Cc(t=e.call.apply(e,[this].concat(r))||this),"_iconTimeout",null),xc(Cc(t),"onKeyDown",(function(e){e.keyCode===Ln.ENTER&&(t.props.player.muted=!t.props.player.muted)})),xc(Cc(t),"onMouseOver",(function(){return t.setState({iconOnly:!1})})),xc(Cc(t),"onMouseOut",(function(){return t.setState({iconOnly:!0})})),xc(Cc(t),"onMouseUp",(function(){return t.props.player.muted=!t.props.player.muted})),xc(Cc(t),"onTouchEnd",(function(e){return e.stopImmediatePropagation()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(e){var t=this;!e.fallbackToMutedAutoPlay&&this.props.fallbackToMutedAutoPlay&&(this.props.eventManager.listenOnce(this.props.player,this.props.player.Event.PLAYING,(function(){return t._iconOnlyTimeout()})),this.props.eventManager.listenOnce(this.props.player,this.props.player.Event.AD_STARTED,(function(){return t._iconOnlyTimeout()})))},i.componentWillUnmount=function(){this._iconTimeout&&(clearTimeout(this._iconTimeout),this._iconTimeout=null)},i._iconOnlyTimeout=function(){var e=this;this._iconTimeout=setTimeout((function(){e.setState({iconOnly:!0})}),3e3)},i.render=function(e){if(this.props.fallbackToMutedAutoPlay){var t=[pr.a.unmuteButtonContainer];return e.hasTopBar&&t.push(pr.a.hasTopBar),this.state.iconOnly&&t.push(pr.a.showIconOnly),N(En,null,N("div",{tabIndex:"0","aria-label":N(bn,{id:"controls.unmute"}),className:t.join(" "),onMouseOver:this.onMouseOver,onMouseOut:this.onMouseOut,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown},N("a",{className:[pr.a.btn,pr.a.btnDarkTransparent,pr.a.unmuteButton].join(" ")},N("div",{className:pr.a.unmuteIconContainer},N(Eo,{type:vo.VolumeBase}),N(Eo,{type:vo.VolumeMute})),N("span",null,N(bn,{id:"unmute.unmute"})))))}},r}(B))||wc)||wc)||wc)||wc);Rc.displayName="UnmuteIndication";var Oc,Lc,Mc,Nc=(Ic=$t((function(e){return{config:Object.assign({placement:"top-left",timeout:0},e.config.components.watermark)}})),Pc=jn("Watermark"),Ic(Dc=Sr(Dc=Br(Dc=Pc(Dc=function(e){var t,n;function r(){var t;return function(e,t,n){t in e?Object.defineProperty(e,t,{value:null,enumerable:!0,configurable:!0,writable:!0}):e[t]=null}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call(this)||this),"_timeoutId"),t.setState({show:!0}),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=function(){e.props.config.timeout>0&&(e._timeoutId=setTimeout((function(){return e.setState({show:!1})}),e.props.config.timeout))},n=this.props.player;this.props.eventManager.listenOnce(n,n.Event.PLAYING,t),this.props.eventManager.listen(n,n.Event.CHANGE_SOURCE_ENDED,(function(){e.setState({show:!0}),e.props.eventManager.listenOnce(n,n.Event.PLAYING,t)}))},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},i.render=function(e){if(e.config.img){var t=[pr.a.watermark];return e.config.placement.split("-").forEach((function(e){t.push(pr.a[e])})),e.config.url||t.push(pr.a.emptyUrl),this.state.show||t.push(pr.a.hideWatermark),N("div",{className:t.join(" ")},N("a",{href:e.config.url,target:"_blank",rel:"noopener noreferrer"},N("img",{src:e.config.img})))}},r}(B))||Dc)||Dc)||Dc)||Dc);Nc.displayName="Watermark";var Uc,Fc,jc,Bc=(Oc=$t((function(e){return{isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,config:e.config.components.logo}})),Lc=jn("Logo"),Oc(Mc=Sr(Mc=Lc(Mc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._shouldRender=function(){return!(0===Object.keys(this.props.config).length&&this.props.config.constructor===Object)},i.render=function(e){if(this._shouldRender()){var t=[Ei.TINY,Ei.EXTRA_SMALL,Ei.SMALL].includes(this.props.playerSize);return e.config.img&&!t?N("div",{className:[pr.a.controlButtonContainer,e.config.url?"":pr.a.emptyUrl].join(" "),"aria-label":N(bn,{id:"controls.logo"}),title:e.config.text},N("a",{className:pr.a.controlButton,href:e.config.url,target:"_blank",rel:"noopener noreferrer"},N("img",{className:pr.a.icon,src:e.config.img}))):void 0}},r}(B))||Mc)||Mc)||Mc);Bc.displayName="Logo";var Vc,Hc,Kc,Gc,zc,Wc=$t((function(e){return{poster:e.engine.poster,castSession:e.engine.castSession,isIdle:e.engine.isIdle,isPlaying:e.engine.isPlaying,isPlaybackEnded:e.engine.isPlaybackEnded,isPaused:e.engine.isPaused,isChangingSource:e.engine.isChangingSource}}))(Uc=jn("CastOverlay")((jc=Fc=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.getStatus=function(){return this.props.isPlaying||this.props.isPaused?N(bn,{id:"cast.status.playing_on"}):this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?N(bn,{id:"cast.status.connected_to"}):N(bn,{id:"cast.status.connecting_to"})},i.getIcon=function(){return this.props.isPlaying||this.props.isPaused||this.props.isPlaybackEnded||this.props.isChangingSource||this.props.castSession.resuming?N(_o,{type:this.props.icon}):N("div",{className:pr.a.castConnectingSpinner})},i.render=function(e){if(e.castSession){var t={},n=[pr.a.castPoster];e.poster&&(t={backgroundImage:e.isChangingSource?"":"url("+e.poster+")",backgroundSize:"contain"},n.push(pr.a.hasPoster));var r=this.getStatus(),i=this.getIcon();return N("div",null,N("div",{className:pr.a.castOverlay},N("div",{className:n.join(" "),style:t,onMouseOver:function(e){return e.stopPropagation()}}),N("div",{className:pr.a.castBlackCover})),N("div",{className:pr.a.castBox},N("div",{className:pr.a.castIcon},i),N("div",{className:pr.a.castText},N(En,null,N("span",{className:pr.a.castStatus},r)),N("br",null),N("span",{className:pr.a.castDevice},e.castSession.deviceFriendlyName))))}},r}(B),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Fc,"defaultProps",{icon:vo.Cast}),Uc=jc))||Uc)||Uc;function Yc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Wc.displayName="CastOverlay";var Xc,$c,Qc,Zc,Jc,ep=(Vc=$t((function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,prePlayback:e.engine.prePlayback,loading:e.loading.show,isCastAvailable:e.engine.isCastAvailable}})),Hc=jn("CastBeforePlay"),Vc(Kc=Sr(Kc=Hc((zc=Gc=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return qc(Yc(t=e.call.apply(e,[this].concat(r))||this),"_timeoutId",null),qc(Yc(t),"onClick",(function(){t.props.player.startCasting(js)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this._timeoutId=setTimeout((function(){e.setState({show:!0})}),700)},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},i.render=function(e){if(e.isCastAvailable&&!e.loading&&e.prePlayback){var t=[pr.a.castOnTvButtonContainer];return this.state.show&&t.push(pr.a.showCastOnTv),N("div",{className:t.join(" ")},N(En,null,N(Bo,{tabIndex:"0","aria-label":N(bn,{id:"cast.play_on_tv"}),onClick:this.onClick,className:[pr.a.btn,pr.a.btnDarkTransparent,pr.a.castOnTvButton].join(" ")},N("div",{className:pr.a.castOnTvIconContainer},N(_o,{type:e.icon})),N("span",null,N(bn,{id:"cast.play_on_tv"})))))}},r}(B),qc(Gc,"defaultProps",{icon:vo.Cast}),Kc=zc))||Kc)||Kc)||Kc);function tp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function np(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ep.displayName="CastBeforePlay";var rp,ip=(Xc=$t((function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,isCasting:e.engine.isCasting}}),null),$c=jn("CastAfterPlay"),Xc(Qc=Sr(Qc=$c((Jc=Zc=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return np(tp(t=e.call.apply(e,[this].concat(r))||this),"_timeoutId",null),np(tp(t),"onClick",(function(e){e.stopPropagation(),t.props.player.stopCasting()})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this._timeoutId=setTimeout((function(){e.setState({show:!0})}),700)},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},i.render=function(e){if(e.isCasting&&e.isPlaybackEnded){var t=[pr.a.castOnTvButtonContainer];return this.state.show&&t.push(pr.a.showCastOnTv),N("div",null,N("div",{className:t.join(" "),onClick:this.onClick},N("a",{className:[pr.a.btn,pr.a.btnDarkTransparent,pr.a.castOnTvButton].join(" ")},N("div",{className:pr.a.castOnTvIconContainer},N(_o,{type:e.icon})),N(En,null,N("span",null,N(bn,{id:"cast.disconnect_from_tv"}))))))}},r}(B),np(Zc,"defaultProps",{icon:vo.CastBrand}),Qc=Jc))||Qc)||Qc)||Qc);ip.displayName="CastAfterPlay";var ap,op=An({prevControlsText:"controls.prev",nextControlsText:"controls.next",playlistPrevText:"playlist.prev",playlistUpNextText:"playlist.up_next"})(rp=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t,n,r=e.type,i=e.item,a=e.onClick,o="next"===r?vo.Next:vo.Prev,s=e[e.type+"ControlsText"],l="prev"===r?this.props.playlistPrevText:this.props.playlistUpNextText,u=null==i||null==(t=i.sources)?void 0:t.poster,c=(null==i||null==(n=i.sources)?void 0:n.metadata)?i.sources.metadata.name:"",p=N(Bo,{disabled:!i,tabIndex:"0","aria-label":s,className:""+pr.a.controlButton,onClick:a},N("div",null,N(Eo,{type:o})));return N("div",{className:[pr.a.controlButtonContainer,pr.a.controlPlaylistButton].join(" ")},e.showPreview&&(u||c)?N(j,null,N("div",{className:pr.a.posterPreview},u?N("div",{className:pr.a.posterPreviewImg,style:"background-image: url("+u+");"}):void 0,N("div",{className:pr.a.posterPreviewText},N("div",{className:pr.a.posterPreviewTextTitle},l),N("div",{className:pr.a.posterPreviewTextName},""+(c||"")))),p):N(Oo,{label:s},p))},r}(B))||rp;function sp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function lp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var up,cp,pp,dp=$t((function(e){return{playlist:e.engine.playlist}}))(ap=Sr(ap=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return lp(sp(t=e.call.apply(e,[this].concat(r))||this),"onClick",(function(){"prev"===t.props.type?t.props.player.playlist.playPrev():t.props.player.playlist.playNext()})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=e.playlist[e.type];return N(op,{type:e.type,item:t,onClick:this.onClick.bind(this),showPreview:e.showPreview})},r}(B))||ap)||ap;function fp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}dp.displayName="PlaylistButton";var gp,yp,vp,mp,bp,_p,Ep=(up=$t((function(e){return{playlist:e.engine.playlist,isPlaybackEnded:e.engine.isPlaybackEnded}})),cp=jn("PlaylistNextScreen"),up(pp=Sr(pp=cp(pp=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return hp(fp(t=e.call.apply(e,[this].concat(r))||this),"onPosterClick",(function(){t.props.player.playlist.playNext()})),hp(fp(t),"onKeyDown",(function(e){e.keyCode!==Ln.ENTER&&e.keyCode!==Ln.SPACE||(e.preventDefault(),t.onPosterClick())})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidUpdate=function(e){!this._shouldRender(e)&&this._shouldRender(this.props)&&this.focusElement&&this.focusElement.focus()},i._shouldRender=function(e){return!(!(e.playlist&&e.playlist.next&&e.playlist.next.sources&&e.isPlaybackEnded)||e.player.playlist.options.autoContinue)},i._getPosterUrl=function(){var e=this.props.playlist.next;return e.sources.poster?e.sources.poster.indexOf("entry_id/"+e.sources.id)>-1&&-1===e.sources.poster.indexOf("/width/")?e.sources.poster+"/width/384":e.sources.poster:""},i.render=function(e){var t=this;if(this._shouldRender(e)){var n=e.playlist.next;return N("div",{className:pr.a.playlistNextScreenOverlay},N("div",{className:pr.a.playlistNextScreenContent},N("div",{id:"playlistNextScreenTextId",className:pr.a.playlistNextScreenText},N(En,null,N("div",{className:pr.a.playlistNextScreenTextTitle},N(bn,{id:"playlist.next"}))),N("div",{className:pr.a.playlistNextScreenTextName},""+(n.sources.metadata?n.sources.metadata.name:""))),N("div",{className:pr.a.playlistNextScreenPosterPlaceholder},N("div",{className:pr.a.playlistNextScreenPosterAspectRatio},N("div",{role:"button","aria-labelledby":"playlistNextScreenTextId",ref:function(e){return e?t.focusElement=e:void 0},tabIndex:"0",className:pr.a.playlistNextScreenPoster,onClick:this.onPosterClick,onKeyDown:this.onKeyDown},N("div",{className:pr.a.playlistNextScreenPosterImg,style:"background-image: url("+this._getPosterUrl()+");"}),N(Eo,{type:vo.Play}))))))}},r}(B))||pp)||pp)||pp);function kp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Tp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ep.displayName="PlaylistNextScreen";var Ap,wp=(gp=$t((function(e){return{isPictureInPictureSupported:e.engine.isPictureInPictureSupported,isInPictureInPicture:e.engine.isInPictureInPicture,playerSize:e.shell.playerSize}}),ur(sr)),yp=Fs("PictureInPicture"),vp=jn("PictureInPicture"),mp=fi("PictureInPicture"),bp=An({pictureInPictureText:"controls.pictureInPicture",pictureInPictureExitText:"controls.pictureInPictureExit",pictureInPictureExpandText:"controls.pictureInPictureExpand"}),gp(_p=Sr(_p=yp(_p=vp(_p=mp(_p=bp(_p=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Tp(kp(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.P},action:function(){t.togglePip(),t.props.updatePlayerHoverState(!0)}}]),Tp(kp(t),"togglePip",(function(){var e=t.props.player;e.isInPictureInPicture()?(t.props.logger.debug("Exit Picture In Picture"),t.props.notifyClick(),e.exitPictureInPicture()):(t.props.logger.debug("Enter Picture In Picture"),t.props.notifyClick(),e.enterPictureInPicture())})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.render=function(){if(this.props.isPictureInPictureSupported&&this.props.playerSize!==Ei.EXTRA_SMALL)return N(ts,{name:"PictureInPicture"},N(Oo,{label:this.props.isInPictureInPicture?this.props.pictureInPictureExpandText:this.props.pictureInPictureText},N(Bo,{tabIndex:"0","aria-label":this.props.isInPictureInPicture?this.props.pictureInPictureExitText:this.props.pictureInPictureText,className:this.props.isInPictureInPicture?[pr.a.controlButton,pr.a.isInPictureInPicture].join(" "):pr.a.controlButton,onClick:this.togglePip},N(Eo,{type:vo.PictureInPictureStart}),N(Eo,{type:vo.PictureInPictureStop}))))},r}(B))||_p)||_p)||_p)||_p)||_p)||_p);wp.displayName="PictureInPicture";var Sp=$t((function(e){return{playlist:e.engine.playlist}}))(Ap=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.setState({shouldUpdate:!1})},i.componentDidUpdate=function(e){!!e.playlist!=!!this.props.playlist&&this.setState({shouldUpdate:!0})},i.render=function(e){var t=e.name,n=e.className,r=this.state.shouldUpdate;return r&&this.setState({shouldUpdate:!1}),N("div",{className:[pr.a.playbackControls,n].join(" ")},N(qn,{name:t,shouldUpdate:r},e.playlist?N(j,null,N(dp,{type:"prev",showPreview:e.showPreview}),N(ll,null),N(dp,{type:"next",showPreview:e.showPreview})):N(ll,null)))},r}(B))||Ap;function Cp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Sp.displayName="PlaybackControls";var Ip,Pp,Dp,Rp,Op=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return xp(Cp(t=e.call.apply(e,[this].concat(r))||this),"onChange",(function(e){t.props.onMenuChosen(e)})),xp(Cp(t),"handleOnKeyDown",(function(e){e.keyCode!==Ln.ENTER&&e.keyCode!==Ln.SPACE||(e.preventDefault(),t.onChange(!t.props.isChecked))})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){var t=this;return N("label",{onKeyDown:function(e){return t.handleOnKeyDown(e)},className:pr.a.switch,ref:function(t){e.pushRef&&e.pushRef(t)},"aria-label":e.name,role:"switch","aria-checked":e.isChecked,tabIndex:"-1"},N("input",{name:e.name,className:pr.a.toggleInput,type:"checkbox",checked:e.isChecked,onChange:function(e){return t.onChange(e.target.checked)}}),N("span",{className:pr.a.slider}))},r}(B);Op.displayName="ToggleSwitch";var Lp,Mp,Np,Up,Fp,jp,Bp=(Ip=$t((function(e){return{audioTracks:e.engine.audioTracks}}),ur(sa)),Pp=fi("AudioMenu"),Dp=An({audioLabelText:"settings.audio"}),Ip(Rp=Sr(Rp=Pp(Rp=Dp(Rp=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.onAudioChange=function(e){this.props.updateAudio(e),this.props.player.selectTrack(e),this.props.notifyClick({type:this.props.player.Track.AUDIO,track:e})},i.render=function(e){var t=this,n=e.audioTracks.filter((function(e){return e.label||e.language})).map((function(e){return{label:e.label||e.language,active:e.active,value:e}}));return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Audio,label:this.props.audioLabelText,options:n,onMenuChosen:function(e){return t.onAudioChange(e)}})},r}(B))||Rp)||Rp)||Rp)||Rp);function Vp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Bp.displayName="AudioMenu";var Kp,Gp,zp,Wp,Yp,qp,Xp=(Lp=$t((function(e){return{textTracks:e.engine.textTracks,isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,showAdvancedCaptionsMenu:e.config.settings.showAdvancedCaptionsMenu}}),ur(na)),Mp=Fs("CaptionsMenu"),Np=jn("CaptionsMenu"),Up=fi("CaptionsMenu"),Fp=An({captionsLabelText:"captions.captions",advancedCaptionsSettingsText:"captions.advanced_captions_settings"}),Lp(jp=Sr(jp=Br(jp=Mp(jp=Np(jp=Up(jp=Fp(jp=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Hp(Vp(t=e.call.apply(e,[this].concat(r))||this),"_lastActiveTextLanguage",""),Hp(Vp(t),"_keyboardEventHandlers",[{key:{code:Ln.C},action:function(){var e=t.props,n=e.player,r=e.logger,i=n.getActiveTracks().text;if(i)if("off"===i.language&&t._lastActiveTextLanguage){r.debug("Changing text track to language",t._lastActiveTextLanguage);var a=n.getTracks("text").find((function(e){return e.language===t._lastActiveTextLanguage}));n.selectTrack(a)}else"off"===i.language||t._lastActiveTextLanguage||(r.debug("Hiding text track"),t._lastActiveTextLanguage=i.language,n.hideTextTrack())}}]),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentWillReceiveProps=function(e){var t=this.props.textTracks.find((function(e){return e.active})),n=e.textTracks.find((function(e){return e.active}));t&&"off"!==t.language&&n&&"off"===n.language?this._lastActiveTextLanguage=t.language:n&&"off"!==n.language&&(this._lastActiveTextLanguage="")},i.onCaptionsChange=function(e){e!==this.props.advancedCaptionsSettingsText?(this.props.player.selectTrack(e),this.props.notifyClick({type:this.props.player.Track.TEXT,track:e})):this.props.onAdvancedCaptionsClick()},i.render=function(e){var t=this,n=e.textTracks.map((function(e){return{label:e.label||e.language,active:e.active,value:e}}));return e.showAdvancedCaptionsMenu&&n.push({label:e.advancedCaptionsSettingsText,value:e.advancedCaptionsSettingsText,active:!1}),N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Captions,label:this.props.captionsLabelText,options:n,onMenuChosen:function(e){return t.onCaptionsChange(e)}})},r}(B))||jp)||jp)||jp)||jp)||jp)||jp)||jp);function $p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Xp.displayName="CaptionsMenu";var Zp,Jp,ed,td,nd=(Kp=$t(null,ur(sa)),Gp=Fs("SpeedMenu"),zp=jn("SpeedMenu"),Wp=fi("SpeedMenu"),Yp=An({speedLabelText:"settings.speed",speedNormalLabelText:"settings.speedNormal"}),Kp(qp=Sr(qp=Gp(qp=zp(qp=Wp(qp=Yp(qp=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Qp($p(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.PERIOD,shiftKey:!0},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.SEMI_COLON,shiftKey:!0},action:function(e){t.handleKeydown(e)}},{key:{code:Ln.COMMA,shiftKey:!0},action:function(e){t.handleKeydown(e)}}]),Qp($p(t),"onSpeedChange",(function(e){t.props.updateSpeed(e),t.props.player.playbackRate=e,t.props.notifyClick({type:"speed",speed:e})})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.handleKeydown=function(e){var t,n,r=this.props,i=r.player,a=r.logger;switch(e.keyCode){case Ln.PERIOD:t=i.playbackRate,(n=i.playbackRates.indexOf(t))<i.playbackRates.length-1&&(a.debug("Changing playback rate. "+t+" => "+i.playbackRates[n+1]),i.playbackRate=i.playbackRates[n+1],this.props.updateOverlayActionIcon(vo.SpeedUp),i.dispatchEvent(new Wr(i.playbackRate)));break;case Ln.SEMI_COLON:i.playbackRate!==i.defaultPlaybackRate&&(a.debug("Changing playback rate. "+i.playbackRate+" => "+i.defaultPlaybackRate),i.playbackRate=i.defaultPlaybackRate,this.props.updateOverlayActionIcon(vo.Speed),i.dispatchEvent(new Wr(i.playbackRate)));break;case Ln.COMMA:t=i.playbackRate,(n=i.playbackRates.indexOf(t))>0&&(a.debug("Changing playback rate. "+t+" => "+i.playbackRates[n-1]),i.playbackRate=i.playbackRates[n-1],this.props.updateOverlayActionIcon(vo.SpeedDown),i.dispatchEvent(new Wr(i.playbackRate)))}},i.render=function(e){var t=e.player.playbackRates.reduce((function(t,n){var r={value:n,label:1===n?e.speedNormalLabelText:n,active:!1};return n===e.player.playbackRate&&(r.active=!0),t.push(r),t}),[]);return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Speed,label:e.speedLabelText,options:t,onMenuChosen:this.onSpeedChange})},r}(B))||qp)||qp)||qp)||qp)||qp)||qp);nd.displayName="SpeedMenu";var rd={HD:1080,UHD_4K:2160,UHD_8K:4320};function id(e){var t=Object.keys(mo),n=t[0],r=t[2],i=t[4];return e>=rd.HD&&e<rd.UHD_4K?n:e>=rd.UHD_4K&&e<rd.UHD_8K?r:e>=rd.UHD_8K?i:null}var ad,od=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],sd=(Zp=$t((function(e){return{videoTracks:e.engine.videoTracks}}),ur(sa)),Jp=fi("QualityMenu"),ed=An({qualityLabelText:"settings.quality",qualityAutoLabelText:"settings.qualityAuto"}),Zp(td=Sr(td=Jp(td=ed(td=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.onQualityChange=function(e){this.props.updateQuality(e);var t=this.props.player;"auto"===e?t.enableAdaptiveBitrate():t.selectTrack(e),this.props.notifyClick({type:t.Track.VIDEO,track:e})},i.filterUniqueQualities=function(e,t){var n=e.length-1,r=e[n];return n>-1&&t.label===r.label?(t.bandwidth>r.bandwidth&&(e[n]=t),e[n].active=t.active||r.active):e.push(t),e},i.render=function(e){var t=this,n=e.videoTracks.sort((function(e,t){return e.height<t.height?1:-1})).filter((function(e){return e.bandwidth||e.height})).reduce(this.filterUniqueQualities,[]).map((function(t){return{label:t.label,active:!e.player.isAdaptiveBitrateEnabled()&&t.active,value:t,badgeType:id(t.height)}}));if(n.length>1&&"progressive"!==e.player.streamType){var r,i=n.find((function(e){return!0===e.value.active})).value;r=od.includes(this.props.player._localPlayer._config.ui.locale)?i.label+" - "+this.props.qualityAutoLabelText:this.props.qualityAutoLabelText+" - "+i.label,n.unshift({label:this.props.qualityAutoLabelText,dropdownOptions:{label:r,badgeType:id(i.height)},active:e.player.isAdaptiveBitrateEnabled(),value:"auto"})}return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.Quality,label:e.qualityLabelText,options:n,onMenuChosen:function(e){return t.onQualityChange(e)}})},r}(B))||td)||td)||td)||td);function ld(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ud(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}sd.displayName="QualityMenu";var cd,pd=$t((function(e){return{isAdvancedAudioDescChecked:e.settings.advancedAudioDesc}}),ur(sa))(ad=fi("AdvancedAudioDescToggle")(ad=An({advancedAudioText:"settings.advancedAudioDescription"})(ad=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return ud(ld(t=e.call.apply(e,[this].concat(r))||this),"onAdvancedAudioClick",(function(e){t.props.updateAdvancedAudioDesc(e),t.props.notifyClick({type:"AdvancedAudioDescription",checked:e})})),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(e){return N(hc,{pushRef:function(t){e.pushRef(t)},icon:vo.AdvancedAudioDescription,label:e.advancedAudioText,isChecked:e.isAdvancedAudioDescChecked,onMenuChosen:this.onAdvancedAudioClick})},r}(B))||ad)||ad)||ad;pd.displayName="AdvancedAudioDescToggle";var dd,fd,hd,gd,yd,vd,md,bd=$t((function(e){return{videoStyles:e.shell.layoutStyles.video}}))(cd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(e){return e.videoStyles!==this.props.videoStyles},i.render=function(){var e=this.props,t=e.videoStyles,n=e.children;return N("div",{style:t,className:pr.a.videoArea},N("div",{style:{pointerEvents:"auto"}},N(qn,{name:"VideoArea"},n)))},r}(B))||cd,_d=Sr(dd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.shouldComponentUpdate=function(){return!1},i.render=function(){var e=this.props.children;return N("div",{className:pr.a.interactiveArea},N("div",{style:{pointerEvents:"auto"}},N(qn,{name:"InteractiveArea"},e)))},r}(B))||dd,Ed=(fd=$t((function(e){return{duration:e.engine.duration}})),Sr(hd=fd(hd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._getFramePreviewImgStyle=function(e){return"background: url("+e.url+");background-position: -"+e.x+"px -"+e.y+"px;"},i._getFramePreviewImgContainerStyle=function(e){return{height:e.height+4+"px",width:e.width+4+"px"}},i.render=function(){var e=this.props.player.getThumbnail(this.props.virtualTime);if(e)return N("div",{style:this._getFramePreviewImgContainerStyle(e),className:[pr.a.framePreviewImgContainer,pr.a.nonSticky].join(" ")},N("div",{className:pr.a.framePreviewImg,style:this._getFramePreviewImgStyle(e)}))},r}(B))||hd)||hd);function kd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Td(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ad(){return(Ad=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Ed.displayName="SeekBarPreview";var wd,Sd,Cd,xd,Id=(gd=$t((function(e){return{config:e.config.components.seekbar,isMobile:e.shell.isMobile,previewHoverActive:e.seekbar.previewHoverActive,hidePreview:e.seekbar.hidePreview,hideTimeBubble:e.seekbar.hideTimeBubble}}),ur(Ad({},sr,da))),yd=Fs("SeekBar"),vd=An({sliderAriaLabel:"controls.seekBarSlider"}),gd(md=Sr(md=Br(md=yd(md=vd(md=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Td(kd(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:Ln.LEFT},action:function(e){t.handleKeydown(e,!1)}},{key:{code:Ln.RIGHT},action:function(e){t.handleKeydown(e,!1)}},{key:{code:Ln.HOME},action:function(e){t.handleKeydown(e,!1)}},{key:{code:Ln.END},action:function(e){t.handleKeydown(e,!1)}}]),Td(kd(t),"onSeekbarMouseDown",(function(e){if(!t.props.isMobile&&!t.props.previewHoverActive&&(e.preventDefault(),e.stopPropagation(),t.props.updateSeekbarDraggingStatus(!0),t.props.isDraggingActive)){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration)}})),Td(kd(t),"onPlayerMouseUp",(function(e){if(!t.props.isMobile&&!t.props.previewHoverActive&&t.props.isDraggingActive){var n=t.props.currentTime,r=t.getTime(e);t.props.changeCurrentTime(r),t.updateSeekBarProgress(r,t.props.duration),t.props.updateSeekbarDraggingStatus(!1),t.props.notifyChange({from:n,to:r})}})),Td(kd(t),"onPlayerMouseMove",(function(e){if(!t.props.isMobile&&t.props.isDraggingActive){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration),t.updateSeekBarProgress(n,t.props.duration,!0)}})),Td(kd(t),"onSeekbarMouseMove",(function(e){if(!t.props.isMobile&&!t.props.previewHoverActive){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration,!0)}})),Td(kd(t),"onSeekbarTouchStart",(function(e){if(t.props.updateSeekbarDraggingStatus(!0),t.props.isDraggingActive){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration)}})),Td(kd(t),"onSeekbarTouchMove",(function(e){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration,!0),t.props.isDraggingActive&&t.updateSeekBarProgress(n,t.props.duration),e.preventDefault()})),Td(kd(t),"onKeyDown",(function(e){switch(e.keyCode){case Ln.LEFT:case Ln.RIGHT:t.handleKeydown(e,!0);break;case Ln.ENTER:case Ln.SPACE:e.preventDefault(),t.togglePlayPause()}})),Td(kd(t),"togglePlayPause",(function(){t.props.player.paused?t.props.player.play():t.props.player.pause()})),Td(kd(t),"onSeekbarTouchEnd",(function(e){if(t.props.isDraggingActive){var n=t.getTime(e),r=t.props.currentTime,i=n;t.props.changeCurrentTime(i),t.updateSeekBarProgress(i,t.props.duration),t.props.notifyChange({from:r,to:i})}t.props.updateSeekbarDraggingStatus(!1)})),Td(kd(t),"onSeekbarMouseOver",(function(){t.props.isMobile||t.props.updateSeekbarHoverActive(!0)})),Td(kd(t),"onSeekbarMouseLeave",(function(){t.props.isMobile||t.props.updateSeekbarHoverActive(!1)})),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this,t=this.props,n=t.player,r=t.eventManager,i=this._seekBarElement.getBoundingClientRect();this.props.updateSeekbarClientRect(i),r.listen(n,Dr.Type.GUI_RESIZE,(function(){e.setState({resizing:!0}),setTimeout((function(){var t=e._seekBarElement.getBoundingClientRect();e.props.updateSeekbarClientRect(t),e.setState({resizing:!1})}),pr.a.defaultTransitionTime)})),document.addEventListener("mouseup",this.onPlayerMouseUp),document.addEventListener("mousemove",this.onPlayerMouseMove),this.props.registerKeyboardEvents(this._keyboardEventHandlers)},i.componentWillUnmount=function(){document.removeEventListener("mouseup",this.onPlayerMouseUp),document.removeEventListener("mousemove",this.onPlayerMouseMove)},i.handleKeydown=function(e,t){var n=this,r=this.props,i=r.duration,a=r.currentTime,o=function(e,t){n.props.changeCurrentTime(t),n.updateSeekBarProgress(t,i,!0),n.props.notifyChange({from:e,to:t})};switch(this.props.updatePlayerHoverState(!0),e.keyCode){case Ln.LEFT:t||this.props.updateOverlayActionIcon(vo.Rewind),o(a,a-5>0?a-5:0);break;case Ln.RIGHT:t||this.props.updateOverlayActionIcon(vo.Forward),o(a,a+5>i?i:a+5);break;case Ln.HOME:t||this.props.updateOverlayActionIcon(vo.StartOver),o(a,0);break;case Ln.END:t||this.props.updateOverlayActionIcon(vo.SeekEnd),o(a,i)}},i.updateSeekBarProgress=function(e,t,n){void 0===n&&(n=!1),n?this.props.updateVirtualTime(e):this.props.updateCurrentTime(e)},i.getOffset=function(e){for(var t=0,n=0;e&&!isNaN(e.offsetLeft)&&!isNaN(e.offsetTop);)t+=e.offsetLeft-e.scrollLeft+this._getTransformX(e),n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return this.props.player.isFullscreen()&&(t=0),{top:n,left:t}},i._getTransformX=function(e){var t=getComputedStyle(e),n=(t.getPropertyValue("transform")||t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")).match(/-?\d+/g),r=0;return n&&n.length>0&&(r=parseFloat(n[4])),r},i.getTime=function(e){var t,n=("number"==typeof e.clientX?e.clientX:null==e||null==(t=e.changedTouches[0])?void 0:t.clientX)-this._seekBarElement.getBoundingClientRect().left,r=parseFloat((this.props.duration/this._seekBarElement.offsetWidth*n).toFixed(2));return r<0?0:r>this.props.duration?this.props.duration:r},i.getBufferedPercent=function(){var e=this.props.player;if(this.props.duration>0&&e.buffered.length>0){var t=(e.isLive()?e.buffered.end(0)-e.getStartTimeOfDvrWindow():e.buffered.end(0))/this.props.duration*100;return t<100?t:100}return 0},i.getFramePreviewOffset=function(){if(this._seekBarElement&&this._framePreviewElement){var e=this.props.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth?this._seekBarElement.clientWidth-this._framePreviewElement.clientWidth:e}return 0},i.getTimeBubbleOffset=function(){if(this._timeBubbleElement){var e=this.props.virtualTime/this.props.duration*this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth/2;return e<0?0:e>this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth?this._seekBarElement.clientWidth-this._timeBubbleElement.clientWidth:e}return 0},i.renderFramePreview=function(){var e=this;if(this.props.showFramePreview&&!this.props.isMobile)return N("div",{className:this.props.hidePreview?[pr.a.framePreview,pr.a.hideFramePreview].join(" "):pr.a.framePreview,style:this._getFramePreviewStyle(),ref:function(t){return t?e._framePreviewElement=t:void 0}},N(Ed,{virtualTime:this.props.virtualTime}))},i._getFramePreviewStyle=function(){return"left: "+this.getFramePreviewOffset()+"px;"},i.renderTimeBubble=function(){var e=this;if(!this.props.hideTimeBubble&&this.props.showTimeBubble&&!this.props.isMobile){var t="left: "+this.getTimeBubbleOffset()+"px",n=this.props.isDvr?"-"+Ha(this.props.duration-this.props.virtualTime):Ha(this.props.virtualTime);return N("div",{className:pr.a.timePreview,style:t,ref:function(t){return t?e._timeBubbleElement=t:void 0}},n)}},i.render=function(e,t){var n=this,r=e.virtualTime/e.duration*100+"%",i=(e.forceFullProgress?100:e.currentTime/e.duration*100)+"%",a=Math.round(this.getBufferedPercent())+"%",o=[pr.a.seekBar];return e.adBreak&&o.push(pr.a.adBreak),e.isDvr&&o.push(pr.a.live),e.isMobile&&o.push(pr.a.hover),e.isDraggingActive&&o.push(pr.a.hover),t.resizing&&o.push(pr.a.resizing),N("div",{tabIndex:"0",className:o.join(" "),ref:function(e){return e?n._seekBarElement=e:void 0},role:"slider","aria-label":e.sliderAriaLabel,"aria-valuemin":"0","aria-valuemax":Math.round(this.props.duration),"aria-valuenow":Math.round(this.props.currentTime),"aria-valuetext":Ha(this.props.currentTime)+" of "+Ha(this.props.duration),onMouseOver:this.onSeekbarMouseOver,onMouseLeave:this.onSeekbarMouseLeave,onMouseMove:this.onSeekbarMouseMove,onMouseDown:this.onSeekbarMouseDown,onTouchStart:this.onSeekbarTouchStart,onTouchMove:this.onSeekbarTouchMove,onTouchEnd:this.onSeekbarTouchEnd,onKeyDown:this.onKeyDown},N("div",{className:pr.a.progressBar},N(qn,{name:"SeekBar",shouldUpdate:!0},this.renderFramePreview(),this.renderTimeBubble(),N("div",{className:pr.a.buffered,style:{width:a}}),e.dataLoaded?N("div",{className:pr.a.progress,style:{width:i}},e.adBreak?void 0:N("a",{className:pr.a.scrubber})):void 0,N("div",{className:pr.a.virtualProgress,style:{width:r}},N("div",{className:pr.a.virtualProgressIndicator})))))},r}(B))||md)||md)||md)||md)||md);Id.displayName="SeekBar";var Pd,Dd,Rd,Od=(wd=$t((function(e){return{currentTime:e.seekbar.currentTime,virtualTime:e.seekbar.virtualTime,duration:e.engine.duration,isDraggingActive:e.seekbar.draggingActive,isMobile:e.shell.isMobile,poster:e.engine.poster,dataLoaded:e.engine.dataLoaded}}),ur(Vi)),Sd=jn("SeekBarPlaybackContainer"),Cd=fi("SeekBarPlaybackContainer"),wd(xd=Sr(xd=Br(xd=Sd(xd=Cd(xd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){var e=this;this.props.eventManager.listen(this.props.player,this.props.player.Event.TIME_UPDATE,(function(){e.props.isDraggingActive||e.props.updateCurrentTime(e.props.player.currentTime)}))},i.render=function(){var e=this;return N(Id,{playerElement:this.props.playerContainer,showFramePreview:this.props.showFramePreview,showTimeBubble:this.props.showTimeBubble,changeCurrentTime:function(t){return e.props.player.currentTime=t},playerPoster:this.props.poster,updateSeekbarDraggingStatus:function(t){return e.props.updateSeekbarDraggingStatus(t)},updateSeekbarHoverActive:function(t){return e.props.updateSeekbarHoverActive(t)},updateSeekbarClientRect:function(t){return e.props.updateSeekbarClientRect(t)},updateCurrentTime:function(t){return e.props.updateCurrentTime(t)},updateVirtualTime:function(t){return e.props.updateVirtualTime(t)},currentTime:this.props.currentTime,virtualTime:this.props.virtualTime,duration:this.props.duration,isDraggingActive:this.props.isDraggingActive,isMobile:this.props.isMobile,notifyChange:function(t){return e.props.notifyChange(t)},dataLoaded:this.props.dataLoaded})},r}(B))||xd)||xd)||xd)||xd)||xd);function Ld(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Md(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Od.displayName="SeekBarPlaybackContainer";var Nd,Ud,Fd,jd=(Pd=$t((function(e){return{playlist:e.engine.playlist,currentTime:e.engine.currentTime,duration:e.engine.duration,lastSeekPoint:e.engine.lastSeekPoint,isSeeking:e.engine.isSeeking,isPlaybackEnded:e.engine.isPlaybackEnded,countdownCanceled:e.playlist.countdownCanceled}}),ur(va)),Dd=jn("PlaylistCountdown"),Pd(Rd=Sr(Rd=Br(Rd=Dd(Rd=function(e){var t,n;function r(t){var n;return Md(Ld(n=e.call(this,t)||this),"onClick",(function(){n.props.player.playlist.playNext()})),Md(Ld(n),"cancelNext",(function(e){n.props.logger.debug("Cancel auto play next item"),e.stopPropagation(),n.props.updatePlaylistCountdownCanceled(!0)})),Md(Ld(n),"onKeyDown",(function(e){switch(e.keyCode){case Ln.ENTER:n.onClick();break;case Ln.ESC:n.cancelNext(e)}})),Md(Ld(n),"onCancelButtonKeyDown",(function(e){e.keyCode===Ln.ENTER&&n.cancelNext(e)})),n.setState({focusable:!1}),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._shouldRender=function(e){return this.state.timeToShow&&e.playlist&&e.playlist.next&&e.playlist.next.sources&&e.player.playlist.countdown.showing&&(e.player.playlist.options.autoContinue||e.player.playlist.options.loop)},i._getTimeToShow=function(){var e=this.props.player.playlist.countdown,t=this.props.duration-e.duration;return e.timeToShow>=0&&e.timeToShow<=this.props.duration&&(t=Math.max(e.timeToShow,this.props.lastSeekPoint)),Math.max(0,Math.min(t,this.props.duration))},i.componentWillUpdate=function(e){var t=this._getTimeToShow();e.currentTime>=t?this.setState({timeToShow:!0}):(this.setState({timeToShow:!1}),this.props.updatePlaylistCountdownCanceled(!1))},i.isHidden=function(e){return!e.timeToShow||this.props.player.playlist.countdown.duration>=this.props.duration},i.isCanceled=function(){return this.props.countdownCanceled},i.isShown=function(e){return!this.isHidden(e)&&!this.isCanceled()},i.componentDidUpdate=function(e,t){var n=this;if(this._shouldRender(e)){var r=this._getTimeToShow(),i=this.props.player.playlist.countdown;e.isSeeking||this.props.countdownCanceled||!(this.props.isPlaybackEnded||this.props.currentTime>=r+i.duration&&this.props.currentTime<this.props.duration)||this.props.player.playlist.playNext()}!t.shown&&this.state.shown?this.focusElement&&this.props.eventManager.listenOnce(this.focusElement,"animationend",(function(){n.isShown(n.state)&&(n.focusElement.focus(),n.setState({focusable:!0}))})):t.shown&&!this.state.shown&&this.setState({focusable:!1}),this.isShown(this.state)!==this.state.shown&&this.setState((function(e){return{shown:n.isShown(e)}}))},i.shouldComponentUpdate=function(e){return this.props.duration>0&&!e.isSeeking&&!this.props.isPlaybackEnded},i.render=function(e){var t=this;if(this._shouldRender(e)&&(this.isShown(this.state)&&(this.nextShown=e.playlist.next),e.playlist.next&&e.playlist.next.sources&&this.nextShown)){var n=this.props.player.playlist.countdown,r=this._getTimeToShow(),i=e.currentTime-r,a=Math.min(n.duration,e.duration-r),o=Math.ceil(a-(i>0?i:0)),s=[pr.a.playlistCountdown];return this.isHidden(this.state)?s.push(pr.a.hidden):this.isCanceled()?s.push(pr.a.canceled):s.push(pr.a.slideIn),N("div",{role:"button","aria-labelledby":"playlistCountdownTextId",ref:function(e){return e?t.focusElement=e:void 0},tabIndex:this.state.focusable?0:-1,className:s.join(" "),onKeyDown:this.onKeyDown,onClick:this.onClick},N("div",{className:pr.a.playlistCountdownPoster,style:"background-image: url("+this.nextShown.sources.poster+");"}),N("div",{className:pr.a.playlistCountdownContentPlaceholder},N("div",{className:pr.a.playlistCountdownContentBackground},N("div",{className:pr.a.playlistCountdownContent},N(En,null,N("div",{id:"playlistCountdownTextId",className:pr.a.playlistCountdownText},N("div",{className:pr.a.playlistCountdownTextTitle},N(bn,{id:"playlist.up_next_in"}),N("div",{className:pr.a.playlistCountdownTimeLeft},o)),N("div",{className:pr.a.playlistCountdownTextName},""+(this.nextShown.sources.metadata?this.nextShown.sources.metadata.name:"")))),N("div",{className:[pr.a.controlButtonContainer,pr.a.playlistCountdownCancel].join(" ")},N(En,null,N(Bo,{tabIndex:this.state.focusable?0:-1,"aria-label":N(bn,{id:"playlist.cancel"}),className:[pr.a.controlButton,pr.a.playlistCountdownCancelButton].join(" "),onClick:this.cancelNext,onKeyDown:this.onCancelButtonKeyDown},N(Eo,{type:vo.Close}))))))))}},r}(B))||Rd)||Rd)||Rd)||Rd);jd.displayName="PlaylistCountdown";var Bd,Vd=(Nd=$t((function(e){return{poster:e.engine.poster,isInPictureInPicture:e.engine.isInPictureInPicture,isChangingSource:e.engine.isChangingSource}})),Ud=jn("PictureInPictureOverlay"),Nd(Fd=Sr(Fd=Ud(Fd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i._handleClick=function(){this.props.player.exitPictureInPicture()},i.render=function(){if(this.props.isInPictureInPicture){var e={},t=[pr.a.pictureInPicturePoster];return this.props.poster&&(e={backgroundImage:this.props.isChangingSource?"":"url("+this.props.poster+")",backgroundSize:"contain"},t.push(pr.a.hasPoster)),N("div",null,N("div",{className:pr.a.pictureInPictureOverlay},N("div",{className:t.join(" "),style:e,onMouseOver:function(e){return e.stopPropagation()}},N("div",{className:pr.a.darkLayer})),N("div",{className:pr.a.pictureInPictureControl},N(En,null,N("span",{className:pr.a.pictureInPictureText},N(bn,{id:"pictureInPicture.overlay_text"}))))))}},r}(B))||Fd)||Fd)||Fd);Vd.displayName="PictureInPictureOverlay";var Hd,Kd=Ni({allowSidePanels:!0,allowPlayerArea:!0})(Bd=Fs("Playback")(Bd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.updateIsKeyboardEnabled(!0)},i.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(Io,null),N(bd,null),N(oo,null,N(j,null,N(Rc,null),N(no,null),N(sc,null),N(Vd,null),N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls}),N(Ep,null),N(Ko,null),N(ep,null)),(function(e){var t=e.containerRef;return N(j,null,N(Sc,null),N(_d,null,N(Nc,null),N(jd,null)),N(tu,{leftControls:N(j,null,N(Sp,{name:"BottomBarPlaybackControls",showPreview:!0}),N(ps,{step:10}),N(ms,{step:10}),N(kc,{format:"current / total"})),rightControls:N(j,null,N(Pl,null),N(Sl,null),N(Rl,null),N(ml,null),N(qs,null),N(wp,null),N(rl,null),N(Bc,null))},N(Od,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))},r}(B))||Bd)||Bd;function Gd(e){return N(Kd,e)}Kd.displayName="Playback";var zd=$t((function(e){return{isBumper:e.engine.adIsBumper}}))(Hd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.render=function(){return this.props.isBumper?null:N(Bl,null)},r}(B))||Hd;zd.displayName="AdLeftControls";var Wd,Yd=$t((function(e){return{state:{shell:e.shell,engine:{adIsLinear:e.engine.adIsLinear,adContentType:e.engine.adContentType}}}}))(Fs("Ads")((function(e,t){if(e.updateIsKeyboardEnabled(!0),function(e,t){var n=e.state.shell.isMobile&&!t.player.env.isIPadOS,r=!1;try{var i=t.player.config.plugins.ima.adsRenderingSettings;r=i&&i.useStyledLinearAds}catch(e){}return n||r}(e,t))return N("div",{className:pr.a.adGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(oo,null,N(j,null,N(no,null),N(Rc,{hasTopBar:!0})),N(j,null,N(Sc,{disabled:!0,leftControls:N(zd,null)}))))));var n=!1,r=!1,i=N(tu,{leftControls:N(j,null,N(Sp,{name:"BottomBarPlaybackControls",showPreview:!0}),N(bc,null)),rightControls:N(j,null,N(Sl,null),N(rl,null))}),a=N(tu,{rightControls:N(j,null,N(rl,null))});return N("div",{className:pr.a.adGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(oo,null,N(j,null,N(no,null),N(Rc,{hasTopBar:!0}),r?N(jl,null):void 0,N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls})),N(j,null,N(Sc,{disabled:!0,leftControls:N(zd,null),rightControls:n?N(Nl,null):void 0}),function(e){var t=e.state.engine,n=t.adIsLinear,r=t.adContentType;return!(n&&r&&!r.startsWith("video"))}(e)?i:a)))))})));function qd(e){return N(Yd,e)}function Xd(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N(oo,null,N(j,null,N(Ju,null)))))}function $d(e){return N(Xd,e)}Yd.displayName="Ads",Xd.displayName="Error";var Qd,Zd=Ni({allowSidePanels:!0,allowPlayerArea:!0})(Wd=Fs("Live")(Wd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.updateIsKeyboardEnabled(!0)},i.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(Io,null),N(bd,null),N(oo,null,N(j,null,N(no,null),N(sc,null),N(Vd,null),N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls}),N(Ko,null),N(ep,null)),(function(e){var t=e.containerRef;return N(j,null,N(Sc,null),N(_d,null,N(Nc,null),N(Rc,null)),N(tu,{leftControls:N(j,null,N(Sp,{name:"BottomBarPlaybackControls",showPreview:!0}),N(ps,{step:10}),N(ms,{step:10}),N(nc,null)),rightControls:N(j,null,N(Pl,null),N(Sl,null),N(Rl,null),N(ml,null),N(qs,null),N(wp,null),N(rl,null),N(Bc,null))},N(cc,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))},r}(B))||Wd)||Wd;function Jd(e){return N(Zd,e)}Zd.displayName="Live";var ef,tf=Ni({allowSidePanels:!0,allowPlayerArea:!0})(Qd=Fs("Img")(Qd=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.componentDidMount=function(){this.props.updateIsKeyboardEnabled(!0)},i.render=function(){return N("div",{className:pr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:pr.a.playerGui,id:"player-gui"},N(bd,null),N(oo,null,N(j,null,N(Rc,null),N(no,null),N(sc,null),N(Sp,{name:"OverlayPlaybackControls",className:pr.a.centerPlaybackControls}),N(ep,null)),(function(){return N(j,null,N(Sc,null),N(_d,null,N(Nc,null)),N(tu,{rightControls:N(j,null,N(Pl,null),N(qs,null),N(rl,null),N(Bc,null))}))})))))},r}(B))||Qd)||Qd;function nf(e){return N(tf,e)}tf.displayName="Img";var rf=function(e,t){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return function(){var n=e.apply(void 0,arguments),r=function(){throw new Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},a=t.map((function(e){return e(i)}));return Nt({},n,{dispatch:r=Ut.apply(void 0,a)(n.dispatch)})}}}(function(e){return function(t){return function(t){return function(n){ef||(ef=Dn("UILoggerMiddleware")),e.debugActions&&ef.debug("Action fired",n),t(n)}}}}(t),function(e){return function(t){return function(n){return function(r){switch(r.type){case zl:!function(e,t,n){switch(t.name){case"Keyboard":Ql[t.payload.key](e,t,n);break;case"OverlayAction":!function(e,t,n){"PlayPause"===t.payload.type?Yl(e,0,n):"Fullscreen"===t.payload.type&&Xl(0,0,n)}(e,t,n);break;case"Settings":!function(e,t,n){t.payload.type===n.Track.VIDEO?n.dispatchEvent(new Gr(t.payload.track)):n.dispatchEvent(new Wr(t.payload.speed))}(0,t,n);break;case"CVAAOverlay":n.dispatchEvent(new Kr(t.payload.textStyle));break;case"Fullscreen":Xl(0,0,n);break;case"Language":!function(e,t,n){t.payload.type===n.Track.AUDIO?n.dispatchEvent(new Vr(t.payload.track)):t.payload.type===n.Track.TEXT&&n.dispatchEvent(new Hr(t.payload.track))}(0,t,n);break;case"Shell":n.dispatchEvent(new Dr(Dr.Type.UI_CLICKED));break;case"Rewind":n.dispatchEvent(new qr(t.payload.from,t.payload.to));break;case"Forward":n.dispatchEvent(new Xr(t.payload.from,t.payload.to));break;case"LiveTag":n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_LIVE_TAG));break;case"PrePlaybackPlayOverlay":case"PlayPause":Yl(e,0,n);break;case"Volume":ql(e,0,n)}}(t,r,e);break;case Wl:!function(e,t,n){switch(t.name){case"Volume":n.dispatchEvent(new $r(t.payload.volume));break;case"SeekBarPlaybackContainer":n.dispatchEvent(new zr(t.payload.from,t.payload.to));break;case"ActivePreset":n.dispatchEvent(new Dr(Dr.Type.UI_PRESET_CHANGE,t.payload))}}(0,r,e);break;case Qn.UPDATE_PLAYER_HOVER_STATE:!function(e,t,n){var r=e.getState().engine,i=e.getState().shell;!r.adBreak&&r.isPlaying&&i.playerHover!==t.hover&&n.dispatchEvent(new Yr(t.hover))}(t,r,e)}switch(n(r),r.type){case Qn.UPDATE_GUI_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.guiClientRect;n.dispatchEvent(new Kl(r))}(t,0,e);break;case Qn.UPDATE_PLAYER_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.playerClientRect;n.dispatchEvent(new Hl(r))}(t,0,e);break;case Qn.UPDATE_VIDEO_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.videoClientRect;n.dispatchEvent(new Gl(r))}(t,0,e)}}}}}(e))};function af(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var of={colors:{live:"--playkit-live-color",playerBackground:"--playkit-player-background-color"}},sf=["primary","secondary","success","danger","warning"],lf=["--playkit-icon-data-url","--playkit-icon-chromecast-url","--playkit-icon-quality-HD-active-url","--playkit-icon-quality-4K-active-url","--playkit-icon-quality-8K-active-url"],uf=function(){function e(e,t,n){this.player=e,this.config=t,this.playerContainerElement=document.querySelector("#"+n)}var t=e.prototype;return t.applyUserTheme=function(){this.config&&this.setColors(this.config)},t.setColors=function(e){for(var t in e.colors.primary&&this.setSvgFillColor(e.colors.primary),e.colors)sf.includes(t)?this.setAccentOrAcknowledgementColor(t,e.colors[t]):this.setColor(of.colors[t],e.colors[t])},t.setAccentOrAcknowledgementColor=function(e,t){var n,r,i,a,o,s,l,u,c=function(e){return function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.min(n,r,i),o=Math.max(n,r,i),s=o-a;o===a?t=0:n===o?t=(r-i)/s:r===o?t=2+(i-n)/s:i===o&&(t=4+(n-r)/s),(t=Math.min(60*t,360))<0&&(t+=360);var l=(a+o)/2;return[t,100*(o===a?0:l<=.5?s/(o+a):s/(2-o-a)),100*l]}(function(e){var t=e.toString().match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]}(e))}(t),p=c[0],d=c[1],f=c[2];null==(n=this.playerContainerElement)||null==(r=n.querySelector("."+pr.a.player))||r.style.setProperty("--playkit-{name}-color".replace("{name}",e),t),null==(i=this.playerContainerElement)||null==(a=i.querySelector("."+pr.a.player))||a.style.setProperty("--playkit-{name}-hsl-hue".replace("{name}",e),Math.round(p)+"deg"),null==(o=this.playerContainerElement)||null==(s=o.querySelector("."+pr.a.player))||s.style.setProperty("--playkit-{name}-hsl-saturation".replace("{name}",e),Math.round(d)+"%"),null==(l=this.playerContainerElement)||null==(u=l.querySelector("."+pr.a.player))||u.style.setProperty("--playkit-{name}-hsl-lightness".replace("{name}",e),Math.round(f)+"%")},t.setColor=function(e,t){var n,r;null==(n=this.playerContainerElement)||null==(r=n.querySelector("."+pr.a.player))||r.style.setProperty(e,t)},t.setSvgFillColor=function(e){for(var t,n=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return af(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?af(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(lf);!(t=n()).done;){var r,i,a,o=t.value,s=getComputedStyle(null==(r=this.playerContainerElement)?void 0:r.querySelector("."+pr.a.player)).getPropertyValue(o),l=e.replace("#","%23");null==(i=this.playerContainerElement)||null==(a=i.querySelector("."+pr.a.player))||a.style.setProperty(o,s.replace(/fill='%23([a-f0-9]{3}){1,2}\b'/,"fill='"+l+"'"))}},e}();function cf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pf(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var df=function(){function e(e,t){var n,r;pf(this,"_translations",{en:Ca.en}),pf(this,"_locale","en"),(n=t.logger)&&"function"==typeof n.getLogger&&(xn.get=n.getLogger),n&&n.LogLevel&&(In=n.LogLevel),this._uiComponents=[].concat(t.uiComponents||[]),this.player=e,this.targetId=t.targetId,this._createStore(t),this.setConfig(t),this._setLocaleTranslations(t),this._themesManager=new uf(e,t.userTheme,t.targetId),r=this.player.env,Ln.SEMI_COLON="firefox"===r.browser.name.toLowerCase()?59:186}var t,n,r=e.prototype;return r.setConfig=function(e,t){t?this.store.dispatch(mr.updateComponentConfig(t,e)):this.store.dispatch(mr.updateConfig(e))},r.addComponent=function(e){return function(){}},r.buildDefaultUI=function(){var e=[{template:function(e){return lo(e)},condition:function(e){return e.engine.isIdle}},{template:function(e){return $d(e)},condition:function(e){return e.engine.hasError}},{template:function(e){return qd(e)},condition:function(e){return e.engine.adBreak}},{template:function(e){return Jd(e)},condition:function(e){return e.engine.isLive}},{template:function(e){return nf(e)},condition:function(e){return e.engine.isImg}},{template:function(e){return Gd(e)}}];this._buildUI(e),this._themesManager.applyUserTheme()},r.buildCustomUI=function(e){if(e.length>0)this._buildUI(e);else{var t=[{template:function(e){return Gd(e)}}];this._buildUI(t)}this._themesManager.applyUserTheme()},r._setLocaleTranslations=function(e){var t=this;e.translations&&Object.entries(e.translations).forEach((function(e){var n=e[0],r=e[1];r=Cn({},t._translations.en,r),t._translations[n]=r})),e.locale&&this._translations[e.locale]&&(this._locale=e.locale)},r._createStore=function(e){var t=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||Ut;this.store=Pt(Sa,t(rf(this.player,e)))},r._buildUI=function(e){var t=this;this.player&&(this.container=document.getElementById(this.targetId),this.container&&ne(N(ut,{store:this.store},N(Li,{uiComponents:this._uiComponents,setApi:function(e){e&&(t.addComponent=e)}},N(pn,{definition:this._translations[this._locale]},N(Ar,{player:this.player},N(Jr,{player:this.player,store:this.store},N(Ps,{playerContainer:this.container},N(ki,null,N(Ra,null),N(Ma,null),N(Ja,{uis:e,playerContainer:this.container})))))))),this.container))},r.destroy=function(){this.container&&(this.container.prepend(this.player.getView()),ne("",this.container))},r.getLogLevel=function(e){return function(e){return Pn(e).getLevel()}(e)},r.setLogLevel=function(e,t){!function(e,t){Pn(t).setLevel(e)}(e,t)},t=e,(n=[{key:"config",get:function(){return function e(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,r){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[r]=e(t))})):"object"==typeof t?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"==typeof n[t]&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n}(this.store.getState().config)}},{key:"LogLevel",get:function(){return In}},{key:"Event",get:function(){return On}}])&&cf(t.prototype,n),e}(),ff=On,hf="0.77.2-canary.0-32f0182",gf="@playkit-js/playkit-js-ui"}])},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(10),i=n(30);e.exports=n(9)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(47),i=n(26);e.exports=function(e){return r(i(e))}},function(e,t,n){"use strict";var r=n(3);e.exports=function(e,t){return!!e&&r((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var r=n(20);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(48),i=n(30),a=n(17),o=n(28),s=n(15),l=n(93),u=Object.getOwnPropertyDescriptor;t.f=n(9)?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){var r=n(1),i=n(8),a=n(3);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],o={};o[e]=t(n),r(r.S+r.F*a((function(){n(1)})),"Object",o)}},function(e,t,n){var r=n(19),i=n(47),a=n(11),o=n(7),s=n(109);e.exports=function(e,t){var n=1==e,l=2==e,u=3==e,c=4==e,p=6==e,d=5==e||p,f=t||s;return function(t,s,h){for(var g,y,v=a(t),m=i(v),b=r(s,h,3),_=o(m.length),E=0,k=n?f(t,_):l?f(t,0):void 0;_>E;E++)if((d||E in m)&&(y=b(g=m[E],E,v),e))if(n)k[E]=y;else if(y)switch(e){case 3:return!0;case 5:return g;case 6:return E;case 2:k.push(g)}else if(c)return!1;return p?-1:u||c?c:k}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";if(n(9)){var r=n(32),i=n(2),a=n(3),o=n(1),s=n(62),l=n(88),u=n(19),c=n(44),p=n(30),d=n(16),f=n(45),h=n(21),g=n(7),y=n(120),v=n(34),m=n(28),b=n(15),_=n(49),E=n(5),k=n(11),T=n(80),A=n(35),w=n(37),S=n(36).f,C=n(82),x=n(31),I=n(6),P=n(24),D=n(52),R=n(50),O=n(84),L=n(42),M=n(55),N=n(43),U=n(83),F=n(111),j=n(10),B=n(22),V=j.f,H=B.f,K=i.RangeError,G=i.TypeError,z=i.Uint8Array,W=Array.prototype,Y=l.ArrayBuffer,q=l.DataView,X=P(0),$=P(2),Q=P(3),Z=P(4),J=P(5),ee=P(6),te=D(!0),ne=D(!1),re=O.values,ie=O.keys,ae=O.entries,oe=W.lastIndexOf,se=W.reduce,le=W.reduceRight,ue=W.join,ce=W.sort,pe=W.slice,de=W.toString,fe=W.toLocaleString,he=I("iterator"),ge=I("toStringTag"),ye=x("typed_constructor"),ve=x("def_constructor"),me=s.CONSTR,be=s.TYPED,_e=s.VIEW,Ee=P(1,(function(e,t){return Se(R(e,e[ve]),t)})),ke=a((function(){return 1===new z(new Uint16Array([1]).buffer)[0]})),Te=!!z&&!!z.prototype.set&&a((function(){new z(1).set({})})),Ae=function(e,t){var n=h(e);if(n<0||n%t)throw K("Wrong offset!");return n},we=function(e){if(E(e)&&be in e)return e;throw G(e+" is not a typed array!")},Se=function(e,t){if(!E(e)||!(ye in e))throw G("It is not a typed array constructor!");return new e(t)},Ce=function(e,t){return xe(R(e,e[ve]),t)},xe=function(e,t){for(var n=0,r=t.length,i=Se(e,r);r>n;)i[n]=t[n++];return i},Ie=function(e,t,n){V(e,t,{get:function(){return this._d[n]}})},Pe=function(e){var t,n,r,i,a,o,s=k(e),l=arguments.length,c=l>1?arguments[1]:void 0,p=void 0!==c,d=C(s);if(null!=d&&!T(d)){for(o=d.call(s),r=[],t=0;!(a=o.next()).done;t++)r.push(a.value);s=r}for(p&&l>2&&(c=u(c,arguments[2],2)),t=0,n=g(s.length),i=Se(this,n);n>t;t++)i[t]=p?c(s[t],t):s[t];return i},De=function(){for(var e=0,t=arguments.length,n=Se(this,t);t>e;)n[e]=arguments[e++];return n},Re=!!z&&a((function(){fe.call(new z(1))})),Oe=function(){return fe.apply(Re?pe.call(we(this)):we(this),arguments)},Le={copyWithin:function(e,t){return F.call(we(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return Z(we(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return U.apply(we(this),arguments)},filter:function(e){return Ce(this,$(we(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return J(we(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(we(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){X(we(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(we(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(we(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ue.apply(we(this),arguments)},lastIndexOf:function(e){return oe.apply(we(this),arguments)},map:function(e){return Ee(we(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(we(this),arguments)},reduceRight:function(e){return le.apply(we(this),arguments)},reverse:function(){for(var e,t=we(this).length,n=Math.floor(t/2),r=0;r<n;)e=this[r],this[r++]=this[--t],this[t]=e;return this},some:function(e){return Q(we(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return ce.call(we(this),e)},subarray:function(e,t){var n=we(this),r=n.length,i=v(e,r);return new(R(n,n[ve]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,g((void 0===t?r:v(t,r))-i))}},Me=function(e,t){return Ce(this,pe.call(we(this),e,t))},Ne=function(e){we(this);var t=Ae(arguments[1],1),n=this.length,r=k(e),i=g(r.length),a=0;if(i+t>n)throw K("Wrong length!");for(;a<i;)this[t+a]=r[a++]},Ue={entries:function(){return ae.call(we(this))},keys:function(){return ie.call(we(this))},values:function(){return re.call(we(this))}},Fe=function(e,t){return E(e)&&e[be]&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},je=function(e,t){return Fe(e,t=m(t,!0))?p(2,e[t]):H(e,t)},Be=function(e,t,n){return!(Fe(e,t=m(t,!0))&&E(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?V(e,t,n):(e[t]=n.value,e)};me||(B.f=je,j.f=Be),o(o.S+o.F*!me,"Object",{getOwnPropertyDescriptor:je,defineProperty:Be}),a((function(){de.call({})}))&&(de=fe=function(){return ue.call(this)});var Ve=f({},Le);f(Ve,Ue),d(Ve,he,Ue.values),f(Ve,{slice:Me,set:Ne,constructor:function(){},toString:de,toLocaleString:Oe}),Ie(Ve,"buffer","b"),Ie(Ve,"byteOffset","o"),Ie(Ve,"byteLength","l"),Ie(Ve,"length","e"),V(Ve,ge,{get:function(){return this[be]}}),e.exports=function(e,t,n,l){var u=e+((l=!!l)?"Clamped":"")+"Array",p="get"+e,f="set"+e,h=i[u],v=h||{},m=h&&w(h),b=!h||!s.ABV,k={},T=h&&h.prototype,C=function(e,n){V(e,n,{get:function(){return function(e,n){var r=e._d;return r.v[p](n*t+r.o,ke)}(this,n)},set:function(e){return function(e,n,r){var i=e._d;l&&(r=(r=Math.round(r))<0?0:r>255?255:255&r),i.v[f](n*t+i.o,r,ke)}(this,n,e)},enumerable:!0})};b?(h=n((function(e,n,r,i){c(e,h,u,"_d");var a,o,s,l,p=0,f=0;if(E(n)){if(!(n instanceof Y||"ArrayBuffer"==(l=_(n))||"SharedArrayBuffer"==l))return be in n?xe(h,n):Pe.call(h,n);a=n,f=Ae(r,t);var v=n.byteLength;if(void 0===i){if(v%t)throw K("Wrong length!");if((o=v-f)<0)throw K("Wrong length!")}else if((o=g(i)*t)+f>v)throw K("Wrong length!");s=o/t}else s=y(n),a=new Y(o=s*t);for(d(e,"_d",{b:a,o:f,l:o,e:s,v:new q(a)});p<s;)C(e,p++)})),T=h.prototype=A(Ve),d(T,"constructor",h)):a((function(){h(1)}))&&a((function(){new h(-1)}))&&M((function(e){new h,new h(null),new h(1.5),new h(e)}),!0)||(h=n((function(e,n,r,i){var a;return c(e,h,u),E(n)?n instanceof Y||"ArrayBuffer"==(a=_(n))||"SharedArrayBuffer"==a?void 0!==i?new v(n,Ae(r,t),i):void 0!==r?new v(n,Ae(r,t)):new v(n):be in n?xe(h,n):Pe.call(h,n):new v(y(n))})),X(m!==Function.prototype?S(v).concat(S(m)):S(v),(function(e){e in h||d(h,e,v[e])})),h.prototype=T,r||(T.constructor=h));var x=T[he],I=!!x&&("values"==x.name||null==x.name),P=Ue.values;d(h,ye,!0),d(T,be,u),d(T,_e,!0),d(T,ve,h),(l?new h(1)[ge]==u:ge in T)||V(T,ge,{get:function(){return u}}),k[u]=h,o(o.G+o.W+o.F*(h!=v),k),o(o.S,u,{BYTES_PER_ELEMENT:t}),o(o.S+o.F*a((function(){v.of.call(h,1)})),u,{from:Pe,of:De}),"BYTES_PER_ELEMENT"in T||d(T,"BYTES_PER_ELEMENT",t),o(o.P,u,Le),N(u),o(o.P+o.F*Te,u,{set:Ne}),o(o.P+o.F*!I,u,Ue),r||T.toString==de||(T.toString=de),o(o.P+o.F*a((function(){new h(1).slice()})),u,{slice:Me}),o(o.P+o.F*(a((function(){return[1,2].toLocaleString()!=new h([1,2]).toLocaleString()}))||!a((function(){T.toLocaleString.call([1,2])}))),u,{toLocaleString:Oe}),L[u]=I?x:P,r||I||d(T,he,P)}}else e.exports=function(){}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(31)("meta"),i=n(5),a=n(15),o=n(10).f,s=0,l=Object.isExtensible||function(){return!0},u=!n(3)((function(){return l(Object.preventExtensions({}))})),c=function(e){o(e,r,{value:{i:"O"+ ++s,w:{}}})},p=e.exports={KEY:r,NEED:!1,fastKey:function(e,t){if(!i(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!a(e,r)){if(!l(e))return"F";if(!t)return"E";c(e)}return e[r].i},getWeak:function(e,t){if(!a(e,r)){if(!l(e))return!0;if(!t)return!1;c(e)}return e[r].w},onFreeze:function(e){return u&&p.NEED&&l(e)&&!a(e,r)&&c(e),e}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=!1},function(e,t,n){var r=n(95),i=n(67);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(21),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):a(e,t)}},function(e,t,n){var r=n(4),i=n(96),a=n(67),o=n(66)("IE_PROTO"),s=function(){},l=function(){var e,t=n(64)("iframe"),r=a.length;for(t.style.display="none",n(68).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;r--;)delete l.prototype[a[r]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=r(e),n=new s,s.prototype=null,n[o]=e):n=l(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(95),i=n(67).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},function(e,t,n){var r=n(15),i=n(11),a=n(66)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,n){var r=n(6)("unscopables"),i=Array.prototype;null==i[r]&&n(16)(i,r,{}),e.exports=function(e){i[r][e]=!0}},function(e,t,n){var r=n(5);e.exports=function(e,t){if(!r(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var r=n(10).f,i=n(15),a=n(6)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,a)&&r(e,a,{configurable:!0,value:t})}},function(e,t,n){var r=n(1),i=n(26),a=n(3),o=n(70),s="["+o+"]",l=RegExp("^"+s+s+"*"),u=RegExp(s+s+"*$"),c=function(e,t,n){var i={},s=a((function(){return!!o[e]()||" "!=" "[e]()})),l=i[e]=s?t(p):o[e];n&&(i[n]=l),r(r.P+r.F*s,"String",i)},p=c.trim=function(e,t){return e=String(i(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(u,"")),e};e.exports=c},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(9),o=n(6)("species");e.exports=function(e){var t=r[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(12);e.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),window._babelPolyfill||n(126);var r,i,a,o=function(){function e(){}return e.register=function(t){e._polyfills.push(t)},e.installAll=function(){for(var t=0;t<e._polyfills.length;t++)e._polyfills[t].install()},e}();r=o,a=[],(i=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(i="_polyfills"))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a},function(e,t,n){var r=n(25);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(25),i=n(6)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){var r=n(4),i=n(20),a=n(6)("species");e.exports=function(e,t){var n,o=r(e).constructor;return void 0===o||null==(n=r(o)[a])?t:i(n)}},function(e,t,n){var r=n(8),i=n(2),a=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return a[e]||(a[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(32)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(17),i=n(7),a=n(34);e.exports=function(e){return function(t,n,o){var s,l=r(t),u=i(l.length),c=a(o,u);if(e&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===n)return e||c||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(25);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r=n(6)("iterator"),i=!1;try{var a=[7][r]();a.return=function(){i=!0},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var a=[7],o=a[r]();o.next=function(){return{done:n=!0}},a[r]=function(){return o},e(a)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(4);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var r=n(49),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var a=n.call(e,t);if("object"!=typeof a)throw new TypeError("RegExp exec method returned something other than an Object or null");return a}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},function(e,t,n){"use strict";n(113);var r=n(12),i=n(16),a=n(3),o=n(26),s=n(6),l=n(85),u=s("species"),c=!a((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),p=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=s(e),f=!a((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=f?!a((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[u]=function(){return n}),n[d](""),!t})):void 0;if(!f||!h||"replace"===e&&!c||"split"===e&&!p){var g=/./[d],y=n(o,d,""[e],(function(e,t,n,r,i){return t.exec===l?f&&!i?{done:!0,value:g.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=y[0],m=y[1];r(String.prototype,e,v),i(RegExp.prototype,d,2==t?function(e,t){return m.call(e,this,t)}:function(e){return m.call(e,this)})}}},function(e,t,n){var r=n(19),i=n(108),a=n(80),o=n(4),s=n(7),l=n(82),u={},c={};(t=e.exports=function(e,t,n,p,d){var f,h,g,y,v=d?function(){return e}:l(e),m=r(n,p,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(a(v)){for(f=s(e.length);f>b;b++)if((y=t?m(o(h=e[b])[0],h[1]):m(e[b]))===u||y===c)return y}else for(g=v.call(e);!(h=g.next()).done;)if((y=i(g,m,h.value,t))===u||y===c)return y}).BREAK=u,t.RETURN=c},function(e,t,n){var r=n(2).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){"use strict";var r=n(2),i=n(1),a=n(12),o=n(45),s=n(29),l=n(59),u=n(44),c=n(5),p=n(3),d=n(55),f=n(40),h=n(71);e.exports=function(e,t,n,g,y,v){var m=r[e],b=m,_=y?"set":"add",E=b&&b.prototype,k={},T=function(e){var t=E[e];a(E,e,"delete"==e||"has"==e?function(e){return!(v&&!c(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return v&&!c(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof b&&(v||E.forEach&&!p((function(){(new b).entries().next()})))){var A=new b,w=A[_](v?{}:-0,1)!=A,S=p((function(){A.has(1)})),C=d((function(e){new b(e)})),x=!v&&p((function(){for(var e=new b,t=5;t--;)e[_](t,t);return!e.has(-0)}));C||((b=t((function(t,n){u(t,b,e);var r=h(new m,t,b);return null!=n&&l(n,y,r[_],r),r}))).prototype=E,E.constructor=b),(S||x)&&(T("delete"),T("has"),y&&T("get")),(x||w)&&T(_),v&&E.clear&&delete E.clear}else b=g.getConstructor(t,e,y,_),o(b.prototype,n),s.NEED=!0;return f(b,e),k[e]=b,i(i.G+i.W+i.F*(b!=m),k),v||g.setStrong(b,e,y),b}},function(e,t,n){for(var r,i=n(2),a=n(16),o=n(31),s=o("typed_array"),l=o("view"),u=!(!i.ArrayBuffer||!i.DataView),c=u,p=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");p<9;)(r=i[d[p++]])?(a(r.prototype,s,!0),a(r.prototype,l,!0)):c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function e(t,n,r,i){void 0===i&&(i={}),this.severity=t,this.category=n,this.code=r,this.data=i,e._logger.error("Category:"+n+" | Code:"+r+" |",i)};i(a,"Severity",{RECOVERABLE:1,CRITICAL:2}),i(a,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),i(a,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),i(a,"_logger",Object(r.b)("Error"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(8);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(){this.metadata=new Map,this.sources=new r.a,this.type=e.Type.UNKNOWN}return e.prototype.toJSON=function(){return{id:this.id,name:this.name,sources:this.sources.toJSON(),duration:this.duration,dvrStatus:this.dvrStatus,status:this.status,metadata:this.metadata,type:this.type,poster:this.poster,assetReferenceType:this.assetReferenceType}},e}();i(a,"Type",{VOD:"Vod",LIVE:"Live",IMAGE:"Image",AUDIO:"Audio",UNKNOWN:"Unknown"}),i(a,"DvrStatus",{ON:1,OFF:0})},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"d",(function(){return l})),n.d(t,"e",(function(){return a})),n.d(t,"a",(function(){return i}));var r={get:function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}}},i={};function a(e){e&&"function"==typeof e.getLogger&&(r.get=e.getLogger),e&&e.LogLevel&&(i=e.LogLevel)}function o(e){return r.get(e)}function s(e){return o(e).getLevel()}function l(e,t){o(t).setLevel(e)}t.b=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(e){void 0===e&&(e=new Map),i(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),i(this,"_attemptCounter",1),this.headers=e}var t=e.prototype;return t.getUrl=function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")},t.doHttpRequest=function(){var e=this,t=new Promise((function(t,n){e._requestPromise={resolve:t,reject:n}}));return this.url||this._requestPromise.reject(new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,r.a.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t},t._createXHR=function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var n=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(n)}catch(n){e._requestPromise.reject(e._createError(t,r.a.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var n=performance.now();t.ontimeout=function(){e._handleError(t,r.a.Code.TIMEOUT,{timeout:(performance.now()-n)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,r.a.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,n){t.setRequestHeader(n,e)})),t.send(this.params)},t._getResponseHeaders=function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))},t._handleError=function(e,t,n){var r=this._createError(e,t,n);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(r);this._attemptCounter++,this._createXHR()},t._createError=function(e,t,n){return Object.assign(n,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,t,n)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){var t;(t="hasError")in this?Object.defineProperty(this,t,{value:!1,enumerable:!0,configurable:!0,writable:!0}):this[t]=!1,"KalturaAPIException"===e.objectType?(this.hasError=!0,this.error=new i(e.code,e.message)):e.error&&"KalturaAPIException"===e.error.objectType?(this.hasError=!0,this.error=new i(e.error.code,e.error.message)):this.data=e},i=function(e,t){this.code=e,this.message=t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a}));var r={DASH:{name:"dash",mimeType:"application/dash+xml",pathExt:"mpd"},HLS:{name:"hls",mimeType:"application/x-mpegURL",pathExt:"m3u8"},WVM:{name:"wvm",mimeType:"video/wvm",pathExt:"wvm"},MP4:{name:"mp4",mimeType:"video/mp4",pathExt:"mp4"},MP3:{name:"mp3",mimeType:"audio/mpeg",pathExt:"mp3"}},i=new Map([["mpegdash",r.DASH],["applehttp",r.HLS],["url",r.MP4]]);function a(e){var t=i.get(e);return!!t&&t.name===r.MP4.name}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r,i,a,o=function(e){this.scheme=e.scheme,this.licenseURL=e.licenseURL,this.certificate=e.certificate};a={"drm.PLAYREADY_CENC":"com.microsoft.playready","drm.WIDEVINE_CENC":"com.widevine.alpha","fairplay.FAIRPLAY":"com.apple.fairplay",WIDEVINE_CENC:"com.widevine.alpha",PLAYREADY_CENC:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"},(i="Scheme")in(r=o)?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){this.message=e.message,this.code=e.code}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n(9);var r=n(5),i=(n(13),function(){function e(){this.progressive=[],this.dash=[],this.hls=[],this.image=[]}var t=e.prototype;return t.map=function(e,t){if(t)switch(t.name){case r.a.MP4.name:this.progressive.push(e);break;case r.a.DASH.name:this.dash.push(e);break;case r.a.HLS.name:this.hls.push(e)}},t.toJSON=function(){var e={progressive:[],dash:[],hls:[],image:[]};return this.progressive.forEach((function(t){return e.progressive.push(t.toJSON())})),this.hls.forEach((function(t){return e.hls.push(t.toJSON())})),this.dash.forEach((function(t){return e.dash.push(t.toJSON())})),e.image=this.image,e},e}())},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n(12);var r=function(){function e(){}return e.prototype.toJSON=function(){var e={id:this.id,url:this.url,mimetype:this.mimetype};return this.bandwidth&&(e.bandwidth=this.bandwidth),this.width&&(e.width=this.width),this.height&&(e.height=this.height),this.label&&(e.label=this.label),this.drmData&&this.drmData.length>0&&(e.drmData=[],this.drmData.forEach((function(t){Array.isArray(e.drmData)&&e.drmData.push(t.toJSON())}))),e},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n(11);var r=n(0);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(e){i(this,"_loadersResponseMap",new Map),i(this,"_loaders",new Map),this._networkRetryConfig=e}var t=e.prototype;return t.add=function(e,t,n){var r=this,i=new e(t);if(i.isValid()){this._loaders.set(e.id,i);var a=this._multiRequest.requests.length,o=i.requests;this._multiRequest.retryConfig=this._networkRetryConfig,o.forEach((function(e){e.params=e.params||{},e.params.ks=e.params.ks||n,r._multiRequest.add(e)}));var s=Array.from(new Array(o.length),(function(e,t){return t+a}));this._loadersResponseMap.set(e.id,s)}},t.fetchData=function(e){var t=this;return new Promise((function(n,i){t._multiRequest.execute(e).then((function(e){t._multiResponse=e.response,t.prepareData(e.response).success?n(t._loaders):i(new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,r.a.Code.API_RESPONSE_MISMATCH,{headers:e.headers}))}),(function(e){i(e)}))}))},t.prepareData=function(e){var t=this;return this._loaders.forEach((function(n,r){var i=t._loadersResponseMap.get(r);try{i&&i.length>0&&(n.response=e.results.slice(i[0],i[i.length-1]+1))}catch(e){return{success:!1,error:e}}})),{success:!0,data:this._loaders}},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),i=n(2),a=n(4),o=n(0);function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return l(s(t=e.call.apply(e,[this].concat(r))||this),"requests",[]),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.add=function(e){var t;this.requests.push(e);var n={},r={service:e.service,action:e.action};return Object.assign(n,((t={})[this.requests.length]=Object.assign(r,e.params),t)),Object.assign(n,this.params),this.params=n,this},i.execute=function(e){var t=this;return new Promise((function(n,i){try{t.params=JSON.stringify(t.params)}catch(e){r._logger.error(""+e.message),i(new o.a(o.a.Severity.CRITICAL,o.a.Category.PROVIDER,o.a.Code.FAILED_PARSING_REQUEST,{error:e,params:t.params}))}t.doHttpRequest().then((function(r){var a=new c(r,e);a.success?n({headers:t.responseHeaders,response:a}):i(new o.a(o.a.Severity.CRITICAL,o.a.Category.NETWORK,o.a.Code.MULTIREQUEST_API_ERROR,{url:t.url,headers:t.responseHeaders,results:a.results}))}),(function(e){i(e)}))}))},r}(r.a);l(u,"_logger",Object(i.b)("MultiRequestBuilder"));var c=function e(t,n){void 0===n&&(n=!0),l(this,"results",[]);var r=t.result?t.result:t,i=(Array.isArray(r)?r:[r]).map((function(e){return new a.a(e)})),o=i.filter((function(e){return e.hasError}));o.forEach((function(t){e._logger.error("Service returned an error with error code: "+t.error.code+" and message: "+t.error.message+".")})),this.results=i,n&&o.length||o.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(e){return!e.hasError})),this.success=!0)};l(c,"_logger",Object(i.b)("MultiRequestResult"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(e,t,n){this.licenseUrl=e,this.scheme=t,n&&(this.certificate=n)}return e.prototype.toJSON=function(){var e={licenseUrl:this.licenseUrl,scheme:this.scheme};return this.certificate&&(e.certificate=this.certificate),e},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(){function e(t){this.id=t.id,this.url=e.extractBaseThumbnailUrl(t.dataUrl),this.mimetype=""}return e.extractBaseThumbnailUrl=function(e){return e.match(".+entry_id/[a-zA-Z0-9_]+/")[0].slice(0,-1)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(2),i=(n(10),n(0));function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}var s=function(){function e(e,t){var n,i;i={async:!0,timeout:0,maxAttempts:4},(n="_networkRetryConfig")in this?Object.defineProperty(this,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):this[n]=i,Object(r.e)(e.logger),this._partnerId=e.partnerId,this._widgetId=e.widgetId,this._uiConfId=e.uiConfId,this._isAnonymous=!e.ks,this._ks=e.ks||"",this._playerVersion=t}o(e,[{key:"partnerId",get:function(){return this._partnerId}},{key:"widgetId",get:function(){return this._widgetId||this.defaultWidgetId}},{key:"defaultWidgetId",get:function(){return"_"+this._partnerId}},{key:"uiConfId",get:function(){return this._uiConfId}},{key:"ks",get:function(){return this._ks},set:function(e){this._ks=e}},{key:"playerVersion",get:function(){return this._playerVersion}},{key:"isAnonymous",get:function(){return this._isAnonymous}}]);var t=e.prototype;return t.getMediaConfig=function(e){return Promise.reject(new i.a(i.a.Severity.CRITICAL,i.a.Category.PROVIDER,i.a.Code.METHOD_NOT_IMPLEMENTED,{message:"getMediaConfig method must be implement by the derived class"}))},t.getPlaylistConfig=function(e){return Promise.reject(new i.a(i.a.Severity.CRITICAL,i.a.Category.PROVIDER,i.a.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading playlist by id"}))},t.getEntryListConfig=function(e){return Promise.reject(new i.a(i.a.Severity.CRITICAL,i.a.Category.PROVIDER,i.a.Code.METHOD_NOT_IMPLEMENTED,{message:"The provider does not support loading entry list"}))},t._verifyHasSources=function(e){if(0===e.hls.concat(e.dash,e.progressive,e.image).length)throw new i.a(i.a.Severity.CRITICAL,i.a.Category.SERVICE,i.a.Code.MISSING_PLAY_SOURCE,{action:"",messages:"No play source for entry id: "+e.id})},t.getLogLevel=function(e){return Object(r.c)(e)},t.setLogLevel=function(e,t){Object(r.d)(e,t)},o(e,[{key:"LogLevel",get:function(){return r.a}}]),e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function e(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,r){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[r]=e(t))})):"object"==typeof t?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"==typeof n[t]&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n(1);var r=function(){this.items=[]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){this.url=e.url,this.clickThroughUrl=e.clickThroughUrl}},function(e,t,n){"use strict";n.r(t),n.d(t,"Provider",(function(){return ke})),n.d(t,"ProviderParser",(function(){return K})),n.d(t,"NAME",(function(){return Te})),n.d(t,"VERSION",(function(){return Ae})),n.d(t,"RequestBuilder",(function(){return G.a})),n.d(t,"ResponseTypes",(function(){return r}));var r={};n.r(r),n.d(r,"KalturaBaseEntryListResponse",(function(){return $})),n.d(r,"KalturaMediaEntry",(function(){return S})),n.d(r,"KalturaAccessControlModifyRequestHostRegexAction",(function(){return y})),n.d(r,"KalturaBumper",(function(){return m})),n.d(r,"KalturaFlavorAsset",(function(){return v})),n.d(r,"KalturaMediaEntries",(function(){return oe})),n.d(r,"KalturaMetadata",(function(){return T})),n.d(r,"KalturaMetadataListResponse",(function(){return A})),n.d(r,"KalturaPlaybackContext",(function(){return E})),n.d(r,"KalturaPlaybackSource",(function(){return h})),n.d(r,"KalturaPlaylist",(function(){return ae})),n.d(r,"KalturaRuleAction",(function(){return g})),n.d(r,"KalturaUIConfResponse",(function(){return ye})),n.d(r,"KalturaDrmPlaybackPluginData",(function(){return f.a})),n.d(r,"KalturaAccessControlMessage",(function(){return d.a})),n.d(r,"BaseServiceResult",(function(){return p.a}));var i,a,o,s=n(2),l=n(15),u={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1,replaceHostOnlyManifestUrls:!1},c=function(){function e(){}return e.set=function(e){e&&Object.assign(u,e)},e.get=function(){return Object(l.a)(u)},e}(),p=n(4),d=n(7),f=n(6),h=function(){function e(e){var t,n=this;t=[],"drm"in this?Object.defineProperty(this,"drm",{value:t,enumerable:!0,configurable:!0,writable:!0}):this.drm=t,this.format=e.format,this.deliveryProfileId=e.deliveryProfileId,this.url=e.url,this.protocols=e.protocols,this.flavorIds=e.flavorIds,e.drm&&e.drm.map((function(e){return n.drm.push(new f.a(e))}))}var t=e.prototype;return t.hasDrmData=function(){return this.drm&&this.drm.length>0},t.hasFlavorIds=function(){return!!this.flavorIds&&this.flavorIds.length>0},t.getProtocol=function(e){var t="";if(this.protocols&&this.protocols.length>0)this.protocols.split(",").forEach((function(n){n===e&&(t=n)}));else if("http"===e)return e;return t},e}(),g=function(e){this.type=e.type};o={DRM_POLICY:"drm.DRM_POLICY",BLOCK:1,PREVIEW:2,LIMIT_FLAVORS:3,ADD_TO_STORAGE:4,LIMIT_DELIVERY_PROFILES:5,SERVE_FROM_REMOTE_SERVER:6,REQUEST_HOST_REGEX:7,LIMIT_THUMBNAIL_CAPTURE:8},(a="Type")in(i=g)?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o;var y=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).pattern=t.pattern,n.replacement=t.replacement,n.replacmenServerNodeId=t.replacmenServerNodeId,n.checkAliveTimeoutMs=t.checkAliveTimeoutMs,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(g),v=function(e){this.id=e.id,this.flavorParamsId=e.flavorParamsId,this.fileExt=e.fileExt,this.bitrate=e.bitrate,this.width=e.width,this.height=e.height,this.id=e.id,this.frameRate=e.frameRate,this.isOriginal=e.isOriginal,this.isWeb=e.isWeb,this.containerFormat=e.containerFormat,this.videoCodecId=e.videoCodecId,this.status=e.status,this.language=e.language,this.label=e.label};!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(v,"Status",{ERROR:-1,QUEUED:0,CONVERTING:1,READY:2,DELETED:3,NOT_APPLICABLE:4,TEMP:5,WAIT_FOR_CONVERT:6,IMPORTING:7,VALIDATING:8,EXPORTING:9});var m=function(e){this.entryId=e.entryId,this.clickThroughUrl=e.url,this.sources=e.sources?e.sources.map((function(e){return new h(e)})):[]};function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var E=function(e){var t,n;function r(t){var n;if(_(b(n=e.call(this,t)||this),"sources",[]),_(b(n),"actions",[]),_(b(n),"messages",[]),_(b(n),"flavorAssets",[]),_(b(n),"bumperData",[]),!n.hasError){var r=t.messages;r&&r.map((function(e){return n.messages.push(new d.a(e))}));var i=t.actions;i&&i.map((function(e){e.type===g.Type.REQUEST_HOST_REGEX?n.actions.push(new y(e)):n.actions.push(new g(e))}));var a=t.sources;a&&a.map((function(e){return n.sources.push(new h(e))}));var o=t.flavorAssets;o&&o.map((function(e){return n.flavorAssets.push(new v(e))}));var s=t.bumperData;s&&s.map((function(e){return n.bumperData.push(new m(e))}))}return n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.hasBlockAction=function(){return void 0!==this.getBlockAction()},i.getBlockAction=function(){return this.actions.find((function(e){return e.type===g.Type.BLOCK}))},i.getErrorMessages=function(){return this.messages},i.getRequestHostRegexAction=function(){var e=this.actions.find((function(e){return e.type===g.Type.REQUEST_HOST_REGEX}));if(e instanceof y)return e},r}(p.a);function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T=function(e){this.id=e.id,this.metadataProfileId=e.metadataProfileId,this.metadataProfileVersion=e.metadataProfileVersion,this.metadataProfileId=e.metadataProfileId,this.metadataObjectType=e.metadataObjectType,this.objectId=e.objectId,this.version=e.version,this.created=new Date(0),this.created.setUTCSeconds(e.createdAt),this.updated=new Date(0),this.updated.setUTCSeconds(e.updatedAt),this.status=e.status,this.xml=e.xml};k(T,"ObjectType",{AD_CUE_POINT:"adCuePointMetadata.AdCuePoint",ANNOTATION:"annotationMetadata.Annotation",CODE_CUE_POINT:"codeCuePointMetadata.CodeCuePoint",THUMB_CUE_POINT:"thumbCuePointMetadata.thumbCuePoint",ENTRY:1,CATEGORY:2,USER:3,PARTNER:4,DYNAMIC_OBJECT:5}),k(T,"Status",{VALID:1,INVALID:2,DELETED:3});var A=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.totalCount=t.totalCount,n.totalCount>0&&(n.metas=[],t.objects.map((function(e){return n.metas.push(new T(e))})))),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S=function(e){this.id=e.id,this.referenceId=e.referenceId,this.externalSourceType=e.externalSourceType,this.name=e.name,this.description=e.description,this.dataUrl=e.dataUrl,this.type=e.type,this.entryType=e.mediaType,this.flavorParamsIds=e.flavorParamsIds,this.duration=e.duration,this.poster=e.thumbnailUrl,this.status=e.status,this.dvrStatus=e.dvrStatus,this.tags=e.tags};w(S,"EntryType",{AUTOMATIC:{value:-1},EXTERNAL_MEDIA:{value:"externalMedia.externalMedia"},MEDIA_CLIP:{value:1},MIX:{value:2},PLAYLIST:{value:5},DATA:{value:6},LIVE_STREAM:{value:7},LIVE_CHANNEL:{value:8},DOCUMENT:{value:10}}),w(S,"MediaType",{VIDEO:{value:1},IMAGE:{value:2},AUDIO:{value:5},LIVE_STREAM_FLASH:{value:201},LIVE_STREAM_WINDOWS_MEDIA:{value:202},LIVE_STREAM_REAL_MEDIA:{value:203},LIVE_STREAM_QUICK_TIME:{value:204}}),w(S,"EntryStatus",{ERROR_IMPORTING:-2,ERROR_CONVERTING:-1,SCAN_FAILURE:"virusScan.ScanFailure",IMPORT:0,INFECTED:"virusScan.Infected",PRECONVERT:1,READY:2,DELETED:3,PENDING:4,MODERATE:5,BLOCKED:6,NO_CONTENT:7}),w(S,"EntryModerationStatus",{PENDING_MODERATION:1,APPROVED:2,REJECTED:3,FLAGGED_FOR_REVIEW:4,MODERATE:5,AUTO_APPROVED:6});var C=function(){function e(){}return e.build=function(e){var t=c.get(),n=t.serviceUrl.substr(0,t.serviceUrl.lastIndexOf("/")),r=e.partnerId,i=e.entryId,a=e.ks,o=e.uiConfId,s=e.format,l=e.protocol,u=e.extension,p=e.flavorIds;if(!n||isNaN(Number.parseInt(r))||!i||!s||!l)return"";var d=n;return n.endsWith("/")||(d+="/"),d+="p/"+r+"/sp/"+r+"00/playManifest/entryId/"+i+"/protocol/"+l+"/format/"+s,p?d+="/flavorIds/"+p:o&&(d+="/uiConfId/"+o),""!==a&&(d+="/ks/"+a),""!==u&&(d+="/a."+u),o&&""!==p&&(d+="?uiConfId="+o),d},e}(),x=function(){function e(){}return e.xmlToJson=function(e){var t={};if(1===e.nodeType){if(e.attributes.length>0){t["@attributes"]={};for(var n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);t["@attributes"][r.nodeName]=r.nodeValue}}}else 3===e.nodeType&&(t=e.nodeValue);if(e.hasChildNodes())for(var i=0;i<e.childNodes.length;i++){var a=e.childNodes.item(i),o=a.nodeName;if(void 0===t[o])t[o]=this.xmlToJson(a);else{if(void 0===t[o].push){var s=t[o];t[o]=[],t[o].push(s)}t[o].push(this.xmlToJson(a))}}return t},e}(),I=n(1),P=n(12),D=n(9),R=n(8),O=n(5),L=function(){this.items=[]},M=n(16),N=n(17),U={SRT:"1",DFXP:"2",WEBVTT:"3",CAP:"4"},F={3:"vtt",1:"srt"},j=function(){function e(){}return e.createConfig=function(e,t){return e.map((function(e){var n=e.url,r=F[e.format];return[U.DFXP,U.CAP].includes(e.format)&&(n=e.webVttUrl,r=F[U.WEBVTT]),n=H(n,t),{default:!!e.isDefault,type:r,language:e.languageCode,label:e.label,url:n}}))},e}(),B=n(13),V=function(){function e(){}return e.getMediaEntry=function(t,n,r,i){var a=new I.a,o=i.entry,s=i.playBackContextResult,l=i.metadataListResult,u=s.sources;return a.sources=e._getParsedSources(u,t,n,r,o,s),e._fillBaseData(a,o,l),a.type!==I.a.Type.LIVE&&c.get().useApiCaptions&&s.data.playbackCaptions&&(a.sources.captions=j.createConfig(s.data.playbackCaptions,t)),a},e.addKsToUrl=function(e,t){var n;return t?(n=-1!==e.split("?")[0].replace(/^.*[\\/]/,"").indexOf(".")?-1===e.indexOf("?")?"?ks=":"&ks=":"/ks/",e+n+t):e},e.getPlaylist=function(t){var n=new L,r=t.playlistData,i=t.playlistItems.entries;return n.id=r.id,n.name=r.name,n.description=r.description,n.poster=r.poster,i.forEach((function(t){var r=new I.a;e._fillBaseData(r,t),n.items.push(r)})),n},e.getEntryList=function(t){var n=new M.a;return t.playlistItems.entries.forEach((function(t){var r=new I.a;e._fillBaseData(r,t),n.items.push(r)})),n},e.getBumper=function(t,n,r){var i=t.playBackContextResult,a=i.bumperData[0];if(a){var o=(a&&a.sources).find((function(e){return Object(O.c)(e.format)}));if(o){var s=e._parseProgressiveSources(o,i,n,r,0,a.entryId);if(s[0])return new N.a({url:s[0].url,clickThroughUrl:a.clickThroughUrl})}}},e._fillBaseData=function(t,n,r){return t.poster=n.poster,t.id=n.id,t.duration=n.duration,t.metadata=e._parseMetadata(r),t.metadata.description=n.description||"",t.metadata.entryId=n.id||"",t.metadata.name=n.name||"",t.metadata.tags=n.tags||"",t.status=n.status,t.type=e._getEntryType(n.entryType,n.type),t.type===I.a.Type.LIVE&&(t.dvrStatus=n.dvrStatus),t},e._getEntryType=function(e,t){var n=I.a.Type.UNKNOWN;switch(e){case S.MediaType.IMAGE.value:n=I.a.Type.IMAGE;break;case S.MediaType.AUDIO.value:n=I.a.Type.AUDIO;break;default:switch(t){case S.EntryType.MEDIA_CLIP.value:n=I.a.Type.VOD;break;case S.EntryType.LIVE_STREAM.value:case S.EntryType.LIVE_CHANNEL.value:n=I.a.Type.LIVE;break;default:n=I.a.Type.UNKNOWN}}return n},e._getParsedSources=function(t,n,r,i,a,o){var s,l,u=new R.a;return a.type===S.EntryType.EXTERNAL_MEDIA.value?((l=new D.a).mimetype="video/youtube",l.url=a.referenceId,l.id=a.id+"_youtube",u.progressive.push(l)):a.entryType===S.MediaType.IMAGE.value?u.image.push(new B.a(a)):t&&t.length>0&&(t.filter((function(e){return!Object(O.c)(e.format)})).forEach((function(t){var s=e._parseAdaptiveSource(t,o,n,r,i,a.id);if(s){var l=O.b.get(t.format);u.map(s,l)}})),s=t.find((function(t){return Object(O.c)(t.format)&&""!==t.getProtocol(e._getBaseProtocol())})),u.progressive=e._parseProgressiveSources(s,o,n,r,i,a.id)),u},e._parseAdaptiveSource=function(t,n,r,i,a,o){var s=new D.a;if(t){var l="",u=O.b.get(t.format),c=t.getProtocol(e._getBaseProtocol()),p=t.deliveryProfileId,d=t.format,h="";if(u&&(h=u.pathExt,s.mimetype=u.mimeType),t.hasFlavorIds()?(!h&&n.flavorAssets&&n.flavorAssets.length>0&&(h=n.flavorAssets[0].fileExt),l=C.build({entryId:o,flavorIds:t.flavorIds,format:d,ks:r,partnerId:i,uiConfId:a,extension:h,protocol:c})):l=e.addKsToUrl(t.url,r),!l){var g="failed to create play url from source, discarding source: ("+o+"_"+p+"), "+d;return e._logger.warn(g),null}if(s.url=l,s.id=o+"_"+p+","+d,t.hasDrmData()){var y=[];t.drm.forEach((function(e){y.push(new P.a(e.licenseURL,f.a.Scheme[e.scheme],e.certificate))})),s.drmData=y}}return s},e._parseProgressiveSources=function(t,n,r,i,a,o){var s=[],l=[];if(t){var u=t.getProtocol(e._getBaseProtocol()),c=t.format,p=t.deliveryProfileId,d=p+","+c;n.flavorAssets.map((function(t){var n=new D.a;n.id=t.id+d,n.mimetype="mp3"===t.fileExt?"audio/mp3":"video/mp4",n.height=t.height,n.width=t.width,n.bandwidth=1024*t.bitrate,n.label=t.label||t.language;var f=C.build({entryId:o,flavorIds:t.id,format:c,ks:r,partnerId:i,uiConfId:a,extension:t.fileExt,protocol:u});if(""===f)return e._logger.warn("failed to create play url from source, discarding source: ("+o+"_"+p+"), "+c+"."),null;n.url=f,t.height&&t.width?s.push(n):l.push(n)}))}return l.length&&!s.length?l:s},e._parseMetadata=function(e){var t={};return e&&e.metas&&e.metas.length>0&&e.metas.forEach((function(e){if(e.xml){var n,r=new DOMParser;e.xml=e.xml.replace(/\r?\n|\r/g,""),e.xml=e.xml.replace(/>\s*/g,">"),e.xml=e.xml.replace(/>\s*/g,">"),n=r.parseFromString(e.xml,"text/xml");var i=x.xmlToJson(n);Object.keys(i.metadata).forEach((function(e){t[e]=i.metadata[e]["#text"]}))}})),t},e._getBaseProtocol=function(){var e=c.get(),t=/^https?:/.exec(e.cdnUrl),n=t?t[0]:document.location.protocol;return"string"==typeof n?n.slice(0,-1):"https"},e.hasBlockAction=function(e){return e.playBackContextResult.hasBlockAction()},e.getBlockAction=function(e){return e.playBackContextResult.getBlockAction()},e.getErrorMessages=function(e){return e.playBackContextResult.getErrorMessages()},e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(V,"_logger",Object(s.b)("OVPProviderParser"));var H=V.addKsToUrl,K=V,G=n(3),z=n(11),W=function(){function e(){}return e.getMultiRequest=function(e,t,n){var r=c.get(),i=r.serviceParams;Object.assign(i,{ks:t,clientTag:"html5:v"+e}),n&&Object.assign(i,{partnerId:n});var a=new Map;a.set("Content-Type","application/json");var o=new z.a(a);return o.method="POST",o.service="multirequest",o.url=o.getUrl(r.serviceUrl),o.params=i,o},e}(),Y=function e(t){void 0===t&&(t={}),this.type=t.type||e.Type.INCLUDE_FIELDS,this.fields=t.fields||"id,referenceId,name,description,thumbnailUrl,dataUrl,duration,msDuration,flavorParamsIds,mediaType,type,tags,dvrStatus,externalSourceType,status"};!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Y,"Type",{INCLUDE_FIELDS:1,EXCLUDE_FIELDS:2});var q=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.getPlaybackContext=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);return i.service="baseEntry",i.action="getPlaybackContext",i.method="POST",i.url=i.getUrl(e),i.tag="baseEntry-getPlaybackContext",i.params={entryId:n,ks:t,contextDataParams:{objectType:"KalturaContextDataParams",flavorTags:"all"}},i},r.list=function(e,t,n,i,a){var o=new Map;o.set("Content-Type","application/json");var s=new G.a(o);return s.service="baseEntry",s.action="list",s.method="POST",s.url=s.getUrl(e),s.tag="list",s.params=r.getEntryListReqParams(n,t,i,a),s},r.getEntryListReqParams=function(e,t,n,r){var i={};return e?i=n?{redirectFromEntryId:e}:{idEqual:e}:r&&(i={objectType:"KalturaBaseEntryFilter",referenceIdEqual:r}),{ks:t,filter:i,responseProfile:new Y}},r}(W),X=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.list=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);i.service="metadata_metadata",i.action="list",i.method="POST",i.url=i.getUrl(e),i.tag="metadata_metadata-list";var a={objectType:"KalturaMetadataFilter",objectIdEqual:n,metadataObjectTypeEqual:"1"};return i.params={filter:a,ks:t},i},r}(W),$=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.totalCount=t.totalCount,n.totalCount>0&&(n.entries=[],t.objects.map((function(e){return n.entries.push(new S(e))})))),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function Q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Z(e,t,n){return t&&Q(e.prototype,t),n&&Q(e,n),e}var J=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_response",{}),this.requests=this.buildRequests(e),this._entryId=e.entryId,this._referenceId=e.referenceId}Z(e,null,[{key:"id",get:function(){return"media"}}]);var t=e.prototype;return t.buildRequests=function(e){var t=c.get(),n=[];n.push(q.list(t.serviceUrl,e.ks,e.entryId,e.redirectFromEntryId,e.referenceId));var r="{1:result:ks}"===e.ks?"{2:result:objects:0:id}":"{1:result:objects:0:id}";return n.push(q.getPlaybackContext(t.serviceUrl,e.ks,r)),n.push(X.list(t.serviceUrl,e.ks,r)),n},t.isValid=function(){return!(!this._entryId&&!this._referenceId)},Z(e,[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){var t=new $(e[0].data);this._response.entry=t.entries[0],this._response.playBackContextResult=new E(e[1].data),this._response.metadataListResult=new A(e[2].data)},get:function(){return this._response}}]),e}(),ee=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.anonymousSession=function(e,t){var n=new Map;n.set("Content-Type","application/json");var r=new G.a(n);return r.service="session",r.action="startWidgetSession",r.method="POST",r.url=r.getUrl(e),r.tag="session-startWidget",r.params={widgetId:t},r},r}(W);function te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ne=function(){var e,t,n;function r(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_response",{}),this.requests=this.buildRequests(e),this._widgetId=e.widgetId}e=r,n=[{key:"id",get:function(){return"session"}}],(t=[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){this._response.ks=e[0].data.ks},get:function(){return this._response.ks}}])&&te(e.prototype,t),n&&te(e,n);var i=r.prototype;return i.buildRequests=function(e){var t=c.get(),n=[];return n.push(ee.anonymousSession(t.serviceUrl,e.widgetId)),n},i.isValid=function(){return!!this._widgetId},r}(),re=function(e){var t,n;function r(t,n,r,i){var a;return void 0===r&&(r=""),(a=e.call(this,i)||this)._multiRequest=W.getMultiRequest(t,r,n),a}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(n(10).a),ie=function(e){var t,n;function r(){return e.apply(this,arguments)||this}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.execute=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);return i.service="playlist",i.action="execute",i.method="POST",i.url=i.getUrl(e),i.tag="playlist-execute",i.params={ks:t,id:n,responseProfile:new Y},i},r.get=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new G.a(r);return i.service="playlist",i.action="get",i.method="POST",i.url=i.getUrl(e),i.tag="playlist-get",i.params={ks:t,id:n,responseProfile:{fields:"id,name,description,thumbnailUrl",type:1}},i},r}(W),ae=function(e){this.id=e.id,this.name=e.name,this.description=e.description,this.poster=e.thumbnailUrl},oe=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.entries=[],t.map((function(e){return n.entries.push(new S(e))}))),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function le(e,t,n){return t&&se(e.prototype,t),n&&se(e,n),e}var ue=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_response",{}),this.requests=this.buildRequests(e),this._playlistId=e.playlistId}le(e,null,[{key:"id",get:function(){return"playlist"}}]);var t=e.prototype;return t.buildRequests=function(e){var t=c.get(),n=[];return n.push(ie.get(t.serviceUrl,e.ks,e.playlistId)),n.push(ie.execute(t.serviceUrl,e.ks,e.playlistId)),n},t.isValid=function(){return!!this._playlistId},le(e,[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){this._response.playlistData=new ae(e[0].data),this._response.playlistItems=new oe(e[1].data)},get:function(){return this._response}}]),e}(),ce=n(14);function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function de(e,t,n){return t&&pe(e.prototype,t),n&&pe(e,n),e}var fe=function(){function e(e){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_response",{playlistItems:{entries:[]}}),this.requests=this.buildRequests(e),this._entries=e.entries}de(e,null,[{key:"id",get:function(){return"entry_list"}}]);var t=e.prototype;return t.buildRequests=function(e){var t=c.get(),n=[];return e.entries.forEach((function(r){n.push(q.list(t.serviceUrl,e.ks,r.entryId||r,e.redirectFromEntryId,r.referenceId))})),n},t.isValid=function(){return!(!this._entries||!this._entries.length)},de(e,[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){var t,n=this;e.forEach((function(e){t=new $(e.data),n._response.playlistItems.entries.push(t.entries[0])}))},get:function(){return this._response}}]),e}(),he=n(0);function ge(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ye=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.name=t.name,n.description=t.description,n.objTypeAsString=t.objTypeAsString,n.width=t.width,n.height=t.height,n.htmlParams=t.htmlParams,n.swfUrl=t.swfUrl,n.confFilePath=t.confFilePath,n.confFile=t.confFile,n.confFileFeatures=t.confFileFeatures,n.config=t.config,n.confVars=t.confVars,n.useCdn=t.useCdn,n.tags=t.tags,n.swfUrlVersion=t.swfUrlVersion,n.created=new Date(0),n.created.setUTCSeconds(t.createdAt),n.updated=new Date(0),n.updated.setUTCSeconds(t.updatedAt),n.html5Url=t.description,n.version=t.description,n.partnerTags=t.description,n.objType=t.description,n.creationMode=t.description),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(p.a);function ve(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function me(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){ve(a,r,i,o,s,"next",e)}function s(e){ve(a,r,i,o,s,"throw",e)}o(void 0)}))}}ge(ye,"Type",{PLAYER:1,CONTRIBUTION_WIZARD:2,SIMPLE_EDITOR:3,ADVANCED_EDITOR:4,PLAYLIST:5,APP_STUDIO:6,KRECORD:7,PLAYER_V3:8,KMC_ACCOUNT:9,KMC_ANALYTICS:10,KMC_CONTENT:11,KMC_DASHBOARD:12,KMC_LOGIN:13,PLAYER_SL:14,CLIENTSIDE_ENCODER:15,KMC_GENERAL:16,KMC_ROLES_AND_PERMISSIONS:17,CLIPPER:18,KSR:19,KUPLOAD:20,WEBCASTING:21}),ge(ye,"CreationMode",{WIZARD:2,ADVANCED:3});var be=function(){function e(){}return e._applyRegexAction=function(e,t){if(e){var n=new RegExp(e.pattern,"i");if(t.match(n))return t.replace(n,e.replacement+"/")}return t},e._isECDNUrlAlive=function(){var t=me(regeneratorRuntime.mark((function t(n,r){var i,a;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=r+"/api_v3/service/system/action/ping/format/1",(a=new XMLHttpRequest).open("GET",i),a.timeout=n.checkAliveTimeoutMs,a.onreadystatechange=function(){if(4===a.readyState)return 200===a.status},a.ontimeout=function(){return e._logger.warn("Got timeout while pinging the ECDN url. the ping url: "+i),!1},a.send();case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e.handleRegexAction=function(){var t=me(regeneratorRuntime.mark((function t(n,r){var i,a,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=c.get().cdnUrl,a=e._extractRegexActionFromData(r),o=e._getRegExp(a),t.t0=i&&a&&o&&i.match(o),!t.t0){t.next=11;break}if(t.t1=a.checkAliveTimeoutMs>0,!t.t1){t.next=10;break}return t.next=9,e._isECDNUrlAlive(a,i.replace(o,a.replacement));case 9:t.t1=!t.sent;case 10:t.t0=!t.t1;case 11:if(!t.t0){t.next=14;break}return e._replaceHostUrls(n,a),t.abrupt("return",n);case 14:return e._logger.debug("exiting handleRegexAction - not applying regex action."),t.abrupt("return",n);case 16:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),e._replaceHostUrls=function(t,n){e._logger.debug("Starting to modify urls...");var r=t.sources,i=r.hls,a=r.dash,o=r.progressive,s=r.image;[].concat(i,a,o,s).forEach((function(t){return t.url=e._applyRegexAction(n,t.url)})),c.get().replaceHostOnlyManifestUrls||(e._logger.debug("replaceHostOnlyManifestUrls flag is off - modifying captions and poster URLs"),r.captions&&r.captions.forEach((function(t){return t.url=e._applyRegexAction(n,t.url)})),"string"==typeof r.poster&&(r.poster=e._applyRegexAction(n,r.poster))),e._logger.debug("Finished modifying urls")},e._extractRegexActionFromData=function(e){var t,n;return null==(t=e.get(J.id))||null==(n=t.response)?void 0:n.playBackContextResult.getRequestHostRegexAction()},e._getRegExp=function(e){if(e&&e.pattern&&e.replacement)return new RegExp(e.pattern,"i")},e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(be,"_logger",Object(s.b)("RegexActionHandler"));var _e=be;function Ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ke=function(e){var t,n;function r(t,n){var r;return function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(r=e.call(this,t,n)||this),"_filterOptionsConfig",{redirectFromEntryId:!0}),r._logger=Object(s.b)("OVPProvider"),c.set(t.env),r._setFilterOptionsConfig(t.filterOptions),r._networkRetryConfig=Object.assign(r._networkRetryConfig,t.networkRetryParameters),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i,a,o=r.prototype;return o.getMediaConfig=function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this.widgetId!==this.defaultWidgetId&&(this._isAnonymous=!1),this._dataLoader=new re(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(n,r){var i=e.entryId,a=e.referenceId;if(i||a){var o=t.ks;o||(o="{1:result:ks}",t._dataLoader.add(ne,{widgetId:t.widgetId}));var s=t._getEntryRedirectFilter(e);return t._dataLoader.add(J,{entryId:i,ks:o,redirectFromEntryId:s,referenceId:a}),t._dataLoader.fetchData().then((function(e){try{var i=t._parseDataFromResponse(e);_e.handleRegexAction(i,e).then(n)}catch(e){r(e)}}),(function(e){r(e)}))}r(new he.a(he.a.Severity.CRITICAL,he.a.Category.PROVIDER,he.a.Code.MISSING_MANDATORY_PARAMS,{message:"missing entry id"}))}))},o.doRequest=function(e,t){var n=this,r=t||this.ks,i=new re(this.playerVersion,this.partnerId,r,this._networkRetryConfig);return new Promise((function(t,a){return r||i.add(ne,{widgetId:n.widgetId}),e.forEach((function(e){i.add(e.loader,e.params,r||"{1:result:ks}")})),i.fetchData().then((function(e){try{t(e)}catch(e){a(e)}}),(function(e){a(e)}))}))},o._getEntryRedirectFilter=function(e){return"boolean"==typeof e.redirectFromEntryId?e.redirectFromEntryId:"boolean"!=typeof this._filterOptionsConfig.redirectFromEntryId||this._filterOptionsConfig.redirectFromEntryId},o._setFilterOptionsConfig=function(e){e&&"boolean"==typeof e.redirectFromEntryId&&(this._filterOptionsConfig.redirectFromEntryId=e.redirectFromEntryId)},o._parseDataFromResponse=function(e){this._logger.debug("Data parsing started");var t={session:{isAnonymous:this._isAnonymous,partnerId:this.partnerId},sources:this._getDefaultSourcesObject(),plugins:{}};if(this.uiConfId&&(t.session.uiConfId=this.uiConfId),e){if(e.has(ne.id)){var n=e.get(ne.id);n&&n.response&&(t.session.ks=n.response,this.widgetId!==this.defaultWidgetId&&(this.ks=t.session.ks))}else t.session.ks=this.ks;if(e.has(J.id)){var r=e.get(J.id);if(r&&r.response){var i=r.response;if(K.hasBlockAction(i))throw new he.a(he.a.Severity.CRITICAL,he.a.Category.SERVICE,he.a.Code.BLOCK_ACTION,{action:K.getBlockAction(i),messages:K.getErrorMessages(i)});var a=K.getMediaEntry(this.isAnonymous?"":this.ks,this.partnerId,this.uiConfId,i);Object.assign(t.sources,this._getSourcesObject(a)),this._verifyMediaStatus(a),this._verifyHasSources(t.sources);var o=K.getBumper(i,this.isAnonymous?"":this.ks,this.partnerId);o&&Object.assign(t.plugins,{bumper:o})}}}return this._logger.debug("Data parsing finished",t),t},o._verifyMediaStatus=function(e){if([S.EntryStatus.IMPORT,S.EntryStatus.PRECONVERT].includes(e.status))throw new he.a(he.a.Severity.CRITICAL,he.a.Category.SERVICE,he.a.Code.MEDIA_STATUS_NOT_READY,{messages:"Status of entry id "+e.id+" is "+e.status+" and is still being imported or converted",data:{status:status}})},o.getPlaylistConfig=function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this.widgetId!==this.defaultWidgetId&&(this._isAnonymous=!1),this._dataLoader=new re(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(n,r){var i=e.playlistId;if(i){var a=t.ks;a||(a="{1:result:ks}",t._dataLoader.add(ne,{widgetId:t.widgetId})),t._dataLoader.add(ue,{playlistId:i,ks:a}),t._dataLoader.fetchData().then((function(e){n(t._parsePlaylistDataFromResponse(e))}),(function(e){r(e)}))}else r({success:!1,data:"Missing mandatory parameter"})}))},o._parsePlaylistDataFromResponse=function(e){var t=this;this._logger.debug("Data parsing started");var n=this._getPlaylistObject();if(e&&e.has(ue.id)){var r=e.get(ue.id);if(r&&r.response){var i=K.getPlaylist(r.response);n.id=i.id,n.poster=i.poster,n.metadata.name=i.name,n.metadata.description=i.description,i.items.forEach((function(e){return n.items.push({sources:t._getSourcesObject(e)})}))}}return this._logger.debug("Data parsing finished",n),n},o.getEntryListConfig=function(e){var t=this;return e.ks&&(this.ks=e.ks,this._isAnonymous=!1),this.widgetId!==this.defaultWidgetId&&(this._isAnonymous=!1),this._dataLoader=new re(this.playerVersion,this.partnerId,this.ks,this._networkRetryConfig),new Promise((function(n,r){var i=e.entries;if(i&&i.length){var a=t.ks;a||(a="{1:result:ks}",t._dataLoader.add(ne,{widgetId:t.widgetId}));var o=t._getEntryRedirectFilter(e);t._dataLoader.add(fe,{entries:i,ks:a,redirectFromEntryId:o}),t._dataLoader.fetchData(!1).then((function(e){n(t._parseEntryListDataFromResponse(e))}),(function(e){r(e)}))}else r({success:!1,data:"Missing mandatory parameter"})}))},o._parseEntryListDataFromResponse=function(e){var t=this;this._logger.debug("Data parsing started");var n=this._getPlaylistObject();if(e&&e.has(fe.id)){var r=e.get(fe.id);r&&r.response&&K.getEntryList(r.response).items.forEach((function(e){return n.items.push({sources:t._getSourcesObject(e)})}))}return this._logger.debug("Data parsing finished",n),n},o._getPlaylistObject=function(){return{id:"",metadata:{name:"",description:""},poster:"",items:[]}},o._getDefaultSourcesObject=function(){return{hls:[],dash:[],progressive:[],image:[],id:"",duration:0,type:I.a.Type.UNKNOWN,poster:"",dvr:!1,vr:null,metadata:{name:"",description:"",tags:""}}},o._getSourcesObject=function(e){var t=this._getDefaultSourcesObject(),n=e.sources.toJSON();return t.hls=n.hls,t.dash=n.dash,t.progressive=n.progressive,t.image=n.image,t.id=e.id,t.duration=e.duration,t.type=e.type,t.dvr=!!e.dvrStatus,t.poster=e.poster,e.sources.captions&&(t.captions=e.sources.captions),e.metadata&&"string"==typeof e.metadata.tags&&e.metadata.tags.search(/\b360\b/)>-1&&(t.vr={}),Object.assign(t.metadata,e.metadata),t},i=r,(a=[{key:"env",get:function(){return c.get()}}])&&Ee(i.prototype,a),r}(ce.a),Te="@playkit-js/playkit-js-providers-ovp",Ae="2.39.3-canary.0-edd6027"}])},function(e,t,n){var r=n(5),i=n(2).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){t.f=n(6)},function(e,t,n){var r=n(51)("keys"),i=n(31);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(2).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(5),i=n(4),a=function(e,t){if(i(e),!r(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,r){try{(r=n(19)(Function.call,n(22).f(Object.prototype,"__proto__").set,2))(e,[]),t=!(e instanceof Array)}catch(e){t=!0}return function(e,n){return a(e,n),t?e.__proto__=n:r(e,n),e}}({},!1):void 0),check:a}},function(e,t){e.exports="\t\n\v\f\r \u2028\u2029\ufeff"},function(e,t,n){var r=n(5),i=n(69).set;e.exports=function(e,t,n){var a,o=t.constructor;return o!==n&&"function"==typeof o&&(a=o.prototype)!==n.prototype&&r(a)&&i&&i(e,a),e}},function(e,t,n){"use strict";var r=n(21),i=n(26);e.exports=function(e){var t=String(i(this)),n="",a=r(e);if(a<0||a==1/0)throw RangeError("Count can't be negative");for(;a>0;(a>>>=1)&&(t+=t))1&a&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var r=n(21),i=n(26);e.exports=function(e){return function(t,n){var a,o,s=String(i(t)),l=r(n),u=s.length;return l<0||l>=u?e?"":void 0:(a=s.charCodeAt(l))<55296||a>56319||l+1===u||(o=s.charCodeAt(l+1))<56320||o>57343?e?s.charAt(l):a:e?s.slice(l,l+2):o-56320+(a-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(32),i=n(1),a=n(12),o=n(16),s=n(42),l=n(107),u=n(40),c=n(37),p=n(6)("iterator"),d=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,h,g,y,v){l(n,t,h);var m,b,_,E=function(e){if(!d&&e in w)return w[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",T="values"==g,A=!1,w=e.prototype,S=w[p]||w["@@iterator"]||g&&w[g],C=S||E(g),x=g?T?E("entries"):C:void 0,I="Array"==t&&w.entries||S;if(I&&(_=c(I.call(new e)))!==Object.prototype&&_.next&&(u(_,k,!0),r||"function"==typeof _[p]||o(_,p,f)),T&&S&&"values"!==S.name&&(A=!0,C=function(){return S.call(this)}),r&&!v||!d&&!A&&w[p]||o(w,p,C),s[t]=C,s[k]=f,g)if(m={values:T?C:E("values"),keys:y?C:E("keys"),entries:x},v)for(b in m)b in w||a(w,b,m[b]);else i(i.P+i.F*(d||A),t,m);return m}},function(e,t,n){var r=n(78),i=n(26);e.exports=function(e,t,n){if(r(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(e))}},function(e,t,n){var r=n(5),i=n(25),a=n(6)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[a])?!!t:"RegExp"==i(e))}},function(e,t,n){var r=n(6)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var r=n(42),i=n(6)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||a[i]===e)}},function(e,t,n){"use strict";var r=n(10),i=n(30);e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},function(e,t,n){var r=n(49),i=n(6)("iterator"),a=n(42);e.exports=n(8).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||a[r(e)]}},function(e,t,n){"use strict";var r=n(11),i=n(34),a=n(7);e.exports=function(e){for(var t=r(this),n=a(t.length),o=arguments.length,s=i(o>1?arguments[1]:void 0,n),l=o>2?arguments[2]:void 0,u=void 0===l?n:i(l,n);u>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var r=n(38),i=n(112),a=n(42),o=n(17);e.exports=n(76)(Array,"Array",(function(e,t){this._t=o(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),a.Arguments=a.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r,i,a=n(56),o=RegExp.prototype.exec,s=String.prototype.replace,l=o,u=(r=/a/,i=/b*/g,o.call(r,"a"),o.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),c=void 0!==/()??/.exec("")[1];(u||c)&&(l=function(e){var t,n,r,i,l=this;return c&&(n=new RegExp("^"+l.source+"$(?!\\s)",a.call(l))),u&&(t=l.lastIndex),r=o.call(l,e),u&&r&&(l.lastIndex=l.global?r.index+r[0].length:t),c&&r&&r.length>1&&s.call(r[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(r[i]=void 0)})),r}),e.exports=l},function(e,t,n){"use strict";var r=n(75)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){var r,i,a,o=n(19),s=n(101),l=n(68),u=n(64),c=n(2),p=c.process,d=c.setImmediate,f=c.clearImmediate,h=c.MessageChannel,g=c.Dispatch,y=0,v={},m=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},b=function(e){m.call(e.data)};d&&f||(d=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++y]=function(){s("function"==typeof e?e:Function(e),t)},r(y),y},f=function(e){delete v[e]},"process"==n(25)(p)?r=function(e){p.nextTick(o(m,e,1))}:g&&g.now?r=function(e){g.now(o(m,e,1))}:h?(a=(i=new h).port2,i.port1.onmessage=b,r=o(a.postMessage,a,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in u("script")?function(e){l.appendChild(u("script")).onreadystatechange=function(){l.removeChild(this),m.call(e)}}:function(e){setTimeout(o(m,e,1),0)}),e.exports={set:d,clear:f}},function(e,t,n){"use strict";var r=n(2),i=n(9),a=n(32),o=n(62),s=n(16),l=n(45),u=n(3),c=n(44),p=n(21),d=n(7),f=n(120),h=n(36).f,g=n(10).f,y=n(83),v=n(40),m=r.ArrayBuffer,b=r.DataView,_=r.Math,E=r.RangeError,k=r.Infinity,T=m,A=_.abs,w=_.pow,S=_.floor,C=_.log,x=_.LN2,I=i?"_b":"buffer",P=i?"_l":"byteLength",D=i?"_o":"byteOffset";function R(e,t,n){var r,i,a,o=new Array(n),s=8*n-t-1,l=(1<<s)-1,u=l>>1,c=23===t?w(2,-24)-w(2,-77):0,p=0,d=e<0||0===e&&1/e<0?1:0;for((e=A(e))!=e||e===k?(i=e!=e?1:0,r=l):(r=S(C(e)/x),e*(a=w(2,-r))<1&&(r--,a*=2),(e+=r+u>=1?c/a:c*w(2,1-u))*a>=2&&(r++,a/=2),r+u>=l?(i=0,r=l):r+u>=1?(i=(e*a-1)*w(2,t),r+=u):(i=e*w(2,u-1)*w(2,t),r=0));t>=8;o[p++]=255&i,i/=256,t-=8);for(r=r<<t|i,s+=t;s>0;o[p++]=255&r,r/=256,s-=8);return o[--p]|=128*d,o}function O(e,t,n){var r,i=8*n-t-1,a=(1<<i)-1,o=a>>1,s=i-7,l=n-1,u=e[l--],c=127&u;for(u>>=7;s>0;c=256*c+e[l],l--,s-=8);for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;r=256*r+e[l],l--,s-=8);if(0===c)c=1-o;else{if(c===a)return r?NaN:u?-k:k;r+=w(2,t),c-=o}return(u?-1:1)*r*w(2,c-t)}function L(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function M(e){return[255&e]}function N(e){return[255&e,e>>8&255]}function U(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function F(e){return R(e,52,8)}function j(e){return R(e,23,4)}function B(e,t,n){g(e.prototype,t,{get:function(){return this[n]}})}function V(e,t,n,r){var i=f(+n);if(i+t>e[P])throw E("Wrong index!");var a=e[I]._b,o=i+e[D],s=a.slice(o,o+t);return r?s:s.reverse()}function H(e,t,n,r,i,a){var o=f(+n);if(o+t>e[P])throw E("Wrong index!");for(var s=e[I]._b,l=o+e[D],u=r(+i),c=0;c<t;c++)s[l+c]=u[a?c:t-c-1]}if(o.ABV){if(!u((function(){m(1)}))||!u((function(){new m(-1)}))||u((function(){return new m,new m(1.5),new m(NaN),"ArrayBuffer"!=m.name}))){for(var K,G=(m=function(e){return c(this,m),new T(f(e))}).prototype=T.prototype,z=h(T),W=0;z.length>W;)(K=z[W++])in m||s(m,K,T[K]);a||(G.constructor=m)}var Y=new b(new m(2)),q=b.prototype.setInt8;Y.setInt8(0,2147483648),Y.setInt8(1,2147483649),!Y.getInt8(0)&&Y.getInt8(1)||l(b.prototype,{setInt8:function(e,t){q.call(this,e,t<<24>>24)},setUint8:function(e,t){q.call(this,e,t<<24>>24)}},!0)}else m=function(e){c(this,m,"ArrayBuffer");var t=f(e);this._b=y.call(new Array(t),0),this[P]=t},b=function(e,t,n){c(this,b,"DataView"),c(e,m,"DataView");var r=e[P],i=p(t);if(i<0||i>r)throw E("Wrong offset!");if(i+(n=void 0===n?r-i:d(n))>r)throw E("Wrong length!");this[I]=e,this[D]=i,this[P]=n},i&&(B(m,"byteLength","_l"),B(b,"buffer","_b"),B(b,"byteLength","_l"),B(b,"byteOffset","_o")),l(b.prototype,{getInt8:function(e){return V(this,1,e)[0]<<24>>24},getUint8:function(e){return V(this,1,e)[0]},getInt16:function(e){var t=V(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=V(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return L(V(this,4,e,arguments[1]))},getUint32:function(e){return L(V(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return O(V(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return O(V(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){H(this,1,e,M,t)},setUint8:function(e,t){H(this,1,e,M,t)},setInt16:function(e,t){H(this,2,e,N,t,arguments[2])},setUint16:function(e,t){H(this,2,e,N,t,arguments[2])},setInt32:function(e,t){H(this,4,e,U,t,arguments[2])},setUint32:function(e,t){H(this,4,e,U,t,arguments[2])},setFloat32:function(e,t){H(this,4,e,j,t,arguments[2])},setFloat64:function(e,t){H(this,8,e,F,t,arguments[2])}});v(m,"ArrayBuffer"),v(b,"DataView"),s(b.prototype,o.VIEW,!0),t.ArrayBuffer=m,t.DataView=b},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){e.exports=!n(125)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=!n(9)&&!n(3)((function(){return 7!=Object.defineProperty(n(64)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(2),i=n(8),a=n(32),o=n(65),s=n(10).f;e.exports=function(e){var t=i.Symbol||(i.Symbol=a?{}:r.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:o.f(e)})}},function(e,t,n){var r=n(15),i=n(17),a=n(52)(!1),o=n(66)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,u=[];for(n in s)n!=o&&r(s,n)&&u.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~a(u,n)||u.push(n));return u}},function(e,t,n){var r=n(10),i=n(4),a=n(33);e.exports=n(9)?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){var r=n(17),i=n(36).f,a={}.toString,o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"[object Window]"==a.call(e)?function(e){try{return i(e)}catch(e){return o.slice()}}(e):i(r(e))}},function(e,t,n){"use strict";var r=n(9),i=n(33),a=n(53),o=n(48),s=n(11),l=n(47),u=Object.assign;e.exports=!u||n(3)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||Object.keys(u({},t)).join("")!=r}))?function(e,t){for(var n=s(e),u=arguments.length,c=1,p=a.f,d=o.f;u>c;)for(var f,h=l(arguments[c++]),g=p?i(h).concat(p(h)):i(h),y=g.length,v=0;y>v;)f=g[v++],r&&!d.call(h,f)||(n[f]=h[f]);return n}:u},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var r=n(20),i=n(5),a=n(101),o=[].slice,s={},l=function(e,t,n){if(!(t in s)){for(var r=[],i=0;i<t;i++)r[i]="a["+i+"]";s[t]=Function("F,a","return new F("+r.join(",")+")")}return s[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=o.call(arguments,1),s=function(){var r=n.concat(o.call(arguments));return this instanceof s?l(t,r.length,r):a(t,r,e)};return i(t.prototype)&&(s.prototype=t.prototype),s}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(2).parseInt,i=n(41).trim,a=n(70),o=/^[-+]?0[xX]/;e.exports=8!==r(a+"08")||22!==r(a+"0x16")?function(e,t){var n=i(String(e),3);return r(n,t>>>0||(o.test(n)?16:10))}:r},function(e,t,n){var r=n(2).parseFloat,i=n(41).trim;e.exports=1/r(n(70)+"-0")!=-1/0?function(e){var t=i(String(e),3),n=r(t);return 0===n&&"-"==t.charAt(0)?-0:n}:r},function(e,t,n){var r=n(25);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=r(e))throw TypeError(t);return+e}},function(e,t,n){var r=n(5),i=Math.floor;e.exports=function(e){return!r(e)&&isFinite(e)&&i(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var r=n(35),i=n(30),a=n(40),o={};n(16)(o,n(6)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:i(1,n)}),a(e,t+" Iterator")}},function(e,t,n){var r=n(4);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var a=e.return;throw void 0!==a&&r(a.call(e)),t}}},function(e,t,n){var r=n(220);e.exports=function(e,t){return new(r(e))(t)}},function(e,t,n){var r=n(20),i=n(11),a=n(47),o=n(7);e.exports=function(e,t,n,s,l){r(t);var u=i(e),c=a(u),p=o(u.length),d=l?p-1:0,f=l?-1:1;if(n<2)for(;;){if(d in c){s=c[d],d+=f;break}if(d+=f,l?d<0:p<=d)throw TypeError("Reduce of empty array with no initial value")}for(;l?d>=0:p>d;d+=f)d in c&&(s=t(s,c[d],d,u));return s}},function(e,t,n){"use strict";var r=n(11),i=n(34),a=n(7);e.exports=[].copyWithin||function(e,t){var n=r(this),o=a(n.length),s=i(e,o),l=i(t,o),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?o:i(u,o))-l,o-s),p=1;for(l<s&&s<l+c&&(p=-1,l+=c-1,s+=c-1);c-- >0;)l in n?n[s]=n[l]:delete n[s],s+=p,l+=p;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(85);n(1)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){n(9)&&"g"!=/./g.flags&&n(10).f(RegExp.prototype,"flags",{configurable:!0,get:n(56)})},function(e,t,n){"use strict";var r,i,a,o,s=n(32),l=n(2),u=n(19),c=n(49),p=n(1),d=n(5),f=n(20),h=n(44),g=n(59),y=n(50),v=n(87).set,m=n(240)(),b=n(116),_=n(241),E=n(60),k=n(117),T=l.TypeError,A=l.process,w=A&&A.versions,S=w&&w.v8||"",C=l.Promise,x="process"==c(A),I=function(){},P=i=b.f,D=!!function(){try{var e=C.resolve(1),t=(e.constructor={})[n(6)("species")]=function(e){e(I,I)};return(x||"function"==typeof PromiseRejectionEvent)&&e.then(I)instanceof t&&0!==S.indexOf("6.6")&&-1===E.indexOf("Chrome/66")}catch(e){}}(),R=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},O=function(e,t){if(!e._n){e._n=!0;var n=e._c;m((function(){for(var r=e._v,i=1==e._s,a=0,o=function(t){var n,a,o,s=i?t.ok:t.fail,l=t.resolve,u=t.reject,c=t.domain;try{s?(i||(2==e._h&&N(e),e._h=1),!0===s?n=r:(c&&c.enter(),n=s(r),c&&(c.exit(),o=!0)),n===t.promise?u(T("Promise-chain cycle")):(a=R(n))?a.call(n,l,u):l(n)):u(r)}catch(e){c&&!o&&c.exit(),u(e)}};n.length>a;)o(n[a++]);e._c=[],e._n=!1,t&&!e._h&&L(e)}))}},L=function(e){v.call(l,(function(){var t,n,r,i=e._v,a=M(e);if(a&&(t=_((function(){x?A.emit("unhandledRejection",i,e):(n=l.onunhandledrejection)?n({promise:e,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=x||M(e)?2:1),e._a=void 0,a&&t.e)throw t.v}))},M=function(e){return 1!==e._h&&0===(e._a||e._c).length},N=function(e){v.call(l,(function(){var t;x?A.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},U=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),O(t,!0))},F=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw T("Promise can't be resolved itself");(t=R(e))?m((function(){var r={_w:n,_d:!1};try{t.call(e,u(F,r,1),u(U,r,1))}catch(e){U.call(r,e)}})):(n._v=e,n._s=1,O(n,!1))}catch(e){U.call({_w:n,_d:!1},e)}}};D||(C=function(e){h(this,C,"Promise","_h"),f(e),r.call(this);try{e(u(F,this,1),u(U,this,1))}catch(e){U.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(45)(C.prototype,{then:function(e,t){var n=P(y(this,C));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=x?A.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&O(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),a=function(){var e=new r;this.promise=e,this.resolve=u(F,e,1),this.reject=u(U,e,1)},b.f=P=function(e){return e===C||e===o?new a(e):i(e)}),p(p.G+p.W+p.F*!D,{Promise:C}),n(40)(C,"Promise"),n(43)("Promise"),o=n(8).Promise,p(p.S+p.F*!D,"Promise",{reject:function(e){var t=P(this);return(0,t.reject)(e),t.promise}}),p(p.S+p.F*(s||!D),"Promise",{resolve:function(e){return k(s&&this===o?C:this,e)}}),p(p.S+p.F*!(D&&n(55)((function(e){C.all(e).catch(I)}))),"Promise",{all:function(e){var t=this,n=P(t),r=n.resolve,i=n.reject,a=_((function(){var n=[],a=0,o=1;g(e,!1,(function(e){var s=a++,l=!1;n.push(void 0),o++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--o||r(n))}),i)})),--o||r(n)}));return a.e&&i(a.v),n.promise},race:function(e){var t=this,n=P(t),r=n.reject,i=_((function(){g(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t,n){"use strict";var r=n(20);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(4),i=n(5),a=n(116);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=a.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(10).f,i=n(35),a=n(45),o=n(19),s=n(44),l=n(59),u=n(76),c=n(112),p=n(43),d=n(9),f=n(29).fastKey,h=n(39),g=d?"_s":"size",y=function(e,t){var n,r=f(t);if("F"!==r)return e._i[r];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,u){var c=e((function(e,r){s(e,c,t,"_i"),e._t=t,e._i=i(null),e._f=void 0,e._l=void 0,e[g]=0,null!=r&&l(r,n,e[u],e)}));return a(c.prototype,{clear:function(){for(var e=h(this,t),n=e._i,r=e._f;r;r=r.n)r.r=!0,r.p&&(r.p=r.p.n=void 0),delete n[r.i];e._f=e._l=void 0,e[g]=0},delete:function(e){var n=h(this,t),r=y(n,e);if(r){var i=r.n,a=r.p;delete n._i[r.i],r.r=!0,a&&(a.n=i),i&&(i.p=a),n._f==r&&(n._f=i),n._l==r&&(n._l=a),n[g]--}return!!r},forEach:function(e){h(this,t);for(var n,r=o(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(r(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!y(h(this,t),e)}}),d&&r(c.prototype,"size",{get:function(){return h(this,t)[g]}}),c},def:function(e,t,n){var r,i,a=y(e,t);return a?a.v=n:(e._l=a={i:i=f(t,!0),k:t,v:n,p:r=e._l,n:void 0,r:!1},e._f||(e._f=a),r&&(r.n=a),e[g]++,"F"!==i&&(e._i[i]=a)),e},getEntry:y,setStrong:function(e,t,n){u(e,t,(function(e,n){this._t=h(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?c(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,c(1))}),n?"entries":"values",!n,!0),p(t)}}},function(e,t,n){"use strict";var r=n(45),i=n(29).getWeak,a=n(4),o=n(5),s=n(44),l=n(59),u=n(24),c=n(15),p=n(39),d=u(5),f=u(6),h=0,g=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},v=function(e,t){return d(e.a,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=v(this,e);if(t)return t[1]},has:function(e){return!!v(this,e)},set:function(e,t){var n=v(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=f(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,a){var u=e((function(e,r){s(e,u,t,"_i"),e._t=t,e._i=h++,e._l=void 0,null!=r&&l(r,n,e[a],e)}));return r(u.prototype,{delete:function(e){if(!o(e))return!1;var n=i(e);return!0===n?g(p(this,t)).delete(e):n&&c(n,this._i)&&delete n[this._i]},has:function(e){if(!o(e))return!1;var n=i(e);return!0===n?g(p(this,t)).has(e):n&&c(n,this._i)}}),u},def:function(e,t,n){var r=i(a(t),!0);return!0===r?g(e).set(t,n):r[e._i]=n,e},ufstore:g}},function(e,t,n){var r=n(21),i=n(7);e.exports=function(e){if(void 0===e)return 0;var t=r(e),n=i(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var r=n(36),i=n(53),a=n(4),o=n(2).Reflect;e.exports=o&&o.ownKeys||function(e){var t=r.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){var r=n(7),i=n(72),a=n(26);e.exports=function(e,t,n,o){var s=String(a(e)),l=s.length,u=void 0===n?" ":String(n),c=r(t);if(c<=l||""==u)return s;var p=c-l,d=i.call(u,Math.ceil(p/u.length));return d.length>p&&(d=d.slice(0,p)),o?d+s:s+d}},function(e,t,n){var r=n(9),i=n(33),a=n(17),o=n(48).f;e.exports=function(e){return function(t){for(var n,s=a(t),l=i(s),u=l.length,c=0,p=[];u>c;)n=l[c++],r&&!o.call(s,n)||p.push(e?[n,s[n]]:s[n]);return p}}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){"use strict";n(127);var r,i=(r=n(299))&&r.__esModule?r:{default:r};i.default._babelPolyfill&&"undefined"!=typeof console&&console.warn&&console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended and may have consequences if different versions of the polyfills are applied sequentially. If you do need to load the polyfill more than once, use @babel/polyfill/noConflict instead to bypass the warning."),i.default._babelPolyfill=!0},function(e,t,n){"use strict";n(128),n(271),n(273),n(276),n(278),n(280),n(282),n(284),n(286),n(288),n(290),n(292),n(294),n(298)},function(e,t,n){n(129),n(132),n(133),n(134),n(135),n(136),n(137),n(138),n(139),n(140),n(141),n(142),n(143),n(144),n(145),n(146),n(147),n(148),n(149),n(150),n(151),n(152),n(153),n(154),n(155),n(156),n(157),n(158),n(159),n(160),n(161),n(162),n(163),n(164),n(165),n(166),n(167),n(168),n(169),n(170),n(171),n(172),n(173),n(175),n(176),n(177),n(178),n(179),n(180),n(181),n(182),n(183),n(184),n(185),n(186),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(210),n(211),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(229),n(230),n(231),n(232),n(233),n(84),n(234),n(113),n(235),n(114),n(236),n(237),n(238),n(239),n(115),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),e.exports=n(8)},function(e,t,n){"use strict";var r=n(2),i=n(15),a=n(9),o=n(1),s=n(12),l=n(29).KEY,u=n(3),c=n(51),p=n(40),d=n(31),f=n(6),h=n(65),g=n(94),y=n(131),v=n(54),m=n(4),b=n(5),_=n(11),E=n(17),k=n(28),T=n(30),A=n(35),w=n(97),S=n(22),C=n(53),x=n(10),I=n(33),P=S.f,D=x.f,R=w.f,O=r.Symbol,L=r.JSON,M=L&&L.stringify,N=f("_hidden"),U=f("toPrimitive"),F={}.propertyIsEnumerable,j=c("symbol-registry"),B=c("symbols"),V=c("op-symbols"),H=Object.prototype,K="function"==typeof O&&!!C.f,G=r.QObject,z=!G||!G.prototype||!G.prototype.findChild,W=a&&u((function(){return 7!=A(D({},"a",{get:function(){return D(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=P(H,t);r&&delete H[t],D(e,t,n),r&&e!==H&&D(H,t,r)}:D,Y=function(e){var t=B[e]=A(O.prototype);return t._k=e,t},q=K&&"symbol"==typeof O.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof O},X=function(e,t,n){return e===H&&X(V,t,n),m(e),t=k(t,!0),m(n),i(B,t)?(n.enumerable?(i(e,N)&&e[N][t]&&(e[N][t]=!1),n=A(n,{enumerable:T(0,!1)})):(i(e,N)||D(e,N,T(1,{})),e[N][t]=!0),W(e,t,n)):D(e,t,n)},$=function(e,t){m(e);for(var n,r=y(t=E(t)),i=0,a=r.length;a>i;)X(e,n=r[i++],t[n]);return e},Q=function(e){var t=F.call(this,e=k(e,!0));return!(this===H&&i(B,e)&&!i(V,e))&&(!(t||!i(this,e)||!i(B,e)||i(this,N)&&this[N][e])||t)},Z=function(e,t){if(e=E(e),t=k(t,!0),e!==H||!i(B,t)||i(V,t)){var n=P(e,t);return!n||!i(B,t)||i(e,N)&&e[N][t]||(n.enumerable=!0),n}},J=function(e){for(var t,n=R(E(e)),r=[],a=0;n.length>a;)i(B,t=n[a++])||t==N||t==l||r.push(t);return r},ee=function(e){for(var t,n=e===H,r=R(n?V:E(e)),a=[],o=0;r.length>o;)!i(B,t=r[o++])||n&&!i(H,t)||a.push(B[t]);return a};K||(s((O=function(){if(this instanceof O)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===H&&t.call(V,n),i(this,N)&&i(this[N],e)&&(this[N][e]=!1),W(this,e,T(1,n))};return a&&z&&W(H,e,{configurable:!0,set:t}),Y(e)}).prototype,"toString",(function(){return this._k})),S.f=Z,x.f=X,n(36).f=w.f=J,n(48).f=Q,C.f=ee,a&&!n(32)&&s(H,"propertyIsEnumerable",Q,!0),h.f=function(e){return Y(f(e))}),o(o.G+o.W+o.F*!K,{Symbol:O});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)f(te[ne++]);for(var re=I(f.store),ie=0;re.length>ie;)g(re[ie++]);o(o.S+o.F*!K,"Symbol",{for:function(e){return i(j,e+="")?j[e]:j[e]=O(e)},keyFor:function(e){if(!q(e))throw TypeError(e+" is not a symbol!");for(var t in j)if(j[t]===e)return t},useSetter:function(){z=!0},useSimple:function(){z=!1}}),o(o.S+o.F*!K,"Object",{create:function(e,t){return void 0===t?A(e):$(A(e),t)},defineProperty:X,defineProperties:$,getOwnPropertyDescriptor:Z,getOwnPropertyNames:J,getOwnPropertySymbols:ee});var ae=u((function(){C.f(1)}));o(o.S+o.F*ae,"Object",{getOwnPropertySymbols:function(e){return C.f(_(e))}}),L&&o(o.S+o.F*(!K||u((function(){var e=O();return"[null]"!=M([e])||"{}"!=M({a:e})||"{}"!=M(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!q(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!q(t))return t}),r[1]=t,M.apply(L,r)}}),O.prototype[U]||n(16)(O.prototype,U,O.prototype.valueOf),p(O,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(e,t,n){e.exports=n(51)("native-function-to-string",Function.toString)},function(e,t,n){var r=n(33),i=n(53),a=n(48);e.exports=function(e){var t=r(e),n=i.f;if(n)for(var o,s=n(e),l=a.f,u=0;s.length>u;)l.call(e,o=s[u++])&&t.push(o);return t}},function(e,t,n){var r=n(1);r(r.S,"Object",{create:n(35)})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(9),"Object",{defineProperty:n(10).f})},function(e,t,n){var r=n(1);r(r.S+r.F*!n(9),"Object",{defineProperties:n(96)})},function(e,t,n){var r=n(17),i=n(22).f;n(23)("getOwnPropertyDescriptor",(function(){return function(e,t){return i(r(e),t)}}))},function(e,t,n){var r=n(11),i=n(37);n(23)("getPrototypeOf",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(11),i=n(33);n(23)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){n(23)("getOwnPropertyNames",(function(){return n(97).f}))},function(e,t,n){var r=n(5),i=n(29).onFreeze;n(23)("freeze",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(5),i=n(29).onFreeze;n(23)("seal",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(5),i=n(29).onFreeze;n(23)("preventExtensions",(function(e){return function(t){return e&&r(t)?e(i(t)):t}}))},function(e,t,n){var r=n(5);n(23)("isFrozen",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(5);n(23)("isSealed",(function(e){return function(t){return!r(t)||!!e&&e(t)}}))},function(e,t,n){var r=n(5);n(23)("isExtensible",(function(e){return function(t){return!!r(t)&&(!e||e(t))}}))},function(e,t,n){var r=n(1);r(r.S+r.F,"Object",{assign:n(98)})},function(e,t,n){var r=n(1);r(r.S,"Object",{is:n(99)})},function(e,t,n){var r=n(1);r(r.S,"Object",{setPrototypeOf:n(69).set})},function(e,t,n){"use strict";var r=n(49),i={};i[n(6)("toStringTag")]="z",i+""!="[object z]"&&n(12)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t,n){var r=n(1);r(r.P,"Function",{bind:n(100)})},function(e,t,n){var r=n(10).f,i=Function.prototype,a=/^\s*function ([^ (]*)/;"name"in i||n(9)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(a)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var r=n(5),i=n(37),a=n(6)("hasInstance"),o=Function.prototype;a in o||n(10).f(o,a,{value:function(e){if("function"!=typeof this||!r(e))return!1;if(!r(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var r=n(1),i=n(102);r(r.G+r.F*(parseInt!=i),{parseInt:i})},function(e,t,n){var r=n(1),i=n(103);r(r.G+r.F*(parseFloat!=i),{parseFloat:i})},function(e,t,n){"use strict";var r=n(2),i=n(15),a=n(25),o=n(71),s=n(28),l=n(3),u=n(36).f,c=n(22).f,p=n(10).f,d=n(41).trim,f=r.Number,h=f,g=f.prototype,y="Number"==a(n(35)(g)),v="trim"in String.prototype,m=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,r,i,a=(t=v?t.trim():d(t,3)).charCodeAt(0);if(43===a||45===a){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===a){switch(t.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+t}for(var o,l=t.slice(2),u=0,c=l.length;u<c;u++)if((o=l.charCodeAt(u))<48||o>i)return NaN;return parseInt(l,r)}}return+t};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof f&&(y?l((function(){g.valueOf.call(n)})):"Number"!=a(n))?o(new h(m(t)),n,f):m(t)};for(var b,_=n(9)?u(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),E=0;_.length>E;E++)i(h,b=_[E])&&!i(f,b)&&p(f,b,c(h,b));f.prototype=g,g.constructor=f,n(12)(r,"Number",f)}},function(e,t,n){"use strict";var r=n(1),i=n(21),a=n(104),o=n(72),s=1..toFixed,l=Math.floor,u=[0,0,0,0,0,0],c="Number.toFixed: incorrect invocation!",p=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*u[n],u[n]=r%1e7,r=l(r/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=u[t],u[t]=l(n/e),n=n%e*1e7},f=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==u[e]){var n=String(u[e]);t=""===t?n:t+o.call("0",7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2==1?h(e,t-1,n*e):h(e*e,t/2,n)};r(r.P+r.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(3)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,r,s,l=a(this,c),u=i(e),g="",y="0";if(u<0||u>20)throw RangeError(c);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(g="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*h(2,69,1))-69)<0?l*h(2,-t,1):l/h(2,t,1),n*=4503599627370496,(t=52-t)>0){for(p(0,n),r=u;r>=7;)p(1e7,0),r-=7;for(p(h(10,r,1),0),r=t-1;r>=23;)d(1<<23),r-=23;d(1<<r),p(1,1),d(2),y=f()}else p(0,n),p(1<<-t,0),y=f()+o.call("0",u);return y=u>0?g+((s=y.length)<=u?"0."+o.call("0",u-s)+y:y.slice(0,s-u)+"."+y.slice(s-u)):g+y}})},function(e,t,n){"use strict";var r=n(1),i=n(3),a=n(104),o=1..toPrecision;r(r.P+r.F*(i((function(){return"1"!==o.call(1,void 0)}))||!i((function(){o.call({})}))),"Number",{toPrecision:function(e){var t=a(this,"Number#toPrecision: incorrect invocation!");return void 0===e?o.call(t):o.call(t,e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var r=n(1),i=n(2).isFinite;r(r.S,"Number",{isFinite:function(e){return"number"==typeof e&&i(e)}})},function(e,t,n){var r=n(1);r(r.S,"Number",{isInteger:n(105)})},function(e,t,n){var r=n(1);r(r.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var r=n(1),i=n(105),a=Math.abs;r(r.S,"Number",{isSafeInteger:function(e){return i(e)&&a(e)<=9007199254740991}})},function(e,t,n){var r=n(1);r(r.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var r=n(1);r(r.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var r=n(1),i=n(103);r(r.S+r.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(e,t,n){var r=n(1),i=n(102);r(r.S+r.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(e,t,n){var r=n(1),i=n(106),a=Math.sqrt,o=Math.acosh;r(r.S+r.F*!(o&&710==Math.floor(o(Number.MAX_VALUE))&&o(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:i(e-1+a(e-1)*a(e+1))}})},function(e,t,n){var r=n(1),i=Math.asinh;r(r.S+r.F*!(i&&1/i(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var r=n(1),i=Math.atanh;r(r.S+r.F*!(i&&1/i(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var r=n(1),i=n(73);r(r.S,"Math",{cbrt:function(e){return i(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var r=n(1),i=Math.exp;r(r.S,"Math",{cosh:function(e){return(i(e=+e)+i(-e))/2}})},function(e,t,n){var r=n(1),i=n(74);r(r.S+r.F*(i!=Math.expm1),"Math",{expm1:i})},function(e,t,n){var r=n(1);r(r.S,"Math",{fround:n(174)})},function(e,t,n){var r=n(73),i=Math.pow,a=i(2,-52),o=i(2,-23),s=i(2,127)*(2-o),l=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=Math.abs(e),u=r(e);return i<l?u*(i/l/o+1/a-1/a)*l*o:(n=(t=(1+o/a)*i)-(t-i))>s||n!=n?u*(1/0):u*n}},function(e,t,n){var r=n(1),i=Math.abs;r(r.S,"Math",{hypot:function(e,t){for(var n,r,a=0,o=0,s=arguments.length,l=0;o<s;)l<(n=i(arguments[o++]))?(a=a*(r=l/n)*r+1,l=n):a+=n>0?(r=n/l)*r:n;return l===1/0?1/0:l*Math.sqrt(a)}})},function(e,t,n){var r=n(1),i=Math.imul;r(r.S+r.F*n(3)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(e,t){var n=+e,r=+t,i=65535&n,a=65535&r;return 0|i*a+((65535&n>>>16)*a+i*(65535&r>>>16)<<16>>>0)}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var r=n(1);r(r.S,"Math",{log1p:n(106)})},function(e,t,n){var r=n(1);r(r.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var r=n(1);r(r.S,"Math",{sign:n(73)})},function(e,t,n){var r=n(1),i=n(74),a=Math.exp;r(r.S+r.F*n(3)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(i(e)-i(-e))/2:(a(e-1)-a(-e-1))*(Math.E/2)}})},function(e,t,n){var r=n(1),i=n(74),a=Math.exp;r(r.S,"Math",{tanh:function(e){var t=i(e=+e),n=i(-e);return t==1/0?1:n==1/0?-1:(t-n)/(a(e)+a(-e))}})},function(e,t,n){var r=n(1);r(r.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var r=n(1),i=n(34),a=String.fromCharCode,o=String.fromCodePoint;r(r.S+r.F*(!!o&&1!=o.length),"String",{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,o=0;r>o;){if(t=+arguments[o++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?a(t):a(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var r=n(1),i=n(17),a=n(7);r(r.S,"String",{raw:function(e){for(var t=i(e.raw),n=a(t.length),r=arguments.length,o=[],s=0;n>s;)o.push(String(t[s++])),s<r&&o.push(String(arguments[s]));return o.join("")}})},function(e,t,n){"use strict";n(41)("trim",(function(e){return function(){return e(this,3)}}))},function(e,t,n){"use strict";var r=n(75)(!0);n(76)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(1),i=n(75)(!1);r(r.P,"String",{codePointAt:function(e){return i(this,e)}})},function(e,t,n){"use strict";var r=n(1),i=n(7),a=n(77),o="".endsWith;r(r.P+r.F*n(79)("endsWith"),"String",{endsWith:function(e){var t=a(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,r=i(t.length),s=void 0===n?r:Math.min(i(n),r),l=String(e);return o?o.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){"use strict";var r=n(1),i=n(77);r(r.P+r.F*n(79)("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(1);r(r.P,"String",{repeat:n(72)})},function(e,t,n){"use strict";var r=n(1),i=n(7),a=n(77),o="".startsWith;r(r.P+r.F*n(79)("startsWith"),"String",{startsWith:function(e){var t=a(this,e,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),r=String(e);return o?o.call(t,r,n):t.slice(n,n+r.length)===r}})},function(e,t,n){"use strict";n(13)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(13)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(13)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(13)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(13)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(13)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(13)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(13)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(13)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(13)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(13)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(13)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(13)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var r=n(1);r(r.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var r=n(1),i=n(11),a=n(28);r(r.P+r.F*n(3)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=i(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var r=n(1),i=n(209);r(r.P+r.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(e,t,n){"use strict";var r=n(3),i=Date.prototype.getTime,a=Date.prototype.toISOString,o=function(e){return e>9?e:"0"+e};e.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=a.call(new Date(-50000000000001))}))||!r((function(){a.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),r=t<0?"-":t>9999?"+":"";return r+("00000"+Math.abs(t)).slice(r?-6:-4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"."+(n>99?n:"0"+o(n))+"Z"}:a},function(e,t,n){var r=Date.prototype,i=r.toString,a=r.getTime;new Date(NaN)+""!="Invalid Date"&&n(12)(r,"toString",(function(){var e=a.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,t,n){var r=n(6)("toPrimitive"),i=Date.prototype;r in i||n(16)(i,r,n(212))},function(e,t,n){"use strict";var r=n(4),i=n(28);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return i(r(this),"number"!=e)}},function(e,t,n){var r=n(1);r(r.S,"Array",{isArray:n(54)})},function(e,t,n){"use strict";var r=n(19),i=n(1),a=n(11),o=n(108),s=n(80),l=n(7),u=n(81),c=n(82);i(i.S+i.F*!n(55)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,i,p,d=a(e),f="function"==typeof this?this:Array,h=arguments.length,g=h>1?arguments[1]:void 0,y=void 0!==g,v=0,m=c(d);if(y&&(g=r(g,h>2?arguments[2]:void 0,2)),null==m||f==Array&&s(m))for(n=new f(t=l(d.length));t>v;v++)u(n,v,y?g(d[v],v):d[v]);else for(p=m.call(d),n=new f;!(i=p.next()).done;v++)u(n,v,y?o(p,g,[i.value,v],!0):i.value);return n.length=v,n}})},function(e,t,n){"use strict";var r=n(1),i=n(81);r(r.S+r.F*n(3)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var r=n(1),i=n(17),a=[].join;r(r.P+r.F*(n(47)!=Object||!n(18)(a)),"Array",{join:function(e){return a.call(i(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var r=n(1),i=n(68),a=n(25),o=n(34),s=n(7),l=[].slice;r(r.P+r.F*n(3)((function(){i&&l.call(i)})),"Array",{slice:function(e,t){var n=s(this.length),r=a(this);if(t=void 0===t?n:t,"Array"==r)return l.call(this,e,t);for(var i=o(e,n),u=o(t,n),c=s(u-i),p=new Array(c),d=0;d<c;d++)p[d]="String"==r?this.charAt(i+d):this[i+d];return p}})},function(e,t,n){"use strict";var r=n(1),i=n(20),a=n(11),o=n(3),s=[].sort,l=[1,2,3];r(r.P+r.F*(o((function(){l.sort(void 0)}))||!o((function(){l.sort(null)}))||!n(18)(s)),"Array",{sort:function(e){return void 0===e?s.call(a(this)):s.call(a(this),i(e))}})},function(e,t,n){"use strict";var r=n(1),i=n(24)(0),a=n(18)([].forEach,!0);r(r.P+r.F*!a,"Array",{forEach:function(e){return i(this,e,arguments[1])}})},function(e,t,n){var r=n(5),i=n(54),a=n(6)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),r(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,n){"use strict";var r=n(1),i=n(24)(1);r(r.P+r.F*!n(18)([].map,!0),"Array",{map:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(24)(2);r(r.P+r.F*!n(18)([].filter,!0),"Array",{filter:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(24)(3);r(r.P+r.F*!n(18)([].some,!0),"Array",{some:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(24)(4);r(r.P+r.F*!n(18)([].every,!0),"Array",{every:function(e){return i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(110);r(r.P+r.F*!n(18)([].reduce,!0),"Array",{reduce:function(e){return i(this,e,arguments.length,arguments[1],!1)}})},function(e,t,n){"use strict";var r=n(1),i=n(110);r(r.P+r.F*!n(18)([].reduceRight,!0),"Array",{reduceRight:function(e){return i(this,e,arguments.length,arguments[1],!0)}})},function(e,t,n){"use strict";var r=n(1),i=n(52)(!1),a=[].indexOf,o=!!a&&1/[1].indexOf(1,-0)<0;r(r.P+r.F*(o||!n(18)(a)),"Array",{indexOf:function(e){return o?a.apply(this,arguments)||0:i(this,e,arguments[1])}})},function(e,t,n){"use strict";var r=n(1),i=n(17),a=n(21),o=n(7),s=[].lastIndexOf,l=!!s&&1/[1].lastIndexOf(1,-0)<0;r(r.P+r.F*(l||!n(18)(s)),"Array",{lastIndexOf:function(e){if(l)return s.apply(this,arguments)||0;var t=i(this),n=o(t.length),r=n-1;for(arguments.length>1&&(r=Math.min(r,a(arguments[1]))),r<0&&(r=n+r);r>=0;r--)if(r in t&&t[r]===e)return r||0;return-1}})},function(e,t,n){var r=n(1);r(r.P,"Array",{copyWithin:n(111)}),n(38)("copyWithin")},function(e,t,n){var r=n(1);r(r.P,"Array",{fill:n(83)}),n(38)("fill")},function(e,t,n){"use strict";var r=n(1),i=n(24)(5),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r(r.P+r.F*a,"Array",{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(38)("find")},function(e,t,n){"use strict";var r=n(1),i=n(24)(6),a="findIndex",o=!0;a in[]&&Array(1)[a]((function(){o=!1})),r(r.P+r.F*o,"Array",{findIndex:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(38)(a)},function(e,t,n){n(43)("Array")},function(e,t,n){var r=n(2),i=n(71),a=n(10).f,o=n(36).f,s=n(78),l=n(56),u=r.RegExp,c=u,p=u.prototype,d=/a/g,f=/a/g,h=new u(d)!==d;if(n(9)&&(!h||n(3)((function(){return f[n(6)("match")]=!1,u(d)!=d||u(f)==f||"/a/i"!=u(d,"i")})))){u=function(e,t){var n=this instanceof u,r=s(e),a=void 0===t;return!n&&r&&e.constructor===u&&a?e:i(h?new c(r&&!a?e.source:e,t):c((r=e instanceof u)?e.source:e,r&&a?l.call(e):t),n?this:p,u)};for(var g=function(e){e in u||a(u,e,{configurable:!0,get:function(){return c[e]},set:function(t){c[e]=t}})},y=o(c),v=0;y.length>v;)g(y[v++]);p.constructor=u,u.prototype=p,n(12)(r,"RegExp",u)}n(43)("RegExp")},function(e,t,n){"use strict";n(114);var r=n(4),i=n(56),a=n(9),o=/./.toString,s=function(e){n(12)(RegExp.prototype,"toString",e,!0)};n(3)((function(){return"/a/b"!=o.call({source:"a",flags:"b"})}))?s((function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!a&&e instanceof RegExp?i.call(e):void 0)})):"toString"!=o.name&&s((function(){return o.call(this)}))},function(e,t,n){"use strict";var r=n(4),i=n(7),a=n(86),o=n(57);n(58)("match",1,(function(e,t,n,s){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=r(e),u=String(this);if(!l.global)return o(l,u);var c=l.unicode;l.lastIndex=0;for(var p,d=[],f=0;null!==(p=o(l,u));){var h=String(p[0]);d[f]=h,""===h&&(l.lastIndex=a(u,i(l.lastIndex),c)),f++}return 0===f?null:d}]}))},function(e,t,n){"use strict";var r=n(4),i=n(11),a=n(7),o=n(21),s=n(86),l=n(57),u=Math.max,c=Math.min,p=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,f=/\$([$&`']|\d\d?)/g;n(58)("replace",2,(function(e,t,n,h){return[function(r,i){var a=e(this),o=null==r?void 0:r[t];return void 0!==o?o.call(r,a,i):n.call(String(a),r,i)},function(e,t){var i=h(n,e,this,t);if(i.done)return i.value;var p=r(e),d=String(this),f="function"==typeof t;f||(t=String(t));var y=p.global;if(y){var v=p.unicode;p.lastIndex=0}for(var m=[];;){var b=l(p,d);if(null===b)break;if(m.push(b),!y)break;""===String(b[0])&&(p.lastIndex=s(d,a(p.lastIndex),v))}for(var _,E="",k=0,T=0;T<m.length;T++){b=m[T];for(var A=String(b[0]),w=u(c(o(b.index),d.length),0),S=[],C=1;C<b.length;C++)S.push(void 0===(_=b[C])?_:String(_));var x=b.groups;if(f){var I=[A].concat(S,w,d);void 0!==x&&I.push(x);var P=String(t.apply(void 0,I))}else P=g(A,d,w,S,x,t);w>=k&&(E+=d.slice(k,w)+P,k=w+A.length)}return E+d.slice(k)}];function g(e,t,r,a,o,s){var l=r+e.length,u=a.length,c=f;return void 0!==o&&(o=i(o),c=d),n.call(s,c,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(l);case"<":s=o[i.slice(1,-1)];break;default:var c=+i;if(0===c)return n;if(c>u){var d=p(c/10);return 0===d?n:d<=u?void 0===a[d-1]?i.charAt(1):a[d-1]+i.charAt(1):n}s=a[c-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var r=n(4),i=n(99),a=n(57);n(58)("search",1,(function(e,t,n,o){return[function(n){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r):new RegExp(n)[t](String(r))},function(e){var t=o(n,e,this);if(t.done)return t.value;var s=r(e),l=String(this),u=s.lastIndex;i(u,0)||(s.lastIndex=0);var c=a(s,l);return i(s.lastIndex,u)||(s.lastIndex=u),null===c?-1:c.index}]}))},function(e,t,n){"use strict";var r=n(78),i=n(4),a=n(50),o=n(86),s=n(7),l=n(57),u=n(85),c=n(3),p=Math.min,d=[].push,f="length",h=!c((function(){RegExp(4294967295,"y")}));n(58)("split",2,(function(e,t,n,c){var g;return g="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[f]||2!="ab".split(/(?:ab)*/)[f]||4!=".".split(/(.?)(.?)/)[f]||".".split(/()()/)[f]>1||"".split(/.?/)[f]?function(e,t){var i=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(i,e,t);for(var a,o,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),p=0,h=void 0===t?4294967295:t>>>0,g=new RegExp(e.source,c+"g");(a=u.call(g,i))&&!((o=g.lastIndex)>p&&(l.push(i.slice(p,a.index)),a[f]>1&&a.index<i[f]&&d.apply(l,a.slice(1)),s=a[0][f],p=o,l[f]>=h));)g.lastIndex===a.index&&g.lastIndex++;return p===i[f]?!s&&g.test("")||l.push(""):l.push(i.slice(p)),l[f]>h?l.slice(0,h):l}:"0".split(void 0,0)[f]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var i=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,i,r):g.call(String(i),n,r)},function(e,t){var r=c(g,e,this,t,g!==n);if(r.done)return r.value;var u=i(e),d=String(this),f=a(u,RegExp),y=u.unicode,v=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(h?"y":"g"),m=new f(h?u:"^(?:"+u.source+")",v),b=void 0===t?4294967295:t>>>0;if(0===b)return[];if(0===d.length)return null===l(m,d)?[d]:[];for(var _=0,E=0,k=[];E<d.length;){m.lastIndex=h?E:0;var T,A=l(m,h?d:d.slice(E));if(null===A||(T=p(s(m.lastIndex+(h?0:E)),d.length))===_)E=o(d,E,y);else{if(k.push(d.slice(_,E)),k.length===b)return k;for(var w=1;w<=A.length-1;w++)if(k.push(A[w]),k.length===b)return k;E=_=T}}return k.push(d.slice(_)),k}]}))},function(e,t,n){var r=n(2),i=n(87).set,a=r.MutationObserver||r.WebKitMutationObserver,o=r.process,s=r.Promise,l="process"==n(25)(o);e.exports=function(){var e,t,n,u=function(){var r,i;for(l&&(r=o.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(l)n=function(){o.nextTick(u)};else if(!a||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var c=s.resolve(void 0);n=function(){c.then(u)}}else n=function(){i.call(r,u)};else{var p=!0,d=document.createTextNode("");new a(u).observe(d,{characterData:!0}),n=function(){d.data=p=!p}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){"use strict";var r=n(118),i=n(39);e.exports=n(61)("Map",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{get:function(e){var t=r.getEntry(i(this,"Map"),e);return t&&t.v},set:function(e,t){return r.def(i(this,"Map"),0===e?0:e,t)}},r,!0)},function(e,t,n){"use strict";var r=n(118),i=n(39);e.exports=n(61)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"Set"),e=0===e?0:e,e)}},r)},function(e,t,n){"use strict";var r,i=n(2),a=n(24)(0),o=n(12),s=n(29),l=n(98),u=n(119),c=n(5),p=n(39),d=n(39),f=!i.ActiveXObject&&"ActiveXObject"in i,h=s.getWeak,g=Object.isExtensible,y=u.ufstore,v=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},m={get:function(e){if(c(e)){var t=h(e);return!0===t?y(p(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return u.def(p(this,"WeakMap"),e,t)}},b=e.exports=n(61)("WeakMap",v,m,u,!0,!0);d&&f&&(l((r=u.getConstructor(v,"WeakMap")).prototype,m),s.NEED=!0,a(["delete","has","get","set"],(function(e){var t=b.prototype,n=t[e];o(t,e,(function(t,i){if(c(t)&&!g(t)){this._f||(this._f=new r);var a=this._f[e](t,i);return"set"==e?this:a}return n.call(this,t,i)}))})))},function(e,t,n){"use strict";var r=n(119),i=n(39);n(61)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return r.def(i(this,"WeakSet"),e,!0)}},r,!1,!0)},function(e,t,n){"use strict";var r=n(1),i=n(62),a=n(88),o=n(4),s=n(34),l=n(7),u=n(5),c=n(2).ArrayBuffer,p=n(50),d=a.ArrayBuffer,f=a.DataView,h=i.ABV&&c.isView,g=d.prototype.slice,y=i.VIEW;r(r.G+r.W+r.F*(c!==d),{ArrayBuffer:d}),r(r.S+r.F*!i.CONSTR,"ArrayBuffer",{isView:function(e){return h&&h(e)||u(e)&&y in e}}),r(r.P+r.U+r.F*n(3)((function(){return!new d(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==g&&void 0===t)return g.call(o(this),e);for(var n=o(this).byteLength,r=s(e,n),i=s(void 0===t?n:t,n),a=new(p(this,d))(l(i-r)),u=new f(this),c=new f(a),h=0;r<i;)c.setUint8(h++,u.getUint8(r++));return a}}),n(43)("ArrayBuffer")},function(e,t,n){var r=n(1);r(r.G+r.W+r.F*!n(62).ABV,{DataView:n(88).DataView})},function(e,t,n){n(27)("Int8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Uint8",1,(function(e){return function(t,n,r){return e(this,t,n,r)}}),!0)},function(e,t,n){n(27)("Int16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Uint16",2,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Int32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Uint32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Float32",4,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){n(27)("Float64",8,(function(e){return function(t,n,r){return e(this,t,n,r)}}))},function(e,t,n){var r=n(1),i=n(20),a=n(4),o=(n(2).Reflect||{}).apply,s=Function.apply;r(r.S+r.F*!n(3)((function(){o((function(){}))})),"Reflect",{apply:function(e,t,n){var r=i(e),l=a(n);return o?o(r,t,l):s.call(r,t,l)}})},function(e,t,n){var r=n(1),i=n(35),a=n(20),o=n(4),s=n(5),l=n(3),u=n(100),c=(n(2).Reflect||{}).construct,p=l((function(){function e(){}return!(c((function(){}),[],e)instanceof e)})),d=!l((function(){c((function(){}))}));r(r.S+r.F*(p||d),"Reflect",{construct:function(e,t){a(e),o(t);var n=arguments.length<3?e:a(arguments[2]);if(d&&!p)return c(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(u.apply(e,r))}var l=n.prototype,f=i(s(l)?l:Object.prototype),h=Function.apply.call(e,f,t);return s(h)?h:f}})},function(e,t,n){var r=n(10),i=n(1),a=n(4),o=n(28);i(i.S+i.F*n(3)((function(){Reflect.defineProperty(r.f({},1,{value:1}),1,{value:2})})),"Reflect",{defineProperty:function(e,t,n){a(e),t=o(t,!0),a(n);try{return r.f(e,t,n),!0}catch(e){return!1}}})},function(e,t,n){var r=n(1),i=n(22).f,a=n(4);r(r.S,"Reflect",{deleteProperty:function(e,t){var n=i(a(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var r=n(1),i=n(4),a=function(e){this._t=i(e),this._i=0;var t,n=this._k=[];for(t in e)n.push(t)};n(107)(a,"Object",(function(){var e,t=this._k;do{if(this._i>=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),r(r.S,"Reflect",{enumerate:function(e){return new a(e)}})},function(e,t,n){var r=n(22),i=n(37),a=n(15),o=n(1),s=n(5),l=n(4);o(o.S,"Reflect",{get:function e(t,n){var o,u,c=arguments.length<3?t:arguments[2];return l(t)===c?t[n]:(o=r.f(t,n))?a(o,"value")?o.value:void 0!==o.get?o.get.call(c):void 0:s(u=i(t))?e(u,n,c):void 0}})},function(e,t,n){var r=n(22),i=n(1),a=n(4);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return r.f(a(e),t)}})},function(e,t,n){var r=n(1),i=n(37),a=n(4);r(r.S,"Reflect",{getPrototypeOf:function(e){return i(a(e))}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var r=n(1),i=n(4),a=Object.isExtensible;r(r.S,"Reflect",{isExtensible:function(e){return i(e),!a||a(e)}})},function(e,t,n){var r=n(1);r(r.S,"Reflect",{ownKeys:n(121)})},function(e,t,n){var r=n(1),i=n(4),a=Object.preventExtensions;r(r.S,"Reflect",{preventExtensions:function(e){i(e);try{return a&&a(e),!0}catch(e){return!1}}})},function(e,t,n){var r=n(10),i=n(22),a=n(37),o=n(15),s=n(1),l=n(30),u=n(4),c=n(5);s(s.S,"Reflect",{set:function e(t,n,s){var p,d,f=arguments.length<4?t:arguments[3],h=i.f(u(t),n);if(!h){if(c(d=a(t)))return e(d,n,s,f);h=l(0)}if(o(h,"value")){if(!1===h.writable||!c(f))return!1;if(p=i.f(f,n)){if(p.get||p.set||!1===p.writable)return!1;p.value=s,r.f(f,n,p)}else r.f(f,n,l(0,s));return!0}return void 0!==h.set&&(h.set.call(f,s),!0)}})},function(e,t,n){var r=n(1),i=n(69);i&&r(r.S,"Reflect",{setPrototypeOf:function(e,t){i.check(e,t);try{return i.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){n(272),e.exports=n(8).Array.includes},function(e,t,n){"use strict";var r=n(1),i=n(52)(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n(38)("includes")},function(e,t,n){n(274),e.exports=n(8).Array.flatMap},function(e,t,n){"use strict";var r=n(1),i=n(275),a=n(11),o=n(7),s=n(20),l=n(109);r(r.P,"Array",{flatMap:function(e){var t,n,r=a(this);return s(e),t=o(r.length),n=l(r,0),i(n,r,r,t,0,1,e,arguments[1]),n}}),n(38)("flatMap")},function(e,t,n){"use strict";var r=n(54),i=n(5),a=n(7),o=n(19),s=n(6)("isConcatSpreadable");e.exports=function e(t,n,l,u,c,p,d,f){for(var h,g,y=c,v=0,m=!!d&&o(d,f,3);v<u;){if(v in l){if(h=m?m(l[v],v,n):l[v],g=!1,i(h)&&(g=void 0!==(g=h[s])?!!g:r(h)),g&&p>0)y=e(t,n,h,a(h.length),y,p-1)-1;else{if(y>=9007199254740991)throw TypeError();t[y]=h}y++}v++}return y}},function(e,t,n){n(277),e.exports=n(8).String.padStart},function(e,t,n){"use strict";var r=n(1),i=n(122),a=n(60),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padStart:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){n(279),e.exports=n(8).String.padEnd},function(e,t,n){"use strict";var r=n(1),i=n(122),a=n(60),o=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(a);r(r.P+r.F*o,"String",{padEnd:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){n(281),e.exports=n(8).String.trimLeft},function(e,t,n){"use strict";n(41)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){n(283),e.exports=n(8).String.trimRight},function(e,t,n){"use strict";n(41)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){n(285),e.exports=n(65).f("asyncIterator")},function(e,t,n){n(94)("asyncIterator")},function(e,t,n){n(287),e.exports=n(8).Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(1),i=n(121),a=n(17),o=n(22),s=n(81);r(r.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),l=o.f,u=i(r),c={},p=0;u.length>p;)void 0!==(n=l(r,t=u[p++]))&&s(c,t,n);return c}})},function(e,t,n){n(289),e.exports=n(8).Object.values},function(e,t,n){var r=n(1),i=n(123)(!1);r(r.S,"Object",{values:function(e){return i(e)}})},function(e,t,n){n(291),e.exports=n(8).Object.entries},function(e,t,n){var r=n(1),i=n(123)(!0);r(r.S,"Object",{entries:function(e){return i(e)}})},function(e,t,n){"use strict";n(115),n(293),e.exports=n(8).Promise.finally},function(e,t,n){"use strict";var r=n(1),i=n(8),a=n(2),o=n(50),s=n(117);r(r.P+r.R,"Promise",{finally:function(e){var t=o(this,i.Promise||a.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){n(295),n(296),n(297),e.exports=n(8)},function(e,t,n){var r=n(2),i=n(1),a=n(60),o=[].slice,s=/MSIE .\./.test(a),l=function(e){return function(t,n){var r=arguments.length>2,i=!!r&&o.call(arguments,2);return e(r?function(){("function"==typeof t?t:Function(t)).apply(this,i)}:t,n)}};i(i.G+i.B+i.F*s,{setTimeout:l(r.setTimeout),setInterval:l(r.setInterval)})},function(e,t,n){var r=n(1),i=n(87);r(r.G+r.B,{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){for(var r=n(84),i=n(33),a=n(12),o=n(2),s=n(16),l=n(42),u=n(6),c=u("iterator"),p=u("toStringTag"),d=l.Array,f={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(f),g=0;g<h.length;g++){var y,v=h[g],m=f[v],b=o[v],_=b&&b.prototype;if(_&&(_[c]||s(_,c,d),_[p]||s(_,p,v),l[v]=d,m))for(y in r)_[y]||a(_,y,r[y],!0)}},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),s=new w(i||[]);return r(o,"_invoke",{value:E(e,n,s)}),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function d(){}function f(){}function h(){}var g={};l(g,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==t&&n.call(v,a)&&(g=v);var m=h.prototype=d.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var i;r(this,"_invoke",{value:function(r,a){function o(){return new t((function(i,o){!function r(i,a,o,s){var l=c(e[i],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(p).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,s)}))}s(l.arg)}(r,a,i,o)}))}return i=i?i.then(o,o):o()}})}function E(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new _(u(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(m),l(m,s,"Generator"),l(m,a,(function(){return this})),l(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=S,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){n(300),e.exports=n(124).global},function(e,t,n){var r=n(301);r(r.G,{global:n(89)})},function(e,t,n){var r=n(89),i=n(124),a=n(302),o=n(304),s=n(311),l=function(e,t,n){var u,c,p,d=e&l.F,f=e&l.G,h=e&l.S,g=e&l.P,y=e&l.B,v=e&l.W,m=f?i:i[t]||(i[t]={}),b=m.prototype,_=f?r:h?r[t]:(r[t]||{}).prototype;for(u in f&&(n=t),n)(c=!d&&_&&void 0!==_[u])&&s(m,u)||(p=c?_[u]:n[u],m[u]=f&&"function"!=typeof _[u]?n[u]:y&&c?a(p,r):v&&_[u]==p?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(p):g&&"function"==typeof p?a(Function.call,p):p,g&&((m.virtual||(m.virtual={}))[u]=p,e&l.R&&b&&!b[u]&&o(b,u,p)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,n){var r=n(303);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,n){var r=n(305),i=n(310);e.exports=n(91)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(306),i=n(307),a=n(309),o=Object.defineProperty;t.f=n(91)?Object.defineProperty:function(e,t,n){if(r(e),t=a(t,!0),r(n),i)try{return o(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(90);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(91)&&!n(125)((function(){return 7!=Object.defineProperty(n(308)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(90),i=n(89).document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(90);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){"use strict";(function(e){var t=n(46);var r,i,a,o=function(){function t(){}return t.install=function(){if(!e.performance||!e.performance.now){var t=Date.now();e.performance||(e.performance={}),e.performance.now=function(){return Date.now()-t}}},t}();r=o,a="performance.now",(i=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(i="id"))in r?Object.defineProperty(r,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[i]=a,t.a.register(o)}).call(this,n(92))},function(e,t,n){(function(e,t){var n;(n=void 0!==e&&"[object process]"==={}.toString.call(e)||"undefined"!=typeof navigator&&"ReactNative"===navigator.product?t:self).Proxy||(n.Proxy=function(){function e(){return null}function t(e){return!!e&&("object"==typeof e||"function"==typeof e)}function n(e){if(null!==e&&!t(e))throw new TypeError("Object prototype may only be an Object or null: "+e)}var r=null,i=Object,a=!(!i.create&&{__proto__:null}instanceof i),o=i.create||(a?function(e){return n(e),{__proto__:e}}:function(e){function t(){}if(n(e),null===e)throw new SyntaxError("Native Object.create is required to create objects with null prototype");return t.prototype=e,new t}),s=i.getPrototypeOf||([].__proto__===Array.prototype?function(e){return t(e=e.__proto__)?e:null}:e),l=function(u,c){function p(){}if(void 0===(this&&this instanceof l?this.constructor:void 0))throw new TypeError("Constructor Proxy requires 'new'");if(!t(u)||!t(c))throw new TypeError("Cannot create proxy with a non-object as target or handler");r=function(){u=null,p=function(e){throw new TypeError("Cannot perform '"+e+"' on a proxy that has been revoked")}},setTimeout((function(){r=null}),0);var d=c;for(var f in c={get:null,set:null,apply:null,construct:null},d){if(!(f in c))throw new TypeError("Proxy polyfill does not support trap '"+f+"'");c[f]=d[f]}"function"==typeof d&&(c.apply=d.apply.bind(d)),d=s(u);var h=!1,g=!1;if("function"==typeof u){var y=function(){var e=this&&this.constructor===y,t=Array.prototype.slice.call(arguments);return p(e?"construct":"apply"),e&&c.construct?c.construct.call(this,u,t):!e&&c.apply?c.apply(u,this,t):e?(t.unshift(u),new(u.bind.apply(u,t))):u.apply(this,t)};h=!0}else u instanceof Array?(y=[],g=!0):y=a||null!==d?o(d):{};var v=c.get?function(e){return p("get"),c.get(this,e,y)}:function(e){return p("get"),this[e]},m=c.set?function(e,t){p("set"),c.set(this,e,t,y)}:function(e,t){p("set"),this[e]=t},b={};if(i.getOwnPropertyNames(u).forEach((function(e){if(!h&&!g||!(e in y)){var t=i.getOwnPropertyDescriptor(u,e);i.defineProperty(y,e,{enumerable:!!t.enumerable,get:v.bind(u,e),set:m.bind(u,e)}),b[e]=!0}})),f=!0,h||g){var _=i.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return n(t),e.__proto__=t,e}:e);d&&_(y,d)||(f=!1)}if(c.get||!f)for(var E in u)b[E]||i.defineProperty(y,E,{get:v.bind(u,E)});return i.seal(u),i.seal(y),y};return l.revocable=function(e,t){return{proxy:new l(e,t),revoke:r}},l}(),n.Proxy.revocable=n.Proxy.revocable)}).call(this,n(314),n(92))},function(e,t){var n,r,i=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l,u=[],c=!1,p=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):p=-1,u.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=u.length;t;){for(l=u,u=[];++p<t;)l&&l[p].run();p=-1,t=u.length}l=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function h(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new h(e,t)),1!==u.length||c||s(f)},h.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){var r,i;window,e.exports=(r=n(0),i=n(316),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=r},function(e,t){e.exports=i},function(e){e.exports=JSON.parse('{"recoverDecodingErrorDelay":3000,"recoverSwapAudioCodecDelay":3000,"abr":{"enabled":true,"restrictions":{}},"hlsConfig":{"fragLoadingMaxRetry":4,"maxMaxBufferLength":60},"network":{}}')},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return b})),n.d(t,"NAME",(function(){return _}));var r,i,a,o,s=n(0),l=n(1),u=n.n(l),c=n(2),p=((r={})[u.a.ErrorDetails.MANIFEST_LOAD_ERROR]={category:s.Error.Category.MANIFEST,code:s.Error.Code.HTTP_ERROR},r[u.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT]={category:s.Error.Category.MANIFEST,code:s.Error.Code.TIMEOUT},r[u.a.ErrorDetails.MANIFEST_PARSING_ERROR]={category:s.Error.Category.MANIFEST,code:s.Error.Code.HLSJS_CANNOT_PARSE},r[u.a.ErrorDetails.LEVEL_LOAD_ERROR]={category:s.Error.Category.NETWORK,code:s.Error.Code.HTTP_ERROR},r[u.a.ErrorDetails.LEVEL_LOAD_TIMEOUT]={category:s.Error.Category.NETWORK,code:s.Error.Code.TIMEOUT},r[u.a.ErrorDetails.LEVEL_SWITCH_ERROR]={category:s.Error.Category.PLAYER,code:s.Error.Code.BITRATE_SWITCH_ISSUE},r[u.a.ErrorDetails.FRAG_LOAD_ERROR]={category:s.Error.Category.NETWORK,code:s.Error.Code.HTTP_ERROR},r[u.a.ErrorDetails.FRAG_LOOP_LOADING_ERROR]={category:s.Error.Category.NETWORK,code:s.Error.Code.HTTP_ERROR},r[u.a.ErrorDetails.FRAG_LOAD_TIMEOUT]={category:s.Error.Category.NETWORK,code:s.Error.Code.TIMEOUT},r[u.a.ErrorDetails.FRAG_PARSING_ERROR]={category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_FRAG_PARSING_ERROR},r[u.a.ErrorDetails.BUFFER_APPEND_ERROR]={category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_BUFFER_APPEND_ISSUE},r[u.a.ErrorDetails.BUFFER_APPENDING_ERROR]={category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_BUFFER_APPENDING_ISSUE},r[u.a.ErrorDetails.BUFFER_STALLED_ERROR]={category:s.Error.Category.MEDIA,code:s.Error.Code.HLS_BUFFER_STALLED_ERROR},r),d=function(e){var t,n;function r(t){var n;return n=e.call(this,t)||this,t&&t.readystatechange&&(n.readystatechange=t.readystatechange),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.loadInternal=function(){var e,t=this,n=this.context;e=this.loader=new XMLHttpRequest;var r=this.stats;r.tfirst=0,r.loaded=0;var i,a=this.xhrSetup;try{if(a)try{i=a(e,n.url,n)}catch(t){e.open("GET",n.url,!0),i=a(e,n.url,n)}e.readyState||e.open("GET",n.url,!0)}catch(e){i=Promise.reject(e)}(i=i||Promise.resolve()).then((function(){n.rangeEnd&&e.setRequestHeader("Range","bytes="+n.rangeStart+"-"+(n.rangeEnd-1)),e.onreadystatechange=t.readystatechange.bind(t),e.onprogress=t.loadprogress.bind(t),e.responseType=n.responseType,t.requestTimeout=window.setTimeout(t.loadtimeout.bind(t),t.config.timeout),e.send()})).catch((function(r){t.callbacks.onError({code:e.status,text:r.message},n,e)}))},r}(u.a.DefaultConfig.loader),f=function(e){var t,n;function r(t){var n,i=(n=e.call(this,t)||this).load.bind(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n)),a=r.redirectExternalStreamsHandler;return n.load=function(e,t,n){var o=e.url;"manifest"===e.type?s.Utils.Http.jsonp(o,a,{timeout:r.redirectExternalStreamsTimeout}).then((function(r){e.url=r,i(e,t,n)})).catch((function(){return i(e,t,n)})):i(e,t,n)},n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(d);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}o=function(e,t){return t},(a="redirectExternalStreamsHandler")in(i=f)?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o;var m=function(e){var t,n;function r(t,n,i){var a,o;return r._logger.debug("Creating adapter. Hls version: "+u.a.version),v(y(o=e.call(this,t,n,i)||this),"_hlsjsLib",u.a),v(y(o),"_triedReloadWithRedirect",!1),v(y(o),"_playerTracks",[]),v(y(o),"_startTime",0),v(y(o),"_requestFilterError",!1),v(y(o),"_responseFilterError",!1),v(y(o),"_nativeTextTracksMap",{}),v(y(o),"_lastLoadedFragSN",-1),v(y(o),"_sameFragSNLoadedCount",0),v(y(o),"_adapterEventsBindings",((a={})[u.a.Events.ERROR]=function(e,t){return o._onError(t)},a[u.a.Events.MANIFEST_LOADED]=function(e,t){return o._onManifestLoaded(t)},a[u.a.Events.LEVEL_SWITCHED]=function(e,t){return o._onLevelSwitched(e,t)},a[u.a.Events.AUDIO_TRACK_SWITCHED]=function(e,t){return o._onAudioTrackSwitched(e,t)},a[u.a.Events.FPS_DROP]=function(e,t){return o._onFpsDrop(t)},a[u.a.Events.FRAG_PARSING_METADATA]=function(e,t){return o._onFragParsingMetadata(t)},a[u.a.Events.FRAG_LOADED]=function(e,t){return o._onFragLoaded(t)},a[u.a.Events.MEDIA_ATTACHED]=function(){return o._onMediaAttached()},a[u.a.Events.LEVEL_LOADED]=function(e,t){return o._onLevelLoaded(e,t)},a)),v(y(o),"_onLevelLoaded",(function(e,t){if(o.isLive()){var n=t.details.endSN;if(o._lastLoadedFragSN===n){if(o._sameFragSNLoadedCount++,r._logger.debug("Same frag SN. Count is: "+o._sameFragSNLoadedCount+", Max is: "+o._config.network.maxStaleLevelReloads),o._sameFragSNLoadedCount>=o._config.network.maxStaleLevelReloads){r._logger.error("Same frag loading reached max count");var i=new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.NETWORK,s.Error.Code.LIVE_MANIFEST_REFRESH_ERROR,{fragSN:n});return o._trigger(s.EventType.ERROR,i),o.destroy()}r._logger.debug("Last frag SN is: "+n)}else o._sameFragSNLoadedCount=0;o._lastLoadedFragSN=n}})),o._config=s.Utils.Object.mergeDeep({},c,o._config),o._init(),o}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.createAdapter=function(e,t,n){var i=s.Utils.Object.copyDeep(c);if(s.Utils.Object.hasPropertyPath(n,"sources.options")){var a=n.sources.options;i.forceRedirectExternalStreams=a.forceRedirectExternalStreams,i.redirectExternalStreamsHandler=a.redirectExternalStreamsHandler,i.redirectExternalStreamsTimeout=a.redirectExternalStreamsTimeout,f.redirectExternalStreamsHandler=i.redirectExternalStreamsHandler,f.redirectExternalStreamsTimeout=i.redirectExternalStreamsTimeout}if(s.Utils.Object.hasPropertyPath(n,"sources.startTime")&&s.Utils.Object.getPropertyPath(n,"sources.startTime")>-1&&(i.hlsConfig.startPosition=n.sources.startTime),s.Utils.Object.hasPropertyPath(n,"text.useNativeTextTrack")&&(i.subtitleDisplay=s.Utils.Object.getPropertyPath(n,"text.useNativeTextTrack")),s.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedFramesInterval")&&(i.hlsConfig.fpsDroppedFramesInterval=n.abr.fpsDroppedFramesInterval),s.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedMonitoringThreshold")&&(i.hlsConfig.fpsDroppedMonitoringThreshold=n.abr.fpsDroppedMonitoringThreshold),s.Utils.Object.hasPropertyPath(n,"abr.capLevelOnFPSDrop")&&(r._logger.debug("capLevelOnFPSDrop = ",n.abr.capLevelOnFPSDrop),i.hlsConfig.capLevelOnFPSDrop=n.abr.capLevelOnFPSDrop),s.Utils.Object.hasPropertyPath(n,"text")&&(i.hlsConfig.enableCEA708Captions=n.text.enableCEA708Captions,i.hlsConfig.captionsTextTrack1Label=n.text.captionsTextTrack1Label,i.hlsConfig.captionsTextTrack1LanguageCode=n.text.captionsTextTrack1LanguageCode,i.hlsConfig.captionsTextTrack2Label=n.text.captionsTextTrack2Label,i.hlsConfig.captionsTextTrack2LanguageCode=n.text.captionsTextTrack2LanguageCode),s.Utils.Object.hasPropertyPath(n,"abr")){var o=n.abr;"boolean"==typeof o.enabled&&(i.abr.enabled=o.enabled),"boolean"==typeof o.capLevelToPlayerSize&&(i.hlsConfig.capLevelToPlayerSize=o.capLevelToPlayerSize),o.defaultBandwidthEstimate&&(i.hlsConfig.abrEwmaDefaultEstimate=o.defaultBandwidthEstimate),o.restrictions&&s.Utils.Object.createPropertyPath(i,"abr.restrictions",o.restrictions)}return s.Utils.Object.hasPropertyPath(n,"streaming.lowLatencyMode")&&(i.hlsConfig.lowLatencyMode=s.Utils.Object.getPropertyPath(n,"streaming.lowLatencyMode")),s.Utils.Object.hasPropertyPath(n,"playback.options.html5.hls")&&s.Utils.Object.mergeDeep(i.hlsConfig,n.playback.options.html5.hls),i.network=n.network,new this(e,t,i)},r.canPlayType=function(e){var t="string"==typeof e&&r._hlsMimeTypes.includes(e.toLowerCase())&&r.isMSESupported();return r._logger.debug("canPlayType result for mimeType:"+e+" is "+t.toString()),t},r.canPlayDrm=function(){return r._logger.warn("canPlayDrm result is false"),!1},r.isSupported=function(){var e=u.a.isSupported();return r._logger.debug("isSupported:"+e),e};var i,a,o=r.prototype;return o._init=function(){this._config.forceRedirectExternalStreams&&(this._config.hlsConfig.pLoader=f),this._maybeSetFilters(),this._hls=new u.a(this._config.hlsConfig),this._capabilities.fpsControl=!0,this._hls.subtitleDisplay=this._config.subtitleDisplay,this._addBindings()},o._maybeSetFilters=function(){var e=this;if("function"==typeof s.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(r._logger.debug("Register request filter"),s.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:d,xhrSetup:function(t,n,r){var i,a={url:n,body:null,headers:{}};try{"manifest"===r.type&&(i=e._config.network.requestFilter(s.RequestType.MANIFEST,a)),r.frag&&"subtitle"!==r.frag.type&&(i=e._config.network.requestFilter(s.RequestType.SEGMENT,a))}catch(e){i=Promise.reject(e)}return(i=i||Promise.resolve(a)).then((function(e){r.url=e.url,t.open("GET",e.url,!0),Object.entries(e.headers).forEach((function(e){t.setRequestHeader.apply(t,e)})),"boolean"==typeof e.withCredentials&&(t.withCredentials=e.withCredentials)})).catch((function(t){throw e._requestFilterError=!0,t}))}})),"function"==typeof s.Utils.Object.getPropertyPath(this._config,"network.responseFilter")){var t=this;r._logger.debug("Register response filter"),s.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:d,readystatechange:function(e){var n=this,i=e.currentTarget,a=i.readyState,o=this.stats,l=this.context,u=this.config;if(!o.aborted&&a>=2){window.clearTimeout(this.requestTimeout);var c=o.loading;if(0===c.first&&(c.first=Math.max(performance.now(),c.start)),4===a){var p=i.status;if(p>=200&&p<300){var d,f;c.end=Math.max(o.tfirst,performance.now()),f="arraybuffer"===l.responseType?(d=i.response).byteLength:(d=i.responseText).length,o.loaded=o.total=f;var h,g={url:i.responseURL,originalUrl:l.url,data:d,headers:s.Utils.Http.convertHeadersToDictionary(i.getAllResponseHeaders())};try{"manifest"===l.type&&(h=t._config.network.responseFilter(s.RequestType.MANIFEST,g)),l.frag&&"subtitle"!==l.frag.type&&(h=t._config.network.responseFilter(s.RequestType.SEGMENT,g))}catch(e){h=Promise.reject(e)}return(h=h||Promise.resolve(g)).then((function(e){n.callbacks.onSuccess(e,o,l,i)})).catch((function(e){t._responseFilterError=!0,n.callbacks.onError({code:p,text:e.message},l,i)}))}o.retry>=u.maxRetry||p>=400&&p<499?(r._logger.error(p+" while loading "+l.url),this.callbacks.onError({code:p,text:i.statusText},l,i)):(r._logger.warn(p+" while loading "+l.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,u.maxRetryDelay),o.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),u.timeout)}}})}},o._addBindings=function(){var e=this;this._mediaAttachedPromise=new Promise((function(t){return e._onMediaAttached=t}));for(var t=0,n=Object.entries(this._adapterEventsBindings);t<n.length;t++){var r=n[t],i=r[0],a=r[1];this._hls.on(i,a)}this._onRecoveredCallback=function(){return e._onRecovered()},this._onAddTrack=this._onAddTrack.bind(this),this._eventManager.listen(this._videoElement,"addtrack",this._onAddTrack),this._videoElement.textTracks.onaddtrack=this._onAddTrack},o._onFpsDrop=function(e){this._trigger(s.EventType.FPS_DROP,e)},o._onFragParsingMetadata=function(e){var t;this._trigger("hlsFragParsingMetadata",e);var n=Array.from(null==(t=this._videoElement)?void 0:t.textTracks).find((function(e){return"id3"===e.label})),r=Array.from((null==n?void 0:n.cues)||[]),i=[];null==e||e.samples.forEach((function(e){var t=s.Utils.binarySearch(r,(function(t){return t.startTime-e.pts}));if(t){var n=Object(s.createTimedMetadata)(t);i.push(n)}})),i.length&&this._trigger(s.EventType.TIMED_METADATA_ADDED,{cues:i})},o._onAddTrack=function(e){if(!this._hls.subtitleTracks.length){var t=this._parseCEATextTrack(e.track);t&&(r._logger.debug("A CEA 608/708 caption has been found",t),this._playerTracks.push(t),this._trigger(s.EventType.TRACKS_CHANGED,{tracks:this._playerTracks}))}},o.attachMediaSource=function(){this._hls||(this._videoElement&&this._videoElement.src&&(s.Utils.Dom.setAttribute(this._videoElement,"src",""),s.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init())},o.detachMediaSource=function(){var e;this._hls&&(0===Math.floor(this.duration-this.currentTime)?this._config.hlsConfig.startPosition=0:this.currentTime>0&&(this._config.hlsConfig.startPosition=this.currentTime),this._reset(),null==(e=this._loadPromiseHandlers)||e.reject(new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,"media detached while loading")),this._loadPromiseHandlers=null,this._loadPromise=null,this._hls=null)},o.handleMediaError=function(e){return e.code===e.MEDIA_ERR_DECODE&&(r._logger.debug("The video playback was aborted due to a corruption problem or because the video used features your browser did not support.",e.message),this._handleMediaError(u.a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR))},o.load=function(e){var t=this;return this._loadPromise||(this._startTime=e,this._loadPromise=new Promise((function(e,n){t._loadPromiseHandlers={resolve:e,reject:n},t._loadInternal()}))),this._loadPromise},o._loadInternal=function(){var e;this._hls&&this._sourceObj&&this._sourceObj.url?(this._hls.loadSource(this._sourceObj.url),this._hls.attachMedia(this._videoElement),this._trigger(s.EventType.ABR_MODE_CHANGED,{mode:this.isAdaptiveBitrateEnabled()?"auto":"manual"})):null==(e=this._loadPromiseHandlers)||e.reject(new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,"no url provided"))},o._reloadWithDirectManifest=function(){this._triedReloadWithRedirect=!0,this._reset(),this._config.hlsConfig.pLoader=f,this._hls=new u.a(this._config.hlsConfig),this._addBindings(),this._loadInternal()},o.destroy=function(){var t=this;return new Promise((function(n,i){e.prototype.destroy.call(t).then((function(){var e;r._logger.debug("destroy"),t._playerTracks=[],t._nativeTextTracksMap={},t._sameFragSNLoadedCount=0,t._lastLoadedFragSN=-1,null==(e=t._loadPromiseHandlers)||e.reject(new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,"The adapter has been destroyed while loading")),t._loadPromiseHandlers=null,t._loadPromise=null,t._reset(),n()}),(function(){return i()}))}))},o._reset=function(){this._removeBindings(),this._requestFilterError=!1,this._responseFilterError=!1,this._hls.detachMedia(),this._hls.destroy()},o._parseTracks=function(){var e=this._parseAudioTracks(this._hls.audioTracks||[]),t=this._parseVideoTracks(this._hls.levels||[]),n=this._parseTextTracks(this._hls.subtitleTracks||[]);return e.concat(t).concat(n)},o._parseAudioTracks=function(e){for(var t=[],n=0;n<e.length;n++){var r={id:e[n].id,active:this._hls.audioTrack===e[n].id,label:e[n].name,language:e[n].lang,index:n};t.push(new s.AudioTrack(r))}return t},o._parseVideoTracks=function(e){for(var t=[],n=0;n<e.length;n++){var r={active:this._hls.startLevel===n,bandwidth:e[n].bitrate,width:e[n].width,height:e[n].height,language:"",index:n};t.push(new s.VideoTrack(r))}return t},o._parseTextTracks=function(e){for(var t,n=[],r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}(e);!(t=r()).done;){var i=t.value,a={id:i.id,active:!1,default:i.default,label:i.name,kind:i.type.toLowerCase(),language:i.lang};n.push(new s.TextTrack(a))}return n},o._parseCEATextTrack=function(e){var t=null;if("captions"===e.kind){var n={id:e.id,active:"showing"===e.mode,label:e.label,kind:e.kind,language:e.language};t=new s.TextTrack(n),this._nativeTextTracksMap[t.index]=e}return t},o.selectAudioTrack=function(e){e instanceof s.AudioTrack&&!e.active&&this._hls.audioTracks&&(this._hls.audioTrack=e.id)},o.selectVideoTrack=function(e){e instanceof s.VideoTrack&&(!e.active||this.isAdaptiveBitrateEnabled())&&this._hls.levels&&(this.isAdaptiveBitrateEnabled()&&this._trigger(s.EventType.ABR_MODE_CHANGED,{mode:"manual"}),this._hls.currentLevel=e.index)},o.selectTextTrack=function(e){e instanceof s.TextTrack&&!e.active&&this._hls&&(this._hls.subtitleTracks.length?(this._hls.subtitleTrack=e.id,this._notifyTrackChanged(e)):this._selectNativeTextTrack(e))},o._selectNativeTextTrack=function(e){var t=this._nativeTextTracksMap[e.index];t&&(this.disableNativeTextTracks(),t.mode=this._config.subtitleDisplay?"showing":"hidden",this._notifyTrackChanged(e))},o._notifyTrackChanged=function(e){this._onTrackChanged(e)},o.hideTextTrack=function(){this._hls&&(this._hls.subtitleTracks.length?this._hls.subtitleTrack=-1:this.disableNativeTextTracks())},o.enableAdaptiveBitrate=function(){this.isAdaptiveBitrateEnabled()||(this._trigger(s.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._hls.nextLevel=-1)},o.isAdaptiveBitrateEnabled=function(){return!!this._hls&&this._hls.autoLevelEnabled},o.applyABRRestriction=function(e){s.Utils.Object.createPropertyPath(this._config,"abr.restrictions",e),this._hls.capLevelToPlayerSize||this._maybeApplyAbrRestrictions(e)},o._getLevelDetails=function(){var e=this._hls.levels[this._hls.currentLevel]||this._hls.levels[this._hls.nextLevel]||this._hls.levels[this._hls.nextAutoLevel]||this._hls.levels[this._hls.nextLoadLevel];return e&&e.details?e.details:{}},o._getLiveEdge=function(){try{var e;return(e=this._hls.liveSyncPosition?this._hls.liveSyncPosition:this._hls.config.liveSyncDuration?this._videoElement.duration-this._hls.config.liveSyncDuration:this._videoElement.duration-this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration)>0?e:this._videoElement.duration}catch(e){return r._logger.debug("Live edge calculation failed, fall back to duration"),this._videoElement.duration}},o.seekToLiveEdge=function(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}},o.getSegmentDuration=function(){var e=s.Utils.Object.getPropertyPath(this._hls,"streamController.fragCurrent");return e?e.duration:0},o.isLive=function(){try{return!!this._getLevelDetails().live}catch(e){return!1}},o._onManifestLoaded=function(e){var t=this;r._logger.debug("The source has been loaded successfully"),this._hls.config.autoStartLoad||this._hls.startLoad(this._startTime),this._playerTracks=this._parseTracks(),this._config.abr.enabled||(this._hls.currentLevel=0),this._mediaAttachedPromise.then((function(){var e;null==(e=t._loadPromiseHandlers)||e.resolve({tracks:t._playerTracks}),t._loadPromiseHandlers=null}));var n=e.stats.loading,i=n.end-n.start;this._trigger(s.EventType.MANIFEST_LOADED,{miliSeconds:i})},o._maybeApplyAbrRestrictions=function(e){var t=this._playerTracks.filter((function(e){return e instanceof s.VideoTrack})),n=Object(s.filterTracksByRestriction)(t,e);if(n.length){var i=n[0],a=n.pop();this._hls.config.minAutoBitrate=i.bandwidth,this._hls.autoLevelCapping=a.index;var o=n.some((function(e){return e.active}));this.isAdaptiveBitrateEnabled()||o||this.selectVideoTrack(i)}else r._logger.warn("Invalid restrictions, there are not tracks within the restriction range")},o._onLevelSwitched=function(e,t){var n=this._playerTracks.find((function(e){return e instanceof s.VideoTrack&&e.index===t.level}));this._onTrackChanged(n)},o._onAudioTrackSwitched=function(e,t){var n=this._playerTracks.find((function(e){return e instanceof s.AudioTrack&&e.id===t.id}));this._onTrackChanged(n),this._handleWaitingUponAudioTrackSwitch()},o._handleWaitingUponAudioTrackSwitch=function(){var e=this;["IE","Edge"].includes(s.Env.browser.name)&&this._eventManager.listenOnce(this._videoElement,s.EventType.TIME_UPDATE,(function(){e._trigger(s.EventType.PLAYING)}))},o._getErrorDataObject=function(e){var t={};switch(t.name=e.details,t.name){case u.a.ErrorDetails.MANIFEST_LOAD_ERROR:case u.a.ErrorDetails.LEVEL_LOAD_ERROR:case u.a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:t.url=e.url,t.responseCode=e.response?e.response.code:null;break;case u.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case u.a.ErrorDetails.LEVEL_LOAD_TIMEOUT:case u.a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:t.url=e.url;break;case u.a.ErrorDetails.MANIFEST_PARSING_ERROR:t.url=e.url,t.reason=e.reason;break;case u.a.ErrorDetails.LEVEL_SWITCH_ERROR:t.level=e.level,t.reason=e.reason;break;case u.a.ErrorDetails.FRAG_LOAD_ERROR:t.fragUrl=e.frag?e.frag.url:null,t.responseCode=e.response?e.response.code:null;break;case u.a.ErrorDetails.FRAG_LOAD_TIMEOUT:t.fragUrl=e.frag?e.frag.url:null;break;case u.a.ErrorDetails.FRAG_DECRYPT_ERROR:case u.a.ErrorDetails.FRAG_PARSING_ERROR:t.reason=e.reason;break;case u.a.ErrorDetails.KEY_LOAD_ERROR:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null,t.responseCode=e.response?e.response.code:null;break;case u.a.ErrorDetails.KEY_LOAD_TIMEOUT:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null;break;case u.a.ErrorDetails.BUFFER_ADD_CODEC_ERROR:t.mimeType=e.mimeType,t.errorMsg=e.err?e.err.message:null;break;case u.a.ErrorDetails.BUFFER_STALLED_ERROR:t.buffer=e.buffer}return(this._requestFilterError||this._responseFilterError)&&(t.reason=e.response.text),t},o._onError=function(e){var t=e.type,n=e.details,i=e.fatal,a=this._getErrorDataObject(e);if(i){var o,l;switch(t){case u.a.ErrorTypes.NETWORK_ERROR:var c;c=this._requestFilterError?s.Error.Code.REQUEST_FILTER_ERROR:this._responseFilterError?s.Error.Code.RESPONSE_FILTER_ERROR:s.Error.Code.HTTP_ERROR,![u.a.ErrorDetails.MANIFEST_LOAD_ERROR,u.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT].includes(n)||this._triedReloadWithRedirect||this._config.forceRedirectExternalStreams||this._requestFilterError||this._responseFilterError?o=new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.NETWORK,c,a):(o=new s.Error(s.Error.Severity.RECOVERABLE,s.Error.Category.NETWORK,c,a),this._reloadWithDirectManifest());break;case u.a.ErrorTypes.MEDIA_ERROR:o=this._handleMediaError(n)?new s.Error(s.Error.Severity.RECOVERABLE,s.Error.Category.MEDIA,s.Error.Code.HLS_FATAL_MEDIA_ERROR,a):new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.MEDIA,s.Error.Code.HLS_FATAL_MEDIA_ERROR,a);break;default:o=new s.Error(s.Error.Severity.CRITICAL,s.Error.Category.PLAYER,s.Error.Code.HLS_FATAL_MEDIA_ERROR,a)}this._trigger(s.EventType.ERROR,o),o&&o.severity===s.Error.Severity.CRITICAL&&(this._loadPromiseHandlers&&(null==(l=this._loadPromiseHandlers)||l.reject(o),this._loadPromiseHandlers=null,this._loadPromise=null),this.destroy())}else{var d=this._requestFilterError||this._responseFilterError?{category:s.Error.Category.NETWORK,code:this._requestFilterError?s.Error.Code.REQUEST_FILTER_ERROR:s.Error.Code.RESPONSE_FILTER_ERROR}:p[n]||{category:0,code:0},f=d.category,h=d.code;r._logger.warn(new s.Error(s.Error.Severity.RECOVERABLE,f,h,a))}this._requestFilterError=!1,this._responseFilterError=!1},o._handleMediaError=function(e){r._logger.error("_handleMediaError mediaErrorName:",e);var t=performance.now(),n=!0;return e===u.a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR?(r._logger.error("recover aborted due to: MANIFEST_INCOMPATIBLE_CODECS_ERROR"),n=!1):this._checkTimeDeltaHasPassed(t,this._recoverDecodingErrorDate,this._config.recoverDecodingErrorDelay)?(this._eventManager.listen(this._videoElement,s.EventType.LOADED_METADATA,this._onRecoveredCallback),r._logger.debug("try to recover using: _recoverDecodingError()"),this._recoverDecodingError()):this._checkTimeDeltaHasPassed(t,this._recoverSwapAudioCodecDate,this._config.recoverSwapAudioCodecDelay)?(this._eventManager.listen(this._videoElement,s.EventType.LOADED_METADATA,this._onRecoveredCallback),r._logger.debug("try to recover using: _recoverSwapAudioCodec()"),this._recoverSwapAudioCodec()):(r._logger.error("cannot recover, last media error recovery failed error: ",e),n=!1),n},o._onRecovered=function(){this._trigger(s.EventType.MEDIA_RECOVERED),this._videoElement.removeEventListener(s.EventType.LOADED_METADATA,this._onRecoveredCallback)},o._checkTimeDeltaHasPassed=function(e,t,n){return!t||e-t>n},o._recoverDecodingError=function(){this._recoverDecodingErrorDate=performance.now(),r._logger.warn("try to recover media Error"),this._hls.recoverMediaError()},o._recoverSwapAudioCodec=function(){this._recoverSwapAudioCodecDate=performance.now(),r._logger.warn("try to swap Audio Codec and recover media Error"),this._hls.swapAudioCodec(),this._hls.recoverMediaError()},o._removeBindings=function(){for(var e=0,t=Object.entries(this._adapterEventsBindings);e<t.length;e++){var n=t[e],r=n[0],i=n[1];this._hls.off(r,i)}this._videoElement.textTracks.onaddtrack=null,this._onRecoveredCallback=null,this._eventManager&&this._eventManager.removeAll()},o.getStartTimeOfDvrWindow=function(){if(!this.isLive())return 0;try{var e=this._hls.levels[this._hls.nextLoadLevel].details,t=e.fragments,n=t.length,i=t[0].start+t[0].duration,a=t[n-1].start+t[n-1].duration,o=void 0!==this._hls.config.liveMaxLatencyDuration?this._hls.config.liveMaxLatencyDuration:this._hls.config.liveMaxLatencyDurationCount*e.targetduration;return Math.max(i-this._hls.config.maxFragLookUpTolerance,a-o)}catch(e){return r._logger.debug("Unable obtain the start of DVR window"),0}},o._onFragLoaded=function(e){if(s.Utils.Object.hasPropertyPath(e,"frag.stats.loading")){var t=e.frag.stats,n=t.loading.end-t.loading.start;this._trigger(s.EventType.FRAG_LOADED,{miliSeconds:n,bytes:t.loaded,url:e.frag.url})}},o._getLiveTargetBuffer=function(){return this._hls.config.liveSyncDuration?this._hls.config.liveSyncDuration:this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration},i=r,(a=[{key:"liveDuration",get:function(){return this._getLiveEdge()+this.getSegmentDuration()}},{key:"targetBuffer",get:function(){var e=NaN;return this._hls?(e=this.isLive()?this._getLiveTargetBuffer()-(this._videoElement.currentTime-this._getLiveEdge()):this._videoElement.duration-this._videoElement.currentTime,e=Math.min(e,this._hls.config.maxMaxBufferLength+this._getLevelDetails().targetduration)):NaN}}])&&g(i.prototype,a),r}(s.BaseMediaSourceAdapter);v(m,"id","HlsAdapter"),v(m,"_logger",s.BaseMediaSourceAdapter.getLogger(m.id)),v(m,"_hlsMimeTypes",["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"]);var b="1.32.4-canary.0-cb687d0",_="@playkit-js/playkit-js-hls";t.default=m,m.isSupported()&&Object(s.registerMediaSourceAdapter)(m)}]))},function(e,t,n){var r;"undefined"!=typeof window&&(r=()=>(()=>{var e={21:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u});var r=function(){function e(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}return e.prototype.decrypt=function(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)},e}(),i=function(){function e(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}return e.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},e}(),a=n(145),o=function(){function e(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}var t=e.prototype;return t.uint8ArrayToUint32Array_=function(e){for(var t=new DataView(e),n=new Uint32Array(4),r=0;r<4;r++)n[r]=t.getUint32(4*r);return n},t.initTable=function(){var e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],a=n[2],o=n[3],s=this.invSubMix,l=s[0],u=s[1],c=s[2],p=s[3],d=new Uint32Array(256),f=0,h=0,g=0;for(g=0;g<256;g++)d[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var y=h^h<<1^h<<2^h<<3^h<<4;y=y>>>8^255&y^99,e[f]=y,t[y]=f;var v=d[f],m=d[v],b=d[m],_=257*d[y]^16843008*y;r[f]=_<<24|_>>>8,i[f]=_<<16|_>>>16,a[f]=_<<8|_>>>24,o[f]=_,_=16843009*b^65537*m^257*v^16843008*f,l[y]=_<<24|_>>>8,u[y]=_<<16|_>>>16,c[y]=_<<8|_>>>24,p[y]=_,f?(f=v^d[d[d[b^v]]],h^=d[d[h]]):f=h=1}},t.expandKey=function(e){for(var t=this.uint8ArrayToUint32Array_(e),n=!0,r=0;r<t.length&&n;)n=t[r]===this.key[r],r++;if(!n){this.key=t;var i=this.keySize=t.length;if(4!==i&&6!==i&&8!==i)throw new Error("Invalid aes key size="+i);var a,o,s,l,u=this.ksRows=4*(i+6+1),c=this.keySchedule=new Uint32Array(u),p=this.invKeySchedule=new Uint32Array(u),d=this.sBox,f=this.rcon,h=this.invSubMix,g=h[0],y=h[1],v=h[2],m=h[3];for(a=0;a<u;a++)a<i?s=c[a]=t[a]:(l=s,a%i==0?(l=d[(l=l<<8|l>>>24)>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l],l^=f[a/i|0]<<24):i>6&&a%i==4&&(l=d[l>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l]),c[a]=s=(c[a-i]^l)>>>0);for(o=0;o<u;o++)a=u-o,l=3&o?c[a]:c[a-4],p[o]=o<4||a<=4?l:g[d[l>>>24]]^y[d[l>>>16&255]]^v[d[l>>>8&255]]^m[d[255&l]],p[o]=p[o]>>>0}},t.networkToHostOrderSwap=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24},t.decrypt=function(e,t,n){for(var r,i,a,o,s,l,u,c,p,d,f,h,g,y,v=this.keySize+6,m=this.invKeySchedule,b=this.invSBox,_=this.invSubMix,E=_[0],k=_[1],T=_[2],A=_[3],w=this.uint8ArrayToUint32Array_(n),S=w[0],C=w[1],x=w[2],I=w[3],P=new Int32Array(e),D=new Int32Array(P.length),R=this.networkToHostOrderSwap;t<P.length;){for(p=R(P[t]),d=R(P[t+1]),f=R(P[t+2]),h=R(P[t+3]),s=p^m[0],l=h^m[1],u=f^m[2],c=d^m[3],g=4,y=1;y<v;y++)r=E[s>>>24]^k[l>>16&255]^T[u>>8&255]^A[255&c]^m[g],i=E[l>>>24]^k[u>>16&255]^T[c>>8&255]^A[255&s]^m[g+1],a=E[u>>>24]^k[c>>16&255]^T[s>>8&255]^A[255&l]^m[g+2],o=E[c>>>24]^k[s>>16&255]^T[l>>8&255]^A[255&u]^m[g+3],s=r,l=i,u=a,c=o,g+=4;r=b[s>>>24]<<24^b[l>>16&255]<<16^b[u>>8&255]<<8^b[255&c]^m[g],i=b[l>>>24]<<24^b[u>>16&255]<<16^b[c>>8&255]<<8^b[255&s]^m[g+1],a=b[u>>>24]<<24^b[c>>16&255]<<16^b[s>>8&255]<<8^b[255&l]^m[g+2],o=b[c>>>24]<<24^b[s>>16&255]<<16^b[l>>8&255]<<8^b[255&u]^m[g+3],D[t]=R(r^S),D[t+1]=R(o^C),D[t+2]=R(a^x),D[t+3]=R(i^I),S=p,C=d,x=f,I=h,t+=4}return D.buffer},e}(),s=n(93),l=n(63),u=function(){function e(e,t){var n=(void 0===t?{}:t).removePKCS7Padding,r=void 0===n||n;if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=r,r)try{var i=self.crypto;i&&(this.subtle=i.subtle||i.webkitSubtle)}catch(e){}null===this.subtle&&(this.useSoftware=!0)}var t=e.prototype;return t.destroy=function(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null},t.isSync=function(){return this.useSoftware},t.flush=function(){var e=this.currentResult,t=this.remainderData;if(!e||t)return this.reset(),null;var n,r,i,o=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?(i=(r=(n=o).byteLength)&&new DataView(n.buffer).getUint8(r-1))?(0,a.sliceUint8)(n,0,r-i):n:o},t.reset=function(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)},t.decrypt=function(e,t,n){var r=this;return this.useSoftware?new Promise((function(i,a){r.softwareDecrypt(new Uint8Array(e),t,n);var o=r.flush();o?i(o.buffer):a(new Error("[softwareDecrypt] Failed to decrypt data"))})):this.webCryptoDecrypt(new Uint8Array(e),t,n)},t.softwareDecrypt=function(e,t,n){var r=this.currentIV,i=this.currentResult,s=this.remainderData;this.logOnce("JS AES decrypt"),s&&(e=(0,l.appendUint8Array)(s,e),this.remainderData=null);var u=this.getValidChunk(e);if(!u.length)return null;r&&(n=r);var c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new o),c.expandKey(t);var p=i;return this.currentResult=c.decrypt(u.buffer,0,n),this.currentIV=(0,a.sliceUint8)(u,-16).buffer,p||null},t.webCryptoDecrypt=function(e,t,n){var a=this,o=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new i(o,t)),this.fastAesKey.expandKey().then((function(t){return o?(a.logOnce("WebCrypto AES decrypt"),new r(o,new Uint8Array(n)).decrypt(e.buffer,t)):Promise.reject(new Error("web crypto not initialized"))})).catch((function(r){return s.logger.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+r.name+": "+r.message),a.onWebCryptoError(e,t,n)}))},t.onWebCryptoError=function(e,t,n){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n);var r=this.flush();if(r)return r.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")},t.getValidChunk=function(e){var t=e,n=e.length-e.length%16;return n!==e.length&&(t=(0,a.sliceUint8)(e,0,n),this.remainderData=(0,a.sliceUint8)(e,n)),t},t.logOnce=function(e){this.logEnabled&&(s.logger.log("[decrypter]: "+e),this.logEnabled=!1)},e}()},181:(e,t,n)=>{"use strict";n.r(t),n.d(t,{canParse:()=>l,decodeFrame:()=>f,getID3Data:()=>o,getID3Frames:()=>d,getTimeStamp:()=>u,isFooter:()=>a,isHeader:()=>i,isTimeStampFrame:()=>c,testables:()=>b,utf8ArrayToStr:()=>m});var r,i=function(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},a=function(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&e[t+3]<255&&e[t+4]<255&&e[t+6]<128&&e[t+7]<128&&e[t+8]<128&&e[t+9]<128},o=function(e,t){for(var n=t,r=0;i(e,t);)r+=10,r+=s(e,t+6),a(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)},s=function(e,t){var n=0;return n=(127&e[t])<<21,n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]},l=function(e,t){return i(e,t)&&s(e,t+6)+10<=e.length-t},u=function(e){for(var t=d(e),n=0;n<t.length;n++){var r=t[n];if(c(r))return v(r)}},c=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},p=function(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=s(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}},d=function(e){for(var t=0,n=[];i(e,t);){for(var r=s(e,t+6),o=(t+=10)+r;t+8<o;){var l=p(e.subarray(t)),u=f(l);u&&n.push(u),t+=l.size+10}a(e,t)&&(t+=10)}return n},f=function(e){return"PRIV"===e.type?h(e):"W"===e.type[0]?y(e):g(e)},h=function(e){if(!(e.size<2)){var t=m(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}},g=function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,n=m(e.data.subarray(t),!0);t+=n.length+1;var r=m(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=m(e.data.subarray(1));return{key:e.type,data:i}}},y=function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,n=m(e.data.subarray(t),!0);t+=n.length+1;var r=m(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=m(e.data);return{key:e.type,data:i}},v=function(e){if(8===e.data.byteLength){var t=new Uint8Array(e.data),n=1&t[3],r=(t[4]<<23)+(t[5]<<15)+(t[6]<<7)+t[7];return r/=45,n&&(r+=47721858.84),Math.round(r)}},m=function(e,t){void 0===t&&(t=!1);var n=_();if(n){var r=n.decode(e);if(t){var i=r.indexOf("\0");return-1!==i?r.substring(0,i):r}return r.replace(/\0/g,"")}for(var a,o,s,l=e.length,u="",c=0;c<l;){if(0===(a=e[c++])&&t)return u;if(0!==a&&3!==a)switch(a>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:u+=String.fromCharCode(a);break;case 12:case 13:o=e[c++],u+=String.fromCharCode((31&a)<<6|63&o);break;case 14:o=e[c++],s=e[c++],u+=String.fromCharCode((15&a)<<12|(63&o)<<6|(63&s)<<0)}}return u},b={decodeTextFrame:g};function _(){return r||void 0===self.TextDecoder||(r=new self.TextDecoder("utf-8")),r}},182:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l});var r=n(544),i=n(851),a=n(93),o=n(729),s=n(973);function l(e){var t=new o.EventEmitter,n=function(t,n){e.postMessage({event:t,data:n})};t.on(i.Events.FRAG_DECRYPTED,n),t.on(i.Events.ERROR,n),e.addEventListener("message",(function(o){var l=o.data;switch(l.cmd){case"init":var c=JSON.parse(l.config);e.transmuxer=new r.default(t,l.typeSupported,c,l.vendor,l.id),(0,a.enableLogs)(c.debug,l.id),function(){var e=function(e){a.logger[e]=function(t){n("workerLog",{logType:e,message:t})}};for(var t in a.logger)e(t)}(),n("init",null);break;case"configure":e.transmuxer.configure(l.config);break;case"demux":var d=e.transmuxer.push(l.data,l.decryptdata,l.chunkMeta,l.state);(0,r.isPromise)(d)?(e.transmuxer.async=!0,d.then((function(t){u(e,t)})).catch((function(e){n(i.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:l.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker push error"})}))):(e.transmuxer.async=!1,u(e,d));break;case"flush":var f=l.chunkMeta,h=e.transmuxer.flush(f);(0,r.isPromise)(h)||e.transmuxer.async?((0,r.isPromise)(h)||(h=Promise.resolve(h)),h.then((function(t){p(e,t,f)})).catch((function(e){n(i.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:l.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker flush error"})}))):p(e,h,f)}}))}function u(e,t){if(!((n=t.remuxResult).audio||n.video||n.text||n.id3||n.initSegment))return!1;var n,r=[],i=t.remuxResult,a=i.audio,o=i.video;return a&&c(r,a),o&&c(r,o),e.postMessage({event:"transmuxComplete",data:t},r),!0}function c(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function p(e,t,n){t.reduce((function(t,n){return u(e,n)||t}),!1)||e.postMessage({event:"transmuxComplete",data:t[0]}),e.postMessage({event:"flush",data:n})}},544:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TransmuxConfig:()=>oe,TransmuxState:()=>se,default:()=>re,isPromise:()=>ae});var r=n(851),i=n(973),a=n(21),o=n(965),s=n(181),l=n(856);function u(e,t){return void 0===e&&(e=""),void 0===t&&(t=9e4),{type:e,id:-1,pid:-1,inputTimeScale:t,sequenceNumber:-1,samples:[],dropped:0}}var c=n(63),p=n(145),d=function(){function e(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}var t=e.prototype;return t.resetInitSegment=function(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}},t.resetTimeStamp=function(e){this.initPTS=e,this.resetContiguity()},t.resetContiguity=function(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0},t.canParse=function(e,t){return!1},t.appendFrame=function(e,t,n){},t.demux=function(e,t){this.cachedData&&(e=(0,c.appendUint8Array)(this.cachedData,e),this.cachedData=null);var n,r=s.getID3Data(e,0),i=r?r.length:0,a=this._audioTrack,d=this._id3Track,h=r?s.getTimeStamp(r):void 0,g=e.length;for((null===this.basePTS||0===this.frameIndex&&(0,o.isFiniteNumber)(h))&&(this.basePTS=f(h,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),r&&r.length>0&&d.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:l.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});i<g;){if(this.canParse(e,i)){var y=this.appendFrame(a,e,i);y?(this.frameIndex++,this.lastPTS=y.sample.pts,n=i+=y.length):i=g}else s.canParse(e,i)?(r=s.getID3Data(e,i),d.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:l.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY}),n=i+=r.length):i++;if(i===g&&n!==g){var v=(0,p.sliceUint8)(e,n);this.cachedData?this.cachedData=(0,c.appendUint8Array)(this.cachedData,v):this.cachedData=v}}return{audioTrack:a,videoTrack:u(),id3Track:d,textTrack:u()}},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("["+this+"] This demuxer does not support Sample-AES decryption"))},t.flush=function(e){var t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:u(),id3Track:this._id3Track,textTrack:u()}},t.destroy=function(){},e}(),f=function(e,t,n){return(0,o.isFiniteNumber)(e)?90*e:9e4*t+(n||0)};const h=d;var g=n(93);function y(e,t){return 255===e[t]&&240==(246&e[t+1])}function v(e,t){return 1&e[t+1]?7:9}function m(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function b(e,t){return t+1<e.length&&y(e,t)}function _(e,t){if(b(e,t)){var n=v(e,t);if(t+n>=e.length)return!1;var r=m(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||b(e,i)}return!1}function E(e,t,n,a,o){if(!e.samplerate){var s=function(e,t,n,a){var o,s,l,u,c=navigator.userAgent.toLowerCase(),p=a,d=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];o=1+((192&t[n+2])>>>6);var f=(60&t[n+2])>>>2;if(!(f>d.length-1))return l=(1&t[n+2])<<2,l|=(192&t[n+3])>>>6,g.logger.log("manifest codec:"+a+", ADTS type:"+o+", samplingIndex:"+f),/firefox/i.test(c)?f>=6?(o=5,u=new Array(4),s=f-3):(o=2,u=new Array(2),s=f):-1!==c.indexOf("android")?(o=2,u=new Array(2),s=f):(o=5,u=new Array(4),a&&(-1!==a.indexOf("mp4a.40.29")||-1!==a.indexOf("mp4a.40.5"))||!a&&f>=6?s=f-3:((a&&-1!==a.indexOf("mp4a.40.2")&&(f>=6&&1===l||/vivaldi/i.test(c))||!a&&1===l)&&(o=2,u=new Array(2)),s=f)),u[0]=o<<3,u[0]|=(14&f)>>1,u[1]|=(1&f)<<7,u[1]|=l<<3,5===o&&(u[1]|=(14&s)>>1,u[2]=(1&s)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:d[f],channelCount:l,codec:"mp4a.40."+o,manifestCodec:p};e.trigger(r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+f})}(t,n,a,o);if(!s)return;e.config=s.config,e.samplerate=s.samplerate,e.channelCount=s.channelCount,e.codec=s.codec,e.manifestCodec=s.manifestCodec,g.logger.log("parsed codec:"+e.codec+", rate:"+s.samplerate+", channels:"+s.channelCount)}}function k(e){return 9216e4/e}function T(e,t,n,r,i){var a,o=r+i*k(e.samplerate),s=function(e,t){var n=v(e,t);if(t+n<=e.length){var r=m(e,t)-n;if(r>0)return{headerLength:n,frameLength:r}}}(t,n);if(s){var l=s.frameLength,u=s.headerLength,c=u+l,p=Math.max(0,n+c-t.length);p?(a=new Uint8Array(c-u)).set(t.subarray(n+u,t.length),0):a=t.subarray(n+u,n+c);var d={unit:a,pts:o};return p||e.samples.push(d),{sample:d,length:c,missing:p}}var f=t.length-n;return(a=new Uint8Array(f)).set(t.subarray(n,t.length),0),{sample:{unit:a,pts:o},length:f,missing:-1}}function A(e,t){return(A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const w=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this).observer=void 0,r.config=void 0,r.observer=t,r.config=n,r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,A(t,n);var i=r.prototype;return i.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(s.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(_(e,t))return g.logger.log("ADTS sync word found !"),!0;return!1},i.canParse=function(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&y(e,t)&&m(e,t)<=e.length-t}(e,t)},i.appendFrame=function(e,t,n){E(e,this.observer,t,n,e.manifestCodec);var r=T(e,t,n,this.basePTS,this.frameIndex);if(r&&0===r.missing)return r},r}(h);var S=/\/emsg[-/]ID3/i;const C=function(){function e(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}var t=e.prototype;return t.resetTimeStamp=function(){},t.resetInitSegment=function(e,t,n,r){var i=this.videoTrack=u("video",1),a=this.audioTrack=u("audio",1),o=this.txtTrack=u("text",1);if(this.id3Track=u("id3",1),this.timeOffset=0,e&&e.byteLength){var s=(0,c.parseInitSegment)(e);if(s.video){var l=s.video,p=l.id,d=l.timescale,f=l.codec;i.id=p,i.timescale=o.timescale=d,i.codec=f}if(s.audio){var h=s.audio,g=h.id,y=h.timescale,v=h.codec;a.id=g,a.timescale=y,a.codec=v}o.id=c.RemuxerTrackIdConfig.text,i.sampleDuration=0,i.duration=a.duration=r}},t.resetContiguity=function(){},e.probe=function(e){return e=e.length>16384?e.subarray(0,16384):e,(0,c.findBox)(e,["moof"]).length>0},t.demux=function(e,t){this.timeOffset=t;var n=e,r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=(0,c.appendUint8Array)(this.remainderData,e));var a=(0,c.segmentValidRange)(n);this.remainderData=a.remainder,r.samples=a.valid||new Uint8Array}else r.samples=n;var o=this.extractID3Track(r,t);return i.samples=(0,c.parseSamples)(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:o,textTrack:this.txtTrack}},t.flush=function(){var e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;var r=this.extractID3Track(t,this.timeOffset);return n.samples=(0,c.parseSamples)(e,t),{videoTrack:t,audioTrack:u(),id3Track:r,textTrack:u()}},t.extractID3Track=function(e,t){var n=this.id3Track;if(e.samples.length){var r=(0,c.findBox)(e.samples,["emsg"]);r&&r.forEach((function(e){var r=(0,c.parseEmsg)(e);if(S.test(r.schemeIdUri)){var i=(0,o.isFiniteNumber)(r.presentationTime)?r.presentationTime/r.timeScale:t+r.presentationTimeDelta/r.timeScale,a=4294967295===r.eventDuration?Number.POSITIVE_INFINITY:r.eventDuration/r.timeScale;a<=.001&&(a=Number.POSITIVE_INFINITY);var s=r.payload;n.samples.push({data:s,len:s.byteLength,dts:i,pts:i,type:l.MetadataSchema.emsg,duration:a})}}))}return n},t.demuxSampleAes=function(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))},t.destroy=function(){},e}();var x=null,I=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],P=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],D=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],R=[0,1,1,4];function O(e,t,n,r,i){if(!(n+24>t.length)){var a=L(t,n);if(a&&n+a.frameLength<=t.length){var o=r+i*(9e4*a.samplesPerFrame/a.sampleRate),s={unit:t.subarray(n,n+a.frameLength),pts:o,dts:o};return e.config=[],e.channelCount=a.channelCount,e.samplerate=a.sampleRate,e.samples.push(s),{sample:s,length:a.frameLength,missing:0}}}}function L(e,t){var n=e[t+1]>>3&3,r=e[t+1]>>1&3,i=e[t+2]>>4&15,a=e[t+2]>>2&3;if(1!==n&&0!==i&&15!==i&&3!==a){var o=e[t+2]>>1&1,s=e[t+3]>>6,l=1e3*I[14*(3===n?3-r:3===r?3:4)+i-1],u=P[3*(3===n?0:2===n?1:2)+a],c=3===s?1:2,p=D[n][r],d=R[r],f=8*p*d,h=Math.floor(p*l/u+o)*d;if(null===x){var g=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);x=g?parseInt(g[1]):0}return!!x&&x<=87&&2===r&&l>=224e3&&0===s&&(e[t+3]=128|e[t+3]),{sampleRate:u,channelCount:c,frameLength:h,samplesPerFrame:f}}}function M(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function N(e,t){return t+1<e.length&&M(e,t)}function U(e,t){if(t+1<e.length&&M(e,t)){var n=L(e,t),r=4;null!=n&&n.frameLength&&(r=n.frameLength);var i=t+r;return i===e.length||N(e,i)}return!1}const F=function(){function e(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}var t=e.prototype;return t.loadWord=function(){var e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(0===i)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=8*i,this.bytesAvailable-=i},t.skipBits=function(e){var t;e=Math.min(e,8*this.bytesAvailable+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,e-=(t=e>>3)<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)},t.readBits=function(e){var t=Math.min(this.bitsAvailable,e),n=this.word>>>32-t;if(e>32&&g.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else{if(!(this.bytesAvailable>0))throw new Error("no bits available");this.loadWord()}return(t=e-t)>0&&this.bitsAvailable?n<<t|this.readBits(t):n},t.skipLZ=function(){var e;for(e=0;e<this.bitsAvailable;++e)if(0!=(this.word&2147483648>>>e))return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()},t.skipUEG=function(){this.skipBits(1+this.skipLZ())},t.skipEG=function(){this.skipBits(1+this.skipLZ())},t.readUEG=function(){var e=this.skipLZ();return this.readBits(e+1)-1},t.readEG=function(){var e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)},t.readBoolean=function(){return 1===this.readBits(1)},t.readUByte=function(){return this.readBits(8)},t.readUShort=function(){return this.readBits(16)},t.readUInt=function(){return this.readBits(32)},t.skipScalingList=function(e){for(var t=8,n=8,r=0;r<e;r++)0!==n&&(n=(t+this.readEG()+256)%256),t=0===n?t:n},t.readSPS=function(){var e,t,n,r=0,i=0,a=0,o=0,s=this.readUByte.bind(this),l=this.readBits.bind(this),u=this.readUEG.bind(this),c=this.readBoolean.bind(this),p=this.skipBits.bind(this),d=this.skipEG.bind(this),f=this.skipUEG.bind(this),h=this.skipScalingList.bind(this);s();var g=s();if(l(5),p(3),s(),f(),100===g||110===g||122===g||244===g||44===g||83===g||86===g||118===g||128===g){var y=u();if(3===y&&p(1),f(),f(),p(1),c())for(t=3!==y?8:12,n=0;n<t;n++)c()&&h(n<6?16:64)}f();var v=u();if(0===v)u();else if(1===v)for(p(1),d(),d(),e=u(),n=0;n<e;n++)d();f(),p(1);var m=u(),b=u(),_=l(1);0===_&&p(1),p(1),c()&&(r=u(),i=u(),a=u(),o=u());var E=[1,1];if(c()&&c())switch(s()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[s()<<8|s(),s()<<8|s()]}return{width:Math.ceil(16*(m+1)-2*r-2*i),height:(2-_)*(b+1)*16-(_?2:4)*(a+o),pixelRatio:E}},t.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},e}(),j=function(){function e(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new a.default(t,{removePKCS7Padding:!1})}var t=e.prototype;return t.decryptBuffer=function(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)},t.decryptAacSample=function(e,t,n){var r=this,i=e[t].unit;if(!(i.length<=16)){var a=i.subarray(16,i.length-i.length%16),o=a.buffer.slice(a.byteOffset,a.byteOffset+a.length);this.decryptBuffer(o).then((function(a){var o=new Uint8Array(a);i.set(o,16),r.decrypter.isSync()||r.decryptAacSamples(e,t+1,n)}))}},t.decryptAacSamples=function(e,t,n){for(;;t++){if(t>=e.length)return void n();if(!(e[t].unit.length<32||(this.decryptAacSample(e,t,n),this.decrypter.isSync())))return}},t.getAvcEncryptedData=function(e){for(var t=16*Math.floor((e.length-48)/160)+16,n=new Int8Array(t),r=0,i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n},t.getAvcDecryptedUnit=function(e,t){for(var n=new Uint8Array(t),r=0,i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e},t.decryptAvcSample=function(e,t,n,r,i){var a=this,o=(0,c.discardEPB)(i.data),s=this.getAvcEncryptedData(o);this.decryptBuffer(s.buffer).then((function(s){i.data=a.getAvcDecryptedUnit(o,s),a.decrypter.isSync()||a.decryptAvcSamples(e,t,n+1,r)}))},t.decryptAvcSamples=function(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length)return void r();for(var i=e[t].units;!(n>=i.length);n++){var a=i[n];if(!(a.data.length<=48||1!==a.type&&5!==a.type||(this.decryptAvcSample(e,t,n,r,a),this.decrypter.isSync())))return}}},e}();function B(){return(B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var V=188;function H(e,t,n,r){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:r,length:0}}function K(e,t){return((31&e[t+1])<<8)+e[t+2]}function G(e,t){return(31&e[t+10])<<8|e[t+11]}function z(e,t,n,r){var i={audio:-1,avc:-1,id3:-1,segmentCodec:"aac"},a=t+3+((15&e[t+1])<<8|e[t+2])-4;for(t+=12+((15&e[t+10])<<8|e[t+11]);t<a;){var o=K(e,t);switch(e[t]){case 207:if(!r){g.logger.log("ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===i.audio&&(i.audio=o);break;case 21:-1===i.id3&&(i.id3=o);break;case 219:if(!r){g.logger.log("H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===i.avc&&(i.avc=o);break;case 3:case 4:!0!==n.mpeg&&!0!==n.mp3?g.logger.log("MPEG audio found, not supported in this browser"):-1===i.audio&&(i.audio=o,i.segmentCodec="mp3");break;case 36:g.logger.warn("Unsupported HEVC stream type found")}t+=5+((15&e[t+3])<<8|e[t+4])}return i}function W(e){var t,n,r,i,a,o=0,s=e.data;if(!e||0===e.size)return null;for(;s[0].length<19&&s.length>1;){var l=new Uint8Array(s[0].length+s[1].length);l.set(s[0]),l.set(s[1],s[0].length),s[0]=l,s.splice(1,1)}if(1===((t=s[0])[0]<<16)+(t[1]<<8)+t[2]){if((n=(t[4]<<8)+t[5])&&n>e.size-6)return null;var u=t[7];192&u&&(i=536870912*(14&t[9])+4194304*(255&t[10])+16384*(254&t[11])+128*(255&t[12])+(254&t[13])/2,64&u?i-(a=536870912*(14&t[14])+4194304*(255&t[15])+16384*(254&t[16])+128*(255&t[17])+(254&t[18])/2)>54e5&&(g.logger.warn(Math.round((i-a)/9e4)+"s delta between PTS and DTS, align them"),i=a):a=i);var c=(r=t[8])+9;if(e.size<=c)return null;e.size-=c;for(var p=new Uint8Array(e.size),d=0,f=s.length;d<f;d++){var h=(t=s[d]).byteLength;if(c){if(c>h){c-=h;continue}t=t.subarray(c),h-=c,c=0}p.set(t,o),o+=h}return n&&(n-=r+3),{data:p,pts:i,dts:a,len:n}}return null}function Y(e,t){if(e.units.length&&e.frame){if(void 0===e.pts){var n=t.samples,r=n.length;if(!r)return void t.dropped++;var i=n[r-1];e.pts=i.pts,e.dts=i.dts}t.samples.push(e)}e.debug.length&&g.logger.log(e.pts+"/"+e.dts+":"+e.debug)}const q=function(){function e(e,t,n){this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._avcTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.observer=e,this.config=t,this.typeSupported=n}e.probe=function(t){var n=e.syncOffset(t);return n>0&&g.logger.warn("MPEG2-TS detected but first sync word found @ offset "+n),-1!==n},e.syncOffset=function(e){for(var t=e.length,n=Math.min(940,e.length-V)+1,r=0;r<n;){for(var i=!1,a=r;a<t&&71===e[a];a+=V)if(i||0!==K(e,a)||(i=!0),i&&a+V>n)return r;r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:c.RemuxerTrackIdConfig[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:"audio"===e?t:void 0}};var t=e.prototype;return t.resetInitSegment=function(t,n,r,i){this.pmtParsed=!1,this._pmtId=-1,this._avcTrack=e.createTrack("video"),this._audioTrack=e.createTrack("audio",i),this._id3Track=e.createTrack("id3"),this._txtTrack=e.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.avcSample=null,this.remainderData=null,this.audioCodec=n,this.videoCodec=r,this._duration=i},t.resetTimeStamp=function(){},t.resetContiguity=function(){var e=this._audioTrack,t=this._avcTrack,n=this._id3Track;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.avcSample=null,this.remainderData=null},t.demux=function(t,n,a,o){var s;void 0===a&&(a=!1),void 0===o&&(o=!1),a||(this.sampleAes=null);var l=this._avcTrack,u=this._audioTrack,p=this._id3Track,d=this._txtTrack,f=l.pid,h=l.pesData,y=u.pid,v=p.pid,m=u.pesData,b=p.pesData,_=null,E=this.pmtParsed,k=this._pmtId,T=t.length;if(this.remainderData&&(T=(t=(0,c.appendUint8Array)(this.remainderData,t)).length,this.remainderData=null),T<V&&!o)return this.remainderData=t,{audioTrack:u,videoTrack:l,id3Track:p,textTrack:d};var A=Math.max(0,e.syncOffset(t));(T-=(T-A)%V)<t.byteLength&&!o&&(this.remainderData=new Uint8Array(t.buffer,T,t.buffer.byteLength-T));for(var w=0,S=A;S<T;S+=V)if(71===t[S]){var C=!!(64&t[S+1]),x=K(t,S),I=void 0;if((48&t[S+3])>>4>1){if((I=S+5+t[S+4])===S+V)continue}else I=S+4;switch(x){case f:C&&(h&&(s=W(h))&&this.parseAVCPES(l,d,s,!1),h={data:[],size:0}),h&&(h.data.push(t.subarray(I,S+V)),h.size+=S+V-I);break;case y:if(C){if(m&&(s=W(m)))switch(u.segmentCodec){case"aac":this.parseAACPES(u,s);break;case"mp3":this.parseMPEGPES(u,s)}m={data:[],size:0}}m&&(m.data.push(t.subarray(I,S+V)),m.size+=S+V-I);break;case v:C&&(b&&(s=W(b))&&this.parseID3PES(p,s),b={data:[],size:0}),b&&(b.data.push(t.subarray(I,S+V)),b.size+=S+V-I);break;case 0:C&&(I+=t[I]+1),k=this._pmtId=G(t,I);break;case k:C&&(I+=t[I]+1);var P=z(t,I,this.typeSupported,a);(f=P.avc)>0&&(l.pid=f),(y=P.audio)>0&&(u.pid=y,u.segmentCodec=P.segmentCodec),(v=P.id3)>0&&(p.pid=v),null===_||E||(g.logger.warn("MPEG-TS PMT found at "+S+" after unknown PID '"+_+"'. Backtracking to sync byte @"+A+" to parse all TS packets."),_=null,S=A-188),E=this.pmtParsed=!0;break;case 17:case 8191:break;default:_=x}}else w++;w>0&&this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"Found "+w+" TS packet/s that do not start with 0x47"}),l.pesData=h,u.pesData=m,p.pesData=b;var D={audioTrack:u,videoTrack:l,id3Track:p,textTrack:d};return o&&this.extractRemainingSamples(D),D},t.flush=function(){var e,t=this.remainderData;return this.remainderData=null,e=t?this.demux(t,-1,!1,!0):{videoTrack:this._avcTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(e),this.sampleAes?this.decrypt(e,this.sampleAes):e},t.extractRemainingSamples=function(e){var t,n=e.audioTrack,r=e.videoTrack,i=e.id3Track,a=e.textTrack,o=r.pesData,s=n.pesData,l=i.pesData;if(o&&(t=W(o))?(this.parseAVCPES(r,a,t,!0),r.pesData=null):r.pesData=o,s&&(t=W(s))){switch(n.segmentCodec){case"aac":this.parseAACPES(n,t);break;case"mp3":this.parseMPEGPES(n,t)}n.pesData=null}else null!=s&&s.size&&g.logger.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=s;l&&(t=W(l))?(this.parseID3PES(i,t),i.pesData=null):i.pesData=l},t.demuxSampleAes=function(e,t,n){var r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new j(this.observer,this.config,t);return this.decrypt(r,i)},t.decrypt=function(e,t){return new Promise((function(n){var r=e.audioTrack,i=e.videoTrack;r.samples&&"aac"===r.segmentCodec?t.decryptAacSamples(r.samples,0,(function(){i.samples?t.decryptAvcSamples(i.samples,0,0,(function(){n(e)})):n(e)})):i.samples&&t.decryptAvcSamples(i.samples,0,0,(function(){n(e)}))}))},t.destroy=function(){this._duration=0},t.parseAVCPES=function(e,t,n,r){var i,a=this,o=this.parseAVCNALu(e,n.data),s=this.avcSample,l=!1;n.data=null,s&&o.length&&!e.audFound&&(Y(s,e),s=this.avcSample=H(!1,n.pts,n.dts,"")),o.forEach((function(r){switch(r.type){case 1:i=!0,s||(s=a.avcSample=H(!0,n.pts,n.dts,"")),s.frame=!0;var o=r.data;if(l&&o.length>4){var u=new F(o).readSliceType();2!==u&&4!==u&&7!==u&&9!==u||(s.key=!0)}break;case 5:i=!0,s||(s=a.avcSample=H(!0,n.pts,n.dts,"")),s.key=!0,s.frame=!0;break;case 6:i=!0,(0,c.parseSEIMessageFromNALu)(r.data,1,n.pts,t.samples);break;case 7:if(i=!0,l=!0,!e.sps){var p=new F(r.data).readSPS();e.width=p.width,e.height=p.height,e.pixelRatio=p.pixelRatio,e.sps=[r.data],e.duration=a._duration;for(var d=r.data.subarray(1,4),f="avc1.",h=0;h<3;h++){var g=d[h].toString(16);g.length<2&&(g="0"+g),f+=g}e.codec=f}break;case 8:i=!0,e.pps||(e.pps=[r.data]);break;case 9:i=!1,e.audFound=!0,s&&Y(s,e),s=a.avcSample=H(!1,n.pts,n.dts,"");break;case 12:i=!0;break;default:i=!1,s&&(s.debug+="unknown NAL "+r.type+" ")}s&&i&&s.units.push(r)})),r&&s&&(Y(s,e),this.avcSample=null)},t.getLastNalUnit=function(e){var t,n,r=this.avcSample;if(r&&0!==r.units.length||(r=e[e.length-1]),null!==(t=r)&&void 0!==t&&t.units){var i=r.units;n=i[i.length-1]}return n},t.parseAVCNALu=function(e,t){var n,r,i=t.byteLength,a=e.naluState||0,o=a,s=[],l=0,u=-1,c=0;for(-1===a&&(u=0,c=31&t[0],a=0,l=1);l<i;)if(n=t[l++],a)if(1!==a)if(n)if(1===n){if(u>=0){var p={data:t.subarray(u,l-a-1),type:c};s.push(p)}else{var d=this.getLastNalUnit(e.samples);if(d&&(o&&l<=4-o&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-o)),(r=l-a-1)>0)){var f=new Uint8Array(d.data.byteLength+r);f.set(d.data,0),f.set(t.subarray(0,r),d.data.byteLength),d.data=f,d.state=0}}l<i?(u=l,c=31&t[l],a=0):a=-1}else a=0;else a=3;else a=n?0:2;else a=n?0:1;if(u>=0&&a>=0){var h={data:t.subarray(u,i),type:c,state:a};s.push(h)}if(0===s.length){var g=this.getLastNalUnit(e.samples);if(g){var y=new Uint8Array(g.data.byteLength+t.byteLength);y.set(g.data,0),y.set(t,g.data.byteLength),g.data=y}}return e.naluState=a,s},t.parseAACPES=function(e,t){var n,a,o,s,l,u=0,c=this.aacOverFlow,p=t.data;if(c){this.aacOverFlow=null;var d=c.missing,f=c.sample.unit.byteLength;if(-1===d){var h=new Uint8Array(f+p.byteLength);h.set(c.sample.unit,0),h.set(p,f),p=h}else{var y=f-d;c.sample.unit.set(p.subarray(0,d),y),e.samples.push(c.sample),u=c.missing}}for(n=u,a=p.length;n<a-1&&!b(p,n);n++);if(n===u||(n<a-1?(o="AAC PES did not start with ADTS header,offset:"+n,s=!1):(o="no ADTS header found in AAC PES",s=!0),g.logger.warn("parsing error:"+o),this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:s,reason:o}),!s)){if(E(e,this.observer,p,n,this.audioCodec),void 0!==t.pts)l=t.pts;else{if(!c)return void g.logger.warn("[tsdemuxer]: AAC PES unknown PTS");var v=k(e.samplerate);l=c.sample.pts+v}for(var m,_=0;n<a;){if(n+=(m=T(e,p,n,l,_)).length,m.missing){this.aacOverFlow=m;break}for(_++;n<a-1&&!b(p,n);n++);}}},t.parseMPEGPES=function(e,t){var n=t.data,r=n.length,i=0,a=0,o=t.pts;if(void 0!==o)for(;a<r;)if(N(n,a)){var s=O(e,n,a,o,i);if(!s)break;a+=s.length,i++}else a++;else g.logger.warn("[tsdemuxer]: MPEG PES unknown PTS")},t.parseID3PES=function(e,t){if(void 0!==t.pts){var n=B({},t,{type:this._avcTrack?l.MetadataSchema.emsg:l.MetadataSchema.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}else g.logger.warn("[tsdemuxer]: ID3 PES unknown PTS")},e}();function X(e,t){return(X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const $=function(e){var t,n;function r(){return e.apply(this,arguments)||this}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,X(t,n);var i=r.prototype;return i.resetInitSegment=function(t,n,r,i){e.prototype.resetInitSegment.call(this,t,n,r,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:n,duration:i,inputTimeScale:9e4,dropped:0}},r.probe=function(e){if(!e)return!1;for(var t=(s.getID3Data(e,0)||[]).length,n=e.length;t<n;t++)if(U(e,t))return g.logger.log("MPEG Audio sync word found !"),!0;return!1},i.canParse=function(e,t){return function(e,t){return M(e,t)&&4<=e.length-t}(e,t)},i.appendFrame=function(e,t,n){if(null!==this.basePTS)return O(e,t,n,this.basePTS,this.frameIndex)},r}(h);var Q=n(524),Z=n(923);function J(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n||"hev1"===n?"hvc1.1.c.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===Z.ElementaryStreamTypes.VIDEO?"avc1.42e01e":"mp4a.40.5"}const ee=function(){function e(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=void 0,this.initTracks=void 0,this.lastEndTime=null}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){this.initPTS=e,this.lastEndTime=null},t.resetNextTimestamp=function(){this.lastEndTime=null},t.resetInitSegment=function(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment((0,c.patchEncyptionData)(e,r)),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(!e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=(0,c.parseInitSegment)(e);t||(t=J(r.audio,Z.ElementaryStreamTypes.AUDIO)),n||(n=J(r.video,Z.ElementaryStreamTypes.VIDEO));var i={};r.audio&&r.video?i.audiovideo={container:"video/mp4",codec:t+","+n,initSegment:e,id:"main"}:r.audio?i.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?i.video={container:"video/mp4",codec:n,initSegment:e,id:"main"}:g.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},t.remux=function(e,t,n,r,i){var a,s=this.initPTS,l=this.lastEndTime,u={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};(0,o.isFiniteNumber)(l)||(l=this.lastEndTime=i||0);var p=t.samples;if(!p||!p.length)return u;var d={initPTS:void 0,timescale:1},f=this.initData;if(f&&f.length||(this.generateInitSegment(p),f=this.initData),!f||!f.length)return g.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),u;this.emitInitSegment&&(d.tracks=this.initTracks,this.emitInitSegment=!1);var h=(0,c.getStartDTS)(f,p);(0,o.isFiniteNumber)(s)||(this.initPTS=d.initPTS=s=h-i);var y=(0,c.getDuration)(p,f),v=e?h-s:l,m=v+y;(0,c.offsetStartDTS)(f,p,s),y>0?this.lastEndTime=m:(g.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var b=!!f.audio,_=!!f.video,E="";b&&(E+="audio"),_&&(E+="video");var k={data1:p,startPTS:v,startDTS:v,endPTS:m,endDTS:m,type:E,hasAudio:b,hasVideo:_,nb:1,dropped:0};u.audio="audio"===k.type?k:void 0,u.video="audio"!==k.type?k:void 0,u.initSegment=d;var T=null!=(a=this.initPTS)?a:0;return u.id3=(0,Q.flushTextTrackMetadataCueSamples)(n,i,T,T),r.samples.length&&(u.text=(0,Q.flushTextTrackUserdataCueSamples)(r,i,T)),u},e}();var te;try{te=self.performance.now.bind(self.performance)}catch(e){g.logger.debug("Unable to use Performance API on this environment"),te=self.Date.now}var ne=[{demux:C,remux:ee},{demux:q,remux:Q.default},{demux:w,remux:Q.default},{demux:$,remux:Q.default}],re=function(){function e(e,t,n,r,i){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.vendor=r,this.id=i}var t=e.prototype;return t.configure=function(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()},t.push=function(e,t,n,r){var i=this,a=n.transmuxing;a.executeStart=te();var o=new Uint8Array(e),s=this.currentTransmuxState,l=this.transmuxConfig;r&&(this.currentTransmuxState=r);var u=r||s,c=u.contiguous,p=u.discontinuity,d=u.trackSwitch,f=u.accurateTimeOffset,h=u.timeOffset,g=u.initSegmentChange,y=l.audioCodec,v=l.videoCodec,m=l.defaultInitPts,b=l.duration,_=l.initSegmentData,E=function(e,t){var n=null;return e.byteLength>0&&null!=t&&null!=t.key&&null!==t.iv&&null!=t.method&&(n=t),n}(o,t);if(E&&"AES-128"===E.method){var k=this.getDecrypter();if(!k.isSync())return this.decryptionPromise=k.webCryptoDecrypt(o,E.key.buffer,E.iv.buffer).then((function(e){var t=i.push(e,null,n);return i.decryptionPromise=null,t})),this.decryptionPromise;var T=k.softwareDecrypt(o,E.key.buffer,E.iv.buffer);if(n.part>-1&&(T=k.flush()),!T)return a.executeEnd=te(),ie(n);o=new Uint8Array(T)}var A=this.needsProbing(p,d);A&&this.configureTransmuxer(o),(p||d||g||A)&&this.resetInitSegment(_,y,v,b,t),(p||g||A)&&this.resetInitialTimestamp(m),c||this.resetContiguity();var w=this.transmux(o,E,h,f,n),S=this.currentTransmuxState;return S.contiguous=!0,S.discontinuity=!1,S.trackSwitch=!1,a.executeEnd=te(),w},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=te();var a=this.decrypter,o=this.currentTransmuxState,s=this.decryptionPromise;if(s)return s.then((function(){return t.flush(e)}));var l=[],u=o.timeOffset;if(a){var c=a.flush();c&&l.push(this.push(c,null,e))}var p=this.demuxer,d=this.remuxer;if(!p||!d)return this.observer.emit(r.Events.ERROR,r.Events.ERROR,{type:i.ErrorTypes.MEDIA_ERROR,details:i.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"}),n.executeEnd=te(),[ie(e)];var f=p.flush(u);return ae(f)?f.then((function(n){return t.flushRemux(l,n,e),l})):(this.flushRemux(l,f,e),l)},t.flushRemux=function(e,t,n){var r=t.audioTrack,i=t.videoTrack,a=t.id3Track,o=t.textTrack,s=this.currentTransmuxState,l=s.accurateTimeOffset,u=s.timeOffset;g.logger.log("[transmuxer.ts]: Flushed fragment "+n.sn+(n.part>-1?" p: "+n.part:"")+" of level "+n.level);var c=this.remuxer.remux(r,i,a,o,u,l,!0,this.id);e.push({remuxResult:c,chunkMeta:n}),n.transmuxing.executeEnd=te()},t.resetInitialTimestamp=function(e){var t=this.demuxer,n=this.remuxer;t&&n&&(t.resetTimeStamp(e),n.resetTimeStamp(e))},t.resetContiguity=function(){var e=this.demuxer,t=this.remuxer;e&&t&&(e.resetContiguity(),t.resetNextTimestamp())},t.resetInitSegment=function(e,t,n,r,i){var a=this.demuxer,o=this.remuxer;a&&o&&(a.resetInitSegment(e,t,n,r),o.resetInitSegment(e,t,n,i))},t.destroy=function(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)},t.transmux=function(e,t,n,r,i){return t&&"SAMPLE-AES"===t.method?this.transmuxSampleAes(e,t,n,r,i):this.transmuxUnencrypted(e,n,r,i)},t.transmuxUnencrypted=function(e,t,n,r){var i=this.demuxer.demux(e,t,!1,!this.config.progressive),a=i.audioTrack,o=i.videoTrack,s=i.id3Track,l=i.textTrack;return{remuxResult:this.remuxer.remux(a,o,s,l,t,n,!1,this.id),chunkMeta:r}},t.transmuxSampleAes=function(e,t,n,r,i){var a=this;return this.demuxer.demuxSampleAes(e,t,n).then((function(e){return{remuxResult:a.remuxer.remux(e.audioTrack,e.videoTrack,e.id3Track,e.textTrack,n,r,!1,a.id),chunkMeta:i}}))},t.configureTransmuxer=function(e){for(var t,n=this.config,r=this.observer,i=this.typeSupported,a=this.vendor,o=0,s=ne.length;o<s;o++)if(ne[o].demux.probe(e)){t=ne[o];break}t||(g.logger.warn("Failed to find demuxer by probing frag, treating as mp4 passthrough"),t={demux:C,remux:ee});var l=this.demuxer,u=this.remuxer,c=t.remux,p=t.demux;u&&u instanceof c||(this.remuxer=new c(r,n,i,a)),l&&l instanceof p||(this.demuxer=new p(r,n,i),this.probe=p.probe)},t.needsProbing=function(e,t){return!this.demuxer||!this.remuxer||e||t},t.getDecrypter=function(){var e=this.decrypter;return e||(e=this.decrypter=new a.default(this.config)),e},e}(),ie=function(e){return{remuxResult:{},chunkMeta:e}};function ae(e){return"then"in e&&e.then instanceof Function}var oe=function(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i},se=function(e,t,n,r,i,a){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=a}},973:(e,t,n)=>{"use strict";var r,i;n.r(t),n.d(t,{ErrorDetails:()=>i,ErrorTypes:()=>r}),function(e){e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError"}(r||(r={})),function(e){e.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",e.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",e.KEY_SYSTEM_NO_SESSION="keySystemNoSession",e.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",e.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",e.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",e.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",e.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",e.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",e.MANIFEST_LOAD_ERROR="manifestLoadError",e.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",e.MANIFEST_PARSING_ERROR="manifestParsingError",e.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",e.LEVEL_EMPTY_ERROR="levelEmptyError",e.LEVEL_LOAD_ERROR="levelLoadError",e.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",e.LEVEL_SWITCH_ERROR="levelSwitchError",e.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",e.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",e.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",e.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",e.FRAG_LOAD_ERROR="fragLoadError",e.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",e.FRAG_DECRYPT_ERROR="fragDecryptError",e.FRAG_PARSING_ERROR="fragParsingError",e.REMUX_ALLOC_ERROR="remuxAllocError",e.KEY_LOAD_ERROR="keyLoadError",e.KEY_LOAD_TIMEOUT="keyLoadTimeOut",e.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",e.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",e.BUFFER_APPEND_ERROR="bufferAppendError",e.BUFFER_APPENDING_ERROR="bufferAppendingError",e.BUFFER_STALLED_ERROR="bufferStalledError",e.BUFFER_FULL_ERROR="bufferFullError",e.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",e.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",e.INTERNAL_EXCEPTION="internalException",e.INTERNAL_ABORTED="aborted",e.UNKNOWN="unknown"}(i||(i={}))},851:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{Events:()=>r}),function(e){e.MEDIA_ATTACHING="hlsMediaAttaching",e.MEDIA_ATTACHED="hlsMediaAttached",e.MEDIA_DETACHING="hlsMediaDetaching",e.MEDIA_DETACHED="hlsMediaDetached",e.BUFFER_RESET="hlsBufferReset",e.BUFFER_CODECS="hlsBufferCodecs",e.BUFFER_CREATED="hlsBufferCreated",e.BUFFER_APPENDING="hlsBufferAppending",e.BUFFER_APPENDED="hlsBufferAppended",e.BUFFER_EOS="hlsBufferEos",e.BUFFER_FLUSHING="hlsBufferFlushing",e.BUFFER_FLUSHED="hlsBufferFlushed",e.MANIFEST_LOADING="hlsManifestLoading",e.MANIFEST_LOADED="hlsManifestLoaded",e.MANIFEST_PARSED="hlsManifestParsed",e.LEVEL_SWITCHING="hlsLevelSwitching",e.LEVEL_SWITCHED="hlsLevelSwitched",e.LEVEL_LOADING="hlsLevelLoading",e.LEVEL_LOADED="hlsLevelLoaded",e.LEVEL_UPDATED="hlsLevelUpdated",e.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",e.LEVELS_UPDATED="hlsLevelsUpdated",e.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",e.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",e.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",e.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",e.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",e.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",e.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",e.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",e.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",e.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",e.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",e.CUES_PARSED="hlsCuesParsed",e.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",e.INIT_PTS_FOUND="hlsInitPtsFound",e.FRAG_LOADING="hlsFragLoading",e.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",e.FRAG_LOADED="hlsFragLoaded",e.FRAG_DECRYPTED="hlsFragDecrypted",e.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",e.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",e.FRAG_PARSING_METADATA="hlsFragParsingMetadata",e.FRAG_PARSED="hlsFragParsed",e.FRAG_BUFFERED="hlsFragBuffered",e.FRAG_CHANGED="hlsFragChanged",e.FPS_DROP="hlsFpsDrop",e.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",e.ERROR="hlsError",e.DESTROYING="hlsDestroying",e.KEY_LOADING="hlsKeyLoading",e.KEY_LOADED="hlsKeyLoaded",e.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",e.BACK_BUFFER_REACHED="hlsBackBufferReached"}(r||(r={}))},76:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Tr});var r,i=n(945),a=n(965),o=n(851),s=n(973),l=n(93),u=/^(\d+)x(\d+)$/,c=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,p=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&(this[n]=t[n])}var t=e.prototype;return t.decimalInteger=function(e){var t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.hexadecimalInteger=function(e){if(this[e]){var t=(this[e]||"0x").slice(2);t=(1&t.length?"0":"")+t;for(var n=new Uint8Array(t.length/2),r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(2*r,2*r+2),16);return n}return null},t.hexadecimalIntegerAsNumber=function(e){var t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t},t.decimalFloatingPoint=function(e){return parseFloat(this[e])},t.optionalFloat=function(e,t){var n=this[e];return n?parseFloat(n):t},t.enumeratedString=function(e){return this[e]},t.bool=function(e){return"YES"===this[e]},t.decimalResolution=function(e){var t=u.exec(this[e]);if(null!==t)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}},e.parseAttrList=function(e){var t,n={};for(c.lastIndex=0;null!==(t=c.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1]]=r}return n},e}();function d(){return(d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}!function(e){e.ID="ID",e.CLASS="CLASS",e.START_DATE="START-DATE",e.DURATION="DURATION",e.END_DATE="END-DATE",e.END_ON_NEXT="END-ON-NEXT",e.PLANNED_DURATION="PLANNED-DURATION",e.SCTE35_OUT="SCTE35-OUT",e.SCTE35_IN="SCTE35-IN"}(r||(r={}));var f,h,g,y=function(){function e(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){var n=t.attr;for(var i in n)if(Object.prototype.hasOwnProperty.call(e,i)&&e[i]!==n[i]){l.logger.warn('DATERANGE tag attribute: "'+i+'" does not match for tags with ID: "'+e.ID+'"'),this._badValueForSameId=i;break}e=d(new p({}),n,e)}if(this.attr=e,this._startDate=new Date(e[r.START_DATE]),r.END_DATE in this.attr){var o=new Date(this.attr[r.END_DATE]);(0,a.isFiniteNumber)(o.getTime())&&(this._endDate=o)}}var t,n;return t=e,(n=[{key:"id",get:function(){return this.attr.ID}},{key:"class",get:function(){return this.attr.CLASS}},{key:"startDate",get:function(){return this._startDate}},{key:"endDate",get:function(){if(this._endDate)return this._endDate;var e=this.duration;return null!==e?new Date(this._startDate.getTime()+1e3*e):null}},{key:"duration",get:function(){if(r.DURATION in this.attr){var e=this.attr.decimalFloatingPoint(r.DURATION);if((0,a.isFiniteNumber)(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return r.PLANNED_DURATION in this.attr?this.attr.decimalFloatingPoint(r.PLANNED_DURATION):null}},{key:"endOnNext",get:function(){return this.attr.bool(r.END_ON_NEXT)}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&(0,a.isFiniteNumber)(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),v=n(923),m=function(){function e(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}var t,n;return e.prototype.reloaded=function(e){if(!e)return this.advanced=!0,void(this.updated=!0);var t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t,this.advanced=this.endSN>e.endSN||t>0||0===t&&n>0,this.updated||this.advanced?this.misses=Math.floor(.6*e.misses):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay},t=e,(n=[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&(0,a.isFiniteNumber)(this.fragments[this.fragments.length-1].programDateTime)}},{key:"levelTargetDuration",get:function(){return this.averagetargetduration||this.targetduration||10}},{key:"drift",get:function(){var e=this.driftEndTime-this.driftStartTime;return e>0?1e3*(this.driftEnd-this.driftStart)/e:1}},{key:"edge",get:function(){return this.partEnd||this.fragmentEnd}},{key:"partEnd",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!==(e=this.fragments)&&void 0!==e&&e.length?this.fragments[this.fragments.length-1].end:0}},{key:"age",get:function(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}},{key:"lastPartIndex",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!==(e=this.partList)&&void 0!==e&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function b(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))}function _(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(function(e){return e.charCodeAt(0)}))}function E(e){switch(e){case h.FAIRPLAY:return f.FAIRPLAY;case h.PLAYREADY:return f.PLAYREADY;case h.WIDEVINE:return f.WIDEVINE;case h.CLEARKEY:return f.CLEARKEY}}function k(e){switch(e){case f.FAIRPLAY:return h.FAIRPLAY;case f.PLAYREADY:return h.PLAYREADY;case f.WIDEVINE:return h.WIDEVINE;case f.CLEARKEY:return h.CLEARKEY}}function T(e){var t=e.drmSystems,n=e.widevineLicenseUrl,r=t?[f.FAIRPLAY,f.WIDEVINE,f.PLAYREADY,f.CLEARKEY].filter((function(e){return!!t[e]})):[];return!r[f.WIDEVINE]&&n&&r.push(f.WIDEVINE),r}!function(e){e.CLEARKEY="org.w3.clearkey",e.FAIRPLAY="com.apple.fps",e.PLAYREADY="com.microsoft.playready",e.WIDEVINE="com.widevine.alpha"}(f||(f={})),function(e){e.CLEARKEY="org.w3.clearkey",e.FAIRPLAY="com.apple.streamingkeydelivery",e.PLAYREADY="com.microsoft.playready",e.WIDEVINE="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"}(h||(h={})),function(e){e.WIDEVINE="edef8ba979d64acea3c827dcd51d21ed"}(g||(g={}));var A="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null,w=n(63),S={},C=function(){function e(e,t,n,r,i){void 0===r&&(r=[1]),void 0===i&&(i=null),this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=!!e&&"NONE"!==e,this.isCommonEncryption=this.encrypted&&"AES-128"!==e}e.clearKeyUriToKeyIdMap=function(){S={}};var t=e.prototype;return t.isSupported=function(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;switch(this.keyFormat){case"identity":return"SAMPLE-AES"===this.method;case h.FAIRPLAY:case h.WIDEVINE:case h.PLAYREADY:case h.CLEARKEY:return-1!==["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)}}return!1},t.getDecryptData=function(t){if(!this.encrypted||!this.uri)return null;if("AES-128"===this.method&&this.uri&&!this.iv){"number"!=typeof t&&("AES-128"!==this.method||this.iv||l.logger.warn('missing IV for initialization segment with method="'+this.method+'" - compliance issue'),t=0);var n=function(e){for(var t=new Uint8Array(16),n=12;n<16;n++)t[n]=e>>8*(15-n)&255;return t}(t);return new e(this.method,this.uri,"identity",this.keyFormatVersions,n)}var r=function(e){var t,n,r=e.split(":"),i=null;if("data"===r[0]&&2===r.length){var a=r[1].split(";"),o=a[a.length-1].split(",");if(2===o.length){var s="base64"===o[0],l=o[1];s?(a.splice(-1,1),i=b(l)):(t=_(l).subarray(0,16),(n=new Uint8Array(16)).set(t,16-t.length),i=n)}}return i}(this.uri);if(r)switch(this.keyFormat){case h.WIDEVINE:this.pssh=r,r.length>=22&&(this.keyId=r.subarray(r.length-22,r.length-6));break;case h.PLAYREADY:var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=(0,w.mp4pssh)(i,null,r);var a=new Uint16Array(r.buffer,r.byteOffset,r.byteLength/2),o=String.fromCharCode.apply(null,Array.from(a)),s=o.substring(o.indexOf("<"),o.length),u=(new DOMParser).parseFromString(s,"text/xml").getElementsByTagName("KID")[0];if(u){var c=u.childNodes[0]?u.childNodes[0].nodeValue:u.getAttribute("VALUE");if(c){var p=b(c).subarray(0,16);!function(e){var t=function(e,t,n){var r=e[t];e[t]=e[n],e[n]=r};t(e,0,3),t(e,1,2),t(e,4,5),t(e,6,7)}(p),this.keyId=p}}break;default:var d=r.subarray(0,16);if(16!==d.length){var f=new Uint8Array(16);f.set(d,16-d.length),d=f}this.keyId=d}if(!this.keyId||16!==this.keyId.byteLength){var g=S[this.uri];if(!g){var y=Object.keys(S).length%Number.MAX_SAFE_INTEGER;g=new Uint8Array(16),new DataView(g.buffer,12,4).setUint32(0,y),S[this.uri]=g}this.keyId=g}return this},e}(),x={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,av01:!0,drac:!0,dva1:!0,dvav:!0,dvh1:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0},text:{stpp:!0,wvtt:!0}};function I(e,t){return MediaSource.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"')}function P(){return(P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var D=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-SESSION-DATA:([^\r\n]*)[\r\n]+|#EXT-X-SESSION-KEY:([^\n\r]*)[\r\n]+/g,R=/#EXT-X-MEDIA:(.*)/g,O=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),L=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|")),M=function(){function e(){}return e.findGroup=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r.id===t)return r}},e.convertAVC1ToAVCOTI=function(e){var t=e.split(".");if(t.length>2){var n=t.shift()+".";return(n+=parseInt(t.shift()).toString(16))+("000"+parseInt(t.shift()).toString(16)).slice(-4)}return e},e.resolve=function(e,t){return(0,i.buildAbsoluteURL)(t,e,{alwaysNormalize:!0})},e.parseMasterPlaylist=function(t,n){var r,i=[],a=[],o={},s=[],u=!1;for(D.lastIndex=0;null!=(r=D.exec(t));)if(r[1]){var c,d=new p(r[1]),f={attrs:d,bitrate:d.decimalInteger("AVERAGE-BANDWIDTH")||d.decimalInteger("BANDWIDTH"),name:d.NAME,url:e.resolve(r[2],n)},h=d.decimalResolution("RESOLUTION");h&&(f.width=h.width,f.height=h.height),U((d.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),f),f.videoCodec&&-1!==f.videoCodec.indexOf("avc1")&&(f.videoCodec=e.convertAVC1ToAVCOTI(f.videoCodec)),null!==(c=f.unknownCodecs)&&void 0!==c&&c.length||a.push(f),i.push(f)}else if(r[3]){var g=new p(r[3]);g["DATA-ID"]&&(u=!0,o[g["DATA-ID"]]=g)}else if(r[4]){var y=r[4],v=N(y,n);v.encrypted&&v.isSupported()?s.push(v):l.logger.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+y+'"')}return{levels:a.length>0&&a.length<i.length?a:i,sessionData:u?o:null,sessionKeys:s.length?s:null}},e.parseMasterPlaylistMedia=function(t,n,r,i){var a;void 0===i&&(i=[]);var o=[],s=0;for(R.lastIndex=0;null!==(a=R.exec(t));){var l=new p(a[1]);if(l.TYPE===r){var u={attrs:l,bitrate:0,id:s++,groupId:l["GROUP-ID"],instreamId:l["INSTREAM-ID"],name:l.NAME||l.LANGUAGE||"",type:r,default:l.bool("DEFAULT"),autoselect:l.bool("AUTOSELECT"),forced:l.bool("FORCED"),lang:l.LANGUAGE,url:l.URI?e.resolve(l.URI,n):""};if(i.length){var c=e.findGroup(i,u.groupId)||i[0];F(u,c,"audioCodec"),F(u,c,"textCodec")}o.push(u)}}return o},e.parseLevelPlaylist=function(e,t,n,r,i){var o,s,u,c=new m(t),d=c.fragments,f=null,h=0,g=0,b=0,_=0,E=null,k=new v.Fragment(r,t),T=-1,A=!1;for(O.lastIndex=0,c.m3u8=e;null!==(o=O.exec(e));){A&&(A=!1,(k=new v.Fragment(r,t)).start=b,k.sn=h,k.cc=_,k.level=n,f&&(k.initSegment=f,k.rawProgramDateTime=f.rawProgramDateTime,f.rawProgramDateTime=null));var w=o[1];if(w){k.duration=parseFloat(w);var S=(" "+o[2]).slice(1);k.title=S||null,k.tagList.push(S?["INF",w,S]:["INF",w])}else if(o[3])(0,a.isFiniteNumber)(k.duration)&&(k.start=b,u&&V(k,u,c),k.sn=h,k.level=n,k.cc=_,k.urlId=i,d.push(k),k.relurl=(" "+o[3]).slice(1),j(k,E),E=k,b+=k.duration,h++,g=0,A=!0);else if(o[4]){var C=(" "+o[4]).slice(1);E?k.setByteRange(C,E):k.setByteRange(C)}else if(o[5])k.rawProgramDateTime=(" "+o[5]).slice(1),k.tagList.push(["PROGRAM-DATE-TIME",k.rawProgramDateTime]),-1===T&&(T=d.length);else{if(!(o=o[0].match(L))){l.logger.warn("No matches on slow regex match for level playlist!");continue}for(s=1;s<o.length&&void 0===o[s];s++);var x=(" "+o[s]).slice(1),I=(" "+o[s+1]).slice(1),D=o[s+2]?(" "+o[s+2]).slice(1):"";switch(x){case"PLAYLIST-TYPE":c.type=I.toUpperCase();break;case"MEDIA-SEQUENCE":h=c.startSN=parseInt(I);break;case"SKIP":var R=new p(I),M=R.decimalInteger("SKIPPED-SEGMENTS");if((0,a.isFiniteNumber)(M)){c.skippedSegments=M;for(var U=M;U--;)d.unshift(null);h+=M}var F=R.enumeratedString("RECENTLY-REMOVED-DATERANGES");F&&(c.recentlyRemovedDateranges=F.split("\t"));break;case"TARGETDURATION":c.targetduration=parseFloat(I);break;case"VERSION":c.version=parseInt(I);break;case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"#":(I||D)&&k.tagList.push(D?[I,D]:[I]);break;case"DISCONTINUITY":_++,k.tagList.push(["DIS"]);break;case"GAP":k.tagList.push([x]);break;case"BITRATE":k.tagList.push([x,I]);break;case"DATERANGE":var H=new p(I),K=new y(H,c.dateRanges[H.ID]);K.isValid||c.skippedSegments?c.dateRanges[K.id]=K:l.logger.warn('Ignoring invalid DATERANGE tag: "'+I+'"'),k.tagList.push(["EXT-X-DATERANGE",I]);break;case"DISCONTINUITY-SEQUENCE":_=parseInt(I);break;case"KEY":var G=N(I,t);if(G.isSupported()){if("NONE"===G.method){u=void 0;break}u||(u={}),u[G.keyFormat]&&(u=P({},u)),u[G.keyFormat]=G}else l.logger.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+I+'"');break;case"START":var z=new p(I).decimalFloatingPoint("TIME-OFFSET");(0,a.isFiniteNumber)(z)&&(c.startTimeOffset=z);break;case"MAP":var W=new p(I);if(k.duration){var Y=new v.Fragment(r,t);B(Y,W,n,u),f=Y,k.initSegment=f,f.rawProgramDateTime&&!k.rawProgramDateTime&&(k.rawProgramDateTime=f.rawProgramDateTime)}else B(k,W,n,u),f=k,A=!0;break;case"SERVER-CONTROL":var q=new p(I);c.canBlockReload=q.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=q.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&q.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=q.optionalFloat("PART-HOLD-BACK",0),c.holdBack=q.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var X=new p(I);c.partTarget=X.decimalFloatingPoint("PART-TARGET");break;case"PART":var $=c.partList;$||($=c.partList=[]);var Q=g>0?$[$.length-1]:void 0,Z=g++,J=new v.Part(new p(I),k,t,Z,Q);$.push(J),k.duration+=J.duration;break;case"PRELOAD-HINT":var ee=new p(I);c.preloadHint=ee;break;case"RENDITION-REPORT":var te=new p(I);c.renditionReports=c.renditionReports||[],c.renditionReports.push(te);break;default:l.logger.warn("line parsed but not handled: "+o)}}}E&&!E.relurl?(d.pop(),b-=E.duration,c.partList&&(c.fragmentHint=E)):c.partList&&(j(k,E),k.cc=_,c.fragmentHint=k,u&&V(k,u,c));var ne=d.length,re=d[0],ie=d[ne-1];if((b+=c.skippedSegments*c.targetduration)>0&&ne&&ie){c.averagetargetduration=b/ne;var ae=ie.sn;c.endSN="initSegment"!==ae?ae:0,c.live||(ie.endList=!0),re&&(c.startCC=re.cc)}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(b+=c.fragmentHint.duration),c.totalduration=b,c.endCC=_,T>0&&function(e,t){for(var n=e[t],r=t;r--;){var i=e[r];if(!i)return;i.programDateTime=n.programDateTime-1e3*i.duration,n=i}}(d,T),c},e}();function N(e,t){var n,r,i=new p(e),a=null!=(n=i.enumeratedString("METHOD"))?n:"",o=i.URI,s=i.hexadecimalInteger("IV"),u=i.enumeratedString("KEYFORMATVERSIONS"),c=null!=(r=i.enumeratedString("KEYFORMAT"))?r:"identity";o&&i.IV&&!s&&l.logger.error("Invalid IV: "+i.IV);var d=o?M.resolve(o,t):"",f=(u||"1").split("/").map(Number).filter(Number.isFinite);return new C(a,d,c,f,s)}function U(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return function(e,t){var n=x[t];return!!n&&!0===n[e.slice(0,4)]}(e,n)}));if(r.length){var i=r.filter((function(e){return 0===e.lastIndexOf("avc1",0)||0===e.lastIndexOf("mp4a",0)}));t[n+"Codec"]=i.length>0?i[0]:r[0],e=e.filter((function(e){return-1===r.indexOf(e)}))}})),t.unknownCodecs=e}function F(e,t,n){var r=t[n];r&&(e[n]=r)}function j(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),(0,a.isFiniteNumber)(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function B(e,t,n,r){e.relurl=t.URI,t.BYTERANGE&&e.setByteRange(t.BYTERANGE),e.level=n,e.sn="initSegment",r&&(e.levelkeys=r),e.initSegment=null}function V(e,t,n){e.levelkeys=t;var r=n.encryptedFragments;r.length&&r[r.length-1].levelkeys===t||!Object.keys(t).some((function(e){return t[e].isCommonEncryption}))||r.push(e)}var H=n(308);function K(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}const G=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.hls=e,this.registerListeners()}var t=e.prototype;return t.startLoad=function(e){},t.stopLoad=function(){this.destroyInternalLoaders()},t.registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(o.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(o.Events.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(o.Events.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.createInternalLoader=function(e){var t=this.hls.config,n=t.pLoader,r=t.loader,i=new(n||r)(t);return e.loader=i,this.loaders[e.type]=i,i},t.getInternalLoader=function(e){return this.loaders[e.type]},t.resetInternalLoader=function(e){this.loaders[e]&&delete this.loaders[e]},t.destroyInternalLoaders=function(){for(var e in this.loaders){var t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}},t.destroy=function(){this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.load({id:null,groupId:null,level:0,responseType:"text",type:H.PlaylistContextType.MANIFEST,url:n,deliveryDirectives:null})},t.onLevelLoading=function(e,t){var n=t.id,r=t.level,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:null,level:r,responseType:"text",type:H.PlaylistContextType.LEVEL,url:i,deliveryDirectives:a})},t.onAudioTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:H.PlaylistContextType.AUDIO_TRACK,url:i,deliveryDirectives:a})},t.onSubtitleTrackLoading=function(e,t){var n=t.id,r=t.groupId,i=t.url,a=t.deliveryDirectives;this.load({id:n,groupId:r,level:null,responseType:"text",type:H.PlaylistContextType.SUBTITLE_TRACK,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i,a,o,s=this.hls.config,u=this.getInternalLoader(e);if(u){var c=u.context;if(c&&c.url===e.url)return void l.logger.trace("[playlist-loader]: playlist request ongoing");l.logger.log("[playlist-loader]: aborting previous loader for type: "+e.type),u.abort()}switch(e.type){case H.PlaylistContextType.MANIFEST:n=s.manifestLoadingMaxRetry,r=s.manifestLoadingTimeOut,i=s.manifestLoadingRetryDelay,a=s.manifestLoadingMaxRetryTimeout;break;case H.PlaylistContextType.LEVEL:case H.PlaylistContextType.AUDIO_TRACK:case H.PlaylistContextType.SUBTITLE_TRACK:n=0,r=s.levelLoadingTimeOut;break;default:n=s.levelLoadingMaxRetry,r=s.levelLoadingTimeOut,i=s.levelLoadingRetryDelay,a=s.levelLoadingMaxRetryTimeout}if(u=this.createInternalLoader(e),null!==(t=e.deliveryDirectives)&&void 0!==t&&t.part&&(e.type===H.PlaylistContextType.LEVEL&&null!==e.level?o=this.hls.levels[e.level].details:e.type===H.PlaylistContextType.AUDIO_TRACK&&null!==e.id?o=this.hls.audioTracks[e.id].details:e.type===H.PlaylistContextType.SUBTITLE_TRACK&&null!==e.id&&(o=this.hls.subtitleTracks[e.id].details),o)){var p=o.partTarget,d=o.targetduration;p&&d&&(r=Math.min(1e3*Math.max(3*p,.8*d),r))}var f={timeout:r,maxRetry:n,retryDelay:i,maxRetryDelay:a,highWaterMark:0},h={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};u.load(e,f,h)},t.loadsuccess=function(e,t,n,r){void 0===r&&(r=null),this.resetInternalLoader(n.type);var i=e.data;0===i.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),i.indexOf("#EXTINF:")>0||i.indexOf("#EXT-X-TARGETDURATION:")>0?this.handleTrackOrLevelPlaylist(e,t,n,r):this.handleMasterPlaylist(e,t,n,r)):this.handleManifestParsingError(e,n,"no EXTM3U delimiter",r)},t.loaderror=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!1,e)},t.loadtimeout=function(e,t,n){void 0===n&&(n=null),this.handleNetworkError(t,n,!0)},t.handleMasterPlaylist=function(e,t,n,r){var i=this.hls,a=e.data,s=K(e,n),u=M.parseMasterPlaylist(a,s),c=u.levels,d=u.sessionData,f=u.sessionKeys;if(c.length){var h=c.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),g=c.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),y=M.parseMasterPlaylistMedia(a,s,"AUDIO",h),v=M.parseMasterPlaylistMedia(a,s,"SUBTITLES",g),m=M.parseMasterPlaylistMedia(a,s,"CLOSED-CAPTIONS");y.length&&(y.some((function(e){return!e.url}))||!c[0].audioCodec||c[0].attrs.AUDIO||(l.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),y.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new p({}),bitrate:0,url:""}))),i.trigger(o.Events.MANIFEST_LOADED,{levels:c,audioTracks:y,subtitles:v,captions:m,url:s,stats:t,networkDetails:r,sessionData:d,sessionKeys:f})}else this.handleManifestParsingError(e,n,"no level found in manifest",r)},t.handleTrackOrLevelPlaylist=function(e,t,n,r){var i=this.hls,l=n.id,u=n.level,c=n.type,d=K(e,n),f=(0,a.isFiniteNumber)(l)?l:0,h=(0,a.isFiniteNumber)(u)?u:f,g=function(e){switch(e.type){case H.PlaylistContextType.AUDIO_TRACK:return H.PlaylistLevelType.AUDIO;case H.PlaylistContextType.SUBTITLE_TRACK:return H.PlaylistLevelType.SUBTITLE;default:return H.PlaylistLevelType.MAIN}}(n),y=M.parseLevelPlaylist(e.data,d,h,g,f);if(y.fragments.length){if(c===H.PlaylistContextType.MANIFEST){var v={attrs:new p({}),bitrate:0,details:y,name:"",url:d};i.trigger(o.Events.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:d,stats:t,networkDetails:r,sessionData:null,sessionKeys:null})}t.parsing.end=performance.now(),n.levelDetails=y,this.handlePlaylistLoaded(e,t,n,r)}else i.trigger(o.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:d,reason:"no fragments found in level",level:"number"==typeof n.level?n.level:void 0})},t.handleManifestParsingError=function(e,t,n,r){this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:t.type===H.PlaylistContextType.MANIFEST,url:e.url,reason:n,response:e,context:t,networkDetails:r})},t.handleNetworkError=function(e,t,n,r){void 0===n&&(n=!1),l.logger.warn("[playlist-loader]: A network "+(n?"timeout":"error")+" occurred while loading "+e.type+" level: "+e.level+" id: "+e.id+' group-id: "'+e.groupId+'"');var i=s.ErrorDetails.UNKNOWN,a=!1,u=this.getInternalLoader(e);switch(e.type){case H.PlaylistContextType.MANIFEST:i=n?s.ErrorDetails.MANIFEST_LOAD_TIMEOUT:s.ErrorDetails.MANIFEST_LOAD_ERROR,a=!0;break;case H.PlaylistContextType.LEVEL:i=n?s.ErrorDetails.LEVEL_LOAD_TIMEOUT:s.ErrorDetails.LEVEL_LOAD_ERROR,a=!1;break;case H.PlaylistContextType.AUDIO_TRACK:i=n?s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,a=!1;break;case H.PlaylistContextType.SUBTITLE_TRACK:i=n?s.ErrorDetails.SUBTITLE_TRACK_LOAD_TIMEOUT:s.ErrorDetails.SUBTITLE_LOAD_ERROR,a=!1}u&&this.resetInternalLoader(e.type);var c={type:s.ErrorTypes.NETWORK_ERROR,details:i,fatal:a,url:e.url,loader:u,context:e,networkDetails:t};r&&(c.response=r),this.hls.trigger(o.Events.ERROR,c)},t.handlePlaylistLoaded=function(e,t,n,r){var i=n.type,a=n.level,s=n.id,l=n.groupId,u=n.loader,c=n.levelDetails,p=n.deliveryDirectives;if(null!=c&&c.targetduration){if(u)switch(c.live&&(u.getCacheAge&&(c.ageHeader=u.getCacheAge()||0),u.getCacheAge&&!isNaN(c.ageHeader)||(c.ageHeader=0)),i){case H.PlaylistContextType.MANIFEST:case H.PlaylistContextType.LEVEL:this.hls.trigger(o.Events.LEVEL_LOADED,{details:c,level:a||0,id:s||0,stats:t,networkDetails:r,deliveryDirectives:p});break;case H.PlaylistContextType.AUDIO_TRACK:this.hls.trigger(o.Events.AUDIO_TRACK_LOADED,{details:c,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:p});break;case H.PlaylistContextType.SUBTITLE_TRACK:this.hls.trigger(o.Events.SUBTITLE_TRACK_LOADED,{details:c,id:s||0,groupId:l||"",stats:t,networkDetails:r,deliveryDirectives:p})}}else this.handleManifestParsingError(e,n,"invalid target duration",r)},e}();function z(e,t){var n;try{n=new Event("addtrack")}catch(e){(n=document.createEvent("Event")).initEvent("addtrack",!1,!1)}n.track=e,t.dispatchEvent(n)}function W(e,t){var n=e.mode;if("disabled"===n&&(e.mode="hidden"),e.cues&&!e.cues.getCueById(t.id))try{if(e.addCue(t),!e.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(n){l.logger.debug("[texttrack-utils]: "+n);var r=new self.TextTrackCue(t.startTime,t.endTime,t.text);r.id=t.id,e.addCue(r)}"disabled"===n&&(e.mode=n)}function Y(e){var t=e.mode;if("disabled"===t&&(e.mode="hidden"),e.cues)for(var n=e.cues.length;n--;)e.removeCue(e.cues[n]);"disabled"===t&&(e.mode=t)}function q(e,t,n,r){var i=e.mode;if("disabled"===i&&(e.mode="hidden"),e.cues&&e.cues.length>0)for(var a=function(e,t,n){var r=[],i=function(e,t){if(t<e[0].startTime)return 0;var n=e.length-1;if(t>e[n].endTime)return-1;for(var r=0,i=n;r<=i;){var a=Math.floor((i+r)/2);if(t<e[a].startTime)i=a-1;else{if(!(t>e[a].startTime&&r<n))return a;r=a+1}}return e[r].startTime-t<t-e[i].startTime?r:i}(e,t);if(i>-1)for(var a=i,o=e.length;a<o;a++){var s=e[a];if(s.startTime>=t&&s.endTime<=n)r.push(s);else if(s.startTime>n)return r}return r}(e.cues,t,n),o=0;o<a.length;o++)r&&!r(a[o])||e.removeCue(a[o]);"disabled"===i&&(e.mode=i)}var X=n(181),$=n(856);function Q(){return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var Z=function(){var e=Q();try{new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function J(e,t){return e.getTime()/1e3-t}const ee=function(){function e(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}var t=e.prototype;return t.destroy=function(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null},t._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},t._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this)},t.onMediaAttached=function(e,t){this.media=t.media},t.onMediaDetaching=function(){this.id3Track&&(Y(this.id3Track),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={})},t.onManifestLoading=function(){this.dateRangeCuesAppended={}},t.createTrack=function(e){var t=this.getID3Track(e.textTracks);return t.mode="hidden",t},t.getID3Track=function(e){if(this.media){for(var t=0;t<e.length;t++){var n=e[t];if("metadata"===n.kind&&"id3"===n.label)return z(n,this.media),n}return this.media.addTextTrack("metadata","id3")}},t.onFragParsingMetadata=function(e,t){if(this.media){var n=this.hls.config,r=n.enableEmsgMetadataCues,i=n.enableID3MetadataCues;if(r||i){var a=t.samples;this.id3Track||(this.id3Track=this.createTrack(this.media));for(var o=Q(),s=0;s<a.length;s++){var l=a[s].type;if((l!==$.MetadataSchema.emsg||r)&&i){var u=X.getID3Frames(a[s].data);if(u){var c=a[s].pts,p=c+a[s].duration;p>Z&&(p=Z),p-c<=0&&(p=c+.25);for(var d=0;d<u.length;d++){var f=u[d];if(!X.isTimeStampFrame(f)){this.updateId3CueEnds(c);var h=new o(c,p,"");h.value=f,l&&(h.type=l),this.id3Track.addCue(h)}}}}}}}},t.updateId3CueEnds=function(e){var t,n=null===(t=this.id3Track)||void 0===t?void 0:t.cues;if(n)for(var r=n.length;r--;){var i=n[r];i.startTime<e&&i.endTime===Z&&(i.endTime=e)}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,i=t.type,a=this.id3Track,o=this.hls;if(o){var s=o.config,l=s.enableEmsgMetadataCues,u=s.enableID3MetadataCues;a&&(l||u)&&q(a,n,r,"audio"===i?function(e){return e.type===$.MetadataSchema.audioId3&&u}:"video"===i?function(e){return e.type===$.MetadataSchema.emsg&&l}:function(e){return e.type===$.MetadataSchema.audioId3&&u||e.type===$.MetadataSchema.emsg&&l})}},t.onLevelUpdated=function(e,t){var n=this,i=t.details;if(this.media&&i.hasProgramDateTime&&this.hls.config.enableDateRangeMetadataCues){var o=this.dateRangeCuesAppended,s=this.id3Track,l=i.dateRanges,u=Object.keys(l);if(s)for(var c=Object.keys(o).filter((function(e){return!u.includes(e)})),p=function(e){var t=c[e];Object.keys(o[t].cues).forEach((function(e){s.removeCue(o[t].cues[e])})),delete o[t]},d=c.length;d--;)p(d);var f=i.fragments[i.fragments.length-1];if(0!==u.length&&(0,a.isFiniteNumber)(null==f?void 0:f.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var h=f.programDateTime/1e3-f.start,g=Q(),y=function(e){var t=u[e],i=l[t],a=o[t],s=(null==a?void 0:a.cues)||{},c=(null==a?void 0:a.durationKnown)||!1,p=J(i.startDate,h),d=Z,f=i.endDate;if(f)d=J(f,h),c=!0;else if(i.endOnNext&&!c){var y=u.reduce((function(e,t){var n=l[t];return n.class===i.class&&n.id!==t&&n.startDate>i.startDate&&e.push(n),e}),[]).sort((function(e,t){return e.startDate.getTime()-t.startDate.getTime()}))[0];y&&(d=J(y.startDate,h),c=!0)}for(var v,m=Object.keys(i.attr),b=0;b<m.length;b++){var _=m[b];if(_!==r.ID&&_!==r.CLASS&&_!==r.START_DATE&&_!==r.DURATION&&_!==r.END_DATE&&_!==r.END_ON_NEXT){var E=s[_];if(E)c&&!a.durationKnown&&(E.endTime=d);else{var k=i.attr[_];E=new g(p,d,""),_!==r.SCTE35_OUT&&_!==r.SCTE35_IN||(v=k,k=Uint8Array.from(v.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer),E.value={key:_,data:k},E.type=$.MetadataSchema.dateRange,n.id3Track.addCue(E),s[_]=E}}}o[t]={cues:s,dateRange:i,durationKnown:c}},v=0;v<u.length;v++)y(v)}}},e}();var te,ne=function(){function e(e){var t=this;this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=function(){return t.timeupdate()},this.hls=e,this.config=e.config,this.registerListeners()}var t,n,r=e.prototype;return r.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},r.registerListeners=function(){this.hls.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(o.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){this.hls.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached),this.hls.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching),this.hls.off(o.Events.MANIFEST_LOADING,this.onManifestLoading),this.hls.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated),this.hls.off(o.Events.ERROR,this.onError)},r.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},r.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},r.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},r.onLevelUpdated=function(e,t){var n=t.details;this.levelDetails=n,n.advanced&&this.timeupdate(),!n.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)},r.onError=function(e,t){t.details===s.ErrorDetails.BUFFER_STALLED_ERROR&&(this.stallCount++,l.logger.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},r.timeupdate=function(){var e=this.media,t=this.levelDetails;if(e&&t){this.currentTime=e.currentTime;var n=this.computeLatency();if(null!==n){this._latency=n;var r=this.config,i=r.lowLatencyMode,a=r.maxLiveSyncPlaybackRate;if(i&&1!==a){var o=this.targetLatency;if(null!==o){var s=n-o,l=s<Math.min(this.maxLatency,o+t.targetduration);if(t.live&&l&&s>.05&&this.forwardBufferLength>1){var u=Math.min(2,Math.max(1,a)),c=Math.round(2/(1+Math.exp(-.75*s-this.edgeStalled))*20)/20;e.playbackRate=Math.min(u,Math.max(1,c))}else 1!==e.playbackRate&&0!==e.playbackRate&&(e.playbackRate=1)}}}}},r.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},r.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},t=e,(n=[{key:"latency",get:function(){return this._latency||0}},{key:"maxLatency",get:function(){var e=this.config,t=this.levelDetails;return void 0!==e.liveMaxLatencyDuration?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}},{key:"targetLatency",get:function(){var e=this.levelDetails;if(null===e)return null;var t=e.holdBack,n=e.partHoldBack,r=e.targetduration,i=this.config,a=i.liveSyncDuration,o=i.liveSyncDurationCount,s=i.lowLatencyMode,l=this.hls.userConfig,u=s&&n||t;(l.liveSyncDuration||l.liveSyncDurationCount||0===u)&&(u=void 0!==a?a:o*r);var c=r;return u+Math.min(1*this.stallCount,c)}},{key:"liveSyncPosition",get:function(){var e=this.estimateLiveEdge(),t=this.targetLatency,n=this.levelDetails;if(null===e||null===t||null===n)return null;var r=n.edge,i=e-t-this.edgeStalled,a=r-n.totalduration,o=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(a,i),o)}},{key:"drift",get:function(){var e=this.levelDetails;return null===e?1:e.drift}},{key:"edgeStalled",get:function(){var e=this.levelDetails;if(null===e)return 0;var t=3*(this.config.lowLatencyMode&&e.partTarget||e.targetduration);return Math.max(e.age-t,0)}},{key:"forwardBufferLength",get:function(){var e=this.media,t=this.levelDetails;if(!e||!t)return 0;var n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),re=["NONE","TYPE-0","TYPE-1","TYPE-2",null];!function(e){e.No="",e.Yes="YES",e.v2="v2"}(te||(te={}));var ie=function(){function e(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}return e.prototype.addDirectives=function(e){var t=new self.URL(e);return void 0!==this.msn&&t.searchParams.set("_HLS_msn",this.msn.toString()),void 0!==this.part&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href},e}(),ae=function(){function e(e){this.attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.unknownCodecs=void 0,this.audioGroupIds=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.textGroupIds=void 0,this.url=void 0,this._urlId=0,this.url=[e.url],this.attrs=e.attrs,this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.unknownCodecs=e.unknownCodecs,this.codecSet=[e.videoCodec,e.audioCodec].filter((function(e){return e})).join(",").replace(/\.[^.,]+/g,"")}var t,n;return t=e,(n=[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"uri",get:function(){return this.url[this._urlId]||""}},{key:"urlId",get:function(){return this._urlId},set:function(e){var t=e%this.url.length;this._urlId!==t&&(this.details=void 0,this._urlId=t)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function oe(){return(oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function se(e,t,n){switch(t){case"audio":e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds.push(n);break;case"text":e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds.push(n)}}function le(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}function ue(e,t){var n=t.startPTS;if((0,a.isFiniteNumber)(n)){var r,i=0;t.sn>e.sn?(i=n-e.start,r=e):(i=e.start-n,r=t),r.duration!==i&&(r.duration=i)}else t.sn>e.sn?e.cc===t.cc&&e.minEndPTS?t.start=e.start+(e.minEndPTS-e.start):t.start=e.start+e.duration:t.start=Math.max(e.start-t.duration,0)}function ce(e,t,n,r,i,o){r-n<=0&&(l.logger.warn("Fragment should have a positive duration",t),r=n+t.duration,o=i+t.duration);var s=n,u=r,c=t.startPTS,p=t.endPTS;if((0,a.isFiniteNumber)(c)){var d=Math.abs(c-n);(0,a.isFiniteNumber)(t.deltaPTS)?t.deltaPTS=Math.max(d,t.deltaPTS):t.deltaPTS=d,s=Math.max(n,c),n=Math.min(n,c),i=Math.min(i,t.startDTS),u=Math.min(r,p),r=Math.max(r,p),o=Math.max(o,t.endDTS)}t.duration=r-n;var f=n-t.start;t.start=t.startPTS=n,t.maxStartPTS=s,t.startDTS=i,t.endPTS=r,t.minEndPTS=u,t.endDTS=o;var h,g=t.sn;if(!e||g<e.startSN||g>e.endSN)return 0;var y=g-e.startSN,v=e.fragments;for(v[y]=t,h=y;h>0;h--)ue(v[h],v[h-1]);for(h=y;h<v.length-1;h++)ue(v[h],v[h+1]);return e.fragmentHint&&ue(v[v.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,f}function pe(e,t){var n=t.startSN+t.skippedSegments-e.startSN,r=e.fragments;n<0||n>=r.length||de(t,r[n].start)}function de(e,t){if(t){for(var n=e.fragments,r=e.skippedSegments;r<n.length;r++)n[r].start+=t;e.fragmentHint&&(e.fragmentHint.start+=t)}}var fe=function(){function e(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.retryCount=0,this.log=void 0,this.warn=void 0,this.log=l.logger.log.bind(l.logger,t+":"),this.warn=l.logger.warn.bind(l.logger,t+":"),this.hls=e}var t=e.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.onError=function(e,t){!t.fatal||t.type!==s.ErrorTypes.NETWORK_ERROR&&t.type!==s.ErrorTypes.KEY_SYSTEM_ERROR||this.stopLoad()},t.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},t.startLoad=function(){this.canLoad=!0,this.retryCount=0,this.requestScheduled=-1,this.loadPlaylist()},t.stopLoad=function(){this.canLoad=!1,this.clearTimer()},t.switchParams=function(e,t){var n=null==t?void 0:t.renditionReports;if(n)for(var r=0;r<n.length;r++){var i=n[r],a=void 0;try{a=new self.URL(i.URI,t.url).href}catch(e){l.logger.warn("Could not construct new URL for Rendition Report: "+e),a=i.URI||""}if(a===e.slice(-a.length)){var o=parseInt(i["LAST-MSN"])||(null==t?void 0:t.lastPartSn),s=parseInt(i["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){var u=Math.min(t.age-t.partTarget,t.targetduration);s>=0&&u>t.partTarget&&(s+=1)}return new ie(o,s>=0?s:void 0,te.No)}}},t.loadPlaylist=function(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())},t.shouldLoadTrack=function(e){return this.canLoad&&e&&!!e.url&&(!e.details||e.details.live)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,o=t.stats,s=self.performance.now(),u=o.loading.first?Math.max(0,s-o.loading.first):0;if(i.advancedDateTime=Date.now()-u,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:"MISSED")),n&&i.fragments.length>0&&function(e,t){for(var n=null,r=e.fragments,i=r.length-1;i>=0;i--){var o=r[i].initSegment;if(o){n=o;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var s,u,c,p,d,f=0;if(function(e,t,n){for(var r=t.skippedSegments,i=Math.max(e.startSN,t.startSN)-t.startSN,a=(e.fragmentHint?1:0)+(r?t.endSN:Math.min(e.endSN,t.endSN))-t.startSN,o=t.startSN-e.startSN,s=t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,u=i;u<=a;u++){var c=l[o+u],p=s[u];r&&!p&&u<r&&(p=t.fragments[u]=c),c&&p&&n(c,p)}}(e,t,(function(e,r){e.relurl&&(f=e.cc-r.cc),(0,a.isFiniteNumber)(e.startPTS)&&(0,a.isFiniteNumber)(e.endPTS)&&(r.start=r.startPTS=e.startPTS,r.startDTS=e.startDTS,r.appendedPTS=e.appendedPTS,r.maxStartPTS=e.maxStartPTS,r.endPTS=e.endPTS,r.endDTS=e.endDTS,r.minEndPTS=e.minEndPTS,r.duration=e.endPTS-e.startPTS,r.duration&&(s=r),t.PTSKnown=t.alignedSliding=!0),r.elementaryStreams=e.elementaryStreams,r.loader=e.loader,r.stats=e.stats,r.urlId=e.urlId,e.initSegment&&(r.initSegment=e.initSegment,n=e.initSegment)})),n&&(t.fragmentHint?t.fragments.concat(t.fragmentHint):t.fragments).forEach((function(e){var t;e.initSegment&&e.initSegment.relurl!==(null===(t=n)||void 0===t?void 0:t.relurl)||(e.initSegment=n)})),t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed){l.logger.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(var h=t.skippedSegments;h--;)t.fragments.shift();t.startSN=t.fragments[0].sn,t.startCC=t.fragments[0].cc}else t.canSkipDateRanges&&(t.dateRanges=(u=e.dateRanges,c=t.dateRanges,p=t.recentlyRemovedDateranges,d=oe({},u),p&&p.forEach((function(e){delete d[e]})),Object.keys(c).forEach((function(e){var t=new y(c[e].attr,d[e]);t.isValid?d[e]=t:l.logger.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(c[e].attr)+'"')})),d));var g=t.fragments;if(f){l.logger.warn("discontinuity sliding from playlist, take drift into account");for(var v=0;v<g.length;v++)g[v].cc+=f}t.skippedSegments&&(t.startCC=t.fragments[0].cc),function(e,t,n){if(e&&t)for(var r=0,i=0,a=e.length;i<=a;i++){var o=e[i],s=t[i+r];o&&s&&o.index===s.index&&o.fragment.sn===s.fragment.sn?(l=o,(u=s).elementaryStreams=l.elementaryStreams,u.stats=l.stats):r--}var l,u}(e.partList,t.partList),s?ce(t,s,s.startPTS,s.endPTS,s.startDTS,s.endDTS):pe(e,t),g.length&&(t.totalduration=t.edge-g[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;var m=t.advancedDateTime;if(t.advanced&&m){var b=t.edge;t.driftStart||(t.driftStartTime=m,t.driftStart=b),t.driftEndTime=m,t.driftEnd=b}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}(n,i),!this.canLoad||!i.live)return;var c,p=void 0,d=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var f=this.hls.config.lowLatencyMode,h=i.lastPartSn,g=i.endSN,v=i.lastPartIndex,m=h===g;-1!==v?(p=m?g+1:h,d=m?f?0:v:v+1):p=g+1;var b=i.age,_=b+i.ageHeader,E=Math.min(_-i.partTarget,1.5*i.targetduration);if(E>0){if(n&&E>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+E+" with playlist age: "+i.age),E=0;else{var k=Math.floor(E/i.targetduration);p+=k,void 0!==d&&(d+=Math.round(E%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+b.toFixed(2)+"s goal: "+E+" skip sn "+k+" to part "+d)}i.tuneInGoal=E}if(c=this.getDeliveryDirectives(i,t.deliveryDirectives,p,d),f||!m)return void this.loadPlaylist(c)}else c=this.getDeliveryDirectives(i,t.deliveryDirectives,p,d);var T=this.hls.mainForwardBufferInfo,A=T?T.end-T.len:0,w=function(e,t){void 0===t&&(t=1/0);var n=1e3*e.targetduration;if(e.updated){var r=e.fragments;if(r.length&&4*n>t){var i=1e3*r[r.length-1].duration;i<n&&(n=i)}}else n/=2;return Math.round(n)}(i,1e3*(i.edge-A));i.updated?s>this.requestScheduled+w&&(this.requestScheduled=o.loading.start):this.requestScheduled=-1,void 0!==p&&i.canBlockReload?this.requestScheduled=o.loading.first+w-(1e3*i.partTarget||1e3):this.requestScheduled=(-1===this.requestScheduled?s:this.requestScheduled)+w;var S=this.requestScheduled-s;S=Math.max(0,S),this.log("reload live playlist "+e+" in "+Math.round(S)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(c)}),S)}else this.clearTimer()},t.getDeliveryDirectives=function(e,t,n,r){var i=function(e,t){var n=e.canSkipUntil,r=e.canSkipDateRanges,i=e.endSN;return n&&(void 0!==t?t-i:0)<n?r?te.v2:te.Yes:te.No}(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=te.No),new ie(n,r,i)},t.retryLoadingOrFail=function(e){var t,n=this,r=this.hls.config,i=this.retryCount<r.levelLoadingMaxRetry;if(i)if(this.requestScheduled=-1,this.retryCount++,e.details.indexOf("LoadTimeOut")>-1&&null!==(t=e.context)&&void 0!==t&&t.deliveryDirectives)this.warn("retry playlist loading #"+this.retryCount+' after "'+e.details+'"'),this.loadPlaylist();else{var a=Math.min(Math.pow(2,this.retryCount)*r.levelLoadingRetryDelay,r.levelLoadingMaxRetryTimeout);this.timer=self.setTimeout((function(){return n.loadPlaylist()}),a),this.warn("retry playlist loading #"+this.retryCount+" in "+a+' ms after "'+e.details+'"')}else this.warn('cannot recover from error "'+e.details+'"'),this.clearTimer(),e.fatal=!0;return i},e}();function he(){return(he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ge(e,t){return(ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var ye,ve=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),me=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,"[level-controller]")||this)._levels=[],n._firstLevel=-1,n._startLevel=void 0,n.currentLevelIndex=-1,n.manualLevelIndex=-1,n.onParsedComplete=void 0,n._registerListeners(),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ge(t,n);var i,a,l=r.prototype;return l._registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.ERROR,this.onError,this)},l._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.ERROR,this.onError,this)},l.destroy=function(){this._unregisterListeners(),this.manualLevelIndex=-1,this._levels.length=0,e.prototype.destroy.call(this)},l.startLoad=function(){this._levels.forEach((function(e){e.loadError=0})),e.prototype.startLoad.call(this)},l.onManifestLoaded=function(e,t){var n,r,i=[],a=[],l=[],u={},c=!1,p=!1,d=!1;if(t.levels.forEach((function(e){var t=e.attrs;c=c||!(!e.width||!e.height),p=p||!!e.videoCodec,d=d||!!e.audioCodec,ve&&e.audioCodec&&-1!==e.audioCodec.indexOf("mp4a.40.34")&&(e.audioCodec=void 0);var n=e.bitrate+"-"+e.attrs.RESOLUTION+"-"+e.attrs.CODECS;(r=u[n])?r.url.push(e.url):(r=new ae(e),u[n]=r,i.push(r)),t&&(t.AUDIO&&se(r,"audio",t.AUDIO),t.SUBTITLES&&se(r,"text",t.SUBTITLES))})),(c||p)&&d&&(i=i.filter((function(e){var t=e.videoCodec,n=e.width,r=e.height;return!!t||!(!n||!r)}))),i=i.filter((function(e){var t=e.audioCodec,n=e.videoCodec;return(!t||I(t,"audio"))&&(!n||I(n,"video"))})),t.audioTracks&&le(a=t.audioTracks.filter((function(e){return!e.audioCodec||I(e.audioCodec,"audio")}))),t.subtitles&&le(l=t.subtitles),i.length>0){n=i[0].bitrate,i.sort((function(e,t){return e.attrs["HDCP-LEVEL"]!==t.attrs["HDCP-LEVEL"]?(e.attrs["HDCP-LEVEL"]||"")>(t.attrs["HDCP-LEVEL"]||"")?1:-1:e.bitrate!==t.bitrate?e.bitrate-t.bitrate:e.attrs.SCORE!==t.attrs.SCORE?e.attrs.decimalFloatingPoint("SCORE")-t.attrs.decimalFloatingPoint("SCORE"):c&&e.height!==t.height?e.height-t.height:0})),this._levels=i;for(var f=0;f<i.length;f++)if(i[f].bitrate===n){this._firstLevel=f,this.log("manifest loaded, "+i.length+" level(s) found, first bitrate: "+n);break}var h=d&&!p,g={levels:i,audioTracks:a,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:d,video:p,altAudio:!h&&a.some((function(e){return!!e.url}))};this.hls.trigger(o.Events.MANIFEST_PARSED,g),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,reason:"no level with compatible codecs found in manifest"})},l.onError=function(t,n){var r,i;if(e.prototype.onError.call(this,t,n),!n.fatal){var a=n.context,o=this._levels[this.currentLevelIndex];if(a&&(a.type===H.PlaylistContextType.AUDIO_TRACK&&o.audioGroupIds&&a.groupId===o.audioGroupIds[o.urlId]||a.type===H.PlaylistContextType.SUBTITLE_TRACK&&o.textGroupIds&&a.groupId===o.textGroupIds[o.urlId]))this.redundantFailover(this.currentLevelIndex);else{var l,u=!1,c=!0;switch(n.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:if(n.frag){var p=n.frag.type===H.PlaylistLevelType.MAIN?n.frag.level:this.currentLevelIndex,d=this._levels[p];d?(d.fragmentError++,d.fragmentError>this.hls.config.fragLoadingMaxRetry&&(l=p)):l=p}break;case s.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:var f=o.attrs["HDCP-LEVEL"];f&&(this.hls.maxHdcpLevel=re[re.indexOf(f)-1],this.warn('Restricting playback to HDCP-LEVEL of "'+this.hls.maxHdcpLevel+'" or lower'));case s.ErrorDetails.FRAG_PARSING_ERROR:case s.ErrorDetails.KEY_SYSTEM_NO_SESSION:l=(null===(r=n.frag)||void 0===r?void 0:r.type)===H.PlaylistLevelType.MAIN?n.frag.level:this.currentLevelIndex,n.levelRetry=!1;break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:a&&(a.deliveryDirectives&&(c=!1),l=a.level),u=!0;break;case s.ErrorDetails.REMUX_ALLOC_ERROR:l=null!=(i=n.level)?i:this.currentLevelIndex,u=!0}void 0!==l&&this.recoverLevel(n,l,u,c)}}},l.recoverLevel=function(e,t,n,r){var i=e.details,a=this._levels[t];if(a.loadError++,n){if(!this.retryLoadingOrFail(e))return void(this.currentLevelIndex=-1);e.levelRetry=!0}if(r){var o=a.url.length;if(o>1&&a.loadError<o)e.levelRetry=!0,this.redundantFailover(t);else if(-1===this.manualLevelIndex){for(var s=-1,l=this._levels,u=l.length;u--;){var c=(u+this.currentLevelIndex)%l.length;if(c!==this.currentLevelIndex&&0===l[c].loadError){s=c;break}}s>-1&&this.currentLevelIndex!==s?(this.warn(i+": switch to "+s),e.levelRetry=!0,this.hls.nextAutoLevel=s):!1===e.levelRetry&&(e.fatal=!0)}}},l.redundantFailover=function(e){var t=this._levels[e],n=t.url.length;if(n>1){var r=(t.urlId+1)%n;this.warn("Switching to redundant URL-id "+r),this._levels.forEach((function(e){e.urlId=r})),this.level=e}},l.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===H.PlaylistLevelType.MAIN){var r=this._levels[n.level];void 0!==r&&(r.fragmentError=0,r.loadError=0)}},l.onLevelLoaded=function(e,t){var n,r,i=t.level,a=t.details,o=this._levels[i];if(!o)return this.warn("Invalid level index "+i),void(null!==(r=t.deliveryDirectives)&&void 0!==r&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0,this.retryCount=0),this.playlistLoaded(i,t,o.details)):null!==(n=t.deliveryDirectives)&&void 0!==n&&n.skip&&(a.deltaUpdateFailed=!0)},l.onAudioTrackSwitched=function(e,t){var n=this.hls.levels[this.currentLevelIndex];if(n&&n.audioGroupIds){for(var r=-1,i=this.hls.audioTracks[t.id].groupId,a=0;a<n.audioGroupIds.length;a++)if(n.audioGroupIds[a]===i){r=a;break}r!==n.urlId&&(n.urlId=r,this.startLoad())}},l.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.currentLevelIndex,r=this._levels[n];if(this.canLoad&&r&&r.url.length>0){var i=r.urlId,a=r.url[i];if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Attempt loading level index "+n+(void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:"")+" with URL-id "+i+" "+a),this.clearTimer(),this.hls.trigger(o.Events.LEVEL_LOADING,{url:a,level:n,id:i,deliveryDirectives:t||null})}},l.removeLevel=function(e,t){var n=function(e,n){return n!==t},r=this._levels.filter((function(r,i){return i!==e||r.url.length>1&&void 0!==t&&(r.url=r.url.filter(n),r.audioGroupIds&&(r.audioGroupIds=r.audioGroupIds.filter(n)),r.textGroupIds&&(r.textGroupIds=r.textGroupIds.filter(n)),r.urlId=0,!0)})).map((function(e,t){var n=e.details;return null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t})),e}));this._levels=r,this.hls.trigger(o.Events.LEVELS_UPDATED,{levels:r})},i=r,(a=[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t,n=this._levels;if(0!==n.length&&(this.currentLevelIndex!==e||null===(t=n[e])||void 0===t||!t.details)){if(e<0||e>=n.length){var r=e<0;if(this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.LEVEL_SWITCH_ERROR,level:e,fatal:r,reason:"invalid level idx"}),r)return;e=Math.min(e,n.length-1)}this.clearTimer();var i=this.currentLevelIndex,a=n[i],l=n[e];this.log("switching to level "+e+" from "+i),this.currentLevelIndex=e;var u=he({},l,{level:e,maxBitrate:l.maxBitrate,uri:l.uri,urlId:l.urlId});delete u._urlId,this.hls.trigger(o.Events.LEVEL_SWITCHING,u);var c=l.details;if(!c||c.live){var p=this.switchParams(l.uri,null==a?void 0:a.details);this.loadPlaylist(p)}}}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(e){this.manualLevelIndex=e,void 0===this._startLevel&&(this._startLevel=e),-1!==e&&(this.level=e)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(e){this._firstLevel=e}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var e=this.hls.config.startLevel;return void 0!==e?e:this._firstLevel}return this._startLevel},set:function(e){this._startLevel=e}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(e){this.level=e,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(fe);!function(e){e.NOT_LOADED="NOT_LOADED",e.APPENDING="APPENDING",e.PARTIAL="PARTIAL",e.OK="OK"}(ye||(ye={}));var be=function(){function e(e){this.activeFragment=null,this.activeParts=null,this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(o.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(o.Events.BUFFER_APPENDED,this.onBufferAppended,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.endListFragments=this.timeRanges=this.activeFragment=this.activeParts=null},t.getAppendedFrag=function(e,t){if(t===H.PlaylistLevelType.MAIN){var n=this.activeFragment,r=this.activeParts;if(!n)return null;if(r)for(var i=r.length;i--;){var a=r[i],o=a?a.end:n.appendedPTS;if(a.start<=e&&void 0!==o&&e<=o)return i>9&&(this.activeParts=r.slice(i-9)),a}else if(n.start<=e&&void 0!==n.appendedPTS&&e<=n.appendedPTS)return n}return this.getBufferedFrag(e,t)},t.getBufferedFrag=function(e,t){for(var n=this.fragments,r=Object.keys(n),i=r.length;i--;){var a=n[r[i]];if((null==a?void 0:a.body.type)===t&&a.buffered){var o=a.body;if(o.start<=e&&e<=o.end)return o}}return null},t.detectEvictedFragments=function(e,t,n){var r=this;this.timeRanges&&(this.timeRanges[e]=t),Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a)if(a.buffered||a.loaded){var o=a.range[e];o&&o.time.some((function(e){var n=!r.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&r.removeFragment(a.body),n}))}else a.body.type===n&&r.removeFragment(a.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=Ee(r),o=this.fragments[a];o&&(Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var s=n[e],l=null!==i||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,l,s)}})),o.loaded=null,Object.keys(o.range).length?(o.buffered=!0,o.body.endList&&(this.endListFragments[o.body.type]=o)):this.removeFragment(o.body))}},t.fragBuffered=function(e){var t=Ee(e),n=this.fragments[t];n&&(n.loaded=null,n.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=t?t.start:e.start,o=t?t.end:e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,u=0;u<r.length;u++){var c=r.start(u)-this.bufferPadding,p=r.end(u)+this.bufferPadding;if(l>=c&&s<=p){i.time.push({startPTS:Math.max(a,r.start(u)),endPTS:Math.min(o,r.end(u))});break}if(a<p&&o>c)i.partial=!0,i.time.push({startPTS:Math.max(a,r.start(u)),endPTS:Math.min(o,r.end(u))});else if(o<=c)break}return i},t.getPartialFragment=function(e){var t,n,r,i=null,a=0,o=this.bufferPadding,s=this.fragments;return Object.keys(s).forEach((function(l){var u=s[l];u&&_e(u)&&(n=u.body.start-o,r=u.body.end+o,e>=n&&e<=r&&(t=Math.min(e-n,r-e),a<=t&&(i=u.body,a=t)))})),i},t.isEndListAppended=function(e){var t=this.endListFragments[e];return void 0!==t&&(t.buffered||_e(t))},t.getState=function(e){var t=Ee(e),n=this.fragments[t];return n?n.buffered?_e(n)?ye.PARTIAL:ye.OK:ye.APPENDING:ye.NOT_LOADED},t.isTimeBuffered=function(e,t,n){for(var r,i,a=0;a<n.length;a++){if(r=n.start(a)-this.bufferPadding,i=n.end(a)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if("initSegment"!==n.sn&&!n.bitrateTest&&!r){var i=Ee(n);this.fragments[i]={body:n,loaded:t,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,a=t.timeRanges;if(r.type===H.PlaylistLevelType.MAIN)if(this.activeFragment!==r&&(this.activeFragment=r,r.appendedPTS=void 0),i){var o=this.activeParts;o||(this.activeParts=o=[]),o.push(i)}else this.activeParts=null;this.timeRanges=a,Object.keys(a).forEach((function(e){var t=a[e];if(n.detectEvictedFragments(e,t),!i&&r.type===H.PlaylistLevelType.MAIN){var o=r.elementaryStreams[e];if(!o)return;for(var s=0;s<t.length;s++){var l=t.end(s);l<=o.endPTS&&l>o.startPTS?r.appendedPTS=Math.max(l,r.appendedPTS||0):r.appendedPTS=o.endPTS}}}))},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=Ee(e);return!!this.fragments[t]},t.removeFragmentsInRange=function(e,t,n){var r=this;Object.keys(this.fragments).forEach((function(i){var a=r.fragments[i];if(a&&a.buffered){var o=a.body;o.type===n&&o.start<t&&o.end>e&&r.removeFragment(o)}}))},t.removeFragment=function(e){var t=Ee(e);e.stats.loaded=0,e.clearElementaryStreamInfo(),e.appendedPTS=void 0,delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]},t.removeAllFragments=function(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activeFragment=null,this.activeParts=null},e}();function _e(e){var t,n;return e.buffered&&((null===(t=e.range.video)||void 0===t?void 0:t.partial)||(null===(n=e.range.audio)||void 0===n?void 0:n.partial))}function Ee(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}function ke(e){var t="function"==typeof Map?new Map:void 0;return(ke=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Te(e,arguments,Se(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),we(r,e)})(e)}function Te(e,t,n){return(Te=Ae()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&we(i,n.prototype),i}).apply(null,arguments)}function Ae(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function we(e,t){return(we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Se(e){return(Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ce=Math.pow(2,17),xe=function(){function e(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}var t=e.prototype;return t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t.abort=function(){this.loader&&this.loader.abort()},t.load=function(e,t){var n=this,r=e.url;if(!r)return Promise.reject(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,networkDetails:null},"Fragment does not have a "+(r?"part list":"url")));this.abort();var i=this.config,a=i.fLoader,o=i.loader;return new Promise((function(r,l){n.loader&&n.loader.destroy();var u=n.loader=e.loader=a?new a(i):new o(i),c=Ie(e),p={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:"initSegment"===e.sn?1/0:Ce};e.stats=u.stats,u.load(c,p,{onSuccess:function(t,i,a,o){n.resetLoader(e,u);var s=t.data;a.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(s.slice(0,16)),s=s.slice(16)),r({frag:e,part:null,payload:s,networkDetails:o})},onError:function(t,r,i){n.resetLoader(e,u),l(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:t,networkDetails:i}))},onAbort:function(t,r,i){n.resetLoader(e,u),l(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,networkDetails:i}))},onTimeout:function(t,r,i){n.resetLoader(e,u),l(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,networkDetails:i}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var r=this;this.abort();var i=this.config,a=i.fLoader,o=i.loader;return new Promise((function(l,u){r.loader&&r.loader.destroy();var c=r.loader=e.loader=a?new a(i):new o(i),p=Ie(e,t),d={timeout:i.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:i.fragLoadingMaxRetryTimeout,highWaterMark:Ce};t.stats=c.stats,c.load(p,d,{onSuccess:function(i,a,o,s){r.resetLoader(e,c),r.updateStatsFromPart(e,t);var u={frag:e,part:t,payload:i.data,networkDetails:s};n(u),l(u)},onError:function(n,i,a){r.resetLoader(e,c),u(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:n,networkDetails:a}))},onAbort:function(n,i,a){e.stats.aborted=t.stats.aborted,r.resetLoader(e,c),u(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,networkDetails:a}))},onTimeout:function(n,i,a){r.resetLoader(e,c),u(new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:s.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,networkDetails:a}))}})}))},t.updateStatsFromPart=function(e,t){var n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){var a=Math.round(e.duration/t.duration),o=Math.min(Math.round(n.loaded/i),a),s=(a-o)*Math.round(n.loaded/o);n.total=n.loaded+s}else n.total=Math.max(n.loaded,n.total);var l=n.loading,u=r.loading;l.start?l.first+=u.first-u.start:(l.start=u.start,l.first=u.first),l.end=u.end},t.resetLoader=function(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()},e}();function Ie(e,t){void 0===t&&(t=null);var n=t||e,r={frag:e,part:t,responseType:"arraybuffer",url:n.url,headers:{},rangeStart:0,rangeEnd:0},i=n.byteRangeStartOffset,o=n.byteRangeEndOffset;if((0,a.isFiniteNumber)(i)&&(0,a.isFiniteNumber)(o)){var s,l=i,u=o;if("initSegment"===e.sn&&"AES-128"===(null===(s=e.decryptdata)||void 0===s?void 0:s.method)){var c=o-i;c%16&&(u=o+(16-c%16)),0!==i&&(r.resetIV=!0,l=i-16)}r.rangeStart=l,r.rangeEnd=u}return r}var Pe=function(e){var t,n;function r(t){for(var n,r=arguments.length,i=new Array(r>1?r-1:0),a=1;a<r;a++)i[a-1]=arguments[a];return(n=e.call.apply(e,[this].concat(i))||this).data=void 0,n.data=t,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,we(t,n),r}(ke(Error)),De=function(){function e(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}var t=e.prototype;return t.abort=function(){for(var e in this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e].loader;t&&t.abort()}},t.detach=function(){for(var e in this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}},t.destroy=function(){for(var e in this.detach(),this.keyUriToKeyInfo){var t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}},t.createKeyLoadError=function(e,t,n,r){return void 0===t&&(t=s.ErrorDetails.KEY_LOAD_ERROR),new Pe({type:s.ErrorTypes.NETWORK_ERROR,details:t,fatal:!1,frag:e,networkDetails:n})},t.loadClear=function(e,t){var n=this;if(this.emeController&&this.config.emeEnabled)for(var r=e.sn,i=e.cc,a=function(e){var a=t[e];if(i<=a.cc&&("initSegment"===r||r<a.sn))return n.emeController.selectKeySystemFormat(a).then((function(e){a.setKeyFormat(e)})),"break"},o=0;o<t.length&&"break"!==a(o);o++);},t.load=function(e){var t=this;return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then((function(n){return t.loadInternal(e,n)})):this.loadInternal(e)},t.loadInternal=function(e,t){var n,r;t&&e.setKeyFormat(t);var i=e.decryptdata;if(!i){var a=t?"Expected frag.decryptdata to be defined after setting format "+t:"Missing decryption data on fragment in onKeyLoading";return Promise.reject(this.createKeyLoadError(e,s.ErrorDetails.KEY_LOAD_ERROR,null,a))}var o=i.uri;if(!o)return Promise.reject(this.createKeyLoadError(e,s.ErrorDetails.KEY_LOAD_ERROR,null,'Invalid key URI: "'+o+'"'));var l,u=this.keyUriToKeyInfo[o];if(null!==(n=u)&&void 0!==n&&n.decryptdata.key)return i.key=u.decryptdata.key,Promise.resolve({frag:e,keyInfo:u});if(null!==(r=u)&&void 0!==r&&r.keyLoadPromise)switch(null===(l=u.mediaKeySessionContext)||void 0===l?void 0:l.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return u.keyLoadPromise.then((function(t){return i.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:u}}))}switch(u=this.keyUriToKeyInfo[o]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return"identity"===i.keyFormat?this.loadKeyHTTP(u,e):this.loadKeyEME(u,e);case"AES-128":return this.loadKeyHTTP(u,e);default:return Promise.reject(this.createKeyLoadError(e,s.ErrorDetails.KEY_LOAD_ERROR,null,'Key supplied with unsupported METHOD: "'+i.method+'"'))}},t.loadKeyEME=function(e,t){var n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){var r=this.emeController.loadKey(n);if(r)return(e.keyLoadPromise=r.then((function(t){return e.mediaKeySessionContext=t,n}))).catch((function(t){throw e.keyLoadPromise=null,t}))}return Promise.resolve(n)},t.loadKeyHTTP=function(e,t){var n=this,r=this.config,i=new(0,r.loader)(r);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((function(a,o){var l={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},u={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:r.fragLoadingRetryDelay,maxRetryDelay:r.fragLoadingMaxRetryTimeout,highWaterMark:0},c={onSuccess:function(e,t,r,i){var l=r.frag,u=r.keyInfo,c=r.url;if(!l.decryptdata||u!==n.keyUriToKeyInfo[c])return o(n.createKeyLoadError(l,s.ErrorDetails.KEY_LOAD_ERROR,i,"after key load, decryptdata unset or changed"));u.decryptdata.key=l.decryptdata.key=new Uint8Array(e.data),l.keyLoader=null,u.loader=null,a({frag:l,keyInfo:u})},onError:function(e,r,i){n.resetLoader(r),o(n.createKeyLoadError(t,s.ErrorDetails.KEY_LOAD_ERROR,i))},onTimeout:function(e,r,i){n.resetLoader(r),o(n.createKeyLoadError(t,s.ErrorDetails.KEY_LOAD_TIMEOUT,i))},onAbort:function(e,r,i){n.resetLoader(r),o(n.createKeyLoadError(t,s.ErrorDetails.INTERNAL_ABORTED,i))}};i.load(l,u,c)}))},t.resetLoader=function(e){var t=e.frag,n=e.keyInfo,r=e.url,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[r],i&&i.destroy()},e}(),Re=function(){function e(){this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}var t=e.prototype;return t.destroy=function(){this.onHandlerDestroying(),this.onHandlerDestroyed()},t.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},t.onHandlerDestroyed=function(){},t.hasInterval=function(){return!!this._tickInterval},t.hasNextTick=function(){return!!this._tickTimer},t.setInterval=function(e){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,e),!0)},t.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},t.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},t.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)},t.tickImmediate=function(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)},t.doTick=function(){},e}(),Oe={length:0,start:function(){return 0},end:function(){return 0}},Le=function(){function e(){}return e.isBuffered=function(t,n){try{if(t)for(var r=e.getBuffered(t),i=0;i<r.length;i++)if(n>=r.start(i)&&n<=r.end(i))return!0}catch(e){}return!1},e.bufferInfo=function(t,n,r){try{if(t){var i,a=e.getBuffered(t),o=[];for(i=0;i<a.length;i++)o.push({start:a.start(i),end:a.end(i)});return this.bufferedInfo(o,n,r)}}catch(e){}return{len:0,start:n,end:n,nextStart:void 0}},e.bufferedInfo=function(e,t,n){t=Math.max(0,t),e.sort((function(e,t){return e.start-t.start||t.end-e.end}));var r=[];if(n)for(var i=0;i<e.length;i++){var a=r.length;if(a){var o=r[a-1].end;e[i].start-o<n?e[i].end>o&&(r[a-1].end=e[i].end):r.push(e[i])}else r.push(e[i])}else r=e;for(var s,l=0,u=t,c=t,p=0;p<r.length;p++){var d=r[p].start,f=r[p].end;if(t+n>=d&&t<f)u=d,l=(c=f)-t;else if(t+n<d){s=d;break}}return{len:l,start:u||0,end:c||0,nextStart:s}},e.getBuffered=function(e){try{return e.buffered}catch(e){return l.logger.log("failed to get media.buffered",e),Oe}},e}(),Me=function(e,t,n,r,i,a){void 0===r&&(r=0),void 0===i&&(i=-1),void 0===a&&(a=!1),this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing={start:0,executeStart:0,executeEnd:0,end:0},this.buffering={audio:{start:0,executeStart:0,executeEnd:0,end:0},video:{start:0,executeStart:0,executeEnd:0,end:0},audiovideo:{start:0,executeStart:0,executeEnd:0,end:0}},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=a};function Ne(e,t){for(var n=null,r=0,i=e.length;r<i;r++){var a=e[r];if(a&&a.cc===t){n=a;break}}return n}function Ue(e,t){if(e){var n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function Fe(e,t){for(var n=t.fragments,r=0,i=n.length;r<i;r++)Ue(n[r],e);t.fragmentHint&&Ue(t.fragmentHint,e),t.alignedSliding=!0}function je(e,t){if(e.hasProgramDateTime&&t.hasProgramDateTime){var n=e.fragments,r=t.fragments;if(n.length&&r.length){var i=r[Math.round(r.length/2)-1],a=Ne(n,i.cc)||n[Math.round(n.length/2)-1],o=i.programDateTime,s=a.programDateTime;null!==o&&null!==s&&Fe((s-o)/1e3-(a.start-i.start),e)}}}const Be=function(e,t){for(var n=0,r=e.length-1,i=null,a=null;n<=r;){var o=t(a=e[i=(n+r)/2|0]);if(o>0)n=i+1;else{if(!(o<0))return a;r=i-1}}return null};function Ve(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=null;if(e?i=t[e.sn-t[0].sn+1]||null:0===n&&0===t[0].start&&(i=t[0]),i&&0===He(n,r,i))return i;var a=Be(t,He.bind(null,n,r));return!a||a===e&&i?i:a}function He(e,t,n){if(void 0===e&&(e=0),void 0===t&&(t=0),n.start<=e&&n.start+n.duration>e)return 0;var r=Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return n.start+n.duration-r<=e?1:n.start-r>e&&n.start?-1:0}function Ke(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}var Ge=n(21);function ze(e,t){return(ze=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var We="STOPPED",Ye="IDLE",qe="KEY_LOADING",Xe="FRAG_LOADING",$e="FRAG_LOADING_WAITING_RETRY",Qe="WAITING_TRACK",Ze="PARSING",Je="PARSED",et="ENDED",tt="ERROR",nt="WAITING_INIT_PTS",rt="WAITING_LEVEL",it=function(e){var t,n;function r(t,n,r,i){var a;return(a=e.call(this)||this).hls=void 0,a.fragPrevious=null,a.fragCurrent=null,a.fragmentTracker=void 0,a.transmuxer=null,a._state=We,a.media=null,a.mediaBuffer=null,a.config=void 0,a.bitrateTest=!1,a.lastCurrentTime=0,a.nextLoadPosition=0,a.startPosition=0,a.loadedmetadata=!1,a.fragLoadError=0,a.retryDate=0,a.levels=null,a.fragmentLoader=void 0,a.keyLoader=void 0,a.levelLastLoaded=null,a.startFragRequested=!1,a.decrypter=void 0,a.initPTS=[],a.onvseeking=null,a.onvended=null,a.logPrefix="",a.log=void 0,a.warn=void 0,a.logPrefix=i,a.log=l.logger.log.bind(l.logger,i+":"),a.warn=l.logger.warn.bind(l.logger,i+":"),a.hls=t,a.fragmentLoader=new xe(t.config),a.keyLoader=r,a.fragmentTracker=n,a.config=t.config,a.decrypter=new Ge.default(t.config),t.on(o.Events.LEVEL_SWITCHING,a.onLevelSwitching,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a)),a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ze(t,n);var i,u,c=r.prototype;return c.doTick=function(){this.onTickEnd()},c.onTickEnd=function(){},c.startLoad=function(e){},c.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort();var e=this.fragCurrent;e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=We},c._streamEnded=function(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;var n=t.partList;if(null!=n&&n.length){var r=n[n.length-1];return Le.isBuffered(this.media,r.start+r.duration/2)}var i=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)},c.getLevelDetails=function(){var e;if(this.levels&&null!==this.levelLastLoaded)return null===(e=this.levels[this.levelLastLoaded])||void 0===e?void 0:e.details},c.onMediaAttached=function(e,t){var n=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),n.addEventListener("seeking",this.onvseeking),n.addEventListener("ended",this.onvended);var r=this.config;this.levels&&r.autoStartLoad&&this.state===We&&this.startLoad(r.startPosition)},c.onMediaDetaching=function(){var e=this.media;null!=e&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},c.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,n=this.media,r=this.mediaBuffer,i=this.state,o=n?n.currentTime:0,s=Le.bufferInfo(r||n,o,e.maxBufferHole);if(this.log("media seeking to "+((0,a.isFiniteNumber)(o)?o.toFixed(3):o)+", state: "+i),this.state===et)this.resetLoadingState();else if(t){var l=e.maxFragLookUpTolerance,u=t.start-l,c=t.start+t.duration+l;if(!s.len||c<s.start||u>s.end){var p=o>c;(o<u||p)&&(p&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests()),this.resetLoadingState())}}n&&(this.lastCurrentTime=o),this.loadedmetadata||s.len||(this.nextLoadPosition=this.startPosition=o),this.tickImmediate()},c.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},c.onLevelSwitching=function(e,t){this.fragLoadError=0},c.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},c.onHandlerDestroyed=function(){this.state=We,this.hls.off(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,e.prototype.onHandlerDestroyed.call(this)},c.loadFragment=function(e,t,n){this._loadFragForPlayback(e,t,n)},c._loadFragForPlayback=function(e,t,n){var r=this;this._doFragLoad(e,t,n,(function(t){if(r.fragContextChanged(e))return r.warn("Fragment "+e.sn+(t.part?" p: "+t.part.index:"")+" of level "+e.level+" was dropped during download."),void r.fragmentTracker.removeFragment(e);e.stats.chunkCount++,r._handleFragmentLoadProgress(t)})).then((function(t){if(t){r.fragLoadError=0;var n=r.state;r.fragContextChanged(e)?(n===Xe||!r.fragCurrent&&n===Ze)&&(r.fragmentTracker.removeFragment(e),r.state=Ye):("payload"in t&&(r.log("Loaded fragment "+e.sn+" of level "+e.level),r.hls.trigger(o.Events.FRAG_LOADED,t)),r._handleFragmentLoadComplete(t))}})).catch((function(t){r.state!==We&&r.state!==tt&&(r.warn(t),r.resetFragmentLoading(e))}))},c.flushMainBuffer=function(e,t,n){if(void 0===n&&(n=null),e-t){var r={startOffset:e,endOffset:t,type:n};this.fragLoadError=0,this.hls.trigger(o.Events.BUFFER_FLUSHING,r)}},c._loadInitSegment=function(e,t){var n=this;this._doFragLoad(e,t).then((function(t){if(!t||n.fragContextChanged(e)||!n.levels)throw new Error("init load aborted");return t})).then((function(t){var r=n.hls,i=t.payload,a=e.decryptdata;if(i&&i.byteLength>0&&a&&a.key&&a.iv&&"AES-128"===a.method){var s=self.performance.now();return n.decrypter.decrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).then((function(n){var i=self.performance.now();return r.trigger(o.Events.FRAG_DECRYPTED,{frag:e,payload:n,stats:{tstart:s,tdecrypt:i}}),t.payload=n,t}))}return t})).then((function(t){var r=n.fragCurrent,i=n.hls,a=n.levels;if(!a)throw new Error("init load aborted, missing levels");a[e.level].details;var s=e.stats;n.state=Ye,n.fragLoadError=0,e.data=new Uint8Array(t.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),t.frag===r&&i.trigger(o.Events.FRAG_BUFFERED,{stats:s,frag:r,part:null,id:e.type}),n.tick()})).catch((function(t){n.state!==We&&n.state!==tt&&(n.warn(t),n.resetFragmentLoading(e))}))},c.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},c.fragBufferedComplete=function(e,t){var n,r,i,a,o=this.mediaBuffer?this.mediaBuffer:this.media;this.log("Buffered "+e.type+" sn: "+e.sn+(t?" part: "+t.index:"")+" of "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level+" (frag:["+(null!=(n=e.startPTS)?n:NaN).toFixed(3)+"-"+(null!=(r=e.endPTS)?r:NaN).toFixed(3)+"] > buffer:"+(o?function(e){for(var t="",n=e.length,r=0;r<n;r++)t+="["+e.start(r).toFixed(3)+"-"+e.end(r).toFixed(3)+"]";return t}(Le.getBuffered(o)):"(detached)")+")"),this.state=Ye,o&&(!this.loadedmetadata&&e.type==H.PlaylistLevelType.MAIN&&o.buffered.length&&(null===(i=this.fragCurrent)||void 0===i?void 0:i.sn)===(null===(a=this.fragPrevious)||void 0===a?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},c.seekToStartPos=function(){},c._handleFragmentLoadComplete=function(e){var t=this.transmuxer;if(t){var n=e.frag,r=e.part,i=e.partsLoaded,a=!i||0===i.length||i.some((function(e){return!e})),o=new Me(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},c._handleFragmentLoadProgress=function(e){},c._doFragLoad=function(e,t,n,r){var i,s=this;if(void 0===n&&(n=null),!this.levels)throw new Error("frag load aborted, missing levels");var l=null;if(!e.encrypted||null!==(i=e.decryptdata)&&void 0!==i&&i.key?!e.encrypted&&t.encryptedFragments.length&&this.keyLoader.loadClear(e,t.encryptedFragments):(this.log("Loading key for "+e.sn+" of ["+t.startSN+"-"+t.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level),this.state=qe,this.fragCurrent=e,l=this.keyLoader.load(e).then((function(e){if(!s.fragContextChanged(e.frag))return s.hls.trigger(o.Events.KEY_LOADED,e),s.state===qe&&(s.state=Ye),e})),this.hls.trigger(o.Events.KEY_LOADING,{frag:e}),this.throwIfFragContextChanged("KEY_LOADING")),n=Math.max(e.start,n||0),this.config.lowLatencyMode&&t){var u=t.partList;if(u&&r){n>e.end&&t.fragmentHint&&(e=t.fragmentHint);var c=this.getNextPart(u,e,n);if(c>-1){var p=u[c];return this.log("Loading part sn: "+e.sn+" p: "+p.index+" cc: "+e.cc+" of playlist ["+t.startSN+"-"+t.endSN+"] parts [0-"+c+"-"+(u.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=p.start+p.duration,this.state=Xe,this.hls.trigger(o.Events.FRAG_LOADING,{frag:e,part:u[c],targetBufferTime:n}),this.throwIfFragContextChanged("FRAG_LOADING parts"),l?l.then((function(t){return!t||s.fragContextChanged(t.frag)?null:s.doFragPartsLoad(e,u,c,r)})).catch((function(e){return s.handleFragLoadError(e)})):this.doFragPartsLoad(e,u,c,r).catch((function(e){return s.handleFragLoadError(e)}))}if(!e.url||this.loadedEndOfParts(u,n))return Promise.resolve(null)}}this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(t?"of ["+t.startSN+"-"+t.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),(0,a.isFiniteNumber)(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Xe,this.hls.trigger(o.Events.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.throwIfFragContextChanged("FRAG_LOADING");var d=this.config.progressive;return d&&l?l.then((function(t){return!t||s.fragContextChanged(null==t?void 0:t.frag)?null:s.fragmentLoader.load(e,r)})).catch((function(e){return s.handleFragLoadError(e)})):Promise.all([this.fragmentLoader.load(e,d?r:void 0),l]).then((function(e){var t=e[0];return!d&&t&&r&&r(t),t})).catch((function(e){return s.handleFragLoadError(e)}))},c.throwIfFragContextChanged=function(e){if(null===this.fragCurrent)throw new Error("frag load aborted, context changed in "+e)},c.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,s){var l=[];!function n(u){var c=t[u];i.fragmentLoader.loadPart(e,c,r).then((function(r){l[c.index]=r;var s=r.part;i.hls.trigger(o.Events.FRAG_LOADED,r);var p=t[u+1];if(!p||p.fragment!==e)return a({frag:e,part:s,partsLoaded:l});n(u+1)})).catch(s)}(n)}))},c.handleFragLoadError=function(e){if("data"in e){var t=e.data;e.data&&t.details===s.ErrorDetails.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(o.Events.ERROR,t)}else this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,err:e,fatal:!0});return null},c._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===Ze){var n=t.frag,r=t.part,i=t.level,a=self.performance.now();n.stats.parsing.end=a,r&&(r.stats.parsing.end=a),this.updateLevelTiming(n,r,i,e.partial)}else this.fragCurrent||this.state===We||this.state===tt||(this.state=Ye)},c.getCurrentContext=function(e){var t=this.levels,n=e.level,r=e.sn,i=e.part;if(!t||!t[n])return this.warn("Levels object was unset while buffering fragment "+r+" of level "+n+". The current chunk will not be buffered."),null;var a=t[n],o=i>-1?function(e,t,n){if(!e||!e.details)return null;var r=e.details.partList;if(r)for(var i=r.length;i--;){var a=r[i];if(a.index===n&&a.fragment.sn===t)return a}return null}(a,r,i):null,s=o?o.fragment:function(e,t,n){if(!e||!e.details)return null;var r=e.details,i=r.fragments[t-r.startSN];return i||((i=r.fragmentHint)&&i.sn===t?i:t<r.startSN&&n&&n.sn===t?n:null)}(a,r,this.fragCurrent);return s?{frag:s,part:o,level:a}:null},c.bufferFragmentData=function(e,t,n,r){if(e&&this.state===Ze){var i=e.data1,a=e.data2,s=i;if(i&&a&&(s=(0,w.appendUint8Array)(i,a)),s&&s.length){var l={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:s};this.hls.trigger(o.Events.BUFFER_APPENDING,l),e.dropped&&e.independent&&!n&&this.flushBufferGap(t)}}},c.flushBufferGap=function(e){var t=this.media;if(t)if(Le.isBuffered(t,t.currentTime)){var n=t.currentTime,r=Le.bufferInfo(t,n,0),i=e.duration,a=Math.min(2*this.config.maxFragLookUpTolerance,.25*i),o=Math.max(Math.min(e.start-a,r.end-a),n+a);e.start-o>a&&this.flushMainBuffer(o,e.start)}else this.flushMainBuffer(0,e.start)},c.getFwdBufferInfo=function(e,t){var n=this.config,r=this.getLoadPosition();if(!(0,a.isFiniteNumber)(r))return null;var i=Le.bufferInfo(e,r,n.maxBufferHole);if(0===i.len&&void 0!==i.nextStart){var o=this.fragmentTracker.getBufferedFrag(r,t);if(o&&i.nextStart<o.end)return Le.bufferInfo(e,r,Math.max(i.nextStart,n.maxBufferHole))}return i},c.getMaxBufferLength=function(e){var t,n=this.config;return t=e?Math.max(8*n.maxBufferSize/e,n.maxBufferLength):n.maxBufferLength,Math.min(t,n.maxMaxBufferLength)},c.reduceMaxBufferLength=function(e){var t=this.config,n=e||t.maxBufferLength;return t.maxMaxBufferLength>=n&&(t.maxMaxBufferLength/=2,this.warn("Reduce max buffer length to "+t.maxMaxBufferLength+"s"),!0)},c.getNextFragment=function(e,t){var n=t.fragments,r=n.length;if(!r)return null;var i,a=this.config,o=n[0].start;if(t.live){var s=a.initialLiveManifestSize;if(r<s)return this.warn("Not enough fragments to start playback (have: "+r+", need: "+s+")"),null;t.PTSKnown||this.startFragRequested||-1!==this.startPosition||(i=this.getInitialLiveFragment(t,n),this.startPosition=i?this.hls.liveSyncPosition||i.start:e)}else e<=o&&(i=n[0]);if(!i){var l=a.lowLatencyMode?t.partEnd:t.fragmentEnd;i=this.getFragmentAtPosition(e,l,t)}return this.mapToInitFragWhenRequired(i)},c.mapToInitFragWhenRequired=function(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment},c.getNextPart=function(e,t,n){for(var r=-1,i=!1,a=!0,o=0,s=e.length;o<s;o++){var l=e[o];if(a=a&&!l.independent,r>-1&&n<l.start)break;var u=l.loaded;u?r=-1:(i||l.independent||a)&&l.fragment===t&&(r=o),i=u}return r},c.loadedEndOfParts=function(e,t){var n=e[e.length-1];return n&&t>n.start&&n.loaded},c.getInitialLiveFragment=function(e,t){var n=this.fragPrevious,r=null;if(n){if(e.hasProgramDateTime&&(this.log("Live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),r=function(e,t,n){if(null===t||!Array.isArray(e)||!e.length||!(0,a.isFiniteNumber)(t))return null;if(t<(e[0].programDateTime||0))return null;if(t>=(e[e.length-1].endProgramDateTime||0))return null;n=n||0;for(var r=0;r<e.length;++r){var i=e[r];if(Ke(t,n,i))return i}return null}(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){var i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){var o=t[i-e.startSN];n.cc===o.cc&&(r=o,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=function(e,t){return Be(e,(function(e){return e.cc<t?1:e.cc>t?-1:0}))}(t,n.cc))&&this.log("Live playlist, switching playlist, load frag with same CC: "+r.sn)}}else{var s=this.hls.liveSyncPosition;null!==s&&(r=this.getFragmentAtPosition(s,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r},c.getFragmentAtPosition=function(e,t,n){var r,i=this.config,a=this.fragPrevious,o=n.fragments,s=n.endSN,l=n.fragmentHint,u=i.maxFragLookUpTolerance,c=!!(i.lowLatencyMode&&n.partList&&l);if(c&&l&&!this.bitrateTest&&(o=o.concat(l),s=l.sn),r=e<t?Ve(a,o,e,e>t-u?0:u):o[o.length-1]){var p=r.sn-n.startSN;if(this.fragmentTracker.getState(r)===ye.OK&&(a=r),a&&r.sn===a.sn&&!c&&a&&r.level===a.level){var d=o[p+1];r.sn<s&&this.fragmentTracker.getState(d)!==ye.OK?(this.log("SN "+r.sn+" just loaded, load next one: "+d.sn),r=d):r=null}}return r},c.synchronizeToLiveEdge=function(e){var t=this.config,n=this.media;if(n){var r=this.hls.liveSyncPosition,i=n.currentTime,a=e.fragments[0].start,o=e.edge,s=i>=a-t.maxFragLookUpTolerance&&i<=o;if(null!==r&&n.duration>r&&(i<r||!s)){var l=void 0!==t.liveMaxLatencyDuration?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!s&&n.readyState<4||i<o-l)&&(this.loadedmetadata||(this.nextLoadPosition=r),n.readyState&&(this.warn("Playback: "+i.toFixed(3)+" is located too far from the end of live sliding playlist: "+o+", reset currentTime to : "+r.toFixed(3)),n.currentTime=r))}}},c.alignPlaylists=function(e,t){var n=this.levels,r=this.levelLastLoaded,i=this.fragPrevious,o=null!==r?n[r]:null,s=e.fragments.length;if(!s)return this.warn("No fragments in live playlist"),0;var u=e.fragments[0].start,c=!t,p=e.alignedSliding&&(0,a.isFiniteNumber)(u);if(c||!p&&!u){!function(e,t,n){t&&(function(e,t,n){if(function(e,t,n){return!(!t.details||!(n.endCC>n.startCC||e&&e.cc<n.startCC))}(e,n,t)){var r=function(e,t,n){void 0===n&&(n=0);var r=e.fragments,i=t.fragments;if(i.length&&r.length){var a=Ne(r,i[0].cc);if(a&&(!a||a.startPTS))return a;l.logger.log("No frag in previous level to align on")}else l.logger.log("No fragments to align")}(n.details,t);r&&(0,a.isFiniteNumber)(r.start)&&(l.logger.log("Adjusting PTS using last level due to CC increase within current level "+t.url),Fe(r.start,t))}}(e,n,t),!n.alignedSliding&&t.details&&function(e,t){if(t.fragments.length&&e.hasProgramDateTime&&t.hasProgramDateTime){var n=t.fragments[0].programDateTime,r=e.fragments[0].programDateTime,i=(r-n)/1e3+t.fragments[0].start;i&&(0,a.isFiniteNumber)(i)&&(l.logger.log("Adjusting PTS using programDateTime delta "+(r-n)+"ms, sliding:"+i.toFixed(3)+" "+e.url+" "),Fe(i,e))}}(n,t.details),n.alignedSliding||!t.details||n.skippedSegments||pe(t.details,n))}(i,o,e);var d=e.fragments[0].start;return this.log("Live playlist sliding: "+d.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" prev-sn: "+(i?i.sn:"na")+" fragments: "+s),d}return u},c.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},c.setStartPosition=function(e,t){var n=this.startPosition;if(n<t&&(n=-1),-1===n||-1===this.lastCurrentTime){var r=e.startTimeOffset;(0,a.isFiniteNumber)(r)?(n=t+r,r<0&&(n+=e.totalduration),n=Math.min(Math.max(t,n),t+e.totalduration),this.log("Start time offset "+r+" found in playlist, adjust startPosition to "+n),this.startPosition=n):e.live?n=this.hls.liveSyncPosition||t:this.startPosition=n=0,this.lastCurrentTime=n}this.nextLoadPosition=n},c.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},c.handleFragLoadAborted=function(e,t){this.transmuxer&&"initSegment"!==e.sn&&e.stats.aborted&&(this.warn("Fragment "+e.sn+(t?" part"+t.index:"")+" of level "+e.level+" was aborted"),this.resetFragmentLoading(e))},c.resetFragmentLoading=function(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===$e)||(this.state=Ye)},c.onFragmentOrKeyLoadError=function(e,t){if(t.fatal)return this.stopLoad(),void(this.state=tt);var n=this.config;if(t.chunkMeta){var r=this.getCurrentContext(t.chunkMeta);r&&(t.frag=r.frag,t.levelRetry=!0,this.fragLoadError=n.fragLoadingMaxRetry)}var i=t.frag;if(i&&i.type===e)if(this.fragCurrent,this.fragLoadError+1<=n.fragLoadingMaxRetry){this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition);var a=Math.min(Math.pow(2,this.fragLoadError)*n.fragLoadingRetryDelay,n.fragLoadingMaxRetryTimeout);this.warn("Fragment "+i.sn+" of "+e+" "+i.level+" failed to load, retrying in "+a+"ms"),this.retryDate=self.performance.now()+a,this.fragLoadError++,this.state=$e}else t.levelRetry?(e===H.PlaylistLevelType.AUDIO&&(this.fragCurrent=null),this.fragLoadError=0,this.state=Ye):(l.logger.error(t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.hls.stopLoad(),this.state=tt)},c.afterBufferFlushed=function(e,t,n){if(e){var r=Le.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===et&&this.resetLoadingState()}},c.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=Ye},c.resetStartWhenNotLoaded=function(e){if(!this.loadedmetadata){this.startFragRequested=!1;var t=this.levels?this.levels[e].details:null;null!=t&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}},c.updateLevelTiming=function(e,t,n,r){var i=this,a=n.details;Object.keys(e.elementaryStreams).reduce((function(t,s){var l=e.elementaryStreams[s];if(l){var u=l.endPTS-l.startPTS;if(u<=0)return i.warn("Could not parse fragment "+e.sn+" "+s+" duration reliably ("+u+")"),t||!1;var c=r?0:ce(a,e,l.startPTS,l.endPTS,l.startDTS,l.endDTS);return i.hls.trigger(o.Events.LEVEL_PTS_UPDATED,{details:a,level:n,drift:c,type:s,frag:e,start:l.startPTS,end:l.endPTS}),!0}return t}),!1)||(this.warn("Found no media in fragment "+e.sn+" of level "+n.id+" resetting transmuxer to fallback to playlist timing"),this.resetTransmuxer()),this.state=Je,this.hls.trigger(o.Events.FRAG_PARSED,{frag:e,part:t})},c.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},i=r,(u=[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,u),Object.defineProperty(i,"prototype",{writable:!1}),r}(Re);function at(){return self.MediaSource||self.WebKitMediaSource}function ot(){return self.SourceBuffer||self.WebKitSourceBuffer}var st=function(){var e=ENTRY_MODULE,t={},n=function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports};n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=n(ENTRY_MODULE);return r.default||r}.toString().split("ENTRY_MODULE"),lt="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function ut(e){return(e+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function ct(e,t,r){var i={};i[r]=[];var a=t.toString().replace(/^"[^"]+"/,"function"),o=a.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/)||a.match(/^\(\w+,\s*\w+,\s*(\w+)\)\s?\=\s?\>/);if(!o)return i;for(var s,l=o[1],u=new RegExp("(\\\\n|\\W)"+ut(l)+lt,"g");s=u.exec(a);)"dll-reference"!==s[3]&&i[r].push(s[3]);for(u=new RegExp("\\("+ut(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)'+lt,"g");s=u.exec(a);)e[s[2]]||(i[r].push(s[1]),e[s[2]]=n(s[1]).m),i[s[2]]=i[s[2]]||[],i[s[2]].push(s[4]);for(var c,p=Object.keys(i),d=0;d<p.length;d++)for(var f=0;f<i[p[d]].length;f++)c=i[p[d]][f],isNaN(1*c)||(i[p[d]][f]=1*i[p[d]][f]);return i}function pt(e){return Object.keys(e).reduce((function(t,n){return t||e[n].length>0}),!1)}function dt(e,t,n,r){var i=e[r].map((function(e){return'"'+e+'": '+t[r][e].toString().replace(/^"[^"]+"/,"function")})).join(",");return st[0]+"{"+i+"}"+st[1]+'"'+n+'"'+st[2]}var ft=n(544),ht=n(729),gt=n.n(ht),yt=at()||{isTypeSupported:function(){return!1}},vt=function(){function e(e,t,r,i){var a=this;this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.worker=void 0,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;var u=e.config;this.hls=e,this.id=t,this.useWorker=!!u.enableWorker,this.onTransmuxComplete=r,this.onFlush=i;var c=function(e,t){(t=t||{}).frag=a.frag,t.id=a.id,a.hls.trigger(e,t)};this.observer=new ht.EventEmitter,this.observer.on(o.Events.FRAG_DECRYPTED,c),this.observer.on(o.Events.ERROR,c);var p={mp4:yt.isTypeSupported("video/mp4"),mpeg:yt.isTypeSupported("audio/mpeg"),mp3:yt.isTypeSupported('audio/mp4; codecs="mp3"')},d=navigator.vendor;if(this.useWorker&&"undefined"!=typeof Worker){var f;l.logger.log("demuxing in webworker");try{f=this.worker=function(e,t){t=t||{};var r={main:n.m},i=t.all?{main:Object.keys(r.main)}:function(e,t){for(var n={main:[182]},r={main:[]},i={main:{}};pt(n);)for(var a=Object.keys(n),o=0;o<a.length;o++){var s=a[o],l=n[s].pop();if(i[s]=i[s]||{},!i[s][l]&&e[s][l]){i[s][l]=!0,r[s]=r[s]||[],r[s].push(l);for(var u=ct(e,e[s][l],s),c=Object.keys(u),p=0;p<c.length;p++)n[c[p]]=n[c[p]]||[],n[c[p]]=n[c[p]].concat(u[c[p]])}}return r}(r),a="";Object.keys(i).filter((function(e){return"main"!==e})).forEach((function(e){for(var t=0;i[e][t];)t++;i[e].push(t),r[e][t]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+e+" = ("+dt(i,r,t,modules)+")();\n"})),a=a+"new (("+dt(i,r,182,"main")+")())(self);";var o=new window.Blob([a],{type:"text/javascript"}),s=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(o),l=new window.Worker(s);return l.objectURL=s,l}(),this.onwmsg=this.onWorkerMessage.bind(this),f.addEventListener("message",this.onwmsg),f.onerror=function(e){a.useWorker=!1,l.logger.warn("Exception in webworker, fallback to inline"),a.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:new Error(e.message+" ("+e.filename+":"+e.lineno+")")})},f.postMessage({cmd:"init",typeSupported:p,vendor:d,id:t,config:JSON.stringify(u)})}catch(e){l.logger.warn("Error in worker:",e),l.logger.error("Error while initializing DemuxerWorker, fallback to inline"),f&&self.URL.revokeObjectURL(f.objectURL),this.transmuxer=new ft.default(this.observer,p,u,d,t),this.worker=null}}else this.transmuxer=new ft.default(this.observer,p,u,d,t)}var t=e.prototype;return t.destroy=function(){var e=this.worker;if(e)e.removeEventListener("message",this.onwmsg),e.terminate(),this.worker=null,this.onwmsg=void 0;else{var t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}var n=this.observer;n&&n.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},t.push=function(e,t,n,r,i,a,o,s,u,c){var p,d,f=this;u.transmuxing.start=self.performance.now();var h=this.transmuxer,g=this.worker,y=a?a.start:i.start,v=i.decryptdata,m=this.frag,b=!(m&&i.cc===m.cc),_=!(m&&u.level===m.level),E=m?u.sn-m.sn:-1,k=this.part?u.part-this.part.index:-1,T=0===E&&u.id>1&&u.id===(null==m?void 0:m.stats.chunkCount),A=!_&&(1===E||0===E&&(1===k||T&&k<=0)),w=self.performance.now();(_||E||0===i.stats.parsing.start)&&(i.stats.parsing.start=w),!a||!k&&A||(a.stats.parsing.start=w);var S=!(m&&(null===(p=i.initSegment)||void 0===p?void 0:p.url)===(null===(d=m.initSegment)||void 0===d?void 0:d.url)),C=new ft.TransmuxState(b,A,s,_,y,S);if(!A||b||S){l.logger.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+u.sn+" p: "+u.part+" level: "+u.level+" id: "+u.id+"\n discontinuity: "+b+"\n trackSwitch: "+_+"\n contiguous: "+A+"\n accurateTimeOffset: "+s+"\n timeOffset: "+y+"\n initSegmentChange: "+S);var x=new ft.TransmuxConfig(n,r,t,o,c);this.configureTransmuxer(x)}if(this.frag=i,this.part=a,g)g.postMessage({cmd:"demux",data:e,decryptdata:v,chunkMeta:u,state:C},e instanceof ArrayBuffer?[e]:[]);else if(h){var I=h.push(e,v,u,C);(0,ft.isPromise)(I)?(h.async=!0,I.then((function(e){f.handleTransmuxComplete(e)})).catch((function(e){f.transmuxerError(e,u,"transmuxer-interface push error")}))):(h.async=!1,this.handleTransmuxComplete(I))}},t.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer,r=this.worker;if(r)r.postMessage({cmd:"flush",chunkMeta:e});else if(n){var i=n.flush(e);(0,ft.isPromise)(i)||n.async?((0,ft.isPromise)(i)||(i=Promise.resolve(i)),i.then((function(n){t.handleFlushResult(n,e)})).catch((function(n){t.transmuxerError(n,e,"transmuxer-interface flush error")}))):this.handleFlushResult(i,e)}},t.transmuxerError=function(e,t,n){this.hls&&this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:n})},t.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},t.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":self.URL.revokeObjectURL(this.worker.objectURL);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":l.logger[t.data.logType]&&l.logger[t.data.logType](t.data.message);break;default:t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,n.trigger(t.event,t.data)}},t.configureTransmuxer=function(e){var t=this.worker,n=this.transmuxer;t?t.postMessage({cmd:"configure",config:e}):n&&n.configure(e)},t.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}(),mt=function(){function e(e,t,n,r){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=n,this.hls=r}var t=e.prototype;return t.destroy=function(){this.media=null,this.hls=this.fragmentTracker=null},t.poll=function(e,t){var n=this.config,r=this.media,i=this.stalled;if(null!==r){var a=r.currentTime,o=r.seeking,s=this.seeking&&!o,u=!this.seeking&&o;if(this.seeking=o,a===e){if((u||s)&&(this.stalled=null),!(r.paused&&!o||r.ended||0===r.playbackRate)&&Le.getBuffered(r).length){var c=Le.bufferInfo(r,a,0),p=c.len>0,d=c.nextStart||0;if(p||d){if(o){var f=c.len>2,h=!d||t&&t.start<=a||d-a>2&&!this.fragmentTracker.getPartialFragment(a);if(f||h)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var g,y=Math.max(d,c.start||0)-a,v=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,m=(null==v||null===(g=v.details)||void 0===g?void 0:g.live)?2*v.details.targetduration:2;if(y>0&&y<=m)return void this._trySkipBufferHole(null)}var b=self.performance.now();if(null!==i){var _=b-i;if(o||!(_>=250)||(this._reportStall(c),this.media)){var E=Le.bufferInfo(r,a,n.maxBufferHole);this._tryFixBufferStall(E,_)}}else this.stalled=b}}}else if(this.moved=!0,null!==i){if(this.stallReported){var k=self.performance.now()-i;l.logger.warn("playback not stuck anymore @"+a+", after "+Math.round(k)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}}},t._tryFixBufferStall=function(e,t){var n=this.config,r=this.fragmentTracker,i=this.media;if(null!==i){var a=i.currentTime,o=r.getPartialFragment(a);if(o&&(this._trySkipBufferHole(o)||!this.media))return;e.len>n.maxBufferHole&&t>1e3*n.highBufferWatchdogPeriod&&(l.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},t._reportStall=function(e){var t=this.hls,n=this.media;!this.stallReported&&n&&(this.stallReported=!0,l.logger.warn("Playback stalling at @"+n.currentTime+" due to low buffer ("+JSON.stringify(e)+")"),t.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:e.len}))},t._trySkipBufferHole=function(e){var t=this.config,n=this.hls,r=this.media;if(null===r)return 0;for(var i=r.currentTime,a=0,u=Le.getBuffered(r),c=0;c<u.length;c++){var p=u.start(c);if(i+t.maxBufferHole>=a&&i<p){var d=Math.max(p+.05,r.currentTime+.1);return l.logger.warn("skipping hole, adjusting currentTime from "+i+" to "+d),this.moved=!0,this.stalled=null,r.currentTime=d,e&&n.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+i+" to "+d,frag:e}),d}a=u.end(c)}return 0},t._tryNudgeBuffer=function(){var e=this.config,t=this.hls,n=this.media,r=this.nudgeRetry;if(null!==n){var i=n.currentTime;if(this.nudgeRetry++,r<e.nudgeMaxRetry){var a=i+(r+1)*e.nudgeOffset;l.logger.warn("Nudging 'currentTime' from "+i+" to "+a),n.currentTime=a,t.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else l.logger.error("Playhead still not moving while enough data buffered @"+i+" after "+e.nudgeMaxRetry+" nudges"),t.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})}},e}();function bt(e,t){return(bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var _t=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t,n,r,"[stream-controller]")||this).audioCodecSwap=!1,i.gapController=null,i.level=-1,i._forceStartLoad=!1,i.altAudio=!1,i.audioOnly=!1,i.fragPlaying=null,i.onvplaying=null,i.onvseeked=null,i.fragLastKbps=0,i.couldBacktrack=!1,i.backtrackFragment=null,i.audioCodecSwitch=!1,i.videoBuffer=null,i._registerListeners(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,bt(t,n);var i,l,u=r.prototype;return u._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(o.Events.ERROR,this.onError,this),e.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(o.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},u._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(o.Events.ERROR,this.onError,this),e.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(o.Events.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(o.Events.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},u.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},u.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var r=n.startLevel;-1===r&&(n.config.testBandwidth&&this.levels.length>1?(r=0,this.bitrateTest=!0):r=n.nextAutoLevel),this.level=n.nextLoadLevel=r,this.loadedmetadata=!1}t>0&&-1===e&&(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t),this.state=Ye,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=We},u.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},u.doTick=function(){switch(this.state){case Ye:this.doTickIdle();break;case rt:var e,t=this.levels,n=this.level,r=null==t||null===(e=t[n])||void 0===e?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=Ye;break}break;case $e:var i,a=self.performance.now(),o=this.retryDate;(!o||a>=o||null!==(i=this.media)&&void 0!==i&&i.seeking)&&(this.log("retryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.level),this.state=Ye)}this.onTickEnd()},u.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},u.doTickIdle=function(){var e=this.hls,t=this.levelLastLoaded,n=this.levels,r=this.media,i=e.config,a=e.nextLoadLevel;if(null!==t&&(r||!this.startFragRequested&&i.startFragPrefetch)&&(!this.altAudio||!this.audioOnly)&&n&&n[a]){var s=n[a],l=this.getMainFwdBufferInfo();if(null!==l){var u=this.getLevelDetails();if(u&&this._streamEnded(l,u)){var c={};return this.altAudio&&(c.type="video"),this.hls.trigger(o.Events.BUFFER_EOS,c),void(this.state=et)}this.level=e.nextLoadLevel=a;var p=s.details;if(!p||this.state===rt||p.live&&this.levelLastLoaded!==a)return this.level=a,void(this.state=rt);if(!(l.len>=this.getMaxBufferLength(s.maxBitrate))){this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);var d=this.backtrackFragment?this.backtrackFragment.start:l.end,f=this.getNextFragment(d,p);if(this.couldBacktrack&&!this.fragPrevious&&f&&"initSegment"!==f.sn&&this.fragmentTracker.getState(f)!==ye.OK){var h,g=(null!=(h=this.backtrackFragment)?h:f).sn-p.startSN,y=p.fragments[g-1];y&&f.cc===y.cc&&(f=y,this.fragmentTracker.removeFragment(y))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(f&&this.fragmentTracker.getState(f)===ye.OK&&this.nextLoadPosition>d){var m=this.audioOnly&&!this.altAudio?v.ElementaryStreamTypes.AUDIO:v.ElementaryStreamTypes.VIDEO,b=(m===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,m,H.PlaylistLevelType.MAIN),f=this.getNextFragment(this.nextLoadPosition,p)}f&&(!f.initSegment||f.initSegment.data||this.bitrateTest||(f=f.initSegment),this.loadFragment(f,p,d))}}}},u.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);this.fragCurrent=t,a===ye.NOT_LOADED?"initSegment"===t.sn?this._loadInitSegment(t,n):this.bitrateTest?(this.log("Fragment "+t.sn+" of level "+t.level+" is being downloaded to test bitrate and will not be buffered"),this._loadBitrateTestFrag(t,n)):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):a===ye.APPENDING?this.reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t):0===(null===(i=this.media)||void 0===i?void 0:i.buffered.length)&&this.fragmentTracker.removeAllFragments()},u.getAppendedFrag=function(e){var t=this.fragmentTracker.getAppendedFrag(e,H.PlaylistLevelType.MAIN);return t&&"fragment"in t?t.fragment:t},u.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,H.PlaylistLevelType.MAIN)},u.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},u.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},u.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);if(r&&r.start>1&&this.flushMainBuffer(0,r.start-1),!t.paused&&e){var i=e[this.hls.nextLoadLevel],a=this.fragLastKbps;n=a&&this.fragCurrent?this.fragCurrent.duration*i.maxBitrate/(1e3*a)+1:0}else n=0;var o=this.getBufferedFrag(t.currentTime+n);if(o){var s=this.followingBufferedFrag(o);if(s){this.abortCurrentFrag();var l=s.maxStartPTS?s.maxStartPTS:s.start,u=s.duration,c=Math.max(o.end,l+Math.min(Math.max(u-this.config.maxFragLookUpTolerance,.5*u),.75*u));this.flushMainBuffer(c,Number.POSITIVE_INFINITY)}}}},u.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&e.abortRequests(),this.state){case qe:case Xe:case $e:case Ze:case Je:this.state=Ye}this.nextLoadPosition=this.getLoadPosition()},u.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},u.onMediaAttached=function(t,n){e.prototype.onMediaAttached.call(this,t,n);var r=n.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new mt(this.config,r,this.fragmentTracker,this.hls)},u.onMediaDetaching=function(){var t=this.media;t&&this.onvplaying&&this.onvseeked&&(t.removeEventListener("playing",this.onvplaying),t.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),e.prototype.onMediaDetaching.call(this)},u.onMediaPlaying=function(){this.tick()},u.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;(0,a.isFiniteNumber)(t)&&this.log("Media seeked to "+t.toFixed(3)),this.tick()},u.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(o.Events.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.fragPlaying=null,this.backtrackFragment=null},u.onManifestParsed=function(e,t){var n,r,i,a=!1,o=!1;t.levels.forEach((function(e){(n=e.audioCodec)&&(-1!==n.indexOf("mp4a.40.2")&&(a=!0),-1!==n.indexOf("mp4a.40.5")&&(o=!0))})),this.audioCodecSwitch=a&&o&&!("function"==typeof(null==(i=ot())||null===(r=i.prototype)||void 0===r?void 0:r.changeType)),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1},u.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===Ye){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=rt)}},u.onLevelLoaded=function(e,t){var n,r=this.levels,i=t.level,a=t.details,s=a.totalduration;if(r){this.log("Level "+i+" loaded ["+a.startSN+","+a.endSN+"], cc ["+a.startCC+", "+a.endCC+"] duration:"+s);var l=this.fragCurrent;!l||this.state!==Xe&&this.state!==$e||l.level!==t.level&&l.loader&&(this.state=Ye,this.backtrackFragment=null,l.abortRequests());var u=r[i],c=0;if(a.live||null!==(n=u.details)&&void 0!==n&&n.live){if(a.fragments[0]||(a.deltaUpdateFailed=!0),a.deltaUpdateFailed)return;c=this.alignPlaylists(a,u.details)}if(u.details=a,this.levelLastLoaded=i,this.hls.trigger(o.Events.LEVEL_UPDATED,{details:a,level:i}),this.state===rt){if(this.waitForCdnTuneIn(a))return;this.state=Ye}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,c),this.tick()}else this.warn("Levels were reset while loading level "+i)},u._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.levels;if(a){var o=a[n.level],s=o.details;if(s){var l=o.videoCodec,u=s.PTSKnown||!s.live,c=null===(t=n.initSegment)||void 0===t?void 0:t.data,p=this._getAudioCodec(o),d=this.transmuxer=this.transmuxer||new vt(this.hls,H.PlaylistLevelType.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),f=r?r.index:-1,h=-1!==f,g=new Me(n.level,n.sn,n.stats.chunkCount,i.byteLength,f,h),y=this.initPTS[n.cc];d.push(i,c,p,l,n,r,s.totalduration,u,g,y)}else this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset")}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},u.onAudioTrackSwitching=function(e,t){var n=this.altAudio,r=!!t.url,i=t.id;if(!r){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var a=this.fragCurrent;a&&(this.log("Switching to main audio track, cancel main fragment load"),a.abortRequests()),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var s=this.hls;n&&s.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:i})}},u.onAudioTrackSwitched=function(e,t){var n=t.id,r=!!this.hls.audioTracks[n].url;if(r){var i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=r,this.tick()},u.onBufferCreated=function(e,t){var n,r,i=t.tracks,a=!1;for(var o in i){var s=i[o];if("main"===s.id){if(r=o,n=s,"video"===o){var l=i[o];l&&(this.videoBuffer=l.buffer)}}else a=!0}a&&n?(this.log("Alternate track found, use "+r+".buffered to schedule main fragment loading"),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media},u.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===H.PlaylistLevelType.MAIN){if(this.fragContextChanged(n))return this.warn("Fragment "+n.sn+(r?" p: "+r.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state),void(this.state===Je&&(this.state=Ye));var i=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*i.total/(i.buffering.end-i.loading.first)),"initSegment"!==n.sn&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}},u.onError=function(e,t){if(t.type!==s.ErrorTypes.KEY_SYSTEM_ERROR)switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.FRAG_PARSING_ERROR:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(H.PlaylistLevelType.MAIN,t);break;case s.ErrorDetails.LEVEL_LOAD_ERROR:case s.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==tt&&(t.fatal?(this.warn(""+t.details),this.state=tt):t.levelRetry||this.state!==rt||(this.state=Ye));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("main"===t.parent&&(this.state===Ze||this.state===Je)){var n=!0,r=this.getFwdBufferInfo(this.media,H.PlaylistLevelType.MAIN);r&&r.len>.5&&(n=!this.reduceMaxBufferLength(r.len)),n&&(this.warn("buffer full error also media.currentTime is not buffered, flush main"),this.immediateLevelSwitch()),this.resetLoadingState()}}else this.onFragmentOrKeyLoadError(H.PlaylistLevelType.MAIN,t)},u.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){if(this.loadedmetadata||!Le.getBuffered(e).length){var n=this.state!==Ye?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}},u.onFragLoadEmergencyAborted=function(){this.state=Ye,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},u.onBufferFlushed=function(e,t){var n=t.type;if(n!==v.ElementaryStreamTypes.AUDIO||this.audioOnly&&!this.altAudio){var r=(n===v.ElementaryStreamTypes.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,H.PlaylistLevelType.MAIN)}},u.onLevelsUpdated=function(e,t){this.levels=t.levels},u.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},u.seekToStartPos=function(){var e=this.media;if(e){var t=e.currentTime,n=this.startPosition;if(n>=0&&t<n){if(e.seeking)return void this.log("could not seek to "+n+", already seeking at "+t);var r=Le.getBuffered(e),i=(r.length?r.start(0):0)-n;i>0&&(i<this.config.maxBufferHole||i<this.config.maxFragLookUpTolerance)&&(this.log("adjusting start position by "+i+" to match buffer start"),n+=i,this.startPosition=n),this.log("seek to target start position "+n+" from current time "+t),e.currentTime=n}}},u._getAudioCodec=function(e){var t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t=-1!==t.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),t},u._loadBitrateTestFrag=function(e,t){var n=this;e.bitrateTest=!0,this._doFragLoad(e,t).then((function(t){var r=n.hls;if(t&&!n.fragContextChanged(e)){n.fragLoadError=0,n.state=Ye,n.startFragRequested=!1,n.bitrateTest=!1;var i=e.stats;i.parsing.start=i.parsing.end=i.buffering.start=i.buffering.end=self.performance.now(),r.trigger(o.Events.FRAG_LOADED,t),e.bitrateTest=!1}}))},u._handleTransmuxComplete=function(e){var t,n="main",r=this.hls,i=e.remuxResult,s=e.chunkMeta,l=this.getCurrentContext(s);if(!l)return this.warn("The loading context changed while buffering fragment "+s.sn+" of level "+s.level+". This chunk will not be buffered."),void this.resetStartWhenNotLoaded(s.level);var u=l.frag,c=l.part,p=l.level,d=i.video,f=i.text,h=i.id3,g=i.initSegment,y=p.details,m=this.altAudio?void 0:i.audio;if(!this.fragContextChanged(u)){if(this.state=Ze,g){g.tracks&&(this._bufferInitSegment(p,g.tracks,u,s),r.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:u,id:n,tracks:g.tracks}));var b=g.initPTS,_=g.timescale;(0,a.isFiniteNumber)(b)&&(this.initPTS[u.cc]=b,r.trigger(o.Events.INIT_PTS_FOUND,{frag:u,id:n,initPTS:b,timescale:_}))}if(d&&!1!==i.independent){if(y){var E=d.startPTS,k=d.endPTS,T=d.startDTS,A=d.endDTS;if(c)c.elementaryStreams[d.type]={startPTS:E,endPTS:k,startDTS:T,endDTS:A};else if(d.firstKeyFrame&&d.independent&&1===s.id&&(this.couldBacktrack=!0),d.dropped&&d.independent){var w=this.getMainFwdBufferInfo();if((w?w.end:this.getLoadPosition())+this.config.maxBufferHole<(d.firstKeyFramePTS?d.firstKeyFramePTS:E)-this.config.maxBufferHole)return void this.backtrack(u);u.setElementaryStreamInfo(d.type,u.start,k,u.start,A,!0)}u.setElementaryStreamInfo(d.type,E,k,T,A),this.backtrackFragment&&(this.backtrackFragment=u),this.bufferFragmentData(d,u,c,s)}}else if(!1===i.independent)return void this.backtrack(u);if(m){var S=m.startPTS,C=m.endPTS,x=m.startDTS,I=m.endDTS;c&&(c.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:S,endPTS:C,startDTS:x,endDTS:I}),u.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,S,C,x,I),this.bufferFragmentData(m,u,c,s)}if(y&&null!=h&&null!==(t=h.samples)&&void 0!==t&&t.length){var P={id:n,frag:u,details:y,samples:h.samples};r.trigger(o.Events.FRAG_PARSING_METADATA,P)}if(y&&f){var D={id:n,frag:u,details:y,samples:f.samples};r.trigger(o.Events.FRAG_PARSING_USERDATA,D)}}},u._bufferInitSegment=function(e,t,n,r){var i=this;if(this.state===Ze){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;var a=t.audio,s=t.video,l=t.audiovideo;if(a){var u=e.audioCodec,c=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(u&&(u=-1!==u.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==a.metadata.channelCount&&-1===c.indexOf("firefox")&&(u="mp4a.40.5")),-1!==c.indexOf("android")&&"audio/mpeg"!==a.container&&(u="mp4a.40.2",this.log("Android: force audio codec to "+u)),e.audioCodec&&e.audioCodec!==u&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+u+'"'),a.levelCodec=u,a.id="main",this.log("Init audio buffer, container:"+a.container+", codecs[selected/level/parsed]=["+(u||"")+"/"+(e.audioCodec||"")+"/"+a.codec+"]")}s&&(s.levelCodec=e.videoCodec,s.id="main",this.log("Init video buffer, container:"+s.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+s.codec+"]")),l&&this.log("Init audiovideo buffer, container:"+l.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+l.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,t),Object.keys(t).forEach((function(e){var a=t[e].initSegment;null!=a&&a.byteLength&&i.hls.trigger(o.Events.BUFFER_APPENDING,{type:e,data:a,frag:n,part:null,chunkMeta:r,parent:n.type})})),this.tick()}},u.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,H.PlaylistLevelType.MAIN)},u.backtrack=function(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Ye},u.checkFragmentChanged=function(){var e=this.media,t=null;if(e&&e.readyState>1&&!1===e.seeking){var n=e.currentTime;if(Le.isBuffered(e,n)?t=this.getAppendedFrag(n):Le.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;var r=this.fragPlaying,i=t.level;r&&t.sn===r.sn&&r.level===i&&t.urlId===r.urlId||(this.fragPlaying=t,this.hls.trigger(o.Events.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(o.Events.LEVEL_SWITCHED,{level:i}))}}},i=r,(l=[{key:"nextLevel",get:function(){var e=this.nextBufferedFrag;return e?e.level:-1}},{key:"currentFrag",get:function(){var e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}},{key:"currentProgramDateTime",get:function(){var e=this.media;if(e){var t=e.currentTime,n=this.currentFrag;if(n&&(0,a.isFiniteNumber)(t)&&(0,a.isFiniteNumber)(n.programDateTime)){var r=n.programDateTime+1e3*(t-n.start);return new Date(r)}}return null}},{key:"currentLevel",get:function(){var e=this.currentFrag;return e?e.level:-1}},{key:"nextBufferedFrag",get:function(){var e=this.currentFrag;return e?this.followingBufferedFrag(e):null}},{key:"forceStartLoad",get:function(){return this._forceStartLoad}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,l),Object.defineProperty(i,"prototype",{writable:!1}),r}(it);const Et=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=0),this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}var t=e.prototype;return t.sample=function(e,t){var n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e},t.getTotalWeight=function(){return this.totalWeight_},t.getEstimate=function(){if(this.alpha_){var e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_},e}(),kt=function(){function e(e,t,n){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Et(e),this.fast_=new Et(t)}var t=e.prototype;return t.update=function(e,t){var n=this.slow_,r=this.fast_;this.slow_.halfLife!==e&&(this.slow_=new Et(e,n.getEstimate(),n.getTotalWeight())),this.fast_.halfLife!==t&&(this.fast_=new Et(t,r.getEstimate(),r.getTotalWeight()))},t.sample=function(e,t){var n=(e=Math.max(e,this.minDelayMs_))/1e3,r=8*t/n;this.fast_.sample(n,r),this.slow_.sample(n,r)},t.canEstimate=function(){var e=this.fast_;return e&&e.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.destroy=function(){},e}(),Tt=function(){function e(e){this.hls=void 0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=void 0,this.onCheck=this._abandonRulesCheck.bind(this),this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this.hls=e;var t=e.config;this.bwEstimator=new kt(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}var t,n,r=e.prototype;return r.registerListeners=function(){var e=this.hls;e.on(o.Events.FRAG_LOADING,this.onFragLoading,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.ERROR,this.onError,this)},r.unregisterListeners=function(){var e=this.hls;e.off(o.Events.FRAG_LOADING,this.onFragLoading,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.ERROR,this.onError,this)},r.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},r.onFragLoading=function(e,t){var n,r=t.frag;r.type===H.PlaylistLevelType.MAIN&&(this.timer||(this.fragCurrent=r,this.partCurrent=null!=(n=t.part)?n:null,this.timer=self.setInterval(this.onCheck,100)))},r.onLevelLoaded=function(e,t){var n=this.hls.config;t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},r._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.autoLevelEnabled,i=n.media;if(e&&i){var s=t?t.stats:e.stats,u=t?t.duration:e.duration;if(s.aborted||s.loaded&&s.loaded===s.total||0===e.level)return this.clearTimer(),void(this._nextAutoLevel=-1);if(r&&!i.paused&&i.playbackRate&&i.readyState){var c=n.mainForwardBufferInfo;if(null!==c){var p=performance.now()-s.loading.start,d=Math.abs(i.playbackRate);if(!(p<=500*u/d)){var f=s.loaded&&s.loading.first,h=this.bwEstimator.getEstimate(),g=n.levels,y=n.minAutoLevel,v=g[e.level],m=s.total||Math.max(s.loaded,Math.round(u*v.maxBitrate/8)),b=f?1e3*s.loaded/p:0,_=b?(m-s.loaded)/b:8*m/h,E=c.len/d;if(!(_<=E)){var k,T=Number.POSITIVE_INFINITY;for(k=e.level-1;k>y;k--){var A=g[k].maxBitrate;if((T=b?u*A/(6.4*b):u*A/h)<E)break}T>=_||(l.logger.warn("Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly and will cause an underbuffer; aborting and switching to level "+k+"\n Current BW estimate: "+((0,a.isFiniteNumber)(h)?(h/1024).toFixed(3):"Unknown")+" Kb/s\n Estimated load time for current fragment: "+_.toFixed(3)+" s\n Estimated load time for the next fragment: "+T.toFixed(3)+" s\n Time to underbuffer: "+E.toFixed(3)+" s"),n.nextLoadLevel=k,f&&this.bwEstimator.sample(p,s.loaded),this.clearTimer(),(e.loader||e.keyLoader)&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),n.trigger(o.Events.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:s}))}}}}}},r.onFragLoaded=function(e,t){var n=t.frag,r=t.part;if(n.type===H.PlaylistLevelType.MAIN&&(0,a.isFiniteNumber)(n.sn)){var i=r?r.stats:n.stats,s=r?r.duration:n.duration;if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var l=this.hls.levels[n.level],u=(l.loaded?l.loaded.bytes:0)+i.loaded,c=(l.loaded?l.loaded.duration:0)+s;l.loaded={bytes:u,duration:c},l.realBitrate=Math.round(8*u/c)}if(n.bitrateTest){var p={stats:i,frag:n,part:r,id:n.type};this.onFragBuffered(o.Events.FRAG_BUFFERED,p)}}},r.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(!i.aborted&&n.type===H.PlaylistLevelType.MAIN&&"initSegment"!==n.sn){var a=i.parsing.end-i.loading.start;this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},r.onError=function(e,t){var n;if((null===(n=t.frag)||void 0===n?void 0:n.type)===H.PlaylistLevelType.MAIN){if(t.type===s.ErrorTypes.KEY_SYSTEM_ERROR)return void this.clearTimer();switch(t.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.clearTimer()}}},r.clearTimer=function(){self.clearInterval(this.timer),this.timer=void 0},r.getNextABRAutoLevel=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.maxAutoLevel,i=n.config,a=n.minAutoLevel,o=n.media,s=t?t.duration:e?e.duration:0,u=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,c=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,p=n.mainForwardBufferInfo,d=(p?p.len:0)/u,f=this.findBestLevel(c,a,r,d,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(f>=0)return f;l.logger.trace((d?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var h=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,g=i.abrBandWidthFactor,y=i.abrBandWidthUpFactor;if(!d){var v=this.bitrateTestDelay;v&&(h=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-v,l.logger.trace("bitrate test took "+Math.round(1e3*v)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*h)+" ms"),g=y=1)}return f=this.findBestLevel(c,a,r,d+h,g,y),Math.max(f,0)},r.findBestLevel=function(e,t,n,r,i,o){for(var s,u=this.fragCurrent,c=this.partCurrent,p=this.lastLoadedFragLevel,d=this.hls.levels,f=d[p],h=!(null==f||null===(s=f.details)||void 0===s||!s.live),g=null==f?void 0:f.codecSet,y=c?c.duration:u?u.duration:0,v=n;v>=t;v--){var m=d[v];if(m&&(!g||m.codecSet===g)){var b,_=m.details,E=(c?null==_?void 0:_.partTarget:null==_?void 0:_.averagetargetduration)||y;b=v<=p?i*e:o*e;var k=d[v].maxBitrate,T=k*E/b;if(l.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+v+"/"+Math.round(b)+"/"+k+"/"+E+"/"+r+"/"+T),b>k&&(0===T||!(0,a.isFiniteNumber)(T)||h&&!this.bitrateTestDelay||T<r))return v}}return-1},t=e,(n=[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(-1!==e&&!t.canEstimate())return e;var n=this.getNextABRAutoLevel();return-1!==e&&this.hls.levels[n].loadError?e:(-1!==e&&(n=Math.min(e,n)),n)},set:function(e){this._nextAutoLevel=e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();var At=function(){function e(){this.chunks=[],this.dataLength=0}var t=e.prototype;return t.push=function(e){this.chunks.push(e),this.dataLength+=e.length},t.flush=function(){var e,t=this.chunks,n=this.dataLength;return t.length?(e=1===t.length?t[0]:function(e,t){for(var n=new Uint8Array(t),r=0,i=0;i<e.length;i++){var a=e[i];n.set(a,r),r+=a.length}return n}(t,n),this.reset(),e):new Uint8Array(0)},t.reset=function(){this.chunks.length=0,this.dataLength=0},e}();function wt(){return(wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function St(e,t){return(St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const Ct=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t,n,r,"[audio-stream-controller]")||this).videoBuffer=null,i.videoTrackCC=-1,i.waitingVideoCC=-1,i.audioSwitch=!1,i.trackId=-1,i.waitingData=null,i.mainDetails=null,i.bufferFlushed=!1,i.cachedTrackLoadedData=null,i._registerListeners(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,St(t,n);var i=r.prototype;return i.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},i._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(o.Events.ERROR,this.onError,this),e.on(o.Events.BUFFER_RESET,this.onBufferReset,this),e.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.on(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},i._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(o.Events.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(o.Events.ERROR,this.onError,this),e.off(o.Events.BUFFER_RESET,this.onBufferReset,this),e.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),e.off(o.Events.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},i.onInitPtsFound=function(e,t){var n=t.frag,r=t.id,i=t.initPTS;if("main"===r){var a=n.cc;this.initPTS[n.cc]=i,this.log("InitPTS for cc: "+a+" found from main: "+i),this.videoTrackCC=a,this.state===nt&&this.tick()}},i.startLoad=function(e){if(!this.levels)return this.startPosition=e,void(this.state=We);var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,t>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t,this.state=Ye):(this.loadedmetadata=!1,this.state=Qe),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},i.doTick=function(){switch(this.state){case Ye:this.doTickIdle();break;case Qe:var t,n=this.levels,r=this.trackId,i=null==n||null===(t=n[r])||void 0===t?void 0:t.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=nt}break;case $e:var a,o=performance.now(),s=this.retryDate;(!s||o>=s||null!==(a=this.media)&&void 0!==a&&a.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=Ye);break;case nt:var l=this.waitingData;if(l){var u=l.frag,c=l.part,p=l.cache,d=l.complete;if(void 0!==this.initPTS[u.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=Xe;var f={frag:u,part:c,payload:p.flush(),networkDetails:null};this._handleFragmentLoadProgress(f),d&&e.prototype._handleFragmentLoadComplete.call(this,f)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log("Waiting fragment cc ("+u.cc+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var h=this.getLoadPosition(),g=Le.bufferInfo(this.mediaBuffer,h,this.config.maxBufferHole);He(g.end,this.config.maxFragLookUpTolerance,u)<0&&(this.log("Waiting fragment cc ("+u.cc+") @ "+u.start+" cancelled because another fragment at "+g.end+" is needed"),this.clearWaitingFragment())}}else this.state=Ye}this.onTickEnd()},i.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=Ye)},i.resetLoadingState=function(){this.clearWaitingFragment(),e.prototype.resetLoadingState.call(this)},i.onTickEnd=function(){var e=this.media;e&&e.readyState&&(this.lastCurrentTime=e.currentTime)},i.doTickIdle=function(){var e=this.hls,t=this.levels,n=this.media,r=this.trackId,i=e.config;if(t&&t[r]&&(n||!this.startFragRequested&&i.startFragPrefetch)){var a=t[r].details;if(!a||a.live&&this.levelLastLoaded!==r||this.waitForCdnTuneIn(a))this.state=Qe;else{var s=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&s&&(this.bufferFlushed=!1,this.afterBufferFlushed(s,v.ElementaryStreamTypes.AUDIO,H.PlaylistLevelType.AUDIO));var l=this.getFwdBufferInfo(s,H.PlaylistLevelType.AUDIO);if(null!==l){var u=this.audioSwitch;if(!u&&this._streamEnded(l,a))return e.trigger(o.Events.BUFFER_EOS,{type:"audio"}),void(this.state=et);var c=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,H.PlaylistLevelType.MAIN);if(!(l.len>=this.getMaxBufferLength(null==c?void 0:c.len))||u){var p=a.fragments[0].start,d=l.end;if(u&&n){var f=this.getLoadPosition();d=f,a.PTSKnown&&f<p&&(l.end>p||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=p+.05)}if(!(c&&d>c.end+a.targetduration)&&(c&&c.len||!l.len)){var h=this.getNextFragment(d,a);h?this.loadFragment(h,a,d):this.bufferFlushed=!0}}}}}},i.getMaxBufferLength=function(t){var n=e.prototype.getMaxBufferLength.call(this);return t?Math.max(n,t):n},i.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},i.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new ae(e)}))},i.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;r&&r.abortRequests(),this.fragCurrent=null,this.clearWaitingFragment(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.audioSwitch=!0,this.state=Ye):this.state=We,this.tick()},i.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1},i.onLevelLoaded=function(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(o.Events.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},i.onAudioTrackLoaded=function(e,t){var n;if(null!=this.mainDetails){var r=this.levels,i=t.details,a=t.id;if(r){this.log("Track "+a+" loaded ["+i.startSN+","+i.endSN+"],duration:"+i.totalduration);var o=r[a],s=0;if(i.live||null!==(n=o.details)&&void 0!==n&&n.live){var l=this.mainDetails;if(i.fragments[0]||(i.deltaUpdateFailed=!0),i.deltaUpdateFailed||!l)return;!o.details&&i.hasProgramDateTime&&l.hasProgramDateTime?(je(i,l),s=i.fragments[0].start):s=this.alignPlaylists(i,o.details)}o.details=i,this.levelLastLoaded=a,this.startFragRequested||!this.mainDetails&&i.live||this.setStartPosition(o.details,s),this.state!==Qe||this.waitForCdnTuneIn(i)||(this.state=Ye),this.tick()}else this.warn("Audio tracks were reset while loading level "+a)}else this.cachedTrackLoadedData=t},i._handleFragmentLoadProgress=function(e){var t,n=e.frag,r=e.part,i=e.payload,a=this.config,o=this.trackId,s=this.levels;if(s){var l=s[o],u=l.details,c=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2",p=this.transmuxer;p||(p=this.transmuxer=new vt(this.hls,H.PlaylistLevelType.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var d=this.initPTS[n.cc],f=null===(t=n.initSegment)||void 0===t?void 0:t.data;if(void 0!==d){var h=r?r.index:-1,g=-1!==h,y=new Me(n.level,n.sn,n.stats.chunkCount,i.byteLength,h,g);p.push(i,f,c,"",n,r,u.totalduration,!1,y,d)}else this.log("Unknown video PTS for cc "+n.cc+", waiting for video PTS before demuxing audio frag "+n.sn+" of ["+u.startSN+" ,"+u.endSN+"],track "+o),(this.waitingData=this.waitingData||{frag:n,part:r,cache:new At,complete:!1}).cache.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=nt}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},i._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},i.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},i.onBufferCreated=function(e,t){var n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)},i.onFragBuffered=function(e,t){var n,r=t.frag,i=t.part;r.type===H.PlaylistLevelType.AUDIO?this.fragContextChanged(r)?this.warn("Fragment "+r.sn+(i?" p: "+i.index:"")+" of level "+r.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+this.audioSwitch):("initSegment"!==r.sn&&(this.fragPrevious=r,this.audioSwitch&&(this.audioSwitch=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:this.trackId}))),this.fragBufferedComplete(r,i)):this.loadedmetadata||r.type!==H.PlaylistLevelType.MAIN||null!==(n=this.videoBuffer||this.media)&&void 0!==n&&n.buffered.length&&(this.loadedmetadata=!0)},i.onError=function(t,n){if(n.type!==s.ErrorTypes.KEY_SYSTEM_ERROR)switch(n.details){case s.ErrorDetails.FRAG_LOAD_ERROR:case s.ErrorDetails.FRAG_LOAD_TIMEOUT:case s.ErrorDetails.FRAG_PARSING_ERROR:case s.ErrorDetails.KEY_LOAD_ERROR:case s.ErrorDetails.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(H.PlaylistLevelType.AUDIO,n);break;case s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case s.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:this.state!==tt&&this.state!==We&&(this.state=n.fatal?tt:Ye,this.warn(n.details+" while loading frag, switching to "+this.state+" state"));break;case s.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===n.parent&&(this.state===Ze||this.state===Je)){var r=!0,i=this.getFwdBufferInfo(this.mediaBuffer,H.PlaylistLevelType.AUDIO);i&&i.len>.5&&(r=!this.reduceMaxBufferLength(i.len)),r&&(this.warn("Buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.resetLoadingState()}}else this.onFragmentOrKeyLoadError(H.PlaylistLevelType.AUDIO,n)},i.onBufferFlushed=function(e,t){t.type===v.ElementaryStreamTypes.AUDIO&&(this.bufferFlushed=!0,this.state===et&&(this.state=Ye))},i._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,i=e.remuxResult,a=e.chunkMeta,s=this.getCurrentContext(a);if(!s)return this.warn("The loading context changed while buffering fragment "+a.sn+" of level "+a.level+". This chunk will not be buffered."),void this.resetStartWhenNotLoaded(a.level);var l=s.frag,u=s.part,c=s.level.details,p=i.audio,d=i.text,f=i.id3,h=i.initSegment;if(!this.fragContextChanged(l)&&c){if(this.state=Ze,this.audioSwitch&&p&&this.completeAudioSwitch(),null!=h&&h.tracks&&(this._bufferInitSegment(h.tracks,l,a),r.trigger(o.Events.FRAG_PARSING_INIT_SEGMENT,{frag:l,id:n,tracks:h.tracks})),p){var g=p.startPTS,y=p.endPTS,m=p.startDTS,b=p.endDTS;u&&(u.elementaryStreams[v.ElementaryStreamTypes.AUDIO]={startPTS:g,endPTS:y,startDTS:m,endDTS:b}),l.setElementaryStreamInfo(v.ElementaryStreamTypes.AUDIO,g,y,m,b),this.bufferFragmentData(p,l,u,a)}if(null!=f&&null!==(t=f.samples)&&void 0!==t&&t.length){var _=wt({id:n,frag:l,details:c},f);r.trigger(o.Events.FRAG_PARSING_METADATA,_)}if(d){var E=wt({id:n,frag:l,details:c},d);r.trigger(o.Events.FRAG_PARSING_USERDATA,E)}}},i._bufferInitSegment=function(e,t,n){if(this.state===Ze){e.video&&delete e.video;var r=e.audio;if(r){r.levelCodec=r.codec,r.id="audio",this.log("Init audio buffer, container:"+r.container+", codecs[parsed]=["+r.codec+"]"),this.hls.trigger(o.Events.BUFFER_CODECS,e);var i=r.initSegment;if(null!=i&&i.byteLength){var a={type:"audio",frag:t,part:null,chunkMeta:n,parent:t.type,data:i};this.hls.trigger(o.Events.BUFFER_APPENDING,a)}this.tick()}}},i.loadFragment=function(t,n,r){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,(this.audioSwitch||i===ye.NOT_LOADED||i===ye.PARTIAL)&&("initSegment"===t.sn?this._loadInitSegment(t,n):n.live&&!(0,a.isFiniteNumber)(this.initPTS[t.cc])?(this.log("Waiting for video PTS in continuity counter "+t.cc+" of live stream before loading audio fragment "+t.sn+" of level "+this.trackId),this.state=nt):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)))},i.completeAudioSwitch=function(){var t=this.hls,n=this.media,r=this.trackId;n&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.audioSwitch=!1,t.trigger(o.Events.AUDIO_TRACK_SWITCHED,{id:r})},r}(it);function xt(e,t){return(xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}const It=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,"[audio-track-controller]")||this).tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.trackName="",n.selectDefaultTrack=!0,n.registerListeners(),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,xt(t,n);var i,a,l=r.prototype;return l.registerListeners=function(){var e=this.hls;e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(o.Events.ERROR,this.onError,this)},l.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(o.Events.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(o.Events.ERROR,this.onError,this)},l.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,e.prototype.destroy.call(this)},l.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.trackName="",this.selectDefaultTrack=!0},l.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},l.onAudioTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.tracksInGroup[n];if(i){var a=i.details;i.details=t.details,this.log("audioTrack "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,a))}else this.warn("Invalid audio track id "+n)},l.onLevelLoading=function(e,t){this.switchLevel(t.level)},l.onLevelSwitching=function(e,t){this.switchLevel(t.level)},l.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.audioGroupIds){var n=t.audioGroupIds[t.urlId];if(this.groupId!==n){this.groupId=n;var r=this.tracks.filter((function(e){return!n||e.groupId===n}));this.selectDefaultTrack&&!r.some((function(e){return e.default}))&&(this.selectDefaultTrack=!1),this.tracksInGroup=r;var i={audioTracks:r};this.log("Updating audio tracks, "+r.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(o.Events.AUDIO_TRACKS_UPDATED,i),this.selectInitialTrack()}}},l.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===H.PlaylistContextType.AUDIO_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},l.setAudioTrack=function(e){var t=this.tracksInGroup;if(e<0||e>=t.length)this.warn("Invalid id passed to audio-track controller");else{this.clearTimer();var n=t[this.trackId];this.log("Now switching to audio-track index "+e);var r=t[e],i=r.id,a=r.groupId,s=void 0===a?"":a,l=r.name,u=r.type,c=r.url;if(this.trackId=e,this.trackName=l,this.selectDefaultTrack=!1,this.hls.trigger(o.Events.AUDIO_TRACK_SWITCHING,{id:i,groupId:s,name:l,type:u,url:c}),!r.details||r.details.live){var p=this.switchParams(r.url,null==n?void 0:n.details);this.loadPlaylist(p)}}},l.selectInitialTrack=function(){this.tracksInGroup;var e=this.trackName,t=this.findTrackId(e)||this.findTrackId();-1!==t?this.setAudioTrack(t):(this.warn("No track found for running audio group-ID: "+this.groupId),this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))},l.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},l.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var r=n.id,i=n.groupId,a=n.url;if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("loading audio-track playlist for id: "+r),this.clearTimer(),this.hls.trigger(o.Events.AUDIO_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},i=r,(a=[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(fe);function Pt(e,t){return(Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var Dt=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t,n,r,"[subtitle-stream-controller]")||this).levels=[],i.currentTrackId=-1,i.tracksBuffered=[],i.mainDetails=null,i._registerListeners(),i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Pt(t,n);var i,a,s=r.prototype;return s.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},s._registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.on(o.Events.ERROR,this.onError,this),e.on(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(o.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(o.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(o.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},s._unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.LEVEL_LOADED,this.onLevelLoaded,this),e.off(o.Events.ERROR,this.onError,this),e.off(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(o.Events.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(o.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(o.Events.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(o.Events.FRAG_BUFFERED,this.onFragBuffered,this)},s.startLoad=function(e){this.stopLoad(),this.state=Ye,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},s.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},s.onLevelLoaded=function(e,t){this.mainDetails=t.details},s.onSubtitleFragProcessed=function(e,t){var n=t.frag,r=t.success;if(this.fragPrevious=n,this.state=Ye,r){var i=this.tracksBuffered[this.currentTrackId];if(i){for(var a,o=n.start,s=0;s<i.length;s++)if(o>=i[s].start&&o<=i[s].end){a=i[s];break}var l=n.start+n.duration;a?a.end=l:(a={start:o,end:l},i.push(a)),this.fragmentTracker.fragBuffered(n)}}},s.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=this.currentTrackId,a=this.levels;if(!a.length||!a[i]||!a[i].details)return;var o=r-a[i].details.targetduration;if(o<=0)return;t.endOffsetSubtitles=Math.max(0,o),this.tracksBuffered.forEach((function(e){for(var t=0;t<e.length;)if(e[t].end<=o)e.shift();else{if(!(e[t].start<o))break;e[t].start=o,t++}})),this.fragmentTracker.removeFragmentsInRange(n,o,H.PlaylistLevelType.SUBTITLE)}},s.onFragBuffered=function(e,t){var n;this.loadedmetadata||t.frag.type!==H.PlaylistLevelType.MAIN||null!==(n=this.media)&&void 0!==n&&n.buffered.length&&(this.loadedmetadata=!0)},s.onError=function(e,t){var n=t.frag;n&&n.type===H.PlaylistLevelType.SUBTITLE&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state=Ye)},s.onSubtitleTracksUpdated=function(e,t){var n=this,r=t.subtitleTracks;this.tracksBuffered=[],this.levels=r.map((function(e){return new ae(e)})),this.fragmentTracker.removeAllFragments(),this.fragPrevious=null,this.levels.forEach((function(e){n.tracksBuffered[e.id]=[]})),this.mediaBuffer=null},s.onSubtitleTrackSwitch=function(e,t){if(this.currentTrackId=t.id,this.levels.length&&-1!==this.currentTrackId){var n=this.levels[this.currentTrackId];null!=n&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval(500)}else this.clearInterval()},s.onSubtitleTrackLoaded=function(e,t){var n,r=t.details,i=t.id,a=this.currentTrackId,o=this.levels;if(o.length){var s=o[a];if(!(i>=o.length||i!==a)&&s){this.mediaBuffer=this.mediaBufferTimeRanges;var l=0;if(r.live||null!==(n=s.details)&&void 0!==n&&n.live){var u=this.mainDetails;if(r.deltaUpdateFailed||!u)return;var c=u.fragments[0];s.details?0===(l=this.alignPlaylists(r,s.details))&&c&&de(r,l=c.start):r.hasProgramDateTime&&u.hasProgramDateTime?(je(r,u),l=r.fragments[0].start):c&&de(r,l=c.start)}s.details=r,this.levelLastLoaded=i,this.startFragRequested||!this.mainDetails&&r.live||this.setStartPosition(s.details,l),this.tick(),r.live&&!this.fragCurrent&&this.media&&this.state===Ye&&(Ve(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),s.details=void 0))}}},s._handleFragmentLoadComplete=function(e){var t=this,n=e.frag,r=e.payload,i=n.decryptdata,a=this.hls;if(!this.fragContextChanged(n)&&r&&r.byteLength>0&&i&&i.key&&i.iv&&"AES-128"===i.method){var s=performance.now();this.decrypter.decrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer).then((function(e){var t=performance.now();a.trigger(o.Events.FRAG_DECRYPTED,{frag:n,payload:e,stats:{tstart:s,tdecrypt:t}})})).catch((function(e){t.warn(e.name+": "+e.message),t.state=Ye}))}},s.doTick=function(){if(this.media){if(this.state===Ye){var e=this.currentTrackId,t=this.levels;if(!t.length||!t[e]||!t[e].details)return;var n=t[e].details,r=n.targetduration,i=this.config,a=this.getLoadPosition(),o=Le.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],a-r,i.maxBufferHole),s=o.end,l=o.len,u=this.getFwdBufferInfo(this.media,H.PlaylistLevelType.MAIN);if(l>this.getMaxBufferLength(null==u?void 0:u.len)+r)return;var c=n.fragments,p=c.length,d=n.edge,f=null,h=this.fragPrevious;if(s<d){var g=i.maxFragLookUpTolerance;!(f=Ve(h,c,Math.max(c[0].start,s),g))&&h&&h.start<c[0].start&&(f=c[0])}else f=c[p-1];if(!f)return;f=this.mapToInitFragWhenRequired(f),this.fragmentTracker.getState(f)===ye.NOT_LOADED&&this.loadFragment(f,n,s)}}else this.state=Ye},s.getMaxBufferLength=function(t){var n=e.prototype.getMaxBufferLength.call(this);return t?Math.max(n,t):n},s.loadFragment=function(t,n,r){this.fragCurrent=t,"initSegment"===t.sn?this._loadInitSegment(t,n):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r))},i=r,(a=[{key:"mediaBufferTimeRanges",get:function(){return new Rt(this.tracksBuffered[this.currentTrackId]||[])}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(it),Rt=function(e){this.buffered=void 0;var t=function(t,n,r){if((n>>>=0)>r-1)throw new DOMException("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+n+") is greater than the maximum bound ("+r+")");return e[n][t]};this.buffered={get length(){return e.length},end:function(n){return t("end",n,e.length)},start:function(n){return t("start",n,e.length)}}};function Ot(e,t){return(Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Lt(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];"subtitles"!==r.kind&&"captions"!==r.kind||!r.label||t.push(e[n])}return t}const Mt=function(e){var t,n;function r(t){var n;return(n=e.call(this,t,"[subtitle-track-controller]")||this).media=null,n.tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.selectDefaultTrack=!0,n.queuedDefaultTrack=-1,n.trackChangeListener=function(){return n.onTextTracksChanged()},n.asyncPollTrackChange=function(){return n.pollTrackChange(0)},n.useTextTrackPolling=!1,n.subtitlePollingInterval=-1,n._subtitleDisplay=!0,n.registerListeners(),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ot(t,n);var i,a,s=r.prototype;return s.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},s.registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.on(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(o.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(o.Events.ERROR,this.onError,this)},s.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.LEVEL_LOADING,this.onLevelLoading,this),e.off(o.Events.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(o.Events.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(o.Events.ERROR,this.onError,this)},s.onMediaAttached=function(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))},s.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},s.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),Lt(this.media.textTracks).forEach((function(e){Y(e)})),this.subtitleTrack=-1,this.media=null)},s.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},s.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},s.onSubtitleTrackLoaded=function(e,t){var n=t.id,r=t.details,i=this.trackId,a=this.tracksInGroup[i];if(a){var o=a.details;a.details=t.details,this.log("subtitle track "+n+" loaded ["+r.startSN+"-"+r.endSN+"]"),n===this.trackId&&(this.retryCount=0,this.playlistLoaded(n,t,o))}else this.warn("Invalid subtitle track id "+n)},s.onLevelLoading=function(e,t){this.switchLevel(t.level)},s.onLevelSwitching=function(e,t){this.switchLevel(t.level)},s.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId];if(this.groupId!==n){var r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0,i=this.tracks.filter((function(e){return!n||e.groupId===n}));this.tracksInGroup=i;var a=this.findTrackId(null==r?void 0:r.name)||this.findTrackId();this.groupId=n;var s={subtitleTracks:i};this.log("Updating subtitle tracks, "+i.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(o.Events.SUBTITLE_TRACKS_UPDATED,s),-1!==a&&this.setSubtitleTrack(a,r)}}},s.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if((!this.selectDefaultTrack||r.default)&&(!e||e===r.name))return r.id}return-1},s.onError=function(t,n){e.prototype.onError.call(this,t,n),!n.fatal&&n.context&&n.context.type===H.PlaylistContextType.SUBTITLE_TRACK&&n.context.id===this.trackId&&n.context.groupId===this.groupId&&this.retryLoadingOrFail(n)},s.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.tracksInGroup[this.trackId];if(this.shouldLoadTrack(n)){var r=n.id,i=n.groupId,a=n.url;if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}this.log("Loading subtitle playlist for id "+r),this.hls.trigger(o.Events.SUBTITLE_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},s.toggleTrackModes=function(e){var t=this,n=this.media,r=this.trackId;if(n){var i=Lt(n.textTracks),a=i.filter((function(e){return e.groupId===t.groupId}));if(-1===e)[].slice.call(i).forEach((function(e){e.mode="disabled"}));else{var o=a[r];o&&(o.mode="disabled")}var s=a[e];s&&(s.mode=this.subtitleDisplay?"showing":"hidden")}},s.setSubtitleTrack=function(e,t){var n,r=this.tracksInGroup;if(this.media){if(this.trackId!==e&&this.toggleTrackModes(e),!(this.trackId===e&&(-1===e||null!==(n=r[e])&&void 0!==n&&n.details)||e<-1||e>=r.length)){this.clearTimer();var i=r[e];if(this.log("Switching to subtitle track "+e),this.trackId=e,i){var a=i.id,s=i.groupId,l=void 0===s?"":s,u=i.name,c=i.type,p=i.url;this.hls.trigger(o.Events.SUBTITLE_TRACK_SWITCH,{id:a,groupId:l,name:u,type:c,url:p});var d=this.switchParams(i.url,null==t?void 0:t.details);this.loadPlaylist(d)}else this.hls.trigger(o.Events.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},s.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=Lt(this.media.textTracks),n=0;n<t.length;n++)if("hidden"===t[n].mode)e=n;else if("showing"===t[n].mode){e=n;break}this.subtitleTrack!==e&&(this.subtitleTrack=e)}},i=r,(a=[{key:"subtitleDisplay",get:function(){return this._subtitleDisplay},set:function(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes(this.trackId)}},{key:"subtitleTracks",get:function(){return this.tracksInGroup}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1;var t=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;this.setSubtitleTrack(e,t)}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(i.prototype,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(fe);var Nt,Ut=function(){function e(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}var t=e.prototype;return t.append=function(e,t){var n=this.queues[t];n.push(e),1===n.length&&this.buffers[t]&&this.executeNext(t)},t.insertAbort=function(e,t){this.queues[t].unshift(e),this.executeNext(t)},t.appendBlocker=function(e){var t,n=new Promise((function(e){t=e})),r={execute:t,onStart:function(){},onComplete:function(){},onError:function(){}};return this.append(r,e),n},t.executeNext=function(e){var t=this.buffers,n=this.queues,r=t[e],i=n[e];if(i.length){var a=i[0];try{a.execute()}catch(t){l.logger.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(t),r&&r.updating||(i.shift(),this.executeNext(e))}}},t.shiftAndExecuteNext=function(e){this.queues[e].shift(),this.executeNext(e)},t.current=function(e){return this.queues[e][0]},e}(),Ft=at(),jt=/([ha]vc.)(?:\.[^.,]+)+/,Bt=function(){function e(e){var t=this;this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendError=0,this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onMediaSourceOpen=function(){var e=t.media,n=t.mediaSource;l.logger.log("[buffer-controller]: Media source opened"),e&&(e.removeEventListener("emptied",t._onMediaEmptied),t.updateMediaElementDuration(),t.hls.trigger(o.Events.MEDIA_ATTACHED,{media:e})),n&&n.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){l.logger.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){l.logger.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var e=t.media,n=t._objectUrl;e&&e.src!==n&&l.logger.error("Media element src was set while attaching MediaSource ("+n+" > "+e.src+")")},this.hls=e,this._initSourceBuffer(),this.registerListeners()}var t=e.prototype;return t.hasSourceTypes=function(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0},t.destroy=function(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null},t.registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.BUFFER_RESET,this.onBufferReset,this),e.on(o.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.on(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(o.Events.BUFFER_EOS,this.onBufferEos,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(o.Events.FRAG_PARSED,this.onFragParsed,this),e.on(o.Events.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.BUFFER_RESET,this.onBufferReset,this),e.off(o.Events.BUFFER_APPENDING,this.onBufferAppending,this),e.off(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(o.Events.BUFFER_EOS,this.onBufferEos,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(o.Events.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(o.Events.FRAG_PARSED,this.onFragParsed,this),e.off(o.Events.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new Ut(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,this.details=null,l.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&Ft){var r=this.mediaSource=new Ft;r.addEventListener("sourceopen",this._onMediaSourceOpen),r.addEventListener("sourceended",this._onMediaSourceEnded),r.addEventListener("sourceclose",this._onMediaSourceClose),n.src=self.URL.createObjectURL(r),this._objectUrl=n.src,n.addEventListener("emptied",this._onMediaEmptied)}},t.onMediaDetaching=function(){var e=this.media,t=this.mediaSource,n=this._objectUrl;if(t){if(l.logger.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){l.logger.warn("[buffer-controller]: onMediaDetaching: "+e.message+" while calling endOfStream")}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),e&&(e.removeEventListener("emptied",this._onMediaEmptied),n&&self.URL.revokeObjectURL(n),e.src===n?(e.removeAttribute("src"),e.load()):l.logger.warn("[buffer-controller]: media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(o.Events.MEDIA_DETACHED,void 0)},t.onBufferReset=function(){var e=this;this.getSourceBufferTypes().forEach((function(t){var n=e.sourceBuffer[t];try{n&&(e.removeBufferListeners(t),e.mediaSource&&e.mediaSource.removeSourceBuffer(n),e.sourceBuffer[t]=void 0)}catch(e){l.logger.warn("[buffer-controller]: Failed to reset the "+t+" buffer",e)}})),this._initSourceBuffer()},t.onBufferCodecs=function(e,t){var n=this,r=this.getSourceBufferTypes().length;Object.keys(t).forEach((function(e){if(r){var i=n.tracks[e];if(i&&"function"==typeof i.buffer.changeType){var a=t[e],o=a.id,s=a.codec,u=a.levelCodec,c=a.container,p=a.metadata,d=(i.levelCodec||i.codec).replace(jt,"$1"),f=(u||s).replace(jt,"$1");if(d!==f){var h=c+";codecs="+(u||s);n.appendChangeType(e,h),l.logger.log("[buffer-controller]: switching codec "+d+" to "+f),n.tracks[e]={buffer:i.buffer,codec:s,container:c,levelCodec:u,metadata:p,id:o}}}}else n.pendingTracks[e]=t[e]})),r||(this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},t.appendChangeType=function(e,t){var n=this,r=this.operationQueue,i={execute:function(){var i=n.sourceBuffer[e];i&&(l.logger.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){l.logger.warn("[buffer-controller]: Failed to change "+e+" SourceBuffer type",t)}};r.append(i,e)},t.onBufferAppending=function(e,t){var n=this,r=this.hls,i=this.operationQueue,a=this.tracks,u=t.data,c=t.type,p=t.frag,d=t.part,f=t.chunkMeta,h=f.buffering[c],g=self.performance.now();h.start=g;var y=p.stats.buffering,v=d?d.stats.buffering:null;0===y.start&&(y.start=g),v&&0===v.start&&(v.start=g);var m=a.audio,b=!1;"audio"===c&&"audio/mpeg"===(null==m?void 0:m.container)&&(b=!this.lastMpegAudioChunk||1===f.id||this.lastMpegAudioChunk.sn!==f.sn,this.lastMpegAudioChunk=f);var _=p.start,E={execute:function(){if(h.executeStart=self.performance.now(),b){var e=n.sourceBuffer[c];if(e){var t=_-e.timestampOffset;Math.abs(t)>=.1&&(l.logger.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+_+" (delta: "+t+") sn: "+p.sn+")"),e.timestampOffset=_)}}n.appendExecutor(u,c)},onStart:function(){},onComplete:function(){var e=self.performance.now();h.executeEnd=h.end=e,0===y.first&&(y.first=e),v&&0===v.first&&(v.first=e);var t=n.sourceBuffer,r={};for(var i in t)r[i]=Le.getBuffered(t[i]);n.appendError=0,n.hls.trigger(o.Events.BUFFER_APPENDED,{type:c,frag:p,part:d,chunkMeta:f,parent:p.type,timeRanges:r})},onError:function(e){l.logger.error("[buffer-controller]: Error encountered while trying to append to the "+c+" SourceBuffer",e);var t={type:s.ErrorTypes.MEDIA_ERROR,parent:p.type,details:s.ErrorDetails.BUFFER_APPEND_ERROR,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=s.ErrorDetails.BUFFER_FULL_ERROR:(n.appendError++,t.details=s.ErrorDetails.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(l.logger.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0,r.stopLoad())),r.trigger(o.Events.ERROR,t)}};i.append(E,c)},t.onBufferFlushing=function(e,t){var n=this,r=this.operationQueue,i=function(e){return{execute:n.removeExecutor.bind(n,e,t.startOffset,t.endOffset),onStart:function(){},onComplete:function(){n.hls.trigger(o.Events.BUFFER_FLUSHED,{type:e})},onError:function(t){l.logger.warn("[buffer-controller]: Failed to remove from "+e+" SourceBuffer",t)}}};t.type?r.append(i(t.type),t.type):this.getSourceBufferTypes().forEach((function(e){r.append(i(e),e)}))},t.onFragParsed=function(e,t){var n=this,r=t.frag,i=t.part,a=[],s=i?i.elementaryStreams:r.elementaryStreams;s[v.ElementaryStreamTypes.AUDIOVIDEO]?a.push("audiovideo"):(s[v.ElementaryStreamTypes.AUDIO]&&a.push("audio"),s[v.ElementaryStreamTypes.VIDEO]&&a.push("video")),0===a.length&&l.logger.warn("Fragments must have at least one ElementaryStreamType set. type: "+r.type+" level: "+r.level+" sn: "+r.sn),this.blockBuffers((function(){var e=self.performance.now();r.stats.buffering.end=e,i&&(i.stats.buffering.end=e);var t=i?i.stats:r.stats;n.hls.trigger(o.Events.FRAG_BUFFERED,{frag:r,part:i,stats:t,id:r.type})}),a)},t.onFragChanged=function(e,t){this.flushBackBuffer()},t.onBufferEos=function(e,t){var n=this;this.getSourceBufferTypes().reduce((function(e,r){var i=n.sourceBuffer[r];return!i||t.type&&t.type!==r||(i.ending=!0,i.ended||(i.ended=!0,l.logger.log("[buffer-controller]: "+r+" sourceBuffer now EOS"))),e&&!(i&&!i.ended)}),!0)&&(l.logger.log("[buffer-controller]: Queueing mediaSource.endOfStream()"),this.blockBuffers((function(){n.getSourceBufferTypes().forEach((function(e){var t=n.sourceBuffer[e];t&&(t.ending=!1)}));var e=n.mediaSource;e&&"open"===e.readyState?(l.logger.log("[buffer-controller]: Calling mediaSource.endOfStream()"),e.endOfStream()):e&&l.logger.info("[buffer-controller]: Could not call mediaSource.endOfStream(). mediaSource.readyState: "+e.readyState)})))},t.onLevelUpdated=function(e,t){var n=t.details;n.fragments.length&&(this.details=n,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())},t.flushBackBuffer=function(){var e=this.hls,t=this.details,n=this.media,r=this.sourceBuffer;if(n&&null!==t){var i=this.getSourceBufferTypes();if(i.length){var s=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if((0,a.isFiniteNumber)(s)&&!(s<0)){var u=n.currentTime,c=t.levelTargetDuration,p=Math.max(s,c),d=Math.floor(u/c)*c-p;i.forEach((function(n){var i=r[n];if(i){var a=Le.getBuffered(i);if(a.length>0&&d>a.start(0)){if(e.trigger(o.Events.BACK_BUFFER_REACHED,{bufferEnd:d}),t.live)e.trigger(o.Events.LIVE_BACK_BUFFER_REACHED,{bufferEnd:d});else if(i.ended&&a.end(a.length-1)-u<2*c)return void l.logger.info("[buffer-controller]: Cannot flush "+n+" back buffer while SourceBuffer is in ended state");e.trigger(o.Events.BUFFER_FLUSHING,{startOffset:0,endOffset:d,type:n})}}}))}}}},t.updateMediaElementDuration=function(){if(this.details&&this.media&&this.mediaSource&&"open"===this.mediaSource.readyState){var e=this.details,t=this.hls,n=this.media,r=this.mediaSource,i=e.fragments[0].start+e.totalduration,o=n.duration,s=(0,a.isFiniteNumber)(r.duration)?r.duration:0;e.live&&t.config.liveDurationInfinity?(l.logger.log("[buffer-controller]: Media Source duration is set to Infinity"),r.duration=1/0,this.updateSeekableRange(e)):(i>s&&i>o||!(0,a.isFiniteNumber)(o))&&(l.logger.log("[buffer-controller]: Updating Media Source duration to "+i.toFixed(3)),r.duration=i)}},t.updateSeekableRange=function(e){var t=this.mediaSource,n=e.fragments;if(n.length&&e.live&&null!=t&&t.setLiveSeekableRange){var r=Math.max(0,n[0].start),i=Math.max(r,r+e.totalduration);t.setLiveSeekableRange(r,i)}},t.checkPendingTracks=function(){var e=this.bufferCodecEventsExpected,t=this.operationQueue,n=this.pendingTracks,r=Object.keys(n).length;if(r&&!e||2===r){this.createSourceBuffers(n),this.pendingTracks={};var i=this.getSourceBufferTypes();if(0===i.length)return void this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,reason:"could not create source buffer for media codec(s)"});i.forEach((function(e){t.executeNext(e)}))}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");var r=0;for(var i in e)if(!t[i]){var a=e[i];if(!a)throw Error("source buffer exists for track "+i+", however track does not");var u=a.levelCodec||a.codec,c=a.container+";codecs="+u;l.logger.log("[buffer-controller]: creating sourceBuffer("+c+")");try{var p=t[i]=n.addSourceBuffer(c),d=i;this.addBufferListener(d,"updatestart",this._onSBUpdateStart),this.addBufferListener(d,"updateend",this._onSBUpdateEnd),this.addBufferListener(d,"error",this._onSBUpdateError),this.tracks[i]={buffer:p,codec:u,container:a.container,levelCodec:a.levelCodec,metadata:a.metadata,id:a.id},r++}catch(e){l.logger.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:c})}}r&&this.hls.trigger(o.Events.BUFFER_CREATED,{tracks:this.tracks})},t._onSBUpdateStart=function(e){this.operationQueue.current(e).onStart()},t._onSBUpdateEnd=function(e){var t=this.operationQueue;t.current(e).onComplete(),t.shiftAndExecuteNext(e)},t._onSBUpdateError=function(e,t){l.logger.error("[buffer-controller]: "+e+" SourceBuffer error",t),this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.MEDIA_ERROR,details:s.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1});var n=this.operationQueue.current(e);n&&n.onError(t)},t.removeExecutor=function(e,t,n){var r=this.media,i=this.mediaSource,o=this.operationQueue,s=this.sourceBuffer[e];if(!r||!i||!s)return l.logger.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void o.shiftAndExecuteNext(e);var u=(0,a.isFiniteNumber)(r.duration)?r.duration:1/0,c=(0,a.isFiniteNumber)(i.duration)?i.duration:1/0,p=Math.max(0,t),d=Math.min(n,u,c);d>p&&!s.ending?(s.ended=!1,l.logger.log("[buffer-controller]: Removing ["+p+","+d+"] from the "+e+" SourceBuffer"),s.remove(p,d)):o.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return l.logger.warn("[buffer-controller]: Attempting to append to the "+t+" SourceBuffer, but it does not exist"),void n.shiftAndExecuteNext(t);r.ended=!1,r.appendBuffer(e)},t.blockBuffers=function(e,t){var n=this;if(void 0===t&&(t=this.getSourceBufferTypes()),!t.length)return l.logger.log("[buffer-controller]: Blocking operation requested, but no SourceBuffers exist"),void Promise.resolve().then(e);var r=this.operationQueue,i=t.map((function(e){return r.appendBlocker(e)}));Promise.all(i).then((function(){e(),t.forEach((function(e){var t=n.sourceBuffer[e];t&&t.updating||r.shiftAndExecuteNext(e)}))}))},t.getSourceBufferTypes=function(){return Object.keys(this.sourceBuffer)},t.addBufferListener=function(e,t,n){var r=this.sourceBuffer[e];if(r){var i=n.bind(this,e);this.listeners[e].push({event:t,listener:i}),r.addEventListener(t,i)}},t.removeBufferListeners=function(e){var t=this.sourceBuffer[e];t&&this.listeners[e].forEach((function(e){t.removeEventListener(e.event,e.listener)}))},e}(),Vt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},Ht=function(e){var t=e;return Vt.hasOwnProperty(e)&&(t=Vt[e]),String.fromCharCode(t)},Kt=100,Gt={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},zt={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Wt={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Yt={25:2,26:4,29:6,30:8,31:10,27:13,28:15},qt=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(e){e[e.ERROR=0]="ERROR",e[e.TEXT=1]="TEXT",e[e.WARNING=2]="WARNING",e[e.INFO=2]="INFO",e[e.DEBUG=3]="DEBUG",e[e.DATA=3]="DATA"}(Nt||(Nt={}));var Xt=function(){function e(){this.time=null,this.verboseLevel=Nt.ERROR}return e.prototype.log=function(e,t){if(this.verboseLevel>=e){var n="function"==typeof t?t():t;l.logger.log(this.time+" ["+e+"] "+n)}},e}(),$t=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},Qt=function(){function e(e,t,n,r,i){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=e||"white",this.underline=t||!1,this.italics=n||!1,this.background=r||"black",this.flash=i||!1}var t=e.prototype;return t.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},t.setStyles=function(e){for(var t=["foreground","underline","italics","background","flash"],n=0;n<t.length;n++){var r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}},t.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},t.equals=function(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash},t.copy=function(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash},t.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},e}(),Zt=function(){function e(e,t,n,r,i,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new Qt(t,n,r,i,a)}var t=e.prototype;return t.reset=function(){this.uchar=" ",this.penState.reset()},t.setChar=function(e,t){this.uchar=e,this.penState.copy(t)},t.setPenState=function(e){this.penState.copy(e)},t.equals=function(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)},t.copy=function(e){this.uchar=e.uchar,this.penState.copy(e.penState)},t.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},e}(),Jt=function(){function e(e){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var t=0;t<Kt;t++)this.chars.push(new Zt);this.logger=e,this.pos=0,this.currPenState=new Qt}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<Kt;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<Kt;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<Kt;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e},t.setCursor=function(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(Nt.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>Kt&&(this.logger.log(Nt.DEBUG,"Too large cursor position "+this.pos),this.pos=Kt)},t.moveCursor=function(e){var t=this.pos+e;if(e>1)for(var n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)},t.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},t.insertChar=function(e){var t=this;e>=144&&this.backSpace();var n=Ht(e);this.pos>=Kt?this.logger.log(Nt.ERROR,(function(){return"Cannot insert "+e.toString(16)+" ("+n+") at position "+t.pos+". Skipping it!"})):(this.chars[this.pos].setChar(n,this.currPenState),this.moveCursor(1))},t.clearFromPos=function(e){var t;for(t=e;t<Kt;t++)this.chars[t].reset()},t.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},t.clearToEndOfRow=function(){this.clearFromPos(this.pos)},t.getTextString=function(){for(var e=[],t=!0,n=0;n<Kt;n++){var r=this.chars[n].uchar;" "!==r&&(t=!1),e.push(r)}return t?"":e.join("")},t.setPenStyles=function(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)},e}(),en=function(){function e(e){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var t=0;t<15;t++)this.rows.push(new Jt(e));this.logger=e,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var t=e.prototype;return t.reset=function(){for(var e=0;e<15;e++)this.rows[e].clear();this.currRow=14},t.equals=function(e){for(var t=!0,n=0;n<15;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<15;t++)this.rows[t].copy(e.rows[t])},t.isEmpty=function(){for(var e=!0,t=0;t<15;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e},t.backSpace=function(){this.rows[this.currRow].backSpace()},t.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},t.insertChar=function(e){this.rows[this.currRow].insertChar(e)},t.setPen=function(e){this.rows[this.currRow].setPenStyles(e)},t.moveCursor=function(e){this.rows[this.currRow].moveCursor(e)},t.setCursor=function(e){this.logger.log(Nt.INFO,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(Nt.INFO,(function(){return"pacData = "+JSON.stringify(e)}));var t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(var n=0;n<15;n++)this.rows[n].clear();var r=this.currRow+1-this.nrRollUpRows,i=this.lastOutputScreen;if(i){var a=i.rows[r].cueStartTime,o=this.logger.time;if(a&&null!==o&&a<o)for(var s=0;s<this.nrRollUpRows;s++)this.rows[t-this.nrRollUpRows+s+1].copy(i.rows[r+s])}}this.currRow=t;var l=this.rows[this.currRow];if(null!==e.indent){var u=e.indent,c=Math.max(u-1,0);l.setCursor(e.indent),e.color=l.chars[c].penState.foreground}var p={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(p)},t.setBkgData=function(e){this.logger.log(Nt.INFO,(function(){return"bkgData = "+JSON.stringify(e)})),this.backSpace(),this.setPen(e),this.insertChar(32)},t.setRollUpRows=function(e){this.nrRollUpRows=e},t.rollUp=function(){var e=this;if(null!==this.nrRollUpRows){this.logger.log(Nt.TEXT,(function(){return e.getDisplayText()}));var t=this.currRow+1-this.nrRollUpRows,n=this.rows.splice(t,1)[0];n.clear(),this.rows.splice(this.currRow,0,n),this.logger.log(Nt.INFO,"Rolling up")}else this.logger.log(Nt.DEBUG,"roll_up but nrRollUpRows not set yet")},t.getDisplayText=function(e){e=e||!1;for(var t=[],n="",r=-1,i=0;i<15;i++){var a=this.rows[i].getTextString();a&&(r=i+1,e?t.push("Row "+r+": '"+a+"'"):t.push(a.trim()))}return t.length>0&&(n=e?"["+t.join(" | ")+"]":t.join("\n")),n},t.getTextAndFormat=function(){return this.rows},e}(),tn=function(){function e(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new en(n),this.nonDisplayedMemory=new en(n),this.lastOutputScreen=new en(n),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}var t=e.prototype;return t.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},t.getHandler=function(){return this.outputFilter},t.setHandler=function(e){this.outputFilter=e},t.setPAC=function(e){this.writeScreen.setPAC(e)},t.setBkgData=function(e){this.writeScreen.setBkgData(e)},t.setMode=function(e){e!==this.mode&&(this.mode=e,this.logger.log(Nt.INFO,(function(){return"MODE="+e})),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)},t.insertChars=function(e){for(var t=this,n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);var r=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(Nt.INFO,(function(){return r+": "+t.writeScreen.getDisplayText(!0)})),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(Nt.TEXT,(function(){return"DISPLAYED: "+t.displayedMemory.getDisplayText(!0)})),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(Nt.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(Nt.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},t.ccAOF=function(){},t.ccAON=function(){},t.ccDER=function(){this.logger.log(Nt.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(Nt.INFO,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(Nt.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(Nt.INFO,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(Nt.INFO,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(Nt.INFO,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(Nt.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(Nt.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(Nt.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){var e=this;if(this.logger.log(Nt.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(Nt.TEXT,(function(){return"DISP: "+e.displayedMemory.getDisplayText()}))}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(Nt.INFO,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)},t.ccMIDROW=function(e){var t={flash:!1};if(t.underline=e%2==1,t.italics=e>=46,t.italics)t.foreground="white";else{var n=Math.floor(e/2)-16;t.foreground=["white","green","blue","cyan","red","yellow","magenta"][n]}this.logger.log(Nt.INFO,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)},t.outputDataUpdate=function(e){void 0===e&&(e=!1);var t=this.logger.time;null!==t&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t):this.cueStartTime=t,this.lastOutputScreen.copy(this.displayedMemory))},t.cueSplitAtTime=function(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))},e}();function nn(e,t,n){n.a=e,n.b=t}function rn(e,t,n){return n.a===e&&n.b===t}const an=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new Xt;this.channels=[null,new tn(e,t,r),new tn(e+1,n,r)],this.cmdHistory={a:null,b:null},this.logger=r}var t=e.prototype;return t.getHandler=function(e){return this.channels[e].getHandler()},t.setHandler=function(e,t){this.channels[e].setHandler(t)},t.addData=function(e,t){var n,r,i,a=!1;this.logger.time=e;for(var o=0;o<t.length;o+=2)if(r=127&t[o],i=127&t[o+1],0!==r||0!==i){if(this.logger.log(Nt.DATA,"["+$t([t[o],t[o+1]])+"] -> ("+$t([r,i])+")"),(n=this.parseCmd(r,i))||(n=this.parseMidrow(r,i)),n||(n=this.parsePAC(r,i)),n||(n=this.parseBackgroundAttributes(r,i)),!n&&(a=this.parseChars(r,i))){var s=this.currentChannel;s&&s>0?this.channels[s].insertChars(a):this.logger.log(Nt.WARNING,"No channel found yet. TEXT-MODE?")}n||a||this.logger.log(Nt.WARNING,"Couldn't parse cleaned data "+$t([r,i])+" orig: "+$t([t[o],t[o+1]]))}},t.parseCmd=function(e,t){var n=this.cmdHistory;if(!((20===e||28===e||21===e||29===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=33&&t<=35))return!1;if(rn(e,t,n))return nn(null,null,n),this.logger.log(Nt.DEBUG,"Repeated command ("+$t([e,t])+") is dropped"),!0;var r=20===e||21===e||23===e?1:2,i=this.channels[r];return 20===e||21===e||28===e||29===e?32===t?i.ccRCL():33===t?i.ccBS():34===t?i.ccAOF():35===t?i.ccAON():36===t?i.ccDER():37===t?i.ccRU(2):38===t?i.ccRU(3):39===t?i.ccRU(4):40===t?i.ccFON():41===t?i.ccRDC():42===t?i.ccTR():43===t?i.ccRTD():44===t?i.ccEDM():45===t?i.ccCR():46===t?i.ccENM():47===t&&i.ccEOC():i.ccTO(t-32),nn(e,t,n),this.currentChannel=r,!0},t.parseMidrow=function(e,t){var n=0;if((17===e||25===e)&&t>=32&&t<=47){if((n=17===e?1:2)!==this.currentChannel)return this.logger.log(Nt.ERROR,"Mismatch channel in midrow parsing"),!1;var r=this.channels[n];return!!r&&(r.ccMIDROW(t),this.logger.log(Nt.DEBUG,"MIDROW ("+$t([e,t])+")"),!0)}return!1},t.parsePAC=function(e,t){var n,r=this.cmdHistory;if(!((e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127||(16===e||24===e)&&t>=64&&t<=95))return!1;if(rn(e,t,r))return nn(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?Gt[e]:Wt[e]:1===i?zt[e]:Yt[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),nn(e,t,r),this.currentChannel=i,!0)},t.interpretPAC=function(e,t){var n,r={color:null,italics:!1,indent:null,underline:!1,row:e};return n=t>95?t-96:t-64,r.underline=1==(1&n),n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=4*Math.floor((n-16)/2),r},t.parseChars=function(e,t){var n,r,i=null,a=null;if(e>=25?(n=2,a=e-8):(n=1,a=e),a>=17&&a<=19?(r=17===a?t+80:18===a?t+112:t+144,this.logger.log(Nt.INFO,"Special char '"+Ht(r)+"' in channel "+n),i=[r]):e>=32&&e<=127&&(i=0===t?[e]:[e,t]),i){var o=$t(i);this.logger.log(Nt.DEBUG,"Char codes = "+o.join(",")),nn(e,t,this.cmdHistory)}return i},t.parseBackgroundAttributes=function(e,t){var n;if(!((16===e||24===e)&&t>=32&&t<=47||(23===e||31===e)&&t>=45&&t<=47))return!1;var r={};16===e||24===e?(n=Math.floor((t-32)/2),r.background=qt[n],t%2==1&&(r.background=r.background+"_semi")):45===t?r.background="transparent":(r.foreground="black",47===t&&(r.underline=!0));var i=e<=23?1:2;return this.channels[i].setBkgData(r),nn(e,t,this.cmdHistory),!0},t.reset=function(){for(var e=0;e<Object.keys(this.channels).length;e++){var t=this.channels[e];t&&t.reset()}this.cmdHistory={a:null,b:null}},t.cueSplitAtTime=function(e){for(var t=0;t<this.channels.length;t++){var n=this.channels[t];n&&n.cueSplitAtTime(e)}},e}();var on=function(){function e(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}var t=e.prototype;return t.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},t.newCue=function(e,t,n){(null===this.startTime||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)},t.reset=function(){this.cueRanges=[],this.startTime=null},e}();const sn=function(){if("undefined"!=typeof self&&self.VTTCue)return self.VTTCue;var e=["","lr","rl"],t=["start","middle","end","left","right"];function n(e,t){if("string"!=typeof t)return!1;if(!Array.isArray(e))return!1;var n=t.toLowerCase();return!!~e.indexOf(n)&&n}function r(e){return n(t,e)}function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=1;i<arguments.length;i++){var a=arguments[i];for(var o in a)e[o]=a[o]}return e}function a(t,a,o){var s=this,l={enumerable:!0};s.hasBeenReset=!1;var u="",c=!1,p=t,d=a,f=o,h=null,g="",y=!0,v="auto",m="start",b=50,_="middle",E=50,k="middle";Object.defineProperty(s,"id",i({},l,{get:function(){return u},set:function(e){u=""+e}})),Object.defineProperty(s,"pauseOnExit",i({},l,{get:function(){return c},set:function(e){c=!!e}})),Object.defineProperty(s,"startTime",i({},l,{get:function(){return p},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},l,{get:function(){return f},set:function(e){f=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},l,{get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"vertical",i({},l,{get:function(){return g},set:function(t){var r=function(t){return n(e,t)}(t);if(!1===r)throw new SyntaxError("An invalid or illegal string was specified.");g=r,this.hasBeenReset=!0}})),Object.defineProperty(s,"snapToLines",i({},l,{get:function(){return y},set:function(e){y=!!e,this.hasBeenReset=!0}})),Object.defineProperty(s,"line",i({},l,{get:function(){return v},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"lineAlign",i({},l,{get:function(){return m},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"position",i({},l,{get:function(){return b},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"positionAlign",i({},l,{get:function(){return _},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(s,"size",i({},l,{get:function(){return E},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");E=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"align",i({},l,{get:function(){return k},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");k=t,this.hasBeenReset=!0}})),s.displayState=void 0}return a.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},a}();var ln=function(){function e(){}return e.prototype.decode=function(e,t){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))},e}();function un(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+parseFloat(r||0)}var n=e.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return n?parseFloat(n[2])>59?t(n[2],n[3],0,n[4]):t(n[1],n[2],n[3],n[4]):null}var cn=function(){function e(){this.values=Object.create(null)}var t=e.prototype;return t.set=function(e,t){this.get(e)||""===t||(this.values[e]=t)},t.get=function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},t.has=function(e){return e in this.values},t.alt=function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},t.integer=function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},t.percent=function(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){var n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1},e}();function pn(e,t,n,r){var i=r?e.split(r):[e];for(var a in i)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}var dn=new sn(0,0,""),fn="middle"===dn.align?"middle":"center";function hn(e,t,n){var r=e;function i(){var t=un(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=i(),a(),"--\x3e"!==e.slice(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.slice(3),a(),t.endTime=i(),a(),function(e,t){var r=new cn;pn(e,(function(e,t){var i;switch(e){case"region":for(var a=n.length-1;a>=0;a--)if(n[a].id===t){r.set(e,n[a].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":i=t.split(","),r.integer(e,i[0]),r.percent(e,i[0])&&r.set("snapToLines",!1),r.alt(e,i[0],["auto"]),2===i.length&&r.alt("lineAlign",i[1],["start",fn,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",fn,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",fn,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===dn.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",fn);var a=r.get("position","auto");"auto"===a&&50===dn.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function gn(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var yn=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new ln,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}var t=e.prototype;return t.parse=function(e){var t=this;function n(){var e=t.buffer,n=0;for(e=gn(e);n<e.length&&"\r"!==e[n]&&"\n"!==e[n];)++n;var r=e.slice(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.slice(n),r}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{var r="";if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;var i=(r=n()).match(/^()?WEBVTT([ \t].*)?$/);if(!i||!i[0])throw new Error("Malformed WebVTT signature.");t.state="HEADER"}for(var a=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(a?a=!1:r=n(),t.state){case"HEADER":/:/.test(r)?pn(r,(function(e,t){}),/:/):r||(t.state="ID");continue;case"NOTE":r||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){t.state="NOTE";break}if(!r)continue;if(t.cue=new sn(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{hn(r,t.cue,t.regionList)}catch(e){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":var o=-1!==r.indexOf("--\x3e");if(!r||o&&(a=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(null===t.cue)continue;t.cue.text&&(t.cue.text+="\n"),t.cue.text+=r;continue;case"BADCUE":r||(t.state="ID")}}}catch(e){"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},t.flush=function(){var e=this;try{if((e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state||"BADWEBVTT"===e.state)throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this},e}(),vn=n(673),mn=n(524),bn=/\r\n|\n\r|\n|\r/g,_n=function(e,t,n){return void 0===n&&(n=0),e.slice(n,n+t.length)===t},En=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()};function kn(e,t,n){return En(e.toString())+En(t.toString())+En(n)}function Tn(){return(Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var An="stpp.ttml.im1t",wn=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Sn=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,Cn={left:"start",center:"center",right:"end",start:"start",end:"end"};function xn(e,t,n,r,i){var a=(0,w.findBox)(new Uint8Array(e),["mdat"]);if(0!==a.length){var o=a.map((function(e){return(0,X.utf8ArrayToStr)(e)})),s=(0,vn.toTimescaleFromScale)(t,1,n);try{o.forEach((function(e){return r(function(e,t){var n=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");var r={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},i=Object.keys(r).reduce((function(e,t){return e[t]=n.getAttribute("ttp:"+t)||r[t],e}),{}),a="preserve"!==n.getAttribute("xml:space"),o=Pn(In(n,"styling","style")),s=Pn(In(n,"layout","region")),l=In(n,"body","[begin]");return[].map.call(l,(function(e){var n=function e(t,n){return[].slice.call(t.childNodes).reduce((function(t,r,i){var a;return"br"===r.nodeName&&i?t+"\n":null!==(a=r.childNodes)&&void 0!==a&&a.length?e(r,n):n?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent}),"")}(e,a);if(!n||!e.hasAttribute("begin"))return null;var r=On(e.getAttribute("begin"),i),l=On(e.getAttribute("dur"),i),u=On(e.getAttribute("end"),i);if(null===r)throw Rn(e);if(null===u){if(null===l)throw Rn(e);u=r+l}var c=new sn(r-t,u-t,n);c.id=kn(c.startTime,c.endTime,c.text);var p=function(e,t,n){var r="http://www.w3.org/ns/ttml#styling",i=null,a=null!=e&&e.hasAttribute("style")?e.getAttribute("style"):null;return a&&n.hasOwnProperty(a)&&(i=n[a]),["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"].reduce((function(n,a){var o=Dn(t,r,a)||Dn(e,r,a)||Dn(i,r,a);return o&&(n[a]=o),n}),{})}(s[e.getAttribute("region")],o[e.getAttribute("style")],o),d=p.textAlign;if(d){var f=Cn[d];f&&(c.lineAlign=f),c.align=d}return Tn(c,p),c})).filter((function(e){return null!==e}))}(e,s))}))}catch(e){i(e)}}else i(new Error("Could not parse IMSC1 mdat"))}function In(e,t,n){var r=e.getElementsByTagName(t)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function Pn(e){return e.reduce((function(e,t){var n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function Dn(e,t,n){return e&&e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function Rn(e){return new Error("Could not parse ttml timestamp "+e)}function On(e,t){if(!e)return null;var n=un(e);return null===n&&(wn.test(e)?n=function(e,t){var n=wn.exec(e),r=(0|n[4])+(0|n[5])/t.subFrameRate;return 3600*(0|n[1])+60*(0|n[2])+(0|n[3])+r/t.frameRate}(e,t):Sn.test(e)&&(n=function(e,t){var n=Sn.exec(e),r=Number(n[1]);switch(n[2]){case"h":return 3600*r;case"m":return 60*r;case"ms":return 1e3*r;case"f":return r/t.frameRate;case"t":return r/t.tickRate}return r}(e,t))),n}var Ln=function(){function e(e){if(this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.timescale=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},this.config.enableCEA708Captions){var t=new on(this,"textTrack1"),n=new on(this,"textTrack2"),r=new on(this,"textTrack3"),i=new on(this,"textTrack4");this.cea608Parser1=new an(1,t,n),this.cea608Parser2=new an(3,r,i)}e.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.on(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(o.Events.FRAG_LOADING,this.onFragLoading,this),e.on(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.on(o.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(o.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(o.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(o.Events.MANIFEST_LOADING,this.onManifestLoading,this),e.off(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(o.Events.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(o.Events.FRAG_LOADING,this.onFragLoading,this),e.off(o.Events.FRAG_LOADED,this.onFragLoaded,this),e.off(o.Events.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(o.Events.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(o.Events.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(o.Events.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(o.Events.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.cea608Parser1=this.cea608Parser2=null},t.addCues=function(e,t,n,r,i){for(var a,s,l,u,c=!1,p=i.length;p--;){var d=i[p],f=(a=d[0],s=d[1],l=t,u=n,Math.min(s,u)-Math.max(a,l));if(f>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),c=!0,f/(n-t)>.5))return}if(c||i.push([t,n]),this.config.renderTextTracksNatively){var h=this.captionsTracks[e];this.Cues.newCue(h,t,n,r)}else{var g=this.Cues.newCue(null,t,n,r);this.hls.trigger(o.Events.CUES_PARSED,{type:"captions",cues:g,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,i=t.id,a=t.initPTS,s=t.timescale,l=this.unparsedVttFrags;"main"===i&&(this.initPTS[r.cc]=a,this.timescale[r.cc]=s),l.length&&(this.unparsedVttFrags=[],l.forEach((function(e){n.onFragLoaded(o.Events.FRAG_LOADED,e)})))},t.getExistingTrack=function(e){var t=this.media;if(t)for(var n=0;n<t.textTracks.length;n++){var r=t.textTracks[n];if(r[e])return r}return null},t.createCaptionsTrack=function(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)},t.createNativeTrack=function(e){if(!this.captionsTracks[e]){var t=this.captionsProperties,n=this.captionsTracks,r=this.media,i=t[e],a=i.label,o=i.languageCode,s=this.getExistingTrack(e);if(s)n[e]=s,Y(n[e]),z(n[e],r);else{var l=this.createTextTrack("captions",a,o);l&&(l[e]=!0,n[e]=l)}}},t.createNonNativeTrack=function(e){if(!this.nonNativeCaptionsTracks[e]){var t=this.captionsProperties[e];if(t){var n={_id:e,label:t.label,kind:"captions",default:!!t.media&&!!t.media.default,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(o.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}}},t.createTextTrack=function(e,t,n){var r=this.media;if(r)return r.addTextTrack(e,t,n)},t.onMediaAttaching=function(e,t){this.media=t.media,this._cleanTracks()},t.onMediaDetaching=function(){var e=this.captionsTracks;Object.keys(e).forEach((function(t){Y(e[t]),delete e[t]})),this.nonNativeCaptionsTracks={}},t.onManifestLoading=function(){this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.timescale=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())},t._cleanTracks=function(){var e=this.media;if(e){var t=e.textTracks;if(t)for(var n=0;n<t.length;n++)Y(t[n])}},t.onSubtitleTracksUpdated=function(e,t){var n=this;this.textTracks=[];var r=t.subtitleTracks||[],i=r.some((function(e){return e.textCodec===An}));if(this.config.enableWebVTT||i&&this.config.enableIMSC1){var a=this.tracks&&r&&this.tracks.length===r.length;if(this.tracks=r||[],this.config.renderTextTracksNatively){var s=this.media?this.media.textTracks:[];this.tracks.forEach((function(e,t){var r;if(t<s.length){for(var i=null,a=0;a<s.length;a++)if(Mn(s[a],e)){i=s[a];break}i&&(r=i)}if(r)Y(r);else{var o=n._captionsOrSubtitlesFromCharacteristics(e);(r=n.createTextTrack(o,e.name,e.lang))&&(r.mode="disabled")}r&&(r.groupId=e.groupId,n.textTracks.push(r))}))}else if(!a&&this.tracks&&this.tracks.length){var l=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(o.Events.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:l})}}},t._captionsOrSubtitlesFromCharacteristics=function(e){var t;if(null!==(t=e.attrs)&&void 0!==t&&t.CHARACTERISTICS){var n=/transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS),r=/describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS);if(n&&r)return"captions"}return"subtitles"},t.onManifestLoaded=function(e,t){var n=this;this.config.enableCEA708Captions&&t.captions&&t.captions.forEach((function(e){var t=/(?:CC|SERVICE)([1-4])/.exec(e.instreamId);if(t){var r="textTrack"+t[1],i=n.captionsProperties[r];i&&(i.label=e.name,e.lang&&(i.languageCode=e.lang),i.media=e)}}))},t.closedCaptionsForLevel=function(e){var t=this.hls.levels[e.level];return null==t?void 0:t.attrs["CLOSED-CAPTIONS"]},t.onFragLoading=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2,i=this.lastSn,a=this.lastPartIndex;if(this.enabled&&n&&r&&t.frag.type===H.PlaylistLevelType.MAIN){var o,s,l=t.frag.sn,u=null!=(o=null==t||null===(s=t.part)||void 0===s?void 0:s.index)?o:-1;l===i+1||l===i&&u===a+1||(n.reset(),r.reset()),this.lastSn=l,this.lastPartIndex=u}},t.onFragLoaded=function(e,t){var n=t.frag,r=t.payload,i=this.initPTS,s=this.unparsedVttFrags;if(n.type===H.PlaylistLevelType.SUBTITLE)if(r.byteLength){if(!(0,a.isFiniteNumber)(i[n.cc]))return s.push(t),void(i.length&&this.hls.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Missing initial subtitle PTS")}));var l=n.decryptdata,u="stats"in t;if(null==l||!l.encrypted||u){var c=this.tracks[n.level],p=this.vttCCs;p[n.cc]||(p[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),c&&c.textCodec===An?this._parseIMSC1(n,r):this._parseVTTs(n,r,p)}}else this.hls.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var n=this,r=this.hls;xn(t,this.initPTS[e.cc],this.timescale[e.cc],(function(t){n._appendCues(t,e.level),r.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){l.logger.log("Failed to parse IMSC1: "+t),r.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e,t,n){var r,i=this,s=this.hls;!function(e,t,n,r,i,o,s,l){var u,c=new yn,p=(0,X.utf8ArrayToStr)(new Uint8Array(e)).trim().replace(bn,"\n").split("\n"),d=[],f=(0,vn.toMpegTsClockFromTimescale)(t,n),h="00:00.000",g=0,y=0,v=!0;c.oncue=function(e){var t=r[i],n=r.ccOffset,a=(g-f)/9e4;null!=t&&t.new&&(void 0!==y?n=r.ccOffset=t.start:function(e,t,n){var r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new)return e.ccOffset=e.presentationOffset=r.start,void(r.new=!1);for(;null!==(a=i)&&void 0!==a&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(r,i,a)),a&&(n=a-r.presentationOffset);var s=e.endTime-e.startTime,l=(0,mn.normalizePts)(9e4*(e.startTime+n-y),9e4*o)/9e4;e.startTime=Math.max(l,0),e.endTime=Math.max(l+s,0);var u=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(u)),e.id||(e.id=kn(e.startTime,e.endTime,u)),e.endTime>0&&d.push(e)},c.onparsingerror=function(e){u=e},c.onflush=function(){u?l(u):s(d)},p.forEach((function(e){if(v){if(_n(e,"X-TIMESTAMP-MAP=")){v=!1,e.slice(16).split(",").forEach((function(e){_n(e,"LOCAL:")?h=e.slice(6):_n(e,"MPEGTS:")&&(g=parseInt(e.slice(7)))}));try{y=function(e){var t=parseInt(e.slice(-3)),n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!((0,a.isFiniteNumber)(t)&&(0,a.isFiniteNumber)(n)&&(0,a.isFiniteNumber)(r)&&(0,a.isFiniteNumber)(i)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,(t+=6e4*r)+36e5*i}(h)/1e3}catch(e){u=e}return}""===e&&(v=!1)}c.parse(e+"\n")})),c.flush()}(null!==(r=e.initSegment)&&void 0!==r&&r.data?(0,w.appendUint8Array)(e.initSegment.data,new Uint8Array(t)):t,this.initPTS[e.cc],this.timescale[e.cc],n,e.cc,e.start,(function(t){i._appendCues(t,e.level),s.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(n){i._fallbackToIMSC1(e,t),l.logger.log("Failed to parse VTT cue: "+n),s.trigger(o.Events.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})}))},t._fallbackToIMSC1=function(e,t){var n=this,r=this.tracks[e.level];r.textCodec||xn(t,this.initPTS[e.cc],this.timescale[e.cc],(function(){r.textCodec=An,n._parseIMSC1(e,t)}),(function(){r.textCodec="wvtt"}))},t._appendCues=function(e,t){var n=this.hls;if(this.config.renderTextTracksNatively){var r=this.textTracks[t];if(!r||"disabled"===r.mode)return;e.forEach((function(e){return W(r,e)}))}else{var i=this.tracks[t];if(!i)return;var a=i.default?"default":"subtitles"+t;n.trigger(o.Events.CUES_PARSED,{type:"subtitles",cues:e,track:a})}},t.onFragDecrypted=function(e,t){var n=t.frag;if(n.type===H.PlaylistLevelType.SUBTITLE){if(!(0,a.isFiniteNumber)(this.initPTS[n.cc]))return void this.unparsedVttFrags.push(t);this.onFragLoaded(o.Events.FRAG_LOADED,t)}},t.onSubtitleTracksCleared=function(){this.tracks=[],this.captionsTracks={}},t.onFragParsingUserdata=function(e,t){var n=this.cea608Parser1,r=this.cea608Parser2;if(this.enabled&&n&&r){var i=t.frag,a=t.samples;if(i.type!==H.PlaylistLevelType.MAIN||"NONE"!==this.closedCaptionsForLevel(i))for(var o=0;o<a.length;o++){var s=a[o].bytes;if(s){var l=this.extractCea608Data(s);n.addData(a[o].pts,l[0]),r.addData(a[o].pts,l[1])}}}},t.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset,i=t.endOffsetSubtitles,a=t.type,o=this.media;if(o&&!(o.currentTime<r)){if(!a||"video"===a){var s=this.captionsTracks;Object.keys(s).forEach((function(e){return q(s[e],n,r)}))}if(this.config.renderTextTracksNatively&&0===n&&void 0!==i){var l=this.textTracks;Object.keys(l).forEach((function(e){return q(l[e],n,i)}))}}},t.extractCea608Data=function(e){for(var t=[[],[]],n=31&e[0],r=2,i=0;i<n;i++){var a=e[r++],o=127&e[r++],s=127&e[r++];if((0!==o||0!==s)&&0!=(4&a)){var l=3&a;0!==l&&1!==l||(t[l].push(o),t[l].push(s))}}return t},e}();function Mn(e,t){return e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}const Nn=function(){function e(e){this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.hls=void 0,this.streamController=void 0,this.clientRect=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}var t,n,r=e.prototype;return r.setStreamController=function(e){this.streamController=e},r.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},r.registerListeners=function(){var e=this.hls;e.on(o.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.on(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.on(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},r.unregisterListener=function(){var e=this.hls;e.off(o.Events.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(o.Events.MANIFEST_PARSED,this.onManifestParsed,this),e.off(o.Events.BUFFER_CODECS,this.onBufferCodecs,this),e.off(o.Events.MEDIA_DETACHING,this.onMediaDetaching,this)},r.onFpsDropLevelCapping=function(t,n){e.isLevelAllowed(n.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(n.droppedLevel)},r.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null},r.onManifestParsed=function(e,t){var n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()},r.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},r.onMediaDetaching=function(){this.stopCapping()},r.detectPlayerSize=function(){if(this.media&&this.mediaHeight>0&&this.mediaWidth>0){var e=this.hls.levels;if(e.length){var t=this.hls;t.autoLevelCapping=this.getMaxLevel(e.length-1),t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}},r.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(r,i){return e.isLevelAllowed(i,n.restrictedLevels)&&i<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},r.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},r.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},r.getDimensions=function(){if(this.clientRect)return this.clientRect;var e=this.media,t={width:0,height:0};if(e){var n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,t.width||t.height||(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t},e.isLevelAllowed=function(e,t){return void 0===t&&(t=[]),-1===t.indexOf(e)},e.getMaxLevelByMediaSize=function(e,t,n){if(!e||!e.length)return-1;for(var r,i,a=e.length-1,o=0;o<e.length;o+=1){var s=e[o];if((s.width>=t||s.height>=n)&&(r=s,!(i=e[o+1])||r.width!==i.width||r.height!==i.height)){a=o;break}}return a},t=e,(n=[{key:"mediaWidth",get:function(){return this.getDimensions().width*this.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*this.contentScaleFactor}},{key:"contentScaleFactor",get:function(){var e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(e){}return e}}])&&function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Un=function(){function e(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}var t=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.registerListeners=function(){this.hls.on(o.Events.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(o.Events.MEDIA_ATTACHING,this.onMediaAttaching)},t.destroy=function(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null},t.onMediaAttaching=function(e,t){var n=this.hls.config;if(n.capLevelOnFPSDrop){var r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&"function"==typeof r.getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}},t.checkFPS=function(e,t,n){var r=performance.now();if(t){if(this.lastTime){var i=r-this.lastTime,a=n-this.lastDroppedFrames,s=t-this.lastDecodedFrames,u=1e3*a/i,c=this.hls;if(c.trigger(o.Events.FPS_DROP,{currentDropped:a,currentDecoded:s,totalDroppedFrames:n}),u>0&&a>c.config.fpsDroppedMonitoringThreshold*s){var p=c.currentLevel;l.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+p),p>0&&(-1===c.autoLevelCapping||c.autoLevelCapping>=p)&&(p-=1,c.trigger(o.Events.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}},t.checkFPSInterval=function(){var e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){var t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)},e}();var Fn=n(300);function jn(e){var t="function"==typeof Map?new Map:void 0;return(jn=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return Bn(e,arguments,Kn(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Hn(r,e)})(e)}function Bn(e,t,n){return(Bn=Vn()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&Hn(i,n.prototype),i}).apply(null,arguments)}function Vn(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function Hn(e,t){return(Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Kn(e){return(Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gn="[eme]",zn=function(){function e(t){this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=e.CDMCleanupPromise?[e.CDMCleanupPromise]:[],this.onMediaEncrypted=this._onMediaEncrypted.bind(this),this.onWaitingForKey=this._onWaitingForKey.bind(this),this.debug=l.logger.debug.bind(l.logger,Gn),this.log=l.logger.log.bind(l.logger,Gn),this.warn=l.logger.warn.bind(l.logger,Gn),this.error=l.logger.error.bind(l.logger,Gn),this.hls=t,this.config=t.config,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null},t.registerListeners=function(){this.hls.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},t.unregisterListeners=function(){this.hls.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(o.Events.MANIFEST_LOADED,this.onManifestLoaded,this)},t.getLicenseServerUrl=function(e){var t=this.config,n=t.drmSystems,r=t.widevineLicenseUrl,i=n[e];if(i)return i.licenseUrl;if(e===f.WIDEVINE&&r)return r;throw new Error('no license server URL configured for key-system "'+e+'"')},t.getServerCertificateUrl=function(e){var t=this.config.drmSystems[e];if(t)return t.serverCertificateUrl;this.log('No Server Certificate in config.drmSystems["'+e+'"]')},t.attemptKeySystemAccess=function(e){var t=this,n=this.hls.levels,r=function(e,t,n){return!!e&&n.indexOf(e)===t},i=n.map((function(e){return e.audioCodec})).filter(r),a=n.map((function(e){return e.videoCodec})).filter(r);return i.length+a.length===0&&a.push("avc1.42e01e"),new Promise((function(n,r){!function e(o){var l=o.shift();t.getMediaKeysPromise(l,i,a).then((function(e){return n({keySystem:l,mediaKeys:e})})).catch((function(t){o.length?e(o):r(t instanceof Wn?t:new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_ACCESS,error:t,fatal:!0},t.message))}))}(e)}))},t.requestMediaKeySystemAccess=function(e,t){var n=this.config.requestMediaKeySystemAccessFunc;if("function"!=typeof n){var r="Configured requestMediaKeySystemAccess is not a function "+n;return null===A&&"http:"===self.location.protocol&&(r="navigator.requestMediaKeySystemAccess is not available over insecure protocol "+location.protocol),Promise.reject(new Error(r))}return n(e,t)},t.getMediaKeysPromise=function(e,t,n){var r=this,i=function(e,t,n,r){var i;switch(e){case f.FAIRPLAY:i=["cenc","sinf"];break;case f.WIDEVINE:case f.PLAYREADY:i=["cenc"];break;case f.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error("Unknown key-system: "+e)}return function(e,t,n,r){return[{initDataTypes:e,persistentState:r.persistentState||"not-allowed",distinctiveIdentifier:r.distinctiveIdentifier||"not-allowed",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:t.map((function(e){return{contentType:'audio/mp4; codecs="'+e+'"',robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null}})),videoCapabilities:n.map((function(e){return{contentType:'video/mp4; codecs="'+e+'"',robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}}))}]}(i,t,n,r)}(e,t,n,this.config.drmSystemOptions),a=this.keySystemAccessPromises[e],o=null==a?void 0:a.keySystemAccess;if(!o){this.log('Requesting encrypted media "'+e+'" key-system access with config: '+JSON.stringify(i)),o=this.requestMediaKeySystemAccess(e,i);var s=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch((function(t){r.log('Failed to obtain access to key-system "'+e+'": '+t)})),o.then((function(t){r.log('Access for key-system "'+t.keySystem+'" obtained');var n=r.fetchServerCertificate(e);return r.log('Create media-keys for "'+e+'"'),s.mediaKeys=t.createMediaKeys().then((function(t){return r.log('Media-keys created for "'+e+'"'),n.then((function(n){return n?r.setMediaKeysServerCertificate(t,e,n):t}))})),s.mediaKeys.catch((function(t){r.error('Failed to create media-keys for "'+e+'"}: '+t)})),s.mediaKeys}))}return o.then((function(){return a.mediaKeys}))},t.createMediaKeySessionContext=function(e){var t=e.decryptdata,n=e.keySystem,r=e.mediaKeys;this.log('Creating key-system session "'+n+'" keyId: '+Fn.default.hexDump(t.keyId||[]));var i=r.createSession(),a={decryptdata:t,keySystem:n,mediaKeys:r,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(a),a},t.renewKeySession=function(e){var t=e.decryptdata;if(t.pssh){var n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t);this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,"cenc",t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)},t.getKeyIdString=function(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(null===e.keyId)throw new Error("keyId is null");return Fn.default.hexDump(e.keyId)},t.updateKeySession=function(e,t){var n,r=e.mediaKeysSession;return this.log('Updating key-session "'+r.sessionId+'" for keyID '+Fn.default.hexDump((null===(n=e.decryptdata)||void 0===n?void 0:n.keyId)||[])+"\n } (data length: "+(t?t.byteLength:t)+")"),r.update(t)},t.selectKeySystemFormat=function(e){var t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log("Selecting key-system from fragment (sn: "+e.sn+" "+e.type+": "+e.level+") key formats "+t.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise},t.getKeyFormatPromise=function(e){var t=this;return new Promise((function(n,r){var i=T(t.config),a=e.map(E).filter((function(e){return!!e&&-1!==i.indexOf(e)}));return t.getKeySystemSelectionPromise(a).then((function(e){var t=e.keySystem,i=k(t);i?n(i):r(new Error('Unable to find format for key-system "'+t+'"'))})).catch(r)}))},t.loadKey=function(e){var t=this,n=e.keyInfo.decryptdata,r=this.getKeyIdString(n),i="(keyId: "+r+' format: "'+n.keyFormat+'" method: '+n.method+" uri: "+n.uri+")";this.log("Starting session for key "+i);var a=this.keyIdToKeySessionPromise[r];return a||(a=this.keyIdToKeySessionPromise[r]=this.getKeySystemForKeyPromise(n).then((function(r){var a=r.keySystem,o=r.mediaKeys;return t.throwIfDestroyed(),t.log("Handle encrypted media sn: "+e.frag.sn+" "+e.frag.type+": "+e.frag.level+" using key "+i),t.attemptSetMediaKeys(a,o).then((function(){t.throwIfDestroyed();var e=t.createMediaKeySessionContext({keySystem:a,mediaKeys:o,decryptdata:n});return t.generateRequestWithPreferredKeySession(e,"cenc",n.pssh,"playlist-key")}))}))).catch((function(e){return t.handleError(e)})),a},t.throwIfDestroyed=function(e){if(void 0===e&&(e="Invalid state"),!this.hls)throw new Error("invalid state")},t.handleError=function(e){this.hls&&(this.error(e.message),e instanceof Wn?this.hls.trigger(o.Events.ERROR,e.data):this.hls.trigger(o.Events.ERROR,{type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))},t.getKeySystemForKeyPromise=function(e){var t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){var r=E(e.keyFormat),i=r?[r]:T(this.config);return this.attemptKeySystemAccess(i)}return n},t.getKeySystemSelectionPromise=function(e){if(e.length||(e=T(this.config)),0===e.length)throw new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},"Missing key-system license configuration options "+JSON.stringify({drmSystems:this.config.drmSystems}));return this.attemptKeySystemAccess(e)},t._onMediaEncrypted=function(e){var t=this,n=e.initDataType,r=e.initData;if(this.debug('"'+e.type+'" event: init data type: "'+n+'"'),null!==r){var i,a;if("sinf"===n&&this.config.drmSystems[f.FAIRPLAY]){var o=(0,w.bin2str)(new Uint8Array(r));try{var s=b(JSON.parse(o).sinf),l=(0,w.parseSinf)(new Uint8Array(s));if(!l)return;i=l.subarray(8,24),a=f.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{var u=(0,w.parsePssh)(r);if(null===u)return;0===u.version&&u.systemId===g.WIDEVINE&&u.data&&(i=u.data.subarray(8,24)),a=function(e){if(e===g.WIDEVINE)return f.WIDEVINE}(u.systemId)}if(a&&i){for(var c=Fn.default.hexDump(i),p=this.keyIdToKeySessionPromise,d=this.mediaKeySessions,h=p[c],y=function(e){var a=d[e],o=a.decryptdata;if(o.pssh||!o.keyId)return"continue";var s=Fn.default.hexDump(o.keyId);return c===s||-1!==o.uri.replace(/-/g,"").indexOf(c)?(h=p[s],delete p[s],o.pssh=new Uint8Array(r),o.keyId=i,h=p[c]=h.then((function(){return t.generateRequestWithPreferredKeySession(a,n,r,"encrypted-event-key-match")})),"break"):void 0},v=0;v<d.length;v++){var m=y(v);if("continue"!==m&&"break"===m)break}h||(h=p[c]=this.getKeySystemSelectionPromise([a]).then((function(e){var a,o=e.keySystem,s=e.mediaKeys;t.throwIfDestroyed();var l=new C("ISO-23001-7",c,null!=(a=k(o))?a:"");return l.pssh=new Uint8Array(r),l.keyId=i,t.attemptSetMediaKeys(o,s).then((function(){t.throwIfDestroyed();var e=t.createMediaKeySessionContext({decryptdata:l,keySystem:o,mediaKeys:s});return t.generateRequestWithPreferredKeySession(e,n,r,"encrypted-event-no-match")}))}))),h.catch((function(e){return t.handleError(e)}))}}},t._onWaitingForKey=function(e){this.log('"'+e.type+'" event')},t.attemptSetMediaKeys=function(e,t){var n=this,r=this.setMediaKeysQueue.slice();this.log('Setting media-keys for "'+e+'"');var i=Promise.all(r).then((function(){if(!n.media)throw new Error("Attempted to set mediaKeys without media element attached");return n.media.setMediaKeys(t)}));return this.setMediaKeysQueue.push(i),i.then((function(){n.log('Media-keys set for "'+e+'"'),r.push(i),n.setMediaKeysQueue=n.setMediaKeysQueue.filter((function(e){return-1===r.indexOf(e)}))}))},t.generateRequestWithPreferredKeySession=function(e,t,n,r){var i,a,o=this,l=null===(i=this.config.drmSystems)||void 0===i||null===(a=i[e.keySystem])||void 0===a?void 0:a.generateRequest;if(l)try{var u=l.call(this.hls,t,n,e);if(!u)throw new Error("Invalid response from configured generateRequest filter");t=u.initDataType,n=e.decryptdata.pssh=u.initData?new Uint8Array(u.initData):null}catch(e){var c;if(this.warn(e.message),null!==(c=this.hls)&&void 0!==c&&c.config.debug)throw e}if(null===n)return this.log('Skipping key-session request for "'+r+'" (no initData)'),Promise.resolve(e);var p=this.getKeyIdString(e.decryptdata);this.log('Generating key-session request for "'+r+'": '+p+" (init data type: "+t+" length: "+(n?n.byteLength:null)+")");var d=new(gt());e.mediaKeysSession.onmessage=function(t){var n=e.mediaKeysSession;if(n){var r=t.messageType,i=t.message;o.log('"'+r+'" message event for session "'+n.sessionId+'" message size: '+i.byteLength),"license-request"===r||"license-renewal"===r?o.renewLicense(e,i).catch((function(e){o.handleError(e),d.emit("error",e)})):"license-release"===r?e.keySystem===f.FAIRPLAY&&(o.updateKeySession(e,_("acknowledged")),o.removeSession(e)):o.warn('unhandled media key message type "'+r+'"')}else d.emit("error",new Error("invalid state"))},e.mediaKeysSession.onkeystatuseschange=function(t){if(e.mediaKeysSession){o.onKeyStatusChange(e);var n=e.keyStatus;d.emit("keyStatus",n),"expired"===n&&(o.warn(e.keySystem+" expired for key "+p),o.renewKeySession(e))}else d.emit("error",new Error("invalid state"))};var h=new Promise((function(e,t){d.on("error",t),d.on("keyStatus",(function(n){n.startsWith("usable")?e():"output-restricted"===n?t(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===n?t(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},'key status changed to "'+n+'"')):"expired"===n?t(new Error("key expired while generating request")):o.warn('unhandled key status change "'+n+'"')}))}));return e.mediaKeysSession.generateRequest(t,n).then((function(){var t;o.log('Request generated for key-session "'+(null===(t=e.mediaKeysSession)||void 0===t?void 0:t.sessionId)+'" keyId: '+p)})).catch((function(e){throw new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},"Error generating key-session request: "+e)})).then((function(){return h})).catch((function(t){throw d.removeAllListeners(),o.removeSession(e),t})).then((function(){return d.removeAllListeners(),e}))},t.onKeyStatusChange=function(e){var t=this;e.mediaKeysSession.keyStatuses.forEach((function(n,r){t.log('key status change "'+n+'" for keyStatuses keyId: '+Fn.default.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))+" session keyId: "+Fn.default.hexDump(new Uint8Array(e.decryptdata.keyId||[]))+" uri: "+e.decryptdata.uri),e.keyStatus=n}))},t.fetchServerCertificate=function(e){var t=this;return new Promise((function(n,r){var i=t.getServerCertificateUrl(e);if(!i)return n();t.log('Fetching serverCertificate for "'+e+'"');var a=new XMLHttpRequest;a.open("GET",i,!0),a.responseType="arraybuffer",a.onreadystatechange=function(){a.readyState===XMLHttpRequest.DONE&&(200===a.status?n(a.response):r(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:a},'"'+e+'" certificate request XHR failed ('+i+"). Status: "+a.status+" ("+a.statusText+")")))},a.send()}))},t.setMediaKeysServerCertificate=function(e,t,n){var r=this;return new Promise((function(i,a){e.setServerCertificate(n).then((function(a){r.log("setServerCertificate "+(a?"success":"not supported by CDM")+" ("+(null==n?void 0:n.byteLength)+') on "'+t+'"'),i(e)})).catch((function(e){a(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:e,fatal:!0},e.message))}))}))},t.renewLicense=function(e,t){var n=this;return this.requestLicense(e,new Uint8Array(t)).then((function(t){return n.updateKeySession(e,new Uint8Array(t)).catch((function(e){throw new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:e,fatal:!0},e.message)}))}))},t.setupLicenseXHR=function(e,t,n,r){var i=this,a=this.config.licenseXhrSetup;return a?Promise.resolve().then((function(){if(!n.decryptdata)throw new Error("Key removed");return a.call(i.hls,e,t,n,r)})).catch((function(o){if(!n.decryptdata)throw o;return e.open("POST",t,!0),a.call(i.hls,e,t,n,r)})).then((function(n){return e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:n||r}})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))},t.requestLicense=function(e,t){var n=this;return new Promise((function(r,i){var a=n.getLicenseServerUrl(e.keySystem);n.log("Sending license request to URL: "+a);var o=new XMLHttpRequest;o.responseType="arraybuffer",o.onreadystatechange=function(){if(!n.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(4===o.readyState)if(200===o.status){n._requestLicenseFailureCount=0;var l=o.response;n.log("License received "+(l instanceof ArrayBuffer?l.byteLength:l));var u=n.config.licenseResponseCallback;if(u)try{l=u.call(n.hls,o,a,e)}catch(e){n.error(e)}r(l)}else if(n._requestLicenseFailureCount++,n._requestLicenseFailureCount>3||o.status>=400&&o.status<500)i(new Wn({type:s.ErrorTypes.KEY_SYSTEM_ERROR,details:s.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:o},"License Request XHR failed ("+a+"). Status: "+o.status+" ("+o.statusText+")"));else{var c=3-n._requestLicenseFailureCount+1;n.warn("Retrying license request, "+c+" attempts left"),n.requestLicense(e,t).then(r,i)}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=o,n.setupLicenseXHR(o,a,e,t).then((function(e){var t=e.xhr,n=e.licenseChallenge;t.send(n)}))}))},t.onMediaAttached=function(e,t){if(this.config.emeEnabled){var n=t.media;this.media=n,n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}},t.onMediaDetached=function(){var t=this,n=this.media,r=this.mediaKeySessions;n&&(n.removeEventListener("encrypted",this.onMediaEncrypted),n.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},C.clearKeyUriToKeyIdMap();var i=r.length;e.CDMCleanupPromise=Promise.all(r.map((function(e){return t.removeSession(e)})).concat(null==n?void 0:n.setMediaKeys(null).catch((function(e){t.log("Could not clear media keys: "+e+". media.src: "+(null==n?void 0:n.src))})))).then((function(){i&&(t.log("finished closing key sessions and clearing media keys"),r.length=0)})).catch((function(e){t.log("Could not close sessions and clear media keys: "+e+". media.src: "+(null==n?void 0:n.src))}))},t.onManifestLoaded=function(e,t){var n=t.sessionKeys;if(n&&this.config.emeEnabled&&!this.keyFormatPromise){var r=n.reduce((function(e,t){return-1===e.indexOf(t.keyFormat)&&e.push(t.keyFormat),e}),[]);this.log("Selecting key-system from session-keys "+r.join(", ")),this.keyFormatPromise=this.getKeyFormatPromise(r)}},t.removeSession=function(e){var t=this,n=e.mediaKeysSession,r=e.licenseXhr;if(n){this.log("Remove licenses and keys and close session "+n.sessionId),n.onmessage=null,n.onkeystatuseschange=null,r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;var i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),n.remove().catch((function(e){t.log("Could not remove session: "+e)})).then((function(){return n.close()})).catch((function(e){t.log("Could not close session: "+e)}))}},e}();zn.CDMCleanupPromise=void 0;var Wn=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,n)||this).data=void 0,r.data=t,t.err=t.error,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Hn(t,n),r}(jn(Error));const Yn=zn;var qn,Xn,$n;function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}function Zn(e,t,n){return t&&Qn(e.prototype,t),n&&Qn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jn(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?er(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function tr(){return(tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}!function(e){e.MANIFEST="m",e.AUDIO="a",e.VIDEO="v",e.MUXED="av",e.INIT="i",e.CAPTION="c",e.TIMED_TEXT="tt",e.KEY="k",e.OTHER="o"}(qn||(qn={})),function(e){e.DASH="d",e.HLS="h",e.SMOOTH="s",e.OTHER="o"}(Xn||(Xn={})),function(e){e.VOD="v",e.LIVE="l"}($n||($n={}));var nr=function(){function e(t){var n=this;this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=function(){n.initialized&&(n.starved=!0),n.buffering=!0},this.onPlaying=function(){n.initialized||(n.initialized=!0),n.buffering=!1},this.applyPlaylistData=function(e){try{n.apply(e,{ot:qn.MANIFEST,su:!n.initialized})}catch(e){l.logger.warn("Could not generate manifest CMCD data.",e)}},this.applyFragmentData=function(e){try{var t=e.frag,r=n.hls.levels[t.level],i=n.getObjectType(t),a={d:1e3*t.duration,ot:i};i!==qn.VIDEO&&i!==qn.AUDIO&&i!=qn.MUXED||(a.br=r.bitrate/1e3,a.tb=n.getTopBandwidth(i)/1e3,a.bl=n.getBufferLength(i)),n.apply(e,a)}catch(e){l.logger.warn("Could not generate segment CMCD data.",e)}},this.hls=t;var r=this.config=t.config,i=r.cmcd;null!=i&&(r.pLoader=this.createPlaylistLoader(),r.fLoader=this.createFragmentLoader(),this.sid=i.sessionId||e.uuid(),this.cid=i.contentId,this.useHeaders=!0===i.useHeaders,this.registerListeners())}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.on(o.Events.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(o.Events.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(o.Events.MEDIA_DETACHED,this.onMediaDetached,this),e.off(o.Events.BUFFER_CREATED,this.onBufferCreated,this),this.onMediaDetached()},t.destroy=function(){this.unregisterListeners(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)},t.onMediaDetached=function(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)},t.onBufferCreated=function(e,t){var n,r;this.audioBuffer=null===(n=t.tracks.audio)||void 0===n?void 0:n.buffer,this.videoBuffer=null===(r=t.tracks.video)||void 0===r?void 0:r.buffer},t.createData=function(){var e;return{v:1,sf:Xn.HLS,sid:this.sid,cid:this.cid,pr:null===(e=this.media)||void 0===e?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},t.apply=function(t,n){void 0===n&&(n={}),tr(n,this.createData());var r=n.ot===qn.INIT||n.ot===qn.VIDEO||n.ot===qn.MUXED;if(this.starved&&r&&(n.bs=!0,n.su=!0,this.starved=!1),null==n.su&&(n.su=this.buffering),this.useHeaders){var i=e.toHeaders(n);if(!Object.keys(i).length)return;t.headers||(t.headers={}),tr(t.headers,i)}else{var a=e.toQuery(n);if(!a)return;t.url=e.appendQueryToUri(t.url,a)}},t.getObjectType=function(e){var t=e.type;return"subtitle"===t?qn.TIMED_TEXT:"initSegment"===e.sn?qn.INIT:"audio"===t?qn.AUDIO:"main"===t?this.hls.audioTracks.length?qn.VIDEO:qn.MUXED:void 0},t.getTopBandwidth=function(e){var t,n=0,r=this.hls;if(e===qn.AUDIO)t=r.audioTracks;else{var i=r.maxAutoLevel,a=i>-1?i+1:r.levels.length;t=r.levels.slice(0,a)}for(var o,s=Jn(t);!(o=s()).done;){var l=o.value;l.bitrate>n&&(n=l.bitrate)}return n>0?n:NaN},t.getBufferLength=function(e){var t=this.hls.media,n=e===qn.AUDIO?this.audioBuffer:this.videoBuffer;return n&&t?1e3*Le.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len:NaN},t.createPlaylistLoader=function(){var e=this.config.pLoader,t=this.applyPlaylistData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},Zn(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},t.createFragmentLoader=function(){var e=this.config.fLoader,t=this.applyFragmentData,n=e||this.config.loader;return function(){function e(e){this.loader=void 0,this.loader=new n(e)}var r=e.prototype;return r.destroy=function(){this.loader.destroy()},r.abort=function(){this.loader.abort()},r.load=function(e,n,r){t(e),this.loader.load(e,n,r)},Zn(e,[{key:"stats",get:function(){return this.loader.stats}},{key:"context",get:function(){return this.loader.context}}]),e}()},e.uuid=function(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)},e.serialize=function(e){for(var t,n=[],r=function(e){return!Number.isNaN(e)&&null!=e&&""!==e&&!1!==e},i=function(e){return Math.round(e)},a=function(e){return 100*i(e/100)},o={br:i,d:i,bl:a,dl:a,mtp:a,nor:function(e){return encodeURIComponent(e)},rtp:a,tb:i},s=Jn(Object.keys(e||{}).sort());!(t=s()).done;){var l=t.value,u=e[l];if(r(u)&&!("v"===l&&1===u||"pr"==l&&1===u)){var c=o[l];c&&(u=c(u));var p,d=typeof u;p="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===d?l:"number"===d?l+"="+u:l+"="+JSON.stringify(u),n.push(p)}}return n.join(",")},e.toHeaders=function(t){for(var n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},o=0,s=Object.keys(t);o<s.length;o++){var l=s[o];i[null!=a[l]?a[l]:1][l]=t[l]}for(var u=0;u<i.length;u++){var c=e.serialize(i[u]);c&&(n["CMCD-"+r[u]]=c)}return n},e.toQuery=function(t){return"CMCD="+encodeURIComponent(e.serialize(t))},e.appendQueryToUri=function(e,t){if(!t)return e;var n=e.includes("?")?"&":"?";return""+e+n+t},e}(),rr=n(408),ir=/^age:\s*[\d.]+\s*$/m;const ar=function(){function e(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=void 0,this.loader=null,this.stats=void 0,this.xhrSetup=e?e.xhrSetup:null,this.stats=new rr.LoadStats,this.retryDelay=0}var t=e.prototype;return t.destroy=function(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null},t.abortInternal=function(){var e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,4!==e.readyState&&(this.stats.aborted=!0,e.abort()))},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)},t.load=function(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.retryDelay=t.retryDelay,this.loadInternal()},t.loadInternal=function(){var e=this.config,t=this.context;if(e){var n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0;var i=this.xhrSetup;try{if(i)try{i(n,t.url)}catch(e){n.open("GET",t.url,!0),i(n,t.url)}n.readyState||n.open("GET",t.url,!0);var a=this.context.headers;if(a)for(var o in a)n.setRequestHeader(o,a[o])}catch(e){return void this.callbacks.onError({code:n.status,text:e.message},t,n)}t.rangeEnd&&n.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),n.onreadystatechange=this.readystatechange.bind(this),n.onprogress=this.loadprogress.bind(this),n.responseType=t.responseType,self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),e.timeout),n.send()}},t.readystatechange=function(){var e=this.context,t=this.loader,n=this.stats;if(e&&t){var r=t.readyState,i=this.config;if(!n.aborted&&r>=2)if(self.clearTimeout(this.requestTimeout),0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start)),4===r){t.onreadystatechange=null,t.onprogress=null;var a=t.status,o="arraybuffer"===t.responseType;if(a>=200&&a<300&&(o&&t.response||null!==t.responseText)){var s,u;if(n.loading.end=Math.max(self.performance.now(),n.loading.first),u=o?(s=t.response).byteLength:(s=t.responseText).length,n.loaded=n.total=u,!this.callbacks)return;var c=this.callbacks.onProgress;if(c&&c(n,e,s,t),!this.callbacks)return;var p={url:t.responseURL,data:s};this.callbacks.onSuccess(p,n,e,t)}else n.retry>=i.maxRetry||a>=400&&a<499?(l.logger.error(a+" while loading "+e.url),this.callbacks.onError({code:a,text:t.statusText},e,t)):(l.logger.warn(a+" while loading "+e.url+", retrying in "+this.retryDelay+"..."),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,i.maxRetryDelay),n.retry++)}else self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.timeout)}},t.loadtimeout=function(){l.logger.warn("timeout while loading "+this.context.url);var e=this.callbacks;e&&(this.abortInternal(),e.onTimeout(this.stats,this.context,this.loader))},t.loadprogress=function(e){var t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)},t.getCacheAge=function(){var e=null;if(this.loader&&ir.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},e}();function or(e){var t="function"==typeof Map?new Map:void 0;return(or=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return sr(e,arguments,cr(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),ur(r,e)})(e)}function sr(e,t,n){return(sr=lr()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&ur(i,n.prototype),i}).apply(null,arguments)}function lr(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ur(e,t){return(ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cr(e){return(cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function pr(){return(pr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var dr=function(){function e(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=void 0,this.response=void 0,this.controller=void 0,this.context=void 0,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||fr,this.controller=new self.AbortController,this.stats=new rr.LoadStats}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},t.abortInternal=function(){var e=this.response;e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!==(e=this.callbacks)&&void 0!==e&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)},t.load=function(e,t,n){var r=this,i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();var o=function(e,t){var n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(pr({},e.headers))};return e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),n}(e,this.controller.signal),s=n.onProgress,l="arraybuffer"===e.responseType,u=l?"byteLength":"length";this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,o),self.clearTimeout(this.requestTimeout),this.requestTimeout=self.setTimeout((function(){r.abortInternal(),n.onTimeout(i,e,r.response)}),t.timeout),self.fetch(this.request).then((function(n){if(r.response=r.loader=n,!n.ok){var o=n.status,u=n.statusText;throw new hr(u||"fetch, bad network response",o,n)}return i.loading.first=Math.max(self.performance.now(),i.loading.start),i.total=parseInt(n.headers.get("Content-Length")||"0"),s&&(0,a.isFiniteNumber)(t.highWaterMark)?r.loadProgressively(n,i,e,t.highWaterMark,s):l?n.arrayBuffer():n.text()})).then((function(o){var l=r.response;self.clearTimeout(r.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);var c=o[u];c&&(i.loaded=i.total=c);var p={url:l.url,data:o};s&&!(0,a.isFiniteNumber)(t.highWaterMark)&&s(i,e,o,l),n.onSuccess(p,i,e,l)})).catch((function(t){if(self.clearTimeout(r.requestTimeout),!i.aborted){var a=t&&t.code||0,o=t?t.message:null;n.onError({code:a,text:o},e,t?t.details:null)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.loadProgressively=function(e,t,n,r,i){void 0===r&&(r=0);var a=new At,o=e.body.getReader();return function s(){return o.read().then((function(o){if(o.done)return a.dataLength&&i(t,n,a.flush(),e),Promise.resolve(new ArrayBuffer(0));var l=o.value,u=l.length;return t.loaded+=u,u<r||a.dataLength?(a.push(l),a.dataLength>=r&&i(t,n,a.flush(),e)):i(t,n,l,e),s()})).catch((function(){return Promise.reject()}))}()},e}();function fr(e,t){return new self.Request(e.url,t)}var hr=function(e){var t,n;function r(t,n,r){var i;return(i=e.call(this,t)||this).code=void 0,i.details=void 0,i.code=n,i.details=r,i}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ur(t,n),r}(or(Error));const gr=dr;var yr=/\s/;function vr(){return(vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function mr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mr(Object(n),!0).forEach((function(t){_r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _r(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Er=br(br({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,maxBufferSize:6e7,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:ar,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Tt,bufferController:Bt,capLevelController:Nn,fpsController:Un,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:A,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0},{cueHandler:{newCue:function(e,t,n,r){for(var i,a,o,s,l,u=[],c=self.VTTCue||self.TextTrackCue,p=0;p<r.rows.length;p++)if(o=!0,s=0,l="",!(i=r.rows[p]).isEmpty()){for(var d=0;d<i.chars.length;d++)yr.test(i.chars[d].uchar)&&o?s++:(l+=i.chars[d].uchar,o=!1);i.cueStartTime=t,t===n&&(n+=1e-4),s>=16?s--:s++;var f=gn(l.trim()),h=kn(t,n,f);e&&e.cues&&e.cues.getCueById(h)||((a=new c(t,n,f)).id=h,a.line=p+1,a.align="left",a.position=10+Math.min(80,10*Math.floor(8*s/32)),u.push(a))}return e&&u.length&&(u.sort((function(e,t){return"auto"===e.line||"auto"===t.line?0:e.line>8&&t.line>8?t.line-e.line:e.line-t.line})),u.forEach((function(t){return W(e,t)}))),u}},enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:Dt,subtitleTrackController:Mt,timelineController:Ln,audioStreamController:Ct,audioTrackController:It,emeController:Yn,cmcdController:nr});function kr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}var Tr=function(){function e(t){void 0===t&&(t={}),this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new ht.EventEmitter,this._autoLevelCapping=void 0,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null;var n=this.config=function(e,t){if((t.liveSyncDurationCount||t.liveMaxLatencyDurationCount)&&(t.liveSyncDuration||t.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(void 0!==t.liveMaxLatencyDurationCount&&(void 0===t.liveSyncDurationCount||t.liveMaxLatencyDurationCount<=t.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(void 0!==t.liveMaxLatencyDuration&&(void 0===t.liveSyncDuration||t.liveMaxLatencyDuration<=t.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');return vr({},e,t)}(e.DefaultConfig,t);this.userConfig=t,(0,l.enableLogs)(n.debug,"Hls instance"),this._autoLevelCapping=-1,n.progressive&&function(e){var t=e.loader;t!==gr&&t!==ar?(l.logger.log("[config]: Custom loader detected, cannot enable progressive streaming"),e.progressive=!1):function(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(e){}return!1}()&&(e.loader=gr,e.progressive=!0,e.enableSoftwareAES=!0,l.logger.log("[config]: Progressive streaming enabled, using FetchLoader"))}(n);var r=n.abrController,i=n.bufferController,a=n.capLevelController,o=n.fpsController,s=this.abrController=new r(this),u=this.bufferController=new i(this),c=this.capLevelController=new a(this),p=new o(this),d=new G(this),f=new ee(this),h=this.levelController=new me(this),g=new be(this),y=new De(this.config),v=this.streamController=new _t(this,g,y);c.setStreamController(v),p.setStreamController(v);var m=[d,h,v];this.networkControllers=m;var b=[s,u,c,p,f,g];this.audioTrackController=this.createController(n.audioTrackController,m);var _=n.audioStreamController;_&&m.push(new _(this,g,y)),this.subtitleTrackController=this.createController(n.subtitleTrackController,m);var E=n.subtitleStreamController;E&&m.push(new E(this,g,y)),this.createController(n.timelineController,b),y.emeController=this.emeController=this.createController(n.emeController,b),this.cmcdController=this.createController(n.cmcdController,b),this.latencyController=this.createController(ne,b),this.coreComponents=b}e.isSupported=function(){return function(){var e=at();if(!e)return!1;var t=ot(),n=e&&"function"==typeof e.isTypeSupported&&e.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),r=!t||t.prototype&&"function"==typeof t.prototype.appendBuffer&&"function"==typeof t.prototype.remove;return!!n&&!!r}()};var t,n,r,a=e.prototype;return a.createController=function(e,t){if(e){var n=new e(this);return t&&t.push(n),n}return null},a.on=function(e,t,n){void 0===n&&(n=this),this._emitter.on(e,t,n)},a.once=function(e,t,n){void 0===n&&(n=this),this._emitter.once(e,t,n)},a.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},a.off=function(e,t,n,r){void 0===n&&(n=this),this._emitter.off(e,t,n,r)},a.listeners=function(e){return this._emitter.listeners(e)},a.emit=function(e,t,n){return this._emitter.emit(e,t,n)},a.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){l.logger.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(o.Events.ERROR,{type:s.ErrorTypes.OTHER_ERROR,details:s.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:e,error:t})}return!1},a.listenerCount=function(e){return this._emitter.listenerCount(e)},a.destroy=function(){l.logger.log("destroy"),this.trigger(o.Events.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this.url=null,this.networkControllers.forEach((function(e){return e.destroy()})),this.networkControllers.length=0,this.coreComponents.forEach((function(e){return e.destroy()})),this.coreComponents.length=0},a.attachMedia=function(e){l.logger.log("attachMedia"),this._media=e,this.trigger(o.Events.MEDIA_ATTACHING,{media:e})},a.detachMedia=function(){l.logger.log("detachMedia"),this.trigger(o.Events.MEDIA_DETACHING,void 0),this._media=null},a.loadSource=function(e){this.stopLoad();var t=this.media,n=this.url,r=this.url=i.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});l.logger.log("loadSource:"+r),t&&n&&n!==r&&this.bufferController.hasSourceTypes()&&(this.detachMedia(),this.attachMedia(t)),this.trigger(o.Events.MANIFEST_LOADING,{url:e})},a.startLoad=function(e){void 0===e&&(e=-1),l.logger.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},a.stopLoad=function(){l.logger.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},a.swapAudioCodec=function(){l.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},a.recoverMediaError=function(){l.logger.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},a.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},t=e,r=[{key:"version",get:function(){return"1.3.5"}},{key:"Events",get:function(){return o.Events}},{key:"ErrorTypes",get:function(){return s.ErrorTypes}},{key:"ErrorDetails",get:function(){return s.ErrorDetails}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:Er},set:function(t){e.defaultConfig=t}}],(n=[{key:"levels",get:function(){return this.levelController.levels||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){l.logger.log("set currentLevel:"+e),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){l.logger.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){l.logger.log("set loadLevel:"+e),this.levelController.manualLevel=e}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(e){this.levelController.nextLoadLevel=e}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(e){l.logger.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){l.logger.log("set startLevel:"+e),-1!==e&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}},{key:"capLevelToPlayerSize",get:function(){return this.config.capLevelToPlayerSize},set:function(e){var t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(e){this._autoLevelCapping!==e&&(l.logger.log("set autoLevelCapping:"+e),this._autoLevelCapping=e)}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(e){re.indexOf(e)>-1&&(this._maxHdcpLevel=e)}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){var e=this.levels,t=this.config.minAutoBitrate;if(!e)return 0;for(var n=e.length,r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}},{key:"maxAutoLevel",get:function(){var e,t=this.levels,n=this.autoLevelCapping,r=this.maxHdcpLevel;if(e=-1===n&&t&&t.length?t.length-1:n,r)for(var i=e;i--;){var a=t[i].attrs["HDCP-LEVEL"];if(a&&a<=r)return i}return e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(e){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,e)}},{key:"playingDate",get:function(){return this.streamController.currentProgramDateTime}},{key:"mainForwardBufferInfo",get:function(){return this.streamController.getMainFwdBufferInfo()}},{key:"audioTracks",get:function(){var e=this.audioTrackController;return e?e.audioTracks:[]}},{key:"audioTrack",get:function(){var e=this.audioTrackController;return e?e.audioTrack:-1},set:function(e){var t=this.audioTrackController;t&&(t.audioTrack=e)}},{key:"subtitleTracks",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var e=this.subtitleTrackController;return e?e.subtitleTrack:-1},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}},{key:"media",get:function(){return this._media}},{key:"subtitleDisplay",get:function(){var e=this.subtitleTrackController;return!!e&&e.subtitleDisplay},set:function(e){var t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}},{key:"lowLatencyMode",get:function(){return this.config.lowLatencyMode},set:function(e){this.config.lowLatencyMode=e}},{key:"liveSyncPosition",get:function(){return this.latencyController.liveSyncPosition}},{key:"latency",get:function(){return this.latencyController.latency}},{key:"maxLatency",get:function(){return this.latencyController.maxLatency}},{key:"targetLatency",get:function(){return this.latencyController.targetLatency}},{key:"drift",get:function(){return this.latencyController.drift}},{key:"forceStartLoad",get:function(){return this.streamController.forceStartLoad}}])&&kr(t.prototype,n),r&&kr(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();Tr.defaultConfig=void 0},923:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseSegment:()=>p,ElementaryStreamTypes:()=>r,Fragment:()=>d,Part:()=>f});var r,i=n(965),a=n(945),o=n(408);function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,l(e,t)}function l(e,t){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,"symbol"==typeof(i=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key))?i:String(i),r)}var i}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}!function(e){e.AUDIO="audio",e.VIDEO="video",e.AUDIOVIDEO="audiovideo"}(r||(r={}));var p=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[r.AUDIO]=null,t[r.VIDEO]=null,t[r.AUDIOVIDEO]=null,t),this.baseurl=e}return e.prototype.setByteRange=function(e,t){var n=e.split("@",2),r=[];1===n.length?r[0]=t?t.byteRangeEndOffset:0:r[0]=parseInt(n[1]),r[1]=parseInt(n[0])+r[0],this._byteRange=r},c(e,[{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"url",get:function(){return!this._url&&this.baseurl&&this.relurl&&(this._url=(0,a.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),d=function(e){function t(t,n){var r;return(r=e.call(this,n)||this)._decryptdata=null,r.rawProgramDateTime=null,r.programDateTime=null,r.tagList=[],r.duration=0,r.sn=0,r.levelkeys=void 0,r.type=void 0,r.loader=null,r.keyLoader=null,r.level=-1,r.cc=0,r.startPTS=void 0,r.endPTS=void 0,r.appendedPTS=void 0,r.startDTS=void 0,r.endDTS=void 0,r.start=0,r.deltaPTS=void 0,r.maxStartPTS=void 0,r.minEndPTS=void 0,r.stats=new o.LoadStats,r.urlId=0,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.endList=void 0,r.type=t,r}s(t,e);var n=t.prototype;return n.setKeyFormat=function(e){if(this.levelkeys){var t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}},n.abortRequests=function(){var e,t;null===(e=this.loader)||void 0===e||e.abort(),null===(t=this.keyLoader)||void 0===t||t.abort()},n.setElementaryStreamInfo=function(e,t,n,r,i,a){void 0===a&&(a=!1);var o=this.elementaryStreams,s=o[e];s?(s.startPTS=Math.min(s.startPTS,t),s.endPTS=Math.max(s.endPTS,n),s.startDTS=Math.min(s.startDTS,r),s.endDTS=Math.max(s.endDTS,i)):o[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:a}},n.clearElementaryStreamInfo=function(){var e=this.elementaryStreams;e[r.AUDIO]=null,e[r.VIDEO]=null,e[r.AUDIOVIDEO]=null},c(t,[{key:"decryptdata",get:function(){if(!this.levelkeys&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){var e=this.levelkeys.identity;if(e)this._decryptdata=e.getDecryptData(this.sn);else{var t=Object.keys(this.levelkeys);if(1===t.length)return this._decryptdata=this.levelkeys[t[0]].getDecryptData(this.sn)}}return this._decryptdata}},{key:"end",get:function(){return this.start+this.duration}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!(0,i.isFiniteNumber)(this.programDateTime))return null;var e=(0,i.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;if(null!==(e=this._decryptdata)&&void 0!==e&&e.encrypted)return!0;if(this.levelkeys){var t=Object.keys(this.levelkeys),n=t.length;if(n>1||1===n&&this.levelkeys[t[0]].encrypted)return!0}return!1}}]),t}(p),f=function(e){function t(t,n,r,i,a){var s;(s=e.call(this,r)||this).fragOffset=0,s.duration=0,s.gap=!1,s.independent=!1,s.relurl=void 0,s.fragment=void 0,s.index=void 0,s.stats=new o.LoadStats,s.duration=t.decimalFloatingPoint("DURATION"),s.gap=t.bool("GAP"),s.independent=t.bool("INDEPENDENT"),s.relurl=t.enumeratedString("URI"),s.fragment=n,s.index=i;var l=t.enumeratedString("BYTERANGE");return l&&s.setByteRange(l,a),a&&(s.fragOffset=a.fragOffset+a.duration),s}return s(t,e),c(t,[{key:"start",get:function(){return this.fragment.start+this.fragOffset}},{key:"end",get:function(){return this.start+this.duration}},{key:"loaded",get:function(){var e=this.elementaryStreams;return!!(e.audio||e.video||e.audiovideo)}}]),t}(p)},408:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LoadStats:()=>r});var r=function(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}},965:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MAX_SAFE_INTEGER:()=>i,isFiniteNumber:()=>r});var r=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},i=Number.MAX_SAFE_INTEGER||9007199254740991},524:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>y,flushTextTrackMetadataCueSamples:()=>m,flushTextTrackUserdataCueSamples:()=>b,normalizePts:()=>v});var r=n(965);const i=function(){function e(){}return e.getSilentFrame=function(e,t){if("mp4a.40.2"===e){if(1===t)return new Uint8Array([0,200,0,128,35,128]);if(2===t)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===t)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===t)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===t)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}},e}();var a=Math.pow(2,32)-1,o=function(){function e(){}return e.init=function(){var t;for(t in e.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},e.types)e.types.hasOwnProperty(t)&&(e.types[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);var n=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),r=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);e.HDLR_TYPES={video:n,audio:r};var i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),a=new Uint8Array([0,0,0,0,0,0,0,0]);e.STTS=e.STSC=e.STCO=a,e.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),e.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),e.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),e.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var o=new Uint8Array([105,115,111,109]),s=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);e.FTYP=e.box(e.types.ftyp,o,l,o,s),e.DINF=e.box(e.types.dinf,e.box(e.types.dref,i))},e.box=function(e){for(var t=8,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];for(var a=r.length,o=a;a--;)t+=r[a].byteLength;var s=new Uint8Array(t);for(s[0]=t>>24&255,s[1]=t>>16&255,s[2]=t>>8&255,s[3]=255&t,s.set(e,4),a=0,t=8;a<o;a++)s.set(r[a],t),t+=r[a].byteLength;return s},e.hdlr=function(t){return e.box(e.types.hdlr,e.HDLR_TYPES[t])},e.mdat=function(t){return e.box(e.types.mdat,t)},e.mdhd=function(t,n){n*=t;var r=Math.floor(n/(a+1)),i=Math.floor(n%(a+1));return e.box(e.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,85,196,0,0]))},e.mdia=function(t){return e.box(e.types.mdia,e.mdhd(t.timescale,t.duration),e.hdlr(t.type),e.minf(t))},e.mfhd=function(t){return e.box(e.types.mfhd,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,255&t]))},e.minf=function(t){return"audio"===t.type?e.box(e.types.minf,e.box(e.types.smhd,e.SMHD),e.DINF,e.stbl(t)):e.box(e.types.minf,e.box(e.types.vmhd,e.VMHD),e.DINF,e.stbl(t))},e.moof=function(t,n,r){return e.box(e.types.moof,e.mfhd(t),e.traf(r,n))},e.moov=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trak(t[n]);return e.box.apply(null,[e.types.moov,e.mvhd(t[0].timescale,t[0].duration)].concat(r).concat(e.mvex(t)))},e.mvex=function(t){for(var n=t.length,r=[];n--;)r[n]=e.trex(t[n]);return e.box.apply(null,[e.types.mvex].concat(r))},e.mvhd=function(t,n){n*=t;var r=Math.floor(n/(a+1)),i=Math.floor(n%(a+1)),o=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,255&t,r>>24,r>>16&255,r>>8&255,255&r,i>>24,i>>16&255,i>>8&255,255&i,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return e.box(e.types.mvhd,o)},e.sdtp=function(t){var n,r,i=t.samples||[],a=new Uint8Array(4+i.length);for(n=0;n<i.length;n++)r=i[n].flags,a[n+4]=r.dependsOn<<4|r.isDependedOn<<2|r.hasRedundancy;return e.box(e.types.sdtp,a)},e.stbl=function(t){return e.box(e.types.stbl,e.stsd(t),e.box(e.types.stts,e.STTS),e.box(e.types.stsc,e.STSC),e.box(e.types.stsz,e.STSZ),e.box(e.types.stco,e.STCO))},e.avc1=function(t){var n,r,i,a=[],o=[];for(n=0;n<t.sps.length;n++)i=(r=t.sps[n]).byteLength,a.push(i>>>8&255),a.push(255&i),a=a.concat(Array.prototype.slice.call(r));for(n=0;n<t.pps.length;n++)i=(r=t.pps[n]).byteLength,o.push(i>>>8&255),o.push(255&i),o=o.concat(Array.prototype.slice.call(r));var s=e.box(e.types.avcC,new Uint8Array([1,a[3],a[4],a[5],255,224|t.sps.length].concat(a).concat([t.pps.length]).concat(o))),l=t.width,u=t.height,c=t.pixelRatio[0],p=t.pixelRatio[1];return e.box(e.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,u>>8&255,255&u,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),s,e.box(e.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),e.box(e.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,p>>24,p>>16&255,p>>8&255,255&p])))},e.esds=function(e){var t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))},e.mp4a=function(t){var n=t.samplerate;return e.box(e.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]),e.box(e.types.esds,e.esds(t)))},e.mp3=function(t){var n=t.samplerate;return e.box(e.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,t.channelCount,0,16,0,0,0,0,n>>8&255,255&n,0,0]))},e.stsd=function(t){return"audio"===t.type?"mp3"===t.segmentCodec&&"mp3"===t.codec?e.box(e.types.stsd,e.STSD,e.mp3(t)):e.box(e.types.stsd,e.STSD,e.mp4a(t)):e.box(e.types.stsd,e.STSD,e.avc1(t))},e.tkhd=function(t){var n=t.id,r=t.duration*t.timescale,i=t.width,o=t.height,s=Math.floor(r/(a+1)),l=Math.floor(r%(a+1));return e.box(e.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,n>>24&255,n>>16&255,n>>8&255,255&n,0,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,l>>24,l>>16&255,l>>8&255,255&l,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,255&i,0,0,o>>8&255,255&o,0,0]))},e.traf=function(t,n){var r=e.sdtp(t),i=t.id,o=Math.floor(n/(a+1)),s=Math.floor(n%(a+1));return e.box(e.types.traf,e.box(e.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i])),e.box(e.types.tfdt,new Uint8Array([1,0,0,0,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s])),e.trun(t,r.length+16+20+8+16+8+8),r)},e.trak=function(t){return t.duration=t.duration||4294967295,e.box(e.types.trak,e.tkhd(t),e.mdia(t))},e.trex=function(t){var n=t.id;return e.box(e.types.trex,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},e.trun=function(t,n){var r,i,a,o,s,l,u=t.samples||[],c=u.length,p=12+16*c,d=new Uint8Array(p);for(n+=8+p,d.set(["video"===t.type?1:0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,n>>>24&255,n>>>16&255,n>>>8&255,255&n],0),r=0;r<c;r++)a=(i=u[r]).duration,o=i.size,s=i.flags,l=i.cts,d.set([a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o,s.isLeading<<2|s.dependsOn,s.isDependedOn<<6|s.hasRedundancy<<4|s.paddingValue<<1|s.isNonSync,61440&s.degradPrio,15&s.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*r);return e.box(e.types.trun,d)},e.initSegment=function(t){e.types||e.init();var n=e.moov(t),r=new Uint8Array(e.FTYP.byteLength+n.byteLength);return r.set(e.FTYP),r.set(n,e.FTYP.byteLength),r},e}();o.types=void 0,o.HDLR_TYPES=void 0,o.STTS=void 0,o.STSC=void 0,o.STCO=void 0,o.STSZ=void 0,o.VMHD=void 0,o.SMHD=void 0,o.STSD=void 0,o.FTYP=void 0,o.DINF=void 0;const s=o;var l=n(851),u=n(973),c=n(93),p=n(308),d=n(673);function f(){return(f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=null,g=null,y=function(){function e(e,t,n,r){if(void 0===r&&(r=""),this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=void 0,this._initDTS=void 0,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.observer=e,this.config=t,this.typeSupported=n,this.ISGenerated=!1,null===h){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);h=i?parseInt(i[1]):0}if(null===g){var a=navigator.userAgent.match(/Safari\/(\d+)/i);g=a?parseInt(a[1]):0}}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){c.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){c.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){c.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1},t.getVideoStartPts=function(e){var t=!1,n=e.reduce((function(e,n){var r=n.pts-e;return r<-4294967296?(t=!0,v(e,n.pts)):r>0?e:n.pts}),e[0].pts);return t&&c.logger.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var l,u,d,f,h,g,y=i,_=i,E=e.pid>-1,k=t.pid>-1,T=t.samples.length,A=e.samples.length>0,w=o&&T>0||T>1;if((!E||A)&&(!k||w)||this.ISGenerated||o){this.ISGenerated||(d=this.generateIS(e,t,i));var S,C=this.isVideoContiguous,x=-1;if(w&&(x=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!C&&this.config.forceKeyFrameOnDiscontinuity))if(g=!0,x>0){c.logger.warn("[mp4-remuxer]: Dropped "+x+" out of "+T+" video samples due to a missing keyframe");var I=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(x),t.dropped+=x,S=_+=(t.samples[0].pts-I)/t.inputTimeScale}else-1===x&&(c.logger.warn("[mp4-remuxer]: No keyframe found out of "+T+" video samples"),g=!1);if(this.ISGenerated){if(A&&w){var P=this.getVideoStartPts(t.samples),D=(v(e.samples[0].pts,P)-P)/t.inputTimeScale;y+=Math.max(0,D),_+=Math.max(0,-D)}if(A){if(e.samplerate||(c.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),d=this.generateIS(e,t,i)),u=this.remuxAudio(e,y,this.isAudioContiguous,a,k||w||s===p.PlaylistLevelType.AUDIO?_:void 0),w){var R=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(c.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),d=this.generateIS(e,t,i)),l=this.remuxVideo(t,_,C,R)}}else w&&(l=this.remuxVideo(t,_,C,0));l&&(l.firstKeyFrame=x,l.independent=-1!==x,l.firstKeyFramePTS=S)}}return this.ISGenerated&&(n.samples.length&&(h=m(n,i,this._initPTS,this._initDTS)),r.samples.length&&(f=b(r,i,this._initPTS))),{audio:u,video:l,initSegment:d,independent:g,text:f,id3:h}},t.generateIS=function(e,t,n){var i,a,o,l=e.samples,u=t.samples,c=this.typeSupported,p={},d=!(0,r.isFiniteNumber)(this._initPTS),f="audio/mp4";if(d&&(i=a=1/0),e.config&&l.length&&(e.timescale=e.samplerate,"mp3"===e.segmentCodec&&(c.mpeg?(f="audio/mpeg",e.codec=""):c.mp3&&(e.codec="mp3")),p.audio={id:"audio",container:f,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&c.mpeg?new Uint8Array(0):s.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(o=e.inputTimeScale,i=a=l[0].pts-Math.round(o*n))),t.sps&&t.pps&&u.length&&(t.timescale=t.inputTimeScale,p.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:s.initSegment([t]),metadata:{width:t.width,height:t.height}},d)){o=t.inputTimeScale;var h=this.getVideoStartPts(u),g=Math.round(o*n);a=Math.min(a,v(u[0].dts,h)-g),i=Math.min(i,h-g)}if(Object.keys(p).length)return this.ISGenerated=!0,d&&(this._initPTS=i,this._initDTS=a),{tracks:p,initPTS:i,timescale:o}},t.remuxVideo=function(e,t,n,r){var i,a,o=e.inputTimeScale,p=e.samples,y=[],m=p.length,b=this._initPTS,E=this.nextAvcDts,k=8,T=this.videoSampleDuration,A=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,S=!1;n&&null!==E||(E=t*o-(p[0].pts-v(p[0].dts,p[0].pts)));for(var C=0;C<m;C++){var x=p[C];x.pts=v(x.pts-b,E),x.dts=v(x.dts-b,E),x.dts<p[C>0?C-1:C].dts&&(S=!0)}S&&p.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),i=p[0].dts;var I=p[p.length-1].dts-i,P=I?Math.round(I/(m-1)):T||e.inputTimeScale/30;if(n){var D=i-E,R=D>P,O=D<-1;if((R||O)&&(R?c.logger.warn("AVC: "+(0,d.toMsFromMpegTsClock)(D,!0)+" ms ("+D+"dts) hole between fragments detected, filling it"):c.logger.warn("AVC: "+(0,d.toMsFromMpegTsClock)(-D,!0)+" ms ("+D+"dts) overlapping between fragments detected"),!O||E>p[0].pts)){i=E;var L=p[0].pts-D;p[0].dts=i,p[0].pts=L,c.logger.log("Video: First PTS/DTS adjusted: "+(0,d.toMsFromMpegTsClock)(L,!0)+"/"+(0,d.toMsFromMpegTsClock)(i,!0)+", delta: "+(0,d.toMsFromMpegTsClock)(D,!0)+" ms")}}i=Math.max(0,i);for(var M=0,N=0,U=0;U<m;U++){for(var F=p[U],j=F.units,B=j.length,V=0,H=0;H<B;H++)V+=j[H].data.length;N+=V,M+=B,F.length=V,F.dts=Math.max(F.dts,i),A=Math.min(F.pts,A),w=Math.max(F.pts,w)}a=p[m-1].dts;var K,G=N+4*M+8;try{K=new Uint8Array(G)}catch(e){return void this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:u.ErrorTypes.MUX_ERROR,details:u.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:G,reason:"fail allocating video mdat "+G})}var z=new DataView(K.buffer);z.setUint32(0,G),K.set(s.types.mdat,4);for(var W=!1,Y=Number.POSITIVE_INFINITY,q=Number.POSITIVE_INFINITY,X=Number.NEGATIVE_INFINITY,$=Number.NEGATIVE_INFINITY,Q=0;Q<m;Q++){for(var Z=p[Q],J=Z.units,ee=0,te=0,ne=J.length;te<ne;te++){var re=J[te],ie=re.data,ae=re.data.byteLength;z.setUint32(k,ae),k+=4,K.set(ie,k),k+=ae,ee+=4+ae}var oe=void 0;if(Q<m-1)T=p[Q+1].dts-Z.dts,oe=p[Q+1].pts-Z.pts;else{var se=this.config,le=Q>0?Z.dts-p[Q-1].dts:P;if(oe=Q>0?Z.pts-p[Q-1].pts:P,se.stretchShortVideoTrack&&null!==this.nextAudioPts){var ue=Math.floor(se.maxBufferHole*o),ce=(r?A+r*o:this.nextAudioPts)-Z.pts;ce>ue?((T=ce-le)<0?T=le:W=!0,c.logger.log("[mp4-remuxer]: It is approximately "+ce/90+" ms to the next segment; using duration "+T/90+" ms for the last video frame.")):T=le}else T=le}var pe=Math.round(Z.pts-Z.dts);Y=Math.min(Y,T),X=Math.max(X,T),q=Math.min(q,oe),$=Math.max($,oe),y.push(new _(Z.key,T,ee,pe))}if(y.length)if(h){if(h<70){var de=y[0].flags;de.dependsOn=2,de.isNonSync=0}}else if(g&&$-q<X-Y&&P/X<.025&&0===y[0].cts){c.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var fe=i,he=0,ge=y.length;he<ge;he++){var ye=fe+y[he].duration,ve=fe+y[he].cts;if(he<ge-1){var me=ye+y[he+1].cts;y[he].duration=me-ve}else y[he].duration=he?y[he-1].duration:P;y[he].cts=0,fe=ye}}T=W||!T?P:T,this.nextAvcDts=E=a+T,this.videoSampleDuration=T,this.isVideoContiguous=!0;var be={data1:s.moof(e.sequenceNumber++,i,f({},e,{samples:y})),data2:K,startPTS:A/o,endPTS:(w+T)/o,startDTS:i/o,endDTS:E/o,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:e.dropped};return e.samples=[],e.dropped=0,be},t.remuxAudio=function(e,t,n,r,a){var o=e.inputTimeScale,p=o/(e.samplerate?e.samplerate:o),d="aac"===e.segmentCodec?1024:1152,h=d*p,g=this._initPTS,y="mp3"===e.segmentCodec&&this.typeSupported.mpeg,m=[],b=void 0!==a,E=e.samples,k=y?0:8,T=this.nextAudioPts||-1,A=t*o;if(this.isAudioContiguous=n=n||E.length&&T>0&&(r&&Math.abs(A-T)<9e3||Math.abs(v(E[0].pts-g,A)-T)<20*h),E.forEach((function(e){e.pts=v(e.pts-g,A)})),!n||T<0){if(!(E=E.filter((function(e){return e.pts>=0}))).length)return;T=0===a?0:r&&!b?Math.max(0,A):E[0].pts}if("aac"===e.segmentCodec)for(var w=this.config.maxAudioFramesDrift,S=0,C=T;S<E.length;S++){var x=E[S],I=x.pts,P=I-C,D=Math.abs(1e3*P/o);if(P<=-w*h&&b)0===S&&(c.logger.warn("Audio frame @ "+(I/o).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*P/o)+" ms."),this.nextAudioPts=T=C=I);else if(P>=w*h&&D<1e4&&b){var R=Math.round(P/h);(C=I-R*h)<0&&(R--,C+=h),0===S&&(this.nextAudioPts=T=C),c.logger.warn("[mp4-remuxer]: Injecting "+R+" audio frame @ "+(C/o).toFixed(3)+"s due to "+Math.round(1e3*P/o)+" ms gap.");for(var O=0;O<R;O++){var L=Math.max(C,0),M=i.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);M||(c.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),M=x.unit.subarray()),E.splice(S,0,{unit:M,pts:L}),C+=h,S++}}x.pts=C,C+=h}for(var N,U=null,F=null,j=0,B=E.length;B--;)j+=E[B].unit.byteLength;for(var V=0,H=E.length;V<H;V++){var K=E[V],G=K.unit,z=K.pts;if(null!==F)m[V-1].duration=Math.round((z-F)/p);else{if(n&&"aac"===e.segmentCodec&&(z=T),U=z,!(j>0))return;j+=k;try{N=new Uint8Array(j)}catch(e){return void this.observer.emit(l.Events.ERROR,l.Events.ERROR,{type:u.ErrorTypes.MUX_ERROR,details:u.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating audio mdat "+j})}y||(new DataView(N.buffer).setUint32(0,j),N.set(s.types.mdat,4))}N.set(G,k);var W=G.byteLength;k+=W,m.push(new _(!0,d,W,0)),F=z}var Y=m.length;if(Y){var q=m[m.length-1];this.nextAudioPts=T=F+p*q.duration;var X=y?new Uint8Array(0):s.moof(e.sequenceNumber++,U/p,f({},e,{samples:m}));e.samples=[];var $=U/o,Q=T/o,Z={data1:X,data2:N,startPTS:$,endPTS:Q,startDTS:$,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:Y};return this.isAudioContiguous=!0,Z}},t.remuxEmptyAudio=function(e,t,n,r){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),s=this.nextAudioPts,l=(null!==s?s:r.startDTS*a)+this._initDTS,u=r.endDTS*a+this._initDTS,p=1024*o,d=Math.ceil((u-l)/p),f=i.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(c.logger.warn("[mp4-remuxer]: remux empty Audio"),f){for(var h=[],g=0;g<d;g++){var y=l+g*p;h.push({unit:f,pts:y,dts:y})}return e.samples=h,this.remuxAudio(e,t,n,!1)}c.logger.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},e}();function v(e,t){var n;if(null===t)return e;for(n=t<e?-8589934592:8589934592;Math.abs(e-t)>4294967296;)e+=n;return e}function m(e,t,n,r){var i=e.samples.length;if(i){for(var a=e.inputTimeScale,o=0;o<i;o++){var s=e.samples[o];s.pts=v(s.pts-n,t*a)/a,s.dts=v(s.dts-r,t*a)/a}var l=e.samples;return e.samples=[],{samples:l}}}function b(e,t,n){var r=e.samples.length;if(r){for(var i=e.inputTimeScale,a=0;a<r;a++){var o=e.samples[a];o.pts=v(o.pts-n,t*i)/i}e.samples.sort((function(e,t){return e.pts-t.pts}));var s=e.samples;return e.samples=[],{samples:s}}}var _=function(e,t,n,r){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=n,this.cts=r,this.flags=new E(e)},E=function(e){this.isLeading=0,this.isDependedOn=0,this.hasRedundancy=0,this.degradPrio=0,this.dependsOn=1,this.isNonSync=1,this.dependsOn=e?2:1,this.isNonSync=e?0:1}},856:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{MetadataSchema:()=>r}),function(e){e.audioId3="org.id3",e.dateRange="com.apple.quicktime.HLS",e.emsg="https://aomedia.org/emsg/ID3"}(r||(r={}))},308:(e,t,n)=>{"use strict";var r,i;n.r(t),n.d(t,{PlaylistContextType:()=>r,PlaylistLevelType:()=>i}),function(e){e.MANIFEST="manifest",e.LEVEL="level",e.AUDIO_TRACK="audioTrack",e.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(e){e.MAIN="main",e.AUDIO="audio",e.SUBTITLE="subtitle"}(i||(i={}))},300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={hexDump:function(e){for(var t="",n=0;n<e.length;n++){var r=e[n].toString(16);r.length<2&&(r="0"+r),t+=r}return t}}},93:(e,t,n)=>{"use strict";n.r(t),n.d(t,{enableLogs:()=>s,logger:()=>l});var r=function(){},i={trace:r,debug:r,log:r,warn:r,info:r,error:r},a=i;function o(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):r}function s(e,t){if(self.console&&!0===e||"object"==typeof e){!function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];n.forEach((function(t){a[t]=e[t]?e[t].bind(e):o(t)}))}(e,"debug","log","info","warn","error");try{a.log('Debug logs enabled for "'+t+'"')}catch(e){a=i}}else a=i}var l=i},63:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RemuxerTrackIdConfig:()=>c,appendUint8Array:()=>S,bin2str:()=>p,computeRawDurationFromSamples:()=>T,discardEPB:()=>P,findBox:()=>y,getDuration:()=>k,getStartDTS:()=>E,mp4Box:()=>R,mp4pssh:()=>O,offsetStartDTS:()=>A,parseEmsg:()=>D,parseInitSegment:()=>m,parsePssh:()=>L,parseSEIMessageFromNALu:()=>I,parseSamples:()=>C,parseSegmentIndex:()=>v,parseSinf:()=>_,patchEncyptionData:()=>b,readSint32:()=>h,readUint16:()=>d,readUint32:()=>f,segmentValidRange:()=>w,writeUint32:()=>g});var r=n(923),i=n(145),a=n(181),o=n(93),s=n(300),l=Math.pow(2,32)-1,u=[].push,c={video:1,audio:2,id3:3,text:4};function p(e){return String.fromCharCode.apply(null,e)}function d(e,t){var n=e[t]<<8|e[t+1];return n<0?65536+n:n}function f(e,t){var n=h(e,t);return n<0?4294967296+n:n}function h(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function g(e,t,n){e[t]=n>>24,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function y(e,t){var n=[];if(!t.length)return n;for(var r=e.byteLength,i=0;i<r;){var a=f(e,i),o=a>1?i+a:r;if(p(e.subarray(i+4,i+8))===t[0])if(1===t.length)n.push(e.subarray(i+8,o));else{var s=y(e.subarray(i+8,o),t.slice(1));s.length&&u.apply(n,s)}i=o}return n}function v(e){var t=[],n=e[0],r=8,i=f(e,r);r+=4,r+=0===n?8:16,r+=2;var a=e.length+0,o=d(e,r);r+=2;for(var s=0;s<o;s++){var l=r,u=f(e,l);l+=4;var c=2147483647&u;if(1==(2147483648&u)>>>31)return console.warn("SIDX has hierarchical references (not supported)"),null;var p=f(e,l);l+=4,t.push({referenceSize:c,subsegmentDuration:p,info:{duration:p/i,start:a,end:a+c-1}}),a+=c,r=l+=4}return{earliestPresentationTime:0,timescale:i,version:n,referencesCount:o,references:t}}function m(e){for(var t=[],n=y(e,["moov","trak"]),i=0;i<n.length;i++){var a=n[i],o=y(a,["tkhd"])[0];if(o){var s=o[0],l=0===s?12:20,u=f(o,l),c=y(a,["mdia","mdhd"])[0];if(c){var d=f(c,l=0===(s=c[0])?12:20),h=y(a,["mdia","hdlr"])[0];if(h){var g=p(h.subarray(8,12)),v={soun:r.ElementaryStreamTypes.AUDIO,vide:r.ElementaryStreamTypes.VIDEO}[g];if(v){var m=y(a,["mdia","minf","stbl","stsd"])[0],b=void 0;m&&(b=p(m.subarray(12,16))),t[u]={timescale:d,type:v},t[v]={timescale:d,id:u,codec:b}}}}}}return y(e,["moov","mvex","trex"]).forEach((function(e){var n=f(e,4),r=t[n];r&&(r.default={duration:f(e,12),flags:f(e,20)})})),t}function b(e,t){if(!e||!t)return e;var n=t.keyId;return n&&t.isCommonEncryption&&y(e,["moov","trak"]).forEach((function(e){var t=y(e,["mdia","minf","stbl","stsd"])[0].subarray(8),r=y(t,["enca"]),i=r.length>0;i||(r=y(t,["encv"])),r.forEach((function(e){y(i?e.subarray(28):e.subarray(78),["sinf"]).forEach((function(e){var t=_(e);if(t){var r=t.subarray(8,24);r.some((function(e){return 0!==e}))||(o.logger.log("[eme] Patching keyId in 'enc"+(i?"a":"v")+">sinf>>tenc' box: "+s.default.hexDump(r)+" -> "+s.default.hexDump(n)),t.set(n,8))}}))}))})),e}function _(e){var t=y(e,["schm"])[0];if(t){var n=p(t.subarray(4,8));if("cbcs"===n||"cenc"===n)return y(e,["schi","tenc"])[0]}return o.logger.error("[eme] missing 'schm' box"),null}function E(e,t){return y(t,["moof","traf"]).reduce((function(t,n){var r=y(n,["tfdt"])[0],i=r[0],a=y(n,["tfhd"]).reduce((function(t,n){var a=f(n,4),o=e[a];if(o){var s=f(r,4);1===i&&(s*=Math.pow(2,32),s+=f(r,8));var l=s/(o.timescale||9e4);if(isFinite(l)&&(null===t||l<t))return l}return t}),null);return null!==a&&isFinite(a)&&(null===t||a<t)?a:t}),null)||0}function k(e,t){for(var n=0,i=0,a=0,o=y(e,["moof","traf"]),s=0;s<o.length;s++){var l=o[s],u=y(l,["tfhd"])[0],c=t[f(u,4)];if(c){var p=c.default,d=f(u,0)|(null==p?void 0:p.flags),h=null==p?void 0:p.duration;8&d&&(h=f(u,2&d?12:8));for(var g=c.timescale||9e4,m=y(l,["trun"]),b=0;b<m.length;b++)!(n=T(m[b]))&&h&&(n=h*f(m[b],4)),c.type===r.ElementaryStreamTypes.VIDEO?i+=n/g:c.type===r.ElementaryStreamTypes.AUDIO&&(a+=n/g)}}if(0===i&&0===a){for(var _=0,E=y(e,["sidx"]),k=0;k<E.length;k++){var A=v(E[k]);null!=A&&A.references&&(_+=A.references.reduce((function(e,t){return e+t.info.duration||0}),0))}return _}return i||a}function T(e){var t=f(e,0),n=8;1&t&&(n+=4),4&t&&(n+=4);for(var r=0,i=f(e,4),a=0;a<i;a++)256&t&&(r+=f(e,n),n+=4),512&t&&(n+=4),1024&t&&(n+=4),2048&t&&(n+=4);return r}function A(e,t,n){y(t,["moof","traf"]).forEach((function(t){y(t,["tfhd"]).forEach((function(r){var i=f(r,4),a=e[i];if(a){var o=a.timescale||9e4;y(t,["tfdt"]).forEach((function(e){var t=e[0],r=f(e,4);if(0===t)r-=n*o,g(e,4,r=Math.max(r,0));else{r*=Math.pow(2,32),r+=f(e,8),r-=n*o,r=Math.max(r,0);var i=Math.floor(r/(l+1)),a=Math.floor(r%(l+1));g(e,4,i),g(e,8,a)}}))}}))}))}function w(e){var t={valid:null,remainder:null},n=y(e,["moof"]);if(!n)return t;if(n.length<2)return t.remainder=e,t;var r=n[n.length-1];return t.valid=(0,i.sliceUint8)(e,0,r.byteOffset-8),t.remainder=(0,i.sliceUint8)(e,r.byteOffset-8),t}function S(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function C(e,t){var n=[],i=t.samples,a=t.timescale,o=t.id,s=!1;return y(i,["moof"]).map((function(l){var u=l.byteOffset-8;y(l,["traf"]).map((function(l){var c=y(l,["tfdt"]).map((function(e){var t=e[0],n=f(e,4);return 1===t&&(n*=Math.pow(2,32),n+=f(e,8)),n/a}))[0];return void 0!==c&&(e=c),y(l,["tfhd"]).map((function(c){var p=f(c,4),d=16777215&f(c,0),g=0,v=0!=(16&d),m=0,b=0!=(32&d),_=8;p===o&&(0!=(1&d)&&(_+=8),0!=(2&d)&&(_+=4),0!=(8&d)&&(g=f(c,_),_+=4),v&&(m=f(c,_),_+=4),b&&(_+=4),"video"===t.type&&(s=function(e){if(!e)return!1;var t=e.indexOf("."),n=t<0?e:e.substring(0,t);return"hvc1"===n||"hev1"===n||"dvh1"===n||"dvhe"===n}(t.codec)),y(l,["trun"]).map((function(o){var l=o[0],c=16777215&f(o,0),p=0!=(1&c),d=0,y=0!=(4&c),v=0!=(256&c),b=0,_=0!=(512&c),E=0,k=0!=(1024&c),T=0!=(2048&c),A=0,w=f(o,4),S=8;p&&(d=f(o,S),S+=4),y&&(S+=4);for(var C=d+u,P=0;P<w;P++){if(v?(b=f(o,S),S+=4):b=g,_?(E=f(o,S),S+=4):E=m,k&&(S+=4),T&&(A=0===l?f(o,S):h(o,S),S+=4),t.type===r.ElementaryStreamTypes.VIDEO)for(var D=0;D<E;){var R=f(i,C);x(s,i[C+=4])&&I(i.subarray(C,C+R),s?2:1,e+A/a,n),C+=R,D+=R+4}e+=b/a}})))}))}))})),n}function x(e,t){if(e){var n=t>>1&63;return 39===n||40===n}return 6==(31&t)}function I(e,t,n,r){var i=P(e),o=0;o+=t;for(var s=0,l=0,u=!1,c=0;o<i.length;){s=0;do{if(o>=i.length)break;s+=c=i[o++]}while(255===c);l=0;do{if(o>=i.length)break;l+=c=i[o++]}while(255===c);var p=i.length-o;if(!u&&4===s&&o<i.length){if(u=!0,181===i[o++]){var h=d(i,o);if(o+=2,49===h){var g=f(i,o);if(o+=4,1195456820===g){var y=i[o++];if(3===y){var v=i[o++],m=64&v,b=m?2+3*(31&v):0,_=new Uint8Array(b);if(m){_[0]=v;for(var E=1;E<b;E++)_[E]=i[o++]}r.push({type:y,payloadType:s,pts:n,bytes:_})}}}}}else if(5===s&&l<p){if(u=!0,l>16){for(var k=[],T=0;T<16;T++){var A=i[o++].toString(16);k.push(1==A.length?"0"+A:A),3!==T&&5!==T&&7!==T&&9!==T||k.push("-")}for(var w=l-16,S=new Uint8Array(w),C=0;C<w;C++)S[C]=i[o++];r.push({payloadType:s,pts:n,uuid:k.join(""),userData:(0,a.utf8ArrayToStr)(S),userDataBytes:S})}}else if(l<p)o+=l;else if(l>p)break}}function P(e){for(var t=e.byteLength,n=[],r=1;r<t-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return e;var i=t-n.length,a=new Uint8Array(i),o=0;for(r=0;r<i;o++,r++)o===n[0]&&(o++,n.shift()),a[r]=e[o];return a}function D(e){var t=e[0],n="",r="",i=0,a=0,o=0,s=0,l=0,u=0;if(0===t){for(;"\0"!==p(e.subarray(u,u+1));)n+=p(e.subarray(u,u+1)),u+=1;for(n+=p(e.subarray(u,u+1)),u+=1;"\0"!==p(e.subarray(u,u+1));)r+=p(e.subarray(u,u+1)),u+=1;r+=p(e.subarray(u,u+1)),u+=1,i=f(e,12),a=f(e,16),s=f(e,20),l=f(e,24),u=28}else if(1===t){i=f(e,u+=4);var c=f(e,u+=4),d=f(e,u+=4);for(u+=4,o=Math.pow(2,32)*c+d,Number.isSafeInteger(o)||(o=Number.MAX_SAFE_INTEGER,console.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),s=f(e,u),l=f(e,u+=4),u+=4;"\0"!==p(e.subarray(u,u+1));)n+=p(e.subarray(u,u+1)),u+=1;for(n+=p(e.subarray(u,u+1)),u+=1;"\0"!==p(e.subarray(u,u+1));)r+=p(e.subarray(u,u+1)),u+=1;r+=p(e.subarray(u,u+1)),u+=1}return{schemeIdUri:n,value:r,timeScale:i,presentationTime:o,presentationTimeDelta:a,eventDuration:s,id:l,payload:e.subarray(u,e.byteLength)}}function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=n.length,a=8,o=i;o--;)a+=n[o].byteLength;var s=new Uint8Array(a);for(s[0]=a>>24&255,s[1]=a>>16&255,s[2]=a>>8&255,s[3]=255&a,s.set(e,4),o=0,a=8;o<i;o++)s.set(n[o],a),a+=n[o].byteLength;return s}function O(e,t,n){if(16!==e.byteLength)throw new RangeError("Invalid system id");var r,i,a;if(t){r=1,i=new Uint8Array(16*t.length);for(var o=0;o<t.length;o++){var s=t[o];if(16!==s.byteLength)throw new RangeError("Invalid key");i.set(s,16*o)}}else r=0,i=new Uint8Array;r>0?(a=new Uint8Array(4),t.length>0&&new DataView(a.buffer).setUint32(0,t.length,!1)):a=new Uint8Array;var l=new Uint8Array(4);return n&&n.byteLength>0&&new DataView(l.buffer).setUint32(0,n.byteLength,!1),R([112,115,115,104],new Uint8Array([r,0,0,0]),e,a,i,l,n||new Uint8Array)}function L(e){if(!(e instanceof ArrayBuffer)||e.byteLength<32)return null;var t={version:0,systemId:"",kids:null,data:null},n=new DataView(e),r=n.getUint32(0);if(e.byteLength!==r&&r>44)return null;if(1886614376!==n.getUint32(4))return null;if(t.version=n.getUint32(8)>>>24,t.version>1)return null;t.systemId=s.default.hexDump(new Uint8Array(e,12,16));var i=n.getUint32(28);if(0===t.version){if(r-32<i)return null;t.data=new Uint8Array(e,32,i)}else if(1===t.version){t.kids=[];for(var a=0;a<i;a++)t.kids.push(new Uint8Array(e,32+16*a,16))}return t}},673:(e,t,n)=>{"use strict";function r(e,t,n,r){void 0===n&&(n=1),void 0===r&&(r=!1);var i=e*t*n;return r?Math.round(i):i}function i(e,t,n,i){return void 0===n&&(n=1),void 0===i&&(i=!1),r(e,t,1/n,i)}function a(e,t){return void 0===t&&(t=!1),r(e,1e3,1/9e4,t)}function o(e,t){return void 0===t&&(t=1),r(e,9e4,1/t)}n.r(t),n.d(t,{toMpegTsClockFromTimescale:()=>o,toMsFromMpegTsClock:()=>a,toTimescaleFromBase:()=>r,toTimescaleFromScale:()=>i})},145:(e,t,n)=>{"use strict";function r(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}n.r(t),n.d(t,{sliceUint8:()=>r})},729:e=>{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function a(e,t,r,a,o){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,a||e,o),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,a=r.length,o=new Array(a);i<a;i++)o[i]=r[i].fn;return o},s.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},s.prototype.emit=function(e,t,r,i,a,o){var s=n?n+e:e;if(!this._events[s])return!1;var l,u,c=this._events[s],p=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),p){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,r),!0;case 4:return c.fn.call(c.context,t,r,i),!0;case 5:return c.fn.call(c.context,t,r,i,a),!0;case 6:return c.fn.call(c.context,t,r,i,a,o),!0}for(u=1,l=new Array(p-1);u<p;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,f=c.length;for(u=0;u<f;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),p){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,r);break;case 4:c[u].fn.call(c[u].context,t,r,i);break;default:if(!l)for(d=1,l=new Array(p-1);d<p;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},s.prototype.on=function(e,t,n){return a(this,e,t,n,!1)},s.prototype.once=function(e,t,n){return a(this,e,t,n,!0)},s.prototype.removeListener=function(e,t,r,i){var a=n?n+e:e;if(!this._events[a])return this;if(!t)return o(this,a),this;var s=this._events[a];if(s.fn)s.fn!==t||i&&!s.once||r&&s.context!==r||o(this,a);else{for(var l=0,u=[],c=s.length;l<c;l++)(s[l].fn!==t||i&&!s[l].once||r&&s[l].context!==r)&&u.push(s[l]);u.length?this._events[a]=1===u.length?u[0]:u:o(this,a)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&o(this,t)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s},945:function(e){var t,n,r,i,a;t=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,r=/(?:\/|^)\.(?=\/)/g,i=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(e,t,r){if(r=r||{},e=e.trim(),!(t=t.trim())){if(!r.alwaysNormalize)return e;var i=a.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=a.normalizePath(i.path),a.buildURLFromParts(i)}var o=a.parseURL(t);if(!o)throw new Error("Error trying to parse relative URL.");if(o.scheme)return r.alwaysNormalize?(o.path=a.normalizePath(o.path),a.buildURLFromParts(o)):t;var s=a.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=n.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:o.netLoc,path:null,params:o.params,query:o.query,fragment:o.fragment};if(!o.netLoc&&(u.netLoc=s.netLoc,"/"!==o.path[0]))if(o.path){var c=s.path,p=c.substring(0,c.lastIndexOf("/")+1)+o.path;u.path=a.normalizePath(p)}else u.path=s.path,o.params||(u.params=s.params,o.query||(u.query=s.query));return null===u.path&&(u.path=r.alwaysNormalize?a.normalizePath(o.path):o.path),a.buildURLFromParts(u)},parseURL:function(e){var n=t.exec(e);return n?{scheme:n[1]||"",netLoc:n[2]||"",path:n[3]||"",params:n[4]||"",query:n[5]||"",fragment:n[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(r,"");e.length!==(e=e.replace(i,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=a}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}return n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(76).default})(),e.exports=r())},function(e,t,n){var r,i;window,e.exports=(r=n(0),i=n(318),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=6)}([function(e,t){e.exports=r},function(e,t){e.exports=i},function(e){e.exports=JSON.parse('{"shakaConfig":{"streaming":{"ignoreTextStreamFailures":true,"bufferingGoal":60,"alwaysStreamText":true},"abr":{"enabled":true,"restrictions":{}}},"forceRedirectExternalStreams":false,"trackEmsgEvents":true,"switchDynamicToStatic":false}')},function(e,t,n){(t=n(5)(!1)).push([e.i,".shaka-text-container {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n pointer-events: none;\n width: 100%;\n min-width: 48px;\n transition: bottom cubic-bezier(0.4, 0, 0.6, 1) 0.1s;\n transition-delay: 0s;\n font-size: 20px;\n line-height: 1.4;\n color: #fff;\n font-family: Roboto-Regular, Roboto, sans-serif, TengwarTelcontar;\n}\n.shaka-text-container span.shaka-text-wrapper {\n display: inline;\n background: 0 0;\n text-align: center;\n}\n\n:fullscreen .shaka-text-container {\n font-size: 4.4vmin;\n}\n\n:-webkit-full-screen .shaka-text-container {\n font-size: 4.4vmin;\n}\n\n:-moz-full-screen .shaka-text-container {\n font-size: 4.4vmin;\n}\n\n:-ms-fullscreen .shaka-text-container {\n font-size: 4.4vmin;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";var r,i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),a=[];function o(e){for(var t=-1,n=0;n<a.length;n++)if(a[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},r=[],i=0;i<e.length;i++){var s=e[i],l=t.base?s[0]+t.base:s[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var p=o(c),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(a[p].references++,a[p].updater(d)):a.push({identifier:c,updater:g(d,t),references:1}),r.push(c)}return r}function l(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var a=n.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=i(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var u,c=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function p(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=c(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function d(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var f=null,h=0;function g(e,t){var n,r,i;if(t.singleton){var a=h++;n=f||(f=l(t)),r=p.bind(null,n,a,!1),i=p.bind(null,n,a,!0)}else n=l(t),r=d.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=o(n[r]);a[i].references--}for(var l=s(e,t),u=0;u<n.length;u++){var c=o(n[u]);0===a[c].references&&(a[c].updater(),a.splice(c,1))}n=l}}}},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r,i,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(n=o,r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),"/*# ".concat(i," */")),l=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(l).concat([s]).join("\n")}return[a].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return X})),n.d(t,"NAME",(function(){return $}));var r,i,a,o,s,l,u,c=n(0),p=n(1),d=n.n(p),f=(i=r=function(){function e(){}return e.isConfigured=function(e,t){return c.DrmScheme.WIDEVINE===t.keySystem&&!!e.find((function(e){return e.scheme===t.keySystem}))},e.canPlayDrm=function(t){return e._logger.debug("Can play DRM scheme of: "+c.DrmScheme.WIDEVINE),!!t.find((function(e){return e.scheme===c.DrmScheme.WIDEVINE}))},e.setDrmPlayback=function(t,n){e._logger.debug("Sets drm playback");var r,i,a=c.Env.browser.name,o=n.find((function(e){return e.scheme===c.DrmScheme.WIDEVINE}));o&&(t.drm={servers:(r={},r[c.DrmScheme.WIDEVINE]=o.licenseUrl,r),advanced:{}},"Chrome"===a&&(t.drm.advanced=((i={})[c.DrmScheme.WIDEVINE]={videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},i)))},e}(),a=r,o="_logger",s=Object(c.getLogger)("Widevine"),o in a?Object.defineProperty(a,o,{value:s,enumerable:!0,configurable:!0,writable:!0}):a[o]=s,i),h=(u=l=function(){function e(){}return e.isConfigured=function(e,t){return c.DrmScheme.PLAYREADY===t.keySystem&&!!e.find((function(e){return e.scheme===t.keySystem}))},e.canPlayDrm=function(t){return e._logger.debug("Can play DRM scheme of: "+c.DrmScheme.PLAYREADY),!!t.find((function(e){return e.scheme===c.DrmScheme.PLAYREADY}))},e.setDrmPlayback=function(t,n){e._logger.debug("Sets drm playback");var r,i=n.find((function(e){return e.scheme===c.DrmScheme.PLAYREADY}));i&&(t.drm={servers:(r={},r[c.DrmScheme.PLAYREADY]=i.licenseUrl,r)})},e}(),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(l,"_logger",Object(c.getLogger)("PlayReady")),u),g=n(2),y=n(4),v=n.n(y),m=n(3),b=n.n(m);function _(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}v()(b.a,{insert:"head",singleton:!1}),b.a.locals;var E=function(){function e(e){this._media=A.parseAttr(e,T.AttributeTypes.MEDIA),this._startNumber=A.parseAttr(e,T.AttributeTypes.START_NUMBER,A.parseInt,1),this._duration=A.parseAttr(e,T.AttributeTypes.DURATION,A.parseFloat),this._timescale=A.parseAttr(e,T.AttributeTypes.TIMESCALE,A.parsePositiveInt,1),this._presentationTimeOffset=A.parseAttr(e,T.AttributeTypes.PRESENTATION_TIME_OFFSET,A.parseInt,0),this._endNumber=A.parseAttr(e,T.AttributeTypes.END_NUMBER,A.parsePositiveInt)}var t,n;return t=e,(n=[{key:"media",get:function(){return this._media}},{key:"startNumber",get:function(){return this._startNumber}},{key:"duration",get:function(){return this._duration}},{key:"timescale",get:function(){return this._timescale}},{key:"presentationTimeOffset",get:function(){return this._presentationTimeOffset}},{key:"endNumber",get:function(){return this._endNumber}}])&&_(t.prototype,n),e}();!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(E,"MediaTemplateType",{REPRESENTATION:"$RepresentationID$",NUMBER:"$Number$",BANDWIDTH:"$Bandwidth$",TIME:"$Time$"});var k=function(e,t){var n=t.id,r=t.index,i=t.bitrate,a=t.time,o=e.match(/\$([a-zA-Z]+)\$/g),s=function(e,t,n){return n?e.replace(t,n):e};return o&&o.forEach((function(t){switch(t){case E.MediaTemplateType.REPRESENTATION:e=s(e,t,n);break;case E.MediaTemplateType.NUMBER:e=s(e,t,r);break;case E.MediaTemplateType.BANDWIDTH:e=s(e,t,i);break;case E.MediaTemplateType.TIME:e=s(e,t,a)}})),e},T={TagTypes:{BASE_URL:"BaseURL",SEGMENT_TEMPLATE:"SegmentTemplate",REPRESENTATION:"Representation",ESSENTIAL_PROPERTY:"EssentialProperty",ADAPTATION_SET:"AdaptationSet"},AttributeTypes:{BASE_URL:"BaseURL",ID:"id",CONTENT_TYPE:"contentType",MIME_TYPE:"mimeType",MEDIA:"media",DURATION:"duration",START_NUMBER:"startNumber",TIMESCALE:"timescale",PRESENTATION_TIME_OFFSET:"presentationTimeOffset",END_NUMBER:"endNumber",BANDWIDTH:"bandwidth",WIDTH:"width",HEIGHT:"height",SCHEME_ID_URI:"schemeIdUri",VALUE:"value"}},A={parseXml:function(e){return(new DOMParser).parseFromString(e,"text/xml")},parseAttr:function(e,t,n,r){var i=null,a=e.getAttribute(t);return null!==a&&(i=n?n(a):a),null==i?r:i},findElements:function(e,t){return e.getElementsByTagName(t)},findChild:function(e,t){var n=this.findChildren(e,t);return 1!==n.length?null:n[0]},findChildren:function(e,t){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.tagName===t}))},parseInt:function(e){var t=Number(e);return t%1==0?t:null},parsePositiveInt:function(e){var t=Number(e);return t%1==0&&t>0?t:null},parseFloat:function(e){var t=Number(e);return isNaN(t)?null:t}};function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var S=function(){function e(e){this._schemeIdUri=A.parseAttr(e,T.AttributeTypes.SCHEME_ID_URI),this._value=A.parseAttr(e,T.AttributeTypes.VALUE)}var t,n;return t=e,(n=[{key:"schemeIdUri",get:function(){return this._schemeIdUri}},{key:"value",get:function(){return this._value}}])&&w(t.prototype,n),e}();function C(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var x=function(){function e(e){this._id=A.parseAttr(e,T.AttributeTypes.ID),this._bandwidth=A.parseAttr(e,T.AttributeTypes.BANDWIDTH,parseInt),this._width=A.parseAttr(e,T.AttributeTypes.WIDTH,parseInt),this._height=A.parseAttr(e,T.AttributeTypes.HEIGHT,parseInt);var t=A.findChild(e,T.TagTypes.ESSENTIAL_PROPERTY);t&&(this._essentialProperty=new S(t))}var t,n;return t=e,(n=[{key:"bandwidth",get:function(){return this._bandwidth}},{key:"id",get:function(){return this._id}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"essentialProperty",get:function(){return this._essentialProperty}}])&&C(t.prototype,n),e}();function I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var P=function(){function e(e){this._id=A.parseAttr(e,T.AttributeTypes.ID),this._mimeType=A.parseAttr(e,T.AttributeTypes.MIME_TYPE),this._contentType=A.parseAttr(e,T.AttributeTypes.CONTENT_TYPE),this._representations=Array.from(A.findChildren(e,T.TagTypes.REPRESENTATION)).map((function(e){return new x(e)}));var t=A.findChild(e,T.TagTypes.SEGMENT_TEMPLATE);t&&(this._segmentTemplate=new E(t));var n=A.findChild(e,T.TagTypes.ESSENTIAL_PROPERTY);n&&(this._essentialProperty=new S(n))}var t,n;return t=e,(n=[{key:"id",get:function(){return this._id}},{key:"mimeType",get:function(){return this._mimeType}},{key:"contentType",get:function(){return this._contentType}},{key:"segmentTemplate",get:function(){return this._segmentTemplate}},{key:"essentialProperty",get:function(){return this._essentialProperty}},{key:"representations",get:function(){return this._representations}}])&&I(t.prototype,n),e}();function D(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(P,"ContentType",{VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image"});var O=function(){function e(e){var t,n=this;R(this,"_logger",Object(c.getLogger)("DashManifestParser")),R(this,"_parseAdaptionSets",(function(){var e=A.findElements(n._xmlDoc,T.TagTypes.BASE_URL);e&&e.length>0&&e[0].innerHTML&&(n._baseURL=e[0].textContent);var t=A.findElements(n._xmlDoc,T.TagTypes.ADAPTATION_SET),r=Array.from(t).filter((function(e){return A.parseAttr(e,T.AttributeTypes.CONTENT_TYPE)===P.ContentType.IMAGE}));r.length>0?(n._adaptationSets=r.map((function(e){return new P(e)})),n._logger.debug("Found image adaptation set",n._adaptationSets)):n._logger.debug("No image adaptations were found in manifest")})),this._logger.debug("Initialize manifest parser"),this._adaptationSets=[],(t=e instanceof ArrayBuffer?function(e){return TextDecoder?(new TextDecoder).decode(new Uint8Array(e)):null}(e):e)&&(this._xmlDoc=A.parseXml(t))}e.isValid=function(){return window.TextEncoder&&window.TextDecoder};var t,n,r=e.prototype;return r.parseManifest=function(){try{this._logger.debug("Start parsing dash manifest"),this._parseAdaptionSets(),this._logger.debug("Manifest parsing finished successfully")}catch(e){this._logger.warn("Manifest parsing failed",e)}},r.getBaseUrl=function(){return this._baseURL||""},r.getImageSet=function(){return this._adaptationSets.find((function(e){return e.contentType===P.ContentType.IMAGE}))},r.hasImageSet=function(){return!!this.getImageSet()},t=e,(n=[{key:"adaptationSets",get:function(){return this._adaptationSets}}])&&D(t.prototype,n),e}();function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M=function(){function e(e,t,n){var r=this;L(this,"_tracks",[]),L(this,"_parseTracks",(function(e,t,n){var i=e.representations,a=e.segmentTemplate,o=e.essentialProperty;i.forEach((function(e,i){var s=e.id,l=e.bandwidth,u=e.width,p=e.height,d=a.startNumber,f=a.duration,h=a.media,g=a.timescale,y=a.presentationTimeOffset,v=r._getEssentialValue(o,e),m=r._getDimensions(v),b=m[0],_=m[1];r._tracks.push(new c.ImageTrack({id:s,index:i,active:!1,width:u,height:p,duration:f,rows:b,cols:_,url:r._buildTemplateUrl(h,s,t,n),customData:{bitrate:l,startNumber:d,timescale:g,presentationTimeOffset:y}}))}))})),L(this,"_getDimensions",(function(e){var t=1,n=1;if(e.includes("x")){var r=e.split("x");n=parseInt(r[0]),t=parseInt(r[1])}return[t,n]})),L(this,"_getEssentialValue",(function(e,t){return e?e.value:t.essentialProperty?t.essentialProperty.value:""})),L(this,"_buildTemplateUrl",(function(e,t,n,r){var i=n.split("/").pop(),a=n.replace(i,"");return(r=r.replace(/^\.\/|^\./,"")).length>0&&!r.endsWith("/")&&(r+="/"),k(""+a+r+e,{id:t})})),L(this,"_buildUrlFromTemplate",(function(e,t){return k(e.url,{index:t,time:(t-1)*e.duration*e.customData.timescale,bitrate:e.customData.bitrate})})),this._parseTracks(e,t,n),this._tracks.length>0&&(this._tracks.sort((function(e,t){return e.customData.bitrate-t.customData.bitrate})),this.selectTrack(this._tracks[this._tracks.length-1]))}var t=e.prototype;return t.selectTrack=function(e){this._tracks.forEach((function(t){return t.index===e.index?t.active=!0:t.active=!1}))},t.getTracks=function(){return this._tracks},t.getActiveTrack=function(){return this._tracks.find((function(e){return e.active}))},t.getThumbnail=function(e){var t=this.getActiveTrack(),n=t.duration,r=t.rows,i=t.cols,a=t.sliceWidth,o=t.sliceHeight,s=t.customData,l=Math.floor(e/n)+s.startNumber,u=e%n,p=Math.floor(u*r*i/n);return new c.ThumbnailInfo({width:Math.floor(a),height:Math.floor(o),x:Math.floor(p%i)*a,y:Math.floor(p/i)*o,url:this._buildUrlFromTemplate(t,l)})},e}();function N(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function U(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){N(a,r,i,o,s,"next",e)}function s(e){N(a,r,i,o,s,"throw",e)}o(void 0)}))}}function F(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return j(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?j(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function V(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function H(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var K="error",G="adaptation",z="buffering",W="drmsessionupdate",Y="emsg",q=function(e){var t,n;n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,o.createAdapter=function(e,t,n){var r=c.Utils.Object.copyDeep(g);if(c.Utils.Object.hasPropertyPath(n,"text.useNativeTextTrack")&&(r.textTrackVisibile=c.Utils.Object.getPropertyPath(n,"text.useNativeTextTrack")),c.Utils.Object.hasPropertyPath(n,"text.useShakaTextTrackDisplay")&&(r.useShakaTextTrackDisplay=c.Utils.Object.getPropertyPath(n,"text.useShakaTextTrackDisplay"),r.textTrackVisibile=r.textTrackVisibile||r.useShakaTextTrackDisplay),c.Utils.Object.hasPropertyPath(n,"streaming")){var i=n.streaming;"boolean"==typeof i.forceBreakStall&&(r.forceBreakStall=i.forceBreakStall),"boolean"==typeof i.lowLatencyMode&&(r.lowLatencyMode=i.lowLatencyMode),"boolean"==typeof i.trackEmsgEvents&&(r.trackEmsgEvents=i.trackEmsgEvents),"boolean"==typeof i.switchDynamicToStatic&&(r.switchDynamicToStatic=i.switchDynamicToStatic)}if(c.Utils.Object.hasPropertyPath(n,"sources.options")){var a=n.sources.options;r.forceRedirectExternalStreams=a.forceRedirectExternalStreams,r.redirectExternalStreamsHandler=a.redirectExternalStreamsHandler,r.redirectExternalStreamsTimeout=a.redirectExternalStreamsTimeout}if(c.Utils.Object.hasPropertyPath(n,"abr")){var o=n.abr;"boolean"==typeof o.enabled&&(r.shakaConfig.abr.enabled=o.enabled),"boolean"==typeof o.capLevelToPlayerSize&&(r.capLevelToPlayerSize=o.capLevelToPlayerSize),o.defaultBandwidthEstimate&&(r.shakaConfig.abr.defaultBandwidthEstimate=o.defaultBandwidthEstimate),o.restrictions&&c.Utils.Object.createPropertyPath(r,"abr.restrictions",o.restrictions)}return c.Utils.Object.hasPropertyPath(n,"playback.options.html5.dash")&&(c.Utils.Object.mergeDeep(r.shakaConfig,n.playback.options.html5.dash),c.Utils.Object.hasPropertyPath(r.shakaConfig,"manifest.dash.defaultPresentationDelay")&&(r.shakaConfig.manifest.defaultPresentationDelay=r.shakaConfig.manifest.dash.defaultPresentationDelay,delete r.shakaConfig.manifest.dash.defaultPresentationDelay)),r.network=n.network,new this(e,t,r)},o.canPlayType=function(e){var t="string"==typeof e&&e.toLowerCase()===o._dashMimeType&&o.isMSESupported();return o._logger.debug("canPlayType result for mimeType: "+e+" is "+t.toString()),t};var r,i,a=o.prototype;function o(t,n,r){var i,a;return void 0===r&&(r={}),o._logger.debug("Creating adapter. Shaka version: "+d.a.Player.version),H(V(a=e.call(this,t,n,r)||this),"_shakaLib",d.a),H(V(a),"_adapterEventsBindings",((i={})[K]=function(e){return a._onError(e)},i[G]=function(){return a._onAdaptation()},i[z]=function(e){return a._onBuffering(e)},i[W]=function(){return a._onDrmSessionUpdate()},i[Y]=function(e){return a._onEmsg(e)},i[c.EventType.WAITING]=function(){return a._onWaiting()},i[c.EventType.PLAYING]=function(){return a._onPlaying()},i)),H(V(a),"_buffering",!1),H(V(a),"_waitingSent",!1),H(V(a),"_playingSent",!1),H(V(a),"_videoSizeUpdateTimer",null),H(V(a),"_stallInterval",null),H(V(a),"VIDEO_ERROR_CODE",3016),H(V(a),"_lastTimeDetach",NaN),H(V(a),"_requestFilterError",!1),H(V(a),"_responseFilterError",!1),H(V(a),"_isDestroyInProgress",!1),H(V(a),"_isStartOver",!0),H(V(a),"_seekRangeStart",0),H(V(a),"_isLive",!1),H(V(a),"_isStaticLive",!1),H(V(a),"_selectedVideoTrack",null),a._config=c.Utils.Object.mergeDeep({},g,a._config),a._init(),a}return a.setMaxBitrate=function(e){this._hasLowerOrEqualBitrate(e)&&this._shaka.configure({abr:{restrictions:{maxBandwidth:e}}})},a._getSortedTracks=function(){return this._shaka.getVariantTracks().map((function(e){return{id:e.id,bandwidth:e.bandwidth,active:e.active}})).sort((function(e,t){return e.bandwidth-t.bandwidth}))},a._hasLowerOrEqualBitrate=function(e){return this._getSortedTracks()[0].bandwidth<=e},o.canPlayDrm=function(e,t){o._availableDrmProtocol=[];for(var n,r=F(o._drmProtocols);!(n=r()).done;){var i=n.value;if(i.isConfigured(e,t)){o._availableDrmProtocol.push(i);break}}if(!o._availableDrmProtocol.length)for(var a,s=F(o._drmProtocols);!(a=s()).done;){var l=a.value;l.canPlayDrm(e)&&o._availableDrmProtocol.push(l)}return!!o._availableDrmProtocol.length},o.isSupported=function(){var e=!1;window.VTTCue||(e=!0),d.a.polyfill.installAll();var t=d.a.Player.isBrowserSupported();return e&&(window.VTTCue=void 0),o._logger.debug("isSupported:"+t),t},a._init=function(){d.a.polyfill.installAll(),this._shaka=new d.a.Player,this._config.useShakaTextTrackDisplay&&this._shaka.setVideoContainer(c.Utils.Dom.getElementBySelector(".playkit-subtitles")),this._maybeSetFilters(),this._maybeSetDrmConfig(),this._maybeBreakStalls(),this._shaka.configure(this._config.shakaConfig),this._addBindings()},a._clearStallInterval=function(){this._stallInterval&&(clearInterval(this._stallInterval),this._stallInterval=null)},a._stallHandler=function(){var e=this;this._clearStallInterval();var t=function(){return Date.now()/1e3},n=t(),r=this._videoElement.currentTime;this._stallInterval=setInterval((function(){t()-n>3&&!e._videoElement.paused&&(r===e._videoElement.currentTime&&(o._logger.debug("stall found, break the stall"),e._videoElement.currentTime=parseFloat(e._videoElement.currentTime.toFixed(1))+.1),e._clearStallInterval()),r=e._videoElement.currentTime}),500)},a._maybeBreakStalls=function(){var e=this;this._config.forceBreakStall&&this._eventManager.listen(this._videoElement,c.EventType.SEEKING,(function(){return e._stallHandler()}))},a._maybeGetRedirectedUrl=function(e){var t=this._config.forceRedirectExternalStreams,n=this._config.redirectExternalStreamsTimeout,r=this._config.redirectExternalStreamsHandler;return new Promise((function(i){if(!t)return i(e);c.Utils.Http.jsonp(e,r,{timeout:n}).then((function(e){i(e)})).catch((function(){return i(e)}))}))},a._maybeSetFilters=function(){var e=this;"function"==typeof c.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(o._logger.debug("Register request filter"),this._shaka.getNetworkingEngine().registerRequestFilter((function(t,n){if(Object.values(c.RequestType).includes(t)){var r,i={url:n.uris[0],body:n.body,headers:n.headers};try{r=e._config.network.requestFilter(t,i)}catch(e){r=Promise.reject(e)}return(r=r||Promise.resolve(i)).then((function(e){n.uris=[e.url],n.headers=e.headers,"boolean"==typeof e.withCredentials&&(n.allowCrossSiteCredentials=e.withCredentials),"POST"===n.method?n.body=e.body:e.body&&o._logger.warn("Request with "+n.method+" method cannot have body")})).catch((function(t){throw e._requestFilterError=!0,t}))}}))),"function"==typeof c.Utils.Object.getPropertyPath(this._config,"network.responseFilter")&&(o._logger.debug("Register response filter"),this._shaka.getNetworkingEngine().registerResponseFilter((function(t,n){if(Object.values(c.RequestType).includes(t)){var r,i=n.uri,a=n.data,o=n.headers,s={url:i,originalUrl:e._sourceObj.url,data:a,headers:o};try{r=e._config.network.responseFilter(t,s)}catch(e){r=Promise.reject(e)}return(r=r||Promise.resolve(s)).then((function(e){n.data=e.data})).catch((function(t){throw e._responseFilterError=!0,t}))}})))},a._maybeSetDrmConfig=function(){if(this._sourceObj&&this._sourceObj.drmData)for(var e,t={},n=F(o._availableDrmProtocol);!(e=n()).done;)e.value.setDrmPlayback(t,this._sourceObj.drmData),this._config.shakaConfig.drm&&c.Utils.Object.mergeDeep(t.drm,this._config.shakaConfig.drm),c.Utils.Object.mergeDeep(this._config.shakaConfig,t)},a._maybeCapLevelToPlayerSize=function(){var e=this;if(this._config.capLevelToPlayerSize){var t=function(){return{minHeight:0,maxHeight:e._videoHeight,minWidth:0,maxWidth:e._videoWidth,minBitrate:0,maxBitrate:1/0}};this._clearVideoUpdateTimer(),this._videoSizeUpdateTimer=setInterval((function(){return e._updateRestriction(t())}),1e3),this._updateRestriction(t())}},a._maybeApplyAbrRestrictions=function(){this._config.capLevelToPlayerSize||(this._clearVideoUpdateTimer(),c.Utils.Object.hasPropertyPath(this._config,"abr.restrictions")&&this._updateRestriction(this._config.abr.restrictions))},a._updateRestriction=function(e){var t=this._getRestrictionShakaConfig(e);this._shaka.configure({abr:{restrictions:t}})},a._getRestrictionShakaConfig=function(e){var t=this,n=function(e){var n=t._getVideoTracks();return Math.min.apply(null,n.map((function(t){return t[e]})))},r={};if(e){var i=e.maxHeight,a=e.maxWidth,s=e.maxBitrate,l=e.minHeight,u=e.minWidth,c=e.minBitrate,p=Math.max(l,0),d=Math.max(i,n("height"));d>=p?(r.minHeight=p,r.maxHeight=d):o._logger.warn("Invalid maxHeight restriction, maxHeight must be greater than minHeight",l,i);var f=Math.max(u,0),h=Math.max(a,n("width"));h>=f?(r.minWidth=f,r.maxWidth=h):o._logger.warn("Invalid maxWidth restriction, maxWidth must be greater than minWidth",u,a);var g=Math.max(c,0),y=Math.max(s,n("bandwidth"));y>=g?(r.minBandwidth=g,r.maxBandwidth=y):o._logger.warn("Invalid maxBitrate restriction, maxBitrate must be greater than minBitrate",c,s)}return r},a.attachMediaSource=function(){this._shaka||(this._videoElement&&this._videoElement.src&&(c.Utils.Dom.setAttribute(this._videoElement,"src",""),c.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init())},a.detachMediaSource=function(){var e=this;return this._shaka?(0===Math.floor(this.duration-this.currentTime)?this._lastTimeDetach=0:this.currentTime>0&&(this._lastTimeDetach=this.currentTime),this._reset().then((function(){e._shaka=null,e._loadPromise=null}))):Promise.resolve()},a._clearVideoUpdateTimer=function(){this._videoSizeUpdateTimer&&(clearInterval(this._videoSizeUpdateTimer),this._videoSizeUpdateTimer=null)},a._addBindings=function(){var e=this;this._eventManager.listen(this._shaka,G,this._adapterEventsBindings.adaptation),this._eventManager.listen(this._shaka,K,this._adapterEventsBindings.error),this._eventManager.listen(this._shaka,W,this._adapterEventsBindings.drmsessionupdate),this._eventManager.listen(this._videoElement,c.EventType.WAITING,this._adapterEventsBindings.waiting),this._eventManager.listen(this._videoElement,c.EventType.PLAYING,this._adapterEventsBindings.playing),this._eventManager.listen(this._videoElement,c.EventType.LOADED_DATA,(function(){return e._onLoadedData()})),this._eventManager.listenOnce(this._videoElement,c.EventType.PLAYING,(function(){e._eventManager.listen(e._shaka,z,e._adapterEventsBindings.buffering)})),this._config.trackEmsgEvents&&this._eventManager.listen(this._shaka,Y,this._adapterEventsBindings.emsg),this._shaka.getNetworkingEngine().registerResponseFilter((function(t,n){switch(t){case d.a.net.NetworkingEngine.RequestType.SEGMENT:e._trigger(c.EventType.FRAG_LOADED,{miliSeconds:n.timeMs,bytes:n.data.byteLength,url:n.uri}),e.isLive()&&e._dispatchNativeEvent(c.EventType.DURATION_CHANGE);break;case d.a.net.NetworkingEngine.RequestType.MANIFEST:e._parseManifest(n.data),e._playbackActualUri=n.uri,e._trigger(c.EventType.MANIFEST_LOADED,{miliSeconds:n.timeMs}),setTimeout((function(){var t,r;e._isLive=e._isLive||(null==(t=e._shaka)?void 0:t.isLive()),e._isLive&&!(null==(r=e._shaka)?void 0:r.isLive())&&!e._isStaticLive&&e._config.switchDynamicToStatic&&(e._sourceObj.url=n.uri,e._switchFromDynamicToStatic())}))}}))},a._onLoadedData=function(){var e=this;this._setLowLatencyMode();var t=this.getSegmentDuration();this._seekRangeStart=this._shaka.seekRange().start,this._startOverTimeout=setTimeout((function(){e._shaka.seekRange().start-e._seekRangeStart>=t&&(e._isStartOver=!1)}),1e3*(t+1))},a._switchFromDynamicToStatic=function(){var e=U(regeneratorRuntime.mark((function e(){var t,n,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o._logger.info("Switching from dynamic manifest to static"),this._dispatchNativeEvent(c.EventType.WAITING),t=this._videoElement.currentTime-this._seekRangeStart,n=this.isAdaptiveBitrateEnabled(),r=this._videoElement.paused,e.next=7,this.detachMediaSource();case 7:return this._isStaticLive=!0,this._isLive=!0,this.attachMediaSource(),e.next=12,this.load();case 12:this._videoElement.currentTime=t,r||this._videoElement.play(),n?this._onAdaptation():this._selectedVideoTrack&&this.selectVideoTrack(this._selectedVideoTrack);case 15:case"end":return e.stop()}}),e,this)})));return function(){return e.apply(this,arguments)}}(),a._setLowLatencyMode=function(){this._shaka.configure({streaming:{lowLatencyMode:"boolean"==typeof this._config.lowLatencyMode?this._config.lowLatencyMode:this.isLive()}})},a._parseManifest=function(e){!this._manifestParser&&O.isValid()&&(o._logger.debug("Creating parser for the first time"),this._manifestParser=new O(e),this._manifestParser.parseManifest())},a.load=function(){var e=U(regeneratorRuntime.mark((function e(t){var n=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this._loadPromise){e.next=5;break}return e.next=3,this._removeMediaKeys();case 3:this._shaka.attach(this._videoElement),this._loadPromise=new Promise((function(e,r){if(n._sourceObj&&n._sourceObj.url){n._trigger(c.EventType.ABR_MODE_CHANGED,{mode:n.isAdaptiveBitrateEnabled()?"auto":"manual"});var i=t&&t>-1?t:void 0;i=isNaN(n._lastTimeDetach)?i:n._lastTimeDetach,n._lastTimeDetach=NaN,n._maybeGetRedirectedUrl(n._sourceObj.url).then((function(e){return n._shaka.load(e,i)})).then((function(){var t={tracks:n._getParsedTracks()};n._maybeCapLevelToPlayerSize(),o._logger.debug("The source has been loaded successfully"),e(t)})).catch((function(e){r(new c.Error(n._isDestroyInProgress?c.Error.Severity.RECOVERABLE:e.severity,e.category,e.code,e.data))}))}}));case 5:return e.abrupt("return",this._loadPromise);case 6:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}(),a.destroy=function(){var t=this;return this._isDestroyInProgress=!0,new Promise((function(n,r){e.prototype.destroy.call(t).then((function(){o._logger.debug("destroy"),t._loadPromise=null,t._adapterEventsBindings={},t._reset().then((function(e){t._isDestroyInProgress=!1,n(e)})).catch((function(e){t._isDestroyInProgress=!1,r(e)}))}))}))},a.getThumbnail=function(e){if(this._thumbnailController)return this._thumbnailController.getThumbnail(e)},a._reset=function(){return this._buffering=!1,this._waitingSent=!1,this._playingSent=!1,this._isLive=!1,this._isStaticLive=!1,this._requestFilterError=!1,this._responseFilterError=!1,this._manifestParser=null,this._thumbnailController=null,this._clearStallInterval(),this._clearVideoUpdateTimer(),clearTimeout(this._startOverTimeout),this._eventManager&&this._eventManager.removeAll(),this._shaka?this._shaka.destroy():Promise.resolve()},a._removeMediaKeys=function(){var e=U(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this._videoElement||!this._videoElement.mediaKeys){e.next=16;break}return e.prev=1,o._logger.debug("Removing mediaKeys from the video element"),e.next=5,this._videoElement.setMediaKeys(null);case 5:o._logger.debug("mediaKeys removed"),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(1),this._logger.warn("mediaKeys not cleared");case 11:return e.prev=11,e.abrupt("return",Promise.resolve());case 14:e.next=17;break;case 16:return e.abrupt("return",Promise.resolve());case 17:case"end":return e.stop()}}),e,this,[[1,8,11,14]])})));return function(){return e.apply(this,arguments)}}(),a._getVideoTracks=function(){var e=this._shaka.getVariantTracks(),t=this._getActiveTrack();return e.filter((function(e){return e.audioId===t.audioId}))},a._getActiveTrack=function(){return this._shaka.getVariantTracks().find((function(e){return e.active}))},a._getAudioTracks=function(){var e=this._shaka.getVariantTracks(),t=this._shaka.getAudioLanguagesAndRoles();return t.forEach((function(t){var n=e.filter((function(e){return e.language===t.language})),r=n.map((function(e){return e.id})).join("_"),i=n.some((function(e){return e.active}));t.id=r,t.label=n[0].label,t.active=i})),t},a._getParsedTracks=function(){if(this._shaka){var e=this._getParsedVideoTracks(),t=this._getParsedAudioTracks(),n=this._getParsedTextTracks(),r=this._getParsedImageTracks();return e.concat(t).concat(n).concat(r)}return[]},a._getParsedVideoTracks=function(){var e=this._getVideoTracks(),t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,bandwidth:e[n].videoBandwidth||e[n].bandwidth,width:e[n].width,height:e[n].height,active:e[n].active,index:n};t.push(new c.VideoTrack(r))}return t},a._getParsedAudioTracks=function(){var e=this._getAudioTracks(),t=[];if(e)for(var n=0;n<e.length;n++){var r={id:e[n].id,active:e[n].active,label:e[n].label,language:e[n].language,index:n};t.push(new c.AudioTrack(r))}return t},a._getParsedTextTracks=function(){for(var e,t=[],n=F(this._shaka.getTextTracks());!(e=n()).done;){var r=e.value,i=r.kind?r.kind+"s":"";i=""===i&&this._config.useShakaTextTrackDisplay?"captions":i;var a={id:r.id,kind:i,active:!1,default:r.primary,label:r.label,language:r.language};t.push(new c.TextTrack(a))}return t},a._getParsedImageTracks=function(){var e,t,n=null==(e=this._manifestParser)?void 0:e.getImageSet(),r=(null==(t=this._manifestParser)?void 0:t.getBaseUrl())||"";return n?(this._thumbnailController=new M(n,this._playbackActualUri,r),this._thumbnailController.getTracks()):[]},a.selectVideoTrack=function(e){if(this._shaka){var t=this._getVideoTracks();if(e instanceof c.VideoTrack&&t){var n=t[e.index];n&&(this.isAdaptiveBitrateEnabled()&&(this._shaka.configure({abr:{enabled:!1}}),this._trigger(c.EventType.ABR_MODE_CHANGED,{mode:"manual"})),n.active||(this._selectedVideoTrack=e,this._shaka.selectVariantTrack(t[e.index],!0),this._onTrackChanged(e)))}}},a.selectAudioTrack=function(e){this._shaka&&e instanceof c.AudioTrack&&!e.active&&(this._shaka.selectAudioLanguage(e.language),this._onTrackChanged(e))},a.selectTextTrack=function(e){this._shaka&&e instanceof c.TextTrack&&!e.active&&("subtitles"===e.kind||"captions"===e.kind)&&(this._shaka.setTextTrackVisibility(this._config.textTrackVisibile),this._shaka.selectTextLanguage(e.language),this._onTrackChanged(e))},a.selectImageTrack=function(e){this._shaka&&this._thumbnailController&&e instanceof c.ImageTrack&&!e.active&&(this._thumbnailController.selectTrack(e),this._onTrackChanged(c.ImageTrack))},a.hideTextTrack=function(){this._shaka&&this._shaka.setTextTrackVisibility(!1)},a.enableAdaptiveBitrate=function(){this._shaka&&!this.isAdaptiveBitrateEnabled()&&(this._trigger(c.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._shaka.configure({abr:{enabled:!0}}))},a.isAdaptiveBitrateEnabled=function(){return!!this._shaka&&this._shaka.getConfiguration().abr.enabled},a.applyABRRestriction=function(e){if(c.Utils.Object.createPropertyPath(this._config,"abr.restrictions",e),this._maybeApplyAbrRestrictions(),!this.isAdaptiveBitrateEnabled()){var t=this._getParsedVideoTracks(),n=Object(c.filterTracksByRestriction)(t,this._config.abr.restrictions);n.length&&(n.find((function(e){return e.active}))||this.selectVideoTrack(n[0]))}},a._getLiveEdge=function(){return this._shaka?this._shaka.seekRange().end:NaN},a.seekToLiveEdge=function(){this._shaka&&this._videoElement.readyState>0&&(this._videoElement.currentTime=this._getLiveEdge())},a.isLive=function(){var e;return(null==(e=this._shaka)?void 0:e.isLive())||this._isLive},a.getSegmentDuration=function(){return this._shaka?this._shaka.getStats().maxSegmentDuration:0},a._onAdaptation=function(){var e=this._getParsedVideoTracks().find((function(e){return e.active}));this._onTrackChanged(e)},a._onError=function(e){if(e&&e.detail){var t=e.detail;if(t.code===this.VIDEO_ERROR_CODE)return;(this._requestFilterError||this._responseFilterError)&&t.data[0]instanceof d.a.util.Error&&(t=t.data[0],this._requestFilterError?this._requestFilterError=!1:this._responseFilterError=!1),this._trigger(c.EventType.ERROR,new c.Error(t.severity,t.category,t.code,t.data)),o._logger.error(t),t.severity===c.Error.Severity.CRITICAL&&this.destroy()}},a._onBuffering=function(e){e.buffering?this._waitingSent||(this._dispatchNativeEvent(c.EventType.WAITING),this._buffering=!0):(this._buffering=!1,this._videoElement.paused||this._playingSent||this._dispatchNativeEvent(c.EventType.PLAYING))},a._dispatchNativeEvent=function(e){var t;"function"==typeof window.Event?t=new Event(e):(t=document.createEvent("Event")).initEvent(e,!0,!0),this._videoElement.dispatchEvent(t)},a._onDrmSessionUpdate=function(){this._trigger(c.EventType.DRM_LICENSE_LOADED,{licenseTime:this._shaka.getStats().licenseTime,scheme:this._shaka.drmInfo().keySystem})},a._onEmsg=function(e){var t=e.detail,n=e.type,r=Array.from(this._videoElement.textTracks).find((function(e){return e.label===n}));r||(r=this._videoElement.addTextTrack(c.TextTrack.KIND.METADATA,n));var i=t.startTime,a=t.endTime,o=t.id,s=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(t,["startTime","endTime","id"]),l=new c.TimedMetadata(i,a,o,c.TimedMetadata.TYPE.EMSG,s),u=Object(c.createTextTrackCue)(l);r.addCue(u),this._trigger(c.EventType.TIMED_METADATA_ADDED,{cues:[l]})},a._onWaiting=function(){this._waitingSent=!0,this._playingSent=!1},a._onPlaying=function(){this._playingSent=!0,this._waitingSent=!1,this._buffering&&this._dispatchNativeEvent(c.EventType.WAITING)},a.getStartTimeOfDvrWindow=function(){return this.isLive()&&this._shaka?(this._isStartOver?this._seekRangeStart:this._shaka.seekRange().start)+this._shaka.getConfiguration().streaming.safeSeekOffset:0},a.getDrmInfo=function(){var e=this._shaka.drmInfo();if(e){var t=e.licenseServerUri,n=e.keySystem,r=e.serverCertificateUri,i={licenseUrl:t,scheme:n};return r&&(i.certificate=r),i}return null},r=o,(i=[{key:"_videoWidth",get:function(){var e,t=this._videoElement;return t&&(e=t.width||t.clientWidth||t.offsetWidth,e*=this._contentScaleFactor),e}},{key:"_videoHeight",get:function(){var e,t=this._videoElement;return t&&(e=t.height||t.clientHeight||t.offsetHeight,e*=this._contentScaleFactor),e}},{key:"_contentScaleFactor",get:function(){var e=1;try{e=window.devicePixelRatio}catch(e){o._logger.debug("failed reading devicePixelRatio, assume 1")}return e}},{key:"liveDuration",get:function(){return this._getLiveEdge()}},{key:"targetBuffer",get:function(){var e=NaN;return this._shaka?(e=this.isLive()?this._getLiveEdge()-this._videoElement.currentTime:this._videoElement.duration-this._videoElement.currentTime,e=Math.min(e,this._shaka.getConfiguration().streaming.bufferingGoal+this._shaka.getStats().maxSegmentDuration)):NaN}}])&&B(r.prototype,i),o}(c.BaseMediaSourceAdapter);H(q,"id","DashAdapter"),H(q,"_logger",c.BaseMediaSourceAdapter.getLogger(q.id)),H(q,"_dashMimeType","application/dash+xml"),H(q,"_drmProtocols",[f,h]),H(q,"_availableDrmProtocol",[]);var X="1.34.2-canary.0-73343bc",$="@playkit-js/playkit-js-dash";t.default=q,q.isSupported()&&Object(c.registerMediaSourceAdapter)(q)}]))},function(e,t,n){(function(e){ /* @license Shaka Player @@ -61,7 +61,7 @@ function To(){}function Ao(e,t){var n=(127&e[t])<<21;return n|=(127&e[t+1])<<14, Copyright 2019 Google LLC SPDX-License-Identifier: Apache-2.0 */ -function Av(){}function wv(){mv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(mv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Sv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function Sv(e,t){var n,r=this;return R((function(i){return 1==i.g?(console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),_(i,mv.call(r,e,t),2)):Nv(n=i.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=mv,i.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=Cv,i.return(Cv.call(r,e,t)))}))}function Cv(e,t){var n,r,i,a,o,s,l,c,p,d,f=this;return R((function(h){if(1==h.g){for(console.assert(f==navigator,'bad "this" for requestMediaKeySystemAccess'),n=Mv(e),r=[],i=u(t),a=i.next();!a.done;a=i.next())o=a.value,s=xv(o.videoCapabilities,n),l=xv(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!l.length||((c=Object.assign({},o)).videoCapabilities=s,c.audioCapabilities=l,r.push(c));if(!r.length)throw(p=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return _(h,mv.call(f,e,r),2)}return d=h.h,h.return(new Lv(d,n))}))}function xv(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function Iv(){}function Pv(){bv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(bv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Dv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function Dv(e){var t,n,r,i=this;return R((function(a){switch(a.g){case 1:return console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),_(a,bv.call(i,e),2);case 2:if(t=a.h,!e.keySystemConfiguration)return a.return(t);if((n=t.keySystemAccess)&&Nv(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=bv,a.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Rv,n){a.A(3);break}return r=t,_(a,Ov(e),4);case 4:return r.keySystemAccess=a.h,a.return(t);case 3:return a.return(Rv.call(i,e))}}))}function Rv(e){var t,n,r,i,a,o,s,l,u=this;return R((function(c){switch(c.g){case 1:return console.assert(u==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t=null,e.keySystemConfiguration&&(n=e.keySystemConfiguration,r=n.keySystem,i=n.audio&&n.audio.encryptionScheme,a=n.video&&n.video.encryptionScheme,t=Mv(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},i&&i!=t||a&&a!=t)?c.return(o):_(c,bv.call(u,e),2);case 2:if((s=c.h).keySystemAccess){s.keySystemAccess=new Lv(s.keySystemAccess,t),c.A(3);break}if(!e.keySystemConfiguration){c.A(3);break}return l=s,_(c,Ov(e),5);case 5:l.keySystemAccess=c.h;case 3:return c.return(s)}}))}function Ov(e){var t,n;return R((function(r){if(1==r.g){var i=e.keySystemConfiguration,a=[],o=[];return i.audio&&a.push({robustness:i.audio.robustness||"",contentType:e.audio.contentType}),i.video&&o.push({robustness:i.video.robustness||"",contentType:e.video.contentType}),i={initDataTypes:i.initDataType?[i.initDataType]:[],distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes},a.length&&(i.audioCapabilities=a),o.length&&(i.videoCapabilities=o),t=i,_(r,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=r.h,r.return(n)}))}function Lv(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function Mv(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function Nv(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function Uv(){}function Fv(){wv(),Pv()}Jt["text/x-ssa"]=function(){return new hv},B("EmeEncryptionSchemePolyfill",Av),Av.install=wv,B("McEncryptionSchemePolyfill",Iv),Iv.install=Pv,Lv.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=u(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=u(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},Lv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},B("EncryptionSchemePolyfills",Uv),Uv.install=Fv,void 0!==n&&n.exports&&(n.exports=Uv)}.call(r,n,n,void 0),r.shaka)t[i]=r.shaka[i]}()}).call(this,n(92))},function(e,t){!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=function(e){for(var t=window.document,n=i(t);n;)n=i(t=n.ownerDocument);return t}(),t=[],n=null,r=null;o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o._setupCrossOriginUpdater=function(){return n||(n=function(e,n){r=e&&n?p(e,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach((function(e){e._checkForIntersections()}))}),n},o._resetCrossOriginUpdater=function(){n=null,r=null},o.prototype.observe=function(e){if(!this._observationTargets.some((function(t){return t.element==e}))){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},o.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e})),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},o.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter((function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]}))},o.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map((function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}}));return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},o.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var r=this._checkForIntersections,a=null,o=null;this.POLL_INTERVAL?a=n.setInterval(r,this.POLL_INTERVAL):(s(n,"resize",r,!0),s(t,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(o=new n.MutationObserver(r)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push((function(){var e=t.defaultView;e&&(a&&e.clearInterval(a),l(e,"resize",r,!0)),l(t,"scroll",r,!0),o&&o.disconnect()}));var u=this.root&&(this.root.ownerDocument||this.root)||e;if(t!=u){var c=i(t);c&&this._monitorIntersections(c.ownerDocument)}}},o.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var r=this.root&&(this.root.ownerDocument||this.root)||e;if(!this._observationTargets.some((function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=r;){var a=i(n);if((n=a&&a.ownerDocument)==t)return!0}return!1}))){var a=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),a(),t!=r){var o=i(t);o&&this._unmonitorIntersections(o.ownerDocument)}}}},o.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t<e.length;t++)e[t]()},o.prototype._checkForIntersections=function(){if(this.root||!n||r){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(r){var i=r.element,o=u(i),s=this._rootContainsTarget(i),l=r.entry,c=e&&s&&this._computeTargetAndRootIntersection(i,o,t),p=null;this._rootContainsTarget(i)?n&&!this.root||(p=t):p={top:0,bottom:0,left:0,right:0,width:0,height:0};var d=r.entry=new a({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:o,rootBounds:p,intersectionRect:c});l?e&&s?this._hasCrossedThreshold(l,d)&&this._queuedEntries.push(d):l&&l.isIntersecting&&this._queuedEntries.push(d):this._queuedEntries.push(d)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},o.prototype._computeTargetAndRootIntersection=function(t,i,a){if("none"!=window.getComputedStyle(t).display){for(var o,s,l,c,d,h,g,y,v=i,m=f(t),b=!1;!b&&m;){var _=null,E=1==m.nodeType?window.getComputedStyle(m):{};if("none"==E.display)return null;if(m==this.root||9==m.nodeType)if(b=!0,m==this.root||m==e)n&&!this.root?!r||0==r.width&&0==r.height?(m=null,_=null,v=null):_=r:_=a;else{var k=f(m),T=k&&u(k),A=k&&this._computeTargetAndRootIntersection(k,T,a);T&&A?(m=k,_=p(T,A)):(m=null,v=null)}else{var w=m.ownerDocument;m!=w.body&&m!=w.documentElement&&"visible"!=E.overflow&&(_=u(m))}if(_&&(o=_,s=v,l=void 0,c=void 0,d=void 0,h=void 0,g=void 0,y=void 0,l=Math.max(o.top,s.top),c=Math.min(o.bottom,s.bottom),d=Math.max(o.left,s.left),h=Math.min(o.right,s.right),y=c-l,v=(g=h-d)>=0&&y>=0&&{top:l,bottom:c,left:d,right:h,width:g,height:y}||null),!v)break;m=m&&f(m)}return v}},o.prototype._getRootRect=function(){var t;if(this.root&&!h(this.root))t=u(this.root);else{var n=h(this.root)?this.root:e,r=n.documentElement,i=n.body;t={top:0,left:0,right:r.clientWidth||i.clientWidth,width:r.clientWidth||i.clientWidth,bottom:r.clientHeight||i.clientHeight,height:r.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map((function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100})),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var i=0;i<this.thresholds.length;i++){var a=this.thresholds[i];if(a==n||a==r||a<n!=a<r)return!0}},o.prototype._rootIsInDom=function(){return!this.root||d(e,this.root)},o.prototype._rootContainsTarget=function(t){var n=this.root&&(this.root.ownerDocument||this.root)||e;return d(n,t)&&(!this.root||n==t.ownerDocument)},o.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},o.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=o,window.IntersectionObserverEntry=a}function i(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(e){return null}}function a(e){this.time=e.time,this.target=e.target,this.rootBounds=c(e.rootBounds),this.boundingClientRect=c(e.boundingClientRect),this.intersectionRect=c(e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,r=this.intersectionRect,i=r.width*r.height;this.intersectionRatio=n?Number((i/n).toFixed(4)):this.isIntersecting?1:0}function o(e,t){var n,r,i,a=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(a.root&&1!=a.root.nodeType&&9!=a.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout((function(){n(),i=null}),r))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(a.rootMargin),this.thresholds=this._initThresholds(a.threshold),this.root=a.root||null,this.rootMargin=this._rootMarginValues.map((function(e){return e.value+e.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function s(e,t,n,r){"function"==typeof e.addEventListener?e.addEventListener(t,n,r||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function l(e,t,n,r){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,r||!1):"function"==typeof e.detachEvent&&e.detachEvent("on"+t,n)}function u(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function c(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function p(e,t){var n=t.top-e.top,r=t.left-e.left;return{top:n,left:r,height:t.height,width:t.width,bottom:n+t.height,right:r+t.width}}function d(e,t){for(var n=t;n;){if(n==e)return!0;n=f(n)}return!1}function f(t){var n=t.parentNode;return 9==t.nodeType&&t!=e?i(t):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host?n.host:n)}function h(e){return e&&9===e.nodeType}}()},function(e,t,n){var r=n(321),i=n(322);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={insert:"head",singleton:!1};r(i,a);e.exports=i.locals||{}},function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function s(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],i=0;i<e.length;i++){var a=e[i],l=t.base?a[0]+t.base:a[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var p=s(c),d={css:a[1],media:a[2],sourceMap:a[3]};-1!==p?(o[p].references++,o[p].updater(d)):o.push({identifier:c,updater:y(d,t),references:1}),r.push(c)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=a(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var c,p=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function d(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=p(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function f(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,g=0;function y(e,t){var n,r,i;if(t.singleton){var a=g++;n=h||(h=u(t)),r=d.bind(null,n,a,!1),i=d.bind(null,n,a,!0)}else n=u(t),r=f.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);o[i].references--}for(var a=l(e,t),u=0;u<n.length;u++){var c=s(n[u]);0===o[c].references&&(o[c].updater(),o.splice(c,1))}n=a}}}},function(e,t,n){(t=n(323)(!1)).push([e.i,".kaltura-player-container {\n width: 100%;\n height: 100%;\n position: relative;\n background-color: #000;\n outline: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),a=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(a).concat([i]).join("\n")}var o,s,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"getPlayers",(function(){return yn})),n.d(t,"getPlayer",(function(){return vn})),n.d(t,"core",(function(){return l})),n.d(t,"ui",(function(){return u})),n.d(t,"providers",(function(){return c})),n.d(t,"setup",(function(){return _n})),n.d(t,"cast",(function(){return xn})),n.d(t,"playlist",(function(){return In})),n.d(t,"Ad",(function(){return At})),n.d(t,"AdBreak",(function(){return Et})),n.d(t,"BasePlugin",(function(){return Z})),n.d(t,"registerPlugin",(function(){return te})),n.d(t,"PLAYER_TYPE",(function(){return Dn})),n.d(t,"VERSION",(function(){return Rn})),n.d(t,"PLAYER_NAME",(function(){return Pn}));var r=n(46);n(312);var i,a,o,s=function(){function e(){}return e.install=function(){[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(e){Object.prototype.hasOwnProperty.call(e,"prepend")||Object.defineProperty(e,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Array.prototype.slice.call(arguments),t=document.createDocumentFragment();e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(String(e)))})),this.insertBefore(t,this.firstChild)}})}))},e}();i=s,o="prepend",(a=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(a="id"))in i?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o,r.a.register(s);n(313);var l=n(0),u=n(14),c=n(63);n(315),n(317);function p(e,t){var n=function(e){var t=document.createElement("a");return t.href=e,t.hostname},r=n(t),i=!1,a="",o="";return e&&(e.flavors&&Array.isArray(e.flavors)?(a=(i=1===e.flavors.length)&&n(e.flavors[0].url),o=e.flavors[0].url):e.result&&(i=!0,a=n(e.result.url),o=e.result.url)),i&&r!==a?o:t}function d(e,t){void 0===t&&(t={});var n={};if(t.sources&&t.sources.type===l.MediaType.LIVE&&("IE"===l.Env.browser.name||"Chromecast"===l.Env.device.model)){var r=l.Utils.Object.getPropertyPath(e,"sources.options.forceRedirectExternalStreams"),i=l.Utils.Object.getPropertyPath(t,"sources.options.forceRedirectExternalStreams");"boolean"!=typeof r&&"boolean"!=typeof i&&l.Utils.Object.mergeDeep(n,{sources:{options:{forceRedirectExternalStreams:!0}}})}return l.Utils.Object.mergeDeep(n,function(e,t){void 0===t&&(t={});var n={},r=l.Utils.Object.getPropertyPath(e,"sources.options.redirectExternalStreamsHandler"),i=l.Utils.Object.getPropertyPath(t,"sources.options.redirectExternalStreamsHandler");return"function"!=typeof r&&"function"!=typeof i&&l.Utils.Object.mergeDeep(n,{sources:{options:{redirectExternalStreamsHandler:p}}}),n}(e,t))}var f="Must provide initial providers config",h="Must provide target id",g="Must provide DOM element with id of: ",y="The target id provided is already in use. Id: ";function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var b="@playkit-js/kaltura-player-js_",_=function(){function e(){}var t,n,r;return e.isLocalStorageAvailable=function(){if("undefined"==typeof Storage)return!1;try{return localStorage.setItem("test","test"),localStorage.removeItem("test"),!0}catch(e){return!1}},e.setItem=function(t,n){e._validateKey(t);try{e._logger.debug("Sets item for key: "+t,n),localStorage.setItem(b+t,n)}catch(t){e._isQuotaExceeded(t)?e._logger.error("Quota exceeded: "+t.message):e._logger.error(t.message)}},e.getItem=function(t){e._validateKey(t);var n=null;try{return"string"==typeof(n=localStorage.getItem(b+t))?JSON.parse(n):null}catch(e){return n}},e._isQuotaExceeded=function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t},e._validateKey=function(e){if("string"!=typeof e||0===e.length)throw new Error("Invalid key")},t=e,r=[{key:"size",get:function(){return Object.keys(localStorage).filter((function(e){return e.startsWith(b)})).length}}],(n=null)&&v(t.prototype,n),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function E(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(_,"_logger",Object(l.getLogger)("StorageWrapper"));var k=function(){function e(){}return e.isLocalStorageAvailable=function(){return _.isLocalStorageAvailable()},e.attach=function(t){e._logger.debug("Attach local storage");var n=new l.EventManager;n.listen(t,t.Event.UI.USER_CLICKED_MUTE,(function(){t.isCasting()||_.setItem(e.StorageKeys.MUTED,t.muted)})),n.listen(t,t.Event.UI.USER_CLICKED_UNMUTE,(function(){t.isCasting()||_.setItem(e.StorageKeys.MUTED,t.muted)})),n.listen(t,t.Event.UI.USER_CHANGED_VOLUME,(function(){t.isCasting()||(t.volume>0?_.setItem(e.StorageKeys.MUTED,!1):_.setItem(e.StorageKeys.MUTED,!0),_.setItem(e.StorageKeys.VOLUME,t.volume))})),n.listen(t,t.Event.UI.USER_SELECTED_AUDIO_TRACK,(function(t){var n=t.payload.audioTrack;_.setItem(e.StorageKeys.AUDIO_LANG,n.language)})),n.listen(t,t.Event.UI.USER_SELECTED_CAPTION_TRACK,(function(t){var n=t.payload.captionTrack;_.setItem(e.StorageKeys.TEXT_LANG,n.language)}));var r=function(){n.listenOnce(t,t.Event.TEXT_TRACK_CHANGED,(function(t){var n=t.payload.selectedTextTrack;_.setItem(e.StorageKeys.TEXT_LANG,n.language)}))};n.listen(t,t.Event.UI.USER_SHOWED_CAPTIONS,r),n.listen(t,t.Event.UI.USER_HID_CAPTIONS,r),n.listen(t,t.Event.UI.USER_SELECTED_CAPTIONS_STYLE,(function(t){try{var n=JSON.stringify(t.payload.captionsStyle);_.setItem(e.StorageKeys.TEXT_STYLE,n)}catch(t){e._logger.error(t.message)}})),n.listen(t,t.Event.PLAYER_DESTROY,(function(){return n.destroy()}))},e.getPlayerTextStyle=function(){return _.getItem(e.StorageKeys.TEXT_STYLE)},e.hasStorage=function(){var t=_.size,n=0!==t;return n?e._logger.debug("Storage found with size of ",t):e._logger.debug("No storage found"),n},e.getStorageConfig=function(){var t=e._getExistingValues(),n=e._buildStorageConfig(t);return e._logger.debug("Gets storage config",n),n},e._getExistingValues=function(){var t={};return Object.keys(e.StorageKeys).forEach((function(n){var r=e.StorageKeys[n],i=_.getItem(r);null!=i&&(t[r]=i)})),t},e._buildStorageConfig=function(e){var t=l.Utils.Object.mergeDeep({},e);return delete t.textStyle,{playback:t}},e}();E(k,"StorageKeys",{MUTED:"muted",VOLUME:"volume",AUDIO_LANG:"audioLanguage",TEXT_LANG:"textLanguage",TEXT_STYLE:"textStyle"}),E(k,"_logger",Object(l.getLogger)("StorageManager"));var T="kaltura.com",A="custom_data=",w="signature=";function S(e,t){e.config.session&&e.config.session.id?function(e,t){var n=/:((?:[a-z0-9]|-)*)/i.exec(e.config.session.id);n&&n[1]&&C(t,e.config.session.id.replace(n[1],l.Utils.Generator.guid()))}(e,t):function(e){var t=l.Utils.Generator.guid(),n=l.Utils.Generator.guid();C(e,t+":"+n)}(t)}function C(e,t){e.session=e.session||{},e.session.id=t}function x(e,t,n){if(void 0===n&&(n="playSessionId="),t){var r=new RegExp(n+"((?:[a-z0-9]|-)*:(?:[a-z0-9]|-)*)","i").exec(e);r&&r[1]?e=e.replace(r[1],t):e+=D(e)+n+t}return e}function I(){var e;try{e=window.parent.document.URL}catch(t){e=document.referrer}return e}function P(e){if(-1===e.indexOf("referrer=")){var t=btoa(I().substr(0,1e3));e+=D(e)+"referrer="+t}return e}function D(e){return-1===e.indexOf("?")?"?":"&"}function R(e,t){return-1===e.indexOf("clientTag=html5:v")&&(e+=D(e)+"clientTag=html5:v"+(t||"3.14.3-canary.0-9dfd3f3")),e}function O(e,t){var n;S(e,t);var r=t.sources,i=t.session&&t.session.id,a=null==(n=K())?void 0:n.productVersion;Object.values(l.StreamType).forEach((function(e){r[e]&&r[e].forEach((function(e){"string"==typeof e.url&&e.url.toLowerCase().indexOf("playmanifest/")>-1&&!e.localSource&&(e.url=x(e.url,i),e.url=P(e.url),e.url=R(e.url,a)),e.drmData&&e.drmData.length&&e.drmData.forEach((function(e){"string"==typeof e.licenseUrl&&[T,A,w].every((function(t){return e.licenseUrl.includes(t)}))&&(e.licenseUrl=x(e.licenseUrl,i,"sessionId="),e.licenseUrl=R(e.licenseUrl,a),e.licenseUrl=P(e.licenseUrl),e.licenseUrl=function(e,t){var n=l.Utils.Object.getPropertyPath(t,"provider.uiConfId");return-1===e.indexOf("uiConfId=")&&"number"==typeof n&&(e+=D(e)+"uiConfId="+n),e}(e.licenseUrl,t))}))}))}))}n(319);var L=function(){function e(e){void 0===e&&(e={}),e.observedThresholds=e.observedThresholds||U,e.playerThreshold="number"==typeof e.playerThreshold?e.playerThreshold:F,this._config=e,this._eventManager=new l.EventManager,this._targetsObserved=new l.Utils.MultiMap;var t={threshold:e.observedThresholds.map((function(e){return e/100}))};this._observer=new window.IntersectionObserver(this._intersectionChangedHandler.bind(this),t),this._initTabVisibility()}var t=e.prototype;return t._intersectionChangedHandler=function(e){var t=this;e.forEach((function(e){t._targetsObserved.get(e.target).forEach((function(t){var n=e.intersectionRatio>=t.threshold;t.lastIntersectionRatio=e.intersectionRatio,n!==t.lastVisible&&(t.lastVisible=n,t.listener(n,M.VIEWPORT))}))}))},t._handleTabVisibilityChange=function(){var e=this;this._isTabVisible=!document[this._visibilityTabHiddenAttr],this._targetsObserved.getAll().forEach((function(t){t.lastVisible&&t.listener(e._isTabVisible,M.TAB)}))},t._initTabVisibility=function(){void 0!==document.hidden?(this._visibilityTabHiddenAttr="hidden",this._visibilityTabChangeEventName="visibilitychange"):void 0!==document.msHidden?(this._visibilityTabHiddenAttr="msHidden",this._visibilityTabChangeEventName="msvisibilitychange"):void 0!==document.webkitHidden&&(this._visibilityTabHiddenAttr="webkitHidden",this._visibilityTabChangeEventName="webkitvisibilitychange"),this._visibilityTabHiddenAttr&&this._visibilityTabChangeEventName&&(this._eventManager.listen(document,this._visibilityTabChangeEventName,this._handleTabVisibilityChange.bind(this)),this._isTabVisible=!document[this._visibilityTabHiddenAttr])},t.observe=function(e,t,n){if(this._observer){var r="number"==typeof n?n:this._config.playerThreshold,i=new N(r/100,t);if(this._targetsObserved.has(e)){var a=this._targetsObserved.get(e)[0].lastIntersectionRatio;void 0!==a&&(i.lastIntersectionRatio=a,i.listener(this._isTabVisible&&a>=i.threshold,M.VIEWPORT))}else this._observer.observe(e);this._targetsObserved.push(e,i)}},t.unObserve=function(e,t){this._observer&&(this._targetsObserved.remove(e,t),this._targetsObserved.has(e)||this._observer.unobserve(e))},t.destroy=function(){this._observer&&(this._eventManager.destroy(),this._observer.disconnect(),this._targetsObserved.clear())},e}(),M={VIEWPORT:"viewport",TAB:"tab"},N=function(e,t){this.threshold=e,this.listener=t},U=[0,10,20,30,40,50,60,70,80,90,100],F=50,j=[];function B(e){if(!e)throw new Error(f);!function(e){if(!e)throw new Error(h);var t=document.getElementById(e);if(!t)throw new Error(g+e);if(t.getElementsByClassName("kaltura-player-container").length>0)throw new Error(y+e)}(e.targetId)}function V(e){l.Utils.Object.getPropertyPath(e,"ui.log")||l.Utils.Object.createPropertyPath(e,"ui.log",{}),l.Utils.Object.getPropertyPath(e,"provider.log")||l.Utils.Object.createPropertyPath(e,"provider.log",{}),l.Utils.Object.getPropertyPath(e,"log")||l.Utils.Object.createPropertyPath(e,"log",{}),e.log&&"function"==typeof e.log.handler&&(Object(l.setLogHandler)(e.log.handler),e.ui.log.handler=e.provider.log.handler=e.log.handler);var t=l.LogLevel.ERROR;!e.log||!0!==window.DEBUG_KALTURA_PLAYER&&""!==H("debugKalturaPlayer")?e.log&&e.log.level&&l.LogLevel[e.log.level]&&(t=l.LogLevel[e.log.level]):(t=l.LogLevel.DEBUG,e.log.level=l.LogLevel.DEBUG.name),e.ui.log.level=e.provider.log.level=t.name,Object(l.setLogLevel)(t)}function H(e){var t;window.URLSearchParams?t=new URLSearchParams(window.location.search).get(e):t=function(e){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search),n=location.search.indexOf(e)>-1;return null===t?n?"":null:decodeURIComponent(t[1].replace(/\+/g," "))}(e);return t}function K(){return window.__kalturaplayerdata||{}}function G(e){var t=function(e){var t=document.createElement("div");t.id=l.Utils.Generator.uniqueId(5),t.className="kaltura-player-container",t.setAttribute("tabindex","-1");var n=document.getElementById(e);return n&&t&&n.appendChild(t),t.id}(e.targetId),n={targetId:e.targetId,provider:{partnerId:e.provider.partnerId},ui:{targetId:t},plugins:{},advertising:{adBreaks:[]},viewability:{observedThresholds:U,playerThreshold:F}};if(l.Utils.Object.mergeDeep(n,e),!e.provider.ignoreServerConfig){var r=l.Utils.Object.copyDeep(K());delete r.productVersion,n=l.Utils.Object.mergeDeep({},z(r),n)}return function(e){if(l.Env.isMacOS&&l.Env.isSafari||l.Env.isIOS){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.preferNative.hls")&&l.Utils.Object.mergeDeep(e,{playback:{preferNative:{hls:!0}}})}}(n),function(e){if(l.Env.isMacOS&&l.Env.isSafari||l.Env.isIOS){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"text.useNativeTextTrack")&&l.Utils.Object.mergeDeep(e,{text:{useNativeTextTrack:!0}})}}(n),function(e){var t=l.Utils.Object.getPropertyPath(e,"plugins.kava");t||(t=l.Utils.Object.mergeDeep(e,{plugins:{kava:{}}}))}(n),function(e){if(l.Env.isSmartTV){if(Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!0}),function(e){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.playAdsWithMSE")&&(e=l.Utils.Object.createPropertyPath(e,"playback.playAdsWithMSE",!0));var t=l.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload"),n=l.Utils.Object.getPropertyPath(e,"plugins.bumper.disableMediaPreload");e.plugins&&e.plugins.ima&&"boolean"!=typeof t&&(e=l.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0));e.plugins&&e.plugins.bumper&&"boolean"!=typeof n&&(e=l.Utils.Object.createPropertyPath(e,"plugins.bumper.disableMediaPreload",!0))}(e),function(e){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount")&&l.Env.isSafari&&(e=l.Utils.Object.createPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount",2))}(e),e.plugins&&e.plugins.ima){var t=l.Utils.Object.getPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds"),n=l.Utils.Object.getPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected");"boolean"!=typeof t&&(e=l.Utils.Object.createPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds",!0)),"boolean"!=typeof n&&(e=l.Utils.Object.createPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected",!0))}if(e.plugins&&e.plugins.youbora)"number"!=typeof l.Utils.Object.getPropertyPath(e,"plugins.youbora.playheadMonitorInterval")&&(e=l.Utils.Object.createPropertyPath(e,"plugins.youbora.playheadMonitorInterval",2e3));"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"streaming.lowLatencyMode")&&(e=l.Utils.Object.createPropertyPath(e,"streaming.lowLatencyMode",!1))}}(n),function(e){if("Edge"===l.Env.browser.name){l.Utils.Object.getPropertyPath(e,"drm.keySystem")||(e="Windows"===l.Env.os.name?l.Utils.Object.createPropertyPath(e,"drm.keySystem",l.DrmScheme.PLAYREADY):l.Utils.Object.createPropertyPath(e,"drm.keySystem",l.DrmScheme.WIDEVINE))}}(n),function(e){if(l.Env.isIOS&&e.plugins&&e.plugins.ima&&!e.plugins.ima.disable){var t=l.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=l.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload");!1===t&&"boolean"!=typeof n&&l.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0)}}(n),function(e){if(e.plugins&&e.plugins.imadai&&!e.plugins.imadai.disable){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.autoStartLoad")&&l.Utils.Object.mergeDeep(e,{playback:{options:{html5:{hls:{autoStartLoad:!1}}}}})}}(n),function(e){var t=l.Utils.Object.getPropertyPath(e,"plugins.bumper"),n=l.Utils.Object.getPropertyPath(e,"plugins.imadai");if(t){var r={};"boolean"!=typeof t.playOnMainVideoTag&&(l.Env.isSmartTV||l.Env.isIOS&&e.playback&&!1===e.playback.playsinline)&&(r.playOnMainVideoTag=!0),n&&!n.disable&&(Array.isArray(t.position)||(r.position=[0]),"boolean"!=typeof t.disableMediaPreload&&(r.disableMediaPreload=!0)),l.Utils.Object.mergeDeep(e,{plugins:{bumper:r}})}}(n),function(e){var t=l.Utils.Object.getPropertyPath(e,"plugins.vr");if(t&&!t.disable){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.inBrowserFullscreen")&&l.Utils.Object.mergeDeep(e,{playback:{inBrowserFullscreen:!0}})}}(n),function(e){if(l.Env.isIOS){var t=l.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=l.Utils.Object.hasPropertyPath(e,"plugins.airplay"),r=!1!==t;n?Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:r}):"iPhone"!==l.Env.device.model||r||Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:!1})}}(n),n}function z(e){return function(){if(e.player){j.push({level:"warn",msg:"Path config.player will be deprecated soon. Please update your config structure as describe here: https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md"});var t=l.Utils.Object.copyDeep(e.player);delete e.player,l.Utils.Object.mergeDeep(e,t)}}(),[["duration","sources.duration"],["type","sources.type"],["dvr","sources.dvr"],["id","sources.id"],["name","metadata.name"],["metadata.poster","sources.poster"],["metadata","sources.metadata"],["logLevel","log.level"],["ui.components.fullscreen.inBrowserFullscreenForIOS","playback.inBrowserFullscreen"],["playback.enableCEA708Captions","text.enableCEA708Captions"],["playback.useNativeTextTrack","text.useNativeTextTrack"],["playback.options.html5.dash.useShakaTextTrackDisplay","text.useShakaTextTrackDisplay"],["playback.captionsTextTrack1Label","text.captionsTextTrack1Label"],["playback.captionsTextTrack1LanguageCode","text.captionsTextTrack1LanguageCode"],["playback.captionsTextTrack2Label","text.captionsTextTrack2Label"],["playback.captionsTextTrack2LanguageCode","text.captionsTextTrack2LanguageCode"],["plugins.visibility.threshold","viewability.playerThreshold"],["plugins.visibility.floating","plugins.floating"],["playback.startTime","sources.startTime"]].forEach((function(t){return function(t,n){if(l.Utils.Object.hasPropertyPath(e,t))if(j.push({level:"warn",msg:"Path config.player."+t+" will be deprecated soon. Please update your config structure as describe here: https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md"}),l.Utils.Object.hasPropertyPath(e,n))l.Utils.Object.deletePropertyPath(e,t);else{var r=l.Utils.Object.getPropertyPath(e,t),i=l.Utils.Object.createPropertyPath({},n,r);l.Utils.Object.mergeDeep(e,i),l.Utils.Object.deletePropertyPath(e,t)}}(t[0],t[1])})),e}function W(e,t,n){var r=e.config.playback,i=!1;return r.streamPriority.forEach((function(e){e.engine===t&&(i=!0)})),i||r.streamPriority.push({engine:t,format:n}),r}function Y(e){var t=e&&e.progressive;return!(!t||!t[0]||"video/youtube"!==t[0].mimetype)}function q(e){var t=e&&e.image;return!(!t||!t[0])}function X(e,t){var n={},r={};return l.Utils.Object.isObject(e)&&Object.entries(e).forEach((function(e){var i=e[0],a=e[1];n[i]={},r[i]={},Object.entries(a).forEach((function(e){var a=e[0],o=e[1],s=l.Utils.Object.getPropertyPath(t[i],a);n[i][a]=s||o,r[i][a]=s}))})),[n,r]}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function Q(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Z=function(){function e(e,t,n){this.name=e,this.player=t,this.eventManager=new l.EventManager,this.logger=Object(l.getLogger)(l.Utils.String.capitlize(this.name)),this.config={},l.Utils.Object.mergeDeep(this.config,this.constructor.defaultConfig,n)}e.createPlugin=function(e,t,n){return void 0===n&&(n={}),new this(e,t,n)},e.isValid=function(){throw new l.Error(l.Error.Severity.CRITICAL,l.Error.Category.PLAYER,l.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"isValid()")};var t,n,r,i=e.prototype;return i.getConfig=function(e){return e?l.Utils.Object.copyDeep(this.config[e]):l.Utils.Object.copyDeep(this.config)},i.updateConfig=function(e){l.Utils.Object.mergeDeep(this.config,e)},i.loadMedia=function(){},i.destroy=function(){this.eventManager.destroy()},i.reset=function(){},i.getName=function(){return this.name},i.dispatchEvent=function(e,t){this.logger.debug("Fire event: "+e,t),this.player.dispatchEvent(new l.FakeEvent(e,t))},t=e,(n=[{key:"ready",get:function(){return Promise.resolve()}}])&&$(t.prototype,n),r&&$(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function J(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){(t=Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Z,"defaultConfig",{});var ee=function(){function e(){J(this,"_plugins",{}),J(this,"_isDisabledPluginMap",new Map)}e.register=function(t,n){return"function"!=typeof n||n.prototype instanceof Z==!1?(e._logger.error("Plugin <"+t+"> registration failed, either plugin is not an instance of BasePlugin or plugin handler is not a function"),!1):e._registry.has(t)?(e._logger.debug("Plugin <"+t+"> is already registered, do not register again"),!1):(e._registry.set(t,n),e._logger.debug("Plugin <"+t+"> has been registered successfully"),!0)},e.unRegister=function(t){e._registry.has(t)&&(e._registry.delete(t),e._logger.debug("Unregistered <"+t+"> plugin."))};var t=e.prototype;return t.load=function(t,n,r){if(void 0===r&&(r={}),!e._registry.has(t))throw e._logger.warn("Plugin <"+t+"> loading failed, plugin is not registered"),new l.Error(l.Error.Severity.RECOVERABLE,l.Error.Category.PLAYER,l.Error.Code.RUNTIME_ERROR_NOT_REGISTERED_PLUGIN,t);var i=e._registry.get(t);"boolean"==typeof r.disable&&this._isDisabledPluginMap.set(t,r.disable);var a=!!this._isDisabledPluginMap.get(t),o=!!i&&i.isValid();if(i&&o&&!a){try{this._plugins[t]=i.createPlugin(t,n,r)}catch(e){throw new l.Error(l.Error.Severity.RECOVERABLE,l.Error.Category.PLAYER,l.Error.Code.PLUGIN_LOAD_FAILED,e)}return this._isDisabledPluginMap.set(t,!1),e._logger.debug("Plugin <"+t+"> has been loaded"),!0}return e._logger.debug("Plugin <"+t+"> isn't loaded, isValid()="+o.toString()+", disabled="+a.toString()),!1},t.loadMedia=function(){var e=this;Object.keys(this._plugins).forEach((function(t){return e._plugins[t].loadMedia()}))},t.destroy=function(){var e=this;Object.keys(this._plugins).forEach((function(t){e._plugins[t].destroy(),delete e._plugins[t]}))},t.reset=function(){var e=this;Object.keys(this._plugins).forEach((function(t){return e._plugins[t].reset()}))},t.get=function(e){return this._plugins[e]},t.getAll=function(){return this._plugins},e}();J(ee,"_logger",Object(l.getLogger)("PluginManager")),J(ee,"_registry",new Map);var te=ee.register,ne={youbora:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",entryId:"{{entryId}}",entryName:"{{entryName}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",uiConfId:"{{uiConfId}}"},googleAnalytics:{entryId:"{{entryId}}",entryName:"{{entryName}}",uiConfId:"{{uiConfId}}",partnerId:"{{partnerId}}"},ottAnalytics:{entryId:"{{entryId}}",ks:"{{ks}}",isAnonymous:"{{isAnonymous}}",partnerId:"{{partnerId}}",serviceUrl:"{{serviceUrl}}"},ima:{playerVersion:"{{pVersion}}",playerName:"{{pName}}"},kava:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",partnerId:"{{partnerId}}",playlistId:"{{playlistId}}",entryId:"{{entryId}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",ks:"{{ks}}",uiConfId:"{{uiConfId}}",referrer:"{{referrer}}",encodedReferrer:"{{encodedReferrer}}",serviceUrl:"{{analyticsServiceUrl}}"},comscore:{playerVersion:"{{pVersion}}"},vr:{rootElement:"{{domRootElementId}}"},share:{partnerId:"{{partnerId}}",uiConfId:"{{uiConfId}}",entryId:"{{entryId}}",embedBaseUrl:"{{embedBaseUrl}}"}},re=new RegExp("{{.*}}");function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ae(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe=function(e){var t,n;function r(){var t;return ae(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call(this)||this),"_ovpPluginsConfig",{ottAnalytics:{}}),t._config=l.Utils.Object.mergeDeep({},t._basePluginsConfig,t._ovpPluginsConfig),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ie(t,n),r}(function(){function e(){this._basePluginsConfig=l.Utils.Object.copyDeep(ne)}var t=e.prototype;return t.get=function(){return this._config},t.set=function(e){if(e){var t=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return l.Utils.Object.isObject(i)?t[r]=e(i):"string"==typeof i&&re.test(i)?t[r]=i:t[r]=void 0,t}),{})}(e);this._config=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return l.Utils.Object.isObject(i)?t[r]=e(i):i&&(t[r]=i),t}),{})}(l.Utils.Object.mergeDeep(this._config,t))}},t.reset=function(){this._config=l.Utils.Object.copyDeep(ne)},e}());var se=function(e,t){void 0===t&&(t={});try{var n,r=e;for(var i in t){var a=void 0!==t[i]&&null!==t[i]?t[i]:"";"string"==typeof a&&a.indexOf('"')>-1&&(a=a.replace(/"/g,'\\"')),n=new RegExp("{{"+i+"}}","g"),r=r.replace(n,a)}return r}catch(e){return""}},le=Object(l.getLogger)("PluginsConfig"),ue=function(e){return("number"==typeof e||"function"==typeof e||"string"==typeof e||"boolean"==typeof e||l.Utils.Object.isClassInstance(e))&&!re.test(e.toString())},ce=function(e){return l.Utils.Object.isObject(e)&&"function"!=typeof e&&!l.Utils.Object.isClassInstance(e)},pe=function(e){return e.map((function(e){if(ce(e)){var t=de(e);return l.Utils.Object.isEmptyObject(t)?null:t}return ue(e)?e:null})).filter((function(e){return null!==e}))},de=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return ce(i)?t[r]=e(i):Array.isArray(i)?t[r]=pe(i):ue(i)&&(t[r]=i),t}),{})};var fe=function(){function e(){this._pluginConfigStore=new oe}return e.prototype.evaluatePluginsConfig=function(e,t){if(e){this._pluginConfigStore.set(e);var n=function(e){var t,n={pVersion:(null==(t=K())?void 0:t.productVersion)||"3.14.3-canary.0-9dfd3f3",pName:"@playkit-js/kaltura-player-js"};if(e.targetId&&(n.domRootElementId=e.targetId),e.provider&&e.provider.env){n.serviceUrl=e.provider.env.serviceUrl;var r=l.Utils.Object.getPropertyPath(e,"provider.env.analyticsServiceUrl");r&&(n.analyticsServiceUrl=r+"/api_v3/index.php"),n.serviceUrl&&(n.embedBaseUrl=n.serviceUrl.replace("api_v3",""))}var i,a={referrer:I(),encodedReferrer:(i=I(),encodeURIComponent(i))};return e.provider&&l.Utils.Object.mergeDeep(a,{ks:e.provider.ks,uiConfId:e.provider.uiConfId,partnerId:e.provider.partnerId}),e.session&&l.Utils.Object.mergeDeep(a,{sessionId:e.session.id,ks:e.session.ks,isAnonymous:e.session.isAnonymous,uiConfId:e.session.uiConfId,partnerId:e.session.partnerId}),e.sources&&l.Utils.Object.mergeDeep(a,{entryId:e.sources.id,entryName:e.sources.metadata&&e.sources.metadata.name,entryType:e.sources.type}),e.playlist&&l.Utils.Object.mergeDeep(a,{playlistId:e.playlist.id}),Object.keys(a).forEach((function(e){void 0===a[e]&&delete a[e]})),l.Utils.Object.mergeDeep(n,a),n}(t),r=l.Utils.Object.mergeDeep({},this._pluginConfigStore.get(),e);!function(e,t){var n=de(t),r=de(e);r&&n&&Object.keys(e).forEach((function(t){e&&e[t]&&(e[t]=l.Utils.Object.mergeDeep({},n[t],r[t]))}))}(e,function(e){var t,n;e=(n=e)?n.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f").replace(/[\u0000-\u0019]+/g,""):"";try{t=JSON.parse(e,(function(e){try{return JSON.parse(this[e])}catch(t){return this[e]}}))}catch(e){le.error("An error occurred while formatting config string.",e),t={}}return t}(se(JSON.stringify(r),n)))}},e}();function he(){return(he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ge(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ye={thumbsWidth:164,thumbsHeight:92,thumbsSlices:100},ve=/.*\/p\/\d+\/(?:[a-zA-Z]+\/\d+\/)*thumbnail\/entry_id\/\w+\/.*\d+/,me=function(){function e(e,t,n){var r=this;if(ge(this,"_isUsingKalturaThumbnail",(function(){return!(!r._thumbnailConfig||!r._thumbnailConfig.thumbsSprite)})),ge(this,"_convertKalturaThumbnailToThumbnailInfo",(function(e){if(r._thumbnailConfig){var t=r._thumbnailConfig,n=t.thumbsSprite,i=t.thumbsWidth,a=t.thumbsSlices,o=r._player.duration/a,s={x:Math.floor(e/o)*i,y:0,url:n,height:r._thumbsHeight,width:i};return new l.ThumbnailInfo(s)}})),ge(this,"_buildKalturaThumbnailConfig",(function(e,t){var n,i=l.Utils.Object.getPropertyPath(e,"components.seekbar"),a=t.sources&&t.sources.poster,o=t.sources&&t.sources.type===l.MediaType.VOD,s=r._player.shouldAddKs(t)?null==(n=t.session)?void 0:n.ks:"",u=l.Utils.Object.mergeDeep(ye,i);return he({thumbsSprite:o?r._getThumbSlicesUrl(a,s,u):""},u)})),ge(this,"_getThumbSlicesUrl",(function(e,t,n){if("string"==typeof e&&ve.test(e))try{var r=he({thumbnailUrl:e},n),i=se("{{thumbnailUrl}}/width/{{thumbsWidth}}/vid_slices/{{thumbsSlices}}",r);return t?i+"/ks/"+t:i}catch(e){return""}return""})),this._player=e,this._thumbnailConfig=this._buildKalturaThumbnailConfig(t,n),this._eventManager=new l.EventManager,this._isUsingKalturaThumbnail()){var i,a=new Image;this._eventManager.listenOnce(a,"load",(function(){r._thumbsHeight=a.naturalHeight})),a.src=(null==(i=this._thumbnailConfig)?void 0:i.thumbsSprite)||""}}var t=e.prototype;return t.destroy=function(){this._eventManager.destroy()},t.getThumbnail=function(e){return this._isUsingKalturaThumbnail()?this._convertKalturaThumbnailToThumbnailInfo(e):this._player._localPlayer.getThumbnail(e)},t.getKalturaThumbnailConfig=function(){return this._thumbnailConfig},e}();n(320);function be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ee(r.key),r)}}function _e(e,t,n){return(t=Ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var ke=function(){function e(e,t){var n=this;_e(this,"_disabled",!1),this._player=e;var r=t.ui;if(r.disable){this._disabled=!0;var i=document.getElementById(r.targetId);i&&i.appendChild(e.getView())}else this._uiManager=new u.UIManager(e,r),r.customPreset?this._uiManager.buildCustomUI(r.customPreset):this._uiManager.buildDefaultUI(),this._handleVr(t.plugins),this._handleExternalCSS(r);return new Proxy(this,{get:function(e,t){return n._disabled?function(){}:e[t]}})}var t,n,r,i=e.prototype;return i.destroy=function(){this._uiManager.destroy()},i.reset=function(){this._resetErrorState()},i.setConfig=function(e,t){this._uiManager.setConfig(e,t)},i.addComponent=function(e){return this._uiManager.addComponent(e)},i.removeComponent=function(e){var t={label:"Remove_"+e.removeComponent,get:u.Components.Remove,presets:e.presets,area:e.area||e.container,replaceComponent:e.removeComponent};return this._uiManager.addComponent(t)},i.registerManager=function(e,t){this._player.registerService(e,t)},i.getManager=function(e){return this._player.getService(e)},i.hasManager=function(e){return this._player.hasService(e)},i.setLoadingSpinnerState=function(e){this.setConfig({show:e},"loading")},i._resetErrorState=function(){this.setConfig({hasError:!1},"engine")},i._handleExternalCSS=function(t){t.css&&l.Utils.Dom.loadStyleSheetAsync(t.css).then((function(){e._logger.debug("external css was loaded successfully")}),(function(){e._logger.error("external css failed to load")}))},i._handleVr=function(e){void 0===e&&(e={}),e.vr&&!e.vr.disable&&this._setStereoConfig(e.vr)},i._setStereoConfig=function(e){(e.toggleStereo||(l.Env.isMobile||l.Env.isTablet)&&!1!==e.toggleStereo)&&this.setConfig(l.Utils.Object.mergeDeep({},{vrStereoMode:!!e.startInStereo}),"vrStereo")},t=e,(n=[{key:"store",get:function(){return this._uiManager.store}}])&&be(t.prototype,n),r&&be(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();_e(ke,"_logger",Object(l.getLogger)("UIWrapper"));var Te={PLAYLIST_LOADED:"kaltura-player-playlistloaded",PLAYLIST_ITEM_CHANGED:"kaltura-player-playlistitemchanged",PLAYLIST_ENDED:"kaltura-player-playlistended"};function Ae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,we(r.key),r)}}function we(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Se=["hls","dash","progressive","image"],Ce=function(){function e(e,t,n){this._sources=e,this._config=t,this._index=n}var t,n,r,i=e.prototype;return i.updateSources=function(e){this._sources=l.Utils.Object.mergeDeep({},e)},i.updatePlugins=function(e){this._plugins=l.Utils.Object.copyDeep(e)},i.isPlayable=function(){var e=this;return!!Se.find((function(t){return e._sources&&e._sources[t]&&e._sources[t].length}))},t=e,(n=[{key:"sources",get:function(){var e=this;return Se.forEach((function(t){e._sources&&e._sources[t]&&0===e._sources[t].length&&delete e._sources[t]})),this._sources}},{key:"config",get:function(){return this._config}},{key:"plugins",get:function(){return this._plugins||{}}},{key:"index",get:function(){return this._index}}])&&Ae(t.prototype,n),r&&Ae(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ie(r.key),r)}}function Ie(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Pe=function(){function e(){this._id="",this._metadata={name:"",description:""},this._poster="",this._items=[],this._activeItemIndex=-1}var t,n,r,i=e.prototype;return i.configure=function(e,t){var n=this;this._id=e.id?e.id:this._id,this._poster=e.poster?e.poster:this._poster,this._metadata=e.metadata?e.metadata:this._metadata,e.items&&(this._items=[],e.items.forEach((function(e,r){if(e.sources){var i=l.Utils.Object.mergeDeep({},t),a=e.sources.options||{};e.sources.options=l.Utils.Object.mergeDeep(i,a)}n._items.push(new Ce(e.sources,e.config,r))})))},i.updateItemSources=function(e,t){this._items[e].updateSources(t)},i.updateItemPlugins=function(e,t){this._items[e].updatePlugins(t)},i.getNext=function(e){var t=e?(this._activeItemIndex+1)%this._items.length:this._activeItemIndex+1;return this._items[t]||null},t=e,(n=[{key:"id",get:function(){return this._id}},{key:"items",get:function(){return this._items}},{key:"metadata",get:function(){return this._metadata}},{key:"poster",get:function(){return this._poster}},{key:"current",get:function(){return this._items[this._activeItemIndex]||null}},{key:"prev",get:function(){return this._items[this._activeItemIndex-1]||null}},{key:"activeItemIndex",set:function(e){this._activeItemIndex=e}}])&&xe(t.prototype,n),r&&xe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Re(r.key),r)}}function Re(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Oe=function(){function e(e,t){this._player=e,this._eventManager=new l.EventManager,this._playlist=new Pe,this._options={autoContinue:!0,loop:!1,imageDuration:5},this._countdown={duration:10,showing:!0},this._mediaInfoList=[],this._playerOptions=t,this._appPluginConfig={}}var t,n,r,i=e.prototype;return i.configure=function(e,t){e&&(this._playlist.configure(e,l.Utils.Object.getPropertyPath(this._player.sources,"options")),l.Utils.Object.mergeDeep(this._options,e.options),l.Utils.Object.mergeDeep(this._countdown,e.countdown),e.items&&e.items.find((function(e){return!!e.sources}))&&(this._mediaInfoList=e.items.map((function(e,n){return t&&t.entries&&"object"==typeof t.entries[n]?t.entries[n]:{entryId:e.sources.id}})),this._player.dispatchEvent(new l.FakeEvent(Te.PLAYLIST_LOADED,{playlist:this})),this._addBindings(),this.playNext()))},i.load=function(e,t,n){var r=this._getMergedPlaylistData(e,t);this.configure(r,n)},i.reset=function(){this._eventManager.removeAll(),this._playlist=new Pe,this._mediaInfoList=[]},i.playNext=function(){e._logger.debug("playNext");var t=this._playlist.getNext(!0);t&&this._setItem(t)},i.playPrev=function(){e._logger.debug("playPrev");var t=this._playlist.prev;t&&this._setItem(t)},i.playItem=function(t){e._logger.debug("playItem("+t+")");var n=this._playlist.items[t];n&&this._setItem(n)},i._getMergedPlaylistData=function(e,t){var n=this;return{id:e.id,metadata:e.metadata,poster:e.poster,options:t?t.options:this._options,countdown:t?t.countdown:this.countdown,items:e.items.map((function(e,r){var i=l.Utils.Object.copyDeep(e);return l.Utils.Object.mergeDeep(i.sources,t&&t.items&&t.items[r]&&t.items[r].sources),Array.isArray(i.sources.poster)&&n._player.updateKalturaPoster(i.sources,e.sources,n._player.dimensions),{sources:i.sources,config:t&&t.items&&t.items[r]&&t.items[r].config}}))}},i._addBindings=function(){var e=this;this._eventManager.listen(this._player,this._player.Event.Core.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this._player,this._player.Event.Core.CHANGE_SOURCE_STARTED,(function(){return e._onChangeSourceStarted()}))},i._onPlaybackEnded=function(){var e=this._playlist.getNext(!1);e||this._player.dispatchEvent(new l.FakeEvent(Te.PLAYLIST_ENDED)),!this._playerOptions.ui.disable&&this.countdown.showing||(e&&this._options.autoContinue||this._options.loop)&&this.playNext()},i._onChangeSourceStarted=function(){var e;"Image"===(null==(e=this._playlist.items[this._playlist._activeItemIndex].sources)?void 0:e.type)&&this._player.configure({sources:{duration:this._options.imageDuration}})},i._setItem=function(t){var n=this,r=t.index;e._logger.debug("Playing item number "+r,t);var i={loop:!1};if(this._playlist.current&&(i.autoplay=!0),this._player.configure({playback:i}),this._playlist.activeItemIndex=r,t.isPlayable()){this._resetProviderPluginsConfig();var a=X(t.plugins,this._player.config.plugins),o=a[0];this._appPluginConfig=a[1];var s={session:this._player.config.session,plugins:o,sources:t.sources};return this._player.setMedia(s),this._player.dispatchEvent(new l.FakeEvent(Te.PLAYLIST_ITEM_CHANGED,{index:r,activeItem:t})),Promise.resolve()}if(this._mediaInfoList[r]){this._resetProviderPluginsConfig();var u={sources:t.sources};return this._player.setMedia(u),this._player.loadMedia(this._mediaInfoList[r]).then((function(e){n._playlist.updateItemSources(r,e.sources),n._playlist.updateItemPlugins(r,e.plugins),n._player.dispatchEvent(new l.FakeEvent(Te.PLAYLIST_ITEM_CHANGED,{index:r,activeItem:t}))}))}return Promise.reject()},i._resetProviderPluginsConfig=function(){this._player.configure({plugins:this._appPluginConfig}),this._appPluginConfig={}},i.destroy=function(){this._eventManager.destroy()},t=e,(n=[{key:"items",get:function(){return this._playlist.items}},{key:"current",get:function(){return this._playlist.current}},{key:"next",get:function(){return this._playlist.getNext(this._options.loop)}},{key:"prev",get:function(){return this._playlist.prev}},{key:"id",get:function(){return this._playlist.id}},{key:"metadata",get:function(){return this._playlist.metadata}},{key:"poster",get:function(){return this._playlist.poster}},{key:"countdown",get:function(){if(this._playlist.current&&this._playlist.current.config){var e={duration:10,showing:!0};return l.Utils.Object.mergeDeep(e,this._countdown,this._playlist.current.config.countdown),e}return this._countdown}},{key:"options",get:function(){return this._options}}])&&De(t.prototype,n),r&&De(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();!function(e,t,n){(t=Re(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Oe,"_logger",Object(l.getLogger)("PlaylistManager"));var Le={CAST_SESSION_START_FAILED:"kaltura-player-castsessionstartfailed",CAST_SESSION_STARTING:"kaltura-player-castsessionstarting",CAST_SESSION_STARTED:"kaltura-player-castsessionstarted",CAST_SESSION_ENDING:"kaltura-player-castsessionending",CAST_SESSION_ENDED:"kaltura-player-castsessionended",CAST_AVAILABLE:"kaltura-player-castavailable"},Me=function(e){this.textStyle=e.textStyle,this.mediaInfo=e.getMediaInfo(),this.mediaConfig=e.getMediaConfig(),this.advertising=e.config.plugins&&e.config.plugins.ima,this.config=l.Utils.Object.mergeDeep({},e.config,{sources:{startTime:Ne(e)},playback:{autoplay:0===e.currentTime||!e.paused,audioLanguage:Ue(l.TrackType.AUDIO,e),textLanguage:Ue(l.TrackType.TEXT,e)}})};function Ne(e){return e.isLive()?e.isDvr()?e.duration-e.currentTime<e.config.cast.dvrThreshold||!e.currentTime?-1:e.currentTime:-1:!e.isCasting()&&!e.currentTime&&e.config.sources.startTime>-1?e.config.sources.startTime:e.currentTime}function Ue(e,t){var n=t.getActiveTracks();if(n[e])return n[e].language;try{return t.config.playback[e+"Language"]}catch(e){return null}}function Fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,je(r.key),r)}}function je(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Be=function(){function e(e,t,n){this._id=e,this._friendlyName=t,this._resuming=n}var t,n,r;return t=e,(n=[{key:"deviceFriendlyName",get:function(){return this._friendlyName}},{key:"id",get:function(){return this._id}},{key:"resuming",get:function(){return this._resuming}}])&&Fe(t.prototype,n),r&&Fe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ge(r.key),r)}}function He(e,t){return(He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ke(e,t,n){return(t=Ge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var ze=function(e){var t,n;function r(t,n,i){var a;return Ke(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a=e.call(this)||this),"_isCastInitiator",!1),a._playerConfig={},r._logger=Object(l.getLogger)(t),a._remoteControl=i,a._castConfig=l.Utils.Object.mergeDeep({},a.constructor.defaultConfig,n),a._eventManager=new l.EventManager,r._logger.debug("Initialized"),a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,He(t,n),r.isSupported=function(){return!0};var i,a,o,s=r.prototype;return s.loadMedia=function(e){return Promise.resolve()},s.setMedia=function(e){},s.getMediaInfo=function(){},s.getMediaConfig=function(){},s.configure=function(e){void 0===e&&(e={})},s.ready=function(){return Promise.resolve()},s.load=function(){},s.play=function(){},s.pause=function(){},s.reset=function(){},s.destroy=function(){},s.isLive=function(){return!1},s.isDvr=function(){return!1},s.seekToLiveEdge=function(){},s.getStartTimeOfDvrWindow=function(){return 0},s.getTracks=function(e){return[]},s.getActiveTracks=function(){return{audio:void 0,video:void 0,text:void 0}},s.selectTrack=function(e){},s.hideTextTrack=function(){},s.enableAdaptiveBitrate=function(){},s.isAdaptiveBitrateEnabled=function(){return!0},s.setTextDisplaySettings=function(e){},s.startCasting=function(){},s.stopCasting=function(){},s.isCasting=function(){return!0},s.isCastAvailable=function(){return!0},s.getCastSession=function(){return new Be("","")},s.isVr=function(){return!1},s.toggleVrStereoMode=function(){},s.isInVrStereoMode=function(){return!1},i=r,(a=[{key:"ads",get:function(){return null}},{key:"textStyle",get:function(){return new l.TextStyle},set:function(e){}},{key:"buffered",get:function(){return[]}},{key:"currentTime",get:function(){return 0},set:function(e){}},{key:"duration",get:function(){return 0}},{key:"liveDuration",get:function(){return NaN}},{key:"volume",get:function(){return 1},set:function(e){}},{key:"paused",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"seeking",get:function(){return!1}},{key:"muted",get:function(){return!1},set:function(e){}},{key:"src",get:function(){return""}},{key:"poster",get:function(){return""}},{key:"playbackRate",get:function(){return 1},set:function(e){}},{key:"engineType",get:function(){return""}},{key:"streamType",get:function(){return""}},{key:"type",get:function(){return r.Type}},{key:"config",get:function(){return this._playerConfig}},{key:"isCastInitiator",get:function(){return this._isCastInitiator},set:function(e){this._isCastInitiator=e}}])&&Ve(i.prototype,a),o&&Ve(i,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(l.FakeEventTarget);function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ye(r.key),r)}}function Ye(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}Ke(ze,"defaultConfig",{}),Ke(ze,"Type","BaseRemotePlayer");var qe=function(){function e(){var e=this;!function(e,t,n){(t=Ye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_uis",[{template:function(t){return e.idleUI(t)},condition:function(e){return e.engine.isIdle}},{template:function(t){return e.errorUI(t)},condition:function(e){return e.engine.hasError}},{template:function(t){return e.adsUI(t)},condition:function(e){return e.engine.adBreak}},{template:function(t){return e.liveUI(t)},condition:function(e){return e.engine.isLive}},{template:function(t){return e.playbackUI(t)}}])}var t,n,r,i=e.prototype;return i.playbackUI=function(e){return u.Presets.playbackUI(e)},i.idleUI=function(e){return u.Presets.idleUI(e)},i.adsUI=function(e){return u.Presets.adsUI(e)},i.liveUI=function(e){return u.Presets.liveUI(e)},i.errorUI=function(e){return u.Presets.errorUI(e)},t=e,(n=[{key:"uis",get:function(){return this._uis}}])&&We(t.prototype,n),r&&We(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Xe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$e(e,t)}function $e(e,t){return($e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Je(r.key),r)}}function Ze(e,t,n){return t&&Qe(e.prototype,t),n&&Qe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var et=function(){function e(e){this._player=e}return Ze(e,[{key:"player",get:function(){return this._player}}]),e}(),tt=function(e){function t(t,n,r){var i;return(i=e.call(this,t)||this)._session=n,r&&(i._ui=r),i}return Xe(t,e),Ze(t,[{key:"ui",get:function(){return this._ui}},{key:"session",get:function(){return this._session}}]),t}(et),nt=function(e){function t(t,n){var r;return(r=e.call(this,t)||this)._snapshot=n,r}return Xe(t,e),Ze(t,[{key:"snapshot",get:function(){return this._snapshot}}]),t}(et),rt=function(e){function t(t,n){var r;return(r=e.call(this,t)||this)._available=n,r}return Xe(t,e),Ze(t,[{key:"available",get:function(){return this._available}}]),t}(et);var it=function(e){this.getPlayerSnapshot=pt.bind(e),this.getUIWrapper=dt.bind(e),this.onRemoteDeviceAvailable=ut.bind(e),this.onRemoteDeviceConnected=ot.bind(e),this.onRemoteDeviceDisconnected=lt.bind(e),this.onRemoteDeviceConnecting=at.bind(e),this.onRemoteDeviceDisconnecting=st.bind(e),this.onRemoteDeviceConnectFailed=ct.bind(e)};function at(){it._logger.debug("onRemoteDeviceConnecting"),this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_STARTING))}function ot(e){var t=this;it._logger.debug("onRemoteDeviceConnected",e);var n=e.player,r=e.ui,i=e.session;this._eventManager.removeAll(),Object.values(l.EventType).forEach((function(e){return t._eventManager.listen(n,e,(function(e){return t.dispatchEvent(e)}))}));var a=this.config;r&&l.Utils.Object.mergeDeep(a,{ui:{customPreset:r.uis}}),this.configure({playback:{muted:this.muted,volume:this.volume}}),this._localPlayer.reset(),this._uiWrapper.destroy(),this._remotePlayer=n,this._uiWrapper=new ke(this,a),this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_STARTED,{session:i}))}function st(){it._logger.debug("onRemoteDeviceDisconnecting"),this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_ENDING))}function lt(e){var t=this;it._logger.debug("onRemoteDeviceDisconnected",e);var n=e.player,r=e.snapshot;if(this._remotePlayer&&this._remotePlayer===n&&(this._eventManager.removeAll(),ft.call(this,r),r)){this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_ENDED));var i,a=this.config,o=!r.config.playback.autoplay,s=r.mediaInfo,u=r.mediaConfig;r.config.playback.autoplay=!0,ht.call(this,r.config),this._eventManager.listenOnce(this,this.Event.Core.CHANGE_SOURCE_ENDED,(function(){gt.call(t,r.config.sources)})),s?i=this.loadMedia(s):u&&(i=Promise.resolve(),this.setMedia(u)),i&&i.then((function(){t._eventManager.listenOnce(t,t.Event.Core.FIRST_PLAYING,(function(){t.textStyle=r.textStyle,ht.call(t,a),yt.call(t,r.config.playback),o&&t.pause()}))}))}}function ut(e){it._logger.debug("onRemoteDeviceAvailable",e);var t=e.player,n=e.available;this.dispatchEvent(new l.FakeEvent(Le.CAST_AVAILABLE,{type:t.type,available:n}))}function ct(){it._logger.debug("onRemoteDeviceConnectFailed"),this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_START_FAILED))}function pt(){var e=new Me(this);return it._logger.debug("getPlayerSnapshot",e),e}function dt(){return it._logger.debug("getUIWrapper"),this._uiWrapper}function ft(e){var t=this;this._uiWrapper.destroy();var n=this._localPlayer.config;if(n.plugins&&n.plugins.ima){var r={};if(n.cast.advertising&&n.cast.advertising.vast){if(e.config.sources.startTime>0){var i=n.plugins.ima.adTagUrl;r={adTagUrl:""},this._eventManager.listen(this,l.EventType.FIRST_PLAYING,(function(){return t.configure({plugins:{ima:{adTagUrl:i}}})}))}}else r={delayInitUntilSourceSelected:!0};l.Utils.Object.mergeDeep(n,{plugins:{ima:r}}),this._localPlayer.destroy(),this._remotePlayer=null,this._localPlayer=Object(l.loadPlayer)(n)}else this._remotePlayer=null;Object.values(l.EventType).forEach((function(e){return t._eventManager.listen(t._localPlayer,e,(function(e){return t.dispatchEvent(e)}))})),this._uiWrapper=new ke(this,this.config),this._uiWrapper.setConfig({isCastAvailable:this.isCastAvailable()},"engine")}function ht(e){var t=e.sources.startTime,n=e.playback.autoplay;this.configure({sources:{startTime:t},playback:{autoplay:n}})}function gt(e){if(e.captions.length){var t=e.captions;this.configure({sources:{captions:t}})}}function yt(e){if(e.audioLanguage){var t=this.getTracks(l.TrackType.AUDIO).find((function(t){return t.language===e.audioLanguage}));this.selectTrack(t)}if(e.textLanguage){var n=this.getTracks(l.TrackType.TEXT).find((function(t){return t.language===e.textLanguage}));this.selectTrack(n)}}function vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(it,"_logger",Object(l.getLogger)("RemoteControl"));var mt=function(){function e(){vt(this,"_remotePlayers",new Map)}e.register=function(t,n){"function"==typeof n?e._registry.has(t)?e._logger.debug("Remote player of type "+t+" is already registered"):(e._logger.debug("Register remote player of type "+t),e._registry.set(t,n)):e._logger.debug("remote player must be instance of BaseRemotePlayer")};var t=e.prototype;return t.load=function(t,n){var r=this;e._registry.forEach((function(i,a){e._logger.debug("Load remote player of type "+a);var o=new i(t,new it(n),n.config.targetId);r._remotePlayers.set(a,o)}))},t.startCasting=function(t){e._logger.debug("Start casting");var n=this._getRemotePlayer(t);return n?n.startCasting():Promise.reject()},t.isCastAvailable=function(t){var n=this._getRemotePlayer(t);return!!n&&(e._logger.debug("isCastAvailable: "+n.isCastAvailable()),n.isCastAvailable())},t.destroy=function(){var e=this._remotePlayers;Array.from(e.values()).forEach((function(e){return e.destroy()}))},t.setIsCastInitiator=function(e,t){var n=this._getRemotePlayer(e);n&&(n.isCastInitiator=t)},t._getRemotePlayer=function(e){var t=this._remotePlayers;return e&&t.get(e)?t.get(e):t.size>0?Array.from(t.values())[0]:void 0},e}();function bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_t(r.key),r)}}function _t(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}vt(mt,"_registry",new Map),vt(mt,"_logger",Object(l.getLogger)("RemotePlayerManager"));var Et=function(){function e(e){this._type=e.type,this._position=e.position,this._numAds=e.numAds}var t,n,r;return e.prototype.toJSON=function(){return{type:this.type,position:this.position,numAds:this.numAds}},t=e,(n=[{key:"type",get:function(){return this._type}},{key:"position",get:function(){return this._position}},{key:"numAds",get:function(){return this._numAds}}])&&bt(t.prototype,n),r&&bt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tt(r.key),r)}}function Tt(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var At=function(){function e(e,t){this._id=e,this._system=t.system,this._url=t.url,this._contentType=t.contentType,this._title=t.title,this._position=t.position,this._duration=t.duration,this._clickThroughUrl=t.clickThroughUrl,this._posterUrl=t.posterUrl,this._skipOffset=t.skipOffset,this._linear=t.linear,this._width=t.width||0,this._height=t.height||0,this._bitrate=t.bitrate||0,this._bumper=t.bumper,this._inStream=t.inStream||!1,this._vpaid=t.vpaid||!1,this._streamId=t.streamId||"",this._wrapperAdIds=t.wrapperAdIds,this._wrapperCreativeIds=t.wrapperCreativeIds,this._wrapperAdSystems=t.wrapperAdSystems}var t,n,r;return e.prototype.toJSON=function(){return{id:this.id,system:this.system,url:this.url,contentType:this.contentType,title:this.title,position:this.position,duration:this.duration,clickThroughUrl:this.clickThroughUrl,posterUrl:this.posterUrl,skipOffset:this.skipOffset,linear:this.linear,skippable:this.skippable,width:this.width,height:this.height,bitrate:this.bitrate,bumper:this.bumper,inStream:this.inStream,vpaid:this.vpaid}},t=e,(n=[{key:"id",get:function(){return this._id}},{key:"system",get:function(){return this._system}},{key:"contentType",get:function(){return this._contentType}},{key:"url",get:function(){return this._url}},{key:"title",get:function(){return this._title}},{key:"position",get:function(){return this._position}},{key:"duration",get:function(){return this._duration}},{key:"clickThroughUrl",get:function(){return this._clickThroughUrl}},{key:"posterUrl",get:function(){return this._posterUrl}},{key:"skipOffset",get:function(){return this._skipOffset}},{key:"linear",get:function(){return this._linear}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"bitrate",get:function(){return this._bitrate}},{key:"bumper",get:function(){return this._bumper}},{key:"inStream",get:function(){return this._inStream}},{key:"skippable",get:function(){return!!(this.skipOffset&&this.skipOffset>0)}},{key:"vpaid",get:function(){return this._vpaid}},{key:"streamId",get:function(){return this._streamId}},{key:"wrapperAdIds",get:function(){return this._wrapperAdIds}},{key:"wrapperCreativeIds",get:function(){return this._wrapperCreativeIds}},{key:"wrapperAdSystems",get:function(){return this._wrapperAdSystems}}])&&kt(t.prototype,n),r&&kt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var St=function(){function e(t){var n=this;wt(this,"_prebid",null),this._loadPromise=l.Utils.Object.defer(),this._loadPromise.catch((function(){return e._logger.warn("Prebid SDK failed to load")})),t?(this._config=t,this._loadPrebidSDKLib(this._config.libUrl).then((function(){n._isPrebidSDKLibLoaded()?(n._prebid=window.pbjs,n._loadPromise.resolve()):n._loadPromise.reject()})).catch((function(){n._loadPromise.reject()}))):this._loadPromise.reject()}var t=e.prototype;return t._isPrebidSDKLibLoaded=function(){return window.pbjs&&window.pbjs.que},t._loadPrebidSDKLib=function(e){return this._isPrebidSDKLibLoaded()?Promise.resolve():l.Utils.Dom.loadScriptAsync(e)},t._load=function(t){var n=this;return new Promise((function(r,i){n._loadPromise.then((function(){var a=setTimeout(i,t.timeout||4e3);n._prebid.que.push((function(){n._prebid.addAdUnits(t.adUnit),t.options&&n._prebid.setConfig(t.options),n._prebid.requestBids({bidsBackHandler:function(o){if(e._logger.debug("returned bids",o),clearTimeout(a),t.params){var s={};t.adUnit&&(s.adUnit=t.adUnit),s.params=t.params;var l=n._prebid.adServers.dfp.buildVideoUrl(s);r([{vastUrl:l}])}else try{var u=o[t.adUnit.code||Object.keys(o)[0]].bids;r(u)}catch(e){i()}}})}))})).catch(i)}))},t.load=function(e){return this._load(e||this._config)},e}();function Ct(e,t){return(Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}wt(St,"_logger",Object(l.getLogger)("PrebidManager"));var It=function(e){var t,n;function r(t){var n;return xt(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n=e.call(this)||this),"id","AdLayoutMiddleware"),n._context=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ct(t,n);var i=r.prototype;return i.load=function(e){var t=this;this._context.prerollReady.then((function(){return t.callNext(e)}))},i.play=function(e){var t=this;this._context.prerollReady.then((function(){return t.callNext(e)}))},r}(l.BaseMiddleware);function Pt(){return(Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ot(r.key),r)}}function Rt(e,t){return(Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ot(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Lt=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._player=t,r._eventManager=new l.EventManager,r._liveEventManager=new l.EventManager,r._adsPluginControllers=n,r._prebidManager=new St(r._player.config.advertising&&r._player.config.advertising.prebid),r._init(),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Rt(t,n);var i,a,o,s=r.prototype;return s.isAdPlaying=function(){return this.isAdBreak()&&this._isAdPlaying},s.isAdBreak=function(){return!!this._adBreak},s.getAdBreaksLayout=function(){return this._adBreaksLayout},s.getAdBreak=function(){return this._adBreak},s.getAd=function(){return this._ad},s.skipAd=function(){var e=this._adsPluginControllers.find((function(e){return e.active}));e&&e.skipAd()},s.playAdNow=function(e){var t=this;if(this.isAdBreak())r._logger.warn("Tried to call playAdNow during an ad break");else{var n=Promise.all(e.map((function(e){return t._getPrebidAds(e)})));this._playAdBreak({position:this._player.currentTime||0,ads:e,played:!1,loadedPromise:n})}},s.getMiddleware=function(){return this._middleware?this._middleware:this._middleware=new It(this)},s._init=function(){this._initMembers(),this._addBindings()},s._initMembers=function(){this._allAdsCompleted=!0,this._adBreaksLayout=[],this._adBreak=null,this._ad=null,this._adPlayed=!1,this._snapback=0,this._adIsLoading=!1,this._isAdPlaying=!1,this._liveSeeking=!1},s._addBindings=function(){var e=this;this._eventManager.listen(this._player,l.CustomEventType.SOURCE_SELECTED,(function(){return e._handleConfiguredAdBreaks()})),this._eventManager.listen(this._player,l.AdEventType.AD_MANIFEST_LOADED,(function(t){return e._onAdManifestLoaded(t)})),this._eventManager.listen(this._player,l.AdEventType.AD_BREAK_START,(function(t){return e._onAdBreakStart(t)})),this._eventManager.listen(this._player,l.AdEventType.AD_LOADED,(function(){return e._onAdLoaded()})),this._eventManager.listen(this._player,l.AdEventType.AD_STARTED,(function(t){return e._onAdStarted(t)})),this._eventManager.listen(this._player,l.AdEventType.AD_COMPLETED,(function(){return e._isAdPlaying=!1})),this._eventManager.listen(this._player,l.AdEventType.AD_BREAK_END,(function(){return e._onAdBreakEnd()})),this._eventManager.listen(this._player,l.AdEventType.ADS_COMPLETED,(function(){return e._onAdsCompleted()})),this._eventManager.listen(this._player,l.AdEventType.AD_ERROR,(function(t){return e._onAdError(t)})),this._eventManager.listen(this._player,l.CustomEventType.PLAYER_RESET,(function(){return e._reset()})),this._eventManager.listen(this._player,l.CustomEventType.PLAYER_DESTROY,(function(){return e._destroy()})),this._eventManager.listenOnce(this._player,l.Html5EventType.ENDED,(function(){return e._onEnded()})),this._eventManager.listenOnce(this._player,l.CustomEventType.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this._player,l.AdEventType.AD_RESUMED,(function(){return e._isAdPlaying=!0})),this._eventManager.listen(this._player,l.AdEventType.AD_PAUSED,(function(){return e._isAdPlaying=!1}))},s._handleConfiguredAdBreaks=function(){var e=this,t=this._player.config.advertising.playAdsAfterTime||this._player.config.sources.startTime;this._configAdBreaks=this._player.config.advertising.adBreaks.filter((function(e){return("number"==typeof e.every||"number"==typeof e.position||"number"==typeof e.percentage)&&e.ads.length})).map((function(n){e._validateOneTimeConfig(n);var r=n.position;0===n.percentage&&(r=0),100===n.percentage&&(r=-1),n.every&&(r=n.every);var i=e._player.isLive()?r<t:r<=t;return{position:r,percentage:n.percentage,every:n.every,ads:n.ads.slice(),played:-1<r&&i}})),this._configAdBreaks.length?(this._dispatchAdManifestLoaded(),this._handlePrebidAdConfig(),this._handleConfiguredPreroll(),this._eventManager.listenOnce(this._player,l.Html5EventType.DURATION_CHANGE,(function(){e._player.isLive()?e._eventManager.listenOnce(e._player,l.Html5EventType.SEEKING,(function(){e._pushNextAdsForLive(e._configAdBreaks,(function(t){return e._player.currentTime+t.every})),e._attachLiveSeekedHandler()})):e._handleEveryAndPercentage(),e._configAdBreaks.sort((function(e,t){return e.position-t.position})),e._configAdBreaks.some((function(e){return e.position>0}))&&e._handleConfiguredMidrolls()}))):this.prerollReady=Promise.resolve()},s._validateOneTimeConfig=function(e){"number"==typeof e.position&&("number"==typeof e.percentage&&(r._logger.warn("Validate ad break - ignore percentage "+e.percentage+" as position "+e.position+" configured"),delete e.percentage),"number"==typeof e.every&&(r._logger.warn("Validate ad break - ignore every "+e.every+" as position "+e.position+" configured"),delete e.every)),"number"==typeof e.percentage&&"number"==typeof e.every&&(r._logger.warn("Validate ad break - ignore every "+e.every+" as percentage "+e.percentage+" configured"),delete e.every)},s._dispatchAdManifestLoaded=function(){var e=this,t=Array.from(new Set(this._configAdBreaks.map((function(e){return e.every&&e.every+"s"||"number"==typeof e.percentage&&e.percentage+"%"||e.position}))));r._logger.debug(l.AdEventType.AD_MANIFEST_LOADED,t),this._player.dispatchEvent(new l.FakeEvent(l.AdEventType.AD_MANIFEST_LOADED,{adBreaksPosition:t})),this._player.hasService("timeline")&&this._player.config.advertising.showAdBreakCuePoint&&t.forEach((function(t){e._player.getService("timeline").addCuePoint(Pt({time:-1!==t?t:1/0},e._player.config.advertising.adBreakCuePointStyle))}))},s._handlePrebidAdConfig=function(){var e=this;this._prebidManager&&this._configAdBreaks.filter((function(e){return!e.played})).map((function(t){var n=Promise.all(t.ads.map((function(t){return e._getPrebidAds(t)})));t.loadedPromise=n,n.then((function(e){return t.ads=e}))}))},s._getPrebidAds=function(e){var t=this;return new Promise((function(n){if(e.prebid&&t._prebidManager){var r=l.Utils.Object.mergeDeep({},e.prebid,t._player.config.advertising.prebid);t._prebidManager.load(r).then((function(t){var r=t.map((function(e){return e&&e.vastUrl}));e.url=r.concat(e.url),n(e)})).catch((function(){n(e)}))}else n(e)}))},s._handleConfiguredPreroll=function(){var e=this._configAdBreaks.filter((function(e){return 0===e.position&&!e.played})),t=this._mergeAdBreaks(e);this.prerollReady=t&&t.loadedPromise?t.loadedPromise:Promise.resolve(),t&&this._playAdBreak(t)},s._handleEveryAndPercentage=function(){var e=this;this._configAdBreaks.forEach((function(t){if(e._player.duration&&t.every)for(var n=2*t.every;n<=e._player.duration;)e._configAdBreaks.push({position:n,ads:t.ads,played:!1,loadedPromise:Promise.resolve()}),n+=t.every;else e._player.duration&&t.percentage&&!t.position&&(t.position=Math.floor(e._player.duration*t.percentage/100))}))},s._attachLiveSeekedHandler=function(){var e=this;this._eventManager.listenOnce(this._player,l.CustomEventType.FIRST_PLAYING,(function(){e._eventManager.listen(e._player,l.Html5EventType.SEEKING,(function(){e._liveSeeking=!0})),e._eventManager.listen(e._player,l.Html5EventType.SEEKED,(function(){e._liveSeeking=!1,e._pushNextAdsForLive(e._configAdBreaks,(function(t){return e._player.currentTime+t.every}))}))}))},s._pushNextAdsForLive=function(e,t){this._liveEventManager.removeAll();var n=[];e.forEach((function(e){if(![-1,0].includes(e.position)){var i=e.every,a=e.ads,o={every:i,position:t(e),ads:a,played:!1,loadedPromise:Promise.resolve()};r._logger.debug("Pushing next ad for live",o),n.push(o)}})),n.length&&(this._configAdBreaks=[].concat(n,this._configAdBreaks.filter((function(e){return-1===e.position}))))},s._handleConfiguredMidrolls=function(){var e=this;this._eventManager.listen(this._player,l.Html5EventType.TIME_UPDATE,(function(){if(!e._player.paused&&!e._liveSeeking){var t=e._configAdBreaks.filter((function(t){return!t.played&&e._player.currentTime&&t.position<=e._player.currentTime&&t.position>e._snapback}));if(t.length){var n=t[t.length-1].position,i=t.filter((function(e){return e.position===n}));if(e._player.isLive())!e._player.isDvr()||e._player.isOnLiveEdge()&&e._player.config.advertising.returnToLive?e._handleReturnToLive(i):e._pushNextAdsForLive(i,(function(t){return(e._player.isOnLiveEdge()?e._player.currentTime:t.position)+t.every}));else e._snapback=n,r._logger.debug("Set snapback value "+e._snapback),e._eventManager.listen(e._player,l.Html5EventType.SEEKED,(function(){var t=e._configAdBreaks.findIndex((function(t){return t.played&&"number"==typeof e._player.currentTime&&e._player.currentTime<t.position}));t>0&&!e._configAdBreaks[t-1].played&&(e._snapback=0,r._logger.debug("Reset snapback value"))}));var a=e._mergeAdBreaks(i);a&&e._playAdBreak(a)}}}))},s._handleReturnToLive=function(e){var t=this;this._liveEventManager.listenOnce(this._player,l.AdEventType.AD_ERROR,(function(){t._pushNextAdsForLive(e,(function(e){return(t._player.isOnLiveEdge()?t._player.currentTime:e.position)+e.every}))})),this._liveEventManager.listenOnce(this._player,l.AdEventType.AD_BREAK_END,(function(){t._player.seekToLiveEdge()}))},s._playAdBreak=function(e){var t=this._adsPluginControllers.find((function(e){return"function"==typeof e.playAdNow}));t?(e.played=!0,this._adIsLoading=!0,r._logger.debug("Playing ad break positioned in "+e.position),e.loadedPromise.then((function(){return t.playAdNow(e.ads)}))):r._logger.warn("No ads plugin registered")},s._onAdManifestLoaded=function(e){this._adBreaksLayout=Array.from(new Set(this._adBreaksLayout.concat(e.payload.adBreaksPosition))).sort(),this._allAdsCompleted=!1},s._onAdBreakStart=function(e){this._adBreak=e.payload.adBreak},s._onAdLoaded=function(){this._adIsLoading=!1},s._onAdStarted=function(e){this._ad=e.payload.ad,this._adPlayed=!0,this._isAdPlaying=!0},s._onAdBreakEnd=function(){this._adBreak=null,this._ad=null},s._onAdsCompleted=function(){this._adsPluginControllers.every((function(e){return e.done}))&&this._configAdBreaks.every((function(e){return e.played}))&&(this._allAdsCompleted=!0,r._logger.debug(l.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new l.FakeEvent(l.AdEventType.ALL_ADS_COMPLETED)))},s._onAdError=function(e){this._adIsLoading=!1,e.payload.severity===l.Error.Severity.CRITICAL&&(this._isAdPlaying=!1,this._adsPluginControllers.every((function(e){return e.done}))&&this._configAdBreaks.every((function(e){return e.played}))&&(this._allAdsCompleted=!0,this._adPlayed&&(r._logger.debug(l.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new l.FakeEvent(l.AdEventType.ALL_ADS_COMPLETED)))))},s._isBumper=function(e){return"bumper"===e.name},s._onEnded=function(){var e=this;if(!this._adIsLoading){var t=this._adsPluginControllers.find((function(t){return e._isBumper(t)})),n=this._adsPluginControllers.find((function(t){return!e._isBumper(t)&&!t.done})),r=t&&"function"==typeof t.onPlaybackEnded?function(){return t.onPlaybackEnded()}:function(){return Promise.resolve()},i=n&&"function"==typeof n.onPlaybackEnded?function(){return n.onPlaybackEnded()}:function(){return Promise.resolve()};this._adBreaksLayout.includes(-1)||this._adBreaksLayout.includes("100%")||(this._allAdsCompleted=!0),r().finally((function(){i().finally((function(){return e._handleConfiguredPostroll()}))}))}},s._onPlaybackEnded=function(){this._configAdBreaks.forEach((function(e){return e.played=!0}))},s._handleConfiguredPostroll=function(){var e=this._configAdBreaks.filter((function(e){return!e.played&&-1===e.position}));if(e.length){var t=this._mergeAdBreaks(e);t&&this._playAdBreak(t)}this._configAdBreaks.forEach((function(e){return e.played=!0}))},s._reset=function(){this._eventManager.removeAll(),this._liveEventManager.removeAll(),this._init()},s._destroy=function(){this._adsPluginControllers=[],this._eventManager.destroy(),this._liveEventManager.destroy()},s._mergeAdBreaks=function(e){if(e.length)return e.forEach((function(e){return e.played=!0})),{position:e[0].position,ads:e.reduce((function(e,t){return e.concat(t.ads)}),[]),played:!1,loadedPromise:Promise.all(e.map((function(e){return e.loadedPromise})))}},i=r,(a=[{key:"allAdsCompleted",get:function(){return this._allAdsCompleted}}])&&Dt(i.prototype,a),o&&Dt(i,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(l.FakeEventTarget);!function(e,t,n){(t=Ot(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Lt,"_logger",Object(l.getLogger)("AdsController"));var Mt=function(){function e(e){this._pluginManager=e}return e.prototype.getAdsControllers=function(){return Object.values(this._pluginManager.getAll()).filter((function(e){return"function"==typeof e.getAdsController})).map((function(e){return e.getAdsController()}))},e}();function Nt(e,t){return(Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ut(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ft=function(e){var t,n;function r(t){var n;return Ut(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n=e.call(this)||this),"id","PluginReadinessMiddleware"),n._plugins=t,r._logger.debug("plugins readiness",n._plugins),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Nt(t,n);var i=r.prototype;return i.load=function(e){this._checkNextSettle(0,e)},i._checkNextSettle=function(e,t){e<this._plugins.length?this._checkSettle(e,t):this.callNext(t)},i._checkSettle=function(e,t){var n=this;(this._plugins[e].ready?this._plugins[e].ready:Promise.resolve()).then((function(){r._logger.debug("plugin "+n._plugins[e].name+" ready promise resolved"),n._checkNextSettle(e+1,t)})).catch((function(){r._logger.debug("plugin "+n._plugins[e].name+" ready promise rejected"),n._checkNextSettle(e+1,t)}))},i.play=function(e){this._checkNextSettle(0,e)},r}(l.BaseMiddleware);function jt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ut(Ft,"_logger",Object(l.getLogger)("PluginReadinessMiddleware"));var Bt=function(){function e(e){jt(this,"_textTrack",null),this._player=e}var t=e.prototype;return t._addTextTrack=function(){this._textTrack=this._player.addTextTrack(l.TextTrack.KIND.METADATA,"CuePoints")},t._getMetadataTracks=function(){return this._player.getNativeTextTracks().filter((function(e){return e.kind===l.TextTrack.KIND.METADATA&&e.cues}))},t._createTextTrackCue=function(e){var t=e.startTime,n=e.endTime,r=e.id,i=e.metadata;return Object(l.createTextTrackCue)({startTime:t,endTime:n,id:r,type:l.TimedMetadata.TYPE.CUE_POINT,metadata:i})},t._cuesSorter=function(e,t){return e.startTime-t.startTime},t.getAllCuePoints=function(){return this._getMetadataTracks().reduce((function(e,t){return e.concat(Array.from(t.cues).map((function(e){return Object(l.createTimedMetadata)(e)})))}),[]).sort(this._cuesSorter)},t.getActiveCuePoints=function(){return this._getMetadataTracks().reduce((function(e,t){return e.concat(Array.from(t.activeCues).map((function(e){return Object(l.createTimedMetadata)(e)})))}),[]).sort(this._cuesSorter)},t._getTextTrackCueById=function(e){var t=null;return this._getMetadataTracks().some((function(n){return t=n.cues.getCueById(e)})),t},t._removeTextTrackCue=function(e){this._getMetadataTracks().forEach((function(t){try{t.removeCue(e)}catch(e){}}))},t.addCuePoints=function(e){var t=this;this._player.ready().then((function(){t._textTrack||t._addTextTrack();var n=[];e.forEach((function(e){var r,i=t._createTextTrackCue(e),a=t._getTextTrackCueById(e.id);a&&t._removeTextTrackCue(a),null==(r=t._textTrack)||r.addCue(i),n.push(Object(l.createTimedMetadata)(i))})),t._player.dispatchEvent(new l.FakeEvent(l.EventType.TIMED_METADATA_ADDED,{cues:n}))}))},t._clearAllTextTrackCues=function(){var e=this;this._getMetadataTracks().forEach((function(t){for(;t.cues.length;)e._removeTextTrackCue(t.cues[0])}))},t.reset=function(){this._clearAllTextTrackCues()},t.destroy=function(){this.reset()},e}();function Vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ht=function(){function e(t){var n=this;Vt(this,"_servicesRegistry",new Map),e._logger=Object(l.getLogger)("ServiceProvider"),this._eventManager=new l.EventManager,this._eventManager.listen(t,t.Event.Core.PLAYER_RESET,(function(){return n.reset()}))}var t=e.prototype;return t.register=function(t,n){this._servicesRegistry.has(t)?e._logger.debug(t+" service already exists"):(this._servicesRegistry.set(t,n),e._logger.debug(t+" service registered"))},t.get=function(e){return this._servicesRegistry.get(e)},t.has=function(e){return this._servicesRegistry.has(e)},t.reset=function(){this._servicesRegistry.forEach((function(e){return"function"==typeof e.reset&&e.reset()}))},t.destroy=function(){this._servicesRegistry.forEach((function(e){return"function"==typeof e.destroy&&e.destroy()})),this._eventManager.removeAll(),this._servicesRegistry.clear()},e}();function Kt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */zt=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),s=new w(i||[]);return r(o,"_invoke",{value:E(e,n,s)}),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function d(){}function f(){}function h(){}var g={};l(g,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==t&&n.call(v,a)&&(g=v);var m=h.prototype=d.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var i;r(this,"_invoke",{value:function(r,a){function o(){return new t((function(i,o){!function r(i,a,o,s){var l=c(e[i],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(p).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,s)}))}s(l.arg)}(r,a,i,o)}))}return i=i?i.then(o,o):o()}})}function E(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new _(u(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(m),l(m,s,"Generator"),l(m,a,(function(){return this})),l(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=S,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function Wt(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Yt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Wt(a,r,i,o,s,"next",e)}function s(e){Wt(a,r,i,o,s,"throw",e)}o(void 0)}))}}var qt=[["widevine","com.widevine.alpha"],["playready","com.microsoft.playready"],["fairplay","com.apple.fps"]],Xt=Object(l.getLogger)("MediaCapabilities"),$t=1,Qt=0,Zt=-1;function Jt(){return(Jt=Yt(zt().mark((function e(t){var n,r,i;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Xt.debug("Starting to get media capabilities..."),e.next=4,nn(t);case 4:return r=e.sent,e.next=7,en();case 7:return i=e.sent,n=Object.assign({},r,i),Xt.debug("Finished getting media capabilities ",{mediaCapabilities:n}),e.abrupt("return",n);case 13:return e.prev=13,e.t0=e.catch(0),Xt.debug("There was a problem with getting the media capabilities, ",e.t0.message),n={isHEVCSupported:Qt,isPowerEfficient:Qt,isDRMSupported:Qt,supportedDRMs:[]},Xt.debug("Returning media capabilities defaults ",{mediaCapabilities:n}),e.abrupt("return",n);case 19:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function en(){return tn.apply(this,arguments)}function tn(){return(tn=Yt(zt().mark((function e(){var t,n,r,i,a,o,s,l;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={isDRMSupported:Zt,supportedDRMs:[]},navigator.requestMediaKeySystemAccess){e.next=3;break}return e.abrupt("return",t);case 3:n=[{initDataTypes:["cenc"],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}],r=new Map(qt),i=Kt(r);case 6:if((a=i()).done){e.next=19;break}return o=a.value,s=o[0],l=o[1],e.prev=8,e.next=11,navigator.requestMediaKeySystemAccess(l,n);case 11:t.supportedDRMs.push(s),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),Xt.debug(l+" not supported ("+e.t0.name+": "+e.t0.message+").");case 17:e.next=6;break;case 19:return t.isDRMSupported=t.supportedDRMs.length>0?$t:Qt,e.abrupt("return",t);case 21:case"end":return e.stop()}}),e,null,[[8,14]])})))).apply(this,arguments)}function nn(e){return rn.apply(this,arguments)}function rn(){return(rn=Yt(zt().mark((function e(t){var n,r,i;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={isHEVCSupported:Zt,isPowerEfficient:Zt},navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo){e.next=3;break}return e.abrupt("return",n);case 3:return r={type:"media-source",video:{contentType:'video/mp4; codecs="hvc1.1.6.L150.90"',width:(null==t?void 0:t.width)||1920,height:(null==t?void 0:t.height)||1080,bitrate:(null==t?void 0:t.bitrate)||12e5,framerate:(null==t?void 0:t.framerate)||30}},e.prev=4,e.next=7,navigator.mediaCapabilities.decodingInfo(r);case 7:i=e.sent,n.isHEVCSupported=i.supported?$t:Qt,n.isPowerEfficient=i.powerEfficient?$t:Qt,e.next=17;break;case 12:e.prev=12,e.t0=e.catch(4),Xt.debug("Failed to get the media capabilities from navigator. ("+e.t0.name+": "+e.t0.message+")."),n.isHEVCSupported=Zt,n.isPowerEfficient=Zt;case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[4,12]])})))).apply(this,arguments)}var an=function(e){return Jt.apply(this,arguments)};function on(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */on=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),s=new w(i||[]);return r(o,"_invoke",{value:E(e,n,s)}),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function d(){}function f(){}function h(){}var g={};l(g,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==t&&n.call(v,a)&&(g=v);var m=h.prototype=d.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var i;r(this,"_invoke",{value:function(r,a){function o(){return new t((function(i,o){!function r(i,a,o,s){var l=c(e[i],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(p).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,s)}))}s(l.arg)}(r,a,i,o)}))}return i=i?i.then(o,o):o()}})}function E(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new _(u(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(m),l(m,s,"Generator"),l(m,a,(function(){return this})),l(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=S,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function sn(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function ln(){return(ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function un(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fn(r.key),r)}}function cn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pn(e,t){return(pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dn(e,t,n){return(t=fn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var hn=function(e){var t,n;function r(t){var n;dn(cn(n=e.call(this)||this),"_eventManager",new l.EventManager),dn(cn(n),"_mediaInfo",null),dn(cn(n),"_remotePlayer",null),dn(cn(n),"_pluginManager",new ee),dn(cn(n),"_pluginsConfig",{}),dn(cn(n),"_reset",!0),dn(cn(n),"_firstPlay",!0),dn(cn(n),"_sourceSelected",null),dn(cn(n),"_appPluginConfig",{}),dn(cn(n),"_thumbnailManager",null),dn(cn(n),"_isVisible",!1),dn(cn(n),"_autoPaused",!1);var r=t.sources,i=t.plugins;n._configEvaluator=new fe,n._configEvaluator.evaluatePluginsConfig(i,t),n._playbackStart=!1;var a=l.Utils.Object.mergeDeep({},t);delete a.plugins,delete a.sources,n._localPlayer=Object(l.loadPlayer)(a),n._controllerProvider=new Mt(n._pluginManager),n._viewabilityManager=new L(n.config.viewability),n._uiWrapper=new ke(cn(n),l.Utils.Object.mergeDeep(t,{ui:{logger:{getLogger:l.getLogger,LogLevel:l.LogLevel}}})),n._serviceProvider=new Ht(cn(n)),n._cuepointManager=new Bt(cn(n)),n._provider=new c.Provider(l.Utils.Object.mergeDeep(t.provider,{logger:{getLogger:l.getLogger,LogLevel:l.LogLevel}}),"3.14.3-canary.0-9dfd3f3"),n._playlistManager=new Oe(cn(n),t),Object.values(l.EventType).forEach((function(e){return n._eventManager.listen(n._localPlayer,e,(function(e){return n.dispatchEvent(e)}))})),n._addBindings();var o=l.Utils.Object.mergeDeep({},t.playlist,{items:null});return n._playlistManager.configure(o),n.configure({plugins:i}),n._playlistManager.configure({items:t.playlist&&t.playlist.items||[]}),n._localPlayer.setSources(r||{}),n._remotePlayerManager=new mt,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,pn(t,n);var i,a,o,s=r.prototype;return s.loadMedia=function(e,t){var n=this;return r._logger.debug("loadMedia",e),this._mediaInfo=e,this.reset(),this._localPlayer.loadingMedia=!0,this._uiWrapper.setLoadingSpinnerState(!0),new Promise((function(r,i){n._provider.getMediaConfig(e).then((function(e){var i=l.Utils.Object.copyDeep(e);t&&(i.sources=i.sources||{},i.sources=l.Utils.Object.mergeDeep(i.sources,t));var a=X(i.plugins,n.config.plugins);i.plugins=a[0],n._appPluginConfig=a[1],n.configure(d({sources:n.sources},i)),n.setMedia(i),r(i)}),(function(e){var t=new l.Error(l.Error.Severity.CRITICAL,l.Error.Category.PLAYER,l.Error.Code.LOAD_FAILED,e);n._localPlayer.dispatchEvent(new l.FakeEvent(l.EventType.ERROR,t)),i(e)}))}))},s.setMedia=function(e){r._logger.debug("setMedia",e),this.reset(!0);var t=l.Utils.Object.copyDeep(e),n=l.Utils.Object.mergeDeep({},t.sources,this._localPlayer.sources);delete t.sources,l.Utils.Object.mergeDeep(t.session,this._localPlayer.config.session),t.plugins=t.plugins||{},Object.keys(this._pluginsConfig).forEach((function(e){t.plugins[e]=t.plugins[e]||{}})),this.configure({session:e.session}),Y(n)||q(n)?this._thumbnailManager=null:this._thumbnailManager=new me(this,this.config.ui,e),this.updateKalturaPoster(n,e.sources,this._localPlayer.dimensions),O(this,ln({},t,{sources:n}));var i=function(e,t){return t&&Y(t)?W(e,"youtube","progressive"):t&&q(t)?W(e,"image","image"):null}(this,n);i&&(t.playback=i),this.configure(ln({},t,{sources:n}))},s.updateKalturaPoster=function(e,t,n){var r,i;!function(e,t,n,r){var i=e.poster,a=t.poster,o=n.width,s=n.height;"string"==typeof i&&ve.test(i)&&i===a&&(e.poster=i+"/height/"+s+"/width/"+o+(r?"/ks/"+r:"")),t.poster=e.poster||""}(e,t,n,this.shouldAddKs()?null==(r=this.config)||null==(i=r.session)?void 0:i.ks:"")},s.shouldAddKs=function(e){var t,n;return!(!this.config.provider.loadThumbnailWithKs||!1!==(null==(t=e||this.config)||null==(n=t.session)?void 0:n.isAnonymous))},s.loadPlaylist=function(e,t){var n=this;return r._logger.debug("loadPlaylist",e),this._uiWrapper.setLoadingSpinnerState(!0),new Promise((function(r,i){n._provider.getPlaylistConfig(e).then((function(e){n.setPlaylist(e,t),r(e)}),(function(e){var t=new l.Error(l.Error.Severity.CRITICAL,l.Error.Category.PLAYER,l.Error.Code.LOAD_FAILED,e);n._localPlayer.dispatchEvent(new l.FakeEvent(l.EventType.ERROR,t)),i(e)}))}))},s.loadPlaylistByEntryList=function(e,t){var n=this;return r._logger.debug("loadPlaylistByEntryList",e),this._uiWrapper.setLoadingSpinnerState(!0),new Promise((function(r,i){n._provider.getEntryListConfig(e).then((function(i){n.setPlaylist(i,t,e),r(i)}),(function(e){var t=new l.Error(l.Error.Severity.CRITICAL,l.Error.Category.PLAYER,l.Error.Code.LOAD_FAILED,e);n._localPlayer.dispatchEvent(new l.FakeEvent(l.EventType.ERROR,t)),i(e)}))}))},s.setPlaylist=function(e,t,n){r._logger.debug("setPlaylist",e);var i={playlist:e,plugins:{}};Object.keys(this._pluginsConfig).forEach((function(e){i.plugins[e]={}})),this._configEvaluator.evaluatePluginsConfig(i.plugins,i),this._configureOrLoadPlugins(i.plugins),this._playlistManager.load(e,t,n)},s.getMediaInfo=function(){return l.Utils.Object.copyDeep(this._mediaInfo)},s.getDrmInfo=function(){return this._localPlayer.getDrmInfo()},s.getMediaConfig=function(){var e={sources:this._localPlayer.sources,plugins:this._pluginsConfig};return l.Utils.Object.copyDeep(e)},s.setSourcesMetadata=function(e){this._localPlayer.setSourcesMetadata(e)},s.configure=function(e){void 0===e&&(e={}),e=z(e);var t=l.Utils.Object.mergeDeep({},this.config,e);this._configEvaluator.evaluatePluginsConfig(e.plugins,t),this._configureOrLoadPlugins(e.plugins);var n=l.Utils.Object.mergeDeep({},e);if(delete n.plugins,n.sources){var r=n.sources;delete n.sources,this._localPlayer.configure(n),this._localPlayer.setSources(r||{})}else this._localPlayer.configure(n);e.ui&&this._uiWrapper.setConfig(t.ui),e.playlist&&this._playlistManager.configure(e.playlist)},s.ready=function(){return this._localPlayer.ready()},s.load=function(){this._localPlayer.load()},s.play=function(){this._localPlayer.play()},s.pause=function(){this._localPlayer.pause()},s.getView=function(){return this._localPlayer.getView()},s.getVideoElement=function(){return this._localPlayer.getVideoElement()},s.reset=function(e){var t;(void 0===e&&(e=!1),this._reset)||(this._reset=!0,this._firstPlay=!0,this._sourceSelected=null,this._attachEventManager&&this._attachEventManager.removeAll(),this._uiWrapper.reset(),this._resetProviderPluginsConfig(),this._pluginManager.reset(),this._cuepointManager.reset(),this._localPlayer.reset(e),null==(t=this._thumbnailManager)||t.destroy())},s.destroy=function(){var e,t=this.config.ui.targetId;this._reset=!0,this._playbackStart=!1,this._firstPlay=!0,this._uiWrapper.destroy(),this._pluginManager.destroy(),this._cuepointManager.destroy(),this._playlistManager.destroy(),this._localPlayer.destroy(),this._eventManager.destroy(),null==(e=this._thumbnailManager)||e.destroy(),this._viewabilityManager.destroy(),this._remotePlayerManager.destroy(),this._pluginsConfig={};var n=document.getElementById(t);n&&n.parentNode&&l.Utils.Dom.removeChild(n.parentNode,n)},s.isLive=function(){return this._localPlayer.isLive()},s.isOnLiveEdge=function(){return this._localPlayer.isOnLiveEdge()},s.isDvr=function(){return this._localPlayer.isDvr()},s.isUntimedImg=function(){return q(this.sources)&&!("number"==typeof this.config.sources.duration&&this.config.sources.duration>0)},s.isImage=function(){return q(this.sources)},s.seekToLiveEdge=function(){this._localPlayer.seekToLiveEdge()},s.getStartTimeOfDvrWindow=function(){return this._localPlayer.getStartTimeOfDvrWindow()},s.getTracks=function(e){return this._localPlayer.getTracks(e)},s.getActiveTracks=function(){return this._localPlayer.getActiveTracks()},s.selectTrack=function(e){this._localPlayer.selectTrack(e)},s.hideTextTrack=function(){this._localPlayer.hideTextTrack()},s.showTextTrack=function(){this._localPlayer.showTextTrack()},s.enableAdaptiveBitrate=function(){this._localPlayer.enableAdaptiveBitrate()},s.isAdaptiveBitrateEnabled=function(){return this._localPlayer.isAdaptiveBitrateEnabled()},s.setTextDisplaySettings=function(e){this._localPlayer.setTextDisplaySettings(e)},s.isFullscreen=function(){return this._localPlayer.isFullscreen()},s.notifyEnterFullscreen=function(){this._localPlayer.notifyEnterFullscreen()},s.notifyExitFullscreen=function(){this._localPlayer.notifyExitFullscreen()},s.enterFullscreen=function(e){var t=e||this.config.ui.targetId;this._localPlayer.enterFullscreen(t)},s.exitFullscreen=function(){this._localPlayer.exitFullscreen()},s.enterPictureInPicture=function(){this._localPlayer.enterPictureInPicture()},s.exitPictureInPicture=function(){this._localPlayer.exitPictureInPicture()},s.isInPictureInPicture=function(){return this._localPlayer.isInPictureInPicture()},s.isPictureInPictureSupported=function(){return this._localPlayer.isPictureInPictureSupported()},s.getLogLevel=function(e){return this._localPlayer.getLogLevel(e)},s.startCasting=function(e){var t=this;return this.setIsCastInitiator(e,!0),new Promise((function(n,r){t.remotePlayerManager.startCasting(e).then(n).catch((function(){t.setIsCastInitiator(e,!1),r()}))}))},s.setIsCastInitiator=function(e,t){this._remotePlayerManager.setIsCastInitiator(e,t)},s.isCastAvailable=function(e){return this._remotePlayerManager.isCastAvailable(e)},s.getCastSession=function(){return null},s.stopCasting=function(){},s.isCasting=function(){return!1},s.isVr=function(){return this._localPlayer.isVr()},s.toggleVrStereoMode=function(){var e=this._pluginManager.get("vr");e&&"function"==typeof e.toggleVrStereoMode&&e.toggleVrStereoMode()},s.isInVrStereoMode=function(){var e=this._pluginManager.get("vr");return!(!e||"function"!=typeof e.isInStereoMode)&&e.isInStereoMode()},s.setLogLevel=function(e,t){this._localPlayer.setLogLevel(e,t)},s.getThumbnail=function(e){if(!e){if(isNaN(this.currentTime))return null;e=this.currentTime}if(e=this.isLive()?e+this.getStartTimeOfDvrWindow():e,this._thumbnailManager)return this._thumbnailManager.getThumbnail(e)},s._addBindings=function(){var e=this;this._eventManager.listen(this,l.EventType.CHANGE_SOURCE_STARTED,(function(){return e._onChangeSourceStarted()})),this._eventManager.listen(this,l.EventType.CHANGE_SOURCE_ENDED,(function(){return e._onChangeSourceEnded()})),this._eventManager.listen(this,l.EventType.PLAYER_RESET,(function(){return e._onPlayerReset()})),this._eventManager.listen(this,l.EventType.ENDED,(function(){return e._onEnded()})),this._eventManager.listen(this,l.EventType.FIRST_PLAY,(function(){return e._firstPlay=!1})),this._eventManager.listen(this,l.EventType.SOURCE_SELECTED,(function(t){return e._sourceSelected=t.payload.selectedSource[0]})),this._eventManager.listen(this,l.EventType.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this,l.EventType.PLAYBACK_START,(function(){e._playbackStart=!0})),this._eventManager.listen(this,l.AdEventType.AD_AUTOPLAY_FAILED,(function(t){return e._onAdAutoplayFailed(t)})),this._eventManager.listen(this,l.AdEventType.AD_STARTED,(function(){return e._onAdStarted()})),this.config.playback.playAdsWithMSE&&(this._attachEventManager=new l.EventManager,this._eventManager.listen(this,l.AdEventType.AD_LOADED,(function(t){var n=t.payload.ad;n&&n.linear&&1===n.position&&!n.inStream&&e.src?(e._attachEventManager.listenOnce(e,l.AdEventType.AD_BREAK_START,(function(){return e.detachMediaSource()})),e._attachEventManager.listenOnce(e,l.AdEventType.AD_BREAK_END,(function(){return e.attachMediaSource()})),e._attachEventManager.listenOnce(e,l.AdEventType.AD_ERROR,(function(){return e.attachMediaSource()}))):e._attachEventManager.removeAll()}))),this._eventManager.listen(this,l.EventType.ERROR,(function(t){t.payload.severity===l.Error.Severity.CRITICAL&&(e._reset=!1)}))},s._onChangeSourceEnded=function(){l.Utils.Object.getPropertyPath(this.config,"ui.targetId")?this._viewabilityManager.observe(l.Utils.Dom.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this)):r._logger.warn("Cannot observe visibility change without config.ui.targetId")},s._onPlayerReset=function(){this._playbackStart=!1,l.Utils.Object.getPropertyPath(this.config,"ui.targetId")&&this._viewabilityManager.unObserve(l.Utils.Dom.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this))},s._onChangeSourceStarted=function(){this._configureOrLoadPlugins(this._pluginsConfig),this.reset(),this._pluginManager.loadMedia(),this._reset=!1},s._onEnded=function(){var e=this;setTimeout((function(){e._adsController&&!e._adsController.allAdsCompleted?e._eventManager.listenOnce(e._adsController,l.AdEventType.ALL_ADS_COMPLETED,(function(){e.dispatchEvent(new l.FakeEvent(l.EventType.PLAYBACK_ENDED))})):e.dispatchEvent(new l.FakeEvent(l.EventType.PLAYBACK_ENDED))}))},s._onPlaybackEnded=function(){this.config.playback.loop&&(this.currentTime=0,this.play())},s._onAdStarted=function(){this._firstPlay&&(this._localPlayer.posterManager.hide(),this._localPlayer.hideBlackCover())},s._onAdAutoplayFailed=function(e){this._firstPlay&&this.config.playback.autoplay&&(this._localPlayer.posterManager.show(),this.dispatchEvent(new l.FakeEvent(l.EventType.AUTOPLAY_FAILED,e.payload)))},s._configureOrLoadPlugins=function(e){var t=this;void 0===e&&(e={});var n=[],r=[],i=[];Object.keys(e).forEach((function(a){var o=t._pluginManager.get(a);if(o)o.updateConfig(e[a]),e[a]=o.getConfig();else if(t._sourceSelected)delete e[a];else{try{t._pluginManager.load(a,t,e[a])}catch(e){t.dispatchEvent(new l.FakeEvent(l.Error.Code.ERROR,e))}var s=t._pluginManager.get(a);s&&(i.push(s),e[a]=s.getConfig(),"function"==typeof s.getMiddlewareImpl&&("bumper"===s.name?n.push(s.getMiddlewareImpl()):n.unshift(s.getMiddlewareImpl())),"function"==typeof s.getUIComponents&&r.push.apply(r,s.getUIComponents()||[]),"function"==typeof s.getEngineDecorator&&t._localPlayer.registerEngineDecoratorProvider(new l.EngineDecoratorProvider(s)))}})),r.forEach((function(e){return t._uiWrapper.addComponent(e)})),this._pluginReadinessMiddleware||(this._pluginReadinessMiddleware=new Ft(i),this._localPlayer.playbackMiddleware.use(this._pluginReadinessMiddleware)),this._maybeCreateAdsController(),n.forEach((function(e){return t._localPlayer.playbackMiddleware.use(e)})),l.Utils.Object.mergeDeep(this._pluginsConfig,e)},s._maybeCreateAdsController=function(){var e=this;if(!this._adsController){var t=this._controllerProvider.getAdsControllers();t.length&&(this._adsController=new Lt(this,t),this._localPlayer.playbackMiddleware.use(this._adsController.getMiddleware()),this._eventManager.listen(this._adsController,l.AdEventType.ALL_ADS_COMPLETED,(function(t){e.dispatchEvent(t)})))}},s.attachMediaSource=function(){this._localPlayer.attachMediaSource()},s.detachMediaSource=function(){this._localPlayer.detachMediaSource()},s._resetProviderPluginsConfig=function(){this.configure({plugins:this._appPluginConfig}),this._appPluginConfig={}},s._handleVisibilityChange=function(e){this._isVisible=e,this.dispatchEvent(new l.FakeEvent("visibilitychange",{visible:this._isVisible})),this.config.playback.autoplay===l.AutoPlayType.IN_VIEW&&this._isVisible&&!this._playbackStart&&this._localPlayer.play({programmatic:!0}),!0===this.config.playback.autopause&&this._handleAutoPause(e)},s._handleAutoPause=function(e){var t=!this.paused||this._adsController&&this._adsController.isAdPlaying(),n=!this.isInPictureInPicture()&&this._playbackStart&&t;e?this._autoPaused&&(this.paused&&this.play(),this._autoPaused=!1):n&&(this.pause(),this._autoPaused=!0)},s.getService=function(e){return this._serviceProvider.get(e)},s.hasService=function(e){return this._serviceProvider.has(e)},s.registerService=function(e,t){this._serviceProvider.register(e,t)},s.addTextTrack=function(e,t){return this._localPlayer.addTextTrack(e,t)},s.getNativeTextTracks=function(){return this._localPlayer.getNativeTextTracks()},s.getMediaCapabilities=function(){var e,t=(e=on().mark((function e(t){return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",an(t));case 1:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){sn(a,r,i,o,s,"next",e)}function s(e){sn(a,r,i,o,s,"throw",e)}o(void 0)}))});return function(e){return t.apply(this,arguments)}}(),i=r,(a=[{key:"textDisplaySetting",get:function(){return this._localPlayer.textDisplaySetting}},{key:"textStyle",get:function(){return this._localPlayer.textStyle},set:function(e){this._localPlayer.textStyle=e}},{key:"buffered",get:function(){return this._localPlayer.buffered}},{key:"stats",get:function(){return this._localPlayer.stats}},{key:"currentTime",get:function(){return this._localPlayer.currentTime},set:function(e){this._localPlayer.currentTime=e}},{key:"duration",get:function(){return this._localPlayer.duration}},{key:"liveDuration",get:function(){return this._localPlayer.liveDuration}},{key:"normalizedCurrentTime",get:function(){return this.isLive()?this.currentTime-this.getStartTimeOfDvrWindow():this.currentTime},set:function(e){this.isLive()?this.currentTime=e+this.getStartTimeOfDvrWindow():this.currentTime=e}},{key:"normalizedDuration",get:function(){return this.isLive()?this.liveDuration-this.getStartTimeOfDvrWindow():this.duration}},{key:"volume",get:function(){return this._localPlayer.volume},set:function(e){this._localPlayer.volume=e}},{key:"paused",get:function(){return this._localPlayer.paused}},{key:"seeking",get:function(){return this._localPlayer.seeking}},{key:"playsinline",get:function(){return this._localPlayer.playsinline},set:function(e){this._localPlayer.playsinline=e}},{key:"muted",get:function(){return this._localPlayer.muted},set:function(e){this._localPlayer.muted=e}},{key:"src",get:function(){return this._localPlayer.src}},{key:"videoHeight",get:function(){return this._localPlayer.videoHeight}},{key:"videoWidth",get:function(){return this._localPlayer.videoWidth}},{key:"dimensions",get:function(){return this._localPlayer.dimensions},set:function(e){this._localPlayer.dimensions=e}},{key:"poster",get:function(){return this._localPlayer.poster}},{key:"ended",get:function(){return this._localPlayer.ended}},{key:"playbackRate",get:function(){return this._localPlayer.playbackRate},set:function(e){this._localPlayer.playbackRate=e}},{key:"playbackRates",get:function(){return this._localPlayer.playbackRates}},{key:"defaultPlaybackRate",get:function(){return this._localPlayer.defaultPlaybackRate}},{key:"engineType",get:function(){return this._localPlayer.engineType}},{key:"streamType",get:function(){return this._localPlayer.streamType}},{key:"env",get:function(){return this._localPlayer.env}},{key:"selectedSource",get:function(){return this._sourceSelected}},{key:"sources",get:function(){return ln({},this._localPlayer.sources)}},{key:"config",get:function(){return ln({},this._localPlayer.config,{plugins:this._pluginsConfig,sources:this._localPlayer.sources})}},{key:"hasUserInteracted",get:function(){return this._localPlayer.hasUserInteracted}},{key:"loadingMedia",set:function(e){this._localPlayer.loadingMedia=e}},{key:"ads",get:function(){return this._adsController}},{key:"plugins",get:function(){return this._pluginManager.getAll()}},{key:"provider",get:function(){return this._provider}},{key:"ui",get:function(){return this._uiWrapper}},{key:"playlist",get:function(){return this._playlistManager}},{key:"Event",get:function(){return ln({Cast:Le,Core:l.EventType,Playlist:Te,UI:u.EventType},l.EventType,{VISIBILITY_CHANGE:"visibilitychange"})}},{key:"TextStyle",get:function(){return this._localPlayer.TextStyle}},{key:"ViewabilityType",get:function(){return M}},{key:"State",get:function(){return this._localPlayer.State}},{key:"Track",get:function(){return this._localPlayer.Track}},{key:"LogLevelType",get:function(){return this._localPlayer.LogLevelType}},{key:"LogLevel",get:function(){return this._localPlayer.LogLevel}},{key:"AbrMode",get:function(){return this._localPlayer.AbrMode}},{key:"MediaType",get:function(){return this._localPlayer.MediaType}},{key:"StreamType",get:function(){return this._localPlayer.StreamType}},{key:"EngineType",get:function(){return this._localPlayer.EngineType}},{key:"Error",get:function(){return this._localPlayer.Error}},{key:"crossOrigin",get:function(){return this._localPlayer.crossOrigin},set:function(e){this._localPlayer.crossOrigin=e}},{key:"isVisible",get:function(){return this._isVisible}},{key:"viewabilityManager",get:function(){return this._viewabilityManager}},{key:"cuePointManager",get:function(){return this._cuepointManager}},{key:"remotePlayerManager",get:function(){return this._remotePlayerManager}}])&&un(i.prototype,a),o&&un(i,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(l.FakeEventTarget);dn(hn,"_logger",Object(l.getLogger)("KalturaPlayer"+l.Utils.Generator.uniqueId(5)));var gn={};function yn(){return gn}function vn(e){return gn[e]?gn[e]:null}var mn=["_remotePlayer","_listeners","_uiWrapper"],bn={get:function(e,t){if("destroy"===t){var n=e.config.targetId;delete gn[n]}return t in l.FakeEventTarget.prototype||mn.includes(t)?e[t]:e._remotePlayer&&t in e._remotePlayer?e._remotePlayer[t]:e[t]},set:function(e,t,n){return e._remotePlayer&&!mn.includes(t)?t in e._remotePlayer&&(e._remotePlayer[t]=n):e[t]=n,!0}};function _n(e){!function(e){!1!==l.Utils.Object.getPropertyPath(e,"log.playerVersion")&&(Object(l.setLogLevel)(l.LogLevel.INFO),Object(l.getLogger)().log("%c @playkit-js/kaltura-player-js 3.14.3-canary.0-9dfd3f3","color: #ff98f9; font-size: large"),Object(l.getLogger)().log("%c For more details see https://github.com/kaltura/kaltura-player-js","color: #ff98f9;"))}(e),B(e=z(e));var t=G(e);!function(e){var t,n=e.provider,r=null==(t=K())?void 0:t.productVersion;if(!n.partnerId||2504201===n.partnerId){var i={url:"https://analytics.kaltura.com/api_v3/index.php?service=analytics&action=trackEvent&apiVersion=3.3.0&format=1&eventType=1&partnerId=2504201&entryId=1_3bwzbc9o&&eventIndex=1&position=0",mimetype:""};i.url=function(e,t){return t&&(e+="&clientVer="+t),e}(i.url,r),i.url=P(i.url),i.url=R(i.url,r),i.url=x(i.url,l.Utils.Generator.guid()+":"+l.Utils.Generator.guid()),navigator.sendBeacon&&navigator.sendBeacon(i.url)}}(t),V(t),function(e){var t=parseFloat(H("kalturaStartTime"));isNaN(t)||l.Utils.Object.createPropertyPath(e,"sources.startTime",t)}(t),j.forEach((function(e){return Object(l.getLogger)("KalturaPlayer:Setup")[e.level](e.msg)})),function(e){!e.disableUserCache&&k.isLocalStorageAvailable()&&k.hasStorage()&&l.Utils.Object.mergeDeep(e,k.getStorageConfig())}(t);var n=function(e){var t=new hn(e),n=new Proxy(t,bn);return gn[e.targetId]=n,n}(t);return function(e){if(!e.config.disableUserCache&&k.isLocalStorageAvailable()){var t=k.getPlayerTextStyle();t&&(e.textStyle=l.Utils.Object.mergeDeep(new l.TextStyle,t))}}(n),function(e){k.isLocalStorageAvailable()&&k.attach(e)}(n),function(e,t){e.cast&&t.remotePlayerManager.load(e.cast,t)}(t,n),function(e){if(l.Env.isIOS||l.Env.isIPadOS){var t=function t(){e.removeEventListener(e.Event.UI.UI_CLICKED,t),Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!0})};e.addEventListener(e.Event.SOURCE_SELECTED,(function n(){e.removeEventListener(e.Event.SOURCE_SELECTED,n),e.addEventListener(e.Event.UI.UI_CLICKED,t)}))}}(n),n}var En=function(){function e(){}return e.toCastTextStyle=function(t){if(window.chrome&&window.chrome.cast){var n=new window.chrome.cast.media.TextTrackStyle;return n.fontFamily=t.fontFamily,n.backgroundColor=e.rgbToHex(t.backgroundColor),n.foregroundColor=e.rgbToHex(t.fontColor),n.fontScale=Number.parseFloat(t.fontSize)/100,n}return{}},e.toPlayerTextStyle=function(t){var n=new l.TextStyle;return n.fontFamily=t.fontFamily,n.fontSize=100*t.fontScale+"%",n.fontColor=e.hexToRGB(t.foregroundColor),n.backgroundColor=e.hexToRGB(t.backgroundColor),n},e.rgbToHex=function(e){var t="#"+("0"+parseInt(e[0],10).toString(16)).slice(-2)+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2);if(e[3]){var n=e[3];n=Math.round(100*n)/100,t+=(Math.round(255*n)+65536).toString(16).substr(-2).toUpperCase()}else t+="FF";return t.toUpperCase()},e.hexToRGB=function(e){for(var t=[],n=(e=e.slice(1)).match(/.{1,2}/g),r=0;r<3;r++){var i=n&&n[r];i&&t.push(parseInt(i,16))}return t},e}();function kn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Tn(e,t)}function Tn(e,t){return(Tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var An={ACTION:"action",EVENT:"event"},wn=function(e){this.type=e},Sn=function(e){function t(t,n){var r;return(r=e.call(this,An.EVENT)||this).event=t,r.payload=n,r}return kn(t,e),t}(wn),Cn=function(e){function t(t,n){var r;return(r=e.call(this,An.ACTION)||this).action=t,r.args=n,r}return kn(t,e),t}(wn),xn={registerRemotePlayer:mt.register,PlayerSnapshot:Me,RemoteControl:it,RemoteSession:Be,BaseRemotePlayer:ze,RemoteConnectedPayload:tt,RemoteDisconnectedPayload:nt,RemoteAvailablePayload:rt,RemotePlayerUI:qe,CastEventType:Le,RemotePlayerType:{CHROMECAST:"chromecast"},TextStyleConverter:En,CustomEventMessage:Sn,CustomActionMessage:Cn,CustomMessageType:An,CustomActionType:{SKIP_AD:"skipAd"},CustomMessage:wn},In={PlaylistEventType:Te},Pn="@playkit-js/kaltura-player-js",Dn="ovp",Rn="3.14.3-canary.0-9dfd3f3";r.a.installAll(),l.Ad=At,l.AdBreak=Et,l.BasePlugin=Z,l.registerPlugin=te}]); +function Av(){}function wv(){mv?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(mv=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=Sv):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function Sv(e,t){var n,r=this;return R((function(i){return 1==i.g?(console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),_(i,mv.call(r,e,t),2)):Nv(n=i.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=mv,i.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=Cv,i.return(Cv.call(r,e,t)))}))}function Cv(e,t){var n,r,i,a,o,s,l,c,p,d,f=this;return R((function(h){if(1==h.g){for(console.assert(f==navigator,'bad "this" for requestMediaKeySystemAccess'),n=Mv(e),r=[],i=u(t),a=i.next();!a.done;a=i.next())o=a.value,s=xv(o.videoCapabilities,n),l=xv(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!l.length||((c=Object.assign({},o)).videoCapabilities=s,c.audioCapabilities=l,r.push(c));if(!r.length)throw(p=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",p.code=DOMException.NOT_SUPPORTED_ERR,p;return _(h,mv.call(f,e,r),2)}return d=h.h,h.return(new Lv(d,n))}))}function xv(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function Iv(){}function Pv(){bv?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(bv=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Dv):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function Dv(e){var t,n,r,i=this;return R((function(a){switch(a.g){case 1:return console.assert(i==navigator.mediaCapabilities,'bad "this" for decodingInfo'),_(a,bv.call(i,e),2);case 2:if(t=a.h,!e.keySystemConfiguration)return a.return(t);if((n=t.keySystemAccess)&&Nv(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=bv,a.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Rv,n){a.A(3);break}return r=t,_(a,Ov(e),4);case 4:return r.keySystemAccess=a.h,a.return(t);case 3:return a.return(Rv.call(i,e))}}))}function Rv(e){var t,n,r,i,a,o,s,l,u=this;return R((function(c){switch(c.g){case 1:return console.assert(u==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t=null,e.keySystemConfiguration&&(n=e.keySystemConfiguration,r=n.keySystem,i=n.audio&&n.audio.encryptionScheme,a=n.video&&n.video.encryptionScheme,t=Mv(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},i&&i!=t||a&&a!=t)?c.return(o):_(c,bv.call(u,e),2);case 2:if((s=c.h).keySystemAccess){s.keySystemAccess=new Lv(s.keySystemAccess,t),c.A(3);break}if(!e.keySystemConfiguration){c.A(3);break}return l=s,_(c,Ov(e),5);case 5:l.keySystemAccess=c.h;case 3:return c.return(s)}}))}function Ov(e){var t,n;return R((function(r){if(1==r.g){var i=e.keySystemConfiguration,a=[],o=[];return i.audio&&a.push({robustness:i.audio.robustness||"",contentType:e.audio.contentType}),i.video&&o.push({robustness:i.video.robustness||"",contentType:e.video.contentType}),i={initDataTypes:i.initDataType?[i.initDataType]:[],distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes},a.length&&(i.audioCapabilities=a),o.length&&(i.videoCapabilities=o),t=i,_(r,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[t]),2)}return n=r.h,r.return(n)}))}function Lv(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function Mv(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.chromecast")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function Nv(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function Uv(){}function Fv(){wv(),Pv()}Jt["text/x-ssa"]=function(){return new hv},B("EmeEncryptionSchemePolyfill",Av),Av.install=wv,B("McEncryptionSchemePolyfill",Iv),Iv.install=Pv,Lv.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=u(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=u(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},Lv.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},B("EncryptionSchemePolyfills",Uv),Uv.install=Fv,void 0!==n&&n.exports&&(n.exports=Uv)}.call(r,n,n,void 0),r.shaka)t[i]=r.shaka[i]}()}).call(this,n(92))},function(e,t){!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=function(e){for(var t=window.document,n=i(t);n;)n=i(t=n.ownerDocument);return t}(),t=[],n=null,r=null;o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.USE_MUTATION_OBSERVER=!0,o._setupCrossOriginUpdater=function(){return n||(n=function(e,n){r=e&&n?p(e,n):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach((function(e){e._checkForIntersections()}))}),n},o._resetCrossOriginUpdater=function(){n=null,r=null},o.prototype.observe=function(e){if(!this._observationTargets.some((function(t){return t.element==e}))){if(!e||1!=e.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},o.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter((function(t){return t.element!=e})),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},o.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter((function(e,t,n){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return e!==n[t-1]}))},o.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map((function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}}));return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},o.prototype._monitorIntersections=function(t){var n=t.defaultView;if(n&&-1==this._monitoringDocuments.indexOf(t)){var r=this._checkForIntersections,a=null,o=null;this.POLL_INTERVAL?a=n.setInterval(r,this.POLL_INTERVAL):(s(n,"resize",r,!0),s(t,"scroll",r,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in n&&(o=new n.MutationObserver(r)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push((function(){var e=t.defaultView;e&&(a&&e.clearInterval(a),l(e,"resize",r,!0)),l(t,"scroll",r,!0),o&&o.disconnect()}));var u=this.root&&(this.root.ownerDocument||this.root)||e;if(t!=u){var c=i(t);c&&this._monitorIntersections(c.ownerDocument)}}},o.prototype._unmonitorIntersections=function(t){var n=this._monitoringDocuments.indexOf(t);if(-1!=n){var r=this.root&&(this.root.ownerDocument||this.root)||e;if(!this._observationTargets.some((function(e){var n=e.element.ownerDocument;if(n==t)return!0;for(;n&&n!=r;){var a=i(n);if((n=a&&a.ownerDocument)==t)return!0}return!1}))){var a=this._monitoringUnsubscribes[n];if(this._monitoringDocuments.splice(n,1),this._monitoringUnsubscribes.splice(n,1),a(),t!=r){var o=i(t);o&&this._unmonitorIntersections(o.ownerDocument)}}}},o.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t<e.length;t++)e[t]()},o.prototype._checkForIntersections=function(){if(this.root||!n||r){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(r){var i=r.element,o=u(i),s=this._rootContainsTarget(i),l=r.entry,c=e&&s&&this._computeTargetAndRootIntersection(i,o,t),p=null;this._rootContainsTarget(i)?n&&!this.root||(p=t):p={top:0,bottom:0,left:0,right:0,width:0,height:0};var d=r.entry=new a({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:o,rootBounds:p,intersectionRect:c});l?e&&s?this._hasCrossedThreshold(l,d)&&this._queuedEntries.push(d):l&&l.isIntersecting&&this._queuedEntries.push(d):this._queuedEntries.push(d)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},o.prototype._computeTargetAndRootIntersection=function(t,i,a){if("none"!=window.getComputedStyle(t).display){for(var o,s,l,c,d,h,g,y,v=i,m=f(t),b=!1;!b&&m;){var _=null,E=1==m.nodeType?window.getComputedStyle(m):{};if("none"==E.display)return null;if(m==this.root||9==m.nodeType)if(b=!0,m==this.root||m==e)n&&!this.root?!r||0==r.width&&0==r.height?(m=null,_=null,v=null):_=r:_=a;else{var k=f(m),T=k&&u(k),A=k&&this._computeTargetAndRootIntersection(k,T,a);T&&A?(m=k,_=p(T,A)):(m=null,v=null)}else{var w=m.ownerDocument;m!=w.body&&m!=w.documentElement&&"visible"!=E.overflow&&(_=u(m))}if(_&&(o=_,s=v,l=void 0,c=void 0,d=void 0,h=void 0,g=void 0,y=void 0,l=Math.max(o.top,s.top),c=Math.min(o.bottom,s.bottom),d=Math.max(o.left,s.left),h=Math.min(o.right,s.right),y=c-l,v=(g=h-d)>=0&&y>=0&&{top:l,bottom:c,left:d,right:h,width:g,height:y}||null),!v)break;m=m&&f(m)}return v}},o.prototype._getRootRect=function(){var t;if(this.root&&!h(this.root))t=u(this.root);else{var n=h(this.root)?this.root:e,r=n.documentElement,i=n.body;t={top:0,left:0,right:r.clientWidth||i.clientWidth,width:r.clientWidth||i.clientWidth,bottom:r.clientHeight||i.clientHeight,height:r.clientHeight||i.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map((function(t,n){return"px"==t.unit?t.value:t.value*(n%2?e.width:e.height)/100})),n={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(e,t){var n=e&&e.isIntersecting?e.intersectionRatio||0:-1,r=t.isIntersecting?t.intersectionRatio||0:-1;if(n!==r)for(var i=0;i<this.thresholds.length;i++){var a=this.thresholds[i];if(a==n||a==r||a<n!=a<r)return!0}},o.prototype._rootIsInDom=function(){return!this.root||d(e,this.root)},o.prototype._rootContainsTarget=function(t){var n=this.root&&(this.root.ownerDocument||this.root)||e;return d(n,t)&&(!this.root||n==t.ownerDocument)},o.prototype._registerInstance=function(){t.indexOf(this)<0&&t.push(this)},o.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=o,window.IntersectionObserverEntry=a}function i(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(e){return null}}function a(e){this.time=e.time,this.target=e.target,this.rootBounds=c(e.rootBounds),this.boundingClientRect=c(e.boundingClientRect),this.intersectionRect=c(e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,n=t.width*t.height,r=this.intersectionRect,i=r.width*r.height;this.intersectionRatio=n?Number((i/n).toFixed(4)):this.isIntersecting?1:0}function o(e,t){var n,r,i,a=t||{};if("function"!=typeof e)throw new Error("callback must be a function");if(a.root&&1!=a.root.nodeType&&9!=a.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(n=this._checkForIntersections.bind(this),r=this.THROTTLE_TIMEOUT,i=null,function(){i||(i=setTimeout((function(){n(),i=null}),r))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(a.rootMargin),this.thresholds=this._initThresholds(a.threshold),this.root=a.root||null,this.rootMargin=this._rootMarginValues.map((function(e){return e.value+e.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function s(e,t,n,r){"function"==typeof e.addEventListener?e.addEventListener(t,n,r||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,n)}function l(e,t,n,r){"function"==typeof e.removeEventListener?e.removeEventListener(t,n,r||!1):"function"==typeof e.detachEvent&&e.detachEvent("on"+t,n)}function u(e){var t;try{t=e.getBoundingClientRect()}catch(e){}return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function c(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function p(e,t){var n=t.top-e.top,r=t.left-e.left;return{top:n,left:r,height:t.height,width:t.width,bottom:n+t.height,right:r+t.width}}function d(e,t){for(var n=t;n;){if(n==e)return!0;n=f(n)}return!1}function f(t){var n=t.parentNode;return 9==t.nodeType&&t!=e?i(t):(n&&n.assignedSlot&&(n=n.assignedSlot.parentNode),n&&11==n.nodeType&&n.host?n.host:n)}function h(e){return e&&9===e.nodeType}}()},function(e,t,n){var r=n(321),i=n(322);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[e.i,i,""]]);var a={insert:"head",singleton:!1};r(i,a);e.exports=i.locals||{}},function(e,t,n){"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},a=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),o=[];function s(e){for(var t=-1,n=0;n<o.length;n++)if(o[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],i=0;i<e.length;i++){var a=e[i],l=t.base?a[0]+t.base:a[0],u=n[l]||0,c="".concat(l," ").concat(u);n[l]=u+1;var p=s(c),d={css:a[1],media:a[2],sourceMap:a[3]};-1!==p?(o[p].references++,o[p].updater(d)):o.push({identifier:c,updater:y(d,t),references:1}),r.push(c)}return r}function u(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var o=a(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var c,p=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function d(e,t,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=p(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function f(e,t,n){var r=n.css,i=n.media,a=n.sourceMap;if(i?e.setAttribute("media",i):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var h=null,g=0;function y(e,t){var n,r,i;if(t.singleton){var a=g++;n=h||(h=u(t)),r=d.bind(null,n,a,!1),i=d.bind(null,n,a,!0)}else n=u(t),r=f.bind(null,n,t),i=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=i());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var i=s(n[r]);o[i].references--}for(var a=l(e,t),u=0;u<n.length;u++){var c=s(n[u]);0===o[c].references&&(o[c].updater(),o.splice(c,1))}n=a}}}},function(e,t,n){(t=n(323)(!1)).push([e.i,".kaltura-player-container {\n width: 100%;\n height: 100%;\n position: relative;\n background-color: #000;\n outline: none;\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n}\n",""]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(o=r,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),a=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(a).concat([i]).join("\n")}var o,s,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var l=[].concat(e[s]);r&&i[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"getPlayers",(function(){return yn})),n.d(t,"getPlayer",(function(){return vn})),n.d(t,"core",(function(){return l})),n.d(t,"ui",(function(){return u})),n.d(t,"providers",(function(){return c})),n.d(t,"setup",(function(){return _n})),n.d(t,"cast",(function(){return xn})),n.d(t,"playlist",(function(){return In})),n.d(t,"Ad",(function(){return At})),n.d(t,"AdBreak",(function(){return Et})),n.d(t,"BasePlugin",(function(){return Z})),n.d(t,"registerPlugin",(function(){return te})),n.d(t,"PLAYER_TYPE",(function(){return Dn})),n.d(t,"VERSION",(function(){return Rn})),n.d(t,"PLAYER_NAME",(function(){return Pn}));var r=n(46);n(312);var i,a,o,s=function(){function e(){}return e.install=function(){[Element.prototype,Document.prototype,DocumentFragment.prototype].forEach((function(e){Object.prototype.hasOwnProperty.call(e,"prepend")||Object.defineProperty(e,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var e=Array.prototype.slice.call(arguments),t=document.createDocumentFragment();e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(String(e)))})),this.insertBefore(t,this.firstChild)}})}))},e}();i=s,o="prepend",(a=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(a="id"))in i?Object.defineProperty(i,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):i[a]=o,r.a.register(s);n(313);var l=n(0),u=n(14),c=n(63);n(315),n(317);function p(e,t){var n=function(e){var t=document.createElement("a");return t.href=e,t.hostname},r=n(t),i=!1,a="",o="";return e&&(e.flavors&&Array.isArray(e.flavors)?(a=(i=1===e.flavors.length)&&n(e.flavors[0].url),o=e.flavors[0].url):e.result&&(i=!0,a=n(e.result.url),o=e.result.url)),i&&r!==a?o:t}function d(e,t){void 0===t&&(t={});var n={};if(t.sources&&t.sources.type===l.MediaType.LIVE&&("IE"===l.Env.browser.name||"Chromecast"===l.Env.device.model)){var r=l.Utils.Object.getPropertyPath(e,"sources.options.forceRedirectExternalStreams"),i=l.Utils.Object.getPropertyPath(t,"sources.options.forceRedirectExternalStreams");"boolean"!=typeof r&&"boolean"!=typeof i&&l.Utils.Object.mergeDeep(n,{sources:{options:{forceRedirectExternalStreams:!0}}})}return l.Utils.Object.mergeDeep(n,function(e,t){void 0===t&&(t={});var n={},r=l.Utils.Object.getPropertyPath(e,"sources.options.redirectExternalStreamsHandler"),i=l.Utils.Object.getPropertyPath(t,"sources.options.redirectExternalStreamsHandler");return"function"!=typeof r&&"function"!=typeof i&&l.Utils.Object.mergeDeep(n,{sources:{options:{redirectExternalStreamsHandler:p}}}),n}(e,t))}var f="Must provide initial providers config",h="Must provide target id",g="Must provide DOM element with id of: ",y="The target id provided is already in use. Id: ";function v(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var b="@playkit-js/kaltura-player-js_",_=function(){function e(){}var t,n,r;return e.isLocalStorageAvailable=function(){if("undefined"==typeof Storage)return!1;try{return localStorage.setItem("test","test"),localStorage.removeItem("test"),!0}catch(e){return!1}},e.setItem=function(t,n){e._validateKey(t);try{e._logger.debug("Sets item for key: "+t,n),localStorage.setItem(b+t,n)}catch(t){e._isQuotaExceeded(t)?e._logger.error("Quota exceeded: "+t.message):e._logger.error(t.message)}},e.getItem=function(t){e._validateKey(t);var n=null;try{return"string"==typeof(n=localStorage.getItem(b+t))?JSON.parse(n):null}catch(e){return n}},e._isQuotaExceeded=function(e){var t=!1;if(e)if(e.code)switch(e.code){case 22:t=!0;break;case 1014:"NS_ERROR_DOM_QUOTA_REACHED"===e.name&&(t=!0)}else-2147024882===e.number&&(t=!0);return t},e._validateKey=function(e){if("string"!=typeof e||0===e.length)throw new Error("Invalid key")},t=e,r=[{key:"size",get:function(){return Object.keys(localStorage).filter((function(e){return e.startsWith(b)})).length}}],(n=null)&&v(t.prototype,n),r&&v(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function E(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(_,"_logger",Object(l.getLogger)("StorageWrapper"));var k=function(){function e(){}return e.isLocalStorageAvailable=function(){return _.isLocalStorageAvailable()},e.attach=function(t){e._logger.debug("Attach local storage");var n=new l.EventManager;n.listen(t,t.Event.UI.USER_CLICKED_MUTE,(function(){t.isCasting()||_.setItem(e.StorageKeys.MUTED,t.muted)})),n.listen(t,t.Event.UI.USER_CLICKED_UNMUTE,(function(){t.isCasting()||_.setItem(e.StorageKeys.MUTED,t.muted)})),n.listen(t,t.Event.UI.USER_CHANGED_VOLUME,(function(){t.isCasting()||(t.volume>0?_.setItem(e.StorageKeys.MUTED,!1):_.setItem(e.StorageKeys.MUTED,!0),_.setItem(e.StorageKeys.VOLUME,t.volume))})),n.listen(t,t.Event.UI.USER_SELECTED_AUDIO_TRACK,(function(t){var n=t.payload.audioTrack;_.setItem(e.StorageKeys.AUDIO_LANG,n.language)})),n.listen(t,t.Event.UI.USER_SELECTED_CAPTION_TRACK,(function(t){var n=t.payload.captionTrack;_.setItem(e.StorageKeys.TEXT_LANG,n.language)}));var r=function(){n.listenOnce(t,t.Event.TEXT_TRACK_CHANGED,(function(t){var n=t.payload.selectedTextTrack;_.setItem(e.StorageKeys.TEXT_LANG,n.language)}))};n.listen(t,t.Event.UI.USER_SHOWED_CAPTIONS,r),n.listen(t,t.Event.UI.USER_HID_CAPTIONS,r),n.listen(t,t.Event.UI.USER_SELECTED_CAPTIONS_STYLE,(function(t){try{var n=JSON.stringify(t.payload.captionsStyle);_.setItem(e.StorageKeys.TEXT_STYLE,n)}catch(t){e._logger.error(t.message)}})),n.listen(t,t.Event.PLAYER_DESTROY,(function(){return n.destroy()}))},e.getPlayerTextStyle=function(){return _.getItem(e.StorageKeys.TEXT_STYLE)},e.hasStorage=function(){var t=_.size,n=0!==t;return n?e._logger.debug("Storage found with size of ",t):e._logger.debug("No storage found"),n},e.getStorageConfig=function(){var t=e._getExistingValues(),n=e._buildStorageConfig(t);return e._logger.debug("Gets storage config",n),n},e._getExistingValues=function(){var t={};return Object.keys(e.StorageKeys).forEach((function(n){var r=e.StorageKeys[n],i=_.getItem(r);null!=i&&(t[r]=i)})),t},e._buildStorageConfig=function(e){var t=l.Utils.Object.mergeDeep({},e);return delete t.textStyle,{playback:t}},e}();E(k,"StorageKeys",{MUTED:"muted",VOLUME:"volume",AUDIO_LANG:"audioLanguage",TEXT_LANG:"textLanguage",TEXT_STYLE:"textStyle"}),E(k,"_logger",Object(l.getLogger)("StorageManager"));var T="kaltura.com",A="custom_data=",w="signature=";function S(e,t){e.config.session&&e.config.session.id?function(e,t){var n=/:((?:[a-z0-9]|-)*)/i.exec(e.config.session.id);n&&n[1]&&C(t,e.config.session.id.replace(n[1],l.Utils.Generator.guid()))}(e,t):function(e){var t=l.Utils.Generator.guid(),n=l.Utils.Generator.guid();C(e,t+":"+n)}(t)}function C(e,t){e.session=e.session||{},e.session.id=t}function x(e,t,n){if(void 0===n&&(n="playSessionId="),t){var r=new RegExp(n+"((?:[a-z0-9]|-)*:(?:[a-z0-9]|-)*)","i").exec(e);r&&r[1]?e=e.replace(r[1],t):e+=D(e)+n+t}return e}function I(){var e;try{e=window.parent.document.URL}catch(t){e=document.referrer}return e}function P(e){if(-1===e.indexOf("referrer=")){var t=btoa(I().substr(0,1e3));e+=D(e)+"referrer="+t}return e}function D(e){return-1===e.indexOf("?")?"?":"&"}function R(e,t){return-1===e.indexOf("clientTag=html5:v")&&(e+=D(e)+"clientTag=html5:v"+(t||"3.14.3-canary.0-99a98cb")),e}function O(e,t){var n;S(e,t);var r=t.sources,i=t.session&&t.session.id,a=null==(n=K())?void 0:n.productVersion;Object.values(l.StreamType).forEach((function(e){r[e]&&r[e].forEach((function(e){"string"==typeof e.url&&e.url.toLowerCase().indexOf("playmanifest/")>-1&&!e.localSource&&(e.url=x(e.url,i),e.url=P(e.url),e.url=R(e.url,a)),e.drmData&&e.drmData.length&&e.drmData.forEach((function(e){"string"==typeof e.licenseUrl&&[T,A,w].every((function(t){return e.licenseUrl.includes(t)}))&&(e.licenseUrl=x(e.licenseUrl,i,"sessionId="),e.licenseUrl=R(e.licenseUrl,a),e.licenseUrl=P(e.licenseUrl),e.licenseUrl=function(e,t){var n=l.Utils.Object.getPropertyPath(t,"provider.uiConfId");return-1===e.indexOf("uiConfId=")&&"number"==typeof n&&(e+=D(e)+"uiConfId="+n),e}(e.licenseUrl,t))}))}))}))}n(319);var L=function(){function e(e){void 0===e&&(e={}),e.observedThresholds=e.observedThresholds||U,e.playerThreshold="number"==typeof e.playerThreshold?e.playerThreshold:F,this._config=e,this._eventManager=new l.EventManager,this._targetsObserved=new l.Utils.MultiMap;var t={threshold:e.observedThresholds.map((function(e){return e/100}))};this._observer=new window.IntersectionObserver(this._intersectionChangedHandler.bind(this),t),this._initTabVisibility()}var t=e.prototype;return t._intersectionChangedHandler=function(e){var t=this;e.forEach((function(e){t._targetsObserved.get(e.target).forEach((function(t){var n=e.intersectionRatio>=t.threshold;t.lastIntersectionRatio=e.intersectionRatio,n!==t.lastVisible&&(t.lastVisible=n,t.listener(n,M.VIEWPORT))}))}))},t._handleTabVisibilityChange=function(){var e=this;this._isTabVisible=!document[this._visibilityTabHiddenAttr],this._targetsObserved.getAll().forEach((function(t){t.lastVisible&&t.listener(e._isTabVisible,M.TAB)}))},t._initTabVisibility=function(){void 0!==document.hidden?(this._visibilityTabHiddenAttr="hidden",this._visibilityTabChangeEventName="visibilitychange"):void 0!==document.msHidden?(this._visibilityTabHiddenAttr="msHidden",this._visibilityTabChangeEventName="msvisibilitychange"):void 0!==document.webkitHidden&&(this._visibilityTabHiddenAttr="webkitHidden",this._visibilityTabChangeEventName="webkitvisibilitychange"),this._visibilityTabHiddenAttr&&this._visibilityTabChangeEventName&&(this._eventManager.listen(document,this._visibilityTabChangeEventName,this._handleTabVisibilityChange.bind(this)),this._isTabVisible=!document[this._visibilityTabHiddenAttr])},t.observe=function(e,t,n){if(this._observer){var r="number"==typeof n?n:this._config.playerThreshold,i=new N(r/100,t);if(this._targetsObserved.has(e)){var a=this._targetsObserved.get(e)[0].lastIntersectionRatio;void 0!==a&&(i.lastIntersectionRatio=a,i.listener(this._isTabVisible&&a>=i.threshold,M.VIEWPORT))}else this._observer.observe(e);this._targetsObserved.push(e,i)}},t.unObserve=function(e,t){this._observer&&(this._targetsObserved.remove(e,t),this._targetsObserved.has(e)||this._observer.unobserve(e))},t.destroy=function(){this._observer&&(this._eventManager.destroy(),this._observer.disconnect(),this._targetsObserved.clear())},e}(),M={VIEWPORT:"viewport",TAB:"tab"},N=function(e,t){this.threshold=e,this.listener=t},U=[0,10,20,30,40,50,60,70,80,90,100],F=50,j=[];function B(e){if(!e)throw new Error(f);!function(e){if(!e)throw new Error(h);var t=document.getElementById(e);if(!t)throw new Error(g+e);if(t.getElementsByClassName("kaltura-player-container").length>0)throw new Error(y+e)}(e.targetId)}function V(e){l.Utils.Object.getPropertyPath(e,"ui.log")||l.Utils.Object.createPropertyPath(e,"ui.log",{}),l.Utils.Object.getPropertyPath(e,"provider.log")||l.Utils.Object.createPropertyPath(e,"provider.log",{}),l.Utils.Object.getPropertyPath(e,"log")||l.Utils.Object.createPropertyPath(e,"log",{}),e.log&&"function"==typeof e.log.handler&&(Object(l.setLogHandler)(e.log.handler),e.ui.log.handler=e.provider.log.handler=e.log.handler);var t=l.LogLevel.ERROR;!e.log||!0!==window.DEBUG_KALTURA_PLAYER&&""!==H("debugKalturaPlayer")?e.log&&e.log.level&&l.LogLevel[e.log.level]&&(t=l.LogLevel[e.log.level]):(t=l.LogLevel.DEBUG,e.log.level=l.LogLevel.DEBUG.name),e.ui.log.level=e.provider.log.level=t.name,Object(l.setLogLevel)(t)}function H(e){var t;window.URLSearchParams?t=new URLSearchParams(window.location.search).get(e):t=function(e){e=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var t=new RegExp("[\\?&]"+e+"=([^&#]*)").exec(location.search),n=location.search.indexOf(e)>-1;return null===t?n?"":null:decodeURIComponent(t[1].replace(/\+/g," "))}(e);return t}function K(){return window.__kalturaplayerdata||{}}function G(e){var t=function(e){var t=document.createElement("div");t.id=l.Utils.Generator.uniqueId(5),t.className="kaltura-player-container",t.setAttribute("tabindex","-1");var n=document.getElementById(e);return n&&t&&n.appendChild(t),t.id}(e.targetId),n={targetId:e.targetId,provider:{partnerId:e.provider.partnerId},ui:{targetId:t},plugins:{},advertising:{adBreaks:[]},viewability:{observedThresholds:U,playerThreshold:F}};if(l.Utils.Object.mergeDeep(n,e),!e.provider.ignoreServerConfig){var r=l.Utils.Object.copyDeep(K());delete r.productVersion,n=l.Utils.Object.mergeDeep({},z(r),n)}return function(e){if(l.Env.isMacOS&&l.Env.isSafari||l.Env.isIOS){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.preferNative.hls")&&l.Utils.Object.mergeDeep(e,{playback:{preferNative:{hls:!0}}})}}(n),function(e){if(l.Env.isMacOS&&l.Env.isSafari||l.Env.isIOS){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"text.useNativeTextTrack")&&l.Utils.Object.mergeDeep(e,{text:{useNativeTextTrack:!0}})}}(n),function(e){var t=l.Utils.Object.getPropertyPath(e,"plugins.kava");t||(t=l.Utils.Object.mergeDeep(e,{plugins:{kava:{}}}))}(n),function(e){if(l.Env.isSmartTV){if(Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!0}),function(e){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.playAdsWithMSE")&&(e=l.Utils.Object.createPropertyPath(e,"playback.playAdsWithMSE",!0));var t=l.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload"),n=l.Utils.Object.getPropertyPath(e,"plugins.bumper.disableMediaPreload");e.plugins&&e.plugins.ima&&"boolean"!=typeof t&&(e=l.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0));e.plugins&&e.plugins.bumper&&"boolean"!=typeof n&&(e=l.Utils.Object.createPropertyPath(e,"plugins.bumper.disableMediaPreload",!0))}(e),function(e){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount")&&l.Env.isSafari&&(e=l.Utils.Object.createPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount",2))}(e),e.plugins&&e.plugins.ima){var t=l.Utils.Object.getPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds"),n=l.Utils.Object.getPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected");"boolean"!=typeof t&&(e=l.Utils.Object.createPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds",!0)),"boolean"!=typeof n&&(e=l.Utils.Object.createPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected",!0))}if(e.plugins&&e.plugins.youbora)"number"!=typeof l.Utils.Object.getPropertyPath(e,"plugins.youbora.playheadMonitorInterval")&&(e=l.Utils.Object.createPropertyPath(e,"plugins.youbora.playheadMonitorInterval",2e3));"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"streaming.lowLatencyMode")&&(e=l.Utils.Object.createPropertyPath(e,"streaming.lowLatencyMode",!1))}}(n),function(e){if("Edge"===l.Env.browser.name){l.Utils.Object.getPropertyPath(e,"drm.keySystem")||(e="Windows"===l.Env.os.name?l.Utils.Object.createPropertyPath(e,"drm.keySystem",l.DrmScheme.PLAYREADY):l.Utils.Object.createPropertyPath(e,"drm.keySystem",l.DrmScheme.WIDEVINE))}}(n),function(e){if(l.Env.isIOS&&e.plugins&&e.plugins.ima&&!e.plugins.ima.disable){var t=l.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=l.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload");!1===t&&"boolean"!=typeof n&&l.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0)}}(n),function(e){if(e.plugins&&e.plugins.imadai&&!e.plugins.imadai.disable){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.autoStartLoad")&&l.Utils.Object.mergeDeep(e,{playback:{options:{html5:{hls:{autoStartLoad:!1}}}}})}}(n),function(e){var t=l.Utils.Object.getPropertyPath(e,"plugins.bumper"),n=l.Utils.Object.getPropertyPath(e,"plugins.imadai");if(t){var r={};"boolean"!=typeof t.playOnMainVideoTag&&(l.Env.isSmartTV||l.Env.isIOS&&e.playback&&!1===e.playback.playsinline)&&(r.playOnMainVideoTag=!0),n&&!n.disable&&(Array.isArray(t.position)||(r.position=[0]),"boolean"!=typeof t.disableMediaPreload&&(r.disableMediaPreload=!0)),l.Utils.Object.mergeDeep(e,{plugins:{bumper:r}})}}(n),function(e){var t=l.Utils.Object.getPropertyPath(e,"plugins.vr");if(t&&!t.disable){"boolean"!=typeof l.Utils.Object.getPropertyPath(e,"playback.inBrowserFullscreen")&&l.Utils.Object.mergeDeep(e,{playback:{inBrowserFullscreen:!0}})}}(n),function(e){if(l.Env.isIOS){var t=l.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=l.Utils.Object.hasPropertyPath(e,"plugins.airplay"),r=!1!==t;n?Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:r}):"iPhone"!==l.Env.device.model||r||Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:!1})}}(n),n}function z(e){return function(){if(e.player){j.push({level:"warn",msg:"Path config.player will be deprecated soon. Please update your config structure as describe here: https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md"});var t=l.Utils.Object.copyDeep(e.player);delete e.player,l.Utils.Object.mergeDeep(e,t)}}(),[["duration","sources.duration"],["type","sources.type"],["dvr","sources.dvr"],["id","sources.id"],["name","metadata.name"],["metadata.poster","sources.poster"],["metadata","sources.metadata"],["logLevel","log.level"],["ui.components.fullscreen.inBrowserFullscreenForIOS","playback.inBrowserFullscreen"],["playback.enableCEA708Captions","text.enableCEA708Captions"],["playback.useNativeTextTrack","text.useNativeTextTrack"],["playback.options.html5.dash.useShakaTextTrackDisplay","text.useShakaTextTrackDisplay"],["playback.captionsTextTrack1Label","text.captionsTextTrack1Label"],["playback.captionsTextTrack1LanguageCode","text.captionsTextTrack1LanguageCode"],["playback.captionsTextTrack2Label","text.captionsTextTrack2Label"],["playback.captionsTextTrack2LanguageCode","text.captionsTextTrack2LanguageCode"],["plugins.visibility.threshold","viewability.playerThreshold"],["plugins.visibility.floating","plugins.floating"],["playback.startTime","sources.startTime"]].forEach((function(t){return function(t,n){if(l.Utils.Object.hasPropertyPath(e,t))if(j.push({level:"warn",msg:"Path config.player."+t+" will be deprecated soon. Please update your config structure as describe here: https://github.com/kaltura/kaltura-player-js/blob/master/docs/configuration.md"}),l.Utils.Object.hasPropertyPath(e,n))l.Utils.Object.deletePropertyPath(e,t);else{var r=l.Utils.Object.getPropertyPath(e,t),i=l.Utils.Object.createPropertyPath({},n,r);l.Utils.Object.mergeDeep(e,i),l.Utils.Object.deletePropertyPath(e,t)}}(t[0],t[1])})),e}function W(e,t,n){var r=e.config.playback,i=!1;return r.streamPriority.forEach((function(e){e.engine===t&&(i=!0)})),i||r.streamPriority.push({engine:t,format:n}),r}function Y(e){var t=e&&e.progressive;return!(!t||!t[0]||"video/youtube"!==t[0].mimetype)}function q(e){var t=e&&e.image;return!(!t||!t[0])}function X(e,t){var n={},r={};return l.Utils.Object.isObject(e)&&Object.entries(e).forEach((function(e){var i=e[0],a=e[1];n[i]={},r[i]={},Object.entries(a).forEach((function(e){var a=e[0],o=e[1],s=l.Utils.Object.getPropertyPath(t[i],a);n[i][a]=s||o,r[i][a]=s}))})),[n,r]}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Q(r.key),r)}}function Q(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Z=function(){function e(e,t,n){this.name=e,this.player=t,this.eventManager=new l.EventManager,this.logger=Object(l.getLogger)(l.Utils.String.capitlize(this.name)),this.config={},l.Utils.Object.mergeDeep(this.config,this.constructor.defaultConfig,n)}e.createPlugin=function(e,t,n){return void 0===n&&(n={}),new this(e,t,n)},e.isValid=function(){throw new l.Error(l.Error.Severity.CRITICAL,l.Error.Category.PLAYER,l.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"isValid()")};var t,n,r,i=e.prototype;return i.getConfig=function(e){return e?l.Utils.Object.copyDeep(this.config[e]):l.Utils.Object.copyDeep(this.config)},i.updateConfig=function(e){l.Utils.Object.mergeDeep(this.config,e)},i.loadMedia=function(){},i.destroy=function(){this.eventManager.destroy()},i.reset=function(){},i.getName=function(){return this.name},i.dispatchEvent=function(e,t){this.logger.debug("Fire event: "+e,t),this.player.dispatchEvent(new l.FakeEvent(e,t))},t=e,(n=[{key:"ready",get:function(){return Promise.resolve()}}])&&$(t.prototype,n),r&&$(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function J(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){(t=Q(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Z,"defaultConfig",{});var ee=function(){function e(){J(this,"_plugins",{}),J(this,"_isDisabledPluginMap",new Map)}e.register=function(t,n){return"function"!=typeof n||n.prototype instanceof Z==!1?(e._logger.error("Plugin <"+t+"> registration failed, either plugin is not an instance of BasePlugin or plugin handler is not a function"),!1):e._registry.has(t)?(e._logger.debug("Plugin <"+t+"> is already registered, do not register again"),!1):(e._registry.set(t,n),e._logger.debug("Plugin <"+t+"> has been registered successfully"),!0)},e.unRegister=function(t){e._registry.has(t)&&(e._registry.delete(t),e._logger.debug("Unregistered <"+t+"> plugin."))};var t=e.prototype;return t.load=function(t,n,r){if(void 0===r&&(r={}),!e._registry.has(t))throw e._logger.warn("Plugin <"+t+"> loading failed, plugin is not registered"),new l.Error(l.Error.Severity.RECOVERABLE,l.Error.Category.PLAYER,l.Error.Code.RUNTIME_ERROR_NOT_REGISTERED_PLUGIN,t);var i=e._registry.get(t);"boolean"==typeof r.disable&&this._isDisabledPluginMap.set(t,r.disable);var a=!!this._isDisabledPluginMap.get(t),o=!!i&&i.isValid();if(i&&o&&!a){try{this._plugins[t]=i.createPlugin(t,n,r)}catch(e){throw new l.Error(l.Error.Severity.RECOVERABLE,l.Error.Category.PLAYER,l.Error.Code.PLUGIN_LOAD_FAILED,e)}return this._isDisabledPluginMap.set(t,!1),e._logger.debug("Plugin <"+t+"> has been loaded"),!0}return e._logger.debug("Plugin <"+t+"> isn't loaded, isValid()="+o.toString()+", disabled="+a.toString()),!1},t.loadMedia=function(){var e=this;Object.keys(this._plugins).forEach((function(t){return e._plugins[t].loadMedia()}))},t.destroy=function(){var e=this;Object.keys(this._plugins).forEach((function(t){e._plugins[t].destroy(),delete e._plugins[t]}))},t.reset=function(){var e=this;Object.keys(this._plugins).forEach((function(t){return e._plugins[t].reset()}))},t.get=function(e){return this._plugins[e]},t.getAll=function(){return this._plugins},e}();J(ee,"_logger",Object(l.getLogger)("PluginManager")),J(ee,"_registry",new Map);var te=ee.register,ne={youbora:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",entryId:"{{entryId}}",entryName:"{{entryName}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",uiConfId:"{{uiConfId}}"},googleAnalytics:{entryId:"{{entryId}}",entryName:"{{entryName}}",uiConfId:"{{uiConfId}}",partnerId:"{{partnerId}}"},ottAnalytics:{entryId:"{{entryId}}",ks:"{{ks}}",isAnonymous:"{{isAnonymous}}",partnerId:"{{partnerId}}",serviceUrl:"{{serviceUrl}}"},ima:{playerVersion:"{{pVersion}}",playerName:"{{pName}}"},kava:{playerVersion:"{{pVersion}}",playerName:"{{pName}}",partnerId:"{{partnerId}}",playlistId:"{{playlistId}}",entryId:"{{entryId}}",entryType:"{{entryType}}",sessionId:"{{sessionId}}",ks:"{{ks}}",uiConfId:"{{uiConfId}}",referrer:"{{referrer}}",encodedReferrer:"{{encodedReferrer}}",serviceUrl:"{{analyticsServiceUrl}}"},comscore:{playerVersion:"{{pVersion}}"},vr:{rootElement:"{{domRootElementId}}"},share:{partnerId:"{{partnerId}}",uiConfId:"{{uiConfId}}",entryId:"{{entryId}}",embedBaseUrl:"{{embedBaseUrl}}"}},re=new RegExp("{{.*}}");function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ae(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var oe=function(e){var t,n;function r(){var t;return ae(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t=e.call(this)||this),"_ovpPluginsConfig",{ottAnalytics:{}}),t._config=l.Utils.Object.mergeDeep({},t._basePluginsConfig,t._ovpPluginsConfig),t}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,ie(t,n),r}(function(){function e(){this._basePluginsConfig=l.Utils.Object.copyDeep(ne)}var t=e.prototype;return t.get=function(){return this._config},t.set=function(e){if(e){var t=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return l.Utils.Object.isObject(i)?t[r]=e(i):"string"==typeof i&&re.test(i)?t[r]=i:t[r]=void 0,t}),{})}(e);this._config=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return l.Utils.Object.isObject(i)?t[r]=e(i):i&&(t[r]=i),t}),{})}(l.Utils.Object.mergeDeep(this._config,t))}},t.reset=function(){this._config=l.Utils.Object.copyDeep(ne)},e}());var se=function(e,t){void 0===t&&(t={});try{var n,r=e;for(var i in t){var a=void 0!==t[i]&&null!==t[i]?t[i]:"";"string"==typeof a&&a.indexOf('"')>-1&&(a=a.replace(/"/g,'\\"')),n=new RegExp("{{"+i+"}}","g"),r=r.replace(n,a)}return r}catch(e){return""}},le=Object(l.getLogger)("PluginsConfig"),ue=function(e){return("number"==typeof e||"function"==typeof e||"string"==typeof e||"boolean"==typeof e||l.Utils.Object.isClassInstance(e))&&!re.test(e.toString())},ce=function(e){return l.Utils.Object.isObject(e)&&"function"!=typeof e&&!l.Utils.Object.isClassInstance(e)},pe=function(e){return e.map((function(e){if(ce(e)){var t=de(e);return l.Utils.Object.isEmptyObject(t)?null:t}return ue(e)?e:null})).filter((function(e){return null!==e}))},de=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return ce(i)?t[r]=e(i):Array.isArray(i)?t[r]=pe(i):ue(i)&&(t[r]=i),t}),{})};var fe=function(){function e(){this._pluginConfigStore=new oe}return e.prototype.evaluatePluginsConfig=function(e,t){if(e){this._pluginConfigStore.set(e);var n=function(e){var t,n={pVersion:(null==(t=K())?void 0:t.productVersion)||"3.14.3-canary.0-99a98cb",pName:"@playkit-js/kaltura-player-js"};if(e.targetId&&(n.domRootElementId=e.targetId),e.provider&&e.provider.env){n.serviceUrl=e.provider.env.serviceUrl;var r=l.Utils.Object.getPropertyPath(e,"provider.env.analyticsServiceUrl");r&&(n.analyticsServiceUrl=r+"/api_v3/index.php"),n.serviceUrl&&(n.embedBaseUrl=n.serviceUrl.replace("api_v3",""))}var i,a={referrer:I(),encodedReferrer:(i=I(),encodeURIComponent(i))};return e.provider&&l.Utils.Object.mergeDeep(a,{ks:e.provider.ks,uiConfId:e.provider.uiConfId,partnerId:e.provider.partnerId}),e.session&&l.Utils.Object.mergeDeep(a,{sessionId:e.session.id,ks:e.session.ks,isAnonymous:e.session.isAnonymous,uiConfId:e.session.uiConfId,partnerId:e.session.partnerId}),e.sources&&l.Utils.Object.mergeDeep(a,{entryId:e.sources.id,entryName:e.sources.metadata&&e.sources.metadata.name,entryType:e.sources.type}),e.playlist&&l.Utils.Object.mergeDeep(a,{playlistId:e.playlist.id}),Object.keys(a).forEach((function(e){void 0===a[e]&&delete a[e]})),l.Utils.Object.mergeDeep(n,a),n}(t),r=l.Utils.Object.mergeDeep({},this._pluginConfigStore.get(),e);!function(e,t){var n=de(t),r=de(e);r&&n&&Object.keys(e).forEach((function(t){e&&e[t]&&(e[t]=l.Utils.Object.mergeDeep({},n[t],r[t]))}))}(e,function(e){var t,n;e=(n=e)?n.replace(/\\n/g,"\\n").replace(/\\'/g,"\\'").replace(/\\"/g,'\\"').replace(/\\&/g,"\\&").replace(/\\r/g,"\\r").replace(/\\t/g,"\\t").replace(/\\b/g,"\\b").replace(/\\f/g,"\\f").replace(/[\u0000-\u0019]+/g,""):"";try{t=JSON.parse(e,(function(e){try{return JSON.parse(this[e])}catch(t){return this[e]}}))}catch(e){le.error("An error occurred while formatting config string.",e),t={}}return t}(se(JSON.stringify(r),n)))}},e}();function he(){return(he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ge(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ye={thumbsWidth:164,thumbsHeight:92,thumbsSlices:100},ve=/.*\/p\/\d+\/(?:[a-zA-Z]+\/\d+\/)*thumbnail\/entry_id\/\w+\/.*\d+/,me=function(){function e(e,t,n){var r=this;if(ge(this,"_isUsingKalturaThumbnail",(function(){return!(!r._thumbnailConfig||!r._thumbnailConfig.thumbsSprite)})),ge(this,"_convertKalturaThumbnailToThumbnailInfo",(function(e){if(r._thumbnailConfig){var t=r._thumbnailConfig,n=t.thumbsSprite,i=t.thumbsWidth,a=t.thumbsSlices,o=r._player.duration/a,s={x:Math.floor(e/o)*i,y:0,url:n,height:r._thumbsHeight,width:i};return new l.ThumbnailInfo(s)}})),ge(this,"_buildKalturaThumbnailConfig",(function(e,t){var n,i=l.Utils.Object.getPropertyPath(e,"components.seekbar"),a=t.sources&&t.sources.poster,o=t.sources&&t.sources.type===l.MediaType.VOD,s=r._player.shouldAddKs(t)?null==(n=t.session)?void 0:n.ks:"",u=l.Utils.Object.mergeDeep(ye,i);return he({thumbsSprite:o?r._getThumbSlicesUrl(a,s,u):""},u)})),ge(this,"_getThumbSlicesUrl",(function(e,t,n){if("string"==typeof e&&ve.test(e))try{var r=he({thumbnailUrl:e},n),i=se("{{thumbnailUrl}}/width/{{thumbsWidth}}/vid_slices/{{thumbsSlices}}",r);return t?i+"/ks/"+t:i}catch(e){return""}return""})),this._player=e,this._thumbnailConfig=this._buildKalturaThumbnailConfig(t,n),this._eventManager=new l.EventManager,this._isUsingKalturaThumbnail()){var i,a=new Image;this._eventManager.listenOnce(a,"load",(function(){r._thumbsHeight=a.naturalHeight})),a.src=(null==(i=this._thumbnailConfig)?void 0:i.thumbsSprite)||""}}var t=e.prototype;return t.destroy=function(){this._eventManager.destroy()},t.getThumbnail=function(e){return this._isUsingKalturaThumbnail()?this._convertKalturaThumbnailToThumbnailInfo(e):this._player._localPlayer.getThumbnail(e)},t.getKalturaThumbnailConfig=function(){return this._thumbnailConfig},e}();n(320);function be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ee(r.key),r)}}function _e(e,t,n){return(t=Ee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ee(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var ke=function(){function e(e,t){var n=this;_e(this,"_disabled",!1),this._player=e;var r=t.ui;if(r.disable){this._disabled=!0;var i=document.getElementById(r.targetId);i&&i.appendChild(e.getView())}else this._uiManager=new u.UIManager(e,r),r.customPreset?this._uiManager.buildCustomUI(r.customPreset):this._uiManager.buildDefaultUI(),this._handleVr(t.plugins),this._handleExternalCSS(r);return new Proxy(this,{get:function(e,t){return n._disabled?function(){}:e[t]}})}var t,n,r,i=e.prototype;return i.destroy=function(){this._uiManager.destroy()},i.reset=function(){this._resetErrorState()},i.setConfig=function(e,t){this._uiManager.setConfig(e,t)},i.addComponent=function(e){return this._uiManager.addComponent(e)},i.removeComponent=function(e){var t={label:"Remove_"+e.removeComponent,get:u.Components.Remove,presets:e.presets,area:e.area||e.container,replaceComponent:e.removeComponent};return this._uiManager.addComponent(t)},i.registerManager=function(e,t){this._player.registerService(e,t)},i.getManager=function(e){return this._player.getService(e)},i.hasManager=function(e){return this._player.hasService(e)},i.setLoadingSpinnerState=function(e){this.setConfig({show:e},"loading")},i._resetErrorState=function(){this.setConfig({hasError:!1},"engine")},i._handleExternalCSS=function(t){t.css&&l.Utils.Dom.loadStyleSheetAsync(t.css).then((function(){e._logger.debug("external css was loaded successfully")}),(function(){e._logger.error("external css failed to load")}))},i._handleVr=function(e){void 0===e&&(e={}),e.vr&&!e.vr.disable&&this._setStereoConfig(e.vr)},i._setStereoConfig=function(e){(e.toggleStereo||(l.Env.isMobile||l.Env.isTablet)&&!1!==e.toggleStereo)&&this.setConfig(l.Utils.Object.mergeDeep({},{vrStereoMode:!!e.startInStereo}),"vrStereo")},t=e,(n=[{key:"store",get:function(){return this._uiManager.store}}])&&be(t.prototype,n),r&&be(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();_e(ke,"_logger",Object(l.getLogger)("UIWrapper"));var Te={PLAYLIST_LOADED:"kaltura-player-playlistloaded",PLAYLIST_ITEM_CHANGED:"kaltura-player-playlistitemchanged",PLAYLIST_ENDED:"kaltura-player-playlistended"};function Ae(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,we(r.key),r)}}function we(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Se=["hls","dash","progressive","image"],Ce=function(){function e(e,t,n){this._sources=e,this._config=t,this._index=n}var t,n,r,i=e.prototype;return i.updateSources=function(e){this._sources=l.Utils.Object.mergeDeep({},e)},i.updatePlugins=function(e){this._plugins=l.Utils.Object.copyDeep(e)},i.isPlayable=function(){var e=this;return!!Se.find((function(t){return e._sources&&e._sources[t]&&e._sources[t].length}))},t=e,(n=[{key:"sources",get:function(){var e=this;return Se.forEach((function(t){e._sources&&e._sources[t]&&0===e._sources[t].length&&delete e._sources[t]})),this._sources}},{key:"config",get:function(){return this._config}},{key:"plugins",get:function(){return this._plugins||{}}},{key:"index",get:function(){return this._index}}])&&Ae(t.prototype,n),r&&Ae(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ie(r.key),r)}}function Ie(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Pe=function(){function e(){this._id="",this._metadata={name:"",description:""},this._poster="",this._items=[],this._activeItemIndex=-1}var t,n,r,i=e.prototype;return i.configure=function(e,t){var n=this;this._id=e.id?e.id:this._id,this._poster=e.poster?e.poster:this._poster,this._metadata=e.metadata?e.metadata:this._metadata,e.items&&(this._items=[],e.items.forEach((function(e,r){if(e.sources){var i=l.Utils.Object.mergeDeep({},t),a=e.sources.options||{};e.sources.options=l.Utils.Object.mergeDeep(i,a)}n._items.push(new Ce(e.sources,e.config,r))})))},i.updateItemSources=function(e,t){this._items[e].updateSources(t)},i.updateItemPlugins=function(e,t){this._items[e].updatePlugins(t)},i.getNext=function(e){var t=e?(this._activeItemIndex+1)%this._items.length:this._activeItemIndex+1;return this._items[t]||null},t=e,(n=[{key:"id",get:function(){return this._id}},{key:"items",get:function(){return this._items}},{key:"metadata",get:function(){return this._metadata}},{key:"poster",get:function(){return this._poster}},{key:"current",get:function(){return this._items[this._activeItemIndex]||null}},{key:"prev",get:function(){return this._items[this._activeItemIndex-1]||null}},{key:"activeItemIndex",set:function(e){this._activeItemIndex=e}}])&&xe(t.prototype,n),r&&xe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function De(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Re(r.key),r)}}function Re(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Oe=function(){function e(e,t){this._player=e,this._eventManager=new l.EventManager,this._playlist=new Pe,this._options={autoContinue:!0,loop:!1,imageDuration:5},this._countdown={duration:10,showing:!0},this._mediaInfoList=[],this._playerOptions=t,this._appPluginConfig={}}var t,n,r,i=e.prototype;return i.configure=function(e,t){e&&(this._playlist.configure(e,l.Utils.Object.getPropertyPath(this._player.sources,"options")),l.Utils.Object.mergeDeep(this._options,e.options),l.Utils.Object.mergeDeep(this._countdown,e.countdown),e.items&&e.items.find((function(e){return!!e.sources}))&&(this._mediaInfoList=e.items.map((function(e,n){return t&&t.entries&&"object"==typeof t.entries[n]?t.entries[n]:{entryId:e.sources.id}})),this._player.dispatchEvent(new l.FakeEvent(Te.PLAYLIST_LOADED,{playlist:this})),this._addBindings(),this.playNext()))},i.load=function(e,t,n){var r=this._getMergedPlaylistData(e,t);this.configure(r,n)},i.reset=function(){this._eventManager.removeAll(),this._playlist=new Pe,this._mediaInfoList=[]},i.playNext=function(){e._logger.debug("playNext");var t=this._playlist.getNext(!0);t&&this._setItem(t)},i.playPrev=function(){e._logger.debug("playPrev");var t=this._playlist.prev;t&&this._setItem(t)},i.playItem=function(t){e._logger.debug("playItem("+t+")");var n=this._playlist.items[t];n&&this._setItem(n)},i._getMergedPlaylistData=function(e,t){var n=this;return{id:e.id,metadata:e.metadata,poster:e.poster,options:t?t.options:this._options,countdown:t?t.countdown:this.countdown,items:e.items.map((function(e,r){var i=l.Utils.Object.copyDeep(e);return l.Utils.Object.mergeDeep(i.sources,t&&t.items&&t.items[r]&&t.items[r].sources),Array.isArray(i.sources.poster)&&n._player.updateKalturaPoster(i.sources,e.sources,n._player.dimensions),{sources:i.sources,config:t&&t.items&&t.items[r]&&t.items[r].config}}))}},i._addBindings=function(){var e=this;this._eventManager.listen(this._player,this._player.Event.Core.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this._player,this._player.Event.Core.CHANGE_SOURCE_STARTED,(function(){return e._onChangeSourceStarted()}))},i._onPlaybackEnded=function(){var e=this._playlist.getNext(!1);e||this._player.dispatchEvent(new l.FakeEvent(Te.PLAYLIST_ENDED)),!this._playerOptions.ui.disable&&this.countdown.showing||(e&&this._options.autoContinue||this._options.loop)&&this.playNext()},i._onChangeSourceStarted=function(){var e;"Image"===(null==(e=this._playlist.items[this._playlist._activeItemIndex].sources)?void 0:e.type)&&this._player.configure({sources:{duration:this._options.imageDuration}})},i._setItem=function(t){var n=this,r=t.index;e._logger.debug("Playing item number "+r,t);var i={loop:!1};if(this._playlist.current&&(i.autoplay=!0),this._player.configure({playback:i}),this._playlist.activeItemIndex=r,t.isPlayable()){this._resetProviderPluginsConfig();var a=X(t.plugins,this._player.config.plugins),o=a[0];this._appPluginConfig=a[1];var s={session:this._player.config.session,plugins:o,sources:t.sources};return this._player.setMedia(s),this._player.dispatchEvent(new l.FakeEvent(Te.PLAYLIST_ITEM_CHANGED,{index:r,activeItem:t})),Promise.resolve()}if(this._mediaInfoList[r]){this._resetProviderPluginsConfig();var u={sources:t.sources};return this._player.setMedia(u),this._player.loadMedia(this._mediaInfoList[r]).then((function(e){n._playlist.updateItemSources(r,e.sources),n._playlist.updateItemPlugins(r,e.plugins),n._player.dispatchEvent(new l.FakeEvent(Te.PLAYLIST_ITEM_CHANGED,{index:r,activeItem:t}))}))}return Promise.reject()},i._resetProviderPluginsConfig=function(){this._player.configure({plugins:this._appPluginConfig}),this._appPluginConfig={}},i.destroy=function(){this._eventManager.destroy()},t=e,(n=[{key:"items",get:function(){return this._playlist.items}},{key:"current",get:function(){return this._playlist.current}},{key:"next",get:function(){return this._playlist.getNext(this._options.loop)}},{key:"prev",get:function(){return this._playlist.prev}},{key:"id",get:function(){return this._playlist.id}},{key:"metadata",get:function(){return this._playlist.metadata}},{key:"poster",get:function(){return this._playlist.poster}},{key:"countdown",get:function(){if(this._playlist.current&&this._playlist.current.config){var e={duration:10,showing:!0};return l.Utils.Object.mergeDeep(e,this._countdown,this._playlist.current.config.countdown),e}return this._countdown}},{key:"options",get:function(){return this._options}}])&&De(t.prototype,n),r&&De(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();!function(e,t,n){(t=Re(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Oe,"_logger",Object(l.getLogger)("PlaylistManager"));var Le={CAST_SESSION_START_FAILED:"kaltura-player-castsessionstartfailed",CAST_SESSION_STARTING:"kaltura-player-castsessionstarting",CAST_SESSION_STARTED:"kaltura-player-castsessionstarted",CAST_SESSION_ENDING:"kaltura-player-castsessionending",CAST_SESSION_ENDED:"kaltura-player-castsessionended",CAST_AVAILABLE:"kaltura-player-castavailable"},Me=function(e){this.textStyle=e.textStyle,this.mediaInfo=e.getMediaInfo(),this.mediaConfig=e.getMediaConfig(),this.advertising=e.config.plugins&&e.config.plugins.ima,this.config=l.Utils.Object.mergeDeep({},e.config,{sources:{startTime:Ne(e)},playback:{autoplay:0===e.currentTime||!e.paused,audioLanguage:Ue(l.TrackType.AUDIO,e),textLanguage:Ue(l.TrackType.TEXT,e)}})};function Ne(e){return e.isLive()?e.isDvr()?e.duration-e.currentTime<e.config.cast.dvrThreshold||!e.currentTime?-1:e.currentTime:-1:!e.isCasting()&&!e.currentTime&&e.config.sources.startTime>-1?e.config.sources.startTime:e.currentTime}function Ue(e,t){var n=t.getActiveTracks();if(n[e])return n[e].language;try{return t.config.playback[e+"Language"]}catch(e){return null}}function Fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,je(r.key),r)}}function je(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Be=function(){function e(e,t,n){this._id=e,this._friendlyName=t,this._resuming=n}var t,n,r;return t=e,(n=[{key:"deviceFriendlyName",get:function(){return this._friendlyName}},{key:"id",get:function(){return this._id}},{key:"resuming",get:function(){return this._resuming}}])&&Fe(t.prototype,n),r&&Fe(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ge(r.key),r)}}function He(e,t){return(He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ke(e,t,n){return(t=Ge(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var ze=function(e){var t,n;function r(t,n,i){var a;return Ke(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a=e.call(this)||this),"_isCastInitiator",!1),a._playerConfig={},r._logger=Object(l.getLogger)(t),a._remoteControl=i,a._castConfig=l.Utils.Object.mergeDeep({},a.constructor.defaultConfig,n),a._eventManager=new l.EventManager,r._logger.debug("Initialized"),a}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,He(t,n),r.isSupported=function(){return!0};var i,a,o,s=r.prototype;return s.loadMedia=function(e){return Promise.resolve()},s.setMedia=function(e){},s.getMediaInfo=function(){},s.getMediaConfig=function(){},s.configure=function(e){void 0===e&&(e={})},s.ready=function(){return Promise.resolve()},s.load=function(){},s.play=function(){},s.pause=function(){},s.reset=function(){},s.destroy=function(){},s.isLive=function(){return!1},s.isDvr=function(){return!1},s.seekToLiveEdge=function(){},s.getStartTimeOfDvrWindow=function(){return 0},s.getTracks=function(e){return[]},s.getActiveTracks=function(){return{audio:void 0,video:void 0,text:void 0}},s.selectTrack=function(e){},s.hideTextTrack=function(){},s.enableAdaptiveBitrate=function(){},s.isAdaptiveBitrateEnabled=function(){return!0},s.setTextDisplaySettings=function(e){},s.startCasting=function(){},s.stopCasting=function(){},s.isCasting=function(){return!0},s.isCastAvailable=function(){return!0},s.getCastSession=function(){return new Be("","")},s.isVr=function(){return!1},s.toggleVrStereoMode=function(){},s.isInVrStereoMode=function(){return!1},i=r,(a=[{key:"ads",get:function(){return null}},{key:"textStyle",get:function(){return new l.TextStyle},set:function(e){}},{key:"buffered",get:function(){return[]}},{key:"currentTime",get:function(){return 0},set:function(e){}},{key:"duration",get:function(){return 0}},{key:"liveDuration",get:function(){return NaN}},{key:"volume",get:function(){return 1},set:function(e){}},{key:"paused",get:function(){return!1}},{key:"ended",get:function(){return!1}},{key:"seeking",get:function(){return!1}},{key:"muted",get:function(){return!1},set:function(e){}},{key:"src",get:function(){return""}},{key:"poster",get:function(){return""}},{key:"playbackRate",get:function(){return 1},set:function(e){}},{key:"engineType",get:function(){return""}},{key:"streamType",get:function(){return""}},{key:"type",get:function(){return r.Type}},{key:"config",get:function(){return this._playerConfig}},{key:"isCastInitiator",get:function(){return this._isCastInitiator},set:function(e){this._isCastInitiator=e}}])&&Ve(i.prototype,a),o&&Ve(i,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(l.FakeEventTarget);function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ye(r.key),r)}}function Ye(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}Ke(ze,"defaultConfig",{}),Ke(ze,"Type","BaseRemotePlayer");var qe=function(){function e(){var e=this;!function(e,t,n){(t=Ye(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"_uis",[{template:function(t){return e.idleUI(t)},condition:function(e){return e.engine.isIdle}},{template:function(t){return e.errorUI(t)},condition:function(e){return e.engine.hasError}},{template:function(t){return e.adsUI(t)},condition:function(e){return e.engine.adBreak}},{template:function(t){return e.liveUI(t)},condition:function(e){return e.engine.isLive}},{template:function(t){return e.playbackUI(t)}}])}var t,n,r,i=e.prototype;return i.playbackUI=function(e){return u.Presets.playbackUI(e)},i.idleUI=function(e){return u.Presets.idleUI(e)},i.adsUI=function(e){return u.Presets.adsUI(e)},i.liveUI=function(e){return u.Presets.liveUI(e)},i.errorUI=function(e){return u.Presets.errorUI(e)},t=e,(n=[{key:"uis",get:function(){return this._uis}}])&&We(t.prototype,n),r&&We(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Xe(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,$e(e,t)}function $e(e,t){return($e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Je(r.key),r)}}function Ze(e,t,n){return t&&Qe(e.prototype,t),n&&Qe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Je(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var et=function(){function e(e){this._player=e}return Ze(e,[{key:"player",get:function(){return this._player}}]),e}(),tt=function(e){function t(t,n,r){var i;return(i=e.call(this,t)||this)._session=n,r&&(i._ui=r),i}return Xe(t,e),Ze(t,[{key:"ui",get:function(){return this._ui}},{key:"session",get:function(){return this._session}}]),t}(et),nt=function(e){function t(t,n){var r;return(r=e.call(this,t)||this)._snapshot=n,r}return Xe(t,e),Ze(t,[{key:"snapshot",get:function(){return this._snapshot}}]),t}(et),rt=function(e){function t(t,n){var r;return(r=e.call(this,t)||this)._available=n,r}return Xe(t,e),Ze(t,[{key:"available",get:function(){return this._available}}]),t}(et);var it=function(e){this.getPlayerSnapshot=pt.bind(e),this.getUIWrapper=dt.bind(e),this.onRemoteDeviceAvailable=ut.bind(e),this.onRemoteDeviceConnected=ot.bind(e),this.onRemoteDeviceDisconnected=lt.bind(e),this.onRemoteDeviceConnecting=at.bind(e),this.onRemoteDeviceDisconnecting=st.bind(e),this.onRemoteDeviceConnectFailed=ct.bind(e)};function at(){it._logger.debug("onRemoteDeviceConnecting"),this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_STARTING))}function ot(e){var t=this;it._logger.debug("onRemoteDeviceConnected",e);var n=e.player,r=e.ui,i=e.session;this._eventManager.removeAll(),Object.values(l.EventType).forEach((function(e){return t._eventManager.listen(n,e,(function(e){return t.dispatchEvent(e)}))}));var a=this.config;r&&l.Utils.Object.mergeDeep(a,{ui:{customPreset:r.uis}}),this.configure({playback:{muted:this.muted,volume:this.volume}}),this._localPlayer.reset(),this._uiWrapper.destroy(),this._remotePlayer=n,this._uiWrapper=new ke(this,a),this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_STARTED,{session:i}))}function st(){it._logger.debug("onRemoteDeviceDisconnecting"),this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_ENDING))}function lt(e){var t=this;it._logger.debug("onRemoteDeviceDisconnected",e);var n=e.player,r=e.snapshot;if(this._remotePlayer&&this._remotePlayer===n&&(this._eventManager.removeAll(),ft.call(this,r),r)){this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_ENDED));var i,a=this.config,o=!r.config.playback.autoplay,s=r.mediaInfo,u=r.mediaConfig;r.config.playback.autoplay=!0,ht.call(this,r.config),this._eventManager.listenOnce(this,this.Event.Core.CHANGE_SOURCE_ENDED,(function(){gt.call(t,r.config.sources)})),s?i=this.loadMedia(s):u&&(i=Promise.resolve(),this.setMedia(u)),i&&i.then((function(){t._eventManager.listenOnce(t,t.Event.Core.FIRST_PLAYING,(function(){t.textStyle=r.textStyle,ht.call(t,a),yt.call(t,r.config.playback),o&&t.pause()}))}))}}function ut(e){it._logger.debug("onRemoteDeviceAvailable",e);var t=e.player,n=e.available;this.dispatchEvent(new l.FakeEvent(Le.CAST_AVAILABLE,{type:t.type,available:n}))}function ct(){it._logger.debug("onRemoteDeviceConnectFailed"),this.dispatchEvent(new l.FakeEvent(Le.CAST_SESSION_START_FAILED))}function pt(){var e=new Me(this);return it._logger.debug("getPlayerSnapshot",e),e}function dt(){return it._logger.debug("getUIWrapper"),this._uiWrapper}function ft(e){var t=this;this._uiWrapper.destroy();var n=this._localPlayer.config;if(n.plugins&&n.plugins.ima){var r={};if(n.cast.advertising&&n.cast.advertising.vast){if(e.config.sources.startTime>0){var i=n.plugins.ima.adTagUrl;r={adTagUrl:""},this._eventManager.listen(this,l.EventType.FIRST_PLAYING,(function(){return t.configure({plugins:{ima:{adTagUrl:i}}})}))}}else r={delayInitUntilSourceSelected:!0};l.Utils.Object.mergeDeep(n,{plugins:{ima:r}}),this._localPlayer.destroy(),this._remotePlayer=null,this._localPlayer=Object(l.loadPlayer)(n)}else this._remotePlayer=null;Object.values(l.EventType).forEach((function(e){return t._eventManager.listen(t._localPlayer,e,(function(e){return t.dispatchEvent(e)}))})),this._uiWrapper=new ke(this,this.config),this._uiWrapper.setConfig({isCastAvailable:this.isCastAvailable()},"engine")}function ht(e){var t=e.sources.startTime,n=e.playback.autoplay;this.configure({sources:{startTime:t},playback:{autoplay:n}})}function gt(e){if(e.captions.length){var t=e.captions;this.configure({sources:{captions:t}})}}function yt(e){if(e.audioLanguage){var t=this.getTracks(l.TrackType.AUDIO).find((function(t){return t.language===e.audioLanguage}));this.selectTrack(t)}if(e.textLanguage){var n=this.getTracks(l.TrackType.TEXT).find((function(t){return t.language===e.textLanguage}));this.selectTrack(n)}}function vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e,t,n){(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(it,"_logger",Object(l.getLogger)("RemoteControl"));var mt=function(){function e(){vt(this,"_remotePlayers",new Map)}e.register=function(t,n){"function"==typeof n?e._registry.has(t)?e._logger.debug("Remote player of type "+t+" is already registered"):(e._logger.debug("Register remote player of type "+t),e._registry.set(t,n)):e._logger.debug("remote player must be instance of BaseRemotePlayer")};var t=e.prototype;return t.load=function(t,n){var r=this;e._registry.forEach((function(i,a){e._logger.debug("Load remote player of type "+a);var o=new i(t,new it(n),n.config.targetId);r._remotePlayers.set(a,o)}))},t.startCasting=function(t){e._logger.debug("Start casting");var n=this._getRemotePlayer(t);return n?n.startCasting():Promise.reject()},t.isCastAvailable=function(t){var n=this._getRemotePlayer(t);return!!n&&(e._logger.debug("isCastAvailable: "+n.isCastAvailable()),n.isCastAvailable())},t.destroy=function(){var e=this._remotePlayers;Array.from(e.values()).forEach((function(e){return e.destroy()}))},t.setIsCastInitiator=function(e,t){var n=this._getRemotePlayer(e);n&&(n.isCastInitiator=t)},t._getRemotePlayer=function(e){var t=this._remotePlayers;return e&&t.get(e)?t.get(e):t.size>0?Array.from(t.values())[0]:void 0},e}();function bt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_t(r.key),r)}}function _t(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}vt(mt,"_registry",new Map),vt(mt,"_logger",Object(l.getLogger)("RemotePlayerManager"));var Et=function(){function e(e){this._type=e.type,this._position=e.position,this._numAds=e.numAds}var t,n,r;return e.prototype.toJSON=function(){return{type:this.type,position:this.position,numAds:this.numAds}},t=e,(n=[{key:"type",get:function(){return this._type}},{key:"position",get:function(){return this._position}},{key:"numAds",get:function(){return this._numAds}}])&&bt(t.prototype,n),r&&bt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Tt(r.key),r)}}function Tt(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var At=function(){function e(e,t){this._id=e,this._system=t.system,this._url=t.url,this._contentType=t.contentType,this._title=t.title,this._position=t.position,this._duration=t.duration,this._clickThroughUrl=t.clickThroughUrl,this._posterUrl=t.posterUrl,this._skipOffset=t.skipOffset,this._linear=t.linear,this._width=t.width||0,this._height=t.height||0,this._bitrate=t.bitrate||0,this._bumper=t.bumper,this._inStream=t.inStream||!1,this._vpaid=t.vpaid||!1,this._streamId=t.streamId||"",this._wrapperAdIds=t.wrapperAdIds,this._wrapperCreativeIds=t.wrapperCreativeIds,this._wrapperAdSystems=t.wrapperAdSystems}var t,n,r;return e.prototype.toJSON=function(){return{id:this.id,system:this.system,url:this.url,contentType:this.contentType,title:this.title,position:this.position,duration:this.duration,clickThroughUrl:this.clickThroughUrl,posterUrl:this.posterUrl,skipOffset:this.skipOffset,linear:this.linear,skippable:this.skippable,width:this.width,height:this.height,bitrate:this.bitrate,bumper:this.bumper,inStream:this.inStream,vpaid:this.vpaid}},t=e,(n=[{key:"id",get:function(){return this._id}},{key:"system",get:function(){return this._system}},{key:"contentType",get:function(){return this._contentType}},{key:"url",get:function(){return this._url}},{key:"title",get:function(){return this._title}},{key:"position",get:function(){return this._position}},{key:"duration",get:function(){return this._duration}},{key:"clickThroughUrl",get:function(){return this._clickThroughUrl}},{key:"posterUrl",get:function(){return this._posterUrl}},{key:"skipOffset",get:function(){return this._skipOffset}},{key:"linear",get:function(){return this._linear}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}},{key:"bitrate",get:function(){return this._bitrate}},{key:"bumper",get:function(){return this._bumper}},{key:"inStream",get:function(){return this._inStream}},{key:"skippable",get:function(){return!!(this.skipOffset&&this.skipOffset>0)}},{key:"vpaid",get:function(){return this._vpaid}},{key:"streamId",get:function(){return this._streamId}},{key:"wrapperAdIds",get:function(){return this._wrapperAdIds}},{key:"wrapperCreativeIds",get:function(){return this._wrapperCreativeIds}},{key:"wrapperAdSystems",get:function(){return this._wrapperAdSystems}}])&&kt(t.prototype,n),r&&kt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var St=function(){function e(t){var n=this;wt(this,"_prebid",null),this._loadPromise=l.Utils.Object.defer(),this._loadPromise.catch((function(){return e._logger.warn("Prebid SDK failed to load")})),t?(this._config=t,this._loadPrebidSDKLib(this._config.libUrl).then((function(){n._isPrebidSDKLibLoaded()?(n._prebid=window.pbjs,n._loadPromise.resolve()):n._loadPromise.reject()})).catch((function(){n._loadPromise.reject()}))):this._loadPromise.reject()}var t=e.prototype;return t._isPrebidSDKLibLoaded=function(){return window.pbjs&&window.pbjs.que},t._loadPrebidSDKLib=function(e){return this._isPrebidSDKLibLoaded()?Promise.resolve():l.Utils.Dom.loadScriptAsync(e)},t._load=function(t){var n=this;return new Promise((function(r,i){n._loadPromise.then((function(){var a=setTimeout(i,t.timeout||4e3);n._prebid.que.push((function(){n._prebid.addAdUnits(t.adUnit),t.options&&n._prebid.setConfig(t.options),n._prebid.requestBids({bidsBackHandler:function(o){if(e._logger.debug("returned bids",o),clearTimeout(a),t.params){var s={};t.adUnit&&(s.adUnit=t.adUnit),s.params=t.params;var l=n._prebid.adServers.dfp.buildVideoUrl(s);r([{vastUrl:l}])}else try{var u=o[t.adUnit.code||Object.keys(o)[0]].bids;r(u)}catch(e){i()}}})}))})).catch(i)}))},t.load=function(e){return this._load(e||this._config)},e}();function Ct(e,t){return(Ct=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}wt(St,"_logger",Object(l.getLogger)("PrebidManager"));var It=function(e){var t,n;function r(t){var n;return xt(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n=e.call(this)||this),"id","AdLayoutMiddleware"),n._context=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ct(t,n);var i=r.prototype;return i.load=function(e){var t=this;this._context.prerollReady.then((function(){return t.callNext(e)}))},i.play=function(e){var t=this;this._context.prerollReady.then((function(){return t.callNext(e)}))},r}(l.BaseMiddleware);function Pt(){return(Pt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function Dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Ot(r.key),r)}}function Rt(e,t){return(Rt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ot(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var Lt=function(e){var t,n;function r(t,n){var r;return(r=e.call(this)||this)._player=t,r._eventManager=new l.EventManager,r._liveEventManager=new l.EventManager,r._adsPluginControllers=n,r._prebidManager=new St(r._player.config.advertising&&r._player.config.advertising.prebid),r._init(),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Rt(t,n);var i,a,o,s=r.prototype;return s.isAdPlaying=function(){return this.isAdBreak()&&this._isAdPlaying},s.isAdBreak=function(){return!!this._adBreak},s.getAdBreaksLayout=function(){return this._adBreaksLayout},s.getAdBreak=function(){return this._adBreak},s.getAd=function(){return this._ad},s.skipAd=function(){var e=this._adsPluginControllers.find((function(e){return e.active}));e&&e.skipAd()},s.playAdNow=function(e){var t=this;if(this.isAdBreak())r._logger.warn("Tried to call playAdNow during an ad break");else{var n=Promise.all(e.map((function(e){return t._getPrebidAds(e)})));this._playAdBreak({position:this._player.currentTime||0,ads:e,played:!1,loadedPromise:n})}},s.getMiddleware=function(){return this._middleware?this._middleware:this._middleware=new It(this)},s._init=function(){this._initMembers(),this._addBindings()},s._initMembers=function(){this._allAdsCompleted=!0,this._adBreaksLayout=[],this._adBreak=null,this._ad=null,this._adPlayed=!1,this._snapback=0,this._adIsLoading=!1,this._isAdPlaying=!1,this._liveSeeking=!1},s._addBindings=function(){var e=this;this._eventManager.listen(this._player,l.CustomEventType.SOURCE_SELECTED,(function(){return e._handleConfiguredAdBreaks()})),this._eventManager.listen(this._player,l.AdEventType.AD_MANIFEST_LOADED,(function(t){return e._onAdManifestLoaded(t)})),this._eventManager.listen(this._player,l.AdEventType.AD_BREAK_START,(function(t){return e._onAdBreakStart(t)})),this._eventManager.listen(this._player,l.AdEventType.AD_LOADED,(function(){return e._onAdLoaded()})),this._eventManager.listen(this._player,l.AdEventType.AD_STARTED,(function(t){return e._onAdStarted(t)})),this._eventManager.listen(this._player,l.AdEventType.AD_COMPLETED,(function(){return e._isAdPlaying=!1})),this._eventManager.listen(this._player,l.AdEventType.AD_BREAK_END,(function(){return e._onAdBreakEnd()})),this._eventManager.listen(this._player,l.AdEventType.ADS_COMPLETED,(function(){return e._onAdsCompleted()})),this._eventManager.listen(this._player,l.AdEventType.AD_ERROR,(function(t){return e._onAdError(t)})),this._eventManager.listen(this._player,l.CustomEventType.PLAYER_RESET,(function(){return e._reset()})),this._eventManager.listen(this._player,l.CustomEventType.PLAYER_DESTROY,(function(){return e._destroy()})),this._eventManager.listenOnce(this._player,l.Html5EventType.ENDED,(function(){return e._onEnded()})),this._eventManager.listenOnce(this._player,l.CustomEventType.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this._player,l.AdEventType.AD_RESUMED,(function(){return e._isAdPlaying=!0})),this._eventManager.listen(this._player,l.AdEventType.AD_PAUSED,(function(){return e._isAdPlaying=!1}))},s._handleConfiguredAdBreaks=function(){var e=this,t=this._player.config.advertising.playAdsAfterTime||this._player.config.sources.startTime;this._configAdBreaks=this._player.config.advertising.adBreaks.filter((function(e){return("number"==typeof e.every||"number"==typeof e.position||"number"==typeof e.percentage)&&e.ads.length})).map((function(n){e._validateOneTimeConfig(n);var r=n.position;0===n.percentage&&(r=0),100===n.percentage&&(r=-1),n.every&&(r=n.every);var i=e._player.isLive()?r<t:r<=t;return{position:r,percentage:n.percentage,every:n.every,ads:n.ads.slice(),played:-1<r&&i}})),this._configAdBreaks.length?(this._dispatchAdManifestLoaded(),this._handlePrebidAdConfig(),this._handleConfiguredPreroll(),this._eventManager.listenOnce(this._player,l.Html5EventType.DURATION_CHANGE,(function(){e._player.isLive()?e._eventManager.listenOnce(e._player,l.Html5EventType.SEEKING,(function(){e._pushNextAdsForLive(e._configAdBreaks,(function(t){return e._player.currentTime+t.every})),e._attachLiveSeekedHandler()})):e._handleEveryAndPercentage(),e._configAdBreaks.sort((function(e,t){return e.position-t.position})),e._configAdBreaks.some((function(e){return e.position>0}))&&e._handleConfiguredMidrolls()}))):this.prerollReady=Promise.resolve()},s._validateOneTimeConfig=function(e){"number"==typeof e.position&&("number"==typeof e.percentage&&(r._logger.warn("Validate ad break - ignore percentage "+e.percentage+" as position "+e.position+" configured"),delete e.percentage),"number"==typeof e.every&&(r._logger.warn("Validate ad break - ignore every "+e.every+" as position "+e.position+" configured"),delete e.every)),"number"==typeof e.percentage&&"number"==typeof e.every&&(r._logger.warn("Validate ad break - ignore every "+e.every+" as percentage "+e.percentage+" configured"),delete e.every)},s._dispatchAdManifestLoaded=function(){var e=this,t=Array.from(new Set(this._configAdBreaks.map((function(e){return e.every&&e.every+"s"||"number"==typeof e.percentage&&e.percentage+"%"||e.position}))));r._logger.debug(l.AdEventType.AD_MANIFEST_LOADED,t),this._player.dispatchEvent(new l.FakeEvent(l.AdEventType.AD_MANIFEST_LOADED,{adBreaksPosition:t})),this._player.hasService("timeline")&&this._player.config.advertising.showAdBreakCuePoint&&t.forEach((function(t){e._player.getService("timeline").addCuePoint(Pt({time:-1!==t?t:1/0},e._player.config.advertising.adBreakCuePointStyle))}))},s._handlePrebidAdConfig=function(){var e=this;this._prebidManager&&this._configAdBreaks.filter((function(e){return!e.played})).map((function(t){var n=Promise.all(t.ads.map((function(t){return e._getPrebidAds(t)})));t.loadedPromise=n,n.then((function(e){return t.ads=e}))}))},s._getPrebidAds=function(e){var t=this;return new Promise((function(n){if(e.prebid&&t._prebidManager){var r=l.Utils.Object.mergeDeep({},e.prebid,t._player.config.advertising.prebid);t._prebidManager.load(r).then((function(t){var r=t.map((function(e){return e&&e.vastUrl}));e.url=r.concat(e.url),n(e)})).catch((function(){n(e)}))}else n(e)}))},s._handleConfiguredPreroll=function(){var e=this._configAdBreaks.filter((function(e){return 0===e.position&&!e.played})),t=this._mergeAdBreaks(e);this.prerollReady=t&&t.loadedPromise?t.loadedPromise:Promise.resolve(),t&&this._playAdBreak(t)},s._handleEveryAndPercentage=function(){var e=this;this._configAdBreaks.forEach((function(t){if(e._player.duration&&t.every)for(var n=2*t.every;n<=e._player.duration;)e._configAdBreaks.push({position:n,ads:t.ads,played:!1,loadedPromise:Promise.resolve()}),n+=t.every;else e._player.duration&&t.percentage&&!t.position&&(t.position=Math.floor(e._player.duration*t.percentage/100))}))},s._attachLiveSeekedHandler=function(){var e=this;this._eventManager.listenOnce(this._player,l.CustomEventType.FIRST_PLAYING,(function(){e._eventManager.listen(e._player,l.Html5EventType.SEEKING,(function(){e._liveSeeking=!0})),e._eventManager.listen(e._player,l.Html5EventType.SEEKED,(function(){e._liveSeeking=!1,e._pushNextAdsForLive(e._configAdBreaks,(function(t){return e._player.currentTime+t.every}))}))}))},s._pushNextAdsForLive=function(e,t){this._liveEventManager.removeAll();var n=[];e.forEach((function(e){if(![-1,0].includes(e.position)){var i=e.every,a=e.ads,o={every:i,position:t(e),ads:a,played:!1,loadedPromise:Promise.resolve()};r._logger.debug("Pushing next ad for live",o),n.push(o)}})),n.length&&(this._configAdBreaks=[].concat(n,this._configAdBreaks.filter((function(e){return-1===e.position}))))},s._handleConfiguredMidrolls=function(){var e=this;this._eventManager.listen(this._player,l.Html5EventType.TIME_UPDATE,(function(){if(!e._player.paused&&!e._liveSeeking){var t=e._configAdBreaks.filter((function(t){return!t.played&&e._player.currentTime&&t.position<=e._player.currentTime&&t.position>e._snapback}));if(t.length){var n=t[t.length-1].position,i=t.filter((function(e){return e.position===n}));if(e._player.isLive())!e._player.isDvr()||e._player.isOnLiveEdge()&&e._player.config.advertising.returnToLive?e._handleReturnToLive(i):e._pushNextAdsForLive(i,(function(t){return(e._player.isOnLiveEdge()?e._player.currentTime:t.position)+t.every}));else e._snapback=n,r._logger.debug("Set snapback value "+e._snapback),e._eventManager.listen(e._player,l.Html5EventType.SEEKED,(function(){var t=e._configAdBreaks.findIndex((function(t){return t.played&&"number"==typeof e._player.currentTime&&e._player.currentTime<t.position}));t>0&&!e._configAdBreaks[t-1].played&&(e._snapback=0,r._logger.debug("Reset snapback value"))}));var a=e._mergeAdBreaks(i);a&&e._playAdBreak(a)}}}))},s._handleReturnToLive=function(e){var t=this;this._liveEventManager.listenOnce(this._player,l.AdEventType.AD_ERROR,(function(){t._pushNextAdsForLive(e,(function(e){return(t._player.isOnLiveEdge()?t._player.currentTime:e.position)+e.every}))})),this._liveEventManager.listenOnce(this._player,l.AdEventType.AD_BREAK_END,(function(){t._player.seekToLiveEdge()}))},s._playAdBreak=function(e){var t=this._adsPluginControllers.find((function(e){return"function"==typeof e.playAdNow}));t?(e.played=!0,this._adIsLoading=!0,r._logger.debug("Playing ad break positioned in "+e.position),e.loadedPromise.then((function(){return t.playAdNow(e.ads)}))):r._logger.warn("No ads plugin registered")},s._onAdManifestLoaded=function(e){this._adBreaksLayout=Array.from(new Set(this._adBreaksLayout.concat(e.payload.adBreaksPosition))).sort(),this._allAdsCompleted=!1},s._onAdBreakStart=function(e){this._adBreak=e.payload.adBreak},s._onAdLoaded=function(){this._adIsLoading=!1},s._onAdStarted=function(e){this._ad=e.payload.ad,this._adPlayed=!0,this._isAdPlaying=!0},s._onAdBreakEnd=function(){this._adBreak=null,this._ad=null},s._onAdsCompleted=function(){this._adsPluginControllers.every((function(e){return e.done}))&&this._configAdBreaks.every((function(e){return e.played}))&&(this._allAdsCompleted=!0,r._logger.debug(l.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new l.FakeEvent(l.AdEventType.ALL_ADS_COMPLETED)))},s._onAdError=function(e){this._adIsLoading=!1,e.payload.severity===l.Error.Severity.CRITICAL&&(this._isAdPlaying=!1,this._adsPluginControllers.every((function(e){return e.done}))&&this._configAdBreaks.every((function(e){return e.played}))&&(this._allAdsCompleted=!0,this._adPlayed&&(r._logger.debug(l.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new l.FakeEvent(l.AdEventType.ALL_ADS_COMPLETED)))))},s._isBumper=function(e){return"bumper"===e.name},s._onEnded=function(){var e=this;if(!this._adIsLoading){var t=this._adsPluginControllers.find((function(t){return e._isBumper(t)})),n=this._adsPluginControllers.find((function(t){return!e._isBumper(t)&&!t.done})),r=t&&"function"==typeof t.onPlaybackEnded?function(){return t.onPlaybackEnded()}:function(){return Promise.resolve()},i=n&&"function"==typeof n.onPlaybackEnded?function(){return n.onPlaybackEnded()}:function(){return Promise.resolve()};this._adBreaksLayout.includes(-1)||this._adBreaksLayout.includes("100%")||(this._allAdsCompleted=!0),r().finally((function(){i().finally((function(){return e._handleConfiguredPostroll()}))}))}},s._onPlaybackEnded=function(){this._configAdBreaks.forEach((function(e){return e.played=!0}))},s._handleConfiguredPostroll=function(){var e=this._configAdBreaks.filter((function(e){return!e.played&&-1===e.position}));if(e.length){var t=this._mergeAdBreaks(e);t&&this._playAdBreak(t)}this._configAdBreaks.forEach((function(e){return e.played=!0}))},s._reset=function(){this._eventManager.removeAll(),this._liveEventManager.removeAll(),this._init()},s._destroy=function(){this._adsPluginControllers=[],this._eventManager.destroy(),this._liveEventManager.destroy()},s._mergeAdBreaks=function(e){if(e.length)return e.forEach((function(e){return e.played=!0})),{position:e[0].position,ads:e.reduce((function(e,t){return e.concat(t.ads)}),[]),played:!1,loadedPromise:Promise.all(e.map((function(e){return e.loadedPromise})))}},i=r,(a=[{key:"allAdsCompleted",get:function(){return this._allAdsCompleted}}])&&Dt(i.prototype,a),o&&Dt(i,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(l.FakeEventTarget);!function(e,t,n){(t=Ot(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Lt,"_logger",Object(l.getLogger)("AdsController"));var Mt=function(){function e(e){this._pluginManager=e}return e.prototype.getAdsControllers=function(){return Object.values(this._pluginManager.getAll()).filter((function(e){return"function"==typeof e.getAdsController})).map((function(e){return e.getAdsController()}))},e}();function Nt(e,t){return(Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ut(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ft=function(e){var t,n;function r(t){var n;return Ut(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n=e.call(this)||this),"id","PluginReadinessMiddleware"),n._plugins=t,r._logger.debug("plugins readiness",n._plugins),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,Nt(t,n);var i=r.prototype;return i.load=function(e){this._checkNextSettle(0,e)},i._checkNextSettle=function(e,t){e<this._plugins.length?this._checkSettle(e,t):this.callNext(t)},i._checkSettle=function(e,t){var n=this;(this._plugins[e].ready?this._plugins[e].ready:Promise.resolve()).then((function(){r._logger.debug("plugin "+n._plugins[e].name+" ready promise resolved"),n._checkNextSettle(e+1,t)})).catch((function(){r._logger.debug("plugin "+n._plugins[e].name+" ready promise rejected"),n._checkNextSettle(e+1,t)}))},i.play=function(e){this._checkNextSettle(0,e)},r}(l.BaseMiddleware);function jt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ut(Ft,"_logger",Object(l.getLogger)("PluginReadinessMiddleware"));var Bt=function(){function e(e){jt(this,"_textTrack",null),this._player=e}var t=e.prototype;return t._addTextTrack=function(){this._textTrack=this._player.addTextTrack(l.TextTrack.KIND.METADATA,"CuePoints")},t._getMetadataTracks=function(){return this._player.getNativeTextTracks().filter((function(e){return e.kind===l.TextTrack.KIND.METADATA&&e.cues}))},t._createTextTrackCue=function(e){var t=e.startTime,n=e.endTime,r=e.id,i=e.metadata;return Object(l.createTextTrackCue)({startTime:t,endTime:n,id:r,type:l.TimedMetadata.TYPE.CUE_POINT,metadata:i})},t._cuesSorter=function(e,t){return e.startTime-t.startTime},t.getAllCuePoints=function(){return this._getMetadataTracks().reduce((function(e,t){return e.concat(Array.from(t.cues).map((function(e){return Object(l.createTimedMetadata)(e)})))}),[]).sort(this._cuesSorter)},t.getActiveCuePoints=function(){return this._getMetadataTracks().reduce((function(e,t){return e.concat(Array.from(t.activeCues).map((function(e){return Object(l.createTimedMetadata)(e)})))}),[]).sort(this._cuesSorter)},t._getTextTrackCueById=function(e){var t=null;return this._getMetadataTracks().some((function(n){return t=n.cues.getCueById(e)})),t},t._removeTextTrackCue=function(e){this._getMetadataTracks().forEach((function(t){try{t.removeCue(e)}catch(e){}}))},t.addCuePoints=function(e){var t=this;this._player.ready().then((function(){t._textTrack||t._addTextTrack();var n=[];e.forEach((function(e){var r,i=t._createTextTrackCue(e),a=t._getTextTrackCueById(e.id);a&&t._removeTextTrackCue(a),null==(r=t._textTrack)||r.addCue(i),n.push(Object(l.createTimedMetadata)(i))})),t._player.dispatchEvent(new l.FakeEvent(l.EventType.TIMED_METADATA_ADDED,{cues:n}))}))},t._clearAllTextTrackCues=function(){var e=this;this._getMetadataTracks().forEach((function(t){for(;t.cues.length;)e._removeTextTrackCue(t.cues[0])}))},t.reset=function(){this._clearAllTextTrackCues()},t.destroy=function(){this.reset()},e}();function Vt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ht=function(){function e(t){var n=this;Vt(this,"_servicesRegistry",new Map),e._logger=Object(l.getLogger)("ServiceProvider"),this._eventManager=new l.EventManager,this._eventManager.listen(t,t.Event.Core.PLAYER_RESET,(function(){return n.reset()}))}var t=e.prototype;return t.register=function(t,n){this._servicesRegistry.has(t)?e._logger.debug(t+" service already exists"):(this._servicesRegistry.set(t,n),e._logger.debug(t+" service registered"))},t.get=function(e){return this._servicesRegistry.get(e)},t.has=function(e){return this._servicesRegistry.has(e)},t.reset=function(){this._servicesRegistry.forEach((function(e){return"function"==typeof e.reset&&e.reset()}))},t.destroy=function(){this._servicesRegistry.forEach((function(e){return"function"==typeof e.destroy&&e.destroy()})),this._eventManager.removeAll(),this._servicesRegistry.clear()},e}();function Kt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Gt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Gt(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */zt=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),s=new w(i||[]);return r(o,"_invoke",{value:E(e,n,s)}),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function d(){}function f(){}function h(){}var g={};l(g,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==t&&n.call(v,a)&&(g=v);var m=h.prototype=d.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var i;r(this,"_invoke",{value:function(r,a){function o(){return new t((function(i,o){!function r(i,a,o,s){var l=c(e[i],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(p).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,s)}))}s(l.arg)}(r,a,i,o)}))}return i=i?i.then(o,o):o()}})}function E(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new _(u(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(m),l(m,s,"Generator"),l(m,a,(function(){return this})),l(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=S,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function Wt(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function Yt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Wt(a,r,i,o,s,"next",e)}function s(e){Wt(a,r,i,o,s,"throw",e)}o(void 0)}))}}var qt=[["widevine","com.widevine.alpha"],["playready","com.microsoft.playready"],["fairplay","com.apple.fps"]],Xt=Object(l.getLogger)("MediaCapabilities"),$t=1,Qt=0,Zt=-1;function Jt(){return(Jt=Yt(zt().mark((function e(t){var n,r,i;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Xt.debug("Starting to get media capabilities..."),e.next=4,nn(t);case 4:return r=e.sent,e.next=7,en();case 7:return i=e.sent,n=Object.assign({},r,i),Xt.debug("Finished getting media capabilities ",{mediaCapabilities:n}),e.abrupt("return",n);case 13:return e.prev=13,e.t0=e.catch(0),Xt.debug("There was a problem with getting the media capabilities, ",e.t0.message),n={isHEVCSupported:Qt,isPowerEfficient:Qt,isDRMSupported:Qt,supportedDRMs:[]},Xt.debug("Returning media capabilities defaults ",{mediaCapabilities:n}),e.abrupt("return",n);case 19:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function en(){return tn.apply(this,arguments)}function tn(){return(tn=Yt(zt().mark((function e(){var t,n,r,i,a,o,s,l;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={isDRMSupported:Zt,supportedDRMs:[]},navigator.requestMediaKeySystemAccess){e.next=3;break}return e.abrupt("return",t);case 3:n=[{initDataTypes:["cenc"],videoCapabilities:[{contentType:'video/mp4;codecs="avc1.42E01E"'}]}],r=new Map(qt),i=Kt(r);case 6:if((a=i()).done){e.next=19;break}return o=a.value,s=o[0],l=o[1],e.prev=8,e.next=11,navigator.requestMediaKeySystemAccess(l,n);case 11:t.supportedDRMs.push(s),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),Xt.debug(l+" not supported ("+e.t0.name+": "+e.t0.message+").");case 17:e.next=6;break;case 19:return t.isDRMSupported=t.supportedDRMs.length>0?$t:Qt,e.abrupt("return",t);case 21:case"end":return e.stop()}}),e,null,[[8,14]])})))).apply(this,arguments)}function nn(e){return rn.apply(this,arguments)}function rn(){return(rn=Yt(zt().mark((function e(t){var n,r,i;return zt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={isHEVCSupported:Zt,isPowerEfficient:Zt},navigator.mediaCapabilities&&navigator.mediaCapabilities.decodingInfo){e.next=3;break}return e.abrupt("return",n);case 3:return r={type:"media-source",video:{contentType:'video/mp4; codecs="hvc1.1.6.L150.90"',width:(null==t?void 0:t.width)||1920,height:(null==t?void 0:t.height)||1080,bitrate:(null==t?void 0:t.bitrate)||12e5,framerate:(null==t?void 0:t.framerate)||30}},e.prev=4,e.next=7,navigator.mediaCapabilities.decodingInfo(r);case 7:i=e.sent,n.isHEVCSupported=i.supported?$t:Qt,n.isPowerEfficient=i.powerEfficient?$t:Qt,e.next=17;break;case 12:e.prev=12,e.t0=e.catch(4),Xt.debug("Failed to get the media capabilities from navigator. ("+e.t0.name+": "+e.t0.message+")."),n.isHEVCSupported=Zt,n.isPowerEfficient=Zt;case 17:return e.abrupt("return",n);case 18:case"end":return e.stop()}}),e,null,[[4,12]])})))).apply(this,arguments)}var an=function(e){return Jt.apply(this,arguments)};function on(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */on=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function u(e,t,n,i){var a=t&&t.prototype instanceof d?t:d,o=Object.create(a.prototype),s=new w(i||[]);return r(o,"_invoke",{value:E(e,n,s)}),o}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var p={};function d(){}function f(){}function h(){}var g={};l(g,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(S([])));v&&v!==t&&n.call(v,a)&&(g=v);var m=h.prototype=d.prototype=Object.create(g);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){var i;r(this,"_invoke",{value:function(r,a){function o(){return new t((function(i,o){!function r(i,a,o,s){var l=c(e[i],e,a);if("throw"!==l.type){var u=l.arg,p=u.value;return p&&"object"==typeof p&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(p).then((function(e){u.value=e,o(u)}),(function(e){return r("throw",e,o,s)}))}s(l.arg)}(r,a,i,o)}))}return i=i?i.then(o,o):o()}})}function E(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return C()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function T(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function S(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:C}}function C(){return{value:void 0,done:!0}}return f.prototype=h,r(m,"constructor",{value:h,configurable:!0}),r(h,"constructor",{value:f,configurable:!0}),f.displayName=l(h,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,l(e,s,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},b(_.prototype),l(_.prototype,o,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,i,a){void 0===a&&(a=Promise);var o=new _(u(t,n,r,i),a);return e.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},b(m),l(m,s,"Generator"),l(m,a,(function(){return this})),l(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=S,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return o.type="throw",o.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var s=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(s&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,p):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),A(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;A(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},e}function sn(e,t,n,r,i,a,o){try{var s=e[a](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function ln(){return(ln=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function un(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,fn(r.key),r)}}function cn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pn(e,t){return(pn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dn(e,t,n){return(t=fn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fn(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var hn=function(e){var t,n;function r(t){var n;dn(cn(n=e.call(this)||this),"_eventManager",new l.EventManager),dn(cn(n),"_mediaInfo",null),dn(cn(n),"_remotePlayer",null),dn(cn(n),"_pluginManager",new ee),dn(cn(n),"_pluginsConfig",{}),dn(cn(n),"_reset",!0),dn(cn(n),"_firstPlay",!0),dn(cn(n),"_sourceSelected",null),dn(cn(n),"_appPluginConfig",{}),dn(cn(n),"_thumbnailManager",null),dn(cn(n),"_isVisible",!1),dn(cn(n),"_autoPaused",!1);var r=t.sources,i=t.plugins;n._configEvaluator=new fe,n._configEvaluator.evaluatePluginsConfig(i,t),n._playbackStart=!1;var a=l.Utils.Object.mergeDeep({},t);delete a.plugins,delete a.sources,n._localPlayer=Object(l.loadPlayer)(a),n._controllerProvider=new Mt(n._pluginManager),n._viewabilityManager=new L(n.config.viewability),n._uiWrapper=new ke(cn(n),l.Utils.Object.mergeDeep(t,{ui:{logger:{getLogger:l.getLogger,LogLevel:l.LogLevel}}})),n._serviceProvider=new Ht(cn(n)),n._cuepointManager=new Bt(cn(n)),n._provider=new c.Provider(l.Utils.Object.mergeDeep(t.provider,{logger:{getLogger:l.getLogger,LogLevel:l.LogLevel}}),"3.14.3-canary.0-99a98cb"),n._playlistManager=new Oe(cn(n),t),Object.values(l.EventType).forEach((function(e){return n._eventManager.listen(n._localPlayer,e,(function(e){return n.dispatchEvent(e)}))})),n._addBindings();var o=l.Utils.Object.mergeDeep({},t.playlist,{items:null});return n._playlistManager.configure(o),n.configure({plugins:i}),n._playlistManager.configure({items:t.playlist&&t.playlist.items||[]}),n._localPlayer.setSources(r||{}),n._remotePlayerManager=new mt,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,pn(t,n);var i,a,o,s=r.prototype;return s.loadMedia=function(e,t){var n=this;return r._logger.debug("loadMedia",e),this._mediaInfo=e,this.reset(),this._localPlayer.loadingMedia=!0,this._uiWrapper.setLoadingSpinnerState(!0),new Promise((function(r,i){n._provider.getMediaConfig(e).then((function(e){var i=l.Utils.Object.copyDeep(e);t&&(i.sources=i.sources||{},i.sources=l.Utils.Object.mergeDeep(i.sources,t));var a=X(i.plugins,n.config.plugins);i.plugins=a[0],n._appPluginConfig=a[1],n.configure(d({sources:n.sources},i)),n.setMedia(i),r(i)}),(function(e){var t=new l.Error(l.Error.Severity.CRITICAL,l.Error.Category.PLAYER,l.Error.Code.LOAD_FAILED,e);n._localPlayer.dispatchEvent(new l.FakeEvent(l.EventType.ERROR,t)),i(e)}))}))},s.setMedia=function(e){r._logger.debug("setMedia",e),this.reset(!0);var t=l.Utils.Object.copyDeep(e),n=l.Utils.Object.mergeDeep({},t.sources,this._localPlayer.sources);delete t.sources,l.Utils.Object.mergeDeep(t.session,this._localPlayer.config.session),t.plugins=t.plugins||{},Object.keys(this._pluginsConfig).forEach((function(e){t.plugins[e]=t.plugins[e]||{}})),this.configure({session:e.session}),Y(n)||q(n)?this._thumbnailManager=null:this._thumbnailManager=new me(this,this.config.ui,e),this.updateKalturaPoster(n,e.sources,this._localPlayer.dimensions),O(this,ln({},t,{sources:n}));var i=function(e,t){return t&&Y(t)?W(e,"youtube","progressive"):t&&q(t)?W(e,"image","image"):null}(this,n);i&&(t.playback=i),this.configure(ln({},t,{sources:n}))},s.updateKalturaPoster=function(e,t,n){var r,i;!function(e,t,n,r){var i=e.poster,a=t.poster,o=n.width,s=n.height;"string"==typeof i&&ve.test(i)&&i===a&&(e.poster=i+"/height/"+s+"/width/"+o+(r?"/ks/"+r:"")),t.poster=e.poster||""}(e,t,n,this.shouldAddKs()?null==(r=this.config)||null==(i=r.session)?void 0:i.ks:"")},s.shouldAddKs=function(e){var t,n;return!(!this.config.provider.loadThumbnailWithKs||!1!==(null==(t=e||this.config)||null==(n=t.session)?void 0:n.isAnonymous))},s.loadPlaylist=function(e,t){var n=this;return r._logger.debug("loadPlaylist",e),this._uiWrapper.setLoadingSpinnerState(!0),new Promise((function(r,i){n._provider.getPlaylistConfig(e).then((function(e){n.setPlaylist(e,t),r(e)}),(function(e){var t=new l.Error(l.Error.Severity.CRITICAL,l.Error.Category.PLAYER,l.Error.Code.LOAD_FAILED,e);n._localPlayer.dispatchEvent(new l.FakeEvent(l.EventType.ERROR,t)),i(e)}))}))},s.loadPlaylistByEntryList=function(e,t){var n=this;return r._logger.debug("loadPlaylistByEntryList",e),this._uiWrapper.setLoadingSpinnerState(!0),new Promise((function(r,i){n._provider.getEntryListConfig(e).then((function(i){n.setPlaylist(i,t,e),r(i)}),(function(e){var t=new l.Error(l.Error.Severity.CRITICAL,l.Error.Category.PLAYER,l.Error.Code.LOAD_FAILED,e);n._localPlayer.dispatchEvent(new l.FakeEvent(l.EventType.ERROR,t)),i(e)}))}))},s.setPlaylist=function(e,t,n){r._logger.debug("setPlaylist",e);var i={playlist:e,plugins:{}};Object.keys(this._pluginsConfig).forEach((function(e){i.plugins[e]={}})),this._configEvaluator.evaluatePluginsConfig(i.plugins,i),this._configureOrLoadPlugins(i.plugins),this._playlistManager.load(e,t,n)},s.getMediaInfo=function(){return l.Utils.Object.copyDeep(this._mediaInfo)},s.getDrmInfo=function(){return this._localPlayer.getDrmInfo()},s.getMediaConfig=function(){var e={sources:this._localPlayer.sources,plugins:this._pluginsConfig};return l.Utils.Object.copyDeep(e)},s.setSourcesMetadata=function(e){this._localPlayer.setSourcesMetadata(e)},s.configure=function(e){void 0===e&&(e={}),e=z(e);var t=l.Utils.Object.mergeDeep({},this.config,e);this._configEvaluator.evaluatePluginsConfig(e.plugins,t),this._configureOrLoadPlugins(e.plugins);var n=l.Utils.Object.mergeDeep({},e);if(delete n.plugins,n.sources){var r=n.sources;delete n.sources,this._localPlayer.configure(n),this._localPlayer.setSources(r||{})}else this._localPlayer.configure(n);e.ui&&this._uiWrapper.setConfig(t.ui),e.playlist&&this._playlistManager.configure(e.playlist)},s.ready=function(){return this._localPlayer.ready()},s.load=function(){this._localPlayer.load()},s.play=function(){this._localPlayer.play()},s.pause=function(){this._localPlayer.pause()},s.getView=function(){return this._localPlayer.getView()},s.getVideoElement=function(){return this._localPlayer.getVideoElement()},s.reset=function(e){var t;(void 0===e&&(e=!1),this._reset)||(this._reset=!0,this._firstPlay=!0,this._sourceSelected=null,this._attachEventManager&&this._attachEventManager.removeAll(),this._uiWrapper.reset(),this._resetProviderPluginsConfig(),this._pluginManager.reset(),this._cuepointManager.reset(),this._localPlayer.reset(e),null==(t=this._thumbnailManager)||t.destroy())},s.destroy=function(){var e,t=this.config.ui.targetId;this._reset=!0,this._playbackStart=!1,this._firstPlay=!0,this._uiWrapper.destroy(),this._pluginManager.destroy(),this._cuepointManager.destroy(),this._playlistManager.destroy(),this._localPlayer.destroy(),this._eventManager.destroy(),null==(e=this._thumbnailManager)||e.destroy(),this._viewabilityManager.destroy(),this._remotePlayerManager.destroy(),this._pluginsConfig={};var n=document.getElementById(t);n&&n.parentNode&&l.Utils.Dom.removeChild(n.parentNode,n)},s.isLive=function(){return this._localPlayer.isLive()},s.isOnLiveEdge=function(){return this._localPlayer.isOnLiveEdge()},s.isDvr=function(){return this._localPlayer.isDvr()},s.isUntimedImg=function(){return q(this.sources)&&!("number"==typeof this.config.sources.duration&&this.config.sources.duration>0)},s.isImage=function(){return q(this.sources)},s.seekToLiveEdge=function(){this._localPlayer.seekToLiveEdge()},s.getStartTimeOfDvrWindow=function(){return this._localPlayer.getStartTimeOfDvrWindow()},s.getTracks=function(e){return this._localPlayer.getTracks(e)},s.getActiveTracks=function(){return this._localPlayer.getActiveTracks()},s.selectTrack=function(e){this._localPlayer.selectTrack(e)},s.hideTextTrack=function(){this._localPlayer.hideTextTrack()},s.showTextTrack=function(){this._localPlayer.showTextTrack()},s.enableAdaptiveBitrate=function(){this._localPlayer.enableAdaptiveBitrate()},s.isAdaptiveBitrateEnabled=function(){return this._localPlayer.isAdaptiveBitrateEnabled()},s.setTextDisplaySettings=function(e){this._localPlayer.setTextDisplaySettings(e)},s.isFullscreen=function(){return this._localPlayer.isFullscreen()},s.notifyEnterFullscreen=function(){this._localPlayer.notifyEnterFullscreen()},s.notifyExitFullscreen=function(){this._localPlayer.notifyExitFullscreen()},s.enterFullscreen=function(e){var t=e||this.config.ui.targetId;this._localPlayer.enterFullscreen(t)},s.exitFullscreen=function(){this._localPlayer.exitFullscreen()},s.enterPictureInPicture=function(){this._localPlayer.enterPictureInPicture()},s.exitPictureInPicture=function(){this._localPlayer.exitPictureInPicture()},s.isInPictureInPicture=function(){return this._localPlayer.isInPictureInPicture()},s.isPictureInPictureSupported=function(){return this._localPlayer.isPictureInPictureSupported()},s.getLogLevel=function(e){return this._localPlayer.getLogLevel(e)},s.startCasting=function(e){var t=this;return this.setIsCastInitiator(e,!0),new Promise((function(n,r){t.remotePlayerManager.startCasting(e).then(n).catch((function(){t.setIsCastInitiator(e,!1),r()}))}))},s.setIsCastInitiator=function(e,t){this._remotePlayerManager.setIsCastInitiator(e,t)},s.isCastAvailable=function(e){return this._remotePlayerManager.isCastAvailable(e)},s.getCastSession=function(){return null},s.stopCasting=function(){},s.isCasting=function(){return!1},s.isVr=function(){return this._localPlayer.isVr()},s.toggleVrStereoMode=function(){var e=this._pluginManager.get("vr");e&&"function"==typeof e.toggleVrStereoMode&&e.toggleVrStereoMode()},s.isInVrStereoMode=function(){var e=this._pluginManager.get("vr");return!(!e||"function"!=typeof e.isInStereoMode)&&e.isInStereoMode()},s.setLogLevel=function(e,t){this._localPlayer.setLogLevel(e,t)},s.getThumbnail=function(e){if(!e){if(isNaN(this.currentTime))return null;e=this.currentTime}if(e=this.isLive()?e+this.getStartTimeOfDvrWindow():e,this._thumbnailManager)return this._thumbnailManager.getThumbnail(e)},s._addBindings=function(){var e=this;this._eventManager.listen(this,l.EventType.CHANGE_SOURCE_STARTED,(function(){return e._onChangeSourceStarted()})),this._eventManager.listen(this,l.EventType.CHANGE_SOURCE_ENDED,(function(){return e._onChangeSourceEnded()})),this._eventManager.listen(this,l.EventType.PLAYER_RESET,(function(){return e._onPlayerReset()})),this._eventManager.listen(this,l.EventType.ENDED,(function(){return e._onEnded()})),this._eventManager.listen(this,l.EventType.FIRST_PLAY,(function(){return e._firstPlay=!1})),this._eventManager.listen(this,l.EventType.SOURCE_SELECTED,(function(t){return e._sourceSelected=t.payload.selectedSource[0]})),this._eventManager.listen(this,l.EventType.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this,l.EventType.PLAYBACK_START,(function(){e._playbackStart=!0})),this._eventManager.listen(this,l.AdEventType.AD_AUTOPLAY_FAILED,(function(t){return e._onAdAutoplayFailed(t)})),this._eventManager.listen(this,l.AdEventType.AD_STARTED,(function(){return e._onAdStarted()})),this.config.playback.playAdsWithMSE&&(this._attachEventManager=new l.EventManager,this._eventManager.listen(this,l.AdEventType.AD_LOADED,(function(t){var n=t.payload.ad;n&&n.linear&&1===n.position&&!n.inStream&&e.src?(e._attachEventManager.listenOnce(e,l.AdEventType.AD_BREAK_START,(function(){return e.detachMediaSource()})),e._attachEventManager.listenOnce(e,l.AdEventType.AD_BREAK_END,(function(){return e.attachMediaSource()})),e._attachEventManager.listenOnce(e,l.AdEventType.AD_ERROR,(function(){return e.attachMediaSource()}))):e._attachEventManager.removeAll()}))),this._eventManager.listen(this,l.EventType.ERROR,(function(t){t.payload.severity===l.Error.Severity.CRITICAL&&(e._reset=!1)}))},s._onChangeSourceEnded=function(){l.Utils.Object.getPropertyPath(this.config,"ui.targetId")?this._viewabilityManager.observe(l.Utils.Dom.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this)):r._logger.warn("Cannot observe visibility change without config.ui.targetId")},s._onPlayerReset=function(){this._playbackStart=!1,l.Utils.Object.getPropertyPath(this.config,"ui.targetId")&&this._viewabilityManager.unObserve(l.Utils.Dom.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this))},s._onChangeSourceStarted=function(){this._configureOrLoadPlugins(this._pluginsConfig),this.reset(),this._pluginManager.loadMedia(),this._reset=!1},s._onEnded=function(){var e=this;setTimeout((function(){e._adsController&&!e._adsController.allAdsCompleted?e._eventManager.listenOnce(e._adsController,l.AdEventType.ALL_ADS_COMPLETED,(function(){e.dispatchEvent(new l.FakeEvent(l.EventType.PLAYBACK_ENDED))})):e.dispatchEvent(new l.FakeEvent(l.EventType.PLAYBACK_ENDED))}))},s._onPlaybackEnded=function(){this.config.playback.loop&&(this.currentTime=0,this.play())},s._onAdStarted=function(){this._firstPlay&&(this._localPlayer.posterManager.hide(),this._localPlayer.hideBlackCover())},s._onAdAutoplayFailed=function(e){this._firstPlay&&this.config.playback.autoplay&&(this._localPlayer.posterManager.show(),this.dispatchEvent(new l.FakeEvent(l.EventType.AUTOPLAY_FAILED,e.payload)))},s._configureOrLoadPlugins=function(e){var t=this;void 0===e&&(e={});var n=[],r=[],i=[];Object.keys(e).forEach((function(a){var o=t._pluginManager.get(a);if(o)o.updateConfig(e[a]),e[a]=o.getConfig();else if(t._sourceSelected)delete e[a];else{try{t._pluginManager.load(a,t,e[a])}catch(e){t.dispatchEvent(new l.FakeEvent(l.Error.Code.ERROR,e))}var s=t._pluginManager.get(a);s&&(i.push(s),e[a]=s.getConfig(),"function"==typeof s.getMiddlewareImpl&&("bumper"===s.name?n.push(s.getMiddlewareImpl()):n.unshift(s.getMiddlewareImpl())),"function"==typeof s.getUIComponents&&r.push.apply(r,s.getUIComponents()||[]),"function"==typeof s.getEngineDecorator&&t._localPlayer.registerEngineDecoratorProvider(new l.EngineDecoratorProvider(s)))}})),r.forEach((function(e){return t._uiWrapper.addComponent(e)})),this._pluginReadinessMiddleware||(this._pluginReadinessMiddleware=new Ft(i),this._localPlayer.playbackMiddleware.use(this._pluginReadinessMiddleware)),this._maybeCreateAdsController(),n.forEach((function(e){return t._localPlayer.playbackMiddleware.use(e)})),l.Utils.Object.mergeDeep(this._pluginsConfig,e)},s._maybeCreateAdsController=function(){var e=this;if(!this._adsController){var t=this._controllerProvider.getAdsControllers();t.length&&(this._adsController=new Lt(this,t),this._localPlayer.playbackMiddleware.use(this._adsController.getMiddleware()),this._eventManager.listen(this._adsController,l.AdEventType.ALL_ADS_COMPLETED,(function(t){e.dispatchEvent(t)})))}},s.attachMediaSource=function(){this._localPlayer.attachMediaSource()},s.detachMediaSource=function(){this._localPlayer.detachMediaSource()},s._resetProviderPluginsConfig=function(){this.configure({plugins:this._appPluginConfig}),this._appPluginConfig={}},s._handleVisibilityChange=function(e){this._isVisible=e,this.dispatchEvent(new l.FakeEvent("visibilitychange",{visible:this._isVisible})),this.config.playback.autoplay===l.AutoPlayType.IN_VIEW&&this._isVisible&&!this._playbackStart&&this._localPlayer.play({programmatic:!0}),!0===this.config.playback.autopause&&this._handleAutoPause(e)},s._handleAutoPause=function(e){var t=!this.paused||this._adsController&&this._adsController.isAdPlaying(),n=!this.isInPictureInPicture()&&this._playbackStart&&t;e?this._autoPaused&&(this.paused&&this.play(),this._autoPaused=!1):n&&(this.pause(),this._autoPaused=!0)},s.getService=function(e){return this._serviceProvider.get(e)},s.hasService=function(e){return this._serviceProvider.has(e)},s.registerService=function(e,t){this._serviceProvider.register(e,t)},s.addTextTrack=function(e,t){return this._localPlayer.addTextTrack(e,t)},s.getNativeTextTracks=function(){return this._localPlayer.getNativeTextTracks()},s.getMediaCapabilities=function(){var e,t=(e=on().mark((function e(t){return on().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",an(t));case 1:case"end":return e.stop()}}),e)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){sn(a,r,i,o,s,"next",e)}function s(e){sn(a,r,i,o,s,"throw",e)}o(void 0)}))});return function(e){return t.apply(this,arguments)}}(),i=r,(a=[{key:"textDisplaySetting",get:function(){return this._localPlayer.textDisplaySetting}},{key:"textStyle",get:function(){return this._localPlayer.textStyle},set:function(e){this._localPlayer.textStyle=e}},{key:"buffered",get:function(){return this._localPlayer.buffered}},{key:"stats",get:function(){return this._localPlayer.stats}},{key:"currentTime",get:function(){return this._localPlayer.currentTime},set:function(e){this._localPlayer.currentTime=e}},{key:"duration",get:function(){return this._localPlayer.duration}},{key:"liveDuration",get:function(){return this._localPlayer.liveDuration}},{key:"normalizedCurrentTime",get:function(){return this.isLive()?this.currentTime-this.getStartTimeOfDvrWindow():this.currentTime},set:function(e){this.isLive()?this.currentTime=e+this.getStartTimeOfDvrWindow():this.currentTime=e}},{key:"normalizedDuration",get:function(){return this.isLive()?this.liveDuration-this.getStartTimeOfDvrWindow():this.duration}},{key:"volume",get:function(){return this._localPlayer.volume},set:function(e){this._localPlayer.volume=e}},{key:"paused",get:function(){return this._localPlayer.paused}},{key:"seeking",get:function(){return this._localPlayer.seeking}},{key:"playsinline",get:function(){return this._localPlayer.playsinline},set:function(e){this._localPlayer.playsinline=e}},{key:"muted",get:function(){return this._localPlayer.muted},set:function(e){this._localPlayer.muted=e}},{key:"src",get:function(){return this._localPlayer.src}},{key:"videoHeight",get:function(){return this._localPlayer.videoHeight}},{key:"videoWidth",get:function(){return this._localPlayer.videoWidth}},{key:"dimensions",get:function(){return this._localPlayer.dimensions},set:function(e){this._localPlayer.dimensions=e}},{key:"poster",get:function(){return this._localPlayer.poster}},{key:"ended",get:function(){return this._localPlayer.ended}},{key:"playbackRate",get:function(){return this._localPlayer.playbackRate},set:function(e){this._localPlayer.playbackRate=e}},{key:"playbackRates",get:function(){return this._localPlayer.playbackRates}},{key:"defaultPlaybackRate",get:function(){return this._localPlayer.defaultPlaybackRate}},{key:"engineType",get:function(){return this._localPlayer.engineType}},{key:"streamType",get:function(){return this._localPlayer.streamType}},{key:"env",get:function(){return this._localPlayer.env}},{key:"selectedSource",get:function(){return this._sourceSelected}},{key:"sources",get:function(){return ln({},this._localPlayer.sources)}},{key:"config",get:function(){return ln({},this._localPlayer.config,{plugins:this._pluginsConfig,sources:this._localPlayer.sources})}},{key:"hasUserInteracted",get:function(){return this._localPlayer.hasUserInteracted}},{key:"loadingMedia",set:function(e){this._localPlayer.loadingMedia=e}},{key:"ads",get:function(){return this._adsController}},{key:"plugins",get:function(){return this._pluginManager.getAll()}},{key:"provider",get:function(){return this._provider}},{key:"ui",get:function(){return this._uiWrapper}},{key:"playlist",get:function(){return this._playlistManager}},{key:"Event",get:function(){return ln({Cast:Le,Core:l.EventType,Playlist:Te,UI:u.EventType},l.EventType,{VISIBILITY_CHANGE:"visibilitychange"})}},{key:"TextStyle",get:function(){return this._localPlayer.TextStyle}},{key:"ViewabilityType",get:function(){return M}},{key:"State",get:function(){return this._localPlayer.State}},{key:"Track",get:function(){return this._localPlayer.Track}},{key:"LogLevelType",get:function(){return this._localPlayer.LogLevelType}},{key:"LogLevel",get:function(){return this._localPlayer.LogLevel}},{key:"AbrMode",get:function(){return this._localPlayer.AbrMode}},{key:"MediaType",get:function(){return this._localPlayer.MediaType}},{key:"StreamType",get:function(){return this._localPlayer.StreamType}},{key:"EngineType",get:function(){return this._localPlayer.EngineType}},{key:"Error",get:function(){return this._localPlayer.Error}},{key:"crossOrigin",get:function(){return this._localPlayer.crossOrigin},set:function(e){this._localPlayer.crossOrigin=e}},{key:"isVisible",get:function(){return this._isVisible}},{key:"viewabilityManager",get:function(){return this._viewabilityManager}},{key:"cuePointManager",get:function(){return this._cuepointManager}},{key:"remotePlayerManager",get:function(){return this._remotePlayerManager}}])&&un(i.prototype,a),o&&un(i,o),Object.defineProperty(i,"prototype",{writable:!1}),r}(l.FakeEventTarget);dn(hn,"_logger",Object(l.getLogger)("KalturaPlayer"+l.Utils.Generator.uniqueId(5)));var gn={};function yn(){return gn}function vn(e){return gn[e]?gn[e]:null}var mn=["_remotePlayer","_listeners","_uiWrapper"],bn={get:function(e,t){if("destroy"===t){var n=e.config.targetId;delete gn[n]}return t in l.FakeEventTarget.prototype||mn.includes(t)?e[t]:e._remotePlayer&&t in e._remotePlayer?e._remotePlayer[t]:e[t]},set:function(e,t,n){return e._remotePlayer&&!mn.includes(t)?t in e._remotePlayer&&(e._remotePlayer[t]=n):e[t]=n,!0}};function _n(e){!function(e){!1!==l.Utils.Object.getPropertyPath(e,"log.playerVersion")&&(Object(l.setLogLevel)(l.LogLevel.INFO),Object(l.getLogger)().log("%c @playkit-js/kaltura-player-js 3.14.3-canary.0-99a98cb","color: #ff98f9; font-size: large"),Object(l.getLogger)().log("%c For more details see https://github.com/kaltura/kaltura-player-js","color: #ff98f9;"))}(e),B(e=z(e));var t=G(e);!function(e){var t,n=e.provider,r=null==(t=K())?void 0:t.productVersion;if(!n.partnerId||2504201===n.partnerId){var i={url:"https://analytics.kaltura.com/api_v3/index.php?service=analytics&action=trackEvent&apiVersion=3.3.0&format=1&eventType=1&partnerId=2504201&entryId=1_3bwzbc9o&&eventIndex=1&position=0",mimetype:""};i.url=function(e,t){return t&&(e+="&clientVer="+t),e}(i.url,r),i.url=P(i.url),i.url=R(i.url,r),i.url=x(i.url,l.Utils.Generator.guid()+":"+l.Utils.Generator.guid()),navigator.sendBeacon&&navigator.sendBeacon(i.url)}}(t),V(t),function(e){var t=parseFloat(H("kalturaStartTime"));isNaN(t)||l.Utils.Object.createPropertyPath(e,"sources.startTime",t)}(t),j.forEach((function(e){return Object(l.getLogger)("KalturaPlayer:Setup")[e.level](e.msg)})),function(e){!e.disableUserCache&&k.isLocalStorageAvailable()&&k.hasStorage()&&l.Utils.Object.mergeDeep(e,k.getStorageConfig())}(t);var n=function(e){var t=new hn(e),n=new Proxy(t,bn);return gn[e.targetId]=n,n}(t);return function(e){if(!e.config.disableUserCache&&k.isLocalStorageAvailable()){var t=k.getPlayerTextStyle();t&&(e.textStyle=l.Utils.Object.mergeDeep(new l.TextStyle,t))}}(n),function(e){k.isLocalStorageAvailable()&&k.attach(e)}(n),function(e,t){e.cast&&t.remotePlayerManager.load(e.cast,t)}(t,n),function(e){if(l.Env.isIOS||l.Env.isIPadOS){var t=function t(){e.removeEventListener(e.Event.UI.UI_CLICKED,t),Object(l.setCapabilities)(l.EngineType.HTML5,{autoplay:!0})};e.addEventListener(e.Event.SOURCE_SELECTED,(function n(){e.removeEventListener(e.Event.SOURCE_SELECTED,n),e.addEventListener(e.Event.UI.UI_CLICKED,t)}))}}(n),n}var En=function(){function e(){}return e.toCastTextStyle=function(t){if(window.chrome&&window.chrome.cast){var n=new window.chrome.cast.media.TextTrackStyle;return n.fontFamily=t.fontFamily,n.backgroundColor=e.rgbToHex(t.backgroundColor),n.foregroundColor=e.rgbToHex(t.fontColor),n.fontScale=Number.parseFloat(t.fontSize)/100,n}return{}},e.toPlayerTextStyle=function(t){var n=new l.TextStyle;return n.fontFamily=t.fontFamily,n.fontSize=100*t.fontScale+"%",n.fontColor=e.hexToRGB(t.foregroundColor),n.backgroundColor=e.hexToRGB(t.backgroundColor),n},e.rgbToHex=function(e){var t="#"+("0"+parseInt(e[0],10).toString(16)).slice(-2)+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2);if(e[3]){var n=e[3];n=Math.round(100*n)/100,t+=(Math.round(255*n)+65536).toString(16).substr(-2).toUpperCase()}else t+="FF";return t.toUpperCase()},e.hexToRGB=function(e){for(var t=[],n=(e=e.slice(1)).match(/.{1,2}/g),r=0;r<3;r++){var i=n&&n[r];i&&t.push(parseInt(i,16))}return t},e}();function kn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Tn(e,t)}function Tn(e,t){return(Tn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var An={ACTION:"action",EVENT:"event"},wn=function(e){this.type=e},Sn=function(e){function t(t,n){var r;return(r=e.call(this,An.EVENT)||this).event=t,r.payload=n,r}return kn(t,e),t}(wn),Cn=function(e){function t(t,n){var r;return(r=e.call(this,An.ACTION)||this).action=t,r.args=n,r}return kn(t,e),t}(wn),xn={registerRemotePlayer:mt.register,PlayerSnapshot:Me,RemoteControl:it,RemoteSession:Be,BaseRemotePlayer:ze,RemoteConnectedPayload:tt,RemoteDisconnectedPayload:nt,RemoteAvailablePayload:rt,RemotePlayerUI:qe,CastEventType:Le,RemotePlayerType:{CHROMECAST:"chromecast"},TextStyleConverter:En,CustomEventMessage:Sn,CustomActionMessage:Cn,CustomMessageType:An,CustomActionType:{SKIP_AD:"skipAd"},CustomMessage:wn},In={PlaylistEventType:Te},Pn="@playkit-js/kaltura-player-js",Dn="ovp",Rn="3.14.3-canary.0-99a98cb";r.a.installAll(),l.Ad=At,l.AdBreak=Et,l.BasePlugin=Z,l.registerPlugin=te}]); var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.kalturaCuepoints=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=31)}([function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(1),t),i(n(17),t),i(n(40),t),i(n(41),t),i(n(42),t),i(n(43),t),i(n(44),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCuePoint=void 0;var r=function(){function e(e){this.partnerData="",this.id=e.id,this.intId=e.intId,this.cuePointType=e.cuePointType,this.status=e.status,this.entryId=e.entryId,this.partnerId=e.partnerId,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.triggeredAt=e.triggeredAt,this.startTime=e.startTime;try{this.partnerData=JSON.parse(e.partnerData)}catch(e){}}return e.KalturaCuePointType={AD:"adCuePoint.Ad",ANNOTATION:"annotation.Annotation",CODE:"codeCuePoint.Code",EVENT:"eventCuePoint.Event",QUIZ_QUESTION:"quiz.QUIZ_QUESTION",THUMB:"thumbCuePoint.Thumb",CAPTION:"kalturaCaption"},e.KalturaCuePointStatus={READY:1,DELETED:2,HANDLED:3,PENDING:4},e}();t.KalturaCuePoint=r},function(e,t,n){function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i=0;i<r.length;i++)if((n=r[i])===t||n.fn===t){r.splice(i,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var i=(n=n.slice(0)).length;r<i;++r)n[r].apply(this,t)}return this},r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){var r,i=n(73),o=n(25),s=n(75),a=n(76),u=n(77);"undefined"!=typeof ArrayBuffer&&(r=n(78));var c="undefined"!=typeof navigator&&/Android/i.test(navigator.userAgent),h="undefined"!=typeof navigator&&/PhantomJS/i.test(navigator.userAgent),p=c||h;t.protocol=3;var f=t.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},l=i(f),d={type:"error",data:"parser error"},y=n(79);function g(e,t,n){for(var r=new Array(e.length),i=a(e.length,n),o=function(e,n,i){t(n,(function(t,n){r[e]=n,i(t,r)}))},s=0;s<e.length;s++)o(s,e[s],i)}t.encodePacket=function(e,n,r,i){"function"==typeof n&&(i=n,n=!1),"function"==typeof r&&(i=r,r=null);var o=void 0===e.data?void 0:e.data.buffer||e.data;if("undefined"!=typeof ArrayBuffer&&o instanceof ArrayBuffer)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=e.data,o=new Uint8Array(i),s=new Uint8Array(1+i.byteLength);s[0]=f[e.type];for(var a=0;a<o.length;a++)s[a+1]=o[a];return r(s.buffer)}(e,n,i);if(void 0!==y&&o instanceof y)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);if(p)return function(e,n,r){if(!n)return t.encodeBase64Packet(e,r);var i=new FileReader;return i.onload=function(){t.encodePacket({type:e.type,data:i.result},n,!0,r)},i.readAsArrayBuffer(e.data)}(e,n,r);var i=new Uint8Array(1);i[0]=f[e.type];var o=new y([i.buffer,e.data]);return r(o)}(e,n,i);if(o&&o.base64)return function(e,n){var r="b"+t.packets[e.type]+e.data.data;return n(r)}(e,i);var s=f[e.type];return void 0!==e.data&&(s+=r?u.encode(String(e.data),{strict:!1}):String(e.data)),i(""+s)},t.encodeBase64Packet=function(e,n){var r,i="b"+t.packets[e.type];if(void 0!==y&&e.data instanceof y){var o=new FileReader;return o.onload=function(){var e=o.result.split(",")[1];n(i+e)},o.readAsDataURL(e.data)}try{r=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(t){for(var s=new Uint8Array(e.data),a=new Array(s.length),u=0;u<s.length;u++)a[u]=s[u];r=String.fromCharCode.apply(null,a)}return i+=btoa(r),n(i)},t.decodePacket=function(e,n,r){if(void 0===e)return d;if("string"==typeof e){if("b"===e.charAt(0))return t.decodeBase64Packet(e.substr(1),n);if(r&&!1===(e=function(e){try{e=u.decode(e,{strict:!1})}catch(e){return!1}return e}(e)))return d;var i=e.charAt(0);return Number(i)==i&&l[i]?e.length>1?{type:l[i],data:e.substring(1)}:{type:l[i]}:d}i=new Uint8Array(e)[0];var o=s(e,1);return y&&"blob"===n&&(o=new y([o])),{type:l[i],data:o}},t.decodeBase64Packet=function(e,t){var n=l[e.charAt(0)];if(!r)return{type:n,data:{base64:!0,data:e.substr(1)}};var i=r.decode(e.substr(1));return"blob"===t&&y&&(i=new y([i])),{type:n,data:i}},t.encodePayload=function(e,n,r){"function"==typeof n&&(r=n,n=null);var i=o(e);if(n&&i)return y&&!p?t.encodePayloadAsBlob(e,r):t.encodePayloadAsArrayBuffer(e,r);if(!e.length)return r("0:");g(e,(function(e,r){t.encodePacket(e,!!i&&n,!1,(function(e){r(null,function(e){return e.length+":"+e}(e))}))}),(function(e,t){return r(t.join(""))}))},t.decodePayload=function(e,n,r){if("string"!=typeof e)return t.decodePayloadAsBinary(e,n,r);var i;if("function"==typeof n&&(r=n,n=null),""===e)return r(d,0,1);for(var o,s,a="",u=0,c=e.length;u<c;u++){var h=e.charAt(u);if(":"===h){if(""===a||a!=(o=Number(a)))return r(d,0,1);if(a!=(s=e.substr(u+1,o)).length)return r(d,0,1);if(s.length){if(i=t.decodePacket(s,n,!1),d.type===i.type&&d.data===i.data)return r(d,0,1);if(!1===r(i,u+o,c))return}u+=o,a=""}else a+=h}return""!==a?r(d,0,1):void 0},t.encodePayloadAsArrayBuffer=function(e,n){if(!e.length)return n(new ArrayBuffer(0));g(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){return n(null,e)}))}),(function(e,t){var r=t.reduce((function(e,t){var n;return e+(n="string"==typeof t?t.length:t.byteLength).toString().length+n+2}),0),i=new Uint8Array(r),o=0;return t.forEach((function(e){var t="string"==typeof e,n=e;if(t){for(var r=new Uint8Array(e.length),s=0;s<e.length;s++)r[s]=e.charCodeAt(s);n=r.buffer}i[o++]=t?0:1;var a=n.byteLength.toString();for(s=0;s<a.length;s++)i[o++]=parseInt(a[s]);i[o++]=255;for(r=new Uint8Array(n),s=0;s<r.length;s++)i[o++]=r[s]})),n(i.buffer)}))},t.encodePayloadAsBlob=function(e,n){g(e,(function(e,n){t.encodePacket(e,!0,!0,(function(e){var t=new Uint8Array(1);if(t[0]=1,"string"==typeof e){for(var r=new Uint8Array(e.length),i=0;i<e.length;i++)r[i]=e.charCodeAt(i);e=r.buffer,t[0]=0}var o=(e instanceof ArrayBuffer?e.byteLength:e.size).toString(),s=new Uint8Array(o.length+1);for(i=0;i<o.length;i++)s[i]=parseInt(o[i]);if(s[o.length]=255,y){var a=new y([t.buffer,s.buffer,e]);n(null,a)}}))}),(function(e,t){return n(new y(t))}))},t.decodePayloadAsBinary=function(e,n,r){"function"==typeof n&&(r=n,n=null);for(var i=e,o=[];i.byteLength>0;){for(var a=new Uint8Array(i),u=0===a[0],c="",h=1;255!==a[h];h++){if(c.length>310)return r(d,0,1);c+=a[h]}i=s(i,2+c.length),c=parseInt(c);var p=s(i,0,c);if(u)try{p=String.fromCharCode.apply(null,new Uint8Array(p))}catch(e){var f=new Uint8Array(p);p="";for(h=0;h<f.length;h++)p+=String.fromCharCode(f[h])}o.push(p),i=s(i,c)}var l=o.length;o.forEach((function(e,i){r(t.decodePacket(e,n,!0),i,l)}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CuePointTags=t.KalturaCuePointType=t.KalturaThumbCuePointSubType=void 0,function(e){e[e.SLIDE=1]="SLIDE",e[e.CHAPTER=2]="CHAPTER"}(t.KalturaThumbCuePointSubType||(t.KalturaThumbCuePointSubType={})),function(e){e.PUBLIC_QNA="publicqna",e.USER_QNA="userqna",e.CODE_QNA="codeqna",e.QUIZ="quiz",e.SLIDE="slide",e.VIEW_CHANGE="viewchange",e.CHAPTER="chapter",e.HOTSPOT="hotspot",e.CAPTION="caption"}(t.KalturaCuePointType||(t.KalturaCuePointType={})),function(e){e.ANSWERONAIR="qna",e.HOTSPOT="hotspots"}(t.CuePointTags||(t.CuePointTags={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortArrayBy=t.generateThumb=t.makeAssetUrl=t.getDomainFromUrl=t.isEmptyObject=void 0,t.isEmptyObject=function(e){return 0===Object.keys(e).length&&e.constructor===Object},t.getDomainFromUrl=function(e){return e.replace(/^(.*\/\/[^\/?#]*).*$/,"$1")},t.makeAssetUrl=function(e,t){var n="";return void 0!==t&&(n=e.replace(/thumbAssetId\/([^\/]+)/,"/thumbAssetId/"+t)),n},t.generateThumb=function(e,t,n,r,i){return void 0===t&&(t=""),void 0===i&&(i=""),e.split("api_v3")[0]+"/p/"+t+"/sp/"+t+"00/thumbnail/entry_id/"+n+"/width/400/vid_sec/"+(r/1e3).toFixed(2)+(i?"/ks/"+i:"")},t.sortArrayBy=function(e,t,n){return e.sort((function(e,r){return n?e[t]-r[t]||e[n]-r[n]:e[t]-r[t]}))}},function(e,t,n){(function(r){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(59)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t){t.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},t.decode=function(e){for(var t={},n=e.split("&"),r=0,i=n.length;r<i;r++){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}},function(e,t){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){(function(r){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(80)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var u,c=[],h=!1,p=-1;function f(){h&&u&&(h=!1,u.length?c=u.concat(c):p=-1,c.length&&l())}function l(){if(!h){var e=a(f);h=!0;for(var t=c.length;t;){for(u=c,c=[];++p<t;)u&&u[p].run();p=-1,t=c.length}u=null,h=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function y(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new d(e,t)),1!==c.length||h||a(l)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t,n){var r=n(61)("socket.io-parser"),i=n(2),o=n(64),s=n(20),a=n(21);function u(){}t.protocol=4,t.types=["CONNECT","DISCONNECT","EVENT","ACK","ERROR","BINARY_EVENT","BINARY_ACK"],t.CONNECT=0,t.DISCONNECT=1,t.EVENT=2,t.ACK=3,t.ERROR=4,t.BINARY_EVENT=5,t.BINARY_ACK=6,t.Encoder=u,t.Decoder=p;var c=t.ERROR+'"encode error"';function h(e){var n=""+e.type;if(t.BINARY_EVENT!==e.type&&t.BINARY_ACK!==e.type||(n+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(n+=e.nsp+","),null!=e.id&&(n+=e.id),null!=e.data){var i=function(e){try{return JSON.stringify(e)}catch(e){return!1}}(e.data);if(!1===i)return c;n+=i}return r("encoded %j as %s",e,n),n}function p(){this.reconstructor=null}function f(e){this.reconPack=e,this.buffers=[]}function l(e){return{type:t.ERROR,data:"parser error: "+e}}u.prototype.encode=function(e,n){(r("encoding packet %j",e),t.BINARY_EVENT===e.type||t.BINARY_ACK===e.type)?function(e,t){o.removeBlobs(e,(function(e){var n=o.deconstructPacket(e),r=h(n.packet),i=n.buffers;i.unshift(r),t(i)}))}(e,n):n([h(e)])},i(p.prototype),p.prototype.add=function(e){var n;if("string"==typeof e)n=function(e){var n=0,i={type:Number(e.charAt(0))};if(null==t.types[i.type])return l("unknown packet type "+i.type);if(t.BINARY_EVENT===i.type||t.BINARY_ACK===i.type){for(var o=n+1;"-"!==e.charAt(++n)&&n!=e.length;);var a=e.substring(o,n);if(a!=Number(a)||"-"!==e.charAt(n))throw new Error("Illegal attachments");i.attachments=Number(a)}if("/"===e.charAt(n+1)){for(o=n+1;++n;){if(","===(c=e.charAt(n)))break;if(n===e.length)break}i.nsp=e.substring(o,n)}else i.nsp="/";var u=e.charAt(n+1);if(""!==u&&Number(u)==u){for(o=n+1;++n;){var c;if(null==(c=e.charAt(n))||Number(c)!=c){--n;break}if(n===e.length)break}i.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){var h=function(e){try{return JSON.parse(e)}catch(e){return!1}}(e.substr(n));if(!(!1!==h&&(i.type===t.ERROR||s(h))))return l("invalid payload");i.data=h}return r("decoded %s as %j",e,i),i}(e),t.BINARY_EVENT===n.type||t.BINARY_ACK===n.type?(this.reconstructor=new f(n),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",n)):this.emit("decoded",n);else{if(!a(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");(n=this.reconstructor.takeBinaryData(e))&&(this.reconstructor=null,this.emit("decoded",n))}},p.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},f.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){var t=o.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},f.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},function(e,t,n){"use strict";(function(e){ /*! @@ -70,18 +70,18 @@ var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer. * @author Feross Aboukhadijeh <http://feross.org> * @license MIT */ -var r=n(66),i=n(67),o=n(68);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|l(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):f(e,t);if("Buffer"===t.type&&o(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(h(t),e=a(e,t<0?0:0|l(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|l(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function l(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return D(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var p=!0,f=0;f<u;f++)if(c(e,o+f)!==c(t,f)){p=!1;break}if(p)return o}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function C(e,t,n,r){return K(D(t,e.length-n),e,n,r)}function b(e,t,n,r){return K(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function P(e,t,n,r){return b(e,t,n,r)}function T(e,t,n,r){return K(q(t),e,n,r)}function w(e,t,n,r){return K(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,c=e[i],h=null,p=c>239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(h=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,p=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=p}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return h(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return p(null,e)},u.allocUnsafeSlow=function(e){return p(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),h=e.slice(t,n),p=0;p<a;++p)if(c[p]!==h[p]){o=c[p],s=h[p];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return P(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=j(e[o]);return i}function R(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function S(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function F(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function x(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function B(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return o||B(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function M(e,t,n,r,o){return o||B(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||S(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||S(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||S(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||S(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||S(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||S(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||S(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||S(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||S(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||S(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||S(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||S(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||S(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||S(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=u.isBuffer(e)?e:D(new u(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(65))},function(e,t,n){var r=n(71),i=n(14);e.exports=function(e){var t=e.xdomain,n=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(e){}if(!t)try{return new(i[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t){e.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(e,t,n){var r=n(3),i=n(2);function o(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=o,i(o.prototype),o.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},o.prototype.onPacket=function(e){this.emit("packet",e)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.Provider=void 0;var i=n(35),o=function(){function e(e,t,n,r){this.cuePointManager=null,this._types=r,this._logger=n,this._player=e,this._eventManager=t,this._logger=n}return e.prototype._addCuePointToPlayer=function(e){var t=e.map((function(e){return{startTime:e.startTime,endTime:e.endTime,id:e.id,metadata:r(e,["startTime","endTime","id"])}}));"youtube"===this._player.engineType?(this.cuePointManager||(this.cuePointManager=new i.CuePointManager(this._player,this._eventManager)),this.cuePointManager.addCuePoints(t)):this._player.cuePointManager.addCuePoints(t)},e.prototype.destroy=function(){this.cuePointManager&&this.cuePointManager.destroy()},e}();t.Provider=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCodeCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.tags="",n.code=t.code,n.description=t.description,n.endTime=t.endTime,n.duration=t.duration,n.tags=t.tags,n}return i(t,e),t}(n(1).KalturaCuePoint);t.KalturaCodeCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbUrlLoader=void 0;var r=KalturaPlayer.providers.RequestBuilder,i=function(){function e(e){this._thumbAssetId="",this._requests=[],this._response="";var t=new Map,n=new r(t);this._thumbAssetId=e.thumbAssetId,n.service="thumbAsset",n.action="getUrl",n.params={id:this._thumbAssetId},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"thumburlloader"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t;this._response=null===(t=e[0])||void 0===t?void 0:t.data},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._thumbAssetId},e}();t.ThumbUrlLoader=i},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");-1!=i&&-1!=o&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var s,a,u=n.exec(e||""),c={},h=14;h--;)c[r[h]]=u[h]||"";return-1!=i&&-1!=o&&(c.source=t,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=function(e,t){var n=t.replace(/\/{2,9}/g,"/").split("/");"/"!=t.substr(0,1)&&0!==t.length||n.splice(0,1);"/"==t.substr(t.length-1,1)&&n.splice(n.length-1,1);return n}(0,c.path),c.queryKey=(s=c.query,a={},s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(a[t]=n)})),a),c}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=function(e){return n&&t.isBuffer(e)||r&&(e instanceof ArrayBuffer||function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}(e))};var n="function"==typeof t&&"function"==typeof t.isBuffer,r="function"==typeof ArrayBuffer}).call(this,n(12).Buffer)},function(e,t,n){var r=n(69),i=n(28),o=n(2),s=n(11),a=n(29),u=n(30),c=n(6)("socket.io-client:manager"),h=n(27),p=n(86),f=Object.prototype.hasOwnProperty;function l(e,t){if(!(this instanceof l))return new l(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=l,l.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)f.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},l.prototype.updateSocketIds=function(){for(var e in this.nsps)f.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},l.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},o(l.prototype),l.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},l.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},l.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},l.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},l.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},l.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},l.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},l.prototype.open=l.prototype.connect=function(e,t){if(c("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=a(n,"open",(function(){i.onopen(),e&&e()})),s=a(n,"error",(function(t){if(c("connect_error"),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else i.maybeReconnectOnOpen()}));if(!1!==this._timeout){var u=this._timeout;c("connect attempt will timeout after %d",u),0===u&&o.destroy();var h=setTimeout((function(){c("connect attempt timed out after %d",u),o.destroy(),n.close(),n.emit("error","timeout"),i.emitAll("connect_timeout",u)}),u);this.subs.push({destroy:function(){clearTimeout(h)}})}return this.subs.push(o),this.subs.push(s),this},l.prototype.onopen=function(){c("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",u(this,"ondata"))),this.subs.push(a(e,"ping",u(this,"onping"))),this.subs.push(a(e,"pong",u(this,"onpong"))),this.subs.push(a(e,"error",u(this,"onerror"))),this.subs.push(a(e,"close",u(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",u(this,"ondecoded")))},l.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},l.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},l.prototype.ondata=function(e){this.decoder.add(e)},l.prototype.ondecoded=function(e){this.emit("packet",e)},l.prototype.onerror=function(e){c("error",e),this.emitAll("error",e)},l.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new i(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",o),n.on("connect",(function(){n.id=r.generateId(e)})),this.autoConnect&&o()}function o(){~h(r.connecting,n)||r.connecting.push(n)}return n},l.prototype.destroy=function(e){var t=h(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},l.prototype.packet=function(e){c("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()})))},l.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},l.prototype.cleanup=function(){c("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},l.prototype.close=l.prototype.disconnect=function(){c("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},l.prototype.onclose=function(e){c("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},l.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();c("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(c("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(c("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(c("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},l.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){var r=n(13),i=n(72),o=n(82),s=n(83);t.polling=function(e){var t=!1,n=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,u=location.port;u||(u=a?443:80),t=e.hostname!==location.hostname||u!==e.port,n=e.secure!==a}if(e.xdomain=t,e.xscheme=n,"open"in new r(e)&&!e.forceJSONP)return new i(e);if(!s)throw new Error("JSONP disabled");return new o(e)},t.websocket=s},function(e,t,n){var r=n(15),i=n(7),o=n(3),s=n(8),a=n(26),u=n(9)("engine.io-client:polling");e.exports=h;var c=null!=new(n(13))({xdomain:!1}).responseType;function h(e){var t=e&&e.forceBase64;c&&!t||(this.supportsBinary=!1),r.call(this,e)}s(h,r),h.prototype.name="polling",h.prototype.doOpen=function(){this.poll()},h.prototype.pause=function(e){var t=this;function n(){u("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(u("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--r||n()}))),this.writable||(u("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){u("pre-pause writing complete"),--r||n()})))}else n()},h.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},h.prototype.onData=function(e){var t=this;u("polling got data %s",e);o.decodePayload(e,this.socket.binaryType,(function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},h.prototype.doClose=function(){var e=this;function t(){u("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))},h.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};o.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},h.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){(function(t){var r=n(74),i=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var i=0,a=n.length;i<a;i++)if(e(n[i]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||o&&n instanceof Blob||s&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var u in n)if(Object.prototype.hasOwnProperty.call(n,u)&&e(n[u]))return!0;return!1}}).call(this,n(12).Buffer)},function(e,t,n){"use strict";var r,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),o={},s=0,a=0;function u(e){var t="";do{t=i[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function c(){var e=u(+new Date);return e!==r?(s=0,r=e):e+"."+u(s++)}for(;a<64;a++)o[i[a]]=a;c.encode=u,c.decode=function(e){var t=0;for(a=0;a<e.length;a++)t=64*t+o[e.charAt(a)];return t},e.exports=c},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(11),i=n(2),o=n(85),s=n(29),a=n(30),u=n(6)("socket.io-client:socket"),c=n(7),h=n(25);e.exports=l;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=i.prototype.emit;function l(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}i(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.reconnecting||this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},l.prototype.send=function(){var e=o(arguments);return e.unshift("message"),this.emit.apply(this,e),this},l.prototype.emit=function(e){if(p.hasOwnProperty(e))return f.apply(this,arguments),this;var t=o(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:h(t))?r.BINARY_EVENT:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},l.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},l.prototype.onopen=function(){if(u("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?c.encode(this.query):this.query;u("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},l.prototype.onclose=function(e){u("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},l.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===r.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},l.prototype.onevent=function(e){var t=e.data||[];u("emitting event %j",t),null!=e.id&&(u("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?f.apply(this,t):this.receiveBuffer.push(t)},l.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var i=o(arguments);u("sending ack %j",i),t.packet({type:h(i)?r.BINARY_ACK:r.ACK,id:e,data:i})}}},l.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(u("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):u("bad ack %s",e.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},l.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)f.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},l.prototype.compress=function(e){return this.flags.compress=e,this},l.prototype.binary=function(e){return this.flags.binary=e,this}},function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NAME=t.VERSION=t.Plugin=void 0;var r=n(32);Object.defineProperty(t,"Plugin",{enumerable:!0,get:function(){return r.Cuepoints}});t.VERSION="3.0.4-canary.1-8114481";t.NAME="@playkit-js/playkit-js-kaltura-cuepoints";KalturaPlayer.core.registerPlugin("kalturaCuepoints",r.Cuepoints)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Cuepoints=void 0;var o=n(33),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._cuePointService=new o.CuepointService(n,r.eventManager,r.logger),n.registerService("kalturaCuepoints",r._cuePointService),r}return i(t,e),t.prototype.reset=function(){this._cuePointService.reset()},t.prototype.destroy=function(){this.eventManager.destroy(),this._cuePointService.reset()},t.isValid=function(){return!0},t.defaultConfig={},t}(KalturaPlayer.core.BasePlugin);t.Cuepoints=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CuepointService=void 0;var r=n(34),i=n(49),o=n(0),s=n(4),a=function(){function e(e,t,n){var r=this;this._types=new Map,this._mediaLoaded=!1,this._logger=n,this._player=e,this._eventManager=t,t.listen(this._player,this._player.Event.CHANGE_SOURCE_ENDED,(function(){r._initProvider()}))}return Object.defineProperty(e.prototype,"CuepointType",{get:function(){return s.KalturaCuePointType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"KalturaThumbCuePointSubType",{get:function(){return s.KalturaThumbCuePointSubType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"KalturaCuePointType",{get:function(){return o.KalturaCuePoint.KalturaCuePointType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"KalturaCuePointTags",{get:function(){return s.CuePointTags},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cuePointManager",{get:function(){var e;return(null===(e=this._provider)||void 0===e?void 0:e.cuePointManager)||null},enumerable:!1,configurable:!0}),e.prototype.registerTypes=function(e){var t=this;this._mediaLoaded?this._logger.warn("Cue point registration should occur on loadMedia (or before)"):e.forEach((function(e){Object.values(s.KalturaCuePointType).includes(e)?t._types.set(e,!0):t._logger.warn('"'+e+'" is not a valid cue point type for registration')}))},e.prototype._initProvider=function(){this._mediaLoaded=!0,0!=this._types.size?this._player.isLive()?this._provider=new i.LiveProvider(this._player,this._eventManager,this._logger,this._types):this._provider=new r.VodProvider(this._player,this._eventManager,this._logger,this._types):this._logger.warn("Cue points provider was not initialized because there are no registered types")},e.prototype.reset=function(){var e;this._mediaLoaded=!1,this._types.clear(),null===(e=this._provider)||void 0===e||e.destroy()},e}();t.CuepointService=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.VodProvider=void 0;var a=n(16),u=n(39),c=n(4),h=n(5),p=n(45),f=n(46),l=n(47),d=n(18),y=n(48),g=function(e){function t(t,n,r,i){var s=e.call(this,t,n,r,i)||this;return s._fetchedCaptionKeys=[],s._fetchingCaptionKey=null,s._handleLanguageChange=function(){var e=(s._player.getTracks(s._player.Track.TEXT)||[]).find((function(e){return e.active})),t=s._player.sources.captions;if(e&&Array.isArray(t)&&t.length){var n=t.find((function(t){return t.language===e.language&&t.label===e.label}))||t[0];s._loadCaptions(n)}},s._loadCaptions=function(e){var t=e.language+"-"+e.label;if(!s._fetchedCaptionKeys.includes(t)&&s._fetchingCaptionKey!==t){var n=e.url.match("/captionAssetId/(.*?)(/|$)");if(n&&n[1]){s._fetchingCaptionKey=t;var r=s._player.config.session,i=(null==r?void 0:r.isAnonymous)?s._player.config.session.ks:void 0;s._player.provider.doRequest([{loader:y.CaptionLoader,params:{captionAssetId:n[1]}}],i).then((function(n){if(n){if(n.has(y.CaptionLoader.id)){var r=n.get(y.CaptionLoader.id),i=null==r?void 0:r.response.captions;if(i.length){var a=i.map((function(t){return o(o({},t),{language:e.language,label:e.label,startTime:t.startTime/1e3,endTime:t.endTime/1e3,text:t.content.reduce((function(e,t){return""+e+t.text}),"")})}));a=a.filter((function(e){return e.text})),s._addCuePointToPlayer(a),s._fetchedCaptionKeys.push(t)}}}else s._logger.warn("CaptionLoader doRequest doesn't have data")})).catch((function(e){s._logger.warn("Fetching captions "+t+" has failed")})).finally((function(){s._fetchingCaptionKey=null}))}}},s._addListeners(),s._fetchVodData(),s}return i(t,e),t.prototype._addListeners=function(){this._types.has(c.KalturaCuePointType.CAPTION)&&(this._eventManager.listenOnce(this._player,this._player.Event.TEXT_TRACK_ADDED,this._handleLanguageChange),this._eventManager.listen(this._player,this._player.Event.TEXT_TRACK_CHANGED,this._handleLanguageChange))},t.prototype._removeListeners=function(){this._types.has(c.KalturaCuePointType.CAPTION)&&(this._eventManager.unlisten(this._player,this._player.Event.TEXT_TRACK_ADDED,this._handleLanguageChange),this._eventManager.unlisten(this._player,this._player.Event.TEXT_TRACK_CHANGED,this._handleLanguageChange))},t.prototype._fetchVodData=function(){var e=this,t="";this._types.has(c.KalturaCuePointType.SLIDE)&&(t=c.KalturaThumbCuePointSubType.SLIDE+","),this._types.has(c.KalturaCuePointType.CHAPTER)&&(t+=c.KalturaThumbCuePointSubType.CHAPTER+",");var n=[];t&&n.push({loader:u.ThumbLoader,params:{entryId:this._player.sources.id,subTypesFilter:t}}),this._types.has(c.KalturaCuePointType.VIEW_CHANGE)&&n.push({loader:p.ViewChangeLoader,params:{entryId:this._player.sources.id}}),this._types.has(c.KalturaCuePointType.QUIZ)&&n.push({loader:f.QuizQuestionLoader,params:{entryId:this._player.sources.id}}),this._types.has(c.KalturaCuePointType.HOTSPOT)&&n.push({loader:l.HotspotLoader,params:{entryId:this._player.sources.id}}),n.length&&this._player.provider.doRequest(n).then((function(t){t?(t.has(u.ThumbLoader.id)&&e._handleThumbResponse(t),t.has(p.ViewChangeLoader.id)&&e._handleViewChangeResponse(t),t.has(f.QuizQuestionLoader.id)&&e._handleQuizQustionResponse(t),t.has(l.HotspotLoader.id)&&e._handleHotspotResponse(t)):e._logger.warn("Provider cue points doRequest doesn't have data")})).catch((function(t){e._logger.warn("Provider cue points doRequest was rejected")}))},t.prototype._fixCuePointsEndTime=function(e){return e.map((function(t,n){if(t.endTime===Number.MAX_SAFE_INTEGER)for(var r=n+1;e[r];){if(e[r].startTime!==t.startTime)return o(o({},t),{endTime:e[r].startTime});r++}return t}))},t.prototype._handleViewChangeResponse=function(e){var t=e.get(p.ViewChangeLoader.id),n=(null==t?void 0:t.response.viewChangeCuePoints)||[];if(this._logger.debug("_fetchVodData viewChange response successful with "+n.length+" cue points"),n.length){var r=function(e){return e.map((function(e){return{id:e.id,startTime:e.startTime/1e3,endTime:e.endTime||Number.MAX_SAFE_INTEGER,cuePointType:e.cuePointType,partnerData:e.partnerData,tags:e.tags}}))}(n).reduce((function(e,t){var n;return(null===(n=t.partnerData)||void 0===n?void 0:n.viewModeLockState)?{lockedCuePoints:s(e.lockedCuePoints,[t]),viewChangeCuePoints:e.viewChangeCuePoints}:{lockedCuePoints:e.lockedCuePoints,viewChangeCuePoints:s(e.viewChangeCuePoints,[t])}}),{lockedCuePoints:[],viewChangeCuePoints:[]}),i=r.lockedCuePoints,o=r.viewChangeCuePoints;i=h.sortArrayBy(i,"startTime"),i=this._fixCuePointsEndTime(i),o=h.sortArrayBy(o,"startTime"),o=this._fixCuePointsEndTime(o),this._addCuePointToPlayer(o),this._addCuePointToPlayer(i)}},t.prototype._handleThumbResponse=function(e){var t,n=this,r=function(e){return function(t){return h.makeAssetUrl(e,t.assetId)}},i=function(e){var t,r=n._player.config.provider;return h.generateThumb(null===(t=null==r?void 0:r.env)||void 0===t?void 0:t.serviceUrl,null==r?void 0:r.partnerId,n._player.sources.id,e.startTime,null==r?void 0:r.ks)},a=function(e,t){var r=e.map((function(e){return{assetUrl:t(e),id:e.id,cuePointType:e.cuePointType,title:e.title,description:e.description,subType:e.subType,startTime:e.startTime/1e3,endTime:Number.MAX_SAFE_INTEGER}}));r=h.sortArrayBy(r,"startTime"),r=n._fixCuePointsEndTime(r),n._addCuePointToPlayer(r)},p=e.get(u.ThumbLoader.id),f=(null==p?void 0:p.response.thumbCuePoints)||[];if(this._logger.debug("_fetchVodData thumb response successful with "+f.length+" cue points"),f.length){var l=f.reduce((function(e,t){return t.subType===c.KalturaThumbCuePointSubType.SLIDE?o(o({},e),{slideCuePoints:s(e.slideCuePoints,[t])}):t.subType===c.KalturaThumbCuePointSubType.CHAPTER?o(o({},e),{chapterCuePoints:s(e.chapterCuePoints,[t])}):e}),{slideCuePoints:[],chapterCuePoints:[]}),y=l.slideCuePoints,g=l.chapterCuePoints,v=null===(t=f.find((function(e){return e.assetId})))||void 0===t?void 0:t.assetId;v?this._player.provider.doRequest([{loader:d.ThumbUrlLoader,params:{thumbAssetId:v}}]).then((function(e){if(e){if(e.has(d.ThumbUrlLoader.id)){var t=e.get(d.ThumbUrlLoader.id),o=null==t?void 0:t.response;if(o&&y.length&&a(y,r(o)),o&&g.length){a(g,(function(e){return e.assetId?r(o)(e):i(e)}))}}}else n._logger.warn("ThumbUrlLoader doRequest doesn't have data")})).catch((function(e){n._logger.warn("ThumbUrlLoader doRequest was rejected")})):g.length&&a(g,i)}},t.prototype._handleQuizQustionResponse=function(e){var t=e.get(f.QuizQuestionLoader.id),n=(null==t?void 0:t.response.quizQuestionCuePoints)||[];if(this._logger.debug("_fetchVodData quiz question response successful with "+n.length+" cue points"),n.length){var r=function(e){return e.map((function(e){var t=e.startTime/1e3;return o(o({},e),{startTime:t,endTime:t+.5})}))}(n);r=h.sortArrayBy(r,"startTime","createdAt"),this._addCuePointToPlayer(r)}},t.prototype._handleHotspotResponse=function(e){var t=e.get(l.HotspotLoader.id),n=(null==t?void 0:t.response.hotspotCuePoints)||[];if(this._logger.debug("_fetchVodData hotspots response successful with "+n.length+" cue points"),n.length){var r=function(e){return e.map((function(e){return{id:e.id,cuePointType:e.cuePointType,text:e.text,partnerData:e.partnerData,startTime:e.startTime/1e3,endTime:e.endTime?e.endTime/1e3:Number.MAX_SAFE_INTEGER,tags:e.tags}}))}(n);r=h.sortArrayBy(r,"startTime","createdAt"),this._addCuePointToPlayer(r)}},t.prototype.destroy=function(){this._fetchedCaptionKeys=[],this._fetchingCaptionKey=null,this._removeListeners()},t}(a.Provider);t.VodProvider=g},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(36),t)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.CuePointManager=void 0;var o=n(37),s=n(38),a=function(){function e(e,t){var n=this;this._player=e,this._eventManager=t,this._engine=null,this._activeCuePoints=[],this._allCuePoints=[],this.addCuePoints=function(e){e&&0!==e.length&&n._player.ready().then((function(){var t=e.map((function(e){return r(r({},e),{type:o.core.TimedMetadata.TYPE.CUE_POINT})}));n._player.dispatchEvent(new o.core.FakeEvent(o.core.EventType.TIMED_METADATA_ADDED,{cues:t})),n._allCuePoints=i(n._allCuePoints,t),n._engine=new s.CuepointEngine(n._allCuePoints),n._activeCuePoints=[],n._getActiveCuePoints(null,!0)}))},this._setActiveCuePoints=function(e){n._activeCuePoints=e,n._player.dispatchEvent(new o.core.FakeEvent(o.core.EventType.TIMED_METADATA_CHANGE,{cues:n._activeCuePoints}))},this._getActiveCuePoints=function(e,t){var r,o,s,a;if(void 0===t&&(t=!1),n._engine){var u=n._engine.updateTime(n._player.currentTime,t);if(u.snapshot&&u.snapshot.length>0&&(u.snapshot.length!==n._activeCuePoints.length||(null===(r=u.snapshot[0])||void 0===r?void 0:r.id)!==(null===(o=n._activeCuePoints[0])||void 0===o?void 0:o.id)||(null===(s=u.snapshot[u.snapshot.length-1])||void 0===s?void 0:s.id)!==(null===(a=n._activeCuePoints[n._activeCuePoints.length-1])||void 0===a?void 0:a.id))&&n._setActiveCuePoints(u.snapshot),u.delta){var c=u.delta,h=c.show,p=c.hide;(h.length>0||p.length>0)&&(n._activeCuePoints=n._activeCuePoints.filter((function(e){return!p.find((function(t){return e.id===t.id}))})),n._setActiveCuePoints(i(n._activeCuePoints,h)))}}},this._eventManager.listen(this._player,this._player.Event.TIME_UPDATE,this._getActiveCuePoints)}return Object.defineProperty(e.prototype,"allCuePoints",{get:function(){return this._allCuePoints},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeCuePoints",{get:function(){return this._activeCuePoints},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._engine=null,this._eventManager.unlisten(this._player,this._player.Event.TIME_UPDATE,this._getActiveCuePoints)},e}();t.CuePointManager=a},function(e,t){e.exports=KalturaPlayer},function(e,t,n){"use strict";var r,i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.CuepointEngine=void 0,function(e){e.Show="show",e.Hide="hide"}(r||(r={}));var o=function(){function e(e,t){this.isFirstTime=!0,this.enabled=!0,this.lastHandledTime=null,this.lastHandledTimeIndex=null,this.nextTimeToHandle=null,this.cuepointChanges=[],this.reasonableSeekThreshold=Math.max(2e3,t&&t.reasonableSeekThreshold||0),this._cuepoints=e,this.prepareCuepoint()}return Object.defineProperty(e.prototype,"cuepoints",{get:function(){return i(this._cuepoints)},enumerable:!1,configurable:!0}),e.prototype.getSnapshot=function(e){var t=this.findClosestLastIndexByTime(e);return this.createCuepointSnapshot(t)},e.prototype.updateTime=function(e,t,n){void 0===t&&(t=!1);var r=this.isFirstTime,i=this.lastHandledTime,o=this.nextTimeToHandle;if(0===this.cuepointChanges.length)return r&&(this.isFirstTime=!1),{snapshot:[]};var s=!r&&null!==i&&null!==o&&(i>e||e-o>this.reasonableSeekThreshold),a=r||null!==this.lastHandledTime&&this.lastHandledTime>e||null!=this.nextTimeToHandle&&e>=this.nextTimeToHandle,u=this.findClosestLastIndexByTime(e),c=u<0?0:this.cuepointChanges[u].time;if(!a)return t?{snapshot:this.createCuepointSnapshot(u,n)}:{delta:this.createEmptyDelta()};if(r||t||s){var h=this.createCuepointSnapshot(u,n);return this.updateInternals(c,u),{snapshot:h}}var p=this.createCuepointDelta(u,n);return this.updateInternals(c,u),{delta:p}},e.prototype.getCurrentCuepointSnapshot=function(){return this.lastHandledTimeIndex?this.createCuepointSnapshot(this.lastHandledTimeIndex):[]},e.prototype.createCuepointSnapshot=function(e,t){if(!this.enabled||e<0||!this.cuepointChanges||0===this.cuepointChanges.length)return[];for(var n=[],i=0;i<=e;i++){var o=this.cuepointChanges[i],s=n.indexOf(o.cuePoint);o.type===r.Show?-1===s&&n.push(o.cuePoint):-1!==s&&n.splice(s,1)}return t&&(n=n.filter(t)),n},e.prototype.createCuepointDelta=function(e,t){if(!this.enabled||!this.cuepointChanges||0===this.cuepointChanges.length)return this.createEmptyDelta();var n=this.lastHandledTimeIndex;if(null===n)return this.createEmptyDelta();for(var i=[],o=[],s=n+1;s<=e;s++){var a=this.cuepointChanges[s],u=i.indexOf(a.cuePoint);a.type===r.Show?-1===u&&i.push(a.cuePoint):-1!==u?i.splice(u,1):-1===o.indexOf(a.cuePoint)&&o.push(a.cuePoint)}return t&&(i=i.filter(t),o=o.filter(t)),{show:i,hide:o}},e.prototype.updateInternals=function(e,t){var n=this.cuepointChanges;if(n&&0!==n.length){var r=t>=n.length-1,i=null===t;this.lastHandledTime=e,this.lastHandledTimeIndex=t,this.nextTimeToHandle=i?n[0].time:r?n[n.length-1].time:n[t+1].time,this.isFirstTime=!1}},e.prototype.createEmptyDelta=function(){return{show:[],hide:[]}},e.prototype.binarySearch=function(e,t){if(!e||0===e.length)return null;if(t<e[0].time)return-1;if(t>e[e.length-1].time)return e.length-1;for(var n=0,r=e.length-1;n<=r;){var i=Math.floor((r+n+1)/2);if(t<e[i].time)r=i-1;else{if(!(t>e[i].time))return i;n=i+1}}return Math.min(n,r)},e.prototype.findClosestLastIndexByTime=function(e){var t=this.cuepointChanges,n=this.binarySearch(t,e);if(null===n)return-1;for(var r=t.length;n<r-1&&t[n+1].time===e;)n++;return n},e.prototype.prepareCuepoint=function(){var e=this;(this._cuepoints||[]).forEach((function(t){null!==t.startTime&&void 0!==t.startTime&&t.startTime>=0&&e.cuepointChanges.push({time:t.startTime,type:r.Show,cuePoint:t}),null!==t.endTime&&void 0!==t.endTime&&t.endTime>=0&&e.cuepointChanges.push({time:t.endTime,type:r.Hide,cuePoint:t})})),this.cuepointChanges.sort((function(e,t){return e.time<t.time?-1:e.time===t.time?0:1}))},e}();t.CuepointEngine=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._entryId="",this._requests=[],this._response={thumbCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new i(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaThumbCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.THUMB,subTypeIn:e.subTypesFilter},responseProfile:{type:1,fields:"id, assetId, startTime, cuePointType, title, description, subType"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"thumb"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaThumbCuePoint);n.totalCount&&(this._response.thumbCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.ThumbLoader=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaThumbCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.assetId=t.assetId,n.description=t.description,n.title=t.title,n.subType=t.subType,n}return i(t,e),t}(n(1).KalturaCuePoint);t.KalturaThumbCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCuePointListResponse=void 0;var r=function(e,t){var n=this;this.totalCount=0,this.cuePoints=[],this.totalCount=e.totalCount,this.totalCount>0&&e.objects.map((function(e){var r=new t(e);n.cuePoints.push(r)}))};t.KalturaCuePointListResponse=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaQuizQuestionCuePoint=t.KalturaQuestionType=void 0;var o=n(1);!function(e){e[e.fillInBlank=5]="fillInBlank",e[e.goTo=7]="goTo",e[e.hotSpot=6]="hotSpot",e[e.multipleAnswerQuestion=4]="multipleAnswerQuestion",e[e.multipleChoiceAnswer=1]="multipleChoiceAnswer",e[e.openQuestion=8]="openQuestion",e[e.reflectionPoint=3]="reflectionPoint",e[e.trueFalse=2]="trueFalse"}(t.KalturaQuestionType||(t.KalturaQuestionType={}));var s=function(e){function t(t){var n=e.call(this,t)||this;return n.excludeFromScore=t.excludeFromScore,n.objectType=t.objectType,n.optionalAnswers=t.optionalAnswers,n.hint=t.hint,n.explanation=t.explanation,n.question=t.question,n.questionType=t.questionType,n.userId=t.userId,n}return i(t,e),t}(o.KalturaCuePoint);t.KalturaQuizQuestionCuePoint=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaHotspotCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.text=t.text,n.endTime=t.endTime,n.tags=t.tags,n}return i(t,e),t}(n(1).KalturaCuePoint);t.KalturaHotspotCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCaption=void 0;var r=n(1),i=function(e,t){this.cuePointType=r.KalturaCuePoint.KalturaCuePointType.CAPTION,this.id=t,this.startTime=e.startTime,this.endTime=e.endTime,this.content=e.content};t.KalturaCaption=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewChangeLoader=void 0;var r=n(0),i=n(17),o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){this._entryId="",this._requests=[],this._response={viewChangeCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new o(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaCodeCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.CODE},responseProfile:{type:1,fields:"id, startTime, endTime, partnerData, cuePointType, tags"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"viewchange"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,i.KalturaCodeCuePoint);n.totalCount&&(this._response.viewChangeCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.ViewChangeLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuizQuestionLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._entryId="",this._requests=[],this._response={quizQuestionCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new i(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaQuestionCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.QUIZ_QUESTION,orderBy:"+startTime"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"quiz-question"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaQuizQuestionCuePoint);n.totalCount&&(this._response.quizQuestionCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.QuizQuestionLoader=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HotspotLoader=void 0;var r=n(0),i=n(4),o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){this._entryId="",this._requests=[],this._response={hotspotCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new o(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.ANNOTATION,tagsLike:i.CuePointTags.HOTSPOT},responseProfile:{type:1,fields:"id, startTime, endTime, cuePointType, partnerData, text, tags"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"hotspot"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaHotspotCuePoint);n.totalCount&&(this._response.hotspotCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.HotspotLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._captionAssetId="",this._requests=[],this._response={captions:[]},this._captionAssetId=e.captionAssetId;var t=new Map,n=new i(t);n.service="caption_captionasset",n.action="serveAsJson",n.params={captionAssetId:this._captionAssetId},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"caption"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n,i=this,o=null===(n=null===(t=e[0])||void 0===t?void 0:t.data)||void 0===n?void 0:n.objects;o&&Array.isArray(o)&&(this._response.captions=o.map((function(e,t){return new r.KalturaCaption(e,i._captionAssetId+"-"+t)})))},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._captionAssetId},e}();t.CaptionLoader=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LiveProvider=void 0;var s=n(16),a=n(4),u=n(50),c=n(5),h=n(18),p=function(e){function t(t,n,r,i){var s=e.call(this,t,n,r,i)||this;return s._thumbCuePoints=[],s._slideViewChangeCuePoints=[],s._id3Timestamp=0,s._currentTime=0,s._currentTimeLive=0,s._seekDifference=0,s._currentTimeLiveResolvePromise=function(){},s._baseThumbAssetUrl="",s._thumbUrlLoaderResolvePromise=function(){},s._thumbUrlIsLoaderActive=!1,s._thumbUrlAssetIdQueue=[],s._makeCurrentTimeLiveReadyPromise=function(){return new Promise((function(e){s._currentTimeLiveResolvePromise=e}))},s._makeThumbUrlLoaderResolvePromise=function(){return new Promise((function(e){s._thumbUrlLoaderResolvePromise=e}))},s._onTimedMetadataLoaded=function(e){var t=e.payload.cues.filter((function(e){return e.value&&"TEXT"===e.value.key}));if(t.length)try{var n=Math.ceil(JSON.parse(t[t.length-1].value.data).timestamp/1e3);n&&(s._id3Timestamp=n)}catch(e){s._logger.debug("Failed retrieving id3 tag metadata")}},s._onTimeUpdate=function(){var e=Math.ceil(s._player.currentTime);if(e!==s._currentTime){if(s._currentTime=e,null!==s._seekDifference&&s._currentTimeLive)s._currentTimeLive=s._currentTimeLive-s._seekDifference;else if(s._id3Timestamp){if(s._id3Timestamp===s._currentTimeLive)return void(s._id3Timestamp=null);s._currentTimeLive=s._id3Timestamp}else s._currentTimeLive++;s._id3Timestamp&&s._currentTimeLiveResolvePromise(),s._id3Timestamp=null,s._seekDifference=null}},s._handleSeeking=function(){s._seekDifference=Math.ceil(s._currentTime-s._player.currentTime)},s._handleConnection=function(){s._logger.debug("Connected to push server")},s._handleConnectionError=function(){s._logger.error("Got an error during connection to push server")},s._makeCuePointStartEndTime=function(e,t){return{startTime:s._player.currentTime-(s._currentTimeLive-e),endTime:t?s._player.currentTime-(s._currentTimeLive-t):Number.MAX_SAFE_INTEGER}},s._isCueInvalid=function(e){return isNaN(e.startTime)||e.startTime<0},s._prepareThumbCuePoints=function(e){var t=o(o(o({},e),s._makeCuePointStartEndTime(e.createdAt)),{assetUrl:c.makeAssetUrl(s._baseThumbAssetUrl,e.assetId)});s._isCueInvalid(t)||(s._thumbCuePoints.push(t),s._thumbCuePoints=s._fixCuePointEndTime(s._thumbCuePoints),s._addCuePointToPlayer([t]))},s._prepareViewChangeCuePoints=function(e){try{var t=JSON.parse(e.partnerData),n=o(o(o({},e),s._makeCuePointStartEndTime(e.createdAt)),{partnerData:t});if(s._isCueInvalid(n))return;s._slideViewChangeCuePoints.push(n),s._slideViewChangeCuePoints=s._fixCuePointEndTime(s._slideViewChangeCuePoints),s._addCuePointToPlayer([n])}catch(e){s._logger.error("Unnable parse slide-view change cue-point")}},s._preparePublicQnaCuePoints=function(e){var t=o(o(o({},e),{cueType:a.KalturaCuePointType.PUBLIC_QNA}),s._makeCuePointStartEndTime(e.createdAt,e.endTime));s._isCueInvalid(t)||s._addCuePointToPlayer([t])},s._prepareUserQnaCuePoints=function(e){var t=o(o({},e),{cueType:a.KalturaCuePointType.USER_QNA,startTime:0,endTime:0});s._addCuePointToPlayer([t])},s._prepareCodeQnaCuePoints=function(e){try{var t=JSON.parse(e.partnerData),n=o(o({},e),{partnerData:t});s._addCuePointToPlayer([n])}catch(e){s._logger.error("Unnable parse code qna cue-point")}},s._getBaseThumbAssetUrl=function(){if(!s._thumbUrlIsLoaderActive){s._thumbUrlIsLoaderActive=!0;var e=s._thumbUrlAssetIdQueue.shift();s._player.provider.doRequest([{loader:h.ThumbUrlLoader,params:{thumbAssetId:e}}]).then((function(e){if(s._thumbUrlIsLoaderActive=!1,e.has(h.ThumbUrlLoader.id)){s._logger.debug("baseThumbAssetUrl fetched");var t=e.get(h.ThumbUrlLoader.id);s._baseThumbAssetUrl=null==t?void 0:t.response,s._thumbUrlAssetIdQueue=[],s._thumbUrlLoaderResolvePromise()}})).catch((function(e){s._thumbUrlIsLoaderActive=!1,s._logger.warn("can't get baseThumbAssetUrl"),s._thumbUrlAssetIdQueue.length&&(s._logger.debug("try get next thumbAssetId from queue"),s._getBaseThumbAssetUrl())}))}},s._handleThumbNotificationData=function(e){var t,n,r=e.thumbs;!s._baseThumbAssetUrl&&(null===(t=r[0])||void 0===t?void 0:t.assetId)&&(s._thumbUrlAssetIdQueue.push(null===(n=r[0])||void 0===n?void 0:n.assetId),s._getBaseThumbAssetUrl()),Promise.all([s._currentTimeLivePromise,s._thumbUrlLoaderPromise]).then((function(){r.forEach((function(e){return s._prepareThumbCuePoints(e)}))}))},s._handleSlideViewChangeNotificationData=function(e){var t=e.slideViewChanges;s._currentTimeLivePromise.then((function(){t.forEach((function(e){return s._prepareViewChangeCuePoints(e)}))}))},s._handlePublicQnaNotificationsData=function(e){var t=e.messages;s._currentTimeLivePromise.then((function(){t.forEach((function(e){return s._preparePublicQnaCuePoints(e)}))}))},s._handleUserQnaNotificationsData=function(e){var t=e.messages;s._currentTimeLivePromise.then((function(){t.forEach((function(e){return s._prepareUserQnaCuePoints(e)}))}))},s._handleCodeQnaNotificationsData=function(e){var t=e.settings;s._currentTimeLivePromise.then((function(){t.forEach((function(e){return s._prepareCodeQnaCuePoints(e)}))}))},s._pushNotification=new u.PushNotificationPrivider(s._player,s._logger),s._currentTimeLivePromise=s._makeCurrentTimeLiveReadyPromise(),s._thumbUrlLoaderPromise=s._makeThumbUrlLoaderResolvePromise(),s._pushNotification.init(),s._constructPushNotificationListener(),s._pushNotification.registerToPushServer(s._player.sources.id,i,s._handleConnection,s._handleConnectionError),s._addBindings(),s}return i(t,e),t.prototype._addBindings=function(){this._eventManager.listen(this._player,this._player.Event.TIMED_METADATA,this._onTimedMetadataLoaded),this._eventManager.listen(this._player,this._player.Event.SEEKING,this._handleSeeking),this._eventManager.listen(this._player,this._player.Event.TIME_UPDATE,this._onTimeUpdate)},t.prototype._fixCuePointEndTime=function(e){var t=this;return c.sortArrayBy(e,"createdAt").map((function(n,r){if(n.endTime===Number.MAX_SAFE_INTEGER&&r!==e.length-1){var i=o(o({},n),{endTime:e[r+1].startTime});return t._addCuePointToPlayer([i]),i}return n}))},t.prototype._handlePushNotificationsErrorData=function(e){this._logger.warn("Got an error from push notification server - ",e)},t.prototype._constructPushNotificationListener=function(){this._pushNotification.on(u.PushNotificationEventTypes.PushNotificationsError,this._handlePushNotificationsErrorData),this._types.has(a.KalturaCuePointType.SLIDE)&&this._pushNotification.on(u.PushNotificationEventTypes.ThumbNotification,this._handleThumbNotificationData),this._types.has(a.KalturaCuePointType.VIEW_CHANGE)&&this._pushNotification.on(u.PushNotificationEventTypes.SlideViewChangeNotification,this._handleSlideViewChangeNotificationData),this._types.has(a.KalturaCuePointType.PUBLIC_QNA)&&this._pushNotification.on(u.PushNotificationEventTypes.PublicNotifications,this._handlePublicQnaNotificationsData),this._types.has(a.KalturaCuePointType.USER_QNA)&&this._pushNotification.on(u.PushNotificationEventTypes.UserNotifications,this._handleUserQnaNotificationsData),this._types.has(a.KalturaCuePointType.CODE_QNA)&&this._pushNotification.on(u.PushNotificationEventTypes.CodeNotifications,this._handleCodeQnaNotificationsData)},t.prototype._removePushNotificationListener=function(){this._pushNotification.off(u.PushNotificationEventTypes.PushNotificationsError,this._handlePushNotificationsErrorData),this._types.has(a.KalturaCuePointType.SLIDE)&&this._pushNotification.off(u.PushNotificationEventTypes.ThumbNotification,this._handleThumbNotificationData),this._types.has(a.KalturaCuePointType.VIEW_CHANGE)&&this._pushNotification.off(u.PushNotificationEventTypes.SlideViewChangeNotification,this._handleSlideViewChangeNotificationData),this._types.has(a.KalturaCuePointType.PUBLIC_QNA)&&this._pushNotification.off(u.PushNotificationEventTypes.PublicNotifications,this._handlePublicQnaNotificationsData),this._types.has(a.KalturaCuePointType.USER_QNA)&&this._pushNotification.off(u.PushNotificationEventTypes.UserNotifications,this._handleUserQnaNotificationsData),this._types.has(a.KalturaCuePointType.CODE_QNA)&&this._pushNotification.off(u.PushNotificationEventTypes.CodeNotifications,this._handleCodeQnaNotificationsData)},t.prototype.destroy=function(){this._pushNotification.reset(),this._removePushNotificationListener(),this._currentTimeLivePromise=this._makeCurrentTimeLiveReadyPromise(),this._thumbUrlLoaderPromise=this._makeThumbUrlLoaderResolvePromise()},t}(s.Provider);t.LiveProvider=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotificationPrivider=t.PushNotificationEventTypes=void 0;var r,i=n(51),o=n(54),s=n(4);!function(e){e.PushNotificationsError="PUSH_NOTIFICATIONS_ERROR",e.ThumbNotification="THUMB_CUE_POINT_READY_NOTIFICATION",e.SlideViewChangeNotification="SLIDE_VIEW_CHANGE_CODE_CUE_POINT",e.PublicNotifications="PUBLIC_QNA_NOTIFICATIONS",e.UserNotifications="USER_QNA_NOTIFICATIONS",e.CodeNotifications="CODE_QNA_NOTIFICATIONS"}(r=t.PushNotificationEventTypes||(t.PushNotificationEventTypes={}));var a=function(){function e(e,t){this._player=e,this._logger=t,this._pushServerInstance=null,this._registeredToMessages=!1,this._events=new i.EventsManager,this._initialized=!1,this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events)}return e.prototype.init=function(){this._initialized||(this._initialized=!0,this._pushServerInstance=new o.PushNotifications(this._player,this._logger))},e.prototype.reset=function(){this._registeredToMessages=!1},e.prototype.registerToPushServer=function(e,t,n,o){var a=this;if(this._registeredToMessages)throw this._logger.error("Multiple registration error"),new Error("Already register to push server");if(this._logger.info("Registering for push notifications server"),!this._pushServerInstance)return this._logger.error("Can't register to notifications as _pushServerInstance doesn't exists"),void this._events.emit({type:r.PushNotificationsError,error:"Can't register to notifications as _pushServerInstance doesn't exists"});var u=[];if(t.has(s.KalturaCuePointType.SLIDE)&&u.push(this._createThumbRegistration(e)),t.has(s.KalturaCuePointType.VIEW_CHANGE)&&u.push(this._createSlideViewChangeRegistration(e)),t.has(s.KalturaCuePointType.PUBLIC_QNA)&&u.push(this._createPublicQnaRegistration(e)),t.has(s.KalturaCuePointType.USER_QNA)){var c=i.getQnaUserId(this._player);u.push(this._createUserQnaRegistration(e,c))}t.has(s.KalturaCuePointType.CODE_QNA)&&u.push(this._createCodeQnaRegistration(e)),this._pushServerInstance.registerNotifications({prepareRegisterRequestConfigs:u,onSocketReconnect:function(){}}).then((function(){a._logger.info("Registered push notification service"),a._registeredToMessages=!0,n()}),(function(e){a._logger.error("Registration for push notification error"),o(),a._events.emit({type:r.PushNotificationsError,error:e})}))},e.prototype._createThumbRegistration=function(e){var t=this;return this._logger.info("Register thumb notification"),{eventName:r.ThumbNotification,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.ThumbNotification,thumbs:e})}}},e.prototype._createSlideViewChangeRegistration=function(e){var t=this;return this._logger.info("Register slide notification"),{eventName:r.SlideViewChangeNotification,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.SlideViewChangeNotification,slideViewChanges:e})}}},e.prototype._createPublicQnaRegistration=function(e){var t=this;return this._logger.info("Register public qna notification"),{eventName:r.PublicNotifications,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.PublicNotifications,messages:e})}}},e.prototype._createUserQnaRegistration=function(e,t){var n=this;return this._logger.info("Register user qna notification"),{eventName:r.UserNotifications,eventParams:{entryId:e,userId:t},onMessage:function(e){n._events.emit({type:r.UserNotifications,messages:e})}}},e.prototype._createCodeQnaRegistration=function(e){var t=this;return this._logger.info("Register code qna notification"),{eventName:r.CodeNotifications,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.CodeNotifications,settings:e})}}},e}();t.PushNotificationPrivider=a},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(52),t),i(n(53),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventsManager=void 0;var r=function(){function e(){this._eventListeners={},this._wildcardEventListeners=[]}return e.prototype.on=function(e,t){"*"!==e?(this._eventListeners[e]||(this._eventListeners[e]=[])).push(t):this._wildcardEventListeners.push(t)},e.prototype.off=function(e,t){if("*"!==e){var n=this._eventListeners[e];n&&n.splice(n.indexOf(t)>>>0,1)}else this._wildcardEventListeners.splice(this._wildcardEventListeners.indexOf(t)>>>0,1)},e.prototype.emit=function(e){(this._eventListeners[e.type]||[]).slice().map((function(t){t(e)})),this._wildcardEventListeners.slice().map((function(t){t(e)}))},e}();t.EventsManager=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=t.getQnaUserId=t.getUserId=t.generateId=void 0;t.generateId=function(){return(new Date).getTime().toString(36)+Math.random().toString(36).slice(2)};function r(){return"undefined"==typeof Storage?i():((e=localStorage.getItem("anonymousUserId"))||(e=i(),localStorage.setItem("anonymousUserId",e)),e);var e}t.getUserId=r;function i(){return"##".concat("Guest").concat("HashSeparator").concat(function(){for(var e=(0,t.generateId)(),n="",r=0;r<e.length;r++){var i=e.charAt(r);n+=Number.isNaN(+i)?i.charCodeAt(0):i}return n}(),"##")}t.getQnaUserId=function(e){var t,n,i,o,s=e,a=s.config,u=s.plugins,c=(null==a?void 0:a.session)||{},h=(null===(n=null===(t=null==u?void 0:u.qna)||void 0===t?void 0:t.config)||void 0===n?void 0:n.userRole)||c.userRole;return h&&"anonymousRole"!==h?(null===(o=null===(i=null==u?void 0:u.qna)||void 0===i?void 0:i.config)||void 0===o?void 0:o.userId)||c.userId:r()},t.debounce=function(e,t,n){var r;return void 0===t&&(t=50),void 0===n&&(n={isImmediate:!1}),function(){for(var i=this,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=function(){r=void 0,n.isImmediate||e.apply(i,o)},u=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout(a,t),u&&e.apply(this,o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotifications=t.isAPIErrorResponse=t.isAPINotificationResponse=void 0;var r=n(55),i=n(56),o=n(5);function s(e){return"KalturaPushNotificationData"===e.objectType}function a(e){return"KalturaAPIException"===e.objectType}t.isAPINotificationResponse=s,t.isAPIErrorResponse=a;var u=function(){function e(e,t){this._socketPool={},this._player=e,this._logger=t,this._onPlayerReset()}return e.prototype._onPlayerReset=function(){var e=this;this._player.addEventListener(this._player.Event.PLAYER_RESET,(function(){e.reset()}))},e.prototype.reset=function(){for(var e in this._socketPool)this._socketPool[e].destroy();this._socketPool={}},e.prototype.registerNotifications=function(e){var t=this,n=e.prepareRegisterRequestConfigs.map((function(e){return t._prepareRegisterRequest(e)}));return this._player.provider.doRequest([{loader:r.PushNotificationLoader,params:n}]).then((function(n){var i;if(n&&n.has(r.PushNotificationLoader.id)){var o=(null===(i=n.get(r.PushNotificationLoader.id))||void 0===i?void 0:i.response).map((function(n,r){return t._processResult(e.prepareRegisterRequestConfigs[r],n,e.onSocketDisconnect,e.onSocketReconnect)}));return Promise.all(o).then((function(){}))}})).catch((function(e){t._logger.warn("Error: failed to multirequest of register requests - ",e)}))},e.prototype._prepareRegisterRequest=function(e){var t={service:"eventnotification_eventnotificationtemplate",action:"register",notificationTemplateSystemName:e.eventName,pushNotificationParams:{objectType:"KalturaPushNotificationParams",userParams:{}}},n=0;for(var r in e.eventParams)t.pushNotificationParams.userParams["item"+n]={objectType:"KalturaPushNotificationParams",key:r,value:{objectType:"KalturaStringValue",value:e.eventParams[r]},sQueueKeyParam:1},n++;return t},e.prototype._processResult=function(e,t,n,r){if(a(t))return this._logger.error("Error fetching registration info from service "+e.eventName),Promise.reject(new Error(t.message));if(!s(t))return Promise.reject(new Error("invalid response structure"));var u=o.getDomainFromUrl(t.url),c=this._socketPool[u];return c||(c=new i.SocketWrapper({key:u,url:t.url,onSocketDisconnect:n,onSocketReconnect:r},this._logger),this._socketPool[u]=c),c.prepareForListening(e.eventName,t.queueName,t.queueKey,e.onMessage),Promise.resolve()},e}();t.PushNotifications=u},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotificationLoader=void 0;var o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){var t=this;this._apiRequests=e,this._requests=[],this._response={};var n=new Map;e.forEach((function(e){var s=new o(n),a=e.action,u=e.service,c=i(e,["action","service"]);s.action=a,s.service=u,s.params=r({},c),t.requests.push(s)}))}return Object.defineProperty(e,"id",{get:function(){return"push-notification"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){this._response=e.map((function(e){return e.data}))},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return this._apiRequests.length>0},e}();t.PushNotificationLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWrapper=void 0;var r=n(57),i=n(5),o=function(){function e(e,t){this._logger=t,this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1,this._logger.info("Connecting to socket"),this._connectAndListenToSocket(e)}return e.prototype.destroy=function(){this._socket&&(this._socket.disconnect(),this._socket=null),this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1},e.prototype._connectAndListenToSocket=function(t){var n=this;this._logger.info("connect to socket"),this._socket=r(t.url,{forceNew:!0,timeout:e.CONNECTION_TIMEOUT}),this._socket.on("validated",(function(){for(var e in n._connected=!0,n._listenKeys)n._logger.info("Emit listen to url"),n._socket.emit("listen",n._listenKeys[e].queueNameHash,n._listenKeys[e].queueKeyHash)})),this._socket.on("connected",(function(e,t){n._listenKeys[t]?(n._messageKeyToQueueKeyMap[e]=t,n._logger.info("Listening to queue")):n._logger.error("Cannot listen to queue, queueKeyHash not recognized")})),this._socket.on("message",(function(e,t){n._logger.debug("Cannot listen to queue, queueKeyHash not recognized"),n._messageKeyToQueueKeyMap[e]&&n._listenKeys[n._messageKeyToQueueKeyMap[e]]?n._listenKeys[n._messageKeyToQueueKeyMap[e]].onMessage.forEach((function(e){e(t)})):n._logger.error("couldn't find queueKey in map")})),this._socket.on("disconnect",(function(e){if(n._logger.info("push server was disconnected"),!i.isEmptyObject(n._listenKeys)){var r=t.onSocketDisconnect;r&&r(e)}})),this._socket.on("reconnect",(function(e){if(n._logger.info("push server was reconnected"),!i.isEmptyObject(n._listenKeys)){var r=t.onSocketReconnect;r&&r(e)}})),this._socket.on("reconnect_error",(function(e){n._logger.error("reconnection error")})),this._socket.on("errorMsg",(function(e){n._logger.error("error message recieved")}))},e.prototype.prepareForListening=function(e,t,n,r){this._listenKeys[n]?this._listenKeys[n].onMessage.push(r):this._listenKeys[n]={eventName:e,queueNameHash:t,queueKeyHash:n,onMessage:[r]},this._connected&&(this._logger.info("Listening to "+e),this._socket.emit("listen",t,n))},e.CONNECTION_TIMEOUT=6e5,e}();t.SocketWrapper=o},function(e,t,n){var r=n(58),i=n(11),o=n(22),s=n(6)("socket.io-client");e.exports=t=u;var a=t.managers={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i=r(e),u=i.source,c=i.id,h=i.path,p=a[c]&&h in a[c].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||p?(s("ignoring socket cache for %s",u),n=o(u,t)):(a[c]||(s("new io instance for %s",u),a[c]=o(u,t)),n=a[c]),i.query&&!t.query&&(t.query=i.query),n.socket(i.path,t)}t.protocol=i.protocol,t.connect=u,t.Manager=n(22),t.Socket=n(28)},function(e,t,n){var r=n(19),i=n(6)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),i("parse %s",e),n=r(e));n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port,n.href=n.protocol+"://"+o+(t&&t.port===n.port?"":":"+n.port),n}},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(60),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,i=60*r,o=24*i;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(r){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(62)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(63),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,i=60*r,o=24*i;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(20),i=n(21),o=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.deconstructPacket=function(e){var t=[],n=e.data,o=e;return o.data=function e(t,n){if(!t)return t;if(i(t)){var o={_placeholder:!0,num:n.length};return n.push(t),o}if(r(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a],n);return s}if("object"==typeof t&&!(t instanceof Date)){s={};for(var u in t)s[u]=e(t[u],n);return s}return t}(n,t),o.attachments=t.length,{packet:o,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(r(t))for(var i=0;i<t.length;i++)t[i]=e(t[i],n);else if("object"==typeof t)for(var o in t)t[o]=e(t[o],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,o=e;!function e(u,c,h){if(!u)return u;if(s&&u instanceof Blob||a&&u instanceof File){n++;var p=new FileReader;p.onload=function(){h?h[c]=this.result:o=this.result,--n||t(o)},p.readAsArrayBuffer(u)}else if(r(u))for(var f=0;f<u.length;f++)e(u[f],f,u);else if("object"==typeof u&&!i(u))for(var l in u)e(u[l],l,u)}(o),n||t(o)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),h=0,p=a>0?s-4:s;for(n=0;n<p;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[h++]=t>>16&255,u[h++]=t>>8&255,u[h++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[h++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[h++]=t>>8&255,u[h++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(h(e,s,s+16383>a?a:s+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function h(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){ +var r=n(66),i=n(67),o=n(68);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return p(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!u.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|d(t,n),i=(e=a(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(u.isBuffer(t)){var n=0|l(t.length);return 0===(e=a(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?a(e,0):f(e,t);if("Buffer"===t.type&&o(t.data))return f(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function p(e,t){if(h(t),e=a(e,t<0?0:0|l(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|l(t.length);e=a(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function l(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function d(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return D(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return D(e).length;t=(""+t).toLowerCase(),r=!0}}function y(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return k(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:m(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):m(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function m(e,t,n,r,i){var o,s=1,a=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var h=-1;for(o=n;o<a;o++)if(c(e,o)===c(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*s}else-1!==h&&(o-=o-h),h=-1}else for(n+u>a&&(n=a-u),o=n;o>=0;o--){for(var p=!0,f=0;f<u;f++)if(c(e,o+f)!==c(t,f)){p=!1;break}if(p)return o}return-1}function _(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s<r;++s){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))return s;e[n+s]=a}return s}function C(e,t,n,r){return K(D(t,e.length-n),e,n,r)}function b(e,t,n,r){return K(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function P(e,t,n,r){return b(e,t,n,r)}function T(e,t,n,r){return K(q(t),e,n,r)}function w(e,t,n,r){return K(function(e,t){for(var n,r,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,s,a,u,c=e[i],h=null,p=c>239?4:c>223?3:c>191?2:1;if(i+p<=n)switch(p){case 1:c<128&&(h=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,p=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=p}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=4096));return n}(r)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=s(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return function(e,t,n,r){return h(t),t<=0?a(e,t):void 0!==n?"string"==typeof r?a(e,t).fill(n,r):a(e,t).fill(n):a(e,t)}(null,e,t,n)},u.allocUnsafe=function(e){return p(null,e)},u.allocUnsafeSlow=function(e){return p(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=u.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var s=e[n];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,i),i+=s.length}return r},u.byteLength=d,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?E(this,0,e):y.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),h=e.slice(t,n),p=0;p<a;++p)if(c[p]!==h[p]){o=c[p],s=h[p];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return _(this,e,t,n);case"utf8":case"utf-8":return C(this,e,t,n);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return P(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function N(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function O(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=t;o<n;++o)i+=j(e[o]);return i}function R(e,t,n){for(var r=e.slice(t,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function S(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function F(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function x(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function B(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return o||B(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function M(e,t,n,r,o){return o||B(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||S(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||S(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||S(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||S(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||S(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||S(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||S(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||S(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(e,t){t||S(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(e,t){return t||S(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||S(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||S(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||S(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||S(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||S(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||I(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):x(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<n&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);I(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):x(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):x(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return M(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return M(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=u.isBuffer(e)?e:D(new u(e,r).toString()),a=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%a]}return this};var U=/[^+\/0-9A-Za-z-_]/g;function j(e){return e<16?"0"+e.toString(16):e.toString(16)}function D(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],s=0;s<r;++s){if((n=e.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(U,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(65))},function(e,t,n){var r=n(71),i=n(14);e.exports=function(e){var t=e.xdomain,n=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||r))return new XMLHttpRequest}catch(e){}try{if("undefined"!=typeof XDomainRequest&&!n&&o)return new XDomainRequest}catch(e){}if(!t)try{return new(i[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(e){}}},function(e,t){e.exports="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(e,t,n){var r=n(3),i=n(2);function o(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.forceNode=e.forceNode,this.isReactNative=e.isReactNative,this.extraHeaders=e.extraHeaders,this.localAddress=e.localAddress}e.exports=o,i(o.prototype),o.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},o.prototype.open=function(){return"closed"!==this.readyState&&""!==this.readyState||(this.readyState="opening",this.doOpen()),this},o.prototype.close=function(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this},o.prototype.send=function(e){if("open"!==this.readyState)throw new Error("Transport not open");this.write(e)},o.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},o.prototype.onData=function(e){var t=r.decodePacket(e,this.socket.binaryType);this.onPacket(t)},o.prototype.onPacket=function(e){this.emit("packet",e)},o.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.Provider=void 0;var i=n(35),o=function(){function e(e,t,n,r){this.cuePointManager=null,this._types=r,this._logger=n,this._player=e,this._eventManager=t,this._logger=n}return e.prototype._addCuePointToPlayer=function(e){var t=e.map((function(e){return{startTime:e.startTime,endTime:e.endTime,id:e.id,metadata:r(e,["startTime","endTime","id"])}}));"youtube"===this._player.engineType?(this.cuePointManager||(this.cuePointManager=new i.CuePointManager(this._player,this._eventManager)),this.cuePointManager.addCuePoints(t)):this._player.cuePointManager.addCuePoints(t)},e.prototype.destroy=function(){this.cuePointManager&&this.cuePointManager.destroy()},e}();t.Provider=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCodeCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.tags="",n.code=t.code,n.description=t.description,n.endTime=t.endTime,n.duration=t.duration,n.tags=t.tags,n}return i(t,e),t}(n(1).KalturaCuePoint);t.KalturaCodeCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbUrlLoader=void 0;var r=KalturaPlayer.providers.RequestBuilder,i=function(){function e(e){this._thumbAssetId="",this._requests=[],this._response="";var t=new Map,n=new r(t);this._thumbAssetId=e.thumbAssetId,n.service="thumbAsset",n.action="getUrl",n.params={id:this._thumbAssetId},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"thumburlloader"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t;this._response=null===(t=e[0])||void 0===t?void 0:t.data},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._thumbAssetId},e}();t.ThumbUrlLoader=i},function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,r=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];e.exports=function(e){var t=e,i=e.indexOf("["),o=e.indexOf("]");-1!=i&&-1!=o&&(e=e.substring(0,i)+e.substring(i,o).replace(/:/g,";")+e.substring(o,e.length));for(var s,a,u=n.exec(e||""),c={},h=14;h--;)c[r[h]]=u[h]||"";return-1!=i&&-1!=o&&(c.source=t,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=function(e,t){var n=t.replace(/\/{2,9}/g,"/").split("/");"/"!=t.substr(0,1)&&0!==t.length||n.splice(0,1);"/"==t.substr(t.length-1,1)&&n.splice(n.length-1,1);return n}(0,c.path),c.queryKey=(s=c.query,a={},s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(a[t]=n)})),a),c}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){(function(t){e.exports=function(e){return n&&t.isBuffer(e)||r&&(e instanceof ArrayBuffer||function(e){return"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer}(e))};var n="function"==typeof t&&"function"==typeof t.isBuffer,r="function"==typeof ArrayBuffer}).call(this,n(12).Buffer)},function(e,t,n){var r=n(69),i=n(28),o=n(2),s=n(11),a=n(29),u=n(30),c=n(6)("socket.io-client:manager"),h=n(27),p=n(86),f=Object.prototype.hasOwnProperty;function l(e,t){if(!(this instanceof l))return new l(e,t);e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connecting=[],this.lastPing=null,this.encoding=!1,this.packetBuffer=[];var n=t.parser||s;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this.autoConnect=!1!==t.autoConnect,this.autoConnect&&this.open()}e.exports=l,l.prototype.emitAll=function(){for(var e in this.emit.apply(this,arguments),this.nsps)f.call(this.nsps,e)&&this.nsps[e].emit.apply(this.nsps[e],arguments)},l.prototype.updateSocketIds=function(){for(var e in this.nsps)f.call(this.nsps,e)&&(this.nsps[e].id=this.generateId(e))},l.prototype.generateId=function(e){return("/"===e?"":e+"#")+this.engine.id},o(l.prototype),l.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},l.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},l.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},l.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},l.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},l.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},l.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},l.prototype.open=l.prototype.connect=function(e,t){if(c("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;c("opening %s",this.uri),this.engine=r(this.uri,this.opts);var n=this.engine,i=this;this.readyState="opening",this.skipReconnect=!1;var o=a(n,"open",(function(){i.onopen(),e&&e()})),s=a(n,"error",(function(t){if(c("connect_error"),i.cleanup(),i.readyState="closed",i.emitAll("connect_error",t),e){var n=new Error("Connection error");n.data=t,e(n)}else i.maybeReconnectOnOpen()}));if(!1!==this._timeout){var u=this._timeout;c("connect attempt will timeout after %d",u),0===u&&o.destroy();var h=setTimeout((function(){c("connect attempt timed out after %d",u),o.destroy(),n.close(),n.emit("error","timeout"),i.emitAll("connect_timeout",u)}),u);this.subs.push({destroy:function(){clearTimeout(h)}})}return this.subs.push(o),this.subs.push(s),this},l.prototype.onopen=function(){c("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",u(this,"ondata"))),this.subs.push(a(e,"ping",u(this,"onping"))),this.subs.push(a(e,"pong",u(this,"onpong"))),this.subs.push(a(e,"error",u(this,"onerror"))),this.subs.push(a(e,"close",u(this,"onclose"))),this.subs.push(a(this.decoder,"decoded",u(this,"ondecoded")))},l.prototype.onping=function(){this.lastPing=new Date,this.emitAll("ping")},l.prototype.onpong=function(){this.emitAll("pong",new Date-this.lastPing)},l.prototype.ondata=function(e){this.decoder.add(e)},l.prototype.ondecoded=function(e){this.emit("packet",e)},l.prototype.onerror=function(e){c("error",e),this.emitAll("error",e)},l.prototype.socket=function(e,t){var n=this.nsps[e];if(!n){n=new i(this,e,t),this.nsps[e]=n;var r=this;n.on("connecting",o),n.on("connect",(function(){n.id=r.generateId(e)})),this.autoConnect&&o()}function o(){~h(r.connecting,n)||r.connecting.push(n)}return n},l.prototype.destroy=function(e){var t=h(this.connecting,e);~t&&this.connecting.splice(t,1),this.connecting.length||this.close()},l.prototype.packet=function(e){c("writing packet %j",e);var t=this;e.query&&0===e.type&&(e.nsp+="?"+e.query),t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,(function(n){for(var r=0;r<n.length;r++)t.engine.write(n[r],e.options);t.encoding=!1,t.processPacketQueue()})))},l.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},l.prototype.cleanup=function(){c("cleanup");for(var e=this.subs.length,t=0;t<e;t++){this.subs.shift().destroy()}this.packetBuffer=[],this.encoding=!1,this.lastPing=null,this.decoder.destroy()},l.prototype.close=l.prototype.disconnect=function(){c("disconnect"),this.skipReconnect=!0,this.reconnecting=!1,"opening"===this.readyState&&this.cleanup(),this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},l.prototype.onclose=function(e){c("onclose"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},l.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)c("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();c("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout((function(){e.skipReconnect||(c("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open((function(t){t?(c("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(c("reconnect success"),e.onreconnect())})))}),t);this.subs.push({destroy:function(){clearTimeout(n)}})}},l.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},function(e,t,n){var r=n(13),i=n(72),o=n(82),s=n(83);t.polling=function(e){var t=!1,n=!1,s=!1!==e.jsonp;if("undefined"!=typeof location){var a="https:"===location.protocol,u=location.port;u||(u=a?443:80),t=e.hostname!==location.hostname||u!==e.port,n=e.secure!==a}if(e.xdomain=t,e.xscheme=n,"open"in new r(e)&&!e.forceJSONP)return new i(e);if(!s)throw new Error("JSONP disabled");return new o(e)},t.websocket=s},function(e,t,n){var r=n(15),i=n(7),o=n(3),s=n(8),a=n(26),u=n(9)("engine.io-client:polling");e.exports=h;var c=null!=new(n(13))({xdomain:!1}).responseType;function h(e){var t=e&&e.forceBase64;c&&!t||(this.supportsBinary=!1),r.call(this,e)}s(h,r),h.prototype.name="polling",h.prototype.doOpen=function(){this.poll()},h.prototype.pause=function(e){var t=this;function n(){u("paused"),t.readyState="paused",e()}if(this.readyState="pausing",this.polling||!this.writable){var r=0;this.polling&&(u("we are currently polling - waiting to pause"),r++,this.once("pollComplete",(function(){u("pre-pause polling complete"),--r||n()}))),this.writable||(u("we are currently writing - waiting to pause"),r++,this.once("drain",(function(){u("pre-pause writing complete"),--r||n()})))}else n()},h.prototype.poll=function(){u("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},h.prototype.onData=function(e){var t=this;u("polling got data %s",e);o.decodePayload(e,this.socket.binaryType,(function(e,n,r){if("opening"===t.readyState&&t.onOpen(),"close"===e.type)return t.onClose(),!1;t.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"===this.readyState?this.poll():u('ignoring poll - transport state "%s"',this.readyState))},h.prototype.doClose=function(){var e=this;function t(){u("writing close packet"),e.write([{type:"close"}])}"open"===this.readyState?(u("transport open - closing"),t()):(u("transport not open - deferring close"),this.once("open",t))},h.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")};o.encodePayload(e,this.supportsBinary,(function(e){t.doWrite(e,n)}))},h.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=a()),this.supportsBinary||e.sid||(e.b64=1),e=i.encode(e),this.port&&("https"===t&&443!==Number(this.port)||"http"===t&&80!==Number(this.port))&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e}},function(e,t,n){(function(t){var r=n(74),i=Object.prototype.toString,o="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===i.call(Blob),s="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===i.call(File);e.exports=function e(n){if(!n||"object"!=typeof n)return!1;if(r(n)){for(var i=0,a=n.length;i<a;i++)if(e(n[i]))return!0;return!1}if("function"==typeof t&&t.isBuffer&&t.isBuffer(n)||"function"==typeof ArrayBuffer&&n instanceof ArrayBuffer||o&&n instanceof Blob||s&&n instanceof File)return!0;if(n.toJSON&&"function"==typeof n.toJSON&&1===arguments.length)return e(n.toJSON(),!0);for(var u in n)if(Object.prototype.hasOwnProperty.call(n,u)&&e(n[u]))return!0;return!1}}).call(this,n(12).Buffer)},function(e,t,n){"use strict";var r,i="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),o={},s=0,a=0;function u(e){var t="";do{t=i[e%64]+t,e=Math.floor(e/64)}while(e>0);return t}function c(){var e=u(+new Date);return e!==r?(s=0,r=e):e+"."+u(s++)}for(;a<64;a++)o[i[a]]=a;c.encode=u,c.decode=function(e){var t=0;for(a=0;a<e.length;a++)t=64*t+o[e.charAt(a)];return t},e.exports=c},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(11),i=n(2),o=n(85),s=n(29),a=n(30),u=n(6)("socket.io-client:socket"),c=n(7),h=n(25);e.exports=l;var p={connect:1,connect_error:1,connect_timeout:1,connecting:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1,ping:1,pong:1},f=i.prototype.emit;function l(e,t,n){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0,this.flags={},n&&n.query&&(this.query=n.query),this.io.autoConnect&&this.open()}i(l.prototype),l.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[s(e,"open",a(this,"onopen")),s(e,"packet",a(this,"onpacket")),s(e,"close",a(this,"onclose"))]}},l.prototype.open=l.prototype.connect=function(){return this.connected||(this.subEvents(),this.io.reconnecting||this.io.open(),"open"===this.io.readyState&&this.onopen(),this.emit("connecting")),this},l.prototype.send=function(){var e=o(arguments);return e.unshift("message"),this.emit.apply(this,e),this},l.prototype.emit=function(e){if(p.hasOwnProperty(e))return f.apply(this,arguments),this;var t=o(arguments),n={type:(void 0!==this.flags.binary?this.flags.binary:h(t))?r.BINARY_EVENT:r.EVENT,data:t,options:{}};return n.options.compress=!this.flags||!1!==this.flags.compress,"function"==typeof t[t.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),n.id=this.ids++),this.connected?this.packet(n):this.sendBuffer.push(n),this.flags={},this},l.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},l.prototype.onopen=function(){if(u("transport is open - connecting"),"/"!==this.nsp)if(this.query){var e="object"==typeof this.query?c.encode(this.query):this.query;u("sending connect packet with query %s",e),this.packet({type:r.CONNECT,query:e})}else this.packet({type:r.CONNECT})},l.prototype.onclose=function(e){u("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},l.prototype.onpacket=function(e){var t=e.nsp===this.nsp,n=e.type===r.ERROR&&"/"===e.nsp;if(t||n)switch(e.type){case r.CONNECT:this.onconnect();break;case r.EVENT:case r.BINARY_EVENT:this.onevent(e);break;case r.ACK:case r.BINARY_ACK:this.onack(e);break;case r.DISCONNECT:this.ondisconnect();break;case r.ERROR:this.emit("error",e.data)}},l.prototype.onevent=function(e){var t=e.data||[];u("emitting event %j",t),null!=e.id&&(u("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?f.apply(this,t):this.receiveBuffer.push(t)},l.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var i=o(arguments);u("sending ack %j",i),t.packet({type:h(i)?r.BINARY_ACK:r.ACK,id:e,data:i})}}},l.prototype.onack=function(e){var t=this.acks[e.id];"function"==typeof t?(u("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),delete this.acks[e.id]):u("bad ack %s",e.id)},l.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},l.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)f.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},l.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},l.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},l.prototype.close=l.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:r.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this},l.prototype.compress=function(e){return this.flags.compress=e,this},l.prototype.binary=function(e){return this.flags.binary=e,this}},function(e,t){e.exports=function(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}},function(e,t){var n=[].slice;e.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var r=n.call(arguments,2);return function(){return t.apply(e,r.concat(n.call(arguments)))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NAME=t.VERSION=t.Plugin=void 0;var r=n(32);Object.defineProperty(t,"Plugin",{enumerable:!0,get:function(){return r.Cuepoints}});t.VERSION="3.0.5-canary.1-188a936";t.NAME="@playkit-js/playkit-js-kaltura-cuepoints";KalturaPlayer.core.registerPlugin("kalturaCuepoints",r.Cuepoints)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Cuepoints=void 0;var o=n(33),s=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._cuePointService=new o.CuepointService(n,r.eventManager,r.logger),n.registerService("kalturaCuepoints",r._cuePointService),r}return i(t,e),t.prototype.reset=function(){this._cuePointService.reset()},t.prototype.destroy=function(){this.eventManager.destroy(),this._cuePointService.reset()},t.isValid=function(){return!0},t.defaultConfig={},t}(KalturaPlayer.core.BasePlugin);t.Cuepoints=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CuepointService=void 0;var r=n(34),i=n(49),o=n(0),s=n(4),a=function(){function e(e,t,n){var r=this;this._types=new Map,this._mediaLoaded=!1,this._logger=n,this._player=e,this._eventManager=t,t.listen(this._player,this._player.Event.CHANGE_SOURCE_ENDED,(function(){r._initProvider()}))}return Object.defineProperty(e.prototype,"CuepointType",{get:function(){return s.KalturaCuePointType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"KalturaThumbCuePointSubType",{get:function(){return s.KalturaThumbCuePointSubType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"KalturaCuePointType",{get:function(){return o.KalturaCuePoint.KalturaCuePointType},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"KalturaCuePointTags",{get:function(){return s.CuePointTags},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cuePointManager",{get:function(){var e;return(null===(e=this._provider)||void 0===e?void 0:e.cuePointManager)||null},enumerable:!1,configurable:!0}),e.prototype.registerTypes=function(e){var t=this;this._mediaLoaded?this._logger.warn("Cue point registration should occur on loadMedia (or before)"):e.forEach((function(e){Object.values(s.KalturaCuePointType).includes(e)?t._types.set(e,!0):t._logger.warn('"'+e+'" is not a valid cue point type for registration')}))},e.prototype._initProvider=function(){this._mediaLoaded=!0,0!=this._types.size?this._player.isLive()?this._provider=new i.LiveProvider(this._player,this._eventManager,this._logger,this._types):this._provider=new r.VodProvider(this._player,this._eventManager,this._logger,this._types):this._logger.warn("Cue points provider was not initialized because there are no registered types")},e.prototype.reset=function(){var e;this._mediaLoaded=!1,this._types.clear(),null===(e=this._provider)||void 0===e||e.destroy()},e}();t.CuepointService=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},s=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.VodProvider=void 0;var a=n(16),u=n(39),c=n(4),h=n(5),p=n(45),f=n(46),l=n(47),d=n(18),y=n(48),g=function(e){function t(t,n,r,i){var s=e.call(this,t,n,r,i)||this;return s._fetchedCaptionKeys=[],s._fetchingCaptionKey=null,s._handleLanguageChange=function(){var e=(s._player.getTracks(s._player.Track.TEXT)||[]).find((function(e){return e.active})),t=s._player.sources.captions;if(e&&Array.isArray(t)&&t.length){var n=t.find((function(t){return t.language===e.language&&t.label===e.label}))||t[0];s._loadCaptions(n)}},s._loadCaptions=function(e){var t=e.language+"-"+e.label;if(!s._fetchedCaptionKeys.includes(t)&&s._fetchingCaptionKey!==t){var n=e.url.match("/captionAssetId/(.*?)(/|$)");if(n&&n[1]){s._fetchingCaptionKey=t;var r=s._player.config.session,i=(null==r?void 0:r.isAnonymous)?s._player.config.session.ks:void 0;s._player.provider.doRequest([{loader:y.CaptionLoader,params:{captionAssetId:n[1]}}],i).then((function(n){if(n){if(n.has(y.CaptionLoader.id)){var r=n.get(y.CaptionLoader.id),i=null==r?void 0:r.response.captions;if(i.length){var a=i.map((function(t){return o(o({},t),{language:e.language,label:e.label,startTime:t.startTime/1e3,endTime:t.endTime/1e3,text:t.content.reduce((function(e,t){return""+e+t.text}),"")})}));a=a.filter((function(e){return e.text})),s._addCuePointToPlayer(a),s._fetchedCaptionKeys.push(t)}}}else s._logger.warn("CaptionLoader doRequest doesn't have data")})).catch((function(e){s._logger.warn("Fetching captions "+t+" has failed")})).finally((function(){s._fetchingCaptionKey=null}))}}},s._addListeners(),s._fetchVodData(),s}return i(t,e),t.prototype._addListeners=function(){this._types.has(c.KalturaCuePointType.CAPTION)&&(this._eventManager.listenOnce(this._player,this._player.Event.TEXT_TRACK_ADDED,this._handleLanguageChange),this._eventManager.listen(this._player,this._player.Event.TEXT_TRACK_CHANGED,this._handleLanguageChange))},t.prototype._removeListeners=function(){this._types.has(c.KalturaCuePointType.CAPTION)&&(this._eventManager.unlisten(this._player,this._player.Event.TEXT_TRACK_ADDED,this._handleLanguageChange),this._eventManager.unlisten(this._player,this._player.Event.TEXT_TRACK_CHANGED,this._handleLanguageChange))},t.prototype._fetchVodData=function(){var e=this,t="";this._types.has(c.KalturaCuePointType.SLIDE)&&(t=c.KalturaThumbCuePointSubType.SLIDE+","),this._types.has(c.KalturaCuePointType.CHAPTER)&&(t+=c.KalturaThumbCuePointSubType.CHAPTER+",");var n=[];t&&n.push({loader:u.ThumbLoader,params:{entryId:this._player.sources.id,subTypesFilter:t}}),this._types.has(c.KalturaCuePointType.VIEW_CHANGE)&&n.push({loader:p.ViewChangeLoader,params:{entryId:this._player.sources.id}}),this._types.has(c.KalturaCuePointType.QUIZ)&&n.push({loader:f.QuizQuestionLoader,params:{entryId:this._player.sources.id}}),this._types.has(c.KalturaCuePointType.HOTSPOT)&&n.push({loader:l.HotspotLoader,params:{entryId:this._player.sources.id}}),n.length&&this._player.provider.doRequest(n).then((function(t){t?(t.has(u.ThumbLoader.id)&&e._handleThumbResponse(t),t.has(p.ViewChangeLoader.id)&&e._handleViewChangeResponse(t),t.has(f.QuizQuestionLoader.id)&&e._handleQuizQustionResponse(t),t.has(l.HotspotLoader.id)&&e._handleHotspotResponse(t)):e._logger.warn("Provider cue points doRequest doesn't have data")})).catch((function(t){e._logger.warn("Provider cue points doRequest was rejected")}))},t.prototype._fixCuePointsEndTime=function(e){return e.map((function(t,n){if(t.endTime===Number.MAX_SAFE_INTEGER)for(var r=n+1;e[r];){if(e[r].startTime!==t.startTime)return o(o({},t),{endTime:e[r].startTime});r++}return t}))},t.prototype._handleViewChangeResponse=function(e){var t=e.get(p.ViewChangeLoader.id),n=(null==t?void 0:t.response.viewChangeCuePoints)||[];if(this._logger.debug("_fetchVodData viewChange response successful with "+n.length+" cue points"),n.length){var r=function(e){return e.map((function(e){return{id:e.id,startTime:e.startTime/1e3,endTime:e.endTime||Number.MAX_SAFE_INTEGER,cuePointType:e.cuePointType,partnerData:e.partnerData,tags:e.tags}}))}(n).reduce((function(e,t){var n;return(null===(n=t.partnerData)||void 0===n?void 0:n.viewModeLockState)?{lockedCuePoints:s(e.lockedCuePoints,[t]),viewChangeCuePoints:e.viewChangeCuePoints}:{lockedCuePoints:e.lockedCuePoints,viewChangeCuePoints:s(e.viewChangeCuePoints,[t])}}),{lockedCuePoints:[],viewChangeCuePoints:[]}),i=r.lockedCuePoints,o=r.viewChangeCuePoints;i=h.sortArrayBy(i,"startTime"),i=this._fixCuePointsEndTime(i),o=h.sortArrayBy(o,"startTime"),o=this._fixCuePointsEndTime(o),this._addCuePointToPlayer(o),this._addCuePointToPlayer(i)}},t.prototype._handleThumbResponse=function(e){var t,n=this,r=function(e){return function(t){return h.makeAssetUrl(e,t.assetId)}},i=function(e){var t,r=n._player.config.provider;return h.generateThumb(null===(t=null==r?void 0:r.env)||void 0===t?void 0:t.serviceUrl,null==r?void 0:r.partnerId,n._player.sources.id,e.startTime,null==r?void 0:r.ks)},a=function(e,t){var r=e.map((function(e){return{assetUrl:t(e),id:e.id,cuePointType:e.cuePointType,title:e.title,description:e.description,subType:e.subType,startTime:e.startTime/1e3,endTime:Number.MAX_SAFE_INTEGER}}));r=h.sortArrayBy(r,"startTime"),r=n._fixCuePointsEndTime(r),n._addCuePointToPlayer(r)},p=e.get(u.ThumbLoader.id),f=(null==p?void 0:p.response.thumbCuePoints)||[];if(this._logger.debug("_fetchVodData thumb response successful with "+f.length+" cue points"),f.length){var l=f.reduce((function(e,t){return t.subType===c.KalturaThumbCuePointSubType.SLIDE?o(o({},e),{slideCuePoints:s(e.slideCuePoints,[t])}):t.subType===c.KalturaThumbCuePointSubType.CHAPTER?o(o({},e),{chapterCuePoints:s(e.chapterCuePoints,[t])}):e}),{slideCuePoints:[],chapterCuePoints:[]}),y=l.slideCuePoints,g=l.chapterCuePoints,v=null===(t=f.find((function(e){return e.assetId})))||void 0===t?void 0:t.assetId;v?this._player.provider.doRequest([{loader:d.ThumbUrlLoader,params:{thumbAssetId:v}}]).then((function(e){if(e){if(e.has(d.ThumbUrlLoader.id)){var t=e.get(d.ThumbUrlLoader.id),o=null==t?void 0:t.response;if(o&&y.length&&a(y,r(o)),o&&g.length){a(g,(function(e){return e.assetId?r(o)(e):i(e)}))}}}else n._logger.warn("ThumbUrlLoader doRequest doesn't have data")})).catch((function(e){n._logger.warn("ThumbUrlLoader doRequest was rejected")})):g.length&&a(g,i)}},t.prototype._handleQuizQustionResponse=function(e){var t=e.get(f.QuizQuestionLoader.id),n=(null==t?void 0:t.response.quizQuestionCuePoints)||[];if(this._logger.debug("_fetchVodData quiz question response successful with "+n.length+" cue points"),n.length){var r=function(e){return e.map((function(e){var t=e.startTime/1e3;return o(o({},e),{startTime:t,endTime:t+.5})}))}(n);r=h.sortArrayBy(r,"startTime","createdAt"),this._addCuePointToPlayer(r)}},t.prototype._handleHotspotResponse=function(e){var t=e.get(l.HotspotLoader.id),n=(null==t?void 0:t.response.hotspotCuePoints)||[];if(this._logger.debug("_fetchVodData hotspots response successful with "+n.length+" cue points"),n.length){var r=function(e){return e.map((function(e){return{id:e.id,cuePointType:e.cuePointType,text:e.text,partnerData:e.partnerData,startTime:e.startTime/1e3,endTime:e.endTime?e.endTime/1e3:Number.MAX_SAFE_INTEGER,tags:e.tags}}))}(n);r=h.sortArrayBy(r,"startTime","createdAt"),this._addCuePointToPlayer(r)}},t.prototype.destroy=function(){this._fetchedCaptionKeys=[],this._fetchingCaptionKey=null,this._removeListeners()},t}(a.Provider);t.VodProvider=g},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(36),t)},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.CuePointManager=void 0;var o=n(37),s=n(38),a=function(){function e(e,t){var n=this;this._player=e,this._eventManager=t,this._engine=null,this._activeCuePoints=[],this._allCuePoints=[],this.addCuePoints=function(e){e&&0!==e.length&&n._player.ready().then((function(){var t=e.map((function(e){return r(r({},e),{type:o.core.TimedMetadata.TYPE.CUE_POINT})}));n._player.dispatchEvent(new o.core.FakeEvent(o.core.EventType.TIMED_METADATA_ADDED,{cues:t})),n._allCuePoints=i(n._allCuePoints,t),n._engine=new s.CuepointEngine(n._allCuePoints),n._activeCuePoints=[],n._getActiveCuePoints(null,!0)}))},this._setActiveCuePoints=function(e){n._activeCuePoints=e,n._player.dispatchEvent(new o.core.FakeEvent(o.core.EventType.TIMED_METADATA_CHANGE,{cues:n._activeCuePoints}))},this._getActiveCuePoints=function(e,t){var r,o,s,a;if(void 0===t&&(t=!1),n._engine){var u=n._engine.updateTime(n._player.currentTime,t);if(u.snapshot&&u.snapshot.length>0&&(u.snapshot.length!==n._activeCuePoints.length||(null===(r=u.snapshot[0])||void 0===r?void 0:r.id)!==(null===(o=n._activeCuePoints[0])||void 0===o?void 0:o.id)||(null===(s=u.snapshot[u.snapshot.length-1])||void 0===s?void 0:s.id)!==(null===(a=n._activeCuePoints[n._activeCuePoints.length-1])||void 0===a?void 0:a.id))&&n._setActiveCuePoints(u.snapshot),u.delta){var c=u.delta,h=c.show,p=c.hide;(h.length>0||p.length>0)&&(n._activeCuePoints=n._activeCuePoints.filter((function(e){return!p.find((function(t){return e.id===t.id}))})),n._setActiveCuePoints(i(n._activeCuePoints,h)))}}},this._eventManager.listen(this._player,this._player.Event.TIME_UPDATE,this._getActiveCuePoints)}return Object.defineProperty(e.prototype,"allCuePoints",{get:function(){return this._allCuePoints},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeCuePoints",{get:function(){return this._activeCuePoints},enumerable:!1,configurable:!0}),e.prototype.destroy=function(){this._engine=null,this._eventManager.unlisten(this._player,this._player.Event.TIME_UPDATE,this._getActiveCuePoints)},e}();t.CuePointManager=a},function(e,t){e.exports=KalturaPlayer},function(e,t,n){"use strict";var r,i=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r};Object.defineProperty(t,"__esModule",{value:!0}),t.CuepointEngine=void 0,function(e){e.Show="show",e.Hide="hide"}(r||(r={}));var o=function(){function e(e,t){this.isFirstTime=!0,this.enabled=!0,this.lastHandledTime=null,this.lastHandledTimeIndex=null,this.nextTimeToHandle=null,this.cuepointChanges=[],this.reasonableSeekThreshold=Math.max(2e3,t&&t.reasonableSeekThreshold||0),this._cuepoints=e,this.prepareCuepoint()}return Object.defineProperty(e.prototype,"cuepoints",{get:function(){return i(this._cuepoints)},enumerable:!1,configurable:!0}),e.prototype.getSnapshot=function(e){var t=this.findClosestLastIndexByTime(e);return this.createCuepointSnapshot(t)},e.prototype.updateTime=function(e,t,n){void 0===t&&(t=!1);var r=this.isFirstTime,i=this.lastHandledTime,o=this.nextTimeToHandle;if(0===this.cuepointChanges.length)return r&&(this.isFirstTime=!1),{snapshot:[]};var s=!r&&null!==i&&null!==o&&(i>e||e-o>this.reasonableSeekThreshold),a=r||null!==this.lastHandledTime&&this.lastHandledTime>e||null!=this.nextTimeToHandle&&e>=this.nextTimeToHandle,u=this.findClosestLastIndexByTime(e),c=u<0?0:this.cuepointChanges[u].time;if(!a)return t?{snapshot:this.createCuepointSnapshot(u,n)}:{delta:this.createEmptyDelta()};if(r||t||s){var h=this.createCuepointSnapshot(u,n);return this.updateInternals(c,u),{snapshot:h}}var p=this.createCuepointDelta(u,n);return this.updateInternals(c,u),{delta:p}},e.prototype.getCurrentCuepointSnapshot=function(){return this.lastHandledTimeIndex?this.createCuepointSnapshot(this.lastHandledTimeIndex):[]},e.prototype.createCuepointSnapshot=function(e,t){if(!this.enabled||e<0||!this.cuepointChanges||0===this.cuepointChanges.length)return[];for(var n=[],i=0;i<=e;i++){var o=this.cuepointChanges[i],s=n.indexOf(o.cuePoint);o.type===r.Show?-1===s&&n.push(o.cuePoint):-1!==s&&n.splice(s,1)}return t&&(n=n.filter(t)),n},e.prototype.createCuepointDelta=function(e,t){if(!this.enabled||!this.cuepointChanges||0===this.cuepointChanges.length)return this.createEmptyDelta();var n=this.lastHandledTimeIndex;if(null===n)return this.createEmptyDelta();for(var i=[],o=[],s=n+1;s<=e;s++){var a=this.cuepointChanges[s],u=i.indexOf(a.cuePoint);a.type===r.Show?-1===u&&i.push(a.cuePoint):-1!==u?i.splice(u,1):-1===o.indexOf(a.cuePoint)&&o.push(a.cuePoint)}return t&&(i=i.filter(t),o=o.filter(t)),{show:i,hide:o}},e.prototype.updateInternals=function(e,t){var n=this.cuepointChanges;if(n&&0!==n.length){var r=t>=n.length-1,i=null===t;this.lastHandledTime=e,this.lastHandledTimeIndex=t,this.nextTimeToHandle=i?n[0].time:r?n[n.length-1].time:n[t+1].time,this.isFirstTime=!1}},e.prototype.createEmptyDelta=function(){return{show:[],hide:[]}},e.prototype.binarySearch=function(e,t){if(!e||0===e.length)return null;if(t<e[0].time)return-1;if(t>e[e.length-1].time)return e.length-1;for(var n=0,r=e.length-1;n<=r;){var i=Math.floor((r+n+1)/2);if(t<e[i].time)r=i-1;else{if(!(t>e[i].time))return i;n=i+1}}return Math.min(n,r)},e.prototype.findClosestLastIndexByTime=function(e){var t=this.cuepointChanges,n=this.binarySearch(t,e);if(null===n)return-1;for(var r=t.length;n<r-1&&t[n+1].time===e;)n++;return n},e.prototype.prepareCuepoint=function(){var e=this;(this._cuepoints||[]).forEach((function(t){null!==t.startTime&&void 0!==t.startTime&&t.startTime>=0&&e.cuepointChanges.push({time:t.startTime,type:r.Show,cuePoint:t}),null!==t.endTime&&void 0!==t.endTime&&t.endTime>=0&&e.cuepointChanges.push({time:t.endTime,type:r.Hide,cuePoint:t})})),this.cuepointChanges.sort((function(e,t){return e.time<t.time?-1:e.time===t.time?0:1}))},e}();t.CuepointEngine=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThumbLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._entryId="",this._requests=[],this._response={thumbCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new i(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaThumbCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.THUMB,subTypeIn:e.subTypesFilter},responseProfile:{type:1,fields:"id, assetId, startTime, cuePointType, title, description, subType"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"thumb"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaThumbCuePoint);n.totalCount&&(this._response.thumbCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.ThumbLoader=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaThumbCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.assetId=t.assetId,n.description=t.description,n.title=t.title,n.subType=t.subType,n}return i(t,e),t}(n(1).KalturaCuePoint);t.KalturaThumbCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCuePointListResponse=void 0;var r=function(e,t){var n=this;this.totalCount=0,this.cuePoints=[],this.totalCount=e.totalCount,this.totalCount>0&&e.objects.map((function(e){var r=new t(e);n.cuePoints.push(r)}))};t.KalturaCuePointListResponse=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaQuizQuestionCuePoint=t.KalturaQuestionType=void 0;var o=n(1);!function(e){e[e.fillInBlank=5]="fillInBlank",e[e.goTo=7]="goTo",e[e.hotSpot=6]="hotSpot",e[e.multipleAnswerQuestion=4]="multipleAnswerQuestion",e[e.multipleChoiceAnswer=1]="multipleChoiceAnswer",e[e.openQuestion=8]="openQuestion",e[e.reflectionPoint=3]="reflectionPoint",e[e.trueFalse=2]="trueFalse"}(t.KalturaQuestionType||(t.KalturaQuestionType={}));var s=function(e){function t(t){var n=e.call(this,t)||this;return n.excludeFromScore=t.excludeFromScore,n.objectType=t.objectType,n.optionalAnswers=t.optionalAnswers,n.hint=t.hint,n.explanation=t.explanation,n.question=t.question,n.questionType=t.questionType,n.userId=t.userId,n}return i(t,e),t}(o.KalturaCuePoint);t.KalturaQuizQuestionCuePoint=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaHotspotCuePoint=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.text=t.text,n.endTime=t.endTime,n.tags=t.tags,n}return i(t,e),t}(n(1).KalturaCuePoint);t.KalturaHotspotCuePoint=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCaption=void 0;var r=n(1),i=function(e,t){this.cuePointType=r.KalturaCuePoint.KalturaCuePointType.CAPTION,this.id=t,this.startTime=e.startTime,this.endTime=e.endTime,this.content=e.content};t.KalturaCaption=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ViewChangeLoader=void 0;var r=n(0),i=n(17),o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){this._entryId="",this._requests=[],this._response={viewChangeCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new o(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaCodeCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.CODE},responseProfile:{type:1,fields:"id, startTime, endTime, partnerData, cuePointType, tags"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"viewchange"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,i.KalturaCodeCuePoint);n.totalCount&&(this._response.viewChangeCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.ViewChangeLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuizQuestionLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._entryId="",this._requests=[],this._response={quizQuestionCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new i(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaQuestionCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.QUIZ_QUESTION,orderBy:"+startTime"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"quiz-question"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaQuizQuestionCuePoint);n.totalCount&&(this._response.quizQuestionCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.QuizQuestionLoader=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HotspotLoader=void 0;var r=n(0),i=n(4),o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){this._entryId="",this._requests=[],this._response={hotspotCuePoints:[]},this._entryId=e.entryId;var t=new Map,n=new o(t);n.service="cuepoint_cuepoint",n.action="list",n.params={filter:{objectType:"KalturaCuePointFilter",entryIdEqual:this._entryId,cuePointTypeEqual:r.KalturaCuePoint.KalturaCuePointType.ANNOTATION,tagsLike:i.CuePointTags.HOTSPOT},responseProfile:{type:1,fields:"id, startTime, endTime, cuePointType, partnerData, text, tags"}},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"hotspot"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n=new r.KalturaCuePointListResponse(null===(t=e[0])||void 0===t?void 0:t.data,r.KalturaHotspotCuePoint);n.totalCount&&(this._response.hotspotCuePoints=n.cuePoints)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._entryId},e}();t.HotspotLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionLoader=void 0;var r=n(0),i=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){this._captionAssetId="",this._requests=[],this._response={captions:[]},this._captionAssetId=e.captionAssetId;var t=new Map,n=new i(t);n.service="caption_captionasset",n.action="serveAsJson",n.params={captionAssetId:this._captionAssetId},this.requests.push(n)}return Object.defineProperty(e,"id",{get:function(){return"caption"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){var t,n,i=this,o=null===(n=null===(t=e[0])||void 0===t?void 0:t.data)||void 0===n?void 0:n.objects;o&&Array.isArray(o)&&(this._response.captions=o.map((function(e,t){return new r.KalturaCaption(e,i._captionAssetId+"-"+t)})))},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!!this._captionAssetId},e}();t.CaptionLoader=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.LiveProvider=void 0;var s=n(16),a=n(4),u=n(50),c=n(5),h=n(18),p=function(e){function t(t,n,r,i){var s=e.call(this,t,n,r,i)||this;return s._thumbCuePoints=[],s._slideViewChangeCuePoints=[],s._id3Timestamp=0,s._currentTime=0,s._currentTimeLive=0,s._seekDifference=0,s._currentTimeLiveResolvePromise=function(){},s._baseThumbAssetUrl="",s._thumbUrlLoaderResolvePromise=function(){},s._thumbUrlIsLoaderActive=!1,s._thumbUrlAssetIdQueue=[],s._makeCurrentTimeLiveReadyPromise=function(){return new Promise((function(e){s._currentTimeLiveResolvePromise=e}))},s._makeThumbUrlLoaderResolvePromise=function(){return new Promise((function(e){s._thumbUrlLoaderResolvePromise=e}))},s._onTimedMetadataLoaded=function(e){var t=e.payload.cues.filter((function(e){return e.value&&"TEXT"===e.value.key}));if(t.length)try{var n=Math.ceil(JSON.parse(t[t.length-1].value.data).timestamp/1e3);n&&(s._id3Timestamp=n)}catch(e){s._logger.debug("Failed retrieving id3 tag metadata")}},s._onTimeUpdate=function(){var e=Math.ceil(s._player.currentTime);if(e!==s._currentTime){if(s._currentTime=e,null!==s._seekDifference&&s._currentTimeLive)s._currentTimeLive=s._currentTimeLive-s._seekDifference;else if(s._id3Timestamp){if(s._id3Timestamp===s._currentTimeLive)return void(s._id3Timestamp=null);s._currentTimeLive=s._id3Timestamp}else s._currentTimeLive++;s._id3Timestamp&&s._currentTimeLiveResolvePromise(),s._id3Timestamp=null,s._seekDifference=null}},s._handleSeeking=function(){s._seekDifference=Math.ceil(s._currentTime-s._player.currentTime)},s._handleConnection=function(){s._logger.debug("Connected to push server")},s._handleConnectionError=function(){s._logger.error("Got an error during connection to push server")},s._makeCuePointStartEndTime=function(e,t){return{startTime:s._player.currentTime-(s._currentTimeLive-e),endTime:t?s._player.currentTime-(s._currentTimeLive-t):Number.MAX_SAFE_INTEGER}},s._isCueInvalid=function(e){return isNaN(e.startTime)||e.startTime<0},s._prepareThumbCuePoints=function(e){var t=o(o(o({},e),s._makeCuePointStartEndTime(e.createdAt)),{assetUrl:c.makeAssetUrl(s._baseThumbAssetUrl,e.assetId)});s._isCueInvalid(t)||(s._thumbCuePoints.push(t),s._thumbCuePoints=s._fixCuePointEndTime(s._thumbCuePoints),s._addCuePointToPlayer([t]))},s._prepareViewChangeCuePoints=function(e){try{var t=JSON.parse(e.partnerData),n=o(o(o({},e),s._makeCuePointStartEndTime(e.createdAt)),{partnerData:t});if(s._isCueInvalid(n))return;s._slideViewChangeCuePoints.push(n),s._slideViewChangeCuePoints=s._fixCuePointEndTime(s._slideViewChangeCuePoints),s._addCuePointToPlayer([n])}catch(e){s._logger.error("Unnable parse slide-view change cue-point")}},s._preparePublicQnaCuePoints=function(e){var t=o(o(o({},e),{cueType:a.KalturaCuePointType.PUBLIC_QNA}),s._makeCuePointStartEndTime(e.createdAt,e.endTime));s._isCueInvalid(t)||s._addCuePointToPlayer([t])},s._prepareUserQnaCuePoints=function(e){var t=o(o({},e),{cueType:a.KalturaCuePointType.USER_QNA,startTime:0,endTime:0});s._addCuePointToPlayer([t])},s._prepareCodeQnaCuePoints=function(e){try{var t=JSON.parse(e.partnerData),n=o(o({},e),{partnerData:t});s._addCuePointToPlayer([n])}catch(e){s._logger.error("Unnable parse code qna cue-point")}},s._getBaseThumbAssetUrl=function(){if(!s._thumbUrlIsLoaderActive){s._thumbUrlIsLoaderActive=!0;var e=s._thumbUrlAssetIdQueue.shift();s._player.provider.doRequest([{loader:h.ThumbUrlLoader,params:{thumbAssetId:e}}]).then((function(e){if(s._thumbUrlIsLoaderActive=!1,e.has(h.ThumbUrlLoader.id)){s._logger.debug("baseThumbAssetUrl fetched");var t=e.get(h.ThumbUrlLoader.id);s._baseThumbAssetUrl=null==t?void 0:t.response,s._thumbUrlAssetIdQueue=[],s._thumbUrlLoaderResolvePromise()}})).catch((function(e){s._thumbUrlIsLoaderActive=!1,s._logger.warn("can't get baseThumbAssetUrl"),s._thumbUrlAssetIdQueue.length&&(s._logger.debug("try get next thumbAssetId from queue"),s._getBaseThumbAssetUrl())}))}},s._handleThumbNotificationData=function(e){var t,n,r=e.thumbs;!s._baseThumbAssetUrl&&(null===(t=r[0])||void 0===t?void 0:t.assetId)&&(s._thumbUrlAssetIdQueue.push(null===(n=r[0])||void 0===n?void 0:n.assetId),s._getBaseThumbAssetUrl()),Promise.all([s._currentTimeLivePromise,s._thumbUrlLoaderPromise]).then((function(){r.forEach((function(e){return s._prepareThumbCuePoints(e)}))}))},s._handleSlideViewChangeNotificationData=function(e){var t=e.slideViewChanges;s._currentTimeLivePromise.then((function(){t.forEach((function(e){return s._prepareViewChangeCuePoints(e)}))}))},s._handlePublicQnaNotificationsData=function(e){var t=e.messages;s._currentTimeLivePromise.then((function(){t.forEach((function(e){return s._preparePublicQnaCuePoints(e)}))}))},s._handleUserQnaNotificationsData=function(e){var t=e.messages;s._currentTimeLivePromise.then((function(){t.forEach((function(e){return s._prepareUserQnaCuePoints(e)}))}))},s._handleCodeQnaNotificationsData=function(e){var t=e.settings;s._currentTimeLivePromise.then((function(){t.forEach((function(e){return s._prepareCodeQnaCuePoints(e)}))}))},s._pushNotification=new u.PushNotificationPrivider(s._player,s._logger),s._currentTimeLivePromise=s._makeCurrentTimeLiveReadyPromise(),s._thumbUrlLoaderPromise=s._makeThumbUrlLoaderResolvePromise(),s._pushNotification.init(),s._constructPushNotificationListener(),s._pushNotification.registerToPushServer(s._player.sources.id,i,s._handleConnection,s._handleConnectionError),s._addBindings(),s}return i(t,e),t.prototype._addBindings=function(){this._eventManager.listen(this._player,this._player.Event.TIMED_METADATA,this._onTimedMetadataLoaded),this._eventManager.listen(this._player,this._player.Event.SEEKING,this._handleSeeking),this._eventManager.listen(this._player,this._player.Event.TIME_UPDATE,this._onTimeUpdate)},t.prototype._fixCuePointEndTime=function(e){var t=this;return c.sortArrayBy(e,"createdAt").map((function(n,r){if(n.endTime===Number.MAX_SAFE_INTEGER&&r!==e.length-1){var i=o(o({},n),{endTime:e[r+1].startTime});return t._addCuePointToPlayer([i]),i}return n}))},t.prototype._handlePushNotificationsErrorData=function(e){this._logger.warn("Got an error from push notification server - ",e)},t.prototype._constructPushNotificationListener=function(){this._pushNotification.on(u.PushNotificationEventTypes.PushNotificationsError,this._handlePushNotificationsErrorData),this._types.has(a.KalturaCuePointType.SLIDE)&&this._pushNotification.on(u.PushNotificationEventTypes.ThumbNotification,this._handleThumbNotificationData),this._types.has(a.KalturaCuePointType.VIEW_CHANGE)&&this._pushNotification.on(u.PushNotificationEventTypes.SlideViewChangeNotification,this._handleSlideViewChangeNotificationData),this._types.has(a.KalturaCuePointType.PUBLIC_QNA)&&this._pushNotification.on(u.PushNotificationEventTypes.PublicNotifications,this._handlePublicQnaNotificationsData),this._types.has(a.KalturaCuePointType.USER_QNA)&&this._pushNotification.on(u.PushNotificationEventTypes.UserNotifications,this._handleUserQnaNotificationsData),this._types.has(a.KalturaCuePointType.CODE_QNA)&&this._pushNotification.on(u.PushNotificationEventTypes.CodeNotifications,this._handleCodeQnaNotificationsData)},t.prototype._removePushNotificationListener=function(){this._pushNotification.off(u.PushNotificationEventTypes.PushNotificationsError,this._handlePushNotificationsErrorData),this._types.has(a.KalturaCuePointType.SLIDE)&&this._pushNotification.off(u.PushNotificationEventTypes.ThumbNotification,this._handleThumbNotificationData),this._types.has(a.KalturaCuePointType.VIEW_CHANGE)&&this._pushNotification.off(u.PushNotificationEventTypes.SlideViewChangeNotification,this._handleSlideViewChangeNotificationData),this._types.has(a.KalturaCuePointType.PUBLIC_QNA)&&this._pushNotification.off(u.PushNotificationEventTypes.PublicNotifications,this._handlePublicQnaNotificationsData),this._types.has(a.KalturaCuePointType.USER_QNA)&&this._pushNotification.off(u.PushNotificationEventTypes.UserNotifications,this._handleUserQnaNotificationsData),this._types.has(a.KalturaCuePointType.CODE_QNA)&&this._pushNotification.off(u.PushNotificationEventTypes.CodeNotifications,this._handleCodeQnaNotificationsData)},t.prototype.destroy=function(){this._pushNotification.reset(),this._removePushNotificationListener(),this._currentTimeLivePromise=this._makeCurrentTimeLiveReadyPromise(),this._thumbUrlLoaderPromise=this._makeThumbUrlLoaderResolvePromise()},t}(s.Provider);t.LiveProvider=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotificationPrivider=t.PushNotificationEventTypes=void 0;var r,i=n(51),o=n(54),s=n(4);!function(e){e.PushNotificationsError="PUSH_NOTIFICATIONS_ERROR",e.ThumbNotification="THUMB_CUE_POINT_READY_NOTIFICATION",e.SlideViewChangeNotification="SLIDE_VIEW_CHANGE_CODE_CUE_POINT",e.PublicNotifications="PUBLIC_QNA_NOTIFICATIONS",e.UserNotifications="USER_QNA_NOTIFICATIONS",e.CodeNotifications="CODE_QNA_NOTIFICATIONS"}(r=t.PushNotificationEventTypes||(t.PushNotificationEventTypes={}));var a=function(){function e(e,t){this._player=e,this._logger=t,this._pushServerInstance=null,this._registeredToMessages=!1,this._events=new i.EventsManager,this._initialized=!1,this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events)}return e.prototype.init=function(){this._initialized||(this._initialized=!0,this._pushServerInstance=new o.PushNotifications(this._player,this._logger))},e.prototype.reset=function(){this._registeredToMessages=!1},e.prototype.registerToPushServer=function(e,t,n,o){var a=this;if(this._registeredToMessages)throw this._logger.error("Multiple registration error"),new Error("Already register to push server");if(this._logger.info("Registering for push notifications server"),!this._pushServerInstance)return this._logger.error("Can't register to notifications as _pushServerInstance doesn't exists"),void this._events.emit({type:r.PushNotificationsError,error:"Can't register to notifications as _pushServerInstance doesn't exists"});var u=[];if(t.has(s.KalturaCuePointType.SLIDE)&&u.push(this._createThumbRegistration(e)),t.has(s.KalturaCuePointType.VIEW_CHANGE)&&u.push(this._createSlideViewChangeRegistration(e)),t.has(s.KalturaCuePointType.PUBLIC_QNA)&&u.push(this._createPublicQnaRegistration(e)),t.has(s.KalturaCuePointType.USER_QNA)){var c=i.getQnaUserId(this._player);u.push(this._createUserQnaRegistration(e,c))}t.has(s.KalturaCuePointType.CODE_QNA)&&u.push(this._createCodeQnaRegistration(e)),this._pushServerInstance.registerNotifications({prepareRegisterRequestConfigs:u,onSocketReconnect:function(){}}).then((function(){a._logger.info("Registered push notification service"),a._registeredToMessages=!0,n()}),(function(e){a._logger.error("Registration for push notification error"),o(),a._events.emit({type:r.PushNotificationsError,error:e})}))},e.prototype._createThumbRegistration=function(e){var t=this;return this._logger.info("Register thumb notification"),{eventName:r.ThumbNotification,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.ThumbNotification,thumbs:e})}}},e.prototype._createSlideViewChangeRegistration=function(e){var t=this;return this._logger.info("Register slide notification"),{eventName:r.SlideViewChangeNotification,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.SlideViewChangeNotification,slideViewChanges:e})}}},e.prototype._createPublicQnaRegistration=function(e){var t=this;return this._logger.info("Register public qna notification"),{eventName:r.PublicNotifications,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.PublicNotifications,messages:e})}}},e.prototype._createUserQnaRegistration=function(e,t){var n=this;return this._logger.info("Register user qna notification"),{eventName:r.UserNotifications,eventParams:{entryId:e,userId:t},onMessage:function(e){n._events.emit({type:r.UserNotifications,messages:e})}}},e.prototype._createCodeQnaRegistration=function(e){var t=this;return this._logger.info("Register code qna notification"),{eventName:r.CodeNotifications,eventParams:{entryId:e},onMessage:function(e){t._events.emit({type:r.CodeNotifications,settings:e})}}},e}();t.PushNotificationPrivider=a},function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(52),t),i(n(53),t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventsManager=void 0;var r=function(){function e(){this._eventListeners={},this._wildcardEventListeners=[]}return e.prototype.on=function(e,t){"*"!==e?(this._eventListeners[e]||(this._eventListeners[e]=[])).push(t):this._wildcardEventListeners.push(t)},e.prototype.off=function(e,t){if("*"!==e){var n=this._eventListeners[e];n&&n.splice(n.indexOf(t)>>>0,1)}else this._wildcardEventListeners.splice(this._wildcardEventListeners.indexOf(t)>>>0,1)},e.prototype.emit=function(e){(this._eventListeners[e.type]||[]).slice().map((function(t){t(e)})),this._wildcardEventListeners.slice().map((function(t){t(e)}))},e}();t.EventsManager=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=t.getQnaUserId=t.getUserId=t.generateId=void 0;t.generateId=function(){return(new Date).getTime().toString(36)+Math.random().toString(36).slice(2)};function r(){return"undefined"==typeof Storage?i():((e=localStorage.getItem("anonymousUserId"))||(e=i(),localStorage.setItem("anonymousUserId",e)),e);var e}t.getUserId=r;function i(){return"##".concat("Guest").concat("HashSeparator").concat(function(){for(var e=(0,t.generateId)(),n="",r=0;r<e.length;r++){var i=e.charAt(r);n+=Number.isNaN(+i)?i.charCodeAt(0):i}return n}(),"##")}t.getQnaUserId=function(e){var t,n,i,o,s=e,a=s.config,u=s.plugins,c=(null==a?void 0:a.session)||{},h=(null===(n=null===(t=null==u?void 0:u.qna)||void 0===t?void 0:t.config)||void 0===n?void 0:n.userRole)||c.userRole;return h&&"anonymousRole"!==h?(null===(o=null===(i=null==u?void 0:u.qna)||void 0===i?void 0:i.config)||void 0===o?void 0:o.userId)||c.userId:r()},t.debounce=function(e,t,n){var r;return void 0===t&&(t=50),void 0===n&&(n={isImmediate:!1}),function(){for(var i=this,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=function(){r=void 0,n.isImmediate||e.apply(i,o)},u=n.isImmediate&&void 0===r;void 0!==r&&clearTimeout(r),r=setTimeout(a,t),u&&e.apply(this,o)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotifications=t.isAPIErrorResponse=t.isAPINotificationResponse=void 0;var r=n(55),i=n(56),o=n(5);function s(e){return"KalturaPushNotificationData"===e.objectType}function a(e){return"KalturaAPIException"===e.objectType}t.isAPINotificationResponse=s,t.isAPIErrorResponse=a;var u=function(){function e(e,t){this._socketPool={},this._player=e,this._logger=t,this._onPlayerReset()}return e.prototype._onPlayerReset=function(){var e=this;this._player.addEventListener(this._player.Event.PLAYER_RESET,(function(){e.reset()}))},e.prototype.reset=function(){for(var e in this._socketPool)this._socketPool[e].destroy();this._socketPool={}},e.prototype.registerNotifications=function(e){var t=this,n=e.prepareRegisterRequestConfigs.map((function(e){return t._prepareRegisterRequest(e)}));return this._player.provider.doRequest([{loader:r.PushNotificationLoader,params:n}]).then((function(n){var i;if(n&&n.has(r.PushNotificationLoader.id)){var o=(null===(i=n.get(r.PushNotificationLoader.id))||void 0===i?void 0:i.response).map((function(n,r){return t._processResult(e.prepareRegisterRequestConfigs[r],n,e.onSocketDisconnect,e.onSocketReconnect)}));return Promise.all(o).then((function(){}))}})).catch((function(e){t._logger.warn("Error: failed to multirequest of register requests - ",e)}))},e.prototype._prepareRegisterRequest=function(e){var t={service:"eventnotification_eventnotificationtemplate",action:"register",notificationTemplateSystemName:e.eventName,pushNotificationParams:{objectType:"KalturaPushNotificationParams",userParams:{}}},n=0;for(var r in e.eventParams)t.pushNotificationParams.userParams["item"+n]={objectType:"KalturaPushNotificationParams",key:r,value:{objectType:"KalturaStringValue",value:e.eventParams[r]},sQueueKeyParam:1},n++;return t},e.prototype._processResult=function(e,t,n,r){if(a(t))return this._logger.error("Error fetching registration info from service "+e.eventName),Promise.reject(new Error(t.message));if(!s(t))return Promise.reject(new Error("invalid response structure"));var u=o.getDomainFromUrl(t.url),c=this._socketPool[u];return c||(c=new i.SocketWrapper({key:u,url:t.url,onSocketDisconnect:n,onSocketReconnect:r},this._logger),this._socketPool[u]=c),c.prepareForListening(e.eventName,t.queueName,t.queueKey,e.onMessage),Promise.resolve()},e}();t.PushNotifications=u},function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},i=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.PushNotificationLoader=void 0;var o=KalturaPlayer.providers.RequestBuilder,s=function(){function e(e){var t=this;this._apiRequests=e,this._requests=[],this._response={};var n=new Map;e.forEach((function(e){var s=new o(n),a=e.action,u=e.service,c=i(e,["action","service"]);s.action=a,s.service=u,s.params=r({},c),t.requests.push(s)}))}return Object.defineProperty(e,"id",{get:function(){return"push-notification"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requests",{get:function(){return this._requests},set:function(e){this._requests=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"response",{get:function(){return this._response},set:function(e){this._response=e.map((function(e){return e.data}))},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return this._apiRequests.length>0},e}();t.PushNotificationLoader=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketWrapper=void 0;var r=n(57),i=n(5),o=function(){function e(e,t){this._logger=t,this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1,this._logger.info("Connecting to socket"),this._connectAndListenToSocket(e)}return e.prototype.destroy=function(){this._socket&&(this._socket.disconnect(),this._socket=null),this._listenKeys={},this._messageKeyToQueueKeyMap={},this._connected=!1},e.prototype._connectAndListenToSocket=function(t){var n=this;this._logger.info("connect to socket"),this._socket=r(t.url,{forceNew:!0,timeout:e.CONNECTION_TIMEOUT}),this._socket.on("validated",(function(){for(var e in n._connected=!0,n._listenKeys)n._logger.info("Emit listen to url"),n._socket.emit("listen",n._listenKeys[e].queueNameHash,n._listenKeys[e].queueKeyHash)})),this._socket.on("connected",(function(e,t){n._listenKeys[t]?(n._messageKeyToQueueKeyMap[e]=t,n._logger.info("Listening to queue")):n._logger.error("Cannot listen to queue, queueKeyHash not recognized")})),this._socket.on("message",(function(e,t){n._logger.debug("Cannot listen to queue, queueKeyHash not recognized"),n._messageKeyToQueueKeyMap[e]&&n._listenKeys[n._messageKeyToQueueKeyMap[e]]?n._listenKeys[n._messageKeyToQueueKeyMap[e]].onMessage.forEach((function(e){e(t)})):n._logger.error("couldn't find queueKey in map")})),this._socket.on("disconnect",(function(e){if(n._logger.info("push server was disconnected"),!i.isEmptyObject(n._listenKeys)){var r=t.onSocketDisconnect;r&&r(e)}})),this._socket.on("reconnect",(function(e){if(n._logger.info("push server was reconnected"),!i.isEmptyObject(n._listenKeys)){var r=t.onSocketReconnect;r&&r(e)}})),this._socket.on("reconnect_error",(function(e){n._logger.error("reconnection error")})),this._socket.on("errorMsg",(function(e){n._logger.error("error message recieved")}))},e.prototype.prepareForListening=function(e,t,n,r){this._listenKeys[n]?this._listenKeys[n].onMessage.push(r):this._listenKeys[n]={eventName:e,queueNameHash:t,queueKeyHash:n,onMessage:[r]},this._connected&&(this._logger.info("Listening to "+e),this._socket.emit("listen",t,n))},e.CONNECTION_TIMEOUT=6e5,e}();t.SocketWrapper=o},function(e,t,n){var r=n(58),i=n(11),o=n(22),s=n(6)("socket.io-client");e.exports=t=u;var a=t.managers={};function u(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i=r(e),u=i.source,c=i.id,h=i.path,p=a[c]&&h in a[c].nsps;return t.forceNew||t["force new connection"]||!1===t.multiplex||p?(s("ignoring socket cache for %s",u),n=o(u,t)):(a[c]||(s("new io instance for %s",u),a[c]=o(u,t)),n=a[c]),i.query&&!t.query&&(t.query=i.query),n.socket(i.path,t)}t.protocol=i.protocol,t.connect=u,t.Manager=n(22),t.Socket=n(28)},function(e,t,n){var r=n(19),i=n(6)("socket.io-client:url");e.exports=function(e,t){var n=e;t=t||"undefined"!=typeof location&&location,null==e&&(e=t.protocol+"//"+t.host);"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?t.protocol+e:t.host+e),/^(https?|wss?):\/\//.test(e)||(i("protocol-less url %s",e),e=void 0!==t?t.protocol+"//"+e:"https://"+e),i("parse %s",e),n=r(e));n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443"));n.path=n.path||"/";var o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port,n.href=n.protocol+"://"+o+(t&&t.port===n.port?"":":"+n.port),n}},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(60),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,i=60*r,o=24*i;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){(function(r){function i(){var e;try{e=t.storage.debug}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e}(t=e.exports=n(62)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},t.formatArgs=function(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),!n)return;var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(o=i))})),e.splice(o,0,r)},t.save=function(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}},t.load=i,t.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(i())}).call(this,n(10))},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(63),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,i=60*r,o=24*i;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(20),i=n(21),o=Object.prototype.toString,s="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===o.call(Blob),a="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===o.call(File);t.deconstructPacket=function(e){var t=[],n=e.data,o=e;return o.data=function e(t,n){if(!t)return t;if(i(t)){var o={_placeholder:!0,num:n.length};return n.push(t),o}if(r(t)){for(var s=new Array(t.length),a=0;a<t.length;a++)s[a]=e(t[a],n);return s}if("object"==typeof t&&!(t instanceof Date)){s={};for(var u in t)s[u]=e(t[u],n);return s}return t}(n,t),o.attachments=t.length,{packet:o,buffers:t}},t.reconstructPacket=function(e,t){return e.data=function e(t,n){if(!t)return t;if(t&&t._placeholder)return n[t.num];if(r(t))for(var i=0;i<t.length;i++)t[i]=e(t[i],n);else if("object"==typeof t)for(var o in t)t[o]=e(t[o],n);return t}(e.data,t),e.attachments=void 0,e},t.removeBlobs=function(e,t){var n=0,o=e;!function e(u,c,h){if(!u)return u;if(s&&u instanceof Blob||a&&u instanceof File){n++;var p=new FileReader;p.onload=function(){h?h[c]=this.result:o=this.result,--n||t(o)},p.readAsArrayBuffer(u)}else if(r(u))for(var f=0;f<u.length;f++)e(u[f],f,u);else if("object"==typeof u&&!i(u))for(var l in u)e(u[l],l,u)}(o),n||t(o)}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),h=0,p=a>0?s-4:s;for(n=0;n<p;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],u[h++]=t>>16&255,u[h++]=t>>8&255,u[h++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,u[h++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,u[h++]=t>>8&255,u[h++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;s<a;s+=16383)o.push(h(e,s,s+16383>a?a:s+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)r[a]=s[a],i[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function h(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,h=-7,p=n?i-1:0,f=n?-1:1,l=e[t+p];for(p+=f,o=l&(1<<-h)-1,l>>=-h,h+=a;h>0;o=256*o+e[t+p],p+=f,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+e[t+p],p+=f,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(l?-1:1);s+=Math.pow(2,r),o-=c}return(l?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,p=h>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=r?0:o-1,d=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=h):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+p>=1?f/u:f*Math.pow(2,1-p))*u>=2&&(s++,u/=2),s+p>=h?(a=0,s=h):s+p>=1?(a=(t*u-1)*Math.pow(2,i),s+=p):(a=t*Math.pow(2,p-1)*Math.pow(2,i),s=0));i>=8;e[n+l]=255&a,l+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[n+l]=255&s,l+=d,s/=256,c-=8);e[n+l-d]|=128*y}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){e.exports=n(70),e.exports.parser=n(3)},function(e,t,n){var r=n(23),i=n(2),o=n(9)("engine.io-client:socket"),s=n(27),a=n(3),u=n(19),c=n(7);function h(e,t){if(!(this instanceof h))return new h(e,t);t=t||{},e&&"object"==typeof e&&(t=e,e=null),e?(e=u(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=u(t.host).host),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.agent=t.agent||!1,this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=c.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.withCredentials=!1!==t.withCredentials,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.transportOptions=t.transportOptions||{},this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.perMessageDeflate=!1!==t.perMessageDeflate&&(t.perMessageDeflate||{}),!0===this.perMessageDeflate&&(this.perMessageDeflate={}),this.perMessageDeflate&&null==this.perMessageDeflate.threshold&&(this.perMessageDeflate.threshold=1024),this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=void 0===t.rejectUnauthorized||t.rejectUnauthorized,this.forceNode=!!t.forceNode,this.isReactNative="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),("undefined"==typeof self||this.isReactNative)&&(t.extraHeaders&&Object.keys(t.extraHeaders).length>0&&(this.extraHeaders=t.extraHeaders),t.localAddress&&(this.localAddress=t.localAddress)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingIntervalTimer=null,this.pingTimeoutTimer=null,this.open()}e.exports=h,h.priorWebsocketSuccess=!1,i(h.prototype),h.protocol=a.protocol,h.Socket=h,h.Transport=n(15),h.transports=n(23),h.parser=n(3),h.prototype.createTransport=function(e){o('creating transport "%s"',e);var t=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}(this.query);t.EIO=a.protocol,t.transport=e;var n=this.transportOptions[e]||{};return this.id&&(t.sid=this.id),new r[e]({query:t,socket:this,agent:n.agent||this.agent,hostname:n.hostname||this.hostname,port:n.port||this.port,secure:n.secure||this.secure,path:n.path||this.path,forceJSONP:n.forceJSONP||this.forceJSONP,jsonp:n.jsonp||this.jsonp,forceBase64:n.forceBase64||this.forceBase64,enablesXDR:n.enablesXDR||this.enablesXDR,withCredentials:n.withCredentials||this.withCredentials,timestampRequests:n.timestampRequests||this.timestampRequests,timestampParam:n.timestampParam||this.timestampParam,policyPort:n.policyPort||this.policyPort,pfx:n.pfx||this.pfx,key:n.key||this.key,passphrase:n.passphrase||this.passphrase,cert:n.cert||this.cert,ca:n.ca||this.ca,ciphers:n.ciphers||this.ciphers,rejectUnauthorized:n.rejectUnauthorized||this.rejectUnauthorized,perMessageDeflate:n.perMessageDeflate||this.perMessageDeflate,extraHeaders:n.extraHeaders||this.extraHeaders,forceNode:n.forceNode||this.forceNode,localAddress:n.localAddress||this.localAddress,requestTimeout:n.requestTimeout||this.requestTimeout,protocols:n.protocols||void 0,isReactNative:this.isReactNative})},h.prototype.open=function(){var e;if(this.rememberUpgrade&&h.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length){var t=this;return void setTimeout((function(){t.emit("error","No transports available")}),0)}e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},h.prototype.setTransport=function(e){o("setting transport %s",e.name);var t=this;this.transport&&(o("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",(function(){t.onDrain()})).on("packet",(function(e){t.onPacket(e)})).on("error",(function(e){t.onError(e)})).on("close",(function(){t.onClose("transport close")}))},h.prototype.probe=function(e){o('probing transport "%s"',e);var t=this.createTransport(e,{probe:1}),n=!1,r=this;function i(){if(r.onlyBinaryUpgrades){var i=!this.supportsBinary&&r.transport.supportsBinary;n=n||i}n||(o('probe transport "%s" opened',e),t.send([{type:"ping",data:"probe"}]),t.once("packet",(function(i){if(!n)if("pong"===i.type&&"probe"===i.data){if(o('probe transport "%s" pong',e),r.upgrading=!0,r.emit("upgrading",t),!t)return;h.priorWebsocketSuccess="websocket"===t.name,o('pausing current transport "%s"',r.transport.name),r.transport.pause((function(){n||"closed"!==r.readyState&&(o("changing transport and sending upgrade packet"),f(),r.setTransport(t),t.send([{type:"upgrade"}]),r.emit("upgrade",t),t=null,r.upgrading=!1,r.flush())}))}else{o('probe transport "%s" failed',e);var s=new Error("probe error");s.transport=t.name,r.emit("upgradeError",s)}})))}function s(){n||(n=!0,f(),t.close(),t=null)}function a(n){var i=new Error("probe error: "+n);i.transport=t.name,s(),o('probe transport "%s" failed because of error: %s',e,n),r.emit("upgradeError",i)}function u(){a("transport closed")}function c(){a("socket closed")}function p(e){t&&e.name!==t.name&&(o('"%s" works - aborting "%s"',e.name,t.name),s())}function f(){t.removeListener("open",i),t.removeListener("error",a),t.removeListener("close",u),r.removeListener("close",c),r.removeListener("upgrading",p)}h.priorWebsocketSuccess=!1,t.once("open",i),t.once("error",a),t.once("close",u),this.once("close",c),this.once("upgrading",p),t.open()},h.prototype.onOpen=function(){if(o("socket open"),this.readyState="open",h.priorWebsocketSuccess="websocket"===this.transport.name,this.emit("open"),this.flush(),"open"===this.readyState&&this.upgrade&&this.transport.pause){o("starting upgrade probes");for(var e=0,t=this.upgrades.length;e<t;e++)this.probe(this.upgrades[e])}},h.prototype.onPacket=function(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(o('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"pong":this.setPing(),this.emit("pong");break;case"error":var t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else o('packet received with socket readyState "%s"',this.readyState)},h.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!==this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},h.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout((function(){"closed"!==t.readyState&&t.onClose("ping timeout")}),e||t.pingInterval+t.pingTimeout)},h.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout((function(){o("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)}),e.pingInterval)},h.prototype.ping=function(){var e=this;this.sendPacket("ping",(function(){e.emit("ping")}))},h.prototype.onDrain=function(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emit("drain"):this.flush()},h.prototype.flush=function(){"closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(o("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},h.prototype.write=h.prototype.send=function(e,t,n){return this.sendPacket("message",e,t,n),this},h.prototype.sendPacket=function(e,t,n,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof n&&(r=n,n=null),"closing"!==this.readyState&&"closed"!==this.readyState){(n=n||{}).compress=!1!==n.compress;var i={type:e,data:t,options:n};this.emit("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}},h.prototype.close=function(){if("opening"===this.readyState||"open"===this.readyState){this.readyState="closing";var e=this;this.writeBuffer.length?this.once("drain",(function(){this.upgrading?r():t()})):this.upgrading?r():t()}function t(){e.onClose("forced close"),o("socket closing - telling transport to close"),e.transport.close()}function n(){e.removeListener("upgrade",n),e.removeListener("upgradeError",n),t()}function r(){e.once("upgrade",n),e.once("upgradeError",n)}return this},h.prototype.onError=function(e){o("socket error %j",e),h.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},h.prototype.onClose=function(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){o('socket close with reason: "%s"',e);clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t),this.writeBuffer=[],this.prevBufferLen=0}},h.prototype.filterUpgrades=function(e){for(var t=[],n=0,r=e.length;n<r;n++)~s(this.transports,e[n])&&t.push(e[n]);return t}},function(e,t){try{e.exports="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){e.exports=!1}},function(e,t,n){var r=n(13),i=n(24),o=n(2),s=n(8),a=n(9)("engine.io-client:polling-xhr"),u=n(14);function c(){}function h(e){if(i.call(this,e),this.requestTimeout=e.requestTimeout,this.extraHeaders=e.extraHeaders,"undefined"!=typeof location){var t="https:"===location.protocol,n=location.port;n||(n=t?443:80),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||n!==e.port,this.xs=e.secure!==t}}function p(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!==e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.withCredentials=e.withCredentials,this.requestTimeout=e.requestTimeout,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.extraHeaders=e.extraHeaders,this.create()}if(e.exports=h,e.exports.Request=p,s(h,i),h.prototype.supportsBinary=!0,h.prototype.request=function(e){return(e=e||{}).uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.withCredentials=this.withCredentials,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,e.requestTimeout=this.requestTimeout,e.extraHeaders=this.extraHeaders,new p(e)},h.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,r=this.request({method:"POST",data:e,isBinary:n}),i=this;r.on("success",t),r.on("error",(function(e){i.onError("xhr post error",e)})),this.sendXhr=r},h.prototype.doPoll=function(){a("xhr poll");var e=this.request(),t=this;e.on("data",(function(e){t.onData(e)})),e.on("error",(function(e){t.onError("xhr poll error",e)})),this.pollXhr=e},o(p.prototype),p.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new r(e),n=this;try{a("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async);try{if(this.extraHeaders)for(var i in t.setDisableHeaderCheck&&t.setDisableHeaderCheck(!0),this.extraHeaders)this.extraHeaders.hasOwnProperty(i)&&t.setRequestHeader(i,this.extraHeaders[i])}catch(e){}if("POST"===this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(e){}try{t.setRequestHeader("Accept","*/*")}catch(e){}"withCredentials"in t&&(t.withCredentials=this.withCredentials),this.requestTimeout&&(t.timeout=this.requestTimeout),this.hasXDR()?(t.onload=function(){n.onLoad()},t.onerror=function(){n.onError(t.responseText)}):t.onreadystatechange=function(){if(2===t.readyState)try{var e=t.getResponseHeader("Content-Type");(n.supportsBinary&&"application/octet-stream"===e||"application/octet-stream; charset=UTF-8"===e)&&(t.responseType="arraybuffer")}catch(e){}4===t.readyState&&(200===t.status||1223===t.status?n.onLoad():setTimeout((function(){n.onError("number"==typeof t.status?t.status:0)}),0))},a("xhr data %s",this.data),t.send(this.data)}catch(e){return void setTimeout((function(){n.onError(e)}),0)}"undefined"!=typeof document&&(this.index=p.requestsCount++,p.requests[this.index]=this)},p.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},p.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},p.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},p.prototype.cleanup=function(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=c:this.xhr.onreadystatechange=c,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete p.requests[this.index],this.xhr=null}},p.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type")}catch(e){}e=("application/octet-stream"===t||"application/octet-stream; charset=UTF-8"===t)&&this.xhr.response||this.xhr.responseText}catch(e){this.onError(e)}null!=e&&this.onData(e)},p.prototype.hasXDR=function(){return"undefined"!=typeof XDomainRequest&&!this.xs&&this.enablesXDR},p.prototype.abort=function(){this.cleanup()},p.requestsCount=0,p.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",f);else if("function"==typeof addEventListener){addEventListener("onpagehide"in u?"pagehide":"unload",f,!1)}function f(){for(var e in p.requests)p.requests.hasOwnProperty(e)&&p.requests[e].abort()}},function(e,t){e.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var r in e)n.call(e,r)&&t.push(r);return t}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t){e.exports=function(e,t,n){var r=e.byteLength;if(t=t||0,n=n||r,e.slice)return e.slice(t,n);if(t<0&&(t+=r),n<0&&(n+=r),n>r&&(n=r),t>=r||t>=n||0===r)return new ArrayBuffer(0);for(var i=new Uint8Array(e),o=new Uint8Array(n-t),s=t,a=0;s<n;s++,a++)o[a]=i[s];return o.buffer}},function(e,t){function n(){}e.exports=function(e,t,r){var i=!1;return r=r||n,o.count=e,0===e?t():o;function o(e,n){if(o.count<=0)throw new Error("after called too many times");--o.count,e?(i=!0,t(e),t=r):0!==o.count||i||t(null,n)}}},function(e,t){ /*! https://mths.be/utf8js v2.1.2 by @mathias */ var n,r,i,o=String.fromCharCode;function s(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function a(e,t){if(e>=55296&&e<=57343){if(t)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function u(e,t){return o(e>>t&63|128)}function c(e,t){if(0==(4294967168&e))return o(e);var n="";return 0==(4294965248&e)?n=o(e>>6&31|192):0==(4294901760&e)?(a(e,t)||(e=65533),n=o(e>>12&15|224),n+=u(e,6)):0==(4292870144&e)&&(n=o(e>>18&7|240),n+=u(e,12),n+=u(e,6)),n+=o(63&e|128)}function h(){if(i>=r)throw Error("Invalid byte index");var e=255&n[i];if(i++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function p(e){var t,o;if(i>r)throw Error("Invalid byte index");if(i==r)return!1;if(t=255&n[i],i++,0==(128&t))return t;if(192==(224&t)){if((o=(31&t)<<6|h())>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&t)){if((o=(15&t)<<12|h()<<6|h())>=2048)return a(o,e)?o:65533;throw Error("Invalid continuation byte")}if(240==(248&t)&&(o=(7&t)<<18|h()<<12|h()<<6|h())>=65536&&o<=1114111)return o;throw Error("Invalid UTF-8 detected")}e.exports={version:"2.1.2",encode:function(e,t){for(var n=!1!==(t=t||{}).strict,r=s(e),i=r.length,o=-1,a="";++o<i;)a+=c(r[o],n);return a},decode:function(e,t){var a=!1!==(t=t||{}).strict;n=s(e),r=n.length,i=0;for(var u,c=[];!1!==(u=p(a));)c.push(u);return function(e){for(var t,n=e.length,r=-1,i="";++r<n;)(t=e[r])>65535&&(i+=o((t-=65536)>>>10&1023|55296),t=56320|1023&t),i+=o(t);return i}(c)}}},function(e,t){!function(e){"use strict";t.encode=function(t){var n,r=new Uint8Array(t),i=r.length,o="";for(n=0;n<i;n+=3)o+=e[r[n]>>2],o+=e[(3&r[n])<<4|r[n+1]>>4],o+=e[(15&r[n+1])<<2|r[n+2]>>6],o+=e[63&r[n+2]];return i%3==2?o=o.substring(0,o.length-1)+"=":i%3==1&&(o=o.substring(0,o.length-2)+"=="),o},t.decode=function(t){var n,r,i,o,s,a=.75*t.length,u=t.length,c=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var h=new ArrayBuffer(a),p=new Uint8Array(h);for(n=0;n<u;n+=4)r=e.indexOf(t[n]),i=e.indexOf(t[n+1]),o=e.indexOf(t[n+2]),s=e.indexOf(t[n+3]),p[c++]=r<<2|i>>4,p[c++]=(15&i)<<4|o>>2,p[c++]=(3&o)<<6|63&s;return h}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},function(e,t){var n=void 0!==n?n:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder&&MozBlobBuilder,r=function(){try{return 2===new Blob(["hi"]).size}catch(e){return!1}}(),i=r&&function(){try{return 2===new Blob([new Uint8Array([1,2])]).size}catch(e){return!1}}(),o=n&&n.prototype.append&&n.prototype.getBlob;function s(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var n=new Uint8Array(e.byteLength);n.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=n.buffer}return t}return e}))}function a(e,t){t=t||{};var r=new n;return s(e).forEach((function(e){r.append(e)})),t.type?r.getBlob(t.type):r.getBlob()}function u(e,t){return new Blob(s(e),t||{})}"undefined"!=typeof Blob&&(a.prototype=Blob.prototype,u.prototype=Blob.prototype),e.exports=r?i?Blob:u:o?a:void 0},function(e,t,n){function r(e){var n;function r(){if(r.enabled){var e=r,i=+new Date,o=i-(n||i);e.diff=o,e.prev=n,e.curr=i,n=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=t.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(n,r){if("%%"===n)return n;u++;var i=t.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(e,o),s.splice(u,1),u--}return n})),t.formatArgs.call(e,s);var c=r.log||t.log||console.log.bind(console);c.apply(e,s)}}return r.namespace=e,r.enabled=t.enabled(e),r.useColors=t.useColors(),r.color=function(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}(e),r.destroy=i,"function"==typeof t.init&&t.init(r),t.instances.push(r),r}function i(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}(t=e.exports=r.debug=r.default=r).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){t.enable("")},t.enable=function(e){var n;t.save(e),t.names=[],t.skips=[];var r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(n=0;n<t.instances.length;n++){var o=t.instances[n];o.enabled=t.enabled(o.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(81),t.instances=[],t.names=[],t.skips=[],t.formatters={}},function(e,t){var n=1e3,r=6e4,i=60*r,o=24*i;function s(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}e.exports=function(e,t){t=t||{};var a,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var s=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*o;case"hours":case"hour":case"hrs":case"hr":case"h":return s*i;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?s(a=e,o,"day")||s(a,i,"hour")||s(a,r,"minute")||s(a,n,"second")||a+" ms":function(e){if(e>=o)return Math.round(e/o)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=r)return Math.round(e/r)+"m";if(e>=n)return Math.round(e/n)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){var r=n(24),i=n(8),o=n(14);e.exports=h;var s,a=/\n/g,u=/\\n/g;function c(){}function h(e){r.call(this,e),this.query=this.query||{},s||(s=o.___eio=o.___eio||[]),this.index=s.length;var t=this;s.push((function(e){t.onData(e)})),this.query.j=this.index,"function"==typeof addEventListener&&addEventListener("beforeunload",(function(){t.script&&(t.script.onerror=c)}),!1)}i(h,r),h.prototype.supportsBinary=!1,h.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},h.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n?n.parentNode.insertBefore(t,n):(document.head||document.body).appendChild(t),this.script=t,"undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent)&&setTimeout((function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)}),100)},h.prototype.doWrite=function(e,t){var n=this;if(!this.form){var r,i=document.createElement("form"),o=document.createElement("textarea"),s=this.iframeId="eio_iframe_"+this.index;i.className="socketio",i.style.position="absolute",i.style.top="-1000px",i.style.left="-1000px",i.target=s,i.method="POST",i.setAttribute("accept-charset","utf-8"),o.name="d",i.appendChild(o),document.body.appendChild(i),this.form=i,this.area=o}function c(){h(),t()}function h(){if(n.iframe)try{n.form.removeChild(n.iframe)}catch(e){n.onError("jsonp polling iframe removal error",e)}try{var e='<iframe src="javascript:0" name="'+n.iframeId+'">';r=document.createElement(e)}catch(e){(r=document.createElement("iframe")).name=n.iframeId,r.src="javascript:0"}r.id=n.iframeId,n.form.appendChild(r),n.iframe=r}this.form.action=this.uri(),h(),e=e.replace(u,"\\\n"),this.area.value=e.replace(a,"\\n");try{this.form.submit()}catch(e){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"===n.iframe.readyState&&c()}:this.iframe.onload=c}},function(e,t,n){(function(t){var r,i,o=n(15),s=n(3),a=n(7),u=n(8),c=n(26),h=n(9)("engine.io-client:websocket");if("undefined"!=typeof WebSocket?r=WebSocket:"undefined"!=typeof self&&(r=self.WebSocket||self.MozWebSocket),"undefined"==typeof window)try{i=n(84)}catch(e){}var p=r||i;function f(e){e&&e.forceBase64&&(this.supportsBinary=!1),this.perMessageDeflate=e.perMessageDeflate,this.usingBrowserWebSocket=r&&!e.forceNode,this.protocols=e.protocols,this.usingBrowserWebSocket||(p=i),o.call(this,e)}e.exports=f,u(f,o),f.prototype.name="websocket",f.prototype.supportsBinary=!0,f.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=this.protocols,n={};this.isReactNative||(n.agent=this.agent,n.perMessageDeflate=this.perMessageDeflate,n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized),this.extraHeaders&&(n.headers=this.extraHeaders),this.localAddress&&(n.localAddress=this.localAddress);try{this.ws=this.usingBrowserWebSocket&&!this.isReactNative?t?new p(e,t):new p(e):new p(e,t,n)}catch(e){return this.emit("error",e)}void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.supports&&this.ws.supports.binary?(this.supportsBinary=!0,this.ws.binaryType="nodebuffer"):this.ws.binaryType="arraybuffer",this.addEventListeners()}},f.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},f.prototype.write=function(e){var n=this;this.writable=!1;for(var r=e.length,i=0,o=r;i<o;i++)!function(e){s.encodePacket(e,n.supportsBinary,(function(i){if(!n.usingBrowserWebSocket){var o={};if(e.options&&(o.compress=e.options.compress),n.perMessageDeflate)("string"==typeof i?t.byteLength(i):i.length)<n.perMessageDeflate.threshold&&(o.compress=!1)}try{n.usingBrowserWebSocket?n.ws.send(i):n.ws.send(i,o)}catch(e){h("websocket closed before onclose event")}--r||a()}))}(e[i]);function a(){n.emit("flush"),setTimeout((function(){n.writable=!0,n.emit("drain")}),0)}},f.prototype.onClose=function(){o.prototype.onClose.call(this)},f.prototype.doClose=function(){void 0!==this.ws&&this.ws.close()},f.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"===t&&443!==Number(this.port)||"ws"===t&&80!==Number(this.port))&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=c()),this.supportsBinary||(e.b64=1),(e=a.encode(e)).length&&(e="?"+e),t+"://"+(-1!==this.hostname.indexOf(":")?"["+this.hostname+"]":this.hostname)+n+this.path+e},f.prototype.check=function(){return!(!p||"__initialize"in p&&this.name===f.prototype.name)}}).call(this,n(12).Buffer)},function(e,t){},function(e,t){e.exports=function(e,t){for(var n=[],r=(t=t||0)||0;r<e.length;r++)n[r-t]=e[r];return n}},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}}]); -var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.kava=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=KalturaPlayer},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function e(t,n,r,i){void 0===i&&(i={}),this.severity=t,this.category=n,this.code=r,this.data=i,e._logger.error("Category:"+n+" | Code:"+r+" |",i)};i(a,"Severity",{RECOVERABLE:1,CRITICAL:2}),i(a,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),i(a,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),i(a,"_logger",Object(r.a)("Error"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(e){void 0===e&&(e=new Map),i(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),i(this,"_attemptCounter",1),this.headers=e}var t=e.prototype;return t.getUrl=function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")},t.doHttpRequest=function(){var e=this,t=new Promise((function(t,n){e._requestPromise={resolve:t,reject:n}}));return this.url||this._requestPromise.reject(new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,r.a.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t},t._createXHR=function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var n=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(n)}catch(n){e._requestPromise.reject(e._createError(t,r.a.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var n=performance.now();t.ontimeout=function(){e._handleError(t,r.a.Code.TIMEOUT,{timeout:(performance.now()-n)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,r.a.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,n){t.setRequestHeader(n,e)})),t.send(this.params)},t._getResponseHeaders=function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))},t._handleError=function(e,t,n){var r=this._createError(e,t,n);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(r);this._attemptCounter++,this._createXHR()},t._createError=function(e,t,n){return Object.assign(n,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,t,n)},e}()},function(e,t,n){"use strict";var r=function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}};t.a=function(e){return r(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(4),i={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1},a=function(){function e(){}return e.set=function(e){e&&Object.assign(i,e)},e.get=function(){return Object(r.a)(i)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function e(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,r){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[r]=e(t))})):"object"==typeof t?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"==typeof n[t]&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),i=n(2),a=function(e){var t;(t="hasError")in this?Object.defineProperty(this,t,{value:!1,enumerable:!0,configurable:!0,writable:!0}):this[t]=!1,"KalturaAPIException"===e.objectType?(this.hasError=!0,this.error=new o(e.code,e.message)):e.error&&"KalturaAPIException"===e.error.objectType?(this.hasError=!0,this.error=new o(e.error.code,e.error.message)):this.data=e},o=function(e,t){this.code=e,this.message=t},s=n(0);function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return l(u(t=e.call.apply(e,[this].concat(r))||this),"requests",[]),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.add=function(e){var t;this.requests.push(e);var n={},r={service:e.service,action:e.action};return Object.assign(n,((t={})[this.requests.length]=Object.assign(r,e.params),t)),Object.assign(n,this.params),this.params=n,this},i.execute=function(e){var t=this;return new Promise((function(n,i){try{t.params=JSON.stringify(t.params)}catch(e){r._logger.error(""+e.message),i(new s.a(s.a.Severity.CRITICAL,s.a.Category.PROVIDER,s.a.Code.FAILED_PARSING_REQUEST,{error:e,params:t.params}))}t.doHttpRequest().then((function(r){var a=new c(r,e);a.success?n({headers:t.responseHeaders,response:a}):i(new s.a(s.a.Severity.CRITICAL,s.a.Category.NETWORK,s.a.Code.MULTIREQUEST_API_ERROR,{url:t.url,headers:t.responseHeaders,results:a.results}))}),(function(e){i(e)}))}))},r}(r.a);l(d,"_logger",Object(i.a)("MultiRequestBuilder"));var c=function e(t,n){void 0===n&&(n=!0),l(this,"results",[]);var r=t.result?t.result:t,i=(Array.isArray(r)?r:[r]).map((function(e){return new a(e)})),o=i.filter((function(e){return e.hasError}));o.forEach((function(t){e._logger.error("Service returned an error with error code: "+t.error.code+" and message: "+t.error.message+".")})),this.results=i,n&&o.length||o.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(e){return!e.hasError})),this.success=!0)};l(c,"_logger",Object(i.a)("MultiRequestResult"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){var t=[],n=/\[\]$/,r=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e,n){n="function"==typeof n?n():null==n?"":n,t[t.length]=encodeURIComponent(e)+"="+encodeURIComponent(n)};return function e(a,o){var s,u,l;if(a)if(r(o))for(s=0,u=o.length;s<u;s++)n.test(a)?i(a,o[s]):e(a+":"+("object"==typeof o[s]?s:""),o[s]);else if(o&&"[object Object]"===String(o))for(l in o)e(a+":"+l,o[l]);else i(a,o);else if(r(o))for(s=0,u=o.length;s<u;s++)i(o[s].name,o[s].value);else for(l in o)e(l,o[l]);return t}("",e).join("&").replace(/%20/g,"+")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),i=n(3),a=function(){function e(){}return e.getMultiRequest=function(e,t,n){var a=i.a.get(),o=a.serviceParams;Object.assign(o,{ks:t,clientTag:"html5:v"+e}),n&&Object.assign(o,{partnerId:n});var s=new Map;s.set("Content-Type","application/json");var u=new r.a(s);return u.method="POST",u.service="multirequest",u.url=u.getUrl(a.serviceUrl),u.params=o,u},e}()},,function(e,t,n){"use strict";n.r(t),n.d(t,"OVPAnalyticsService",(function(){return s})),n.d(t,"OVPConfiguration",(function(){return i.a})),n.d(t,"RequestBuilder",(function(){return r.a})),n.d(t,"NAME",(function(){return u})),n.d(t,"VERSION",(function(){return l}));var r=n(1),i=n(3),a=n(7),o=n(6),s=function(e){var t,n;function a(){return e.apply(this,arguments)||this}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.trackEvent=function(e,t,n){return"POST"===n?a._trackEventByPOST(e,t):a._trackEventByGET(e,t)},a._trackEventByGET=function(e,t){var n=i.a.get(),a={};Object.assign(a,n.serviceParams,t);var s=new r.a;return s.service="analytics",s.action="trackEvent",s.method="GET",s.tag="analytics-trackEvent",s.params=a,s.url=e+"?service="+s.service+"&action="+s.action+"&"+Object(o.a)(s.params),s},a._trackEventByPOST=function(e,t){var n=i.a.get(),a={};Object.assign(a,n.serviceParams,t);var s=new Map;s.set("Content-Type","application/json");var u=new r.a(s),l={eventType:a.eventType,partnerId:a.partnerId,entryId:a.entryId,sessionId:a.sessionId};return["eventType","partnerId","entryId","sessionId"].forEach((function(e){return delete a[e]})),u.service="analytics",u.action="trackEvent",u.method="POST",u.tag="analytics-trackEvent",u.params=JSON.stringify(a),u.url=e+"?service="+u.service+"&action="+u.action+"&"+Object(o.a)(l),u},a}(a.a),u="playkit-js-providers-analytics-service",l="2.37.0"}])},function(e,t,n){"use strict";n.r(t),n.d(t,"Plugin",(function(){return F})),n.d(t,"EventType",(function(){return y})),n.d(t,"HttpMethodType",(function(){return R})),n.d(t,"VERSION",(function(){return x})),n.d(t,"NAME",(function(){return B}));var r=n(0),i=n(1);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o,s=function(){function e(e){a(this,"totalSegmentsDownloadTime",0),a(this,"totalSegmentsDownloadBytes",0),a(this,"maxSegmentDownloadTime",0),a(this,"maxManifestDownloadTime",0),a(this,"droppedFramesRatio",null),a(this,"screenMode",p.NOT_IN_FULLSCREEN),a(this,"maxNetworkConnectionOverhead",0),a(this,"flavorParamsId",NaN),a(this,"playerJSLoadTime",null),e&&this.updateModel(e)}var t=e.prototype;return t.getPlayTimeSum=function(){return this.playTimeSum},t.getCanPlayTime=function(){return this.canPlayTime},t.getBufferTime=function(){return this.bufferTime},t.getBufferTimeSum=function(){return this.bufferTimeSum},t.getPlayerJSLoadTime=function(){return this.playerJSLoadTime?Math.round(1e3*this.playerJSLoadTime)/1e3:null},t.getJoinTime=function(){return this.joinTime},t.getTargetPosition=function(){return this.targetPosition},t.getTargetBuffer=function(){return this.targetBuffer},t.getLanguage=function(){return this.language},t.getCaption=function(){return this.caption},t.getBandwidth=function(){return this.totalSegmentsDownloadTime>0?Math.round(8*this.totalSegmentsDownloadBytes/this.totalSegmentsDownloadTime)/1e3:0},t.getMaxManifestDownloadTime=function(){return this.maxManifestDownloadTime},t.getSegmentDownloadTime=function(){return this.maxSegmentDownloadTime},t.getForwardBufferHealth=function(){return this.forwardBufferHealth},t.getDroppedFramesRatio=function(){return this.droppedFramesRatio},t.getSoundMode=function(){return this.soundMode},t.getViewabilityMode=function(){return this.viewabilityMode},t.getScreenMode=function(){return this.screenMode},t.getTabMode=function(){return this.tabMode},t.getNetworkConnectionType=function(){return this.networkConnectionType},t.getNetworkConnectionOverhead=function(){return Math.round(this.maxNetworkConnectionOverhead)/1e3},t.getErrorCode=function(){return this.errorCode},t.getFlavorParamsId=function(){return this.flavorParamsId},t.getErrorDetails=function(){var e="";if(this.errorDetails)try{e=JSON.stringify(this.errorDetails)}catch(e){}return e},t.getEventIndex=function(){return this.eventIndex},t.getErrorPosition=function(){return this.errorPosition},t.getSessionStartTime=function(){return this.sessionStartTime},t.updateModel=function(e){Object.assign(this,e)},t.getModel=function(e){return function(e,t){var n={eventType:e.index,partnerId:t.getPartnerId(),entryId:t.getEntryId(),sessionId:t.getSessionId(),eventIndex:t.getEventIndex(),referrer:t.getReferrer(),deliveryType:t.getDeliveryType(),playbackType:t.getPlaybackType(),clientVer:t.getClientVer(),clientTag:t.getClientTag(),position:t.getPosition(),playbackSpeed:t.getPlaybackSpeed()};t.getCaption()&&(n.caption=t.getCaption());t.getSessionStartTime()&&(n.sessionStartTime=t.getSessionStartTime());t.getKS()&&(n.ks=t.getKS());t.getVirtualEventId()&&(n.virtualEventId=t.getVirtualEventId());t.getUIConfId()&&(n.uiConfId=t.getUIConfId());t.getPlaylistId()&&(n.playlistId=t.getPlaylistId());t.getCustomVar1()&&(n.customVar1=t.getCustomVar1());t.getCustomVar2()&&(n.customVar2=t.getCustomVar2());t.getCustomVar3()&&(n.customVar3=t.getCustomVar3());t.getPlaybackContext()&&(n.playbackContext=t.getPlaybackContext());t.getApplicationVersion()&&(n.applicationVer=t.getApplicationVersion());t.getApplication()&&(n.application=t.getApplication());t.getKalturaApplicationVersion()&&(n.kalturaApplicationVer=t.getKalturaApplicationVersion());t.getKalturaApplication()&&(n.kalturaApplication=t.getKalturaApplication());t.getUserId()&&(n.userId=t.getUserId());t.getPersistentSessionId()&&(n.persistentSessionId=t.getPersistentSessionId());var r=e.getEventModel(t);return Object.assign(r,n)}(e,this)},e}(),u=1,l=2,d=1,c=2,f=1,h=2,p={NOT_IN_FULLSCREEN:1,FULLSCREEN:2},_=3,g=1,m=2,E={VIEW:{type:"VIEW",index:99,getEventModel:function(e){var t={playTimeSum:e.getPlayTimeSum(),bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate(),averageBitrate:e.getAverageBitrate(),audioLanguage:e.getLanguage(),soundMode:e.getSoundMode(),tabMode:e.getTabMode(),viewabilityMode:e.getViewabilityMode(),screenMode:e.getScreenMode()};return isNaN(e.getForwardBufferHealth())||(t.forwardBufferHealth=e.getForwardBufferHealth()),e.getMaxManifestDownloadTime()>0&&(t.manifestDownloadTime=e.getMaxManifestDownloadTime()),e.getSegmentDownloadTime()>0&&(t.segmentDownloadTime=e.getSegmentDownloadTime()),e.getBandwidth()&&(t.bandwidth=e.getBandwidth()),null!=e.getDroppedFramesRatio()&&(t.droppedFramesRatio=e.getDroppedFramesRatio()),isNaN(e.getTargetBuffer())||(t.targetBuffer=e.getTargetBuffer()),""!==e.getNetworkConnectionType()&&(t.networkConnectionType=e.getNetworkConnectionType()),e.getNetworkConnectionOverhead()&&(t.networkConnectionOverhead=e.getNetworkConnectionOverhead()),isNaN(e.getFlavorParamsId())||(t.flavorParamsId=e.getFlavorParamsId()),t}},IMPRESSION:{type:"IMPRESSION",index:1,getEventModel:function(e){var t={};return null!=e.getPlayerJSLoadTime()&&(t.playerJSLoadTime=e.getPlayerJSLoadTime()),t}},PLAY_REQUEST:{type:"PLAY_REQUEST",index:2,getEventModel:function(){return{}}},PLAY:{type:"PLAY",index:3,getEventModel:function(e){var t={bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate(),joinTime:e.getJoinTime(),canPlay:e.getCanPlayTime()};return""!==e.getNetworkConnectionType()&&(t.networkConnectionType=e.getNetworkConnectionType()),t}},RESUME:{type:"RESUME",index:4,getEventModel:function(e){return{bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate()}}},PAUSE:{type:"PAUSE",index:33,getEventModel:function(){return{}}},BUFFER_START:{type:"BUFFER_START",index:45,getEventModel:function(){return{}}},BUFFER_END:{type:"BUFFER_END",index:46,getEventModel:function(){return{}}},REPLAY:{type:"REPLAY",index:34,getEventModel:function(){return{}}},SEEK:{type:"SEEK",index:35,getEventModel:function(e){return{targetPosition:e.getTargetPosition()}}},PLAY_REACHED_25_PERCENT:{type:"PLAY_REACHED_25_PERCENT",index:11,getEventModel:function(){return{}}},PLAY_REACHED_50_PERCENT:{type:"PLAY_REACHED_50_PERCENT",index:12,getEventModel:function(){return{}}},PLAY_REACHED_75_PERCENT:{type:"PLAY_REACHED_75_PERCENT",index:13,getEventModel:function(){return{}}},PLAY_REACHED_100_PERCENT:{type:"PLAY_REACHED_100_PERCENT",index:14,getEventModel:function(){return{}}},SOURCE_SELECTED:{type:"SOURCE_SELECTED",index:39,getEventModel:function(e){return{actualBitrate:e.getActualBitrate()}}},AUDIO_SELECTED:{type:"AUDIO_SELECTED",index:42,getEventModel:function(e){return{language:e.getLanguage()}}},FLAVOR_SWITCH:{type:"FLAVOR_SWITCH",index:43,getEventModel:function(e){return{actualBitrate:e.getActualBitrate()}}},SPEED:{type:"SPEED",index:41,getEventModel:function(){return{}}},CAPTIONS:{type:"CAPTIONS",index:38,getEventModel:function(){return{}}},ERROR:{type:"ERROR",index:98,getEventModel:function(e){return{errorCode:e.getErrorCode(),errorDetails:e.getErrorDetails(),errorPosition:e.getErrorPosition()}}},RELATED_CLICKED:{type:"RELATED_CLICKED",index:36,getEventModel:function(){return{}}},RELATED_SELECTED:{type:"RELATED_SELECTED",index:37,getEventModel:function(){return{}}}},y=(o={},Object.keys(E).forEach((function(e){return o[e]=e})),o);var v=function(){function e(){var e,t,n;n=[],(t="_rates")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this._rates=[]}var t=e.prototype;return t.setRates=function(e){var t=this;this._rates=[],e.forEach((function(e){t._rates.push({rate:e,active:!1,duration:0})}))},t.setCurrent=function(e){this._rates.forEach((function(e){return e.active=!1}));var t=this._rates.find((function(t){return t.rate===e}));t&&(t.active=!0)},t.getCurrent=function(){var e=this._rates.find((function(e){return e.active}));return e?e.rate:-1},t.countCurrent=function(){var e=this._rates.find((function(e){return e.active}));e&&e.duration++},t.getAverage=function(){var e=0,t=0;return this._rates.forEach((function(n){t+=n.rate*n.duration,e+=n.duration})),e?t/e:0},t.reset=function(){this._rates.forEach((function(e){return e.duration=0}))},t.destroy=function(){this._rates=[]},e}();var T,S,P,C=r.core.FakeEvent,A=r.core.FakeEventTarget,M=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this)._config=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.start=function(){var e=this;this._clearTimeout(),this._stopped=!1,this._resetCounter=0,this._eventCounter=0,this._intervalId=setInterval((function(){return e._monitor()}),1e3)},i.resume=function(){this._stopped=!1,this._resetCounter=0},i.stop=function(){this._stopped=!0},i.isStopped=function(){return this._stopped},i.destroy=function(){this._clearTimeout()},i._clearTimeout=function(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)},i._monitor=function(){this._stopped?(this._resetCounter===this._config.resetCounter&&(this.dispatchEvent(new C(r.Event.RESET)),this._resetCounter=0,this._eventCounter=0),this._resetCounter++):(this.dispatchEvent(new C(r.Event.TICK)),this._eventCounter===this._config.eventCounter&&(this.dispatchEvent(new C(r.Event.REPORT)),this._eventCounter=0),this._eventCounter++)},r}(A);P={TICK:"tick",RESET:"reset",REPORT:"report"},(S="Event")in(T=M)?Object.defineProperty(T,S,{value:P,enumerable:!0,configurable:!0,writable:!0}):T[S]=P;var R={GET:"GET",POST:"POST"},b={KMC:"0",KMS:"1",KAF:"2",PITCH:"3",KMS_GO:"4",WEBCASTING:"5",PERSONAL_CAPTURE:"6",KME:"7",KME_MOBILE_APP:"8",PATH:"9",LECTURE_CAPTURE:"10",EP:"11",CHAT_AND_COLLABORATION:"12",ANALYTICS:"13",EXPRESS_CAPTURE:"14",KPF:"15",KAF_GO:"16",SITES:"17",STUDIO:"18"};const I="related_selected",O="related_clicked";function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N=r.core.Error,k=(r.core.FakeEvent,r.core.Utils),F=function(e){var t,n;function r(t,n,r){var i;if(L(D(i=e.call(this,t,n,r)||this),"_lastDroppedFrames",0),L(D(i),"_lastTotalFrames",0),L(D(i),"_performanceEntries",[]),L(D(i),"_pendingFragLoadedUrls",[]),L(D(i),"_fragLoadedFiredOnce",!1),L(D(i),"_canPlayOccured",!1),L(D(i),"_isManualPreload",!1),i._rateHandler=new v,i._model=new s,i._setModelDelegates(),i._timer=new M({resetCounter:i.config.resetSessionCountdown,eventCounter:i.config.viewEventCountdown}),i._viewEventEnabled=!0,i._resetFlags(),i._addBindings(),i._model.updateModel({eventIndex:1,bufferTime:0,bufferTimeSum:0,playTimeSum:0}),performance&&i.config.uiConfId){var a=performance.getEntriesByType("resource").find((function(e){return e.name.match("embedPlaykitJs.*"+i.config.uiConfId)}));a&&i._model.updateModel({playerJSLoadTime:a.duration})}return i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.isValid=function(){return!0};var a,o,T,S=r.prototype;return S._updateSoundModeInModel=function(){this._model.updateModel({soundMode:this.player.muted||0===this.player.volume?u:l})},S._updateViewabilityModeInModel=function(e){this._model.updateModel({viewabilityMode:e||this.player.isInPictureInPicture()?c:d})},S._handleNewPerformanceEntries=function(e){for(var t=e.getEntries(),n=0;n<t.length;n++)this._performanceEntries.push(t[n]);for(;this._pendingFragLoadedUrls.length;)this._handleFragPerformanceObserver(this._pendingFragLoadedUrls.pop())},S.destroy=function(){this.eventManager.destroy(),this._reset()},S._reset=function(){this._timer.destroy(),this._rateHandler.destroy(),this._performanceObserver&&this._performanceObserver.disconnect(),this._performanceEntries=[],this._pendingFragLoadedUrls=[]},S.reset=function(){this.eventManager.removeAll(),this._resetFlags(),this._addBindings(),this._model.updateModel({eventIndex:1,bufferTime:0,bufferTimeSum:0,playTimeSum:0,sessionStartTime:null}),this._reset()},S.loadMedia=function(){window.PerformanceObserver&&(this._performanceObserver=new window.PerformanceObserver(this._handleNewPerformanceEntries.bind(this)),this._performanceObserver.observe({entryTypes:["resource"]}))},S.getEventModel=function(e){if(e)return this._model.getModel(E[e])},S.sendAnalytics=function(e){var t=this;return new Promise((function(n,r){i.OVPAnalyticsService.trackEvent(t.config.serviceUrl,e,t.config.requestMethod).doHttpRequest().then((function(r){t._handleServerResponseSuccess(r,e),n()}),(function(n){t._handleServerResponseFailed(n,e),r(n)})),t._model.updateModel({eventIndex:t._model.getEventIndex()+1})}))},S._resetFlags=function(){this._previousCurrentTime=0,this._isPlaying=!1,this._isFirstPlay=!0,this._isFirstPlaying=!0,this._isEnded=!1,this._isPaused=!1,this._isBuffering=!1,this._timePercentEvent={PLAY_REACHED_25_PERCENT:!1,PLAY_REACHED_50_PERCENT:!1,PLAY_REACHED_75_PERCENT:!1,PLAY_REACHED_100_PERCENT:!1},this._canPlayOccured=!1,this._isManualPreload=!1},S._resetSession=function(){this.logger.debug("Reset KAVA session"),this._rateHandler.reset(),this._model.updateModel({eventIndex:1,bufferTimeSum:0,playTimeSum:0})},S._sendAnalytics=function(e){if(this._validate()){this._isBuffering&&(this._updateBufferModel(),this._bufferStartTime=Date.now());var t=this._model.getModel(e);if("function"==typeof this.config.tamperAnalyticsHandler)if(!this.config.tamperAnalyticsHandler(t))return void this.logger.debug("Cancel KAVA request",t);this.logger.debug("Sending KAVA event "+t.eventType+":"+e.type),this.sendAnalytics(t).catch((function(){}))}},S._handleServerResponseSuccess=function(e,t){this.logger.debug("KAVA event sent",t),this._updateSessionStartTimeModel(e)},S._handleServerResponseFailed=function(e,t){this.logger.warn("Failed to send KAVA event",t,e)},S._addBindings=function(){var e=this;this.eventManager.listen(this._timer,M.Event.TICK,(function(){return e._rateHandler.countCurrent()})),this.eventManager.listen(this._timer,M.Event.REPORT,(function(){return e._onReport()})),this.eventManager.listen(this._timer,M.Event.RESET,(function(){return e._resetSession()})),this.eventManager.listen(this.player,this.player.Event.SOURCE_SELECTED,(function(){return e._onSourceSelected()})),this.eventManager.listen(this.player,this.player.Event.ERROR,(function(t){return e._onError(t)})),this.eventManager.listen(this.player,this.player.Event.FIRST_PLAY,(function(){return e._onFirstPlay()})),this.eventManager.listen(this.player,this.player.Event.FRAG_LOADED,(function(t){return e._onFragLoaded(t)})),this.eventManager.listen(this.player,this.player.Event.MANIFEST_LOADED,(function(t){return e._onManifestLoaded(t)})),this.eventManager.listen(this.player,this.player.Event.TIMED_METADATA,(function(t){return e._onTimedMetadataLoaded(t)})),this.eventManager.listen(this.player,this.player.Event.TRACKS_CHANGED,(function(){return e._setInitialTracks()})),this.eventManager.listen(this.player,this.player.Event.PLAYING,(function(){return e._onPlaying()})),this.eventManager.listen(this.player,this.player.Event.FIRST_PLAYING,(function(){return e._onFirstPlaying()})),this.eventManager.listen(this.player,this.player.Event.SEEKING,(function(){return e._onSeeking()})),this.eventManager.listen(this.player,this.player.Event.PAUSE,(function(){return e._onPause()})),this.eventManager.listen(this.player,this.player.Event.ENDED,(function(){return e._onEnded()})),this.eventManager.listen(this.player,this.player.Event.VIDEO_TRACK_CHANGED,(function(t){return e._onVideoTrackChanged(t)})),this.eventManager.listen(this.player,this.player.Event.AUDIO_TRACK_CHANGED,(function(t){return e._onAudioTrackChanged(t)})),this.eventManager.listen(this.player,this.player.Event.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this.eventManager.listen(this.player,this.player.Event.PLAYER_STATE_CHANGED,(function(t){return e._onPlayerStateChanged(t)})),this.eventManager.listen(this.player,this.player.Event.RATE_CHANGE,(function(){return e._onPlaybackRateChanged()})),this.eventManager.listen(this.player,this.player.Event.CAN_PLAY,(function(){return e._onCanPlay()})),this.eventManager.listen(this.player,this.player.Event.LOAD_START,(function(){return e._onLoadStart()})),this.eventManager.listen(this.player,this.player.Event.VOLUME_CHANGE,(function(){return e._updateSoundModeInModel()})),this.eventManager.listen(this.player,this.player.Event.VISIBILITY_CHANGE,(function(t){return e._updateViewabilityModeInModel(t.payload.visible)})),this.eventManager.listen(this.player,this.player.Event.MUTE_CHANGE,(function(){return e._updateSoundModeInModel()})),this.eventManager.listen(this.player,this.player.Event.ENTER_FULLSCREEN,(function(){return e._model.updateModel({screenMode:p.FULLSCREEN})})),this.eventManager.listen(this.player,this.player.Event.EXIT_FULLSCREEN,(function(){return e._model.updateModel({screenMode:p.NOT_IN_FULLSCREEN})})),this.eventManager.listen(this.player,O,(function(){return e._onRelatedClicked()})),this.eventManager.listen(this.player,I,(function(){return e._onRelatedSelected()})),this._initTabMode(),this._initNetworkConnectionType()},S._onFirstPlaying=function(){this._isPlaying=!0,!this._fragLoadedFiredOnce&&this._performanceObserver&&(this._performanceObserver.disconnect(),this.logger.debug("This adapter / media doesn't fire fragLoaded - disconnect performance observer"))},S._onLoadStart=function(){this._loadStartTime=Date.now()},S._getRates=function(){var e=[];return this.player.getTracks(this.player.Track.VIDEO).forEach((function(t){return e.push(t.bandwidth/1024)})),e},S._setInitialTracks=function(){var e=this._getRates(),t=this.player.getActiveTracks();this._rateHandler.setRates(e),t.video&&this._rateHandler.setCurrent(t.video.bandwidth/1024),t.audio&&this._model.updateModel({language:t.audio.language}),t.text&&this._model.updateModel({caption:t.text.language})},S._getAvailableBuffer=function(){var e=NaN;return this.player.stats&&(e=this.player.stats.availableBuffer),e},S._getForwardBufferHealth=function(){var e=NaN,t=this._getAvailableBuffer(),n=this._getTargetBuffer();return isNaN(n)||(e=Math.round(1e3*t/n)/1e3),e},S._getTargetBuffer=function(){var e=NaN;return this.player.stats&&(e=this.player.stats.targetBuffer),e},S._getDroppedFramesRatio=function(){var e=-1,t=this._getDroppedAndDecodedFrames();if(t){var n,r,i=t[0],a=t[1];n=i-this._lastDroppedFrames,e=(r=a-this._lastTotalFrames)?Math.round(n/r*1e3)/1e3:0,this._lastTotalFrames=a,this._lastDroppedFrames=i}return e},S._getDroppedAndDecodedFrames=function(){if("function"==typeof this.player.getVideoElement().getVideoPlaybackQuality){var e=this.player.getVideoElement().getVideoPlaybackQuality();return[e.droppedVideoFrames,e.totalVideoFrames]}return"number"==typeof this.player.getVideoElement().webkitDroppedFrameCount&&"number"==typeof this.player.getVideoElement().webkitDecodedFrameCount?[this.player.getVideoElement().webkitDroppedFrameCount,this.player.getVideoElement().webkitDecodedFrameCount]:null},S._onReport=function(){this._viewEventEnabled?(this._updatePlayTimeSumModel(),this._model.updateModel({forwardBufferHealth:this._getForwardBufferHealth(),targetBuffer:this._getTargetBuffer(),droppedFramesRatio:this._getDroppedFramesRatio()}),this._sendAnalytics(E.VIEW)):this.logger.warn("VIEW event blocked because server response of viewEventsEnabled=false"),this._model.updateModel({totalSegmentsDownloadTime:0,totalSegmentsDownloadBytes:0,maxManifestDownloadTime:0,maxSegmentDownloadTime:0,maxNetworkConnectionOverhead:0,bufferTime:0})},S._updateNetworkConnectionTypeinModel=function(e){this._model.updateModel({networkConnectionType:e.effectiveType})},S._initNetworkConnectionType=function(){var e=this,t=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection;t&&(this.eventManager.listen(t,"change",(function(){return e._updateNetworkConnectionTypeinModel(t)})),this._updateNetworkConnectionTypeinModel(t))},S._onPlaying=function(){if(this._isFirstPlaying){this._updateSoundModeInModel(),this._updateViewabilityModeInModel(this.player.isVisible),this.player.isUntimedImg()||this._timer.start(),this._isFirstPlaying=!1;var e="auto"===this.player.config.playback.preload||this._isManualPreload?this._firstPlayRequestTime:this._loadStartTime;this._model.updateModel({joinTime:r._getTimeDifferenceInSeconds(e)}),this._sendAnalytics(E.PLAY),this._onReport()}else this._isEnded?(this._timer.start(),this._isEnded=!1,this._sendAnalytics(E.REPLAY)):this._isPaused&&(this._timer.resume(),this._isPaused=!1,this._sendAnalytics(E.RESUME))},S._onCanPlay=function(){this._canPlayOccured=!0,this._model.updateModel({canPlayTime:r._getTimeDifferenceInSeconds(this._loadStartTime)})},S._onFirstPlay=function(){this._canPlayOccured&&(this._isManualPreload=!0),this._isFirstPlay=!1,this._firstPlayRequestTime=Date.now(),this._sendAnalytics(E.PLAY_REQUEST)},S._onSourceSelected=function(){var e=this;this._sendAnalytics(E.IMPRESSION),this.player.isImage()||this.player.isLive()||this.eventManager.listen(this.player,this.player.Event.TIME_UPDATE,(function(){return e._onTimeUpdate()}))},S._onSeeking=function(){this._previousCurrentTime=this.player.currentTime,this._model.updateModel({targetPosition:this.player.currentTime}),this._sendAnalytics(E.SEEK)},S._onPause=function(){this._isPaused=!0,this._timer.stop(),this._sendAnalytics(E.PAUSE)},S._onEnded=function(){this._isEnded=!0,this._onTimeUpdate(),this._model.updateModel({bufferTime:0})},S._onTimeUpdate=function(){this._updatePlayTimeSumModel();var e=parseFloat((this.player.currentTime/this.player.duration).toFixed(2));!this._timePercentEvent.PLAY_REACHED_25&&e>=.25&&(this._timePercentEvent.PLAY_REACHED_25=!0,this._sendAnalytics(E.PLAY_REACHED_25_PERCENT)),!this._timePercentEvent.PLAY_REACHED_50&&e>=.5&&(this._timePercentEvent.PLAY_REACHED_50=!0,this._sendAnalytics(E.PLAY_REACHED_50_PERCENT)),!this._timePercentEvent.PLAY_REACHED_75&&e>=.75&&(this._timePercentEvent.PLAY_REACHED_75=!0,this._sendAnalytics(E.PLAY_REACHED_75_PERCENT)),this._timePercentEvent.PLAY_REACHED_100||1!==e||(this._timePercentEvent.PLAY_REACHED_100=!0,this._sendAnalytics(E.PLAY_REACHED_100_PERCENT))},S._onFragLoaded=function(e){(this._fragLoadedFiredOnce||(this._fragLoadedFiredOnce=!0),this._updateFragLoadedStats(e),this._performanceObserver)&&(this._handleFragPerformanceObserver(e.payload.url)||this._pendingFragLoadedUrls.push(e.payload.url))},S._handleFragPerformanceObserver=function(e){var t=this._performanceEntries.filter((function(t){return t.name==e})),n=t&&t.length?t[t.length-1]:null;if(n){this._updateMaxNetworkConnectionOverhead(n.connectEnd-n.domainLookupStart);var r=this._performanceEntries.indexOf(n);return r>-1&&r<this._performanceEntries.length&&(this._performanceEntries=this._performanceEntries.splice(r+1,this._performanceEntries.length-(r+1))),!0}return!1},S._updateMaxNetworkConnectionOverhead=function(e){this._model.updateModel({maxNetworkConnectionOverhead:Math.max(this._model.maxNetworkConnectionOverhead,e)})},S._updateFragLoadedStats=function(e){var t=Math.round(e.payload.miliSeconds)/1e3;this._model.updateModel({totalSegmentsDownloadTime:this._model.totalSegmentsDownloadTime+t,totalSegmentsDownloadBytes:this._model.totalSegmentsDownloadBytes+e.payload.bytes,maxSegmentDownloadTime:Math.max(t,this._model.maxSegmentDownloadTime)})},S._onManifestLoaded=function(e){var t=Math.round(e.payload.miliSeconds)/1e3;this._model.updateModel({maxManifestDownloadTime:Math.max(t,this._model.maxManifestDownloadTime)})},S._onTimedMetadataLoaded=function(e){var t=e.payload.cues.filter((function(e){return e.value&&"TEXT"===e.value.key}));if(t.length)try{this._model.updateModel({flavorParamsId:Number(JSON.parse(t[t.length-1].value.data).sequenceId)})}catch(e){this.logger.debug("error parsing id3",e)}},S._onVideoTrackChanged=function(e){var t=e.payload.selectedVideoTrack;this._rateHandler.setCurrent(t.bandwidth/1024),this.player.isAdaptiveBitrateEnabled()?this._sendAnalytics(E.FLAVOR_SWITCH):this._sendAnalytics(E.SOURCE_SELECTED)},S._onAudioTrackChanged=function(e){var t=e.payload.selectedAudioTrack;this._model.updateModel({language:t.language}),this._sendAnalytics(E.AUDIO_SELECTED)},S._onTextTrackChanged=function(e){if(this._isPlaying){var t=e.payload.selectedTextTrack;this._model.updateModel({caption:t.language}),this._sendAnalytics(E.CAPTIONS)}},S._onError=function(e){e.payload&&e.payload.severity===N.Severity.CRITICAL&&(this._model.updateModel({errorCode:e.payload.code,errorDetails:e.payload.data,errorPosition:this._isFirstPlay?_:this._isFirstPlaying?g:m}),this._sendAnalytics(E.ERROR),this.reset())},S._onPlaybackRateChanged=function(){this.player.playbackRates.length&&!this.player.playbackRates.includes(this.player.playbackRate)||this._sendAnalytics(E.SPEED)},S._onPlayerStateChanged=function(e){var t=e.payload.oldState,n=e.payload.newState;t.type===this.player.State.BUFFERING&&(this._isBuffering=!1,this._updateBufferModel(),this._sendAnalytics(E.BUFFER_END)),n.type===this.player.State.BUFFERING&&(this._isBuffering=!0,this._bufferStartTime=Date.now(),this._sendAnalytics(E.BUFFER_START))},S._onRelatedClicked=function(){this._sendAnalytics(E.RELATED_CLICKED)},S._onRelatedSelected=function(){this._sendAnalytics(E.RELATED_SELECTED)},S._updateSessionStartTimeModel=function(e){!this._model.getSessionStartTime()&&e&&("object"==typeof e?(this._model.updateModel({sessionStartTime:e.time}),this._viewEventEnabled=e.viewEventsEnabled):this._model.updateModel({sessionStartTime:e})),this._timer.isStopped()&&this._model.updateModel({sessionStartTime:null})},S._updateBufferModel=function(){var e=r._getTimeDifferenceInSeconds(this._bufferStartTime);this._model.updateModel({bufferTime:this._model.getBufferTime()+e,bufferTimeSum:this._model.getBufferTimeSum()+e})},S._updatePlayTimeSumModel=function(){var e;this.player.isLive()?e=this.config.viewEventCountdown-this._model.getBufferTime():(e=this.player.currentTime-this._previousCurrentTime,this._previousCurrentTime=this.player.currentTime),this._model.updateModel({playTimeSum:this._model.getPlayTimeSum()+e})},S._setModelDelegates=function(){var e=this;this._model.getPlaybackSpeed=function(){return e.player.playbackRate},this._model.getActualBitrate=function(){return e._rateHandler.getCurrent()},this._model.getAverageBitrate=function(){return e._rateHandler.getAverage()},this._model.getPartnerId=function(){return e.config.partnerId},this._model.getEntryId=function(){return e.config.entryId},this._model.getPlaylistId=function(){return e.config.playlistId},this._model.getSessionId=function(){return e.config.sessionId},this._model.getPersistentSessionId=function(){return e.config.persistentSessionId},this._model.getClientVer=function(){return e.config.playerVersion},this._model.getClientTag=function(){return"html5:v"+e.config.playerVersion},this._model.getKS=function(){return e.config.ks},this._model.getVirtualEventId=function(){return e.config.virtualEventId},this._model.getUIConfId=function(){return e.config.uiConfId},this._model.getReferrer=function(){return e.config.referrer},this._model.getCustomVar1=function(){return e.config.customVar1},this._model.getCustomVar2=function(){return e.config.customVar2},this._model.getCustomVar3=function(){return e.config.customVar3},this._model.getPosition=function(){return e._getPosition()},this._model.getDeliveryType=function(){return e._getDeliveryType()},this._model.getPlaybackType=function(){return e._getPlaybackType()},this._model.getPlaybackContext=function(){return e.config.playbackContext},this._model.getApplicationVersion=function(){return e.config.applicationVersion},this._model.getApplication=function(){return e.config.application},this._model.getKalturaApplicationVersion=function(){return e.config.kalturaApplicationVersion},this._model.getKalturaApplication=function(){return e._getKalturaApplicationId(e.config.kalturaApplication)},this._model.getUserId=function(){return e.config.userId}},S._getKalturaApplicationId=function(e){return e in b?b[e]:(this.logger.warn("Kava analytics - unknon kalturaAppName: "+e),"")},S._getPosition=function(){return this.player.isLive()?Number.isNaN(this.player.duration)||this.player.duration-this.player.currentTime<1?0:-(this.player.duration-this.player.currentTime):this._isFirstPlaying?this.player.currentTime||this.player.sources.startTime||0:this.player.currentTime},S._getDeliveryType=function(){return this.player.streamType===this.player.StreamType.PROGRESSIVE?"url":this.player.streamType},S._getPlaybackType=function(){if(this.player.isLive()){if(this.player.isDvr())if(this.player.duration-this.player.currentTime>=this.config.dvrThreshold)return"dvr";return"live"}return this.player.isImage()?"img":"vod"},S._validate=function(){return this.config.partnerId?!!this.config.entryId||(this._logMissingParam("entryId"),!1):(this._logMissingParam("partnerId"),!1)},S._logMissingParam=function(e){this.logger.warn("Kava analytics block report because of missing param "+e)},r._getTimeDifferenceInSeconds=function(e){return(Date.now()-e)/1e3},S._updateTabModeInModel=function(e){this._model.updateModel({tabMode:this._isTabHidden(e)&&!this.player.isInPictureInPicture()?f:h})},S._isTabHidden=function(e){return document[e]},S._initTabMode=function(){var e,t,n=this;void 0!==document.hidden?(e="hidden",t="visibilitychange"):void 0!==document.msHidden?(e="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(e="webkitHidden",t="webkitvisibilitychange"),e&&t&&(this.eventManager.listen(document,t,(function(){return n._updateTabModeInModel(e)})),this._updateTabModeInModel(e))},a=r,(o=[{key:"EventType",get:function(){return k.Object.copyDeep(y)}}])&&w(a.prototype,o),T&&w(a,T),r}(r.BasePlugin);L(F,"defaultConfig",{serviceUrl:k.Http.protocol+"//analytics.kaltura.com/api_v3/index.php",requestMethod:R.GET,viewEventCountdown:10,resetSessionCountdown:30,dvrThreshold:120,playbackContext:"",applicationVersion:"",application:"",kalturaApplicationVersion:"",kalturaApplication:""});var x="1.5.4-canary.0-994176b",B="@playkit-js/playkit-js-kava";Object(r.registerPlugin)("kava",F)}]); +var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.kava=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=2)}([function(e,t){e.exports=KalturaPlayer},function(e,t,n){window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=9)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function e(t,n,r,i){void 0===i&&(i={}),this.severity=t,this.category=n,this.code=r,this.data=i,e._logger.error("Category:"+n+" | Code:"+r+" |",i)};i(a,"Severity",{RECOVERABLE:1,CRITICAL:2}),i(a,"Category",{NETWORK:1,SERVICE:2,PROVIDER:3}),i(a,"Code",{UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,BAD_SERVER_RESPONSE:1005,MULTIREQUEST_API_ERROR:1006,API_RESPONSE_MISMATCH:1007,ERROR:2e3,BLOCK_ACTION:2001,MEDIA_STATUS_NOT_READY:2002,MISSING_MANDATORY_PARAMS:3e3,MISSING_PLAY_SOURCE:3001,METHOD_NOT_IMPLEMENTED:3002}),i(a,"_logger",Object(r.a)("Error"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=function(){function e(e){void 0===e&&(e=new Map),i(this,"retryConfig",{async:!0,timeout:0,maxAttempts:4}),i(this,"_attemptCounter",1),this.headers=e}var t=e.prototype;return t.getUrl=function(e){return e+"/service/"+this.service+(this.action?"/action/"+this.action:"")},t.doHttpRequest=function(){var e=this,t=new Promise((function(t,n){e._requestPromise={resolve:t,reject:n}}));return this.url||this._requestPromise.reject(new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,r.a.Code.MALFORMED_DATA_URI,{url:this.url})),this._createXHR(),t},t._createXHR=function(){var e=this,t=new XMLHttpRequest;t.onreadystatechange=function(){if(4===t.readyState&&200===t.status)try{var n=JSON.parse(t.responseText);return e.responseHeaders=e._getResponseHeaders(t),e._requestPromise.resolve(n)}catch(n){e._requestPromise.reject(e._createError(t,r.a.Code.BAD_SERVER_RESPONSE,{text:t.responseText}))}},t.open(this.method,this.url,this.retryConfig.async),this.retryConfig.async&&this.retryConfig.timeout&&(t.timeout=this.retryConfig.timeout);var n=performance.now();t.ontimeout=function(){e._handleError(t,r.a.Code.TIMEOUT,{timeout:(performance.now()-n)/1e3,statusText:t.statusText})},t.onerror=t.onabort=function(){e._handleError(t,r.a.Code.HTTP_ERROR,{text:t.responseText,statusText:t.statusText})},this.headers.forEach((function(e,n){t.setRequestHeader(n,e)})),t.send(this.params)},t._getResponseHeaders=function(e){return e.getAllResponseHeaders().split("\n").filter((function(e){return 0===e.toLowerCase().indexOf("x-")}))},t._handleError=function(e,t,n){var r=this._createError(e,t,n);if(e.onreadystatechange=function(){},e.onerror=function(){},e.ontimeout=function(){},e.onabort=function(){},!(this.retryConfig.maxAttempts&&this._attemptCounter<this.retryConfig.maxAttempts))return this._requestPromise.reject(r);this._attemptCounter++,this._createXHR()},t._createError=function(e,t,n){return Object.assign(n,{url:this.url,headers:this._getResponseHeaders(e),attempt:this._attemptCounter}),new r.a(r.a.Severity.CRITICAL,r.a.Category.NETWORK,t,n)},e}()},function(e,t,n){"use strict";var r=function(){return{VERSION:"",DEBUG:{value:"",name:""},ERROR:{value:"",name:""},INFO:{value:"",name:""},OFF:{value:"",name:""},TIME:{value:"",name:""},TRACE:{value:"",name:""},WARN:{value:"",name:""},createDefaultHandler:function(){},debug:function(){},enabledFor:function(){},error:function(){},get:function(){},getLevel:function(){},info:function(){},log:function(){},setHandler:function(){},setLevel:function(){},time:function(){},timeEnd:function(){},trace:function(){},useDefaults:function(){},warn:function(){}}};t.a=function(e){return r(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(4),i={serviceUrl:"https://cdnapisec.kaltura.com/api_v3",cdnUrl:"https://cdnapisec.kaltura.com",serviceParams:{apiVersion:"3.3.0",format:1},useApiCaptions:!0,loadThumbnailWithKs:!1,replaceHostOnlyManifestUrls:!1},a=function(){function e(){}return e.set=function(e){e&&Object.assign(i,e)},e.get=function(){return Object(r.a)(i)},e}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function e(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,r){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[r]=e(t))})):"object"==typeof t?(n=Object.assign({},t),Object.keys(n).forEach((function(t){("object"==typeof n[t]&&n[t]!=={}||Array.isArray(n[t])&&n[t].length>0)&&(n[t]=e(n[t]))}))):n=t,n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),i=n(2),a=function(e){var t;(t="hasError")in this?Object.defineProperty(this,t,{value:!1,enumerable:!0,configurable:!0,writable:!0}):this[t]=!1,"KalturaAPIException"===e.objectType?(this.hasError=!0,this.error=new o(e.code,e.message)):e.error&&"KalturaAPIException"===e.error.objectType?(this.hasError=!0,this.error=new o(e.error.code,e.error.message)):this.data=e},o=function(e,t){this.code=e,this.message=t},s=n(0);function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e){var t,n;function r(){for(var t,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return l(u(t=e.call.apply(e,[this].concat(r))||this),"requests",[]),t}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.add=function(e){var t;this.requests.push(e);var n={},r={service:e.service,action:e.action};return Object.assign(n,((t={})[this.requests.length]=Object.assign(r,e.params),t)),Object.assign(n,this.params),this.params=n,this},i.execute=function(e){var t=this;return new Promise((function(n,i){try{t.params=JSON.stringify(t.params)}catch(e){r._logger.error(""+e.message),i(new s.a(s.a.Severity.CRITICAL,s.a.Category.PROVIDER,s.a.Code.FAILED_PARSING_REQUEST,{error:e,params:t.params}))}t.doHttpRequest().then((function(r){var a=new c(r,e);a.success?n({headers:t.responseHeaders,response:a}):i(new s.a(s.a.Severity.CRITICAL,s.a.Category.NETWORK,s.a.Code.MULTIREQUEST_API_ERROR,{url:t.url,headers:t.responseHeaders,results:a.results}))}),(function(e){i(e)}))}))},r}(r.a);l(d,"_logger",Object(i.a)("MultiRequestBuilder"));var c=function e(t,n){void 0===n&&(n=!0),l(this,"results",[]);var r=t.result?t.result:t,i=(Array.isArray(r)?r:[r]).map((function(e){return new a(e)})),o=i.filter((function(e){return e.hasError}));o.forEach((function(t){e._logger.error("Service returned an error with error code: "+t.error.code+" and message: "+t.error.message+".")})),this.results=i,n&&o.length||o.length===this.results.length?this.success=!1:(this.results=this.results.filter((function(e){return!e.hasError})),this.success=!0)};l(c,"_logger",Object(i.a)("MultiRequestResult"))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=function(e){var t=[],n=/\[\]$/,r=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=function(e,n){n="function"==typeof n?n():null==n?"":n,t[t.length]=encodeURIComponent(e)+"="+encodeURIComponent(n)};return function e(a,o){var s,u,l;if(a)if(r(o))for(s=0,u=o.length;s<u;s++)n.test(a)?i(a,o[s]):e(a+":"+("object"==typeof o[s]?s:""),o[s]);else if(o&&"[object Object]"===String(o))for(l in o)e(a+":"+l,o[l]);else i(a,o);else if(r(o))for(s=0,u=o.length;s<u;s++)i(o[s].name,o[s].value);else for(l in o)e(l,o[l]);return t}("",e).join("&").replace(/%20/g,"+")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(5),i=n(3),a=function(){function e(){}return e.getMultiRequest=function(e,t,n){var a=i.a.get(),o=a.serviceParams;Object.assign(o,{ks:t,clientTag:"html5:v"+e}),n&&Object.assign(o,{partnerId:n});var s=new Map;s.set("Content-Type","application/json");var u=new r.a(s);return u.method="POST",u.service="multirequest",u.url=u.getUrl(a.serviceUrl),u.params=o,u},e}()},,function(e,t,n){"use strict";n.r(t),n.d(t,"OVPAnalyticsService",(function(){return s})),n.d(t,"OVPConfiguration",(function(){return i.a})),n.d(t,"RequestBuilder",(function(){return r.a})),n.d(t,"NAME",(function(){return u})),n.d(t,"VERSION",(function(){return l}));var r=n(1),i=n(3),a=n(7),o=n(6),s=function(e){var t,n;function a(){return e.apply(this,arguments)||this}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,a.trackEvent=function(e,t,n){return"POST"===n?a._trackEventByPOST(e,t):a._trackEventByGET(e,t)},a._trackEventByGET=function(e,t){var n=i.a.get(),a={};Object.assign(a,n.serviceParams,t);var s=new r.a;return s.service="analytics",s.action="trackEvent",s.method="GET",s.tag="analytics-trackEvent",s.params=a,s.url=e+"?service="+s.service+"&action="+s.action+"&"+Object(o.a)(s.params),s},a._trackEventByPOST=function(e,t){var n=i.a.get(),a={};Object.assign(a,n.serviceParams,t);var s=new Map;s.set("Content-Type","application/json");var u=new r.a(s),l={eventType:a.eventType,partnerId:a.partnerId,entryId:a.entryId,sessionId:a.sessionId};return["eventType","partnerId","entryId","sessionId"].forEach((function(e){return delete a[e]})),u.service="analytics",u.action="trackEvent",u.method="POST",u.tag="analytics-trackEvent",u.params=JSON.stringify(a),u.url=e+"?service="+u.service+"&action="+u.action+"&"+Object(o.a)(l),u},a}(a.a),u="@playkit-js/playkit-js-providers-analytics-service",l="2.39.3-canary.0-e04b57d"}])},function(e,t,n){"use strict";n.r(t),n.d(t,"Plugin",(function(){return F})),n.d(t,"EventType",(function(){return y})),n.d(t,"HttpMethodType",(function(){return R})),n.d(t,"VERSION",(function(){return x})),n.d(t,"NAME",(function(){return B}));var r=n(0),i=n(1);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o,s=function(){function e(e){a(this,"totalSegmentsDownloadTime",0),a(this,"totalSegmentsDownloadBytes",0),a(this,"maxSegmentDownloadTime",0),a(this,"maxManifestDownloadTime",0),a(this,"droppedFramesRatio",null),a(this,"screenMode",p.NOT_IN_FULLSCREEN),a(this,"maxNetworkConnectionOverhead",0),a(this,"flavorParamsId",NaN),a(this,"playerJSLoadTime",null),e&&this.updateModel(e)}var t=e.prototype;return t.getPlayTimeSum=function(){return this.playTimeSum},t.getCanPlayTime=function(){return this.canPlayTime},t.getBufferTime=function(){return this.bufferTime},t.getBufferTimeSum=function(){return this.bufferTimeSum},t.getPlayerJSLoadTime=function(){return this.playerJSLoadTime?Math.round(1e3*this.playerJSLoadTime)/1e3:null},t.getJoinTime=function(){return this.joinTime},t.getTargetPosition=function(){return this.targetPosition},t.getTargetBuffer=function(){return this.targetBuffer},t.getLanguage=function(){return this.language},t.getCaption=function(){return this.caption},t.getBandwidth=function(){return this.totalSegmentsDownloadTime>0?Math.round(8*this.totalSegmentsDownloadBytes/this.totalSegmentsDownloadTime)/1e3:0},t.getMaxManifestDownloadTime=function(){return this.maxManifestDownloadTime},t.getSegmentDownloadTime=function(){return this.maxSegmentDownloadTime},t.getForwardBufferHealth=function(){return this.forwardBufferHealth},t.getDroppedFramesRatio=function(){return this.droppedFramesRatio},t.getSoundMode=function(){return this.soundMode},t.getViewabilityMode=function(){return this.viewabilityMode},t.getScreenMode=function(){return this.screenMode},t.getTabMode=function(){return this.tabMode},t.getNetworkConnectionType=function(){return this.networkConnectionType},t.getNetworkConnectionOverhead=function(){return Math.round(this.maxNetworkConnectionOverhead)/1e3},t.getErrorCode=function(){return this.errorCode},t.getFlavorParamsId=function(){return this.flavorParamsId},t.getErrorDetails=function(){var e="";if(this.errorDetails)try{e=JSON.stringify(this.errorDetails)}catch(e){}return e},t.getEventIndex=function(){return this.eventIndex},t.getErrorPosition=function(){return this.errorPosition},t.getSessionStartTime=function(){return this.sessionStartTime},t.updateModel=function(e){Object.assign(this,e)},t.getModel=function(e){return function(e,t){var n={eventType:e.index,partnerId:t.getPartnerId(),entryId:t.getEntryId(),sessionId:t.getSessionId(),eventIndex:t.getEventIndex(),referrer:t.getReferrer(),deliveryType:t.getDeliveryType(),playbackType:t.getPlaybackType(),clientVer:t.getClientVer(),clientTag:t.getClientTag(),position:t.getPosition(),playbackSpeed:t.getPlaybackSpeed()};t.getCaption()&&(n.caption=t.getCaption());t.getSessionStartTime()&&(n.sessionStartTime=t.getSessionStartTime());t.getKS()&&(n.ks=t.getKS());t.getVirtualEventId()&&(n.virtualEventId=t.getVirtualEventId());t.getUIConfId()&&(n.uiConfId=t.getUIConfId());t.getPlaylistId()&&(n.playlistId=t.getPlaylistId());t.getCustomVar1()&&(n.customVar1=t.getCustomVar1());t.getCustomVar2()&&(n.customVar2=t.getCustomVar2());t.getCustomVar3()&&(n.customVar3=t.getCustomVar3());t.getPlaybackContext()&&(n.playbackContext=t.getPlaybackContext());t.getApplicationVersion()&&(n.applicationVer=t.getApplicationVersion());t.getApplication()&&(n.application=t.getApplication());t.getKalturaApplicationVersion()&&(n.kalturaApplicationVer=t.getKalturaApplicationVersion());t.getKalturaApplication()&&(n.kalturaApplication=t.getKalturaApplication());t.getUserId()&&(n.userId=t.getUserId());t.getPersistentSessionId()&&(n.persistentSessionId=t.getPersistentSessionId());var r=e.getEventModel(t);return Object.assign(r,n)}(e,this)},e}(),u=1,l=2,d=1,c=2,f=1,h=2,p={NOT_IN_FULLSCREEN:1,FULLSCREEN:2},_=3,g=1,m=2,E={VIEW:{type:"VIEW",index:99,getEventModel:function(e){var t={playTimeSum:e.getPlayTimeSum(),bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate(),averageBitrate:e.getAverageBitrate(),audioLanguage:e.getLanguage(),soundMode:e.getSoundMode(),tabMode:e.getTabMode(),viewabilityMode:e.getViewabilityMode(),screenMode:e.getScreenMode()};return isNaN(e.getForwardBufferHealth())||(t.forwardBufferHealth=e.getForwardBufferHealth()),e.getMaxManifestDownloadTime()>0&&(t.manifestDownloadTime=e.getMaxManifestDownloadTime()),e.getSegmentDownloadTime()>0&&(t.segmentDownloadTime=e.getSegmentDownloadTime()),e.getBandwidth()&&(t.bandwidth=e.getBandwidth()),null!=e.getDroppedFramesRatio()&&(t.droppedFramesRatio=e.getDroppedFramesRatio()),isNaN(e.getTargetBuffer())||(t.targetBuffer=e.getTargetBuffer()),""!==e.getNetworkConnectionType()&&(t.networkConnectionType=e.getNetworkConnectionType()),e.getNetworkConnectionOverhead()&&(t.networkConnectionOverhead=e.getNetworkConnectionOverhead()),isNaN(e.getFlavorParamsId())||(t.flavorParamsId=e.getFlavorParamsId()),t}},IMPRESSION:{type:"IMPRESSION",index:1,getEventModel:function(e){var t={};return null!=e.getPlayerJSLoadTime()&&(t.playerJSLoadTime=e.getPlayerJSLoadTime()),t}},PLAY_REQUEST:{type:"PLAY_REQUEST",index:2,getEventModel:function(){return{}}},PLAY:{type:"PLAY",index:3,getEventModel:function(e){var t={bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate(),joinTime:e.getJoinTime(),canPlay:e.getCanPlayTime()};return""!==e.getNetworkConnectionType()&&(t.networkConnectionType=e.getNetworkConnectionType()),t}},RESUME:{type:"RESUME",index:4,getEventModel:function(e){return{bufferTime:e.getBufferTime(),bufferTimeSum:e.getBufferTimeSum(),actualBitrate:e.getActualBitrate()}}},PAUSE:{type:"PAUSE",index:33,getEventModel:function(){return{}}},BUFFER_START:{type:"BUFFER_START",index:45,getEventModel:function(){return{}}},BUFFER_END:{type:"BUFFER_END",index:46,getEventModel:function(){return{}}},REPLAY:{type:"REPLAY",index:34,getEventModel:function(){return{}}},SEEK:{type:"SEEK",index:35,getEventModel:function(e){return{targetPosition:e.getTargetPosition()}}},PLAY_REACHED_25_PERCENT:{type:"PLAY_REACHED_25_PERCENT",index:11,getEventModel:function(){return{}}},PLAY_REACHED_50_PERCENT:{type:"PLAY_REACHED_50_PERCENT",index:12,getEventModel:function(){return{}}},PLAY_REACHED_75_PERCENT:{type:"PLAY_REACHED_75_PERCENT",index:13,getEventModel:function(){return{}}},PLAY_REACHED_100_PERCENT:{type:"PLAY_REACHED_100_PERCENT",index:14,getEventModel:function(){return{}}},SOURCE_SELECTED:{type:"SOURCE_SELECTED",index:39,getEventModel:function(e){return{actualBitrate:e.getActualBitrate()}}},AUDIO_SELECTED:{type:"AUDIO_SELECTED",index:42,getEventModel:function(e){return{language:e.getLanguage()}}},FLAVOR_SWITCH:{type:"FLAVOR_SWITCH",index:43,getEventModel:function(e){return{actualBitrate:e.getActualBitrate()}}},SPEED:{type:"SPEED",index:41,getEventModel:function(){return{}}},CAPTIONS:{type:"CAPTIONS",index:38,getEventModel:function(){return{}}},ERROR:{type:"ERROR",index:98,getEventModel:function(e){return{errorCode:e.getErrorCode(),errorDetails:e.getErrorDetails(),errorPosition:e.getErrorPosition()}}},RELATED_CLICKED:{type:"RELATED_CLICKED",index:36,getEventModel:function(){return{}}},RELATED_SELECTED:{type:"RELATED_SELECTED",index:37,getEventModel:function(){return{}}}},y=(o={},Object.keys(E).forEach((function(e){return o[e]=e})),o);var v=function(){function e(){var e,t,n;n=[],(t="_rates")in(e=this)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,this._rates=[]}var t=e.prototype;return t.setRates=function(e){var t=this;this._rates=[],e.forEach((function(e){t._rates.push({rate:e,active:!1,duration:0})}))},t.setCurrent=function(e){this._rates.forEach((function(e){return e.active=!1}));var t=this._rates.find((function(t){return t.rate===e}));t&&(t.active=!0)},t.getCurrent=function(){var e=this._rates.find((function(e){return e.active}));return e?e.rate:-1},t.countCurrent=function(){var e=this._rates.find((function(e){return e.active}));e&&e.duration++},t.getAverage=function(){var e=0,t=0;return this._rates.forEach((function(n){t+=n.rate*n.duration,e+=n.duration})),e?t/e:0},t.reset=function(){this._rates.forEach((function(e){return e.duration=0}))},t.destroy=function(){this._rates=[]},e}();var T,S,P,C=r.core.FakeEvent,A=r.core.FakeEventTarget,M=function(e){var t,n;function r(t){var n;return(n=e.call(this)||this)._config=t,n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.start=function(){var e=this;this._clearTimeout(),this._stopped=!1,this._resetCounter=0,this._eventCounter=0,this._intervalId=setInterval((function(){return e._monitor()}),1e3)},i.resume=function(){this._stopped=!1,this._resetCounter=0},i.stop=function(){this._stopped=!0},i.isStopped=function(){return this._stopped},i.destroy=function(){this._clearTimeout()},i._clearTimeout=function(){this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)},i._monitor=function(){this._stopped?(this._resetCounter===this._config.resetCounter&&(this.dispatchEvent(new C(r.Event.RESET)),this._resetCounter=0,this._eventCounter=0),this._resetCounter++):(this.dispatchEvent(new C(r.Event.TICK)),this._eventCounter===this._config.eventCounter&&(this.dispatchEvent(new C(r.Event.REPORT)),this._eventCounter=0),this._eventCounter++)},r}(A);P={TICK:"tick",RESET:"reset",REPORT:"report"},(S="Event")in(T=M)?Object.defineProperty(T,S,{value:P,enumerable:!0,configurable:!0,writable:!0}):T[S]=P;var R={GET:"GET",POST:"POST"},b={KMC:"0",KMS:"1",KAF:"2",PITCH:"3",KMS_GO:"4",WEBCASTING:"5",PERSONAL_CAPTURE:"6",KME:"7",KME_MOBILE_APP:"8",PATH:"9",LECTURE_CAPTURE:"10",EP:"11",CHAT_AND_COLLABORATION:"12",ANALYTICS:"13",EXPRESS_CAPTURE:"14",KPF:"15",KAF_GO:"16",SITES:"17",STUDIO:"18"};const I="related_selected",O="related_clicked";function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var N=r.core.Error,k=(r.core.FakeEvent,r.core.Utils),F=function(e){var t,n;function r(t,n,r){var i;if(L(D(i=e.call(this,t,n,r)||this),"_lastDroppedFrames",0),L(D(i),"_lastTotalFrames",0),L(D(i),"_performanceEntries",[]),L(D(i),"_pendingFragLoadedUrls",[]),L(D(i),"_fragLoadedFiredOnce",!1),L(D(i),"_canPlayOccured",!1),L(D(i),"_isManualPreload",!1),i._rateHandler=new v,i._model=new s,i._setModelDelegates(),i._timer=new M({resetCounter:i.config.resetSessionCountdown,eventCounter:i.config.viewEventCountdown}),i._viewEventEnabled=!0,i._resetFlags(),i._addBindings(),i._model.updateModel({eventIndex:1,bufferTime:0,bufferTimeSum:0,playTimeSum:0}),performance&&i.config.uiConfId){var a=performance.getEntriesByType("resource").find((function(e){return e.name.match("embedPlaykitJs.*"+i.config.uiConfId)}));a&&i._model.updateModel({playerJSLoadTime:a.duration})}return i}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.isValid=function(){return!0};var a,o,T,S=r.prototype;return S._updateSoundModeInModel=function(){this._model.updateModel({soundMode:this.player.muted||0===this.player.volume?u:l})},S._updateViewabilityModeInModel=function(e){this._model.updateModel({viewabilityMode:e||this.player.isInPictureInPicture()?c:d})},S._handleNewPerformanceEntries=function(e){for(var t=e.getEntries(),n=0;n<t.length;n++)this._performanceEntries.push(t[n]);for(;this._pendingFragLoadedUrls.length;)this._handleFragPerformanceObserver(this._pendingFragLoadedUrls.pop())},S.destroy=function(){this.eventManager.destroy(),this._reset()},S._reset=function(){this._timer.destroy(),this._rateHandler.destroy(),this._performanceObserver&&this._performanceObserver.disconnect(),this._performanceEntries=[],this._pendingFragLoadedUrls=[]},S.reset=function(){this.eventManager.removeAll(),this._resetFlags(),this._addBindings(),this._model.updateModel({eventIndex:1,bufferTime:0,bufferTimeSum:0,playTimeSum:0,sessionStartTime:null}),this._reset()},S.loadMedia=function(){window.PerformanceObserver&&(this._performanceObserver=new window.PerformanceObserver(this._handleNewPerformanceEntries.bind(this)),this._performanceObserver.observe({entryTypes:["resource"]}))},S.getEventModel=function(e){if(e)return this._model.getModel(E[e])},S.sendAnalytics=function(e){var t=this;return new Promise((function(n,r){i.OVPAnalyticsService.trackEvent(t.config.serviceUrl,e,t.config.requestMethod).doHttpRequest().then((function(r){t._handleServerResponseSuccess(r,e),n()}),(function(n){t._handleServerResponseFailed(n,e),r(n)})),t._model.updateModel({eventIndex:t._model.getEventIndex()+1})}))},S._resetFlags=function(){this._previousCurrentTime=0,this._isPlaying=!1,this._isFirstPlay=!0,this._isFirstPlaying=!0,this._isEnded=!1,this._isPaused=!1,this._isBuffering=!1,this._timePercentEvent={PLAY_REACHED_25_PERCENT:!1,PLAY_REACHED_50_PERCENT:!1,PLAY_REACHED_75_PERCENT:!1,PLAY_REACHED_100_PERCENT:!1},this._canPlayOccured=!1,this._isManualPreload=!1},S._resetSession=function(){this.logger.debug("Reset KAVA session"),this._rateHandler.reset(),this._model.updateModel({eventIndex:1,bufferTimeSum:0,playTimeSum:0})},S._sendAnalytics=function(e){if(this._validate()){this._isBuffering&&(this._updateBufferModel(),this._bufferStartTime=Date.now());var t=this._model.getModel(e);if("function"==typeof this.config.tamperAnalyticsHandler)if(!this.config.tamperAnalyticsHandler(t))return void this.logger.debug("Cancel KAVA request",t);this.logger.debug("Sending KAVA event "+t.eventType+":"+e.type),this.sendAnalytics(t).catch((function(){}))}},S._handleServerResponseSuccess=function(e,t){this.logger.debug("KAVA event sent",t),this._updateSessionStartTimeModel(e)},S._handleServerResponseFailed=function(e,t){this.logger.warn("Failed to send KAVA event",t,e)},S._addBindings=function(){var e=this;this.eventManager.listen(this._timer,M.Event.TICK,(function(){return e._rateHandler.countCurrent()})),this.eventManager.listen(this._timer,M.Event.REPORT,(function(){return e._onReport()})),this.eventManager.listen(this._timer,M.Event.RESET,(function(){return e._resetSession()})),this.eventManager.listen(this.player,this.player.Event.SOURCE_SELECTED,(function(){return e._onSourceSelected()})),this.eventManager.listen(this.player,this.player.Event.ERROR,(function(t){return e._onError(t)})),this.eventManager.listen(this.player,this.player.Event.FIRST_PLAY,(function(){return e._onFirstPlay()})),this.eventManager.listen(this.player,this.player.Event.FRAG_LOADED,(function(t){return e._onFragLoaded(t)})),this.eventManager.listen(this.player,this.player.Event.MANIFEST_LOADED,(function(t){return e._onManifestLoaded(t)})),this.eventManager.listen(this.player,this.player.Event.TIMED_METADATA,(function(t){return e._onTimedMetadataLoaded(t)})),this.eventManager.listen(this.player,this.player.Event.TRACKS_CHANGED,(function(){return e._setInitialTracks()})),this.eventManager.listen(this.player,this.player.Event.PLAYING,(function(){return e._onPlaying()})),this.eventManager.listen(this.player,this.player.Event.FIRST_PLAYING,(function(){return e._onFirstPlaying()})),this.eventManager.listen(this.player,this.player.Event.SEEKING,(function(){return e._onSeeking()})),this.eventManager.listen(this.player,this.player.Event.PAUSE,(function(){return e._onPause()})),this.eventManager.listen(this.player,this.player.Event.ENDED,(function(){return e._onEnded()})),this.eventManager.listen(this.player,this.player.Event.VIDEO_TRACK_CHANGED,(function(t){return e._onVideoTrackChanged(t)})),this.eventManager.listen(this.player,this.player.Event.AUDIO_TRACK_CHANGED,(function(t){return e._onAudioTrackChanged(t)})),this.eventManager.listen(this.player,this.player.Event.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this.eventManager.listen(this.player,this.player.Event.PLAYER_STATE_CHANGED,(function(t){return e._onPlayerStateChanged(t)})),this.eventManager.listen(this.player,this.player.Event.RATE_CHANGE,(function(){return e._onPlaybackRateChanged()})),this.eventManager.listen(this.player,this.player.Event.CAN_PLAY,(function(){return e._onCanPlay()})),this.eventManager.listen(this.player,this.player.Event.LOAD_START,(function(){return e._onLoadStart()})),this.eventManager.listen(this.player,this.player.Event.VOLUME_CHANGE,(function(){return e._updateSoundModeInModel()})),this.eventManager.listen(this.player,this.player.Event.VISIBILITY_CHANGE,(function(t){return e._updateViewabilityModeInModel(t.payload.visible)})),this.eventManager.listen(this.player,this.player.Event.MUTE_CHANGE,(function(){return e._updateSoundModeInModel()})),this.eventManager.listen(this.player,this.player.Event.ENTER_FULLSCREEN,(function(){return e._model.updateModel({screenMode:p.FULLSCREEN})})),this.eventManager.listen(this.player,this.player.Event.EXIT_FULLSCREEN,(function(){return e._model.updateModel({screenMode:p.NOT_IN_FULLSCREEN})})),this.eventManager.listen(this.player,O,(function(){return e._onRelatedClicked()})),this.eventManager.listen(this.player,I,(function(){return e._onRelatedSelected()})),this._initTabMode(),this._initNetworkConnectionType()},S._onFirstPlaying=function(){this._isPlaying=!0,!this._fragLoadedFiredOnce&&this._performanceObserver&&(this._performanceObserver.disconnect(),this.logger.debug("This adapter / media doesn't fire fragLoaded - disconnect performance observer"))},S._onLoadStart=function(){this._loadStartTime=Date.now()},S._getRates=function(){var e=[];return this.player.getTracks(this.player.Track.VIDEO).forEach((function(t){return e.push(t.bandwidth/1024)})),e},S._setInitialTracks=function(){var e=this._getRates(),t=this.player.getActiveTracks();this._rateHandler.setRates(e),t.video&&this._rateHandler.setCurrent(t.video.bandwidth/1024),t.audio&&this._model.updateModel({language:t.audio.language}),t.text&&this._model.updateModel({caption:t.text.language})},S._getAvailableBuffer=function(){var e=NaN;return this.player.stats&&(e=this.player.stats.availableBuffer),e},S._getForwardBufferHealth=function(){var e=NaN,t=this._getAvailableBuffer(),n=this._getTargetBuffer();return isNaN(n)||(e=Math.round(1e3*t/n)/1e3),e},S._getTargetBuffer=function(){var e=NaN;return this.player.stats&&(e=this.player.stats.targetBuffer),e},S._getDroppedFramesRatio=function(){var e=-1,t=this._getDroppedAndDecodedFrames();if(t){var n,r,i=t[0],a=t[1];n=i-this._lastDroppedFrames,e=(r=a-this._lastTotalFrames)?Math.round(n/r*1e3)/1e3:0,this._lastTotalFrames=a,this._lastDroppedFrames=i}return e},S._getDroppedAndDecodedFrames=function(){if("function"==typeof this.player.getVideoElement().getVideoPlaybackQuality){var e=this.player.getVideoElement().getVideoPlaybackQuality();return[e.droppedVideoFrames,e.totalVideoFrames]}return"number"==typeof this.player.getVideoElement().webkitDroppedFrameCount&&"number"==typeof this.player.getVideoElement().webkitDecodedFrameCount?[this.player.getVideoElement().webkitDroppedFrameCount,this.player.getVideoElement().webkitDecodedFrameCount]:null},S._onReport=function(){this._viewEventEnabled?(this._updatePlayTimeSumModel(),this._model.updateModel({forwardBufferHealth:this._getForwardBufferHealth(),targetBuffer:this._getTargetBuffer(),droppedFramesRatio:this._getDroppedFramesRatio()}),this._sendAnalytics(E.VIEW)):this.logger.warn("VIEW event blocked because server response of viewEventsEnabled=false"),this._model.updateModel({totalSegmentsDownloadTime:0,totalSegmentsDownloadBytes:0,maxManifestDownloadTime:0,maxSegmentDownloadTime:0,maxNetworkConnectionOverhead:0,bufferTime:0})},S._updateNetworkConnectionTypeinModel=function(e){this._model.updateModel({networkConnectionType:e.effectiveType})},S._initNetworkConnectionType=function(){var e=this,t=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection;t&&(this.eventManager.listen(t,"change",(function(){return e._updateNetworkConnectionTypeinModel(t)})),this._updateNetworkConnectionTypeinModel(t))},S._onPlaying=function(){if(this._isFirstPlaying){this._updateSoundModeInModel(),this._updateViewabilityModeInModel(this.player.isVisible),this.player.isUntimedImg()||this._timer.start(),this._isFirstPlaying=!1;var e="auto"===this.player.config.playback.preload||this._isManualPreload?this._firstPlayRequestTime:this._loadStartTime;this._model.updateModel({joinTime:r._getTimeDifferenceInSeconds(e)}),this._sendAnalytics(E.PLAY),this._onReport()}else this._isEnded?(this._timer.start(),this._isEnded=!1,this._sendAnalytics(E.REPLAY)):this._isPaused&&(this._timer.resume(),this._isPaused=!1,this._sendAnalytics(E.RESUME))},S._onCanPlay=function(){this._canPlayOccured=!0,this._model.updateModel({canPlayTime:r._getTimeDifferenceInSeconds(this._loadStartTime)})},S._onFirstPlay=function(){this._canPlayOccured&&(this._isManualPreload=!0),this._isFirstPlay=!1,this._firstPlayRequestTime=Date.now(),this._sendAnalytics(E.PLAY_REQUEST)},S._onSourceSelected=function(){var e=this;this._sendAnalytics(E.IMPRESSION),this.player.isImage()||this.player.isLive()||this.eventManager.listen(this.player,this.player.Event.TIME_UPDATE,(function(){return e._onTimeUpdate()}))},S._onSeeking=function(){this._previousCurrentTime=this.player.currentTime,this._model.updateModel({targetPosition:this.player.currentTime}),this._sendAnalytics(E.SEEK)},S._onPause=function(){this._isPaused=!0,this._timer.stop(),this._sendAnalytics(E.PAUSE)},S._onEnded=function(){this._isEnded=!0,this._onTimeUpdate(),this._model.updateModel({bufferTime:0})},S._onTimeUpdate=function(){this._updatePlayTimeSumModel();var e=parseFloat((this.player.currentTime/this.player.duration).toFixed(2));!this._timePercentEvent.PLAY_REACHED_25&&e>=.25&&(this._timePercentEvent.PLAY_REACHED_25=!0,this._sendAnalytics(E.PLAY_REACHED_25_PERCENT)),!this._timePercentEvent.PLAY_REACHED_50&&e>=.5&&(this._timePercentEvent.PLAY_REACHED_50=!0,this._sendAnalytics(E.PLAY_REACHED_50_PERCENT)),!this._timePercentEvent.PLAY_REACHED_75&&e>=.75&&(this._timePercentEvent.PLAY_REACHED_75=!0,this._sendAnalytics(E.PLAY_REACHED_75_PERCENT)),this._timePercentEvent.PLAY_REACHED_100||1!==e||(this._timePercentEvent.PLAY_REACHED_100=!0,this._sendAnalytics(E.PLAY_REACHED_100_PERCENT))},S._onFragLoaded=function(e){(this._fragLoadedFiredOnce||(this._fragLoadedFiredOnce=!0),this._updateFragLoadedStats(e),this._performanceObserver)&&(this._handleFragPerformanceObserver(e.payload.url)||this._pendingFragLoadedUrls.push(e.payload.url))},S._handleFragPerformanceObserver=function(e){var t=this._performanceEntries.filter((function(t){return t.name==e})),n=t&&t.length?t[t.length-1]:null;if(n){this._updateMaxNetworkConnectionOverhead(n.connectEnd-n.domainLookupStart);var r=this._performanceEntries.indexOf(n);return r>-1&&r<this._performanceEntries.length&&(this._performanceEntries=this._performanceEntries.splice(r+1,this._performanceEntries.length-(r+1))),!0}return!1},S._updateMaxNetworkConnectionOverhead=function(e){this._model.updateModel({maxNetworkConnectionOverhead:Math.max(this._model.maxNetworkConnectionOverhead,e)})},S._updateFragLoadedStats=function(e){var t=Math.round(e.payload.miliSeconds)/1e3;this._model.updateModel({totalSegmentsDownloadTime:this._model.totalSegmentsDownloadTime+t,totalSegmentsDownloadBytes:this._model.totalSegmentsDownloadBytes+e.payload.bytes,maxSegmentDownloadTime:Math.max(t,this._model.maxSegmentDownloadTime)})},S._onManifestLoaded=function(e){var t=Math.round(e.payload.miliSeconds)/1e3;this._model.updateModel({maxManifestDownloadTime:Math.max(t,this._model.maxManifestDownloadTime)})},S._onTimedMetadataLoaded=function(e){var t=e.payload.cues.filter((function(e){return e.value&&"TEXT"===e.value.key}));if(t.length)try{this._model.updateModel({flavorParamsId:Number(JSON.parse(t[t.length-1].value.data).sequenceId)})}catch(e){this.logger.debug("error parsing id3",e)}},S._onVideoTrackChanged=function(e){var t=e.payload.selectedVideoTrack;this._rateHandler.setCurrent(t.bandwidth/1024),this.player.isAdaptiveBitrateEnabled()?this._sendAnalytics(E.FLAVOR_SWITCH):this._sendAnalytics(E.SOURCE_SELECTED)},S._onAudioTrackChanged=function(e){var t=e.payload.selectedAudioTrack;this._model.updateModel({language:t.language}),this._sendAnalytics(E.AUDIO_SELECTED)},S._onTextTrackChanged=function(e){if(this._isPlaying){var t=e.payload.selectedTextTrack;this._model.updateModel({caption:t.language}),this._sendAnalytics(E.CAPTIONS)}},S._onError=function(e){e.payload&&e.payload.severity===N.Severity.CRITICAL&&(this._model.updateModel({errorCode:e.payload.code,errorDetails:e.payload.data,errorPosition:this._isFirstPlay?_:this._isFirstPlaying?g:m}),this._sendAnalytics(E.ERROR),this.reset())},S._onPlaybackRateChanged=function(){this.player.playbackRates.length&&!this.player.playbackRates.includes(this.player.playbackRate)||this._sendAnalytics(E.SPEED)},S._onPlayerStateChanged=function(e){var t=e.payload.oldState,n=e.payload.newState;t.type===this.player.State.BUFFERING&&(this._isBuffering=!1,this._updateBufferModel(),this._sendAnalytics(E.BUFFER_END)),n.type===this.player.State.BUFFERING&&(this._isBuffering=!0,this._bufferStartTime=Date.now(),this._sendAnalytics(E.BUFFER_START))},S._onRelatedClicked=function(){this._sendAnalytics(E.RELATED_CLICKED)},S._onRelatedSelected=function(){this._sendAnalytics(E.RELATED_SELECTED)},S._updateSessionStartTimeModel=function(e){!this._model.getSessionStartTime()&&e&&("object"==typeof e?(this._model.updateModel({sessionStartTime:e.time}),this._viewEventEnabled=e.viewEventsEnabled):this._model.updateModel({sessionStartTime:e})),this._timer.isStopped()&&this._model.updateModel({sessionStartTime:null})},S._updateBufferModel=function(){var e=r._getTimeDifferenceInSeconds(this._bufferStartTime);this._model.updateModel({bufferTime:this._model.getBufferTime()+e,bufferTimeSum:this._model.getBufferTimeSum()+e})},S._updatePlayTimeSumModel=function(){var e;this.player.isLive()?e=this.config.viewEventCountdown-this._model.getBufferTime():(e=this.player.currentTime-this._previousCurrentTime,this._previousCurrentTime=this.player.currentTime),this._model.updateModel({playTimeSum:this._model.getPlayTimeSum()+e})},S._setModelDelegates=function(){var e=this;this._model.getPlaybackSpeed=function(){return e.player.playbackRate},this._model.getActualBitrate=function(){return e._rateHandler.getCurrent()},this._model.getAverageBitrate=function(){return e._rateHandler.getAverage()},this._model.getPartnerId=function(){return e.config.partnerId},this._model.getEntryId=function(){return e.config.entryId},this._model.getPlaylistId=function(){return e.config.playlistId},this._model.getSessionId=function(){return e.config.sessionId},this._model.getPersistentSessionId=function(){return e.config.persistentSessionId},this._model.getClientVer=function(){return e.config.playerVersion},this._model.getClientTag=function(){return"html5:v"+e.config.playerVersion},this._model.getKS=function(){return e.config.ks},this._model.getVirtualEventId=function(){return e.config.virtualEventId},this._model.getUIConfId=function(){return e.config.uiConfId},this._model.getReferrer=function(){return e.config.referrer},this._model.getCustomVar1=function(){return e.config.customVar1},this._model.getCustomVar2=function(){return e.config.customVar2},this._model.getCustomVar3=function(){return e.config.customVar3},this._model.getPosition=function(){return e._getPosition()},this._model.getDeliveryType=function(){return e._getDeliveryType()},this._model.getPlaybackType=function(){return e._getPlaybackType()},this._model.getPlaybackContext=function(){return e.config.playbackContext},this._model.getApplicationVersion=function(){return e.config.applicationVersion},this._model.getApplication=function(){return e.config.application},this._model.getKalturaApplicationVersion=function(){return e.config.kalturaApplicationVersion},this._model.getKalturaApplication=function(){return e._getKalturaApplicationId(e.config.kalturaApplication)},this._model.getUserId=function(){return e.config.userId}},S._getKalturaApplicationId=function(e){return e in b?b[e]:(this.logger.warn("Kava analytics - unknon kalturaAppName: "+e),"")},S._getPosition=function(){return this.player.isLive()?Number.isNaN(this.player.duration)||this.player.duration-this.player.currentTime<1?0:-(this.player.duration-this.player.currentTime):this._isFirstPlaying?this.player.currentTime||this.player.sources.startTime||0:this.player.currentTime},S._getDeliveryType=function(){return this.player.streamType===this.player.StreamType.PROGRESSIVE?"url":this.player.streamType},S._getPlaybackType=function(){if(this.player.isLive()){if(this.player.isDvr())if(this.player.duration-this.player.currentTime>=this.config.dvrThreshold)return"dvr";return"live"}return this.player.isImage()?"img":"vod"},S._validate=function(){return this.config.partnerId?!!this.config.entryId||(this._logMissingParam("entryId"),!1):(this._logMissingParam("partnerId"),!1)},S._logMissingParam=function(e){this.logger.warn("Kava analytics block report because of missing param "+e)},r._getTimeDifferenceInSeconds=function(e){return(Date.now()-e)/1e3},S._updateTabModeInModel=function(e){this._model.updateModel({tabMode:this._isTabHidden(e)&&!this.player.isInPictureInPicture()?f:h})},S._isTabHidden=function(e){return document[e]},S._initTabMode=function(){var e,t,n=this;void 0!==document.hidden?(e="hidden",t="visibilitychange"):void 0!==document.msHidden?(e="msHidden",t="msvisibilitychange"):void 0!==document.webkitHidden&&(e="webkitHidden",t="webkitvisibilitychange"),e&&t&&(this.eventManager.listen(document,t,(function(){return n._updateTabModeInModel(e)})),this._updateTabModeInModel(e))},a=r,(o=[{key:"EventType",get:function(){return k.Object.copyDeep(y)}}])&&w(a.prototype,o),T&&w(a,T),r}(r.BasePlugin);L(F,"defaultConfig",{serviceUrl:k.Http.protocol+"//analytics.kaltura.com/api_v3/index.php",requestMethod:R.GET,viewEventCountdown:10,resetSessionCountdown:30,dvrThreshold:120,playbackContext:"",applicationVersion:"",application:"",kalturaApplicationVersion:"",kalturaApplication:""});var x="1.5.4-canary.0-029a811",B="@playkit-js/playkit-js-kava";Object(r.registerPlugin)("kava",F)}]); -var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.timeline=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t){e.exports=KalturaPlayer},function(e,t,r){var n=r(2),o=r(3);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};n(o,i);e.exports=o.locals||{}},function(e,t,r){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),a=[];function u(e){for(var t=-1,r=0;r<a.length;r++)if(a[r].identifier===e){t=r;break}return t}function s(e,t){for(var r={},n=[],o=0;o<e.length;o++){var i=e[o],s=t.base?i[0]+t.base:i[0],c=r[s]||0,l="".concat(s," ").concat(c);r[s]=c+1;var p=u(l),f={css:i[1],media:i[2],sourceMap:i[3]};-1!==p?(a[p].references++,a[p].updater(f)):a.push({identifier:l,updater:v(f,t),references:1}),n.push(l)}return n}function c(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=r.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var l,p=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function f(e,t,r,n){var o=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=p(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function d(e,t,r){var n=r.css,o=r.media,i=r.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var h=null,b=0;function v(e,t){var r,n,o;if(t.singleton){var i=b++;r=h||(h=c(t)),n=f.bind(null,r,i,!1),o=f.bind(null,r,i,!0)}else r=c(t),n=d.bind(null,r,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var r=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var o=u(r[n]);a[o].references--}for(var i=s(e,t),c=0;c<r.length;c++){var l=u(r[c]);0===a[l].references&&(a[l].updater(),a.splice(l,1))}r=i}}}},function(e,t,r){(t=r(4)(!1)).push([e.i,".playkit-cue-point-container {\n position: absolute;\n height: inherit;\n padding: 12px 2px 16px 2px;\n padding: 12px 2px calc(12px + var(--progress-bar-height)) 2px;\n margin: -12px 0;\n}\n\n.playkit-cue-point-container:hover .playkit-cue-point-preview-container {\n display: block;\n}\n\n.playkit-cue-point {\n height: inherit;\n width: 2px;\n background-color: #ffffff;\n background-color: var(--white);\n transition: transform 100ms;\n}\n\n.playkit-cue-point.playkit-hover {\n transform: scale(2);\n border-radius: 1px;\n}\n\n\n.playkit-left-border-radius {\n border-radius: 4px 0 0 4px;\n border-radius: calc(2 * var(--progress-bar-border-radius)) 0 0 calc(2 * var(--progress-bar-border-radius));\n}\n\n.playkit-right-border-radius {\n border-radius: 0 4px 4px 0;\n border-radius: 0 calc(2 * var(--progress-bar-border-radius)) calc(2 * var(--progress-bar-border-radius)) 0;\n}\n\n.playkit-cue-point-preview-container {\n display: none;\n position: absolute;\n bottom: 28px;\n bottom: calc(24px + var(--progress-bar-height));\n}\n\n.playkit-seek-bar.playkit-resizing .playkit-cue-point-container {\n display: none;\n}\n",""]),e.exports=t},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var o=(a=n,u=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),s="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(u),"/*# ".concat(s," */")),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(i).concat([o]).join("\n")}var a,u,s;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var u=0;u<e.length;u++){var s=[].concat(e[u]);n&&o[s[0]]||(r&&(s[2]?s[2]="".concat(r," and ").concat(s[2]):s[2]=r),t.push(s))}},t}},function(e,t,r){"use strict";r.r(t),r.d(t,"Plugin",(function(){return G})),r.d(t,"VERSION",(function(){return Q})),r.d(t,"NAME",(function(){return X}));var n,o,i=r(0),a=(r(1),function(){if("boolean"!=typeof n){var e=document.createElement("div");e.style.setProperty("--var","none"),e.style.setProperty("display","var(--var)"),document.body.appendChild(e),n="none"===getComputedStyle(e).display,document.body.removeChild(e)}return n});function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}function h(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=i.ui,g=m.preact,k=m.redux,w=m.reducers,P=m.utils,O=m.style,S=i.core.Utils,j="playkit-cue-point-preview-container",_=k.connect((function(e){return{config:e.config.components.seekbar,duration:e.engine.duration,seekbarClientRect:e.seekbar.clientRect,hideTimeBubble:e.seekbar.hideTimeBubble,virtualTime:e.seekbar.virtualTime}}),P.bindActions(w.seekbar.actions))(o=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(u,e);var t,r,n,o=d(u);function u(){var e;l(this,u);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(b(e=o.call.apply(o,[this].concat(r))),"_setMarkerRef",(function(t){t&&(e._markerRef=t,e.setState((function(e){return{render:!e.render}})))})),e}return t=u,(r=[{key:"_getMarkerPositionStyle",value:function(){var e={left:"0",edge:"Left"};if(this._markerRef&&this.props.duration){var t=this._markerRef.getBoundingClientRect(),r=this.props.seekbarClientRect,n=t.width,o=r.width,i=(this.props.time<this.props.duration?this.props.time/this.props.duration:1)*o;i-n/2>0&&(i+n/2>o?(e.left="".concat(o-n,"px"),e.edge="Right"):(e.left="".concat(i-n/2,"px"),e.edge="none"))}return e}},{key:"_getPreviewPosition",value:function(e){var t=0;if(this._markerRef){var r=this._markerRef.getBoundingClientRect(),n=this.props.seekbarClientRect,o=r.left-n.left,i=r.width,a=o+i,u=n.width,s=(e-i)/2;t=o-s>0?a+s>u?-(e-(u-o)):-s:-o}return t}},{key:"onMarkerMouseOver",value:function(){this.setState({hover:!0}),this.props.preview.get&&this.props.updateHideSeekbarPreview(!0),!this.props.hideTimeBubble&&this.props.preview.hideTime&&(this._hideTimeBubble=!0,this.props.updateHideSeekbarTimeBubble(!0))}},{key:"onMarkerMouseLeave",value:function(){this.setState({hover:!1}),this.props.updateHideSeekbarPreview(!1),this._hideTimeBubble&&(this._hideTimeBubble=!1,this.props.updateHideSeekbarTimeBubble(!1))}},{key:"onPreviewMouseOver",value:function(){this.props.updateSeekbarPreviewHoverActive(!0)}},{key:"onPreviewMouseLeave",value:function(){this.props.updateSeekbarPreviewHoverActive(!1)}},{key:"componentDidMount",value:function(){this._hideTimeBubble=!1}},{key:"componentWillUnmount",value:function(){this.props.updateHideSeekbarPreview(!1),this._hideTimeBubble&&this.props.updateHideSeekbarTimeBubble(!1)}},{key:"render",value:function(e){var t=this,r=e.marker,n=e.preview,o=e.virtualTime,u=e.config,s=this._getMarkerPositionStyle(),l=s.edge,p={left:s.left};"none"!==l&&(p["padding".concat(l)]=0),a()&&S.Object.mergeDeep(p,{"--white":O.white,"--progress-bar-height":O.progressBarHeight,"--progress-bar-border-radius":O.progressBarBorderRadius});var f={backgroundColor:r.color,width:r.width},d=["playkit-cue-point",this.state.hover?O.hover:"","none"!==l?"playkit-".concat(l.toLowerCase(),"-border-radius"):""],h={className:(r.className?[].concat(d,[r.className]):d).join(" "),style:r.props?c(c({},f),r.props.style):f};h=c(c({},r.props),h);var b=n.width||r.width,v=n.height||r.height,y={width:"".concat(b,"px"),height:"".concat(v,"px")},m={style:n.props?c(c({},y),n.props.style):y};return n.className&&(m.className=n.className),m=c(c(c({},n.props),m),{},{defaultPreviewProps:{virtualTime:o,thumbsSlices:u.thumbsSlices,thumbsWidth:u.thumbsWidth,thumbsSprite:u.thumbsSprite}}),i.ui.h("div",{onMouseOver:function(){return t.onMarkerMouseOver()},onMouseLeave:function(){return t.onMarkerMouseLeave()},className:"playkit-cue-point-container",style:p,ref:this._setMarkerRef},r.get?g.h(r.get,h):i.ui.h("div",{style:f,className:[].concat(d,[r.className]).join(" ")}),this._markerRef&&n.get?i.ui.h("div",{onMouseOver:function(){return t.onPreviewMouseOver()},onMouseLeave:function(){return t.onPreviewMouseLeave()},className:!1===n.sticky?[j,O.nonSticky].join(" "):j,style:{left:"".concat(this._getPreviewPosition(b),"px")}},g.h(n.get,m)):void 0)}}])&&p(t.prototype,r),n&&p(t,n),u}(g.Component))||o;function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){R(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}_.displayName="CuePoint";var T=i.ui,B=T.preact,N=T.redux,E=T.reducers,H=T.style,D=E.seekbar.actions,L=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._uiManager=t.ui,this._logger=r,this._store=N.useStore(),this._cuePointsRemoveMap={},this._counter=0}var t,r,n;return t=e,(r=[{key:"addCuePoint",value:function(e){if(this._store.getState().engine.isLive)return this._logger.warn("Impossible to add cue points while LIVE playback"),null;if(!e||"number"!=typeof e.time)return this._logger.warn("Cue point time is missing"),null;var t=(this._counter++).toString();return this._cuePointsRemoveMap[t]=this._uiManager.addComponent({label:"Cue Point - ".concat(t),presets:e.presets||[this._store.getState().shell.activePresetName],area:"SeekBar",get:_,props:{time:e.time,marker:e.marker||{},preview:e.preview||{}}}),{id:t}}},{key:"removeCuePoint",value:function(e){var t=e.id;"function"==typeof this._cuePointsRemoveMap[t]&&this._cuePointsRemoveMap[t]()}},{key:"setSeekbarPreview",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.presets||[this._store.getState().shell.activePresetName],n={width:"".concat(t.width||H.framePreviewImgWidth,"px"),height:"".concat(t.height||H.framePreviewImgHeight,"px")},o=this._uiManager.addComponent({label:"SeekBar Preview",presets:r,area:"SeekBar",get:t.get?function(r){var o=x(x({},t.props),{},{className:t.className,style:t.props?x(x({},n),t.props.style):n});return"string"!=typeof t.get&&(o.defaultPreviewProps=r.replacedComponentProps),i.ui.h("div",{className:!1===t.sticky?H.nonSticky:void 0,onMouseOver:function(){e._store.dispatch(D.updateSeekbarPreviewHoverActive(!0))},onMouseLeave:function(){e._store.dispatch(D.updateSeekbarPreviewHoverActive(!1))}},B.h(t.get,o))}:void 0,replaceComponent:"SeekBarPreview"});return this._store.dispatch(D.updateHideSeekbarTimeBubble(!1)),t.hideTime&&this._store.dispatch(D.updateHideSeekbarTimeBubble(!0)),function(){o(),e._store.dispatch(D.updateHideSeekbarTimeBubble(!1))}}},{key:"reset",value:function(){this._removeAllCuePoints()}},{key:"destroy",value:function(){this._removeAllCuePoints()}},{key:"_removeAllCuePoints",value:function(){Object.values(this._cuePointsRemoveMap).forEach((function(e){return e()}))}}])&&C(t.prototype,r),n&&C(t,n),e}();function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function U(e,t,r){return t&&I(e.prototype,t),r&&I(e,r),e}function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=F(e);if(t){var o=F(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return W(this,r)}}function W(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var J=i.ui.style,q=i.core.Utils,z=null,G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&K(e,t)}(r,e);var t=V(r);function r(e,n,o){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=t.call(this,e,n,o)).player.registerService("timeline",new L(i.player,i.logger)),i}return U(r,null,[{key:"isValid",value:function(){return!0}}]),U(r,[{key:"ready",get:function(){var e=this;return a()?Promise.resolve():(z||(z=q.Dom.loadScriptAsync("https://cdn.jsdelivr.net/npm/css-vars-ponyfill").then((function(){cssVars({variables:{white:J.white,"progress-bar-height":J.progressBarHeight,"progress-bar-border-radius":J.progressBarBorderRadius}})})).catch((function(){e.logger.warn("Failed to load css-vars-ponyfill lib from ".concat("https://cdn.jsdelivr.net/npm/css-vars-ponyfill"))}))),z)}}]),r}(i.BasePlugin),Q="3.0.1-canary.0-8716f82",X="@playkit-js/playkit-js-timeline";Object(i.registerPlugin)("timeline",G)}]); +var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.timeline=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=5)}([function(e,t){e.exports=KalturaPlayer},function(e,t,r){var n=r(2),o=r(3);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};n(o,i);e.exports=o.locals||{}},function(e,t,r){"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),a=[];function u(e){for(var t=-1,r=0;r<a.length;r++)if(a[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},n=[],o=0;o<e.length;o++){var i=e[o],c=t.base?i[0]+t.base:i[0],s=r[c]||0,l="".concat(c," ").concat(s);r[c]=s+1;var p=u(l),f={css:i[1],media:i[2],sourceMap:i[3]};-1!==p?(a[p].references++,a[p].updater(f)):a.push({identifier:l,updater:v(f,t),references:1}),n.push(l)}return n}function s(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var o=r.nc;o&&(n.nonce=o)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=i(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(t)}return t}var l,p=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function f(e,t,r,n){var o=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=p(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function d(e,t,r){var n=r.css,o=r.media,i=r.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var h=null,b=0;function v(e,t){var r,n,o;if(t.singleton){var i=b++;r=h||(h=s(t)),n=f.bind(null,r,i,!1),o=f.bind(null,r,i,!0)}else r=s(t),n=d.bind(null,r,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<r.length;n++){var o=u(r[n]);a[o].references--}for(var i=c(e,t),s=0;s<r.length;s++){var l=u(r[s]);0===a[l].references&&(a[l].updater(),a.splice(l,1))}r=i}}}},function(e,t,r){(t=r(4)(!1)).push([e.i,".playkit-cue-point-container {\n position: absolute;\n height: inherit;\n padding: 12px 2px 16px 2px;\n padding: 12px 2px calc(12px + var(--progress-bar-height)) 2px;\n margin: -12px 0;\n}\n\n.playkit-cue-point-container:hover .playkit-cue-point-preview-container {\n display: block;\n}\n\n.playkit-cue-point {\n height: inherit;\n width: 2px;\n background-color: #ffffff;\n background-color: var(--white);\n transition: transform 100ms;\n}\n\n.playkit-cue-point.playkit-hover {\n transform: scale(2);\n border-radius: 1px;\n}\n\n\n.playkit-left-border-radius {\n border-radius: 4px 0 0 4px;\n border-radius: calc(2 * var(--progress-bar-border-radius)) 0 0 calc(2 * var(--progress-bar-border-radius));\n}\n\n.playkit-right-border-radius {\n border-radius: 0 4px 4px 0;\n border-radius: 0 calc(2 * var(--progress-bar-border-radius)) calc(2 * var(--progress-bar-border-radius)) 0;\n}\n\n.playkit-cue-point-preview-container {\n display: none;\n position: absolute;\n bottom: 28px;\n bottom: calc(24px + var(--progress-bar-height));\n}\n\n.playkit-seek-bar.playkit-resizing .playkit-cue-point-container {\n display: none;\n}\n",""]),e.exports=t},function(e,t,r){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"==typeof btoa){var o=(a=n,u=btoa(unescape(encodeURIComponent(JSON.stringify(a)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(u),"/*# ".concat(c," */")),i=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(i).concat([o]).join("\n")}var a,u,c;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(o[a]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&o[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),t.push(c))}},t}},function(e,t,r){"use strict";r.r(t),r.d(t,"Plugin",(function(){return G})),r.d(t,"VERSION",(function(){return Q})),r.d(t,"NAME",(function(){return X}));var n,o,i=r(0),a=(r(1),function(){if("boolean"!=typeof n){var e=document.createElement("div");e.style.setProperty("--var","none"),e.style.setProperty("display","var(--var)"),document.body.appendChild(e),n="none"===getComputedStyle(e).display,document.body.removeChild(e)}return n});function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return h(this,r)}}function h(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?b(e):t}function b(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var m=i.ui,g=m.preact,k=m.redux,w=m.reducers,P=m.utils,O=m.style,S=i.core.Utils,j="playkit-cue-point-preview-container",_=k.connect((function(e){return{config:e.config.components.seekbar,duration:e.engine.duration,seekbarClientRect:e.seekbar.clientRect,hideTimeBubble:e.seekbar.hideTimeBubble,virtualTime:e.seekbar.virtualTime}}),P.bindActions(w.seekbar.actions))(o=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(u,e);var t,r,n,o=d(u);function u(){var e;l(this,u);for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(b(e=o.call.apply(o,[this].concat(r))),"_setMarkerRef",(function(t){t&&(e._markerRef=t,e.setState((function(e){return{render:!e.render}})))})),e}return t=u,(r=[{key:"_getMarkerPositionStyle",value:function(){var e={left:"0",edge:"Left"};if(this._markerRef&&this.props.duration){var t=this._markerRef.getBoundingClientRect(),r=this.props.seekbarClientRect,n=t.width,o=r.width,i=(this.props.time<this.props.duration?this.props.time/this.props.duration:1)*o;i-n/2>0&&(i+n/2>o?(e.left="".concat(o-n,"px"),e.edge="Right"):(e.left="".concat(i-n/2,"px"),e.edge="none"))}return e}},{key:"_getPreviewPosition",value:function(e){var t=0;if(this._markerRef){var r=this._markerRef.getBoundingClientRect(),n=this.props.seekbarClientRect,o=r.left-n.left,i=r.width,a=o+i,u=n.width,c=(e-i)/2;t=o-c>0?a+c>u?-(e-(u-o)):-c:-o}return t}},{key:"onMarkerMouseOver",value:function(){this.setState({hover:!0}),this.props.preview.get&&this.props.updateHideSeekbarPreview(!0),!this.props.hideTimeBubble&&this.props.preview.hideTime&&(this._hideTimeBubble=!0,this.props.updateHideSeekbarTimeBubble(!0))}},{key:"onMarkerMouseLeave",value:function(){this.setState({hover:!1}),this.props.updateHideSeekbarPreview(!1),this._hideTimeBubble&&(this._hideTimeBubble=!1,this.props.updateHideSeekbarTimeBubble(!1))}},{key:"onPreviewMouseOver",value:function(){this.props.updateSeekbarPreviewHoverActive(!0)}},{key:"onPreviewMouseLeave",value:function(){this.props.updateSeekbarPreviewHoverActive(!1)}},{key:"componentDidMount",value:function(){this._hideTimeBubble=!1}},{key:"componentWillUnmount",value:function(){this.props.updateHideSeekbarPreview(!1),this._hideTimeBubble&&this.props.updateHideSeekbarTimeBubble(!1)}},{key:"render",value:function(e){var t=this,r=e.marker,n=e.preview,o=e.virtualTime,u=e.config,c=this._getMarkerPositionStyle(),l=c.edge,p={left:c.left};"none"!==l&&(p["padding".concat(l)]=0),a()&&S.Object.mergeDeep(p,{"--white":O.white,"--progress-bar-height":O.progressBarHeight,"--progress-bar-border-radius":O.progressBarBorderRadius});var f={backgroundColor:r.color,width:r.width},d=["playkit-cue-point",this.state.hover?O.hover:"","none"!==l?"playkit-".concat(l.toLowerCase(),"-border-radius"):""],h={className:(r.className?[].concat(d,[r.className]):d).join(" "),style:r.props?s(s({},f),r.props.style):f};h=s(s({},r.props),h);var b=n.width||r.width,v=n.height||r.height,y={width:"".concat(b,"px"),height:"".concat(v,"px")},m={style:n.props?s(s({},y),n.props.style):y};return n.className&&(m.className=n.className),m=s(s(s({},n.props),m),{},{defaultPreviewProps:{virtualTime:o,thumbsSlices:u.thumbsSlices,thumbsWidth:u.thumbsWidth,thumbsSprite:u.thumbsSprite}}),i.ui.h("div",{onMouseOver:function(){return t.onMarkerMouseOver()},onMouseLeave:function(){return t.onMarkerMouseLeave()},className:"playkit-cue-point-container",style:p,ref:this._setMarkerRef},r.get?g.h(r.get,h):i.ui.h("div",{style:f,className:[].concat(d,[r.className]).join(" ")}),this._markerRef&&n.get?i.ui.h("div",{onMouseOver:function(){return t.onPreviewMouseOver()},onMouseLeave:function(){return t.onPreviewMouseLeave()},className:!1===n.sticky?[j,O.nonSticky].join(" "):j,style:{left:"".concat(this._getPreviewPosition(b),"px")}},g.h(n.get,m)):void 0)}}])&&p(t.prototype,r),n&&p(t,n),u}(g.Component))||o;function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach((function(t){R(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function R(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}_.displayName="CuePoint";var T=i.ui,B=T.preact,N=T.redux,E=T.reducers,H=T.style,D=E.seekbar.actions,L=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._uiManager=t.ui,this._logger=r,this._store=N.useStore(),this._cuePointsRemoveMap={},this._counter=0}var t,r,n;return t=e,(r=[{key:"addCuePoint",value:function(e){if(this._store.getState().engine.isLive)return this._logger.warn("Impossible to add cue points while LIVE playback"),null;if(!e||"number"!=typeof e.time)return this._logger.warn("Cue point time is missing"),null;var t=(this._counter++).toString();return this._cuePointsRemoveMap[t]=this._uiManager.addComponent({label:"Cue Point - ".concat(t),presets:e.presets||[this._store.getState().shell.activePresetName],area:"SeekBar",get:_,props:{time:e.time,marker:e.marker||{},preview:e.preview||{}}}),{id:t}}},{key:"removeCuePoint",value:function(e){var t=e.id;"function"==typeof this._cuePointsRemoveMap[t]&&this._cuePointsRemoveMap[t]()}},{key:"setSeekbarPreview",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.presets||[this._store.getState().shell.activePresetName],n={width:"".concat(t.width||H.framePreviewImgWidth,"px"),height:"".concat(t.height||H.framePreviewImgHeight,"px")},o=this._uiManager.addComponent({label:"SeekBar Preview",presets:r,area:"SeekBar",get:t.get?function(r){var o=x(x({},t.props),{},{className:t.className,style:t.props?x(x({},n),t.props.style):n});return"string"!=typeof t.get&&(o.defaultPreviewProps=r.replacedComponentProps),i.ui.h("div",{className:!1===t.sticky?H.nonSticky:void 0,onMouseOver:function(){e._store.dispatch(D.updateSeekbarPreviewHoverActive(!0))},onMouseLeave:function(){e._store.dispatch(D.updateSeekbarPreviewHoverActive(!1))}},B.h(t.get,o))}:void 0,replaceComponent:"SeekBarPreview"});return this._store.dispatch(D.updateHideSeekbarTimeBubble(!1)),t.hideTime&&this._store.dispatch(D.updateHideSeekbarTimeBubble(!0)),function(){o(),e._store.dispatch(D.updateHideSeekbarTimeBubble(!1))}}},{key:"reset",value:function(){this._removeAllCuePoints()}},{key:"destroy",value:function(){this._removeAllCuePoints()}},{key:"_removeAllCuePoints",value:function(){Object.values(this._cuePointsRemoveMap).forEach((function(e){return e()}))}}])&&C(t.prototype,r),n&&C(t,n),e}();function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function U(e,t,r){return t&&I(e.prototype,t),r&&I(e,r),e}function K(e,t){return(K=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=F(e);if(t){var o=F(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return W(this,r)}}function W(e,t){return!t||"object"!==A(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function F(e){return(F=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var J=i.ui.style,q=i.core.Utils,z=null,G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&K(e,t)}(r,e);var t=V(r);function r(e,n,o){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),(i=t.call(this,e,n,o)).player.registerService("timeline",new L(i.player,i.logger)),i}return U(r,null,[{key:"isValid",value:function(){return!0}}]),U(r,[{key:"ready",get:function(){var e=this;return a()?Promise.resolve():(z||(z=q.Dom.loadScriptAsync("https://cdn.jsdelivr.net/npm/css-vars-ponyfill").then((function(){cssVars({variables:{white:J.white,"progress-bar-height":J.progressBarHeight,"progress-bar-border-radius":J.progressBarBorderRadius}})})).catch((function(){e.logger.warn("Failed to load css-vars-ponyfill lib from ".concat("https://cdn.jsdelivr.net/npm/css-vars-ponyfill"))}))),z)}}]),r}(i.BasePlugin),Q="3.0.2-canary.0-e1d3c0c",X="@playkit-js/playkit-js-timeline";Object(i.registerPlugin)("timeline",G)}]); -(()=>{"use strict";var e,t,n={720:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.A11yWrapper=t.isKeyboardEvent=void 0;var o=n(522),r=n(52).ui.utils.KeyMap,i=r.ENTER,a=r.SPACE,s=r.UP,p=r.DOWN,c=r.LEFT,l=r.RIGHT,u=function(e){e.preventDefault(),e.stopPropagation()};t.isKeyboardEvent=function(e){return e instanceof KeyboardEvent||[e.offsetX,e.offsetY].every((function(e){return 0===e}))},t.A11yWrapper=function(e){var n=e.children,r=e.onClick,d=e.onUpKeyPressed,f=e.onDownKeyPressed,h=e.onLeftKeyPressed,y=e.onRightKeyPressed,v=e.role,m=e.type,g={onKeyDown:function(e){e.keyCode===a||e.keyCode===i?(u(e),r(e,!0)):e.keyCode===s&&d?(u(e),d(e)):e.keyCode===p&&f?(u(e),f(e)):e.keyCode===c&&h?(u(e),h(e)):e.keyCode===l&&y&&(u(e),y(e))},onClick:function(e){e.stopPropagation(),r(e,(0,t.isKeyboardEvent)(e))},role:v};return"button"===n.type&&(g.type=m||"button"),(0,o.cloneElement)(n,g)},t.A11yWrapper.defaultProps={role:"button"}},499:(e,t,n)=>{n.d(t,{Mk:()=>s,ZP:()=>c,uj:()=>p});var o=n(537),r=n.n(o),i=n(645),a=n.n(i)()(r());a.push([e.id,".playkit-side-panel-wrapper_Wr{visibility:hidden;position:absolute;width:100%;height:100%}.playkit-active-state_vh{visibility:visible}","",{version:3,sources:["webpack://./src/services/side-panels-manager/ui/panel-item-wrapper/panel-item-wrapper.component.scss"],names:[],mappings:"AAAA,+BAAoB,iBAAiB,CAAC,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,yBAAc,kBAAkB",sourcesContent:[".side-panel-wrapper{visibility:hidden;position:absolute;width:100%;height:100%}.active-state{visibility:visible}"],sourceRoot:""}]);var s="playkit-side-panel-wrapper_Wr",p="playkit-active-state_vh";const c=a},477:(e,t,n)=>{n.d(t,{A:()=>s,Z:()=>p});var o=n(537),r=n.n(o),i=n(645),a=n.n(i)()(r());a.push([e.id,".playkit-right-upper-bar-wrapper-container_Vm{direction:ltr;display:flex}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/displayed-bar/displayed-bar.component.scss"],names:[],mappings:"AAAA,8CAAmC,aAAa,CAAC,YAAY",sourcesContent:[".right-upper-bar-wrapper-container{direction:ltr;display:flex}"],sourceRoot:""}]);var s="playkit-right-upper-bar-wrapper-container_Vm";const p=a},206:(e,t,n)=>{n.d(t,{ZP:()=>u,_h:()=>l,mB:()=>p,pU:()=>s,qv:()=>c});var o=n(537),r=n.n(o),i=n(645),a=n.n(i)()(r());a.push([e.id,".playkit-more-dropdown_SJ{position:absolute;padding:8px 4px;width:166px;background-color:var(--playkit-tone-7-color);border-radius:4px;top:44px;right:0}.playkit-more-dropdown_SJ .playkit-dropdown-item_Aq{border-radius:4px;padding:4px 12px 4px 15px;display:flex;margin:4px 0;cursor:pointer}.playkit-more-dropdown_SJ .playkit-dropdown-item_Aq .playkit-icon_h_{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.playkit-more-dropdown_SJ .playkit-dropdown-item_Aq:hover{background-color:var(--playkit-tone-6-color)}.playkit-more-dropdown_SJ .playkit-dropdown-item_Aq .playkit-dropdown-item-description_rC{display:flex;flex:1;font-size:14px;font-weight:700;align-items:center;padding-left:11px}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/dropdown-bar/dropdown-bar.component.scss"],names:[],mappings:"AAAA,0BAAe,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC,4CAA4C,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,oDAA8B,iBAAiB,CAAC,yBAAyB,CAAC,YAAY,CAAC,YAAY,CAAC,cAAc,CAAC,qEAAoC,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,0DAAoC,4CAA4C,CAAC,0FAAyD,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,kBAAkB,CAAC,iBAAiB",sourcesContent:[".more-dropdown{position:absolute;padding:8px 4px;width:166px;background-color:var(--playkit-tone-7-color);border-radius:4px;top:44px;right:0}.more-dropdown .dropdown-item{border-radius:4px;padding:4px 12px 4px 15px;display:flex;margin:4px 0;cursor:pointer}.more-dropdown .dropdown-item .icon{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.more-dropdown .dropdown-item:hover{background-color:var(--playkit-tone-6-color)}.more-dropdown .dropdown-item .dropdown-item-description{display:flex;flex:1;font-size:14px;font-weight:700;align-items:center;padding-left:11px}"],sourceRoot:""}]);var s="playkit-more-dropdown_SJ",p="playkit-dropdown-item_Aq",c="playkit-icon_h_",l="playkit-dropdown-item-description_rC";const u=a},324:(e,t,n)=>{n.d(t,{W:()=>s,Z:()=>p});var o=n(537),r=n.n(o),i=n(645),a=n.n(i)()(r());a.push([e.id,".playkit-more-icon_fR{margin-right:0;z-index:2}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/more-icon/more-icon.component.scss"],names:[],mappings:"AAAA,sBAAW,cAAc,CAAC,SAAS",sourcesContent:[".more-icon{margin-right:0;z-index:2}"],sourceRoot:""}]);var s="playkit-more-icon_fR";const p=a},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var p=this[s][0];null!=p&&(a[p]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);o&&a[l[0]]||(void 0!==i&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=i),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),r&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=r):l[4]="".concat(r)),t.push(l))}},t}},537:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */");return[t].concat([i]).join("\n")}return[t].join("\n")}},767:(e,t,n)=>{n.r(t),n.d(t,{activeState:()=>y.uj,default:()=>m,sidePanelWrapper:()=>y.Mk});var o=n(379),r=n.n(o),i=n(795),a=n.n(i),s=n(569),p=n.n(s),c=n(565),l=n.n(c),u=n(216),d=n.n(u),f=n(589),h=n.n(f),y=n(499),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),r()(y.ZP,v);const m=y.ZP&&y.ZP.locals?y.ZP.locals:void 0},611:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,rightUpperBarWrapperContainer:()=>y.A});var o=n(379),r=n.n(o),i=n(795),a=n.n(i),s=n(569),p=n.n(s),c=n(565),l=n.n(c),u=n(216),d=n.n(u),f=n(589),h=n.n(f),y=n(477),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),r()(y.Z,v);const m=y.Z&&y.Z.locals?y.Z.locals:void 0},23:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,dropdownItem:()=>y.mB,dropdownItemDescription:()=>y._h,icon:()=>y.qv,moreDropdown:()=>y.pU});var o=n(379),r=n.n(o),i=n(795),a=n.n(i),s=n(569),p=n.n(s),c=n(565),l=n.n(c),u=n(216),d=n.n(u),f=n(589),h=n.n(f),y=n(206),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),r()(y.ZP,v);const m=y.ZP&&y.ZP.locals?y.ZP.locals:void 0},781:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,moreIcon:()=>y.W});var o=n(379),r=n.n(o),i=n(795),a=n.n(i),s=n(569),p=n.n(s),c=n(565),l=n.n(c),u=n(216),d=n.n(u),f=n(589),h=n.n(f),y=n(324),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),r()(y.Z,v);const m=y.Z&&y.Z.locals?y.Z.locals:void 0},379:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var i={},a=[],s=0;s<e.length;s++){var p=e[s],c=o.base?p[0]+o.base:p[0],l=i[c]||0,u="".concat(c," ").concat(l);i[c]=l+1;var d=n(u),f={css:p[1],media:p[2],sourceMap:p[3],supports:p[4],layer:p[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var h=r(f,o);o.byIndex=s,t.splice(s,0,{identifier:u,updater:h,references:1})}a.push(u)}return a}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var i=o(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var s=n(i[a]);t[s].references--}for(var p=o(e,r),c=0;c<i.length;c++){var l=n(i[c]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}i=p}}},569:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},321:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ItemWrapper=void 0;var o=n(522),r=n(837),i=function(){function e(t,n,o){if(this.id=++e.nextId,this.item=t,this.player=n,this.upperBarManager=this.player.getService("upperBarManager"),this.isActive=!1,this.injectPanelComponent(),t.iconComponent){var r=this.id;this.iconId=this.upperBarManager.add({label:this.item.label,svgIcon:this.item.iconComponent.svgIcon,onClick:function(){return o(r)},component:this.item.iconComponent.component})}}return e.prototype.activate=function(){var e,t,n=this;this.panelItemComponentRef.current?(this.panelItemComponentRef.current.on(),null===(t=(e=this.item).onActivate)||void 0===t||t.call(e),this.isActive=!0):setTimeout((function(){return n.activate()}))},e.prototype.deactivate=function(e){var t,n;void 0===e&&(e=!1),this.panelItemComponentRef.current.off(e),null===(n=(t=this.item).onDeactivate)||void 0===n||n.call(t),this.isActive=!1},e.prototype.remove=function(){var e;this.removePanelComponentFn(),(null===(e=this.item.iconComponent)||void 0===e?void 0:e.component)&&this.upperBarManager.remove(this.iconId)},e.prototype.update=function(){this.panelItemComponentRef.current.forceUpdate()},e.prototype.injectPanelComponent=function(){var t=this,n=this.item,i=n.label,a=n.position,s=n.panelComponent,p=n.presets,c=s,l=(0,o.createRef)();this.panelItemComponentRef=l,this.removePanelComponentFn=this.player.ui.addComponent({label:"Side-panel-".concat(a,"-").concat(i),presets:p,area:e.getPanelArea(a),get:function(){return(0,o.h)(r.PanelItemWrapper,{ref:l},(0,o.h)(c,{isActive:t.isActive}))}})},e.getPanelArea=function(e){return"SidePanel".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))},e.nextId=0,e}();t.ItemWrapper=i},682:function(e,t,n){var o,r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.SidePanelsManager=void 0;var i=n(52),a=n(321),s=i.ui.SidePanelModes,p=i.ui.SidePanelPositions,c=i.ui.ReservedPresetNames,l=((o={})[p.TOP]=p.BOTTOM,o[p.BOTTOM]=p.TOP,o[p.RIGHT]=p.LEFT,o[p.LEFT]=p.RIGHT,o),u=function(){function e(e,t){this.player=e,this.activePanels={top:null,bottom:null,right:null,left:null},this.componentsRegistry=new Map,this.logger=t}return e.prototype.add=function(t){var n=this;if(e.validateItem(t)){var o=new a.ItemWrapper(t,this.player,(function(e){return n.toggle(e)}));return this.componentsRegistry.set(o.id,o),this.logger.debug("New Panel Item Added",t),o.id}this.logger.warn("Invalid SidePanelItem parameters",t)},e.prototype.remove=function(e){var t=this.componentsRegistry.get(e);t?(this.isItemActive(e)&&this.deactivateItem(e),t.remove(),this.componentsRegistry.delete(e)):this.logger.warn("".concat(e," is not registered"))},e.prototype.activateItem=function(t){var n=this.componentsRegistry.get(t);if(n){var o=n.item,r=o.position,i=o.expandMode;if(this.isItemActive(t))return;var a=this.activePanels[r];null!==a&&a.deactivate(!0);var s=e.getCounterPanelPosition(r);this.activePanels[s]&&this.deactivateItem(this.activePanels[s].id),n.activate(),this.expand(r,i),this.activePanels[r]=n}else this.logger.warn("".concat(t," is not registered"))},e.prototype.deactivateItem=function(e){var t=this.componentsRegistry.get(e);if(t){if(!this.isItemActive(e))return;var n=t.item.position;t.deactivate(),this.collapse(n),this.activePanels[n]=null}else this.logger.warn("".concat(e," is not registered"))},e.prototype.isItemActive=function(e){var t,n=this.componentsRegistry.get(e);return n?(null===(t=this.activePanels[n.item.position])||void 0===t?void 0:t.id)===e:(this.logger.warn("".concat(e," is not registered")),!1)},e.prototype.update=function(e){var t=this.componentsRegistry.get(e);t?t.update():this.logger.warn("".concat(e," is not registered"))},e.prototype.reset=function(){this.logger.debug("reset")},e.prototype.destroy=function(){this.logger.debug("destroy"),this.removeAllItems()},e.prototype.removeAllItems=function(){var e,t;try{for(var n=r(this.componentsRegistry.values()),o=n.next();!o.done;o=n.next()){var i=o.value;this.remove(i.id)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.toggle=function(e){this.isItemActive(e)?this.deactivateItem(e):this.activateItem(e)},e.prototype.expand=function(e,t){this.player.ui.store.dispatch(i.ui.reducers.shell.actions.updateSidePanelMode(e,t))},e.prototype.collapse=function(e){this.player.ui.store.dispatch(i.ui.reducers.shell.actions.updateSidePanelMode(e,s.HIDDEN))},e.getCounterPanelPosition=function(e){return l[e]},e.validateItem=function(e){var t=e.label,n=e.panelComponent,o=e.iconComponent,r=e.position,i=e.expandMode,a=e.onActivate,l=e.onDeactivate,u=e.presets;return!(!(t&&Object.values(p).includes(r)&&Object.values(s).includes(i)&&u.every((function(e){return Object.values(c).includes(e)}))&&"function"==typeof n&&("function"==typeof(null==o?void 0:o.component)&&"string"==typeof(null==o?void 0:o.svgIcon.path)||void 0===o))||"function"!=typeof a&&void 0!==a||"function"!=typeof l&&void 0!==l)},e}();t.SidePanelsManager=u},837:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PanelItemWrapper=void 0;var i=n(522),a=n(767),s=n(52).ui.style.defaultTransitionTime,p=function(e){function t(){var t=e.call(this)||this;return t.state={on:!1},t.switchMode=!1,t}return r(t,e),t.prototype.on=function(){this.setState({on:!0})},t.prototype.off=function(e){this.switchMode=e,this.setState({on:!1})},t.prototype.render=function(){return(0,i.h)("div",{className:[a.sidePanelWrapper,this.state.on?a.activeState:""].join(" "),style:this.state.on||this.switchMode?"":{transition:"visibility ".concat(s,"ms")}},(0,i.cloneElement)(this.props.children))},t}(i.Component);t.PanelItemWrapper=p},183:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IconModel=void 0;var o=n(522),r=function(){function e(t){this.id=++e.nextId,this.label=t.label,this.component=t.component,this.svgIcon=t.svgIcon,this.onClick=t.onClick,this.componentRef=(0,o.createRef)()}return e.prototype.update=function(){this.componentRef.current.forceUpdate()},e.nextId=0,e}();t.IconModel=r},328:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.DisplayedBar=void 0;var a=n(522),s=n(883),p=n(611),c=n(52),l=n(951),u=c.ui.Components.PLAYER_SIZE,d=c.ui.redux.connect,f=function(e){return{playerSize:e.shell.playerSize}},h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=function(){t.forceUpdate()},t}return r(t,e),t.prototype.splitControlsIntoDisplayedAndDropdown=function(){switch(this.props.playerSize){case u.TINY:return{displayedControls:[],dropdownControls:[]};case u.EXTRA_SMALL:case u.SMALL:return this.splitControls(2);default:return this.splitControls(4)}},t.prototype.splitControls=function(e){var t,n,o=this.props.getControls();return o.length>e+1?(t=o.slice(0,e),n=o.slice(e)):(t=o,n=[]),{displayedControls:t,dropdownControls:n}},t.prototype.render=function(){var e=this.splitControlsIntoDisplayedAndDropdown(),t=e.displayedControls,n=e.dropdownControls;return(0,a.h)("div",{className:p.rightUpperBarWrapperContainer},t.map((function(e){var t=e.id,n=e.component,o=e.onClick,r=e.componentRef,i=n;return(0,a.h)(s.IconWrapper,{key:t,onClick:o,ref:r},(0,a.h)(i,null))})),n.length>0&&(0,a.h)(l.MoreIcon,{icons:n}))},i([d(f,null,null,{forwardRef:!0})],t)}(a.Component);t.DisplayedBar=h},174:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DropdownBar=void 0;var i=n(522),a=n(23),s=n(52),p=n(720),c=s.ui.Components.Icon,l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this;return(0,i.h)("div",{className:a.moreDropdown,role:"menu","aria-expanded":"true"},this.props.controls.map((function(t,n){var o=t.id,r=t.label,s=t.svgIcon,l=t.onClick;return(0,i.h)(i.Fragment,{key:o},(0,i.h)(p.A11yWrapper,{onClick:function(t){l(t),e.props.onDropdownClick()},role:"menuitem"},(0,i.h)("div",{className:a.dropdownItem,tabIndex:0,"aria-label":r},(0,i.h)("div",{className:a.icon},(0,i.h)(c,{id:"icon".concat(n),path:s.path,viewBox:s.viewBox})),(0,i.h)("span",{className:a.dropdownItemDescription},r))))})))},t}(i.Component);t.DropdownBar=l},883:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.IconWrapper=void 0;var i=n(522),a=n(52).ui.utils.KeyMap,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.handleOnKeyDown=function(e){e.keyCode!==a.ENTER&&e.keyCode!==a.SPACE||(e.preventDefault(),this.props.onClick(e))},t.prototype.render=function(){var e=this;return(0,i.h)("div",{onClick:this.props.onClick,onKeyDown:function(t){return e.handleOnKeyDown(t)}},(0,i.cloneElement)(this.props.children))},t}(i.Component);t.IconWrapper=s},951:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.MoreIcon=void 0;var a=n(522),s=n(720),p=n(52),c=n(781),l=n(174),u=n(562),d=p.ui.Components,f=d.Icon,h=d.Tooltip,y=p.ui.Event.withEventManager,v=p.ui.preacti18n,m=v.withText,g=v.Text,A=function(e){function t(){var t=e.call(this)||this;return t.handleOnClick=function(){t.setState((function(e){return{toggle:!e.toggle}}))},t.onDropdownClick=function(){t.setState({toggle:!1})},t.state={toggle:!1},t.moreButtonRef=(0,a.createRef)(),t}return r(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)}))},t.prototype.handleClickOutside=function(e){this.moreButtonRef&&!this.moreButtonRef.current.contains(e.target)&&this.setState({toggle:!1})},t.prototype.render=function(){return(0,a.h)("div",{style:{position:"relative"}},(0,a.h)(h,{label:this.props.moreIconTxt},(0,a.h)(s.A11yWrapper,{onClick:this.handleOnClick},(0,a.h)("button",{ref:this.moreButtonRef,className:"".concat(p.ui.style.upperBarIcon," ").concat(c.moreIcon),tabIndex:0,"aria-label":this.props.moreIconTxt},(0,a.h)(f,{id:"".concat(u.pluginName,"-upper-bar-manager"),path:"M16 22a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm0-11a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm0-11a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2z",viewBox:"0 0 32 32"})))),this.state.toggle&&(0,a.h)("div",null,(0,a.h)(l.DropdownBar,{onDropdownClick:this.onDropdownClick,controls:this.props.icons})))},i([y,m({moreIconTxt:(0,a.h)(g,{id:"controls.moreIcon"},"More")})],t)}(a.Component);t.MoreIcon=A},765:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UpperBarManager=void 0;var o=n(52),r=n(183),i=n(522),a=n(328),s=o.ui.ReservedPresetAreas,p=o.ui.ReservedPresetNames,c=function(){function e(e,t,n){var o=this;this._getControls=function(e){return Array.from(o.componentsRegistry.values()).sort((function(t,n){return e[t.label]>e[n.label]?1:-1}))},this.player=e,this.componentsRegistry=new Map,this.logger=t,this.displayedBarComponentRef=(0,i.createRef)(),this.injectDisplayedBarComponentWrapper(n.pluginsIconsOrder)}return e.prototype.add=function(t){if(e.validateItem(t)){var n=new r.IconModel(t);return this.componentsRegistry.set(n.id,n),this.displayedBarComponentRef.current.update(),this.logger.debug("Icon Id: '".concat(n.id,"' '").concat(n.label,"' added")),n.id}this.logger.warn("Invalid Icon parameters",t)},e.prototype.remove=function(e){var t=this.componentsRegistry.get(e);t?(this.componentsRegistry.delete(e),this.displayedBarComponentRef.current.update(),this.logger.debug("Icon Id: '".concat(t.id,"' Label: '").concat(t.label,"' removed"))):this.logger.warn("".concat(e," is not registered"))},e.prototype.isActive=function(e){return!!this.componentsRegistry.get(e)},e.prototype.update=function(e){var t=this.componentsRegistry.get(e);t?t.update():this.logger.warn("".concat(e," is not registered"))},e.prototype.injectDisplayedBarComponentWrapper=function(e){var t=this;this.player.ui.addComponent({label:"Right-Upper-Bar-Wrapper",presets:[p.Playback,p.Live],area:s.TopBarRightControls,get:function(){return(0,i.h)(a.DisplayedBar,{ref:t.displayedBarComponentRef,getControls:function(){return t._getControls(e)}})}})},e.validateItem=function(e){return"function"==typeof e.onClick&&"function"==typeof e.component},e}();t.UpperBarManager=c},562:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UIManagers=t.pluginName=void 0;var i=n(52),a=n(682),s=n(765);t.pluginName="uiManagers";var p=function(e){function t(t,n,o){var r=e.call(this,t,n,o)||this;return n.registerService("sidePanelsManager",new a.SidePanelsManager(n,r.logger)),n.registerService("upperBarManager",new s.UpperBarManager(n,r.logger,r.config.upperBarManager)),r}return r(t,e),t.isValid=function(){return!0},t.defaultConfig={upperBarManager:{pluginsIconsOrder:{Navigation:10,"Q&A":20,Transcript:30,Download:40,Playlist:50,Related:60,Share:70,Info:80,Moderation:90}}},t}(i.BasePlugin);t.UIManagers=p},52:e=>{e.exports=KalturaPlayer},522:e=>{e.exports=KalturaPlayer.ui.preact}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={id:e,exports:{}};return n[e].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0,e=r(52),t=r(562),(0,e.registerPlugin)(t.pluginName,t.UIManagers)})(); +(()=>{"use strict";var e,t,n={720:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.A11yWrapper=t.isKeyboardEvent=void 0;var o=n(522),r=n(52).ui.utils.KeyMap,i=r.ENTER,a=r.SPACE,s=r.UP,p=r.DOWN,c=r.LEFT,l=r.RIGHT,u=function(e){e.preventDefault(),e.stopPropagation()};t.isKeyboardEvent=function(e){return e instanceof KeyboardEvent||[e.offsetX,e.offsetY].every((function(e){return 0===e}))},t.A11yWrapper=function(e){var n=e.children,r=e.onClick,d=e.onUpKeyPressed,f=e.onDownKeyPressed,h=e.onLeftKeyPressed,y=e.onRightKeyPressed,v=e.role,m=e.type,g={onKeyDown:function(e){e.keyCode===a||e.keyCode===i?(u(e),r(e,!0)):e.keyCode===s&&d?(u(e),d(e)):e.keyCode===p&&f?(u(e),f(e)):e.keyCode===c&&h?(u(e),h(e)):e.keyCode===l&&y&&(u(e),y(e))},onClick:function(e){e.stopPropagation(),r(e,(0,t.isKeyboardEvent)(e))},role:v};return"button"===n.type&&(g.type=m||"button"),(0,o.cloneElement)(n,g)},t.A11yWrapper.defaultProps={role:"button"}},499:(e,t,n)=>{n.d(t,{Mk:()=>s,ZP:()=>c,uj:()=>p});var o=n(537),r=n.n(o),i=n(645),a=n.n(i)()(r());a.push([e.id,".playkit-side-panel-wrapper_Wr{visibility:hidden;position:absolute;width:100%;height:100%}.playkit-active-state_vh{visibility:visible}","",{version:3,sources:["webpack://./src/services/side-panels-manager/ui/panel-item-wrapper/panel-item-wrapper.component.scss"],names:[],mappings:"AAAA,+BAAoB,iBAAiB,CAAC,iBAAiB,CAAC,UAAU,CAAC,WAAW,CAAC,yBAAc,kBAAkB",sourcesContent:[".side-panel-wrapper{visibility:hidden;position:absolute;width:100%;height:100%}.active-state{visibility:visible}"],sourceRoot:""}]);var s="playkit-side-panel-wrapper_Wr",p="playkit-active-state_vh";const c=a},477:(e,t,n)=>{n.d(t,{A:()=>s,Z:()=>p});var o=n(537),r=n.n(o),i=n(645),a=n.n(i)()(r());a.push([e.id,".playkit-right-upper-bar-wrapper-container_Vm{direction:ltr;display:flex}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/displayed-bar/displayed-bar.component.scss"],names:[],mappings:"AAAA,8CAAmC,aAAa,CAAC,YAAY",sourcesContent:[".right-upper-bar-wrapper-container{direction:ltr;display:flex}"],sourceRoot:""}]);var s="playkit-right-upper-bar-wrapper-container_Vm";const p=a},206:(e,t,n)=>{n.d(t,{ZP:()=>u,_h:()=>l,mB:()=>p,pU:()=>s,qv:()=>c});var o=n(537),r=n.n(o),i=n(645),a=n.n(i)()(r());a.push([e.id,".playkit-more-dropdown_SJ{position:absolute;padding:8px 4px;width:166px;background-color:var(--playkit-tone-7-color);border-radius:4px;top:44px;right:0}.playkit-more-dropdown_SJ .playkit-dropdown-item_Aq{border-radius:4px;padding:4px 12px 4px 15px;display:flex;margin:4px 0;cursor:pointer}.playkit-more-dropdown_SJ .playkit-dropdown-item_Aq .playkit-icon_h_{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.playkit-more-dropdown_SJ .playkit-dropdown-item_Aq:hover{background-color:var(--playkit-tone-6-color)}.playkit-more-dropdown_SJ .playkit-dropdown-item_Aq .playkit-dropdown-item-description_rC{display:flex;flex:1;font-size:14px;font-weight:700;align-items:center;padding-left:11px}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/dropdown-bar/dropdown-bar.component.scss"],names:[],mappings:"AAAA,0BAAe,iBAAiB,CAAC,eAAe,CAAC,WAAW,CAAC,4CAA4C,CAAC,iBAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,oDAA8B,iBAAiB,CAAC,yBAAyB,CAAC,YAAY,CAAC,YAAY,CAAC,cAAc,CAAC,qEAAoC,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,0DAAoC,4CAA4C,CAAC,0FAAyD,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,eAAe,CAAC,kBAAkB,CAAC,iBAAiB",sourcesContent:[".more-dropdown{position:absolute;padding:8px 4px;width:166px;background-color:var(--playkit-tone-7-color);border-radius:4px;top:44px;right:0}.more-dropdown .dropdown-item{border-radius:4px;padding:4px 12px 4px 15px;display:flex;margin:4px 0;cursor:pointer}.more-dropdown .dropdown-item .icon{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.more-dropdown .dropdown-item:hover{background-color:var(--playkit-tone-6-color)}.more-dropdown .dropdown-item .dropdown-item-description{display:flex;flex:1;font-size:14px;font-weight:700;align-items:center;padding-left:11px}"],sourceRoot:""}]);var s="playkit-more-dropdown_SJ",p="playkit-dropdown-item_Aq",c="playkit-icon_h_",l="playkit-dropdown-item-description_rC";const u=a},324:(e,t,n)=>{n.d(t,{W:()=>s,Z:()=>p});var o=n(537),r=n.n(o),i=n(645),a=n.n(i)()(r());a.push([e.id,".playkit-more-icon_fR{margin-right:0;z-index:2}","",{version:3,sources:["webpack://./src/services/upper-bar-manager/ui/more-icon/more-icon.component.scss"],names:[],mappings:"AAAA,sBAAW,cAAc,CAAC,SAAS",sourcesContent:[".more-icon{margin-right:0;z-index:2}"],sourceRoot:""}]);var s="playkit-more-icon_fR";const p=a},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",o=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),o&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),o&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,o,r,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(o)for(var s=0;s<this.length;s++){var p=this[s][0];null!=p&&(a[p]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);o&&a[l[0]]||(void 0!==i&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=i),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),r&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=r):l[4]="".concat(r)),t.push(l))}},t}},537:e=>{e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),i="/*# ".concat(r," */"),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(a).concat([i]).join("\n")}return[t].join("\n")}},767:(e,t,n)=>{n.r(t),n.d(t,{activeState:()=>y.uj,default:()=>m,sidePanelWrapper:()=>y.Mk});var o=n(379),r=n.n(o),i=n(795),a=n.n(i),s=n(569),p=n.n(s),c=n(565),l=n.n(c),u=n(216),d=n.n(u),f=n(589),h=n.n(f),y=n(499),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),r()(y.ZP,v);const m=y.ZP&&y.ZP.locals?y.ZP.locals:void 0},611:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,rightUpperBarWrapperContainer:()=>y.A});var o=n(379),r=n.n(o),i=n(795),a=n.n(i),s=n(569),p=n.n(s),c=n(565),l=n.n(c),u=n(216),d=n.n(u),f=n(589),h=n.n(f),y=n(477),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),r()(y.Z,v);const m=y.Z&&y.Z.locals?y.Z.locals:void 0},23:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,dropdownItem:()=>y.mB,dropdownItemDescription:()=>y._h,icon:()=>y.qv,moreDropdown:()=>y.pU});var o=n(379),r=n.n(o),i=n(795),a=n.n(i),s=n(569),p=n.n(s),c=n(565),l=n.n(c),u=n(216),d=n.n(u),f=n(589),h=n.n(f),y=n(206),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),r()(y.ZP,v);const m=y.ZP&&y.ZP.locals?y.ZP.locals:void 0},781:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,moreIcon:()=>y.W});var o=n(379),r=n.n(o),i=n(795),a=n.n(i),s=n(569),p=n.n(s),c=n(565),l=n.n(c),u=n(216),d=n.n(u),f=n(589),h=n.n(f),y=n(324),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d(),r()(y.Z,v);const m=y.Z&&y.Z.locals?y.Z.locals:void 0},379:e=>{var t=[];function n(e){for(var n=-1,o=0;o<t.length;o++)if(t[o].identifier===e){n=o;break}return n}function o(e,o){for(var i={},a=[],s=0;s<e.length;s++){var p=e[s],c=o.base?p[0]+o.base:p[0],l=i[c]||0,u="".concat(c," ").concat(l);i[c]=l+1;var d=n(u),f={css:p[1],media:p[2],sourceMap:p[3],supports:p[4],layer:p[5]};if(-1!==d)t[d].references++,t[d].updater(f);else{var h=r(f,o);o.byIndex=s,t.splice(s,0,{identifier:u,updater:h,references:1})}a.push(u)}return a}function r(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,r){var i=o(e=e||[],r=r||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var s=n(i[a]);t[s].references--}for(var p=o(e,r),c=0;c<i.length;c++){var l=n(i[c]);0===t[l].references&&(t[l].updater(),t.splice(l,1))}i=p}}},569:e=>{var t={};e.exports=function(e,n){var o=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(n)}},216:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var o="";n.supports&&(o+="@supports (".concat(n.supports,") {")),n.media&&(o+="@media ".concat(n.media," {"));var r=void 0!==n.layer;r&&(o+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),o+=n.css,r&&(o+="}"),n.media&&(o+="}"),n.supports&&(o+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(o,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},321:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ItemWrapper=void 0;var o=n(522),r=n(837),i=function(){function e(t,n,o){if(this.id=++e.nextId,this.item=t,this.player=n,this.upperBarManager=this.player.getService("upperBarManager"),this.isActive=!1,this.injectPanelComponent(),t.iconComponent){var r=this.id;this.iconId=this.upperBarManager.add({label:this.item.label,svgIcon:this.item.iconComponent.svgIcon,onClick:function(){return o(r)},component:this.item.iconComponent.component})}}return e.prototype.activate=function(){var e,t,n=this;this.panelItemComponentRef.current?(this.panelItemComponentRef.current.on(),null===(t=(e=this.item).onActivate)||void 0===t||t.call(e),this.isActive=!0):setTimeout((function(){return n.activate()}))},e.prototype.deactivate=function(e){var t,n;void 0===e&&(e=!1),this.panelItemComponentRef.current.off(e),null===(n=(t=this.item).onDeactivate)||void 0===n||n.call(t),this.isActive=!1},e.prototype.remove=function(){var e;this.removePanelComponentFn(),(null===(e=this.item.iconComponent)||void 0===e?void 0:e.component)&&this.upperBarManager.remove(this.iconId)},e.prototype.update=function(){this.panelItemComponentRef.current.forceUpdate()},e.prototype.injectPanelComponent=function(){var t=this,n=this.item,i=n.label,a=n.position,s=n.panelComponent,p=n.presets,c=s,l=(0,o.createRef)();this.panelItemComponentRef=l,this.removePanelComponentFn=this.player.ui.addComponent({label:"Side-panel-".concat(a,"-").concat(i),presets:p,area:e.getPanelArea(a),get:function(){return(0,o.h)(r.PanelItemWrapper,{ref:l},(0,o.h)(c,{isActive:t.isActive}))}})},e.getPanelArea=function(e){return"SidePanel".concat(e.charAt(0).toUpperCase()).concat(e.slice(1))},e.nextId=0,e}();t.ItemWrapper=i},682:function(e,t,n){var o,r=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.SidePanelsManager=void 0;var i=n(52),a=n(321),s=i.ui.SidePanelModes,p=i.ui.SidePanelPositions,c=i.ui.ReservedPresetNames,l=((o={})[p.TOP]=p.BOTTOM,o[p.BOTTOM]=p.TOP,o[p.RIGHT]=p.LEFT,o[p.LEFT]=p.RIGHT,o),u=function(){function e(e,t){this.player=e,this.activePanels={top:null,bottom:null,right:null,left:null},this.componentsRegistry=new Map,this.logger=t}return e.prototype.add=function(t){var n=this;if(e.validateItem(t)){var o=new a.ItemWrapper(t,this.player,(function(e){return n.toggle(e)}));return this.componentsRegistry.set(o.id,o),this.logger.debug("New Panel Item Added",t),o.id}this.logger.warn("Invalid SidePanelItem parameters",t)},e.prototype.remove=function(e){var t=this.componentsRegistry.get(e);t?(this.isItemActive(e)&&this.deactivateItem(e),t.remove(),this.componentsRegistry.delete(e)):this.logger.warn("".concat(e," is not registered"))},e.prototype.activateItem=function(t){var n=this.componentsRegistry.get(t);if(n){var o=n.item,r=o.position,i=o.expandMode;if(this.isItemActive(t))return;var a=this.activePanels[r];null!==a&&a.deactivate(!0);var s=e.getCounterPanelPosition(r);this.activePanels[s]&&this.deactivateItem(this.activePanels[s].id),n.activate(),this.expand(r,i),this.activePanels[r]=n}else this.logger.warn("".concat(t," is not registered"))},e.prototype.deactivateItem=function(e){var t=this.componentsRegistry.get(e);if(t){if(!this.isItemActive(e))return;var n=t.item.position;t.deactivate(),this.collapse(n),this.activePanels[n]=null}else this.logger.warn("".concat(e," is not registered"))},e.prototype.isItemActive=function(e){var t,n=this.componentsRegistry.get(e);return n?(null===(t=this.activePanels[n.item.position])||void 0===t?void 0:t.id)===e:(this.logger.warn("".concat(e," is not registered")),!1)},e.prototype.update=function(e){var t=this.componentsRegistry.get(e);t?t.update():this.logger.warn("".concat(e," is not registered"))},e.prototype.reset=function(){this.logger.debug("reset")},e.prototype.destroy=function(){this.logger.debug("destroy"),this.removeAllItems()},e.prototype.removeAllItems=function(){var e,t;try{for(var n=r(this.componentsRegistry.values()),o=n.next();!o.done;o=n.next()){var i=o.value;this.remove(i.id)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}},e.prototype.toggle=function(e){this.isItemActive(e)?this.deactivateItem(e):this.activateItem(e)},e.prototype.expand=function(e,t){this.player.ui.store.dispatch(i.ui.reducers.shell.actions.updateSidePanelMode(e,t))},e.prototype.collapse=function(e){this.player.ui.store.dispatch(i.ui.reducers.shell.actions.updateSidePanelMode(e,s.HIDDEN))},e.getCounterPanelPosition=function(e){return l[e]},e.validateItem=function(e){var t=e.label,n=e.panelComponent,o=e.iconComponent,r=e.position,i=e.expandMode,a=e.onActivate,l=e.onDeactivate,u=e.presets;return!(!(t&&Object.values(p).includes(r)&&Object.values(s).includes(i)&&u.every((function(e){return Object.values(c).includes(e)}))&&"function"==typeof n&&("function"==typeof(null==o?void 0:o.component)&&"string"==typeof(null==o?void 0:o.svgIcon.path)||void 0===o))||"function"!=typeof a&&void 0!==a||"function"!=typeof l&&void 0!==l)},e}();t.SidePanelsManager=u},837:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PanelItemWrapper=void 0;var i=n(522),a=n(767),s=n(52).ui.style.defaultTransitionTime,p=function(e){function t(){var t=e.call(this)||this;return t.state={on:!1},t.switchMode=!1,t}return r(t,e),t.prototype.on=function(){this.setState({on:!0})},t.prototype.off=function(e){this.switchMode=e,this.setState({on:!1})},t.prototype.render=function(){return(0,i.h)("div",{className:[a.sidePanelWrapper,this.state.on?a.activeState:""].join(" "),style:this.state.on||this.switchMode?"":{transition:"visibility ".concat(s,"ms")}},(0,i.cloneElement)(this.props.children))},t}(i.Component);t.PanelItemWrapper=p},183:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IconModel=void 0;var o=n(522),r=function(){function e(t){this.id=++e.nextId,this.label=t.label,this.component=t.component,this.svgIcon=t.svgIcon,this.onClick=t.onClick,this.componentRef=(0,o.createRef)()}return e.prototype.update=function(){this.componentRef.current.forceUpdate()},e.nextId=0,e}();t.IconModel=r},328:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.DisplayedBar=void 0;var a=n(522),s=n(883),p=n(611),c=n(52),l=n(951),u=c.ui.Components.PLAYER_SIZE,d=c.ui.redux.connect,f=function(e){return{playerSize:e.shell.playerSize}},h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.update=function(){t.forceUpdate()},t}return r(t,e),t.prototype.splitControlsIntoDisplayedAndDropdown=function(){switch(this.props.playerSize){case u.TINY:return{displayedControls:[],dropdownControls:[]};case u.EXTRA_SMALL:case u.SMALL:return this.splitControls(2);default:return this.splitControls(4)}},t.prototype.splitControls=function(e){var t,n,o=this.props.getControls();return o.length>e+1?(t=o.slice(0,e),n=o.slice(e)):(t=o,n=[]),{displayedControls:t,dropdownControls:n}},t.prototype.render=function(){var e=this.splitControlsIntoDisplayedAndDropdown(),t=e.displayedControls,n=e.dropdownControls;return(0,a.h)("div",{className:p.rightUpperBarWrapperContainer},t.map((function(e){var t=e.id,n=e.component,o=e.onClick,r=e.componentRef,i=n;return(0,a.h)(s.IconWrapper,{key:t,onClick:o,ref:r},(0,a.h)(i,null))})),n.length>0&&(0,a.h)(l.MoreIcon,{icons:n}))},i([d(f,null,null,{forwardRef:!0})],t)}(a.Component);t.DisplayedBar=h},174:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DropdownBar=void 0;var i=n(522),a=n(23),s=n(52),p=n(720),c=s.ui.Components.Icon,l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){var e=this;return(0,i.h)("div",{className:a.moreDropdown,role:"menu","aria-expanded":"true"},this.props.controls.map((function(t,n){var o=t.id,r=t.label,s=t.svgIcon,l=t.onClick;return(0,i.h)(i.Fragment,{key:o},(0,i.h)(p.A11yWrapper,{onClick:function(t){l(t),e.props.onDropdownClick()},role:"menuitem"},(0,i.h)("div",{className:a.dropdownItem,tabIndex:0,"aria-label":r},(0,i.h)("div",{className:a.icon},(0,i.h)(c,{id:"icon".concat(n),path:s.path,viewBox:s.viewBox})),(0,i.h)("span",{className:a.dropdownItemDescription},r))))})))},t}(i.Component);t.DropdownBar=l},883:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.IconWrapper=void 0;var i=n(522),a=n(52).ui.utils.KeyMap,s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.handleOnKeyDown=function(e){e.keyCode!==a.ENTER&&e.keyCode!==a.SPACE||(e.preventDefault(),this.props.onClick(e))},t.prototype.render=function(){var e=this;return(0,i.h)("div",{onClick:this.props.onClick,onKeyDown:function(t){return e.handleOnKeyDown(t)}},(0,i.cloneElement)(this.props.children))},t}(i.Component);t.IconWrapper=s},951:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__decorate||function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.MoreIcon=void 0;var a=n(522),s=n(720),p=n(52),c=n(781),l=n(174),u=n(562),d=p.ui.Components,f=d.Icon,h=d.Tooltip,y=p.ui.Event.withEventManager,v=p.ui.preacti18n,m=v.withText,g=v.Text,A=function(e){function t(){var t=e.call(this)||this;return t.handleOnClick=function(){t.setState((function(e){return{toggle:!e.toggle}}))},t.onDropdownClick=function(){t.setState({toggle:!1})},t.state={toggle:!1},t.moreButtonRef=(0,a.createRef)(),t}return r(t,e),t.prototype.componentDidMount=function(){var e=this;this.props.eventManager.listen(document,"click",(function(t){return e.handleClickOutside(t)}))},t.prototype.handleClickOutside=function(e){this.moreButtonRef&&!this.moreButtonRef.current.contains(e.target)&&this.setState({toggle:!1})},t.prototype.render=function(){return(0,a.h)("div",{style:{position:"relative"}},(0,a.h)(h,{label:this.props.moreIconTxt},(0,a.h)(s.A11yWrapper,{onClick:this.handleOnClick},(0,a.h)("button",{ref:this.moreButtonRef,className:"".concat(p.ui.style.upperBarIcon," ").concat(c.moreIcon),tabIndex:0,"aria-label":this.props.moreIconTxt},(0,a.h)(f,{id:"".concat(u.pluginName,"-upper-bar-manager"),path:"M16 22a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm0-11a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm0-11a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 2a1 1 0 1 0 0 2 1 1 0 0 0 0-2z",viewBox:"0 0 32 32"})))),this.state.toggle&&(0,a.h)("div",null,(0,a.h)(l.DropdownBar,{onDropdownClick:this.onDropdownClick,controls:this.props.icons})))},i([y,m({moreIconTxt:(0,a.h)(g,{id:"controls.moreIcon"},"More")})],t)}(a.Component);t.MoreIcon=A},765:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UpperBarManager=void 0;var o=n(52),r=n(183),i=n(522),a=n(328),s=o.ui.ReservedPresetAreas,p=o.ui.ReservedPresetNames,c=function(){function e(e,t,n){var o=this;this._getControls=function(e){return Array.from(o.componentsRegistry.values()).sort((function(t,n){return e[t.label]>e[n.label]?1:-1}))},this.player=e,this.componentsRegistry=new Map,this.logger=t,this.displayedBarComponentRef=(0,i.createRef)(),this.injectDisplayedBarComponentWrapper(n.pluginsIconsOrder)}return e.prototype.add=function(t){if(e.validateItem(t)){var n=new r.IconModel(t);return this.componentsRegistry.set(n.id,n),this.displayedBarComponentRef.current.update(),this.logger.debug("Icon Id: '".concat(n.id,"' '").concat(n.label,"' added")),n.id}this.logger.warn("Invalid Icon parameters",t)},e.prototype.remove=function(e){var t=this.componentsRegistry.get(e);t?(this.componentsRegistry.delete(e),this.displayedBarComponentRef.current.update(),this.logger.debug("Icon Id: '".concat(t.id,"' Label: '").concat(t.label,"' removed"))):this.logger.warn("".concat(e," is not registered"))},e.prototype.isActive=function(e){return!!this.componentsRegistry.get(e)},e.prototype.update=function(e){var t=this.componentsRegistry.get(e);t?t.update():this.logger.warn("".concat(e," is not registered"))},e.prototype.injectDisplayedBarComponentWrapper=function(e){var t=this;this.player.ui.addComponent({label:"Right-Upper-Bar-Wrapper",presets:[p.Playback,p.Live],area:s.TopBarRightControls,get:function(){return(0,i.h)(a.DisplayedBar,{ref:t.displayedBarComponentRef,getControls:function(){return t._getControls(e)}})}})},e.validateItem=function(e){return"function"==typeof e.onClick&&"function"==typeof e.component},e}();t.UpperBarManager=c},562:function(e,t,n){var o,r=this&&this.__extends||(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UIManagers=t.pluginName=void 0;var i=n(52),a=n(682),s=n(765);t.pluginName="uiManagers";var p=function(e){function t(t,n,o){var r=e.call(this,t,n,o)||this;return n.registerService("sidePanelsManager",new a.SidePanelsManager(n,r.logger)),n.registerService("upperBarManager",new s.UpperBarManager(n,r.logger,r.config.upperBarManager)),r}return r(t,e),t.isValid=function(){return!0},t.defaultConfig={upperBarManager:{pluginsIconsOrder:{Navigation:10,"Q&A":20,Transcript:30,Download:40,Playlist:50,Related:60,Share:70,Info:80,Moderation:90}}},t}(i.BasePlugin);t.UIManagers=p},52:e=>{e.exports=KalturaPlayer},522:e=>{e.exports=KalturaPlayer.ui.preact}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var i=o[e]={id:e,exports:{}};return n[e].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0,e=r(52),t=r(562),(0,e.registerPlugin)(t.pluginName,t.UIManagers)})(); -//# sourceMappingURL=https://qa-apache-php7.dev.kaltura.com/embedPlaykitJsSourceMaps/path/1_979a68373ea366afd4b1a26b2a7d6921 +//# sourceMappingURL=https://qa-apache-php7.dev.kaltura.com/embedPlaykitJsSourceMaps/path/1_8b81429e0037aa5c4442427463398c97 window.__kalturaplayerdata = (window.__kalturaplayerdata || {}); - window.__kalturaplayerdata={"disableUserCache":false,"plugins":{"kalturaCuepoints":{},"uiManagers":{},"timeline":{}},"viewability":{"playerThreshold":50},"provider":{"env":{"serviceUrl":"https:\/\/qa-apache-php7.dev.kaltura.com\/api_v3","cdnUrl":"https:\/\/qa-apache-php7.dev.kaltura.com","statsServiceUrl":"https:\/\/qa-apache-php7.dev.kaltura.com","liveStatsServiceUrl":"","analyticsServiceUrl":"https:\/\/qa-kava-nginx1.dev.kaltura.com","apiFeatures":{"entryRedirect":"1"}}},"playback":{"enabled":true},"productVersion":"7.61.99","ui":{"translations":{"en":{"controls":{"play":"Play","pause":"Pause","language":"Language","settings":"Settings","fullscreen":"Fullscreen","fullscreenExit":"Exit fullscreen","rewind":"Seek backwards","forward":"Seek forward","vrStereo":"vrStereo","closedCaptionsOn":"Disable Captions","closedCaptionsOff":"Enable Captions","live":"Live","mute":"Mute","unmute":"Unmute","next":"Next","prev":"Prev","startOver":"Start over","pictureInPicture":"Picture in picture","pictureInPictureExit":"Exit picture in picture","pictureInPictureExpand":"Expand","logo":"Logo","seekBarSlider":"Seek slider"},"unmute":{"unmute":"Unmute"},"volume":{"muted_click_to_unmute":"Muted. Click to unmute","volume_click_to_mute":"{{vol}}% volume. Click to mute","ten_percent":"ten percent","twenty_percent":"twenty percent","thirty_percent":"thirty percent","fourty_percent":"forty percent","fifty_percent":"fifty percent","sixty_percent":"sixty percent","seventy_percent":"seventy percent","eighty_percent":"eighty percent","ninety_percent":"ninety percent","one_hundred_percent":"one hundred percent"},"copy":{"button":"Copy URL"},"settings":{"title":"Settings","audio":"Audio","quality":"Quality","speed":"Speed","speedNormal":"Normal","qualityAuto":"Auto","advancedAudioDescription":"Advanced Audio Description"},"captions":{"captions":"Captions","advanced_captions_settings":"Advanced captions settings"},"overlay":{"close":"Close"},"error":{"default_error":"Something went wrong","default_session_text":"Session ID","retry":"Retry"},"ads":{"ad_notice":"Advertisement","learn_more":"Learn more","skip_ad":"Skip ad","skip_in":"Skip in"},"cvaa":{"title":"Advanced captions settings","sample_caption_tag":"Sample {{number}}","sample_custom_caption_tag":"Custom captions","set_custom_caption":"Set custom caption","edit_caption":"Edit caption","size_label":"Size","font_color_label":"Font color","font_family_label":"Font family","font_style_label":"Font style","font_opacity_label":"Font opacity","background_color_label":"Background color","background_opacity_label":"Background opacity","apply":"Apply","caption_preview":"This is your caption preview"},"cast":{"play_on_tv":"Play on TV","disconnect_from_tv":"Disconnect from TV","status":{"connecting_to":"Connecting to","connected_to":"Connected to","playing_on":"Playing on"}},"playlist":{"prev":"Previous","next":"Next","up_next":"Up Next","up_next_in":"Up next in","cancel":"Cancel"},"pictureInPicture":{"overlay_text":"Playing in Picture In Picture mode"}}}}}; \ No newline at end of file + window.__kalturaplayerdata={"disableUserCache":false,"plugins":{"kalturaCuepoints":{},"uiManagers":{},"timeline":{}},"viewability":{"playerThreshold":50},"provider":{"env":{"serviceUrl":"https:\/\/qa-apache-php7.dev.kaltura.com\/api_v3","cdnUrl":"https:\/\/qa-apache-php7.dev.kaltura.com","statsServiceUrl":"https:\/\/qa-apache-php7.dev.kaltura.com","liveStatsServiceUrl":"","analyticsServiceUrl":"https:\/\/qa-kava-nginx1.dev.kaltura.com","apiFeatures":{"entryRedirect":"1"}}},"playback":{"enabled":true},"productVersion":"7.61.137","ui":{"translations":{"en":{"controls":{"play":"Play","pause":"Pause","language":"Language","settings":"Settings","fullscreen":"Fullscreen","fullscreenExit":"Exit fullscreen","rewind":"Seek backwards","forward":"Seek forward","vrStereo":"vrStereo","closedCaptionsOn":"Disable Captions","closedCaptionsOff":"Enable Captions","live":"Live","mute":"Mute","unmute":"Unmute","next":"Next","prev":"Prev","startOver":"Start over","pictureInPicture":"Picture in picture","pictureInPictureExit":"Exit picture in picture","pictureInPictureExpand":"Expand","logo":"Logo","seekBarSlider":"Seek slider"},"unmute":{"unmute":"Unmute"},"volume":{"muted_click_to_unmute":"Muted. Click to unmute","volume_click_to_mute":"{{vol}}% volume. Click to mute","ten_percent":"ten percent","twenty_percent":"twenty percent","thirty_percent":"thirty percent","fourty_percent":"forty percent","fifty_percent":"fifty percent","sixty_percent":"sixty percent","seventy_percent":"seventy percent","eighty_percent":"eighty percent","ninety_percent":"ninety percent","one_hundred_percent":"one hundred percent"},"copy":{"button":"Copy URL"},"settings":{"title":"Settings","audio":"Audio","quality":"Quality","speed":"Speed","speedNormal":"Normal","qualityAuto":"Auto","advancedAudioDescription":"Advanced Audio Description"},"captions":{"captions":"Captions","advanced_captions_settings":"Advanced captions settings"},"overlay":{"close":"Close"},"error":{"default_error":"Something went wrong","default_session_text":"Session ID","retry":"Retry"},"ads":{"ad_notice":"Advertisement","learn_more":"Learn more","skip_ad":"Skip ad","skip_in":"Skip in"},"cvaa":{"title":"Advanced captions settings","sample_caption_tag":"Sample {{number}}","sample_custom_caption_tag":"Custom captions","set_custom_caption":"Set custom caption","edit_caption":"Edit caption","size_label":"Size","font_color_label":"Font color","font_family_label":"Font family","font_style_label":"Font style","font_opacity_label":"Font opacity","background_color_label":"Background color","background_opacity_label":"Background opacity","apply":"Apply","caption_preview":"This is your caption preview"},"cast":{"play_on_tv":"Play on TV","disconnect_from_tv":"Disconnect from TV","status":{"connecting_to":"Connecting to","connected_to":"Connected to","playing_on":"Playing on"}},"playlist":{"prev":"Previous","next":"Next","up_next":"Up Next","up_next_in":"Up next in","cancel":"Cancel"},"pictureInPicture":{"overlay_text":"Playing in Picture In Picture mode"}}}}}; \ No newline at end of file diff --git a/package.json b/package.json index f4f77fd..e22d567 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "url": "git+https://github.com/kaltura/playkit-js-hotspots.git" }, "dependencies": { - "@playkit-js/common": "^1.2.3" + "@playkit-js/common": "^1.2.4" }, "devDependencies": { "@playkit-js/kaltura-player-js": "canary", @@ -82,7 +82,7 @@ "kaltura": { "name": "playkit-js-hotspots", "dependencies": { - "playkit-kaltura-cuepoints": "3.0.4" + "playkit-kaltura-cuepoints": "3.0.5" } } } diff --git a/yarn.lock b/yarn.lock index ebf9744..217a2a6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -130,10 +130,10 @@ resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== -"@playkit-js/common@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@playkit-js/common/-/common-1.2.3.tgz#29bf06e966ad97d5d077e0e28b1803b9cb6714fb" - integrity sha512-c3SHyQQ9Y9iM1q/6Gaay1GA9INkHQqg7uMJPP8AeXBjfyTs1H4W96EDAAX/96iDCYLjxZbp4UBsMR3RmTN9OrA== +"@playkit-js/common@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@playkit-js/common/-/common-1.2.4.tgz#9a83929a4048bf9298ad3a7311215dd27128101e" + integrity sha512-jMz+6Q7IYYjRgmPicUMpVnDz3l+v4d3MQA9Jo/H1wSvVNr0cWnP9lYS1RFom4X3Bp+cZ2DD8adwXFlDeM69VNw== dependencies: "@playkit-js/playkit-js-ui" "^0.77.1" classnames "^2.3.2"