/**
* Bundle builder v2.0.2/8859648
* Created at Sun Dec 10 2023 10:47:02 GMT+0000 (Coordinated Universal Time)
* -------------------
* Kaltura Player lib
* kaltura-ovp-player v3.17.4
* playkit-downloads v1.0.15
* playkit-google-analytics v1.1.2
* playkit-google-tag-manager v1.3.4
* playkit-hotspots v3.1.7
* playkit-kaltura-cuepoints v3.0.6
* playkit-kava v1.5.7
* playkit-share v1.2.1
* playkit-transcript v3.5.4
* playkit-ui-managers v1.4.2
* playkit-visibility v2.1.5
* playkit-vr v2.0.4
*/
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=14)}([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",d="mobile",p="tablet",h="smarttv",f=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,p]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[u,"Samsung"],[l,d]],[/\((ip(?:hone|od)[\w ]*);/i],[o,[u,"Apple"],[l,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[u,"Apple"],[l,p]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[u,"Huawei"],[l,p]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[o,[u,"Huawei"],[l,d]],[/\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,d]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[u,"Xiaomi"],[l,p]],[/; (\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,d]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[u,"Vivo"],[l,d]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[o,[u,"Realme"],[l,d]],[/\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,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[u,"Motorola"],[l,p]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[u,"LG"],[l,p]],[/(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,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[u,"Lenovo"],[l,p]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[u,"Nokia"],[l,d]],[/(pixel c)\b/i],[o,[u,"Google"],[l,p]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[u,"Google"],[l,d]],[/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,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[u,"Sony"],[l,p]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[u,"OnePlus"],[l,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[u,"Amazon"],[l,p]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[u,"Amazon"],[l,d]],[/(playbook);[-\w\),; ]+(rim)/i],[o,u,[l,p]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[u,"BlackBerry"],[l,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[u,"ASUS"],[l,p]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[u,"ASUS"],[l,d]],[/(nexus 9)/i],[o,[u,"HTC"],[l,p]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[u,[o,/_/g," "],[l,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[u,"Acer"],[l,p]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[u,"Meizu"],[l,d]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[u,"Sharp"],[l,d]],[/(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,d]],[/(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,p]],[/(surface duo)/i],[o,[u,"Microsoft"],[l,p]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[u,"Fairphone"],[l,d]],[/(u304aa)/i],[o,[u,"AT&T"],[l,d]],[/\bsie-(\w*)/i],[o,[u,"Siemens"],[l,d]],[/\b(rct\w+) b/i],[o,[u,"RCA"],[l,p]],[/\b(venue[\d ]{2,7}) b/i],[o,[u,"Dell"],[l,p]],[/\b(q(?:mv|ta)\w+) b/i],[o,[u,"Verizon"],[l,p]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[u,"Barnes & Noble"],[l,p]],[/\b(tm\d{3}\w+) b/i],[o,[u,"NuVision"],[l,p]],[/\b(k88) b/i],[o,[u,"ZTE"],[l,p]],[/\b(nx\d{3}j) b/i],[o,[u,"ZTE"],[l,d]],[/\b(gen\d{3}) b.+49h/i],[o,[u,"Swiss"],[l,d]],[/\b(zur\d{3}) b/i],[o,[u,"Swiss"],[l,p]],[/\b((zeki)?tb.*\b) b/i],[o,[u,"Zeki"],[l,p]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],o,[l,p]],[/\b(ns-?\w{0,9}) b/i],[o,[u,"Insignia"],[l,p]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[u,"NextBook"],[l,p]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],o,[l,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],o,[l,d]],[/\b(ph-1) /i],[o,[u,"Essential"],[l,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[u,"Envizen"],[l,p]],[/\b(trio[-\w\. ]+) b/i],[o,[u,"MachSpeed"],[l,p]],[/\btu_(1491) b/i],[o,[u,"Rotor"],[l,p]],[/(shield[\w ]+) b/i],[o,[u,"Nvidia"],[l,p]],[/(sprint) (\w+)/i],[u,o,[l,d]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[u,"Microsoft"],[l,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[u,"Zebra"],[l,p]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[u,"Zebra"],[l,d]],[/(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,h]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[u,"Samsung"],[l,h]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,"LG"],[l,h]],[/(apple) ?tv/i],[u,[o,"Apple TV"],[l,h]],[/crkey/i],[[o,"Chromecast"],[u,"Google"],[l,h]],[/droid.+aft(\w)( bui|\))/i],[o,[u,"Amazon"],[l,h]],[/\(dtv[\);].+(aquos)/i],[o,[u,"Sharp"],[l,h]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,v],[o,v],[l,h]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[l,h]],[/((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,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[l,p]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[l,p]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[l,d]],[/(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=f([s,c,"major"]),k.CPU=f(["architecture"]),k.DEVICE=f([o,u,l,"console",d,h,p,"wearable","embedded"]),k.ENGINE=k.OS=f([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},d=function(e,t){return{value:e,name:t}};s.TRACE=d(1,"TRACE"),s.DEBUG=d(2,"DEBUG"),s.INFO=d(3,"INFO"),s.TIME=d(4,"TIME"),s.WARN=d(5,"WARN"),s.ERROR=d(8,"ERROR"),s.OFF=d(99,"OFF");var p=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};p.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 h,f=new p({filterLevel:s.OFF});(h=s).enabledFor=u(f,f.enabledFor),h.trace=u(f,f.trace),h.debug=u(f,f.debug),h.time=u(f,f.time),h.timeEnd=u(f,f.timeEnd),h.info=u(f,f.info),h.warn=u(f,f.warn),h.error=u(f,f.error),h.log=h.info,s.setHandler=function(e){o=e},s.setLevel=function(e){for(var t in f.setLevel(e),l)l.hasOwnProperty(t)&&l[t].setLevel(e)},s.getLevel=function(){return f.getLevel()},s.get=function(e){return l[e]||(l[e]=new p(c({name:e},f.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 d=o(c),p={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(a[d].references++,a[d].updater(p)):a.push({identifier:c,updater:g(p,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 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=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 p(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 h=null,f=0;function g(e,t){var n,r,i;if(t.singleton){var a=f++;n=h||(h=l(t)),r=d.bind(null,n,a,!1),i=d.bind(null,n,a,!0)}else n=l(t),r=p.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: var(--playkit-player-background-color);\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 jn})),n.d(t,"registerMediaSourceAdapter",(function(){return Ot})),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 Qe})),n.d(t,"ImageTrack",(function(){return dt})),n.d(t,"TextStyle",(function(){return ye})),n.d(t,"Cue",(function(){return je})),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 O})),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 Bn})),n.d(t,"Env",(function(){return g})),n.d(t,"State",(function(){return J})),n.d(t,"getCapabilities",(function(){return Hn})),n.d(t,"setCapabilities",(function(){return Vn})),n.d(t,"EngineDecoratorProvider",(function(){return Nn})),n.d(t,"registerEngine",(function(){return Jt})),n.d(t,"unRegisterEngine",(function(){return Zt})),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 Z})),n.d(t,"TrackType",(function(){return $e})),n.d(t,"EngineType",(function(){return Ze})),n.d(t,"MediaType",(function(){return et})),n.d(t,"StreamType",(function(){return Je})),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 ht})),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 B})),n.d(r,"Dom",(function(){return j})),n.d(r,"Http",(function(){return H})),n.d(r,"VERSION",(function(){return V})),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]],d=[[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]]],p=[[/(edg)\/((\d+)?[\w.]+)/i],[[a.a.BROWSER.NAME,"Edge"],a.a.BROWSER.VERSION,a.a.BROWSER.MAJOR]],h=[].concat(p,u),f=new a.a(void 0,{browser:h,device:d,os:c}).getResult();f.isConsole=f.device.type===a.a.DEVICE.CONSOLE,f.isSmartTV=f.device.type===a.a.DEVICE.SMARTTV,f.isMobile=f.device.type===a.a.DEVICE.MOBILE,f.isTablet=f.device.type===a.a.DEVICE.TABLET,f.isWearable=f.device.type===a.a.DEVICE.WEARABLE,f.isEmbedded=f.device.type===a.a.DEVICE.EMBEDDED,f.isIPadOS="Mac OS"===f.os.name&&"ontouchend"in document,f.isSafari=f.browser.name.includes("Safari"),f.isIOS="iOS"===f.os.name,f.isMacOS="Mac OS"===f.os.name;var g=f;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 L(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 O=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}L(O,"Severity",{RECOVERABLE:1,CRITICAL:2}),L(O,"Category",{NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,ADS:8,STORAGE:9,CAST:10,VR:11}),L(O,"Code",R),L(O,"_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)}}},B={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()}},j={addClassName:function(e,t){e&&(e.classList?e.classList.add(t):j.hasClassName(e,t)||(e.className+=t))},removeClassName:function(e,t){e&&(e.classList?e.classList.remove(t):j.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,j.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}}},H={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 O(O.Severity.CRITICAL,O.Category.NETWORK,O.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}},V={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 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)}}var K=function(){function e(){this._createEl()}var t,n,r=e.prototype;return r.setSrc=function(e){e&&(this._posterUrl=e,j.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=j.createElement("div");j.setAttribute(e,"id",B.uniqueId(5)),j.setAttribute(e,"tabindex","-1")}},r._removeEl=function(){this._el&&j.removeChild(this._el.parentNode,this._el)},r.show=function(){j.setStyle(this._el,"display","")},r.hide=function(){j.setStyle(this._el,"display","none")},r.reset=function(){this._posterUrl="",j.setStyle(this._el,"background-image","")},r.destroy=function(){this.reset(),this._removeEl()},t=e,(n=[{key:"src",get:function(){return this._posterUrl}}])&&G(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 Q=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 $(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 J=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}}])&&$(t.prototype,n),e}(),Z={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={})[Z.IDLE]=((t={})[W.LOAD_START]=function(){return c._updateState(Z.LOADING)},t[W.PLAY]=function(){return c._updateState(Z.BUFFERING)},t[W.SEEKED]=function(){return c._updateState(Z.PAUSED)},t),o[Z.LOADING]=((n={})[W.LOADED_METADATA]=function(){return c._updateState(Z.PAUSED)},n[W.ERROR]=function(e){return e.payload.severity===O.Severity.CRITICAL&&c._updateState(Z.IDLE)},n[W.SEEKED]=function(){c._prevState&&c._prevState.type===Z.PLAYING&&c._updateState(Z.PLAYING)},n),o[Z.PAUSED]=((r={})[W.PLAY]=function(){return c._updateState(Z.PLAYING)},r[W.PLAYING]=function(){return c._updateState(Z.PLAYING)},r[W.ENDED]=function(){return c._updateState(Z.IDLE)},r),o[Z.PLAYING]=((i={})[W.PAUSE]=function(){return c._updateState(Z.PAUSED)},i[W.WAITING]=function(){c._player.seeking?c._updateState(Z.LOADING):(c._updateState(Z.BUFFERING),c._lastWaitingTime=c._player.currentTime)},i[W.ENDED]=function(){return c._updateState(Z.IDLE)},i[W.ERROR]=function(e){return e.payload.severity===O.Severity.CRITICAL&&c._updateState(Z.IDLE)},i),o[Z.BUFFERING]=((a={})[W.PLAYING]=function(){return c._updateState(Z.PLAYING)},a[W.PAUSE]=function(){return c._updateState(Z.PAUSED)},a[W.TIME_UPDATE]=function(){"IE"===g.browser.name&&c._player.currentTime!==c._lastWaitingTime&&c._prevState&&c._prevState.type===Z.PLAYING&&(c._lastWaitingTime=null,c._updateState(Z.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 J(Z.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===Z.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 J(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 de,pe=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 he(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 fe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}de="undefined"!=typeof window&&window.VTTRegion?window.VTTRegion:pe;var ge=function(){function e(){fe(this,"_fontSizeIndex",2),fe(this,"fontFamily",e.FontFamily.SANS_SERIF),fe(this,"fontColor",e.StandardColors.WHITE),fe(this,"fontOpacity",e.StandardOpacities.OPAQUE),fe(this,"backgroundColor",e.StandardColors.BLACK),fe(this,"backgroundOpacity",e.StandardOpacities.OPAQUE),fe(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}}])&&he(t.prototype,n),e}();fe(ge,"FontFamily",{ARIAL:"Arial",HELVETICA:"Helvetica",VERDANA:"Verdana",SANS_SERIF:"sans-serif"}),fe(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]}),fe(ge,"StandardOpacities",{OPAQUE:1,SEMI_HIGH:.75,SEMI_LOW:.25,TRANSPARENT:0}),fe(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]]}),fe(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={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},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=Le(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 Oe(Oe.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 Oe(Oe.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 d=ve(s.substr(1,s.length-2)),p=void 0;if(d){p=e.document.createProcessingInstruction("timestamp",d),u.appendChild(p);continue}var h=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!h)continue;if(!(p=o(h[1],h[3])))continue;if(!a(u,p))continue;h[2]&&(p.className=h[2].substr(1).replace("."," ")),c.push(h[1]),u.appendChild(p),u=p}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===Qe.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),d=n[l]+u,p=s[0];Math.abs(c)>d&&(c=c<0?-1:1,c*=Math.ceil(d/u)*u),o<0&&(c+=""===a.vertical?n.height:n.width,s=s.reverse()),i.move(p,c)}else{var h=i.lineHeight/n.height*100;switch(a.lineAlign){case"center":o-=h/2;break;case"end":o-=h}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 f=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(f.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))}}},Le=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 Oe(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}Oe.prototype=Le(Error.prototype),Oe.prototype.constructor=Oe,Oe.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},De.prototype={reportOrThrowError:function(e){if(!(e instanceof Oe))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 de;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 Oe(Oe.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 je(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 Oe(Oe.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 Be(e){return"string"==typeof e&&!!Fe[e.toLowerCase()]&&e.toLowerCase()}var je,He,Ve,Ge=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=Be(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=Be(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=Be(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 Ke(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)}}je="undefined"!=typeof window&&window.VTTCue?window.VTTCue:Ge;var We,Ye,qe=(Ve=He=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=He)?Object.defineProperty(We,Ye,{value:0,enumerable:!0,configurable:!0,writable:!0}):We[Ye]=0,Ve);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 Ke(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)?Ke(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 je(i.startTime,i.endTime,i.text))}catch(e){new O(O.Severity.RECOVERABLE,O.Category.TEXT,O.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 Qe=qe,$e=Object.freeze({VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image"}),Je={DASH:"dash",HLS:"hls",PROGRESSIVE:"progressive",IMAGE:"image"},Ze={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 dt=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 pt(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 ht=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}}])&&pt(t.prototype,n),e}();function ft(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 Qe?(r._logger.debug("Text track changed",e),this._trigger(Y.TEXT_TRACK_CHANGED,{selectedTextTrack:e})):e instanceof dt&&(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){Qe.isNativeTextTrack(e)&&!Qe.isExternalTrack(e)&&(e.mode=Qe.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 O(O.Severity.CRITICAL,O.Category.PLAYER,O.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}}])&&ft(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(O.Code.BAD_FAIRPLAY_RESPONSE,{error:e,responseText:n.data})}var s=e._validateResponse(r);s.valid?n.data=e._base64DecodeUint8Array(r.ckc):a._onError(O.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(O.Code.COULD_NOT_CREATE_MEDIA_KEYS),this._logger.debug("Creates session"),this._keySession=r.webkitKeys.createSession("video/mp4",i),this._keySession||this._onError(O.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(O.Code.LICENSE_REQUEST_FAILED,{status:i.status,responseText:i.responseText})},n._licenseRequestTime=Date.now(),i.send(e.body)})).catch((function(e){n._errorCallback(new O(O.Severity.CRITICAL,O.Category.NETWORK,O.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(O.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(O.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:H.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 O(O.Severity.CRITICAL,O.Category.NETWORK,O.Code.RESPONSE_FILTER_ERROR,e)),t.destroy()}))}},t._onError=function(e,t){this._errorCallback(new O(O.Severity.CRITICAL,O.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),"_startTimeOfDvrWindow",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._setStarTimeOfDvrWindowInterval(),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.defaultBandwidthEstimate&&(i.abrEwmaDefaultEstimate=a.defaultBandwidthEstimate),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,d=a,p=1/0,h=0,f=a;h<f.length;h++){var g=f[h];if(g.height){var y=Math.abs(g.width/g.height-c);y<p?(p=y,d=[g]):y===p&&d.push(g)}}for(var v=0,m=0,b=d;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="number"==typeof e?e:-1,a=t._startTimeAttach||i;t._loadPromiseReject=r,t._eventManager.listenOnce(t._videoElement,W.LOADED_DATA,(function(){return t._onLoadedData(n,a)})),t._eventManager.listenOnce(t._videoElement,W.PLAYING,(function(){return t._onPlaying(a)})),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 O(O.Severity.CRITICAL,O.Category.MEDIA,O.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&&(j.setAttribute(this._videoElement,"src",""),j.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){if(t._config.useSourceTag){var n,i=document.createElement("source"),a=(null==(n=t._sourceObj)?void 0:n.mimetype.toLowerCase())||"";if(i.setAttribute("src",e.url),i.setAttribute("type",a),t._config.useMediaOptionAttribute){var o={};if(t._config.mediaOptionAttribute&&(o=t._config.mediaOptionAttribute),t._config.abrEwmaDefaultEstimate){var s={start:t._config.abrEwmaDefaultEstimate};F.createPropertyPath(o,"option.adaptiveStreaming.bps",s)}r._logger.debug("Setting mediaOption -",o);var l=encodeURI(JSON.stringify(o));i.setAttribute("type",a+";mediaOption="+l)}t._videoElement.appendChild(i)}else t._videoElement.src=e.url})).catch((function(e){t._trigger(W.ERROR,new O(O.Severity.CRITICAL,O.Category.NETWORK,O.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){"number"==typeof 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 O(O.Severity.CRITICAL,O.Category.NETWORK,O.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){t._maybeRemoveSourceTag(),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(),clearInterval(t._startTimeOfDvrWindowInterval),t._liveDurationChangeInterval&&(clearInterval(t._liveDurationChangeInterval),t._liveDurationChangeInterval=null),n()}),(function(){return r}))}))},o._maybeRemoveSourceTag=function(){if(this._config.useSourceTag&&this._videoElement){var e=this._videoElement.firstChild;e&&(j.setAttribute(e,"src",""),j.removeAttribute(e,"src"),j.removeChild(this._videoElement,e))}},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(!Qe.isExternalTrack(n[i])){var a={kind:n[i].kind,active:n[i].mode===Qe.MODE.SHOWING,label:n[i].label,language:n[i].language,available:!0};if(a.kind===Qe.KIND.SUBTITLES){var o=new Qe(a);r.push(o),this._nativeTextTracksMap[o.index]=n[i]}else if(a.kind===Qe.KIND.CAPTIONS&&this._config.enableCEA708Captions){a.label=a.label||e.shift(),a.language=a.language||t.shift(),a.available=this._captionsHidden;var s=new Qe(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===Qe.KIND.CAPTIONS})),n=t.find((function(e){return e.mode===Qe.MODE.SHOWING||e.mode===Qe.MODE.HIDDEN}))||t[0];n&&(n.mode=Qe.MODE.HIDDEN,this._captionsHidden=!0,this._eventManager.listenOnce(n,"cuechange",(function(){e._getPKTextTracks().forEach((function(e){return(e.available=!0)&&(e.mode=Qe.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 Qe&&Qe.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 Qe}))},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?Qe.MODE.SHOWING:Qe.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(this._videoElement.seekable.length>0&&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.getStartTimeOfDvrWindow=function(){return this._startTimeOfDvrWindow},o._setStarTimeOfDvrWindowInterval=function(){var e=this;this._startTimeOfDvrWindowInterval=setInterval((function(){var t=e._segmentDuration;!e._waitingEventTriggered&&e._getStartTimeOfDvrWindow()&&t&&Math.abs(e._getStartTimeOfDvrWindow()-e._startTimeOfDvrWindow)<=2*t?e._startTimeOfDvrWindow+=1:e._startTimeOfDvrWindow=e._getStartTimeOfDvrWindow()}),1e3)},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",j.createElement("video")),Pt(Dt,"_drmProtocols",[Et]),Pt(Dt,"_drmProtocol",null),Pt(Dt,"_progressiveMimeTypes",["video/mp4","audio/mp3"]);var Lt=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(Lt,"_logger",S("MediaSourceProvider")),Rt(Lt,"_mediaSourceAdapters",[Dt]),Rt(Lt,"_selectedAdapter",null);var Ot=Lt.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 Bt,jt,Ht=n(3);function Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gt=(jt=Bt=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=j.createElement("video"),e._vid.src=Ht.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}(),Vt(Bt,"_logger",S("Html5AutoPlayCapability")),Vt(Bt,"_capabilities",{}),jt);function Kt(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(Kt(a=e.call(this)||this),"_droppedFramesInterval",null),zt(Kt(a),"_lastDroppedFrames",0),zt(Kt(a),"_lastDecodedFrames",0),zt(Kt(a),"_lastTime",0),zt(Kt(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)})),Kt(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=j.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 Lt.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=j.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(){j.setAttribute(e._el,"src",""),j.removeAttribute(e._el,"src"),t()}),n):r.then(t,n)})),this._mediaSourceAdapter=null)},o.destroy=function(){this.detach(),this._el&&(this.pause(),j.removeAttribute(this._el,"src"),j.removeChild(this._el.parentNode,this._el)),this._eventManager.destroy(),Lt.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){Qe.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 O(O.Severity.RECOVERABLE,O.Category.PLAYER,O.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 O(O.Severity.RECOVERABLE,O.Category.PLAYER,O.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 O(O.Severity.RECOVERABLE,O.Category.PLAYER,O.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 O(O.Severity.RECOVERABLE,O.Category.PLAYER,O.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]||j.createElement("video"),this._el.id=B.uniqueId(5),this._el.controls=!1},o._loadMediaSourceAdapter=function(e){this._mediaSourceAdapter=Lt.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 Qe.isNativeTextTrack(e)&&e.mode!==Qe.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!Qe.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 Qe.isNativeTextTrack(e)&&e.mode!==Qe.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 O(O.Severity.CRITICAL,O.Category.MEDIA,O.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=Qe.MODE.HIDDEN,e._eventManager.listen(t,"cuechange",(function(){var t=[];Array.from(e._el.textTracks).forEach((function(e){Qe.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){Qe.isMetaDataTrack(e)&&t(e)})),this._eventManager.listen(this._el.textTracks,"addtrack",(function(e){Qe.isMetaDataTrack(e.track)&&t(e.track)})),this._eventManager.listen(this._el.textTracks,"change",(function(){Array.from(e._el.textTracks).forEach((function(e){Qe.isMetaDataTrack(e)&&e.mode!==Qe.MODE.HIDDEN&&(e.mode=Qe.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 Qt(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",[Gt]),qt(Xt,"id","html5"),qt(Xt,"videoElementStore",{}),qt(Xt,"PLAYBACK_RATES",[.5,1,1.5,2]);var $t=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}();Qt($t,"_logger",S("EngineProvider")),Qt($t,"_engineProviders",{}),Xt.isSupported()&&$t.register(Xt.id,Xt);var Jt=$t.register,Zt=$t.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 Qe})),i=[];return n.forEach((function(e){if(e.language){var n=t._createTextTrack(e);t._maybeAddTrack(n,e,r,i)}else{var a=new O(O.Severity.RECOVERABLE,O.Category.TEXT,O.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 Qe({active:!!e.default,kind:Qe.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 Qe.isNativeTextTrack(e)&&e.mode===Qe.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 O(O.Severity.RECOVERABLE,O.Category.TEXT,O.Code.UNKNOWN_FILE_TYPE,{captionType:a}))),H.execute(i.url,{},"GET").then((function(e){n(a===nn?t._convertSrtToVtt(e):e)})).catch((function(){t._textTrackModel[e.language].cuesStatus=1,r(new O(O.Severity.RECOVERABLE,O.Category.TEXT,O.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&&Qe.isExternalTrack(e)}));t&&(t.cues&&Object.values(t.cues).forEach((function(e){return t.removeCue(e)})),t.mode=Qe.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&&Qe.isExternalTrack(e)}));n&&(n.mode=Qe.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&&Qe.isExternalTrack(e)}))>-1?this._resetExternalNativeTextTrack():e.addTextTrack(Qe.KIND.SUBTITLES,Qe.EXTERNAL_TRACK_ID,Qe.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 dn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var pn=function(){function e(e){dn(this,"_isElementInFullscreen",!1),dn(this,"_isScreenLocked",!1),dn(this,"_isScreenOrientationSupport",!!screen&&!!screen.orientation&&"function"==typeof screen.orientation.unlock&&"function"==typeof screen.orientation.lock),dn(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&&j.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===Ze.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===Ze.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(),j.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=j.getElementBySelector(".playkit-in-browser-fullscreen-mode");e&&j.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 hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fn=function(){function e(){hn(this,"_decoratorProviders",new Map),hn(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 ht(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,H.execute(t.vttUrl,{},"GET");case 3:return e.abrupt("return",e.sent);case 6:throw e.prev=6,e.t0=e.catch(0),new O(O.Severity.RECOVERABLE,O.Category.TEXT,O.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 O(O.Severity.RECOVERABLE,O.Category.TEXT,O.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 O(O.Severity.RECOVERABLE,O.Category.TEXT,O.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 je},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,d=null,p=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 h=o.split(Sn);n=h[0];var f=h[1].split(",").map(Number),g=f[0],y=f[1],v=f[2],m=f[3];d={x:g,y:y},p={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:p,coordinates:d};throw new O(O.Severity.RECOVERABLE,O.Category.TEXT,O.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 Ln(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 On="off",Mn=function(e){var t,n;function r(t){var n;return void 0===t&&(t={}),Ln(Rn(n=e.call(this)||this),"_sources",{}),Ln(Rn(n),"_activeTextCues",[]),Ln(Rn(n),"_textDisplaySettings",{}),Ln(Rn(n),"_playbackAttributesState",{muted:void 0,volume:void 0,rate:void 0,videoTrack:void 0,audioLanguage:"",textLanguage:"",captionsDisplay:void 0}),Ln(Rn(n),"_hasUserInteracted",!1),Ln(Rn(n),"_isOnLiveEdge",!1),Ln(Rn(n),"_shouldLoadAfterAttach",!1),n._setConfigLogLevel(t),n._playerId=B.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 K,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 pn(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"),$t.getEngines().forEach((function(e){return e.runCapabilities()}))},r.getCapabilities=function(e){r._logger.debug("Get player capabilities",e);var t=[];return $t.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=$t.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(j.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 O(O.Severity.CRITICAL,O.Category.PLAYER,O.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 O(O.Severity.CRITICAL,O.Category.PLAYER,O.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=[],Qe.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(j.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&&j.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 fn),e&&this._engineDecoratorManager.register(e)},s._getTargetElement=function(){return j.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 $e.VIDEO:return F.copyDeep(this._getVideoTracks());case $e.AUDIO:return F.copyDeep(this._getAudioTracks());case $e.TEXT:return F.copyDeep(this._getTextTracks());case $e.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===Z.IDLE?this._pendingSelectedVideoTrack=e:this._engine.selectVideoTrack(e)):e instanceof oe?this._engine.selectAudioTrack(e):e instanceof Qe?(this._resetTextDisplay(),e.language===On?(this.hideTextTrack(),this._externalCaptionsHandler.hideTextTrack(),this._playbackAttributesState.captionsDisplay=!1):e.external?(this._engine.hideTextTrack(),this._externalCaptionsHandler.selectTextTrack(e)):(this._externalCaptionsHandler.hideTextTrack(),this._engine.selectTextTrack(e))):e instanceof dt&&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===On}));n&&(n.active=!0,this.dispatchEvent(new m(Y.TEXT_TRACK_CHANGED,{selectedTextTrack:n}))),this._playbackAttributesState.captionsDisplay=!1}},s.showTextTrack=function(){var e=this._getTextTracks(),t=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;$t.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(Je).find((function(t){return e[t]&&e[t].length>0}))},s._createPlayerContainer=function(){var e=this._el=j.createElement("div");j.addClassName(e,"playkit-container"),j.setAttribute(e,"id",this._playerId),j.setAttribute(e,"tabindex","-1")},s._appendEngineEl=function(){if(this._el){var e=this._engine.getVideoElement();j.addClassName(e,"playkit-engine");var t="playkit-engine-"+this._engine.id;j.addClassName(e,t),j.prependTo(e,this._el),"youtube"===this._engine.id&&(this._el.style.zIndex=1)}},s._appendDomElements=function(){this._blackCoverEl=j.createElement("div"),j.addClassName(this._blackCoverEl,"playkit-black-cover"),j.appendChild(this._el,this._blackCoverEl);var e=this._posterManager.getElement();j.addClassName(e,"playkit-poster"),j.appendChild(this._el,e),this._textDisplayEl=j.createElement("div"),j.addClassName(this._textDisplayEl,"playkit-subtitles"),j.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)),e._handlePlaybackRate(),t()})),e._eventManager.listen(e,W.ERROR,(function(e){e.payload.severity===O.Severity.CRITICAL&&n()}))})).catch((function(){}))},s._handlePlaybackRate=function(){"number"==typeof this._playbackAttributesState.rate?this.playbackRate=this._playbackAttributesState.rate:"number"==typeof this._config.playback.playbackRate&&(this.playbackRate=this._config.playback.playbackRate)},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=$t.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,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(t){var n;e._playbackAttributesState.muted=(null==(n=t.payload)?void 0:n.mute)||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=j.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===Z.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._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?i():r.mutedAutoPlay?n()&&!e._fallbackToMutedAutoPlay?a():t?o():s():s()}));var n=function(){r._logger.debug("Checking muted value");var t="boolean"==typeof e._playbackAttributesState.muted&&e._playbackAttributesState.muted||"boolean"==typeof e._config.playback.muted&&e._config.playback.muted||e.muted;return r._logger.debug("Muted value is:",t),t},i=function(){r._logger.debug("Start autoplay"),e._fallbackToMutedAutoPlay&&(e._fallbackToMutedAutoPlay=!1,e.muted=!1),e.play()},a=function(){r._logger.debug("Start muted autoplay"),e.play()},o=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()},s=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(dt)},s._getTextTracks=function(){return this._getTracksByType(Qe)},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 Qe&&(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 Qe({active:!1,kind:Qe.KIND.SUBTITLES,label:"Off",language:On}))},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 Qe.langComparer(On,e.language)})),i=this._getLanguage(this._getTextTracks(),n.textLanguage,t),a=!this._playbackAttributesState.textLanguage||this.config.disableUserCache?i:this._playbackAttributesState.textLanguage,o=this._playbackAttributesState.audioLanguage||this._getLanguage(this._getAudioTracks(),n.audioLanguage,e.audio);n.captionsDisplay?a===n.textLanguage?this._setDefaultTrack(this._getTextTracks(),a,r,n.additionalTextLanguage):this._setDefaultTrack(this._getTextTracks(),a,r):(this._playbackAttributesState.textLanguage=i,this._setDefaultTrack(this._getTextTracks(),On,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(Q.language,e.language)}));i?r=i.language:n&&n.language!==On?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=j.getElementBySelector("."+this._playerId+".playkit-subtitles-style");t||(t=j.createElement("style"),j.addClassName(t,this._playerId),j.addClassName(t,"playkit-subtitles-style"),j.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 Z}},{key:"Track",get:function(){return $e}},{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 Je}},{key:"EngineType",get:function(){return Ze}},{key:"CorsType",get:function(){return nt}},{key:"AdBreakType",get:function(){return on}},{key:"AdTagType",get:function(){return sn}},{key:"Error",get:function(){return O}}])&&Dn(i.prototype,a),o&&Dn(i,o),r}(C);Ln(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.84.1",Bn="@playkit-js/playkit-js";function jn(e){return new Mn(e||{})}var Hn=Mn.getCapabilities,Vn=Mn.setCapabilities;t.default=jn}])},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,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=h(n);i&&i!==f&&e(t,i,r)}var o=c(n);d&&(o=o.concat(d(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=p(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","secondsRewind":"Seek {{seconds}} seconds backwards","forward":"Seek forward","secondsForward":"Seek {{seconds}} seconds 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 bar","readLess":"Less","readMore":"More"},"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","volume_slider_aria_label":"Volume control, use the arrows to control the volume"},"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","network_error":"No internet connection check your network","default_session_text":"Copy for customer care: session ID","retry":"Try again"},"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"},"watermark":{"watermark_alt_text":"Watermark"}}}')},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
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * 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,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,f=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 d:case p:case o:case l:case s:case f:return e;default:switch(e=e&&e.$$typeof){case c:case h:case v:case y:case u:return e;default:return t}}case a:return t}}}function T(e){return k(e)===p}t.AsyncMode=d,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=u,t.Element=i,t.ForwardRef=h,t.Fragment=o,t.Lazy=v,t.Memo=y,t.Portal=a,t.Profiler=l,t.StrictMode=s,t.Suspense=f,t.isAsyncMode=function(e){return T(e)||k(e)===d},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)===h},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)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===p||e===l||e===s||e===f||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===y||e.$$typeof===u||e.$$typeof===c||e.$$typeof===h||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 d=o(c),p={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(a[d].references++,a[d].updater(p)):a.push({identifier:c,updater:g(p,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 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=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 p(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 h=null,f=0;function g(e,t){var n,r,i;if(t.singleton){var a=f++;n=h||(h=l(t)),r=d.bind(null,n,a,!1),i=d.bind(null,n,a,!0)}else n=l(t),r=p.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-background-color: #111111;--playkit-elevated-color: #333333;--playkit-paper-color: #222222;--playkit-protection-color: #222222}.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-5-color)}.playkit-btn-translucent{background-color:rgba(0,0,0,.6)}.playkit-btn-translucent:hover{background-color:rgba(0,0,0,.7)}.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:8px 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:4px 12px;margin:4px;white-space:nowrap;min-height:30px;cursor:pointer;border-radius:4px}.playkit-dropdown-menu .playkit-dropdown-menu-item:hover,.playkit-dropdown-menu .playkit-dropdown-menu-item:focus{background-color:var(--playkit-tone-6-color);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;border-radius:4px;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;z-index:1}.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-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-chapters{background-color:rgba(0,0,0,0)}.playkit-player .playkit-seek-bar .playkit-progress-bar.playkit-chapters .playkit-virtual-progress-indicator{height:8px;transform:translateY(-2px)}.playkit-player .playkit-seek-bar .playkit-progress-bar .playkit-virtual-progress{display:none}.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-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;left:-6px;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:not(.playkit-chapters),.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar:not(.playkit-chapters){height:8px;border-radius:4px;transform:translateY(-2px)}.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar:hover .playkit-progress-bar:not(.playkit-chapters) .playkit-scrubber,.playkit-player:not(.playkit-touch):not(.playkit-size-ty) .playkit-seek-bar.playkit-hover .playkit-progress-bar:not(.playkit-chapters) .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-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 .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-buffered{position:absolute;top:0;left:0;height:100%;border-radius:inherit;background-color:rgba(255,255,255,.3)}.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% !important;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,.playkit-player.playkit-size-sm .playkit-time-display,.playkit-player.playkit-size-xs .playkit-time-display{padding:0 12px}.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-controls-container{width:100%}.playkit-player .playkit-bottom-bar .playkit-controls-container .playkit-left-controls{float:left;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-controls-container .playkit-left-controls .playkit-control-button-container:first-child{margin-left:0px}.playkit-player .playkit-bottom-bar .playkit-controls-container .playkit-right-controls{float:right;text-align:left;pointer-events:none}.playkit-player .playkit-bottom-bar .playkit-controls-container .playkit-right-controls .playkit-control-button-container:last-child{margin-right:0px}.playkit-player .playkit-bottom-bar .playkit-bottom-bar-area{position:relative;pointer-events:none}.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-size-sm .playkit-playback-controls+.playkit-time-display,.playkit-player.playkit-size-xs .playkit-playback-controls+.playkit-time-display{padding-left:0}.playkit-player.playkit-size-sm .playkit-bottom-bar{padding:0 8px 4px}.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:2;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-overlay-active .playkit-gui-area .playkit-pre-playback-play-overlay{opacity:0;visibility:hidden}.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-custom-error-slate .playkit-overlay.playkit-error-overlay .playkit-overlay-contents{padding:0}.playkit-error-overlay{position:relative;display:flex;justify-content:center;align-items:center;flex-direction:column;height:100%;background-size:cover;background-repeat:no-repeat;background-position:center center}.playkit-error-overlay .playkit-copy-url-row{display:flex;align-items:center;margin-bottom:16px}.playkit-error-overlay .playkit-headline{color:var(--playkit-tone-1-color);font-weight:500;font-size:20px;font-style:normal;line-height:22px;margin:0 0 8px 0;text-shadow:0px 4px 4px rgba(0,0,0,.25)}.playkit-error-overlay .playkit-error-session{font-size:14px;color:var(--playkit-tone-1-color);font-style:normal;font-weight:400;line-height:18px;user-select:text;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;max-width:310px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0px 4px 4px rgba(0,0,0,.25)}.playkit-error-overlay .playkit-retry-btn{height:32px;width:auto;min-width:120px;padding:0 8px;border-radius:4px;color:var(--playkit-tone-1-color);border:none;font-size:14px;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:32px;height:32px;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%}.playkit-player .playkit-audio-entry-backdrop{background:linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 100%);bottom:0;left:0;position:absolute;width:100%;pointer-events:none;display:flex;flex-direction:column;justify-content:flex-end}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details{margin:128px 16px 60px 16px;left:16px;color:#fff;max-height:100%;pointer-events:auto;z-index:1}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details.playkit-audio-entry-l{max-width:600px}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details.playkit-audio-entry-m{max-width:min(600px,100%)}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details.playkit-audio-entry-t{max-width:0px}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details.playkit-audio-entry-t .playkit-audio-entry-description{font-size:0}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details .playkit-audio-entry-title{font-size:32px;line-height:38px}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details .playkit-audio-entry-title.playkit-audio-entry-title-trimmed{-webkit-box-orient:vertical;-webkit-line-clamp:1;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.playkit-player .playkit-audio-entry-backdrop .playkit-audio-entry-details .playkit-audio-entry-description{font-size:14px;line-height:18px}.playkit-player .playkit-audio-entry-backdrop.playkit-audio-entry-expanded{overflow:auto;background:rgba(0,0,0,.7);height:100%}.playkit-player .playkit-audio-entry-backdrop.playkit-audio-entry-expanded .playkit-audio-entry-details{overflow:auto;margin:60px 16px}.playkit-player .playkit-expandable-text{text-overflow:ellipsis;overflow:hidden;-webkit-box-orient:vertical;display:-webkit-box}.playkit-player .playkit-more-button-text{pointer-events:auto;cursor:pointer;position:relative;z-index:1;width:fit-content;outline-offset:-1px}.playkit-scrollable{display:flex;width:100%}.playkit-scrollable.playkit-horizontal{flex-direction:row;overflow:auto hidden}.playkit-scrollable.playkit-vertical{flex-direction:column;height:100%;overflow:hidden auto}.playkit-scrollable::-webkit-scrollbar{height:4px;width:4px}.playkit-scrollable::-webkit-scrollbar-track{visibility:hidden}.playkit-scrollable::-webkit-scrollbar-thumb{background-color:rgba(255,255,255,.3);border-radius:3px;visibility:hidden}.playkit-scrollable.playkit-scrolling::-webkit-scrollbar-track,.playkit-scrollable.playkit-scrolling::-webkit-scrollbar-thumb{visibility:visible}",""]),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","btn-translucent":"playkit-btn-translucent",btnTranslucent:"playkit-btn-translucent","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",chapters:"playkit-chapters","virtual-progress-indicator":"playkit-virtual-progress-indicator",virtualProgressIndicator:"playkit-virtual-progress-indicator","non-sticky":"playkit-non-sticky",nonSticky:"playkit-non-sticky",live:"playkit-live",buffered:"playkit-buffered","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","controls-container":"playkit-controls-container",controlsContainer:"playkit-controls-container","left-controls":"playkit-left-controls",leftControls:"playkit-left-controls","right-controls":"playkit-right-controls",rightControls:"playkit-right-controls","bottom-bar-area":"playkit-bottom-bar-area",bottomBarArea:"playkit-bottom-bar-area","playback-controls":"playkit-playback-controls",playbackControls:"playkit-playback-controls","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","gui-area":"playkit-gui-area",guiArea:"playkit-gui-area","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","custom-error-slate":"playkit-custom-error-slate",customErrorSlate:"playkit-custom-error-slate","copy-url-row":"playkit-copy-url-row",copyUrlRow:"playkit-copy-url-row",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","center-playback-controls":"playkit-center-playback-controls",centerPlaybackControls:"playkit-center-playback-controls","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","audio-entry-backdrop":"playkit-audio-entry-backdrop",audioEntryBackdrop:"playkit-audio-entry-backdrop","audio-entry-details":"playkit-audio-entry-details",audioEntryDetails:"playkit-audio-entry-details","audio-entry-l":"playkit-audio-entry-l",audioEntryL:"playkit-audio-entry-l","audio-entry-m":"playkit-audio-entry-m",audioEntryM:"playkit-audio-entry-m","audio-entry-t":"playkit-audio-entry-t",audioEntryT:"playkit-audio-entry-t","audio-entry-description":"playkit-audio-entry-description",audioEntryDescription:"playkit-audio-entry-description","audio-entry-title":"playkit-audio-entry-title",audioEntryTitle:"playkit-audio-entry-title","audio-entry-title-trimmed":"playkit-audio-entry-title-trimmed",audioEntryTitleTrimmed:"playkit-audio-entry-title-trimmed","audio-entry-expanded":"playkit-audio-entry-expanded",audioEntryExpanded:"playkit-audio-entry-expanded","expandable-text":"playkit-expandable-text",expandableText:"playkit-expandable-text","more-button-text":"playkit-more-button-text",moreButtonText:"playkit-more-button-text",scrollable:"playkit-scrollable",horizontal:"playkit-horizontal",vertical:"playkit-vertical",scrolling:"playkit-scrolling"},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 _})),n.d(t,"EventType",(function(){return Rh})),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 dr.a})),n.d(t,"Reducers",(function(){return T})),n.d(t,"Presets",(function(){return k})),n.d(t,"Components",(function(){return E})),n.d(t,"Utils",(function(){return m})),n.d(t,"reducers",(function(){return T})),n.d(t,"presets",(function(){return k})),n.d(t,"components",(function(){return E})),n.d(t,"utils",(function(){return m})),n.d(t,"UIManager",(function(){return Dh})),n.d(t,"VERSION",(function(){return Lh})),n.d(t,"NAME",(function(){return Oh})),n.d(t,"SidePanelPositions",(function(){return Zn})),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 B})),n.d(r,"createRef",(function(){return F})),n.d(r,"isValidElement",(function(){return w})),n.d(r,"Component",(function(){return j})),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 Qt})),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 Zt})),n.d(a,"createStoreHook",(function(){return Jt})),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 dn})),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 pn})),n.d(o,"withText",(function(){return An}));var s={};n.r(s),n.d(s,"types",(function(){return $n})),n.d(s,"SidePanelOrientation",(function(){return Jn})),n.d(s,"SidePanelPositions",(function(){return Zn})),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 Bi})),n.d(c,"initialState",(function(){return ji})),n.d(c,"default",(function(){return Hi})),n.d(c,"actions",(function(){return Vi}));var d={};n.r(d),n.d(d,"types",(function(){return Ki})),n.d(d,"initialState",(function(){return zi})),n.d(d,"default",(function(){return Wi})),n.d(d,"actions",(function(){return Yi}));var p={};n.r(p),n.d(p,"types",(function(){return Xi})),n.d(p,"initialState",(function(){return Qi})),n.d(p,"default",(function(){return $i})),n.d(p,"actions",(function(){return Ji}));var h={};n.r(h),n.d(h,"types",(function(){return ea})),n.d(h,"initialState",(function(){return ta})),n.d(h,"default",(function(){return na})),n.d(h,"actions",(function(){return ra}));var f={};n.r(f),n.d(f,"types",(function(){return aa})),n.d(f,"initialState",(function(){return oa})),n.d(f,"default",(function(){return sa})),n.d(f,"actions",(function(){return la}));var g={};n.r(g),n.d(g,"types",(function(){return ca})),n.d(g,"initialState",(function(){return da})),n.d(g,"default",(function(){return pa})),n.d(g,"actions",(function(){return ha}));var y={};n.r(y),n.d(y,"types",(function(){return ga})),n.d(y,"initialState",(function(){return ya})),n.d(y,"default",(function(){return va})),n.d(y,"actions",(function(){return ma}));var v={};n.r(v),n.d(v,"types",(function(){return Ta})),n.d(v,"initialState",(function(){return Aa})),n.d(v,"default",(function(){return wa})),n.d(v,"actions",(function(){return Sa}));var m={};n.r(m),n.d(m,"bindActions",(function(){return ur})),n.d(m,"KeyMap",(function(){return On})),n.d(m,"getLogger",(function(){return Dn})),n.d(m,"withKeyboardA11y",(function(){return Va})),n.d(m,"toHHMMSS",(function(){return Ga})),n.d(m,"toSecondsFromHHMMSS",(function(){return Ka})),n.d(m,"formatOnlyNumbersInput",(function(){return za}));var b={};n.r(b),n.d(b,"isPlayingAdOrPlayback",(function(){return To}));var _={};n.r(_),n.d(_,"withEventManager",(function(){return jr})),n.d(_,"EventType",(function(){return Ln}));var E={};n.r(E),n.d(E,"AdLearnMore",(function(){return Nl})),n.d(E,"AdSkip",(function(){return Bl})),n.d(E,"AdNotice",(function(){return jl})),n.d(E,"BaseComponent",(function(){return $l})),n.d(E,"BottomBar",(function(){return ou})),n.d(E,"CVAAOverlay",(function(){return Hu})),n.d(E,"DropDown",(function(){return Eu})),n.d(E,"EngineConnector",(function(){return La})),n.d(E,"ErrorOverlay",(function(){return ac})),n.d(E,"EventDispatcherProvider",(function(){return Zr})),n.d(E,"withEventDispatcher",(function(){return hi})),n.d(E,"Keyboard",(function(){return Cs})),n.d(E,"withKeyboardEvent",(function(){return Bs})),n.d(E,"KeyboardEventProvider",(function(){return Ds})),n.d(E,"Icon",(function(){return Eo})),n.d(E,"IconType",(function(){return mo})),n.d(E,"IconState",(function(){return _o})),n.d(E,"BadgeType",(function(){return bo})),n.d(E,"LiveTag",(function(){return lc})),n.d(E,"Loading",(function(){return ro})),n.d(E,"Menu",(function(){return yu})),n.d(E,"Overlay",(function(){return zu})),n.d(E,"OverlayAction",(function(){return Po})),n.d(E,"OverlayPortal",(function(){return hc})),n.d(E,"PlayerProvider",(function(){return Ar})),n.d(E,"withPlayer",(function(){return Sr})),n.d(E,"PrePlaybackPlayOverlay",(function(){return Ko})),n.d(E,"SeekBarLivePlaybackContainer",(function(){return mc})),n.d(E,"SeekBarPlaybackContainer",(function(){return $p})),n.d(E,"withLogger",(function(){return Bn})),n.d(E,"Shell",(function(){return Ti})),n.d(E,"PLAYER_SIZE",(function(){return Ei})),n.d(E,"PLAYER_BREAK_POINTS",(function(){return ki})),n.d(E,"Slider",(function(){return wu})),n.d(E,"SmartContainer",(function(){return Ec})),n.d(E,"SmartContainerItem",(function(){return kc})),n.d(E,"TimeDisplay",(function(){return Ac})),n.d(E,"TimeDisplayAdsContainer",(function(){return Cc})),n.d(E,"TimeDisplayPlaybackContainer",(function(){return Pc})),n.d(E,"Tooltip",(function(){return Oo})),n.d(E,"ToolTipType",(function(){return Lo})),n.d(E,"TopBar",(function(){return Oc})),n.d(E,"UnmuteIndication",(function(){return jc})),n.d(E,"VideoPlayer",(function(){return Na})),n.d(E,"Watermark",(function(){return zc})),n.d(E,"Logo",(function(){return Xc})),n.d(E,"CastOverlay",(function(){return td})),n.d(E,"CastBeforePlay",(function(){return ud})),n.d(E,"CastAfterPlay",(function(){return hd})),n.d(E,"PlaylistButton",(function(){return Ed})),n.d(E,"PrevNext",(function(){return gd})),n.d(E,"PlaylistNextScreen",(function(){return Pd})),n.d(E,"PictureInPicture",(function(){return Od})),n.d(E,"PlaybackControls",(function(){return Md})),n.d(E,"CopyButton",(function(){return Ju})),n.d(E,"ButtonControl",(function(){return ns})),n.d(E,"Button",(function(){return Ho})),n.d(E,"ToggleSwitch",(function(){return Vd})),n.d(E,"AudioMenu",(function(){return Xd})),n.d(E,"CaptionsMenu",(function(){return ip})),n.d(E,"SpeedMenu",(function(){return dp})),n.d(E,"QualityMenu",(function(){return yp})),n.d(E,"HeightResolution",(function(){return pp})),n.d(E,"getLabelBadgeType",(function(){return hp})),n.d(E,"AdvancedAudioDescToggle",(function(){return bp})),n.d(E,"ExpandableText",(function(){return Ap})),n.d(E,"Scrollable",(function(){return xp})),n.d(E,"ProgressIndicator",(function(){return Ip})),n.d(E,"SeekBarPreview",(function(){return Bp})),n.d(E,"PlayerArea",(function(){return qn})),n.d(E,"withPlayerPreset",(function(){return Ui})),n.d(E,"Remove",(function(){return Vn})),n.d(E,"VideoArea",(function(){return Up})),n.d(E,"GuiArea",(function(){return so})),n.d(E,"InteractiveArea",(function(){return Fp})),n.d(E,"KeyboardControl",(function(){return Cs})),n.d(E,"Cast",(function(){return Xs})),n.d(E,"CastControl",(function(){return Xs})),n.d(E,"Fullscreen",(function(){return rl})),n.d(E,"FullscreenControl",(function(){return rl})),n.d(E,"PlayPause",(function(){return ll})),n.d(E,"PlayPauseControl",(function(){return ll})),n.d(E,"Rewind",(function(){return ps})),n.d(E,"RewindControl",(function(){return ps})),n.d(E,"Forward",(function(){return bs})),n.d(E,"ForwardControl",(function(){return bs})),n.d(E,"SeekBar",(function(){return Yp})),n.d(E,"SeekBarControl",(function(){return Yp})),n.d(E,"Settings",(function(){return ml})),n.d(E,"SettingsControl",(function(){return ml})),n.d(E,"Volume",(function(){return Sl})),n.d(E,"VolumeControl",(function(){return Sl})),n.d(E,"VrStereo",(function(){return Pl})),n.d(E,"VrStereoControl",(function(){return Pl})),n.d(E,"ClosedCaptions",(function(){return Rl})),n.d(E,"ClosedCaptionsControl",(function(){return Rl}));var k={};n.r(k),n.d(k,"idleUI",(function(){return uo})),n.d(k,"playbackUI",(function(){return uh})),n.d(k,"adsUI",(function(){return hh})),n.d(k,"errorUI",(function(){return gh})),n.d(k,"liveUI",(function(){return mh})),n.d(k,"imgUI",(function(){return Eh}));var T={};n.r(T),n.d(T,"config",(function(){return l})),n.d(T,"cvaa",(function(){return h})),n.d(T,"engine",(function(){return u})),n.d(T,"getters",(function(){return b})),n.d(T,"loading",(function(){return p})),n.d(T,"overlayAction",(function(){return g})),n.d(T,"playlist",(function(){return y})),n.d(T,"seekbar",(function(){return c})),n.d(T,"setting",(function(){return f})),n.d(T,"shell",(function(){return s})),n.d(T,"volume",(function(){return d})),n.d(T,"overlay",(function(){return v}));var A,w,S,C,x,I,P,D={},R=[],L=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function O(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 B(e){return e.children}function j(e,t){this.props=e,this.context=t}function H(e,t){if(null==t)return e.__?H(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?H(e):null}function V(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 V(e)}}function G(e){(!e.__d&&(e.__d=!0)&&S.push(e)&&!K.__r++||x!==A.debounceRendering)&&((x=A.debounceRendering)||C)(K)}function K(){for(var e;K.__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=O({},a)).__v=r,i=$(s,a,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==o?H(a):o),J(n,a),i!=o&&V(a)))}))}function z(e,t,n,r,i,a,o,s,l,u){var c,d,p,h,f,g,y,v=r&&r.__k||R,m=v.length;for(l==D&&(l=null!=o?o[0]:m?H(r,0):null),n.__k=[],c=0;c<t.length;c++)if(null!=(h=n.__k[c]=null==(h=t[c])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h?U(null,h,null,null,h):Array.isArray(h)?U(B,{children:h},null,null,null):null!=h.__e||null!=h.__c?U(h.type,h.props,h.key,null,h.__v):h)){if(h.__=n,h.__b=n.__b+1,null===(p=v[c])||p&&h.key==p.key&&h.type===p.type)v[c]=void 0;else for(d=0;d<m;d++){if((p=v[d])&&h.key==p.key&&h.type===p.type){v[d]=void 0;break}p=null}f=$(e,h,p=p||D,i,a,o,s,l,u),(d=h.ref)&&p.ref!=d&&(y||(y=[]),p.ref&&y.push(p.ref,null,h),y.push(d,h.__c||f,h)),null!=f?(null==g&&(g=f),l=Y(e,h,p,v,o,f,l),"option"==n.type?e.value="":"function"==typeof n.type&&(n.__d=l)):l&&p.__e==l&&l.parentNode!=e&&(l=H(p))}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++)Z(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===L.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,Q,o),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,Q,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 Q(e){this.l[e.type](A.event?A.event(e):e)}function $(e,t,n,r,i,a,o,s,l){var u,c,d,p,h,f,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 j(y,m),c.constructor=_,c.render=te),v&&v.sub(c),c.props=y,c.state||(c.state={}),c.context=m,c.__n=r,d=c.__d=!0,c.__h=[]),null==c.__s&&(c.__s=c.state),null!=_.getDerivedStateFromProps&&(c.__s==c.state&&(c.__s=O({},c.__s)),O(c.__s,_.getDerivedStateFromProps(y,c.__s))),p=c.props,h=c.state,d)null==_.getDerivedStateFromProps&&null!=c.componentWillMount&&c.componentWillMount(),null!=c.componentDidMount&&c.__h.push(c.componentDidMount);else{if(null==_.getDerivedStateFromProps&&y!==p&&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(p,h,f)}))}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=O(O({},r),c.getChildContext())),d||null==c.getSnapshotBeforeUpdate||(f=c.getSnapshotBeforeUpdate(p,h)),b=null!=u&&u.type==B&&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,d,p,h=n.props,f=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(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,f.is&&{is:f.is}),a=null,s=!1}if(null===t.type)h!==f&&e.data!=f&&(e.data=f);else{if(null!=a&&(a=R.slice.call(e.childNodes)),c=(h=n.props||D).dangerouslySetInnerHTML,d=f.dangerouslySetInnerHTML,!s){if(null!=a)for(h={},p=0;p<e.attributes.length;p++)h[e.attributes[p].name]=e.attributes[p].value;(d||c)&&(d&&c&&d.__html==c.__html||(e.innerHTML=d&&d.__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,f,h,i,s),d?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 f&&void 0!==(l=f.value)&&l!==e.value&&X(e,"value",l,h.value,!1),"checked"in f&&void 0!==(l=f.checked)&&l!==e.checked&&X(e,"checked",l,h.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 J(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 Z(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||Z(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(B,null,[e]),a=[],$(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),J(a,e)}function re(e,t){ne(e,t,I)}function ie(e,t){var n,r;for(r in t=O(O({},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,G(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 G(n.__E=n)}catch(t){e=t}throw e}},w=function(e){return null!=e&&void 0===e.constructor},j.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=O({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&O(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),G(this))},j.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),G(this))},j.prototype.render=B,S=[],C="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,K.__r=0,I=D,P=0;var oe,se,le,ue=0,ce=[],de=A.__r,pe=A.diffed,he=A.__c,fe=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){de&&de(e),oe=0;var t=(se=e.__c).__H;t&&(t.__h.forEach(Ie),t.__h.forEach(Pe),t.__h=[])},A.diffed=function(e){pe&&pe(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)}})),he&&he(e,t)},A.unmount=function(e){fe&&fe(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 Le(e,t){for(var n in t)e[n]=t[n];return e}function Oe(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 Oe(this.props,e)||Oe(this.state,t)},r}(j),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=Le({},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 Be=function(e,t){return e?W(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},je={map:Be,forEach:Be,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},He=A.__e;function Ve(e){return e&&((e=Le({},e)).__c=null,e.__k=e.__k&&e.__k.map(Ve)),e}function Ge(){this.__u=0,this.o=null,this.__b=null}function Ke(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);He(e,t,n)},(Ge.prototype=new j).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=Ke(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)},Ge.prototype.render=function(e,t){return this.__b&&(this.__v.__k&&(this.__v.__k[0]=Ve(this.__b)),this.__b=null),[N(B,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 j).u=function(e){var t=this,n=Ke(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 Qe=/^(?: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]/;j.prototype.isReactComponent={};var $e="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Je=A.event;function Ze(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){Je&&(e=Je(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===$e}A.vnode=function(e){e.$$typeof=$e;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=Qe.test(a))break;if(r)for(a in i=e.props={},n)i[Qe.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&&(Ze(t.prototype,"componentWillMount"),Ze(t.prototype,"componentWillReceiveProps"),Ze(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:je,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:B,isValidElement:nt,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:j,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:Oe(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:B,Suspense:Ge,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 dt(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 pt=n(2),ht=n.n(pt),ft=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,d=null,p=function(){if(!c){var e,n,p=t.getState();try{e=r(p,i.current)}catch(e){n=e,d=e}n||(d=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=p,n.trySubscribe(),p(),function(){if(c=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}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,d=n.storeKey,p=void 0===d?"store":d,h=(n.withRef,n.forwardRef),f=void 0!==h&&h,g=n.context,y=void 0===g?at:g,v=dt(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:p,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=v.pure,u=s?ke:function(e){return e()};function d(n){var r=ke((function(){var e=n.reactReduxForwardedRef,t=dt(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(ft.isContextConsumer)(it.createElement(i.Consumer,null))?i:m}),[i,m]),d=Ae(l),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(d)&&Boolean(d.store);var h=p?n.store:d.store,f=ke((function(){return function(t){return e(t.dispatch,a)}(h)}),[h]),g=ke((function(){if(!c)return vt;var e=new lt(h,p?null:d.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[h,p,d]),y=g[0],v=g[1],b=ke((function(){return p?d:ct({},d,{subscription:y})}),[p,d,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:f(h.getState(),s)}),[h,E,s]);bt(_t,[A,T,S,s,C,w,v]),bt(Et,[c,h,y,f,A,T,S,w,v,k],[h,y,f]);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 h=s?it.memo(d):d;if(h.WrappedComponent=t,h.displayName=r,f){var g=it.forwardRef((function(e,t){return it.createElement(h,ct({},e,{reactReduxForwardedRef:t}))}));return g.displayName=r,g.WrappedComponent=t,ht()(g,t)}return ht()(h,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 d(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 p(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 h(e){if("function"!=typeof e)throw new Error("Expected the nextReducer to be a function.");i=e,p({type:xt.REPLACE})}function f(){var e,t=d;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 p({type:xt.INIT}),(r={dispatch:p,subscribe:d,getState:c,replaceReducer:h})[St.a]=f,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 Lt(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 Ot(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){Ot(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 Bt(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function jt(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=Bt(e);var i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=Bt(i),i=r(t,n)),i},r}}var Ht=[function(e){return"function"==typeof e?jt(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 Lt(e,t)})):void 0}],Vt=[function(e){return"function"==typeof e?jt(e):void 0},function(e){return e?void 0:Ft((function(){return{}}))}];function Gt(e,t,n){return ct({},n,{},e,{},t)}var Kt=[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 Gt}}];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,d=i.areOwnPropsEqual,p=i.areStatePropsEqual,h=!1;function f(i,h){var f,g,y=!d(h,o),v=!c(i,a);return a=i,o=h,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?(f=e(a,o),g=!p(f,s),s=f,g&&(u=n(s,l,o)),u):u}return function(i,c){return h?f(i,c):(s=e(a=i,o=c),l=t(r,o),u=n(s,l,o),h=!0,u)}}function Yt(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,i=t.initMergeProps,a=dt(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 Qt=function(e){var t=void 0===e?{}:e,n=t.connectHOC,r=void 0===n?Tt:n,i=t.mapStateToPropsFactories,a=void 0===i?Vt:i,o=t.mapDispatchToPropsFactories,s=void 0===o?Ht:o,l=t.mergePropsFactories,u=void 0===l?Kt:l,c=t.selectorFactory,d=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,p=o.areStatesEqual,h=void 0===p?Xt:p,f=o.areOwnPropsEqual,g=void 0===f?wt:f,y=o.areStatePropsEqual,v=void 0===y?wt:y,m=o.areMergedPropsEqual,b=void 0===m?wt:m,_=dt(o,["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"]),E=qt(e,a,"mapStateToProps"),k=qt(t,s,"mapDispatchToProps"),T=qt(n,u,"mergeProps");return r(d,ct({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:E,initMapDispatchToProps:k,initMergeProps:T,pure:c,areStatesEqual:h,areOwnPropsEqual:g,areStatePropsEqual:v,areMergedPropsEqual:b},_))}}();function $t(){return Ae(at)}function Jt(e){void 0===e&&(e=at);var t=e===at?$t:function(){return Ae(e)};return function(){return t().store}}var Zt=Jt();function en(e){void 0===e&&(e=at);var t=e===at?Zt:Jt(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?$t: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(),d=n.getState();try{i=e!==l.current||d!==u.current||s.current?e(d):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=d,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/,dn=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}(j);function pn(e,t){if(arguments.length<2)return t=e,function(e){return pn(e,t)};function n(n){return N(dn,t||{},N(e,n))}return n.getWrappedComponent=e&&e.getWrappedComponent||function(){return e},n}var hn,fn={};function gn(e,t){return hn=t||fn,e&&e.replace(/\{\{([\w.-]+)\}\}/g,yn)}function yn(e,t){for(var n=t.split("."),r=hn,i=0;i<n.length;i++)if(null==(r=r[n[i]]))return"";return"string"==typeof r&&r.match(/\{\{/)&&(r=gn(r,hn)),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}}pn.intl=pn,pn.IntlProvider=dn,pn.Text=bn,pn.MarkupText=kn,pn.Localizer=En,pn.withText=An;var wn=pn;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",Ln={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"},On={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,Bn=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}(j)}};function jn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Vn="remove";function Gn(e,t){return e[t]=e[t]||{before:[],after:[],replace:null},e[t]}var Kn,zn,Wn,Yn={playerAreaComponents:null,hasPositionedComponents:!1,presetComponentsOnlyMode:!0},qn=Bn("PlayerArea")(Nn=Qt((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 Hn(jn(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?(Gn(a,e.beforeComponent).before.push(e),s=!0):e.afterComponent?(Gn(a,e.afterComponent).after.push(e),s=!0):e.replaceComponent?(Gn(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===B?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(B,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===B)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===Vn)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}(j),Hn(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 Qn(){return(Qn=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 $n={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"},Jn={VERTICAL:"vertical",HORIZONTAL:"horizontal"},Zn={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",Img:"Img"},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:(Kn={},Kn[Zn.LEFT]={},Kn[Zn.RIGHT]={},Kn[Zn.TOP]={},Kn[Zn.BOTTOM]={},Kn)},playerHover:!1,playerNav:!1,smartContainerOpen:!1,activePresetName:"",sidePanelsModes:(zn={},zn[Zn.LEFT]=er.HIDDEN,zn[Zn.RIGHT]=er.HIDDEN,zn[Zn.TOP]=er.HIDDEN,zn[Zn.BOTTOM]=er.HIDDEN,zn),sidePanelsSizes:(Wn={},Wn[Jn.VERTICAL]={min:240,max:480,ratio:.33},Wn[Jn.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 $n.ADD_PLAYER_CLASS:return e.playerClasses.includes(t.className)?e:Qn({},e,{playerClasses:[].concat(e.playerClasses,[t.className])});case $n.REMOVE_PLAYER_CLASS:return Qn({},e,{playerClasses:e.playerClasses.filter((function(e){return e!==t.className}))});case $n.UPDATE_IS_MOBILE:return Qn({},e,{isMobile:t.isMobile});case $n.UPDATE_PLAYER_SIZE:return Qn({},e,{playerSize:t.playerSize});case $n.UPDATE_IS_SMALL_SIZE:return Qn({},e,{isSmallSize:t.isSmallSize});case $n.UPDATE_GUI_CLIENT_RECT:return Qn({},e,{guiClientRect:t.guiClientRect});case $n.UPDATE_PLAYER_CLIENT_RECT:return Qn({},e,{playerClientRect:t.playerClientRect});case $n.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,d=l.gui;return Qn({},e,{layoutStyles:{sidePanels:(r={},r[Zn.LEFT]=Xn(a[Zn.LEFT],u[Zn.LEFT])?a[Zn.LEFT]:u[Zn.LEFT],r[Zn.RIGHT]=Xn(a[Zn.RIGHT],u[Zn.RIGHT])?a[Zn.RIGHT]:u[Zn.RIGHT],r[Zn.TOP]=Xn(a[Zn.TOP],u[Zn.TOP])?a[Zn.TOP]:u[Zn.TOP],r[Zn.BOTTOM]=Xn(a[Zn.BOTTOM],u[Zn.BOTTOM])?a[Zn.BOTTOM]:u[Zn.BOTTOM],r),video:Xn(o,c)?o:c,gui:Xn(s,d)?s:d}});case $n.UPDATE_VIDEO_CLIENT_RECT:return Qn({},e,{videoClientRect:t.videoClientRect});case $n.UPDATE_DOCUMENT_WIDTH:return Qn({},e,{documentWidth:t.documentWidth});case $n.UPDATE_PLAYER_HOVER_STATE:return Qn({},e,{playerHover:t.hover});case $n.UPDATE_PLAYER_NAV_STATE:return Qn({},e,{playerNav:t.nav});case $n.UPDATE_SMART_CONTAINER_OPEN:return Qn({},e,{smartContainerOpen:t.open});case $n.UPDATE_ACTIVE_PRESET_NAME:return Qn({},e,{activePresetName:t.activePresetName});case $n.UPDATE_SIDE_PANEL_MODE:return Qn({},e,{sidePanelsModes:Qn({},e.sidePanelsModes,(n={},n[t.position]=t.sidePanelMode,n))});case $n.UPDATE_SIDE_PANEL_SIZE:var p,h=t.options,f=h.ratio,g=h.min,y=h.max,v=e.sidePanelsSizes[t.orientation],m={ratio:"number"==typeof f&&f<=1?f:v.ratio,min:"number"==typeof g?g:v.min,max:"number"==typeof y?y:v.max};return Qn({},e,{sidePanelsSizes:Qn({},e.sidePanelsSizes,(p={},p[t.orientation]=m,p))});case $n.UPDATE_PRESET_SETTINGS:return Qn({},e,{presetSettings:Qn({},{allowSidePanels:!1,allowPlayerArea:!1},t.presetSettings||{})});default:return e}},sr={addPlayerClass:function(e){return{type:$n.ADD_PLAYER_CLASS,className:e}},removePlayerClass:function(e){return{type:$n.REMOVE_PLAYER_CLASS,className:e}},updateIsMobile:function(e){return{type:$n.UPDATE_IS_MOBILE,isMobile:e}},updatePlayerSize:function(e){return{type:$n.UPDATE_PLAYER_SIZE,playerSize:e}},updateIsSmallSize:function(e){return{type:$n.UPDATE_IS_SMALL_SIZE,isSmallSize:e}},updateGuiClientRect:function(e){return{type:$n.UPDATE_GUI_CLIENT_RECT,guiClientRect:e}},updatePlayerClientRect:function(e){return{type:$n.UPDATE_PLAYER_CLIENT_RECT,playerClientRect:e}},updateVideoClientRect:function(e){return{type:$n.UPDATE_VIDEO_CLIENT_RECT,videoClientRect:e}},updateDocumentWidth:function(e){return{type:$n.UPDATE_DOCUMENT_WIDTH,documentWidth:e}},updatePlayerHoverState:function(e){return{type:$n.UPDATE_PLAYER_HOVER_STATE,hover:e}},updatePlayerNavState:function(e){return{type:$n.UPDATE_PLAYER_NAV_STATE,nav:e}},updateSmartContainerOpen:function(e){return{type:$n.UPDATE_SMART_CONTAINER_OPEN,open:e}},updateActivePresetName:function(e){return{type:$n.UPDATE_ACTIVE_PRESET_NAME,activePresetName:e}},updateSidePanelMode:function(e,t){return{type:$n.UPDATE_SIDE_PANEL_MODE,position:e,sidePanelMode:t}},updateSidePanelSize:function(e,t){return{type:$n.UPDATE_SIDE_PANEL_SIZE,orientation:e,options:t}},updatePresetSettings:function(e){return{type:$n.UPDATE_PRESET_SETTINGS,presetSettings:e}},updateLayoutStyles:function(e){return{type:$n.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({},Lt(e,t))}}var cr=n(0),dr=n.n(cr);function pr(e,t,n){var r=n.config.components&&n.config.components[e];return r?Cn(t,r):t}function hr(e,t,n){return n.componentAlias===e?Cn(t,n.config):t}function fr(){return(fr=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 fr({},e,Cn({},e,t.config));case gr.UPDATE_COMPONENT:var n;return fr({},e,{components:fr({},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_AUDIO:"engine/UPDATE_IS_AUDIO",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,isAudio:!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 pr("engine",e,t);case gr.UPDATE_COMPONENT:return hr("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_AUDIO:return br({},e,{isAudio:t.isAudio});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}},updateIsAudio:function(e){return{type:_r.UPDATE_IS_AUDIO,isAudio: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}(j);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}(j)};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=Ln,"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 Lr(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 Or=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 Lr(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)?Lr(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 Br,jr=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 Or),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}(j)},Hr=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),Vr=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),Gr=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),Kr=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),Qr=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 $r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Jr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Zr=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 Jr($r(t=e.call.apply(e,[this].concat(r))||this),"_notifyClick",(function(e){return ni(t.props.store,e,t.props.player)})),Jr($r(t),"_notifyChange",(function(e){return ti(t.props.store,e,t.props.player)})),Jr($r(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}(j);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 Qr(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"CVAAOverlay":n.dispatchEvent(new Gr(t.payload.textStyle));break;case"Fullscreen":ai(0,0,n);break;case"CaptionsMenu":!function(e,t,n){t.payload.type===n.Track.TEXT&&n.dispatchEvent(new Vr(t.payload.track))}(0,t,n);break;case"AudioMenu":!function(e,t,n){t.payload.type===n.Track.AUDIO&&n.dispatchEvent(new Hr(t.payload.track))}(0,t,n);break;case"QualityMenu":!function(e,t,n){t.payload.type===n.Track.VIDEO&&n.dispatchEvent(new Kr(t.payload.track))}(0,t,n);break;case"SpeedMenu":!function(e,t,n){"speed"===t.payload.type&&n.dispatchEvent(new Wr(t.payload.speed))}(0,t,n);break;case"AdvancedAudioDescToggle":!function(e,t,n){"AdvancedAudioDescription"===t.payload.type&&n.dispatchEvent(new Dr(Dr.Type.USER_CLICKED_ADVANCED_AUDIO_DESCRIPTION,t.payload))}(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=((Br={})[On.SPACE]=function(e,t,n){ri(e,0,n)},Br[On.UP]=function(e,t,n){n.dispatchEvent(new Qr(t.payload.volume))},Br[On.DOWN]=function(e,t,n){n.dispatchEvent(new Qr(t.payload.volume))},Br[On.F]=function(e,t,n){ai(0,0,n)},Br[On.P]=function(e,t,n){oi(0,0,n)},Br[On.ESC]=function(e,t,n){ai(0,0,n)},Br[On.LEFT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Br[On.RIGHT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Br[On.HOME]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Br[On.END]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Br[On.M]=function(e,t,n){ii(e,0,n)},Br[On.SEMI_COLON]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Br[On.PERIOD]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Br[On.COMMA]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Br[On.C]=function(e,t,n){n.dispatchEvent(new Vr(t.payload.track))},Br);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,di,pi,hi=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}(j)}},fi=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={TINY:280,EXTRA_SMALL:380,SMALL:480,MEDIUM:768,LARGE:1024},Ti=(ui=Qt((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=Bn("Shell"),di=hi("Shell"),ui(pi=Sr(pi=jr(pi=ci(pi=di(pi=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!==On.TAB||(t.setState({nav:!0}),t.props.updatePlayerNavState(!0)),!t.state.nav||e.keyCode!==On.ENTER&&e.keyCode!==On.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 fi,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=[dr.a.player,dr.a.skinDefault].concat(this._environmentClasses).concat(e.playerClasses);return this.props.prePlayback&&n.push(dr.a.prePlayback),this.props.isCasting&&n.push("playkit-casting"),this.props.isMobile&&n.push(dr.a.touch),this.props.playerNav&&n.push(dr.a.nav),(this.props.playerHover||this.props.playerNav)&&n.push(dr.a.hover),this.props.metadataLoaded&&n.push(dr.a.metadataLoaded),this.props.adBreak&&n.push(dr.a.adBreak),this.props.metadataLoaded&&n.push(dr.a["state-"+this.props.currentState]),this.props.seekbarDraggingActive&&n.push(dr.a.hover),this.props.fullscreen&&n.push(dr.a.fullscreen),this.props.playlist&&n.push(dr.a.playlist),this.props.guiClientRect&&(this.props.guiClientRect.width<=ki.TINY?(n.push(dr.a.sizeTy),this.props.updatePlayerSize(Ei.TINY)):this.props.guiClientRect.width<=ki.EXTRA_SMALL?(n.push(dr.a.sizeXs),this.props.updatePlayerSize(Ei.EXTRA_SMALL)):this.props.guiClientRect.width<=ki.SMALL?(n.push(dr.a.sizeSm),this.props.updatePlayerSize(Ei.SMALL)):this.props.guiClientRect.width<=ki.MEDIUM?(n.push(dr.a.sizeMd),this.props.updatePlayerSize(Ei.MEDIUM)):this.props.guiClientRect.width<=ki.LARGE?(n.push(dr.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:"-1",ref:function(e){return t._playerRef=e},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}(j))||pi)||pi)||pi)||pi)||pi);function Ai(){return(Ai=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 wi(e){var t,n=e.sidePanelsSizes,r=e.sidePanelsModes,i=e.playerClientRect,a=e.isVideo,o=n[Jn.VERTICAL],s=i.width,l=Math.max(o.min,Math.min(o.max,s*o.ratio)),u=r[Zn.LEFT],c=r[Zn.RIGHT],d=s-(t=a?u===er.ALONGSIDE&&c===er.ALONGSIDE?2:1:u!==er.HIDDEN&&c!==er.HIDDEN?2:1)*l;return s<ki.SMALL&&(d=s,l=s),{verticalPanelWidth:l,videoWidth:d,verticalPanelCount:t}}function Si(e){var t,n=e.sidePanelsSizes,r=e.sidePanelsModes,i=e.playerClientRect,a=e.isVideo,o=n[Jn.HORIZONTAL],s=i.height,l=Math.max(o.min,Math.min(o.max,s*o.ratio)),u=r[Zn.TOP],c=r[Zn.BOTTOM],d=s-(t=a?u===er.ALONGSIDE&&c===er.ALONGSIDE?2:1:u!==er.HIDDEN&&c!==er.HIDDEN?2:1)*l;return i.width<ki.SMALL&&(d=s,l=s),{horizontalPanelHeight:l,videoHeight:d,horizontalPanelCount:t}}function Ci(e){var t=e.sidePanelsModes,n=e.allowSidePanels,r={position:"absolute",left:0,right:0,top:0,bottom:0},i=n?t[Zn.LEFT]:er.HIDDEN,a=n?t[Zn.RIGHT]:er.HIDDEN,o=n?t[Zn.TOP]:er.HIDDEN,s=n?t[Zn.BOTTOM]:er.HIDDEN;if(e.playerClientRect.width>ki.SMALL){if(i===er.ALONGSIDE||a===er.ALONGSIDE){var l=wi(Ai({},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 d=Si(Ai({},e,{isVideo:!0})),p=d.horizontalPanelHeight,h=d.videoHeight;r.top=o===er.ALONGSIDE?p:0,r.bottom=s===er.ALONGSIDE?p:0,r.height=h,r.position="absolute"}}return r}function xi(e){var t=e.position,n=e.sidePanelsModes,r=n[Zn.LEFT],i=n[Zn.RIGHT],a=n[Zn.TOP],o=n[Zn.BOTTOM];if(-1!==[Zn.RIGHT,Zn.LEFT].indexOf(t)){var s={},l=wi(e).verticalPanelWidth;return s.width=l,t===Zn.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=Si(e).horizontalPanelHeight,d=wi(e).verticalPanelWidth;return u.height=c,r!==er.HIDDEN&&(u.left=d),i!==er.HIDDEN&&(u.right=d),t===Zn.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 Ii(){return(Ii=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 Pi(e){var t,n;return e.allowSidePanels?((t={})[Zn.TOP]=xi(Ii({},e,{position:Zn.TOP})),t[Zn.BOTTOM]=xi(Ii({},e,{position:Zn.BOTTOM})),t[Zn.RIGHT]=xi(Ii({},e,{position:Zn.RIGHT})),t[Zn.LEFT]=xi(Ii({},e,{position:Zn.LEFT})),t):((n={})[Zn.TOP]={},n[Zn.BOTTOM]={},n[Zn.RIGHT]={},n[Zn.LEFT]={},n)}var Di,Ri=Qt((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[Zn.LEFT]:er.HIDDEN,l=r?t[Zn.RIGHT]:er.HIDDEN,u=r?t[Zn.TOP]:er.HIDDEN,c=r?t[Zn.BOTTOM]:er.HIDDEN;if(n.width>ki.SMALL){if(s!==er.HIDDEN||l!==er.HIDDEN){var d=wi(e).verticalPanelWidth;s!==er.HIDDEN&&(i.left=d),l!==er.HIDDEN&&(i.right=d)}if(u!==er.HIDDEN||c!==er.HIDDEN){var p=Si(e).horizontalPanelHeight;u!==er.HIDDEN&&(i.top=p),c!==er.HIDDEN&&(i.bottom=p)}a=a-i.right-i.left,o=o-i.top-i.bottom}var h=n.left+(s!==er.HIDDEN?i.left:0),f=n.top+(u!==er.HIDDEN?i.top:0);return{style:i,rect:{x:h,y:f,width:a,height:o,top:f,right:n.right+(l!==er.HIDDEN?i.right:0),bottom:n.bottom+(c!==er.HIDDEN?i.bottom:0),left:h}}}(e),n=t.style,r=t.rect;this.props.updateLayoutStyles({gui:n,video:Ci(e),sidePanels:Pi(e)}),this.props.updateGuiClientRect(r)},i.render=function(){return null},r}(j))||_i;function Li(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 Mi=Bn("PlayerAreaProvider")(Di=Qt((function(e){return{activePresetName:e.shell.activePresetName}}))(Di=function(e){var t,n;function r(){var t;return Oi(Li(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(Li(t),"_addNewComponentAndUpdateListeners",(function(e){return t._addNewComponent(e,!0)})),Oi(Li(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(Li(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(Li(t),"_findListeners",(function(e,n){return e?t._listeners.filter((function(t){return(!n||t.presetName===n)&&t.areaName===e})):[]})),Oi(Li(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(Li(t),"_unlisten",(function(e){var n=t._listeners.indexOf(e);-1!==n&&t._listeners.splice(n,1)})),Oi(Li(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(B,null,N(Ri,null),e.children)},r}(j))||Di)||Di,Ni={allowSidePanels:!1,allowPlayerArea:!1},Ui=function(e){return function(t){var n;return Qt(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({},Ni,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}(j))||n}};function Fi(){return(Fi=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 Bi={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",UPDATE_HOVERED_SEGMENT:"seekbar/UPDATE_HOVERED_SEGMENT",UPDATE_SEEKBAR_SEGMENTS:"seekbar/UPDATE_SEEKBAR_SEGMENTS",UPDATE_SEGMENT_END_TIME:"seekbar/UPDATE_SEGMENT_END_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,segments:[]},Hi=function(e,t){switch(void 0===e&&(e=ji),t.type){case Bi.UPDATE_SEEKBAR_DRAGGING_STATUS:return Fi({},e,{draggingActive:t.draggingActive});case Bi.UPDATE_SEEKBAR_HOVER_ACTIVE:return Fi({},e,{hoverActive:t.hoverActive});case Bi.UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE:return Fi({},e,{previewHoverActive:t.previewHoverActive});case Bi.UPDATE_SEEKBAR_CLIENT_RECT:return Fi({},e,{clientRect:t.clientRect});case Bi.UPDATE_HIDE_SEEKBAR_PREVIEW:return Fi({},e,{hidePreview:t.hidePreview});case Bi.UPDATE_HIDE_SEEKBAR_TIME_BUBBLE:return Fi({},e,{hideTimeBubble:t.hideTimeBubble});case Bi.UPDATE_CURRENT_TIME:return Fi({},e,{currentTime:t.currentTime});case Bi.UPDATE_VIRTUAL_TIME:return Fi({},e,{virtualTime:t.virtualTime});case Bi.UPDATE_HOVERED_SEGMENT:return Fi({},e,{segments:e.segments.map((function(e){return e.id===t.id?Fi({},e,{isHovered:t.isHovered}):e}))});case Bi.UPDATE_SEEKBAR_SEGMENTS:return Fi({},e,{segments:t.segments});case Bi.UPDATE_SEGMENT_END_TIME:return Fi({},e,{segments:e.segments.map((function(e){return e.id===t.id?Fi({},e,{endTime:t.endTime}):e}))});default:return e}},Vi={updateSeekbarDraggingStatus:function(e){return{type:Bi.UPDATE_SEEKBAR_DRAGGING_STATUS,draggingActive:e}},updateSeekbarHoverActive:function(e){return{type:Bi.UPDATE_SEEKBAR_HOVER_ACTIVE,hoverActive:e}},updateSeekbarPreviewHoverActive:function(e){return{type:Bi.UPDATE_SEEKBAR_PREVIEW_HOVER_ACTIVE,previewHoverActive:e}},updateSeekbarClientRect:function(e){return{type:Bi.UPDATE_SEEKBAR_CLIENT_RECT,clientRect:e}},updateHideSeekbarPreview:function(e){return{type:Bi.UPDATE_HIDE_SEEKBAR_PREVIEW,hidePreview:e}},updateHideSeekbarTimeBubble:function(e){return{type:Bi.UPDATE_HIDE_SEEKBAR_TIME_BUBBLE,hideTimeBubble:e}},updateCurrentTime:function(e){return{type:Bi.UPDATE_CURRENT_TIME,currentTime:e}},updateVirtualTime:function(e){return{type:Bi.UPDATE_VIRTUAL_TIME,virtualTime:e}},updateHoveredSegment:function(e,t){return{type:Bi.UPDATE_HOVERED_SEGMENT,id:e,isHovered:t}},updateSegmentEndTime:function(e,t){return{type:Bi.UPDATE_SEGMENT_END_TIME,id:e,endTime:t}},updateSeekbarSegments:function(e){return{type:Bi.UPDATE_SEEKBAR_SEGMENTS,segments:e}}};function Gi(){return(Gi=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"},zi={draggingActive:!1,hover:!1},Wi=function(e,t){switch(void 0===e&&(e=zi),t.type){case Ki.UPDATE_VOLUME_DRAGGING_STATUS:return Gi({},e,{draggingActive:t.draggingActive});case Ki.UPDATE_HOVER:return Gi({},e,{hover:t.hover});default:return e}},Yi={updateVolumeDraggingStatus:function(e){return{type:Ki.UPDATE_VOLUME_DRAGGING_STATUS,draggingActive:e}},updateVolumeHover:function(e){return{type:Ki.UPDATE_HOVER,hover:e}}};function qi(){return(qi=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 Xi={UPDATE_LOADING_SPINNER_STATE:"loading/UPDATE_LOADING_SPINNER_STATE"},Qi={show:!1},$i=function(e,t){switch(void 0===e&&(e=Qi),t.type){case gr.UPDATE:return pr("loading",e,t);case gr.UPDATE_COMPONENT:return hr("loading",e,t);case Xi.UPDATE_LOADING_SPINNER_STATE:return qi({},e,{show:t.show});default:return e}},Ji={updateLoadingSpinnerState:function(e){return{type:Xi.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 ea={UPDATE_CAPTIONS_STYLE:"cvaa/UPDATE_CAPTIONS_STYLE"},ta={style:"default"},na=function(e,t){switch(void 0===e&&(e=ta),t.type){case ea.UPDATE_CAPTIONS_STYLE:return Zi({},e,{style:t.style});default:return e}},ra={updateCaptionsStyle:function(e){return{type:ea.UPDATE_CAPTIONS_STYLE,style:e}}};function ia(){return(ia=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 aa={UPDATE_QUALITY:"settings/UPDATE_QUALITY",UPDATE_SPEED:"settings/UPDATE_SPEED",UPDATE_AUDIO:"settings/UPDATE_AUDIO",UPDATE_ADVANCED_AUDIO_DESC:"settings/UPDATE_ADVANCED_AUDIO_DESC"},oa={quality:1,speed:2,advancedAudioDesc:!1},sa=function(e,t){switch(void 0===e&&(e=oa),t.type){case aa.UPDATE_QUALITY:return ia({},e,{quality:t.quality});case aa.UPDATE_SPEED:return ia({},e,{speed:t.speed});case aa.UPDATE_AUDIO:return ia({},e,{speed:t.audio});case aa.UPDATE_ADVANCED_AUDIO_DESC:return ia({},e,{advancedAudioDesc:t.isChecked});default:return e}},la={updateQuality:function(e){return{type:aa.UPDATE_QUALITY,quality:e}},updateSpeed:function(e){return{type:aa.UPDATE_SPEED,speed:e}},updateAudio:function(e){return{type:aa.UPDATE_AUDIO,audio:e}},updateAdvancedAudioDesc:function(e){return{type:aa.UPDATE_ADVANCED_AUDIO_DESC,isChecked:e}}};function ua(){return(ua=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 ca={UPDATE_ACTION_ICON:"overlay-action/UPDATE_ACTION_ICON"},da={iconType:null},pa=function(e,t){switch(void 0===e&&(e=da),t.type){case ca.UPDATE_ACTION_ICON:return ua({},e,{iconType:t.iconType});default:return e}},ha={updateOverlayActionIcon:function(e){return{type:ca.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 ga={UPDATE_PLAYLIST_COUNTDOWN_CANCELED:"playlist-countdown/UPDATE_PLAYLIST_COUNTDOWN_CANCELED"},ya={countdownCanceled:!1},va=function(e,t){switch(void 0===e&&(e=ya),t.type){case ga.UPDATE_PLAYLIST_COUNTDOWN_CANCELED:return fa({},e,{countdownCanceled:t.countdownCanceled});default:return e}},ma={updatePlaylistCountdownCanceled:function(e){return{type:ga.UPDATE_PLAYLIST_COUNTDOWN_CANCELED,countdownCanceled:e}}};function ba(){return(ba=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 _a,Ea,ka,Ta={UPDATE_OVERLAY:"overlay/UPDATE_OVERLAY"},Aa={isOpen:!1},wa=function(e,t){switch(void 0===e&&(e=Aa),t.type){case Ta.UPDATE_OVERLAY:return ba({},e,{isOpen:t.isOpen});default:return e}},Sa={updateOverlay:function(e){return{type:Ta.UPDATE_OVERLAY,isOpen:e}}},Ca=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],d=u(c,t);if(void 0===d){var p=Dt(l,t);throw new Error(p)}i[l]=d,r=r||d!==c}return(r=r||o.length!==Object.keys(e).length)?i:e}}({config:vr,engine:kr,shell:or,seekbar:Hi,volume:Wi,loading:$i,cvaa:na,settings:sa,overlayAction:pa,playlist:va,overlay:wa}),xa=n(6);function Ia(){return(Ia=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 Pa,Da,Ra=Vi.updateCurrentTime,La=(_a=Qt(kr,ur(Ia({},Tr,Ji,sr,{seekbarUpdateCurrentTime:Ra}))),Ea=Bn("EngineConnector"),_a(ka=Sr(ka=jr(ka=Ea(ka=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.updateIsAudio(n.isAudio()),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}(j))||ka)||ka)||ka)||ka);function Oa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ma(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}La.displayName="EngineConnector";var Na=(Pa=Qt((function(e){return{videoStyles:e.shell.layoutStyles.video,targetId:e.config.targetId}}),ur(sr)),Sr(Da=jr(Da=Pa(Da=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 Ma(Oa(t=e.call.apply(e,[this].concat(r))||this),"_onVideoResize",(function(){var e=t.props.player.getVideoElement();e&&t.props.updateVideoClientRect(e.getBoundingClientRect())})),Ma(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 fi;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:dr.a.videoPlayer,style:t,ref:this._setRef},N(qn,{name:"VideoContainer"}))},r}(j))||Da)||Da)||Da);function Ua(){return(Ua=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 Fa(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 Ba(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 Ha,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(Ba(e=t.call.apply(t,[this].concat(r))||this),"_accessibleChildren",[]),ja(Ba(e),"_isModal",!1),ja(Ba(e),"onKeyDown",(function(t){switch(t.keyCode){case On.ESC:e.props.onClose&&(e.props.onClose(),t.stopPropagation());break;case On.DOWN:case On.UP:if(document.activeElement&&!e._isModal){var n=e._accessibleChildren.indexOf(document.activeElement);n=(n+(t.keyCode==On.DOWN?1:-1)+e._accessibleChildren.length)%e._accessibleChildren.length,e._accessibleChildren[n].focus(),t.preventDefault(),t.stopPropagation()}break;case On.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(Ba(e),"setDefaultFocusedElement",(function(t){t&&(e._defaultFocusedElement=t)})),ja(Ba(e),"addAccessibleChild",(function(t){t&&-1==e._accessibleChildren.indexOf(t)&&e._accessibleChildren.push(t)})),ja(Ba(e),"clearAccessibleChildren",(function(){e._accessibleChildren=[]})),ja(Ba(e),"focusOnDefault",(function(){var t=e._defaultFocusedElement||e._accessibleChildren.length&&e._accessibleChildren[0];t&&(e._previouslyActiveElement=document.activeElement,t.focus())})),ja(Ba(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,Ua({},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}}])&&Fa(a.prototype,o),i}(j)};function Ga(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 za(e){var t=parseInt(e);return t<10?"00:0"+e:t<=59?"00:"+e:Ga(t)}function Wa(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 Ya,qa,Xa,Qa,$a,Ja=hi("ActivePreset")(Ha=Qt((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))(Ha=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 Wa(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)?Wa(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}(j))||Ha)||Ha,Za=Qt((function(e){return{sidePanelsStyles:e.shell.layoutStyles.sidePanels,playerClientRect:e.shell.playerClientRect}}))(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.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!==[Zn.RIGHT,Zn.LEFT].indexOf(t)?"verticalSidePanel":"horizontalSidePanel",i=[dr.a.sidePanel,dr.a[r]],a="SidePanel"+(t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());return N("div",{style:n[t],className:i.join(" ")},N("div",{className:dr.a.sidePanelContent},N(qn,{name:a})))},r}(j))||Ya,eo=Qt((function(e){return{allowSidePanels:e.shell.presetSettings.allowSidePanels,allowPlayerArea:e.shell.presetSettings.allowPlayerArea,sidePanelsConfig:e.config.components.sidePanels}}),ur(sr))(qa=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(Jn.VERTICAL,t),n&&this.props.updateSidePanelSize(Jn.HORIZONTAL,n)},i.render=function(){var e=this.props,t=e.uis,n=e.playerContainer,r=e.allowSidePanels,i=e.allowPlayerArea;return N(B,null,N(Ja,{uis:t,playerContainer:n}),r?N(B,null,N(Za,{position:Zn.RIGHT}),N(Za,{position:Zn.LEFT}),N(Za,{position:Zn.TOP}),N(Za,{position:Zn.BOTTOM})):void 0,i?N(qn,{name:"PlayerArea"}):void 0)},r}(j))||qa,to=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:dr.a.spinner},Array(8).fill(0).map((function(e,t){return N("span",{key:t+1})})))},r}(j);to.displayName="Spinner";var no,ro=(Xa=Qt((function(e){return{show:e.loading.show,isMobile:e.shell.isMobile,adBreak:e.engine.adBreak,adIsLinear:e.engine.adIsLinear}}),ur(Ji)),Qa=Bn("Loading"),Xa($a=Sr($a=jr($a=Qa($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:[dr.a.loadingBackdrop,dr.a.show].join(" ")},N("div",{className:dr.a.spinnerContainer},N(qn,{name:nr.LoadingSpinner},N(to,null))))},r}(j))||$a)||$a)||$a)||$a);function io(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}ro.displayName="Loading";var oo,so=Qt((function(e){return{guiStyles:e.shell.layoutStyles.gui}}))(no=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(io(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:dr.a.guiArea},N("div",{style:{pointerEvents:"auto"}},N(qn,{name:"GuiArea"},r)),"function"==typeof i?i({containerRef:this._ref}):i)},r}(j))||no,lo=Ui({allowSidePanels:!0,allowPlayerArea:!0})(oo=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:dr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N(so,null,N(ro,null))))},r}(j))||oo;function uo(e){return N(lo,e)}function co(){return(co=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 po(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}lo.displayName="Idle";var fo,go,yo,vo,mo={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"},bo={qualityHd:dr.a.badgeIcon+" "+dr.a.iconQualityHd,qualityHdActive:dr.a.badgeIcon+" "+dr.a.iconQualityHdActive,quality4k:dr.a.badgeIcon+" "+dr.a.iconQuality4K,quality4kActive:dr.a.badgeIcon+" "+dr.a.iconQuality4KActive,quality8k:dr.a.badgeIcon+" "+dr.a.iconQuality8K,quality8kActive:dr.a.badgeIcon+" "+dr.a.iconQuality8KActive},_o={INACTIVE:0,ACTIVE:1},Eo=function(e){var t,n;function r(t){var n;ho(po(n=e.call(this,t)||this),"_defaultColor",dr.a.white),ho(po(n),"_activeColor",dr.a.brandColor),ho(po(n),"_className",""),ho(po(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),d=n.getPathTag(t,c),p=n.getSVGUrl(d,o,s,l,u),h="."+n._className+" { background-image: "+p+"; }",f=document.getElementById(Oh);f&&f.appendChild(document.createTextNode(h))})),ho(po(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 d=a.slice(l,l+2e3-1),p=0;p<o.length;p++)d=d.split(o[p][0]).join(o[p][1]);u=""+u+d,l+=2e3}return'url("data:image/svg+xml,'+u+'")'})),ho(po(n),"getFillColor",(function(e,t,r){return e===_o.ACTIVE?r||n._activeColor:t||n._defaultColor})),ho(po(n),"getPathTag",(function(e,t){return Array.isArray(e)||(e=[e]),e.map((function(e){var n="string"==typeof e?{d:e,fill:t}:co({},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===Oh}));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",co({className:[dr.a.icon,this._className].join(" ")},e.hidden?{"aria-hidden":"true"}:{}));switch(e.type){case mo.Maximize:return N("i",{className:[dr.a.icon,dr.a.iconMaximize].join(" "),"aria-hidden":"true"});case mo.Minimize:return N("i",{className:[dr.a.icon,dr.a.iconMinimize].join(" "),"aria-hidden":"true"});case mo.Play:return N("i",{className:[dr.a.icon,dr.a.iconPlay].join(" "),"aria-hidden":"true"});case mo.Pause:return N("i",{className:[dr.a.icon,dr.a.iconPause].join(" "),"aria-hidden":"true"});case mo.VolumeBase:return N("i",{className:[dr.a.icon,dr.a.iconVolumeBase].join(" ")});case mo.VolumeWaves:return N("i",{className:[dr.a.icon,dr.a.iconVolumeWaves].join(" ")});case mo.VolumeWave:return N("i",{className:[dr.a.icon,dr.a.iconVolumeWave].join(" ")});case mo.VolumeMute:return N("i",{className:[dr.a.icon,dr.a.iconVolumeMute].join(" ")});case mo.Close:return N("i",{className:[dr.a.icon,dr.a.iconClose].join(" ")});case mo.Settings:return N("i",{className:[dr.a.icon,dr.a.iconSettings].join(" "),"aria-hidden":"true"});case mo.Check:return N("i",{className:[dr.a.icon,dr.a.iconCheck].join(" ")});case mo.CheckActive:return N("i",{className:[dr.a.icon,dr.a.iconCheckActive].join(" ")});case mo.Language:return N("i",{className:[dr.a.icon,dr.a.iconLanguage].join(" "),"aria-hidden":"true"});case mo.Quality:return N("i",{className:[dr.a.icon,dr.a.iconQuality].join(" ")});case mo.Captions:return N("i",{className:[dr.a.icon,dr.a.iconCaptions].join(" ")});case mo.Speed:return N("i",{className:[dr.a.icon,dr.a.iconSpeed].join(" ")});case mo.SpeedDown:return N("i",{className:[dr.a.icon,dr.a.iconSpeedDown].join(" ")});case mo.SpeedUp:return N("i",{className:[dr.a.icon,dr.a.iconSpeedUp].join(" ")});case mo.Audio:return N("i",{className:[dr.a.icon,dr.a.iconAudio].join(" ")});case mo.ArrowDown:return N("i",{className:[dr.a.icon,dr.a.iconArrowDown].join(" ")});case mo.StartOver:return N("i",{className:[dr.a.icon,dr.a.iconStartOver].join(" ")});case mo.SeekEnd:return N("i",{className:[dr.a.icon,dr.a.iconSeekEnd].join(" ")});case mo.Rewind:return N("i",{className:[dr.a.icon,dr.a.iconRewind].join(" "),"aria-hidden":"true"});case mo.Rewind10:return N("i",{className:[dr.a.icon,dr.a.iconRewind10].join(" "),"aria-hidden":"true"});case mo.Forward:return N("i",{className:[dr.a.icon,dr.a.iconForward].join(" "),"aria-hidden":"true"});case mo.Forward10:return N("i",{className:[dr.a.icon,dr.a.iconForward10].join(" "),"aria-hidden":"true"});case mo.vrStereo:return N("i",{className:[dr.a.icon,dr.a.iconVrStereo].join(" ")});case mo.vrStereoFull:return N("i",{className:[dr.a.icon,dr.a.iconVrStereoFull].join(" ")});case mo.Cast:return N("i",{className:[dr.a.icon,dr.a.iconChromecast].join(" ")});case mo.CastBrand:return N("i",{className:[dr.a.icon,dr.a.iconChromecastBrand].join(" ")});case mo.Next:return N("i",{className:[dr.a.icon,dr.a.iconNext].join(" ")});case mo.Prev:return N("i",{className:[dr.a.icon,dr.a.iconPrev].join(" ")});case mo.PictureInPictureStart:return N("i",{className:[dr.a.icon,dr.a.iconPictureInPictureStart].join(" "),"aria-hidden":"true"});case mo.PictureInPictureStop:return N("i",{className:[dr.a.icon,dr.a.iconPictureInPictureStop].join(" "),"aria-hidden":"true"});case mo.ClosedCaptionsOn:return N("i",{className:[dr.a.icon,dr.a.iconClosedCaptionsOn].join(" ")});case mo.ClosedCaptionsOff:return N("i",{className:[dr.a.icon,dr.a.iconClosedCaptionsOff].join(" ")});case mo.AdvancedAudioDescription:return N("i",{className:[dr.a.icon,dr.a.iconAdvancedAudioDescription].join(" ")})}},r}(j),ko=Eo,To=function(e){return e.adBreak&&e.adIsPlaying||!e.adBreak&&e.isPlaying};function Ao(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}function So(){return(So=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 Co,xo,Io,Po=(fo=Qt((function(e){return{isPlayingAdOrPlayback:To(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(So({},ha,sr))),go=Bn("OverlayAction"),yo=hi("OverlayAction"),fo(vo=Sr(vo=go(vo=yo(vo=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 wo(Ao(t=e.call.apply(e,[this].concat(r))||this),"_iconTimeout",null),wo(Ao(t),"_pointerDownPosX",NaN),wo(Ao(t),"_pointerDownPosY",NaN),wo(Ao(t),"_firstClickTime",0),wo(Ao(t),"_clickTimeout",null),wo(Ao(t),"togglePlayPause",(function(){t.props.isPlayingAdOrPlayback?(t.props.player.pause(),t.props.updateOverlayActionIcon(mo.Pause)):(t.props.player.play(),t.props.updateOverlayActionIcon(mo.Play)),t.props.updatePlayerHoverState(!0),t.props.notifyClick({type:"PlayPause"})})),wo(Ao(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})),wo(Ao(t),"onOverlayMouseUp",(function(e){t.isDragging(e)||t.overlayClick()})),wo(Ao(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:dr.a.overlayAction+" "+(this.state.animation?dr.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(ko,{key:t,type:e})})):N(ko,{type:this.state.iconType})},i.componentDidUpdate=function(){this.state.animation&&this.props.updateOverlayActionIcon(null)},r}(j))||vo)||vo)||vo)||vo);function Do(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ro(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Po.displayName="OverlayAction";var Lo={Top:"top",Bottom:"bottom",TopRight:"top-right",TopLeft:"top-left",BottomRight:"bottom-right",BottomLeft:"bottom-left",Left:"left",Right:"right"},Oo=Qt((function(e){return{playerClientRect:e.shell.playerClientRect,guiClientRect:e.shell.guiClientRect,isMobile:e.shell.isMobile}}))(Co=jr((Io=xo=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 Ro(Do(t=e.call.apply(e,[this].concat(r))||this),"_hoverTimeout",null),Ro(Do(t),"lastAlternativeTypeIndex",-1),Ro(Do(t),"showTooltip",(function(){t.setState({showTooltip:!0})})),Ro(Do(t),"hideTooltip",(function(){t.setState({showTooltip:!1})})),Ro(Do(t),"handleFocusOnChildren",(function(){var e=t.props.children.props.onFocus;t.showTooltip(),e&&e()})),Ro(Do(t),"handleBlurOnChildren",(function(){var e=t.props.children.props.onBlur;t.hideTooltip(),e&&e()})),Ro(Do(t),"onMouseOver",(function(){t._clearHoverTimeout(),t._hoverTimeout=setTimeout((function(){t.showTooltip()}),750)})),Ro(Do(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(Lo).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=[dr.a.tooltipLabel,dr.a["tooltip-"+this.state.type]];if(this.state.showTooltip&&this.state.valid?n.push(dr.a.show):n.push(dr.a.hide),e.isMobile)return W(e.children)[0];var r=ie(e.children,{onFocus:this.handleFocusOnChildren,onBlur:this.handleBlurOnChildren});return N("div",{className:dr.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}(j),Ro(xo,"defaultProps",{type:Lo.Top,maxWidth:"240px"}),Co=Io))||Co)||Co;function Mo(){return(Mo=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 No,Uo,Fo,Bo,jo,Ho=Fe((function(e,t){return N("button",Mo({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 Go(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ho.displayName="Button";var Ko=(No=Qt((function(e){return{prePlayback:e.engine.prePlayback,isPlaybackEnded:e.engine.isPlaybackEnded,playlist:e.engine.playlist,loading:e.loading.show}}),ur(Ji)),Uo=Bn("PrePlaybackPlayOverlay"),Fo=hi("PrePlaybackPlayOverlay"),Bo=An({startOverText:"controls.startOver",playText:"controls.play"}),No(jo=Sr(jo=Uo(jo=Fo(jo=Bo(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 Go(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()})),Go(Vo(t),"onKeyDown",(function(e){e.keyCode===On.ENTER&&t.handleClick()})),Go(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:dr.a.prePlaybackPlayOverlay,onMouseOver:this.onMouseOver,onClick:this.handleClick},N(Ho,{className:dr.a.prePlaybackPlayButton,tabIndex:"0","aria-label":n,onKeyDown:this.onKeyDown},N(Oo,{label:n},e.isPlaybackEnded?N(ko,{type:mo.StartOver}):N(ko,{type:mo.Play}))))}},r}(j))||jo)||jo)||jo)||jo)||jo);function zo(){return(zo=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 Wo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yo(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 qo=function(e){return function(t){return jr(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 Yo(Wo(t=n.call.apply(n,[this].concat(i))||this),"ref",{current:null}),Yo(Wo(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,zo({},this.props,{innerRef:this.ref,animate:this.animate}))},a}(j))}};function Xo(){return(Xo=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 Qo,$o,Jo,Zo,es,ts,ns=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=[dr.a.controlButtonContainer,"playkit-control-"+rs(i)];if(n){var s=Array.isArray(n)?n:[n];o=o.concat(s)}return N("div",Xo({className:o.join(" "),ref:t},a),r)})),rs=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()};function is(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function as(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var os,ss,ls,us,cs,ds,ps=(Qo=Qt((function(e){return{isDvr:e.engine.isDvr,isLive:e.engine.isLive}})),$o=Bn("Rewind"),Jo=hi("Rewind"),Zo=qo(dr.a.rotate),es=An((function(e){return{rewindText:N(bn,{id:"controls.secondsRewind",fields:{seconds:e.step||10}})}})),Qo(ts=Sr(ts=$o(ts=Jo(ts=Zo(ts=es(ts=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 as(is(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}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.isLive&&!this.props.isDvr);return this.props.onToggle("Rewind",e),e},i.render=function(e){var t=e.step,n=e.rewindText,r=e.innerRef;return this._shouldRender()?N(ns,{name:"Rewind",className:dr.a.noIdleControl},N(Oo,{label:n},N(Ho,{tabIndex:"0","aria-label":n,className:""+dr.a.controlButton,ref:r,onClick:this.onClick},N(ko,{type:t&&10!==t?mo.Rewind:mo.Rewind10})))):void 0},r}(j))||ts)||ts)||ts)||ts)||ts)||ts);function hs(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 gs,ys,vs,ms,bs=(os=Qt((function(e){return{isDvr:e.engine.isDvr,isLive:e.engine.isLive}})),ss=Bn("Forward"),ls=hi("Forward"),us=qo(dr.a.reverseRotate),cs=An((function(e){return{forwardText:N(bn,{id:"controls.secondsForward",fields:{seconds:e.step||10}})}})),os(ds=Sr(ds=ss(ds=ls(ds=us(ds=cs(ds=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(hs(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}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.isLive&&!this.props.isDvr);return this.props.onToggle("Forward",e),e},i.render=function(e){var t=e.step,n=e.forwardText,r=e.innerRef;return this._shouldRender()?N(ns,{name:"Forward",className:dr.a.noIdleControl},N(Oo,{label:n},N(Ho,{tabIndex:"0","aria-label":n,className:""+dr.a.controlButton,ref:r,onClick:this.onClick},N(ko,{type:t&&10!==t?mo.Forward:mo.Forward10})))):void 0},r}(j))||ds)||ds)||ds)||ds)||ds)||ds);function _s(){return(_s=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 Es(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ks(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}bs.displayName="Forward";var Ts,As,ws,Ss={preventDefault:!1,payload:null},Cs=(gs=Qt((function(e){return{isPlayingAdOrPlayback:To(e.engine),playerNav:e.shell.playerNav,textTracks:e.engine.textTracks,overlayOpen:e.overlay.isOpen}}),ur(Object.assign({},sr,ha))),ys=Bn("Keyboard"),vs=hi("Keyboard"),gs(ms=Sr(ms=ys(ms=vs(ms=function(e){var t,n;function r(t){var n,r;ks(Es(r=e.call(this)||this),"_lastActiveTextLanguage",""),ks(Es(r),"_hoverTimeout",null),ks(Es(r),"keyboardHandlers",((n={})[On.SPACE]=function(){return r.props.isPlayingAdOrPlayback?(r.props.player.pause(),r.props.updateOverlayActionIcon(mo.Pause)):(r.props.player.play(),r.props.updateOverlayActionIcon(mo.Play)),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:!0}},n[On.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([mo.VolumeBase,mo.VolumeWaves]),{preventDefault:!0,payload:{volume:r.props.player.volume}}},n[On.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([mo.VolumeBase,mo.VolumeMute])):r.props.updateOverlayActionIcon([mo.VolumeBase,mo.VolumeWave]),{preventDefault:!0,payload:{volume:r.props.player.volume}}},n[On.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[On.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[On.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[On.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(mo.Rewind),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:n}}}return{preventDefault:!0,payload:null}},n[On.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(mo.Forward),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:t,to:n}}}return{preventDefault:!0,payload:null}},n[On.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(mo.StartOver),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:0}}}return{preventDefault:!0,payload:null}},n[On.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(mo.SeekEnd),r.props.updatePlayerHoverState(!0),{preventDefault:!0,payload:{from:e,to:t}}}return{preventDefault:!0,payload:null}},n[On.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([mo.VolumeBase,mo.VolumeMute]):r.props.updateOverlayActionIcon([mo.VolumeBase,mo.VolumeWaves]),{preventDefault:!0,payload:!0}},n[On.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(mo.Speed),{preventDefault:!0,payload:{speed:r.props.player.defaultPlaybackRate}}):{preventDefault:!0,payload:null}:Ss},n[On.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(mo.SpeedUp),{preventDefault:!0,payload:{speed:r.props.player.playbackRates[n+1]}}):{preventDefault:!0,payload:null}}return Ss},n[On.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(mo.SpeedDown),{preventDefault:!0,payload:{speed:r.props.player.playbackRates[n-1]}}):{preventDefault:!0,payload:null}}return Ss},n[On.C]=function(e){var t=r.props.player.getActiveTracks().text;if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return Ss;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 On)if(On[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(_s({key:e.keyCode},a))}},r):Es(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}(j))||ms)||ms)||ms)||ms);function xs(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 Ps=["keydown","keyup"],Ds=(Ts=Qt((function(e){return{playerNav:e.shell.playerNav,overlayOpen:e.overlay.isOpen}})),As=Bn("KEYBOARD_PROVIDER"),Ts(ws=jr(ws=As(ws=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(xs(t=e.call.apply(e,[this].concat(r))||this),"_keyboardListeners",[]),Is(xs(t),"_isKeyboardEnable",!1),Is(xs(t),"_componentToHandle",null),Is(xs(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}})),Is(xs(t),"_removeKeyboardHandler",(function(e,n){var r=t._createKeyCode(e,n);t._keyboardListeners[r]&&delete t._keyboardListeners[r]})),Is(xs(t),"_updateIsKeyboardEnabled",(function(e){t._isKeyboardEnable=e})),Is(xs(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),Ps.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=Ps.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}(j))||ws)||ws)||ws);function Rs(){return(Rs=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 Ls(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 Ms,Ns,Us,Fs,Bs=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(Ls(t=n.call.apply(n,[this].concat(i))||this),"keyboardEventHandlers",[]),Os(Ls(t),"_updateIsKeyboardEnabled",(function(e){t.context.updateIsKeyboardEnabled(e)})),Os(Ls(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:Ps[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:Ps[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,Rs({},this.props,{setKeyboardEventToScope:function(t){return e._setKeyboardEventToScope(t)},updateIsKeyboardEnabled:function(t){return e._updateIsKeyboardEnabled(t)},registerKeyboardEvents:function(t){return e.registerKeyboardEvents(t)}}))},a}(j)}},js="chromecast";function Hs(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 Gs,Ks,zs,Ws,Ys,qs,Xs=(Ms=Qt((function(e){return{isCasting:e.engine.isCasting,isCastAvailable:e.engine.isCastAvailable}})),Ns=Bn("Cast"),Us=An({castText:"cast.play_on_tv"}),Ms(Fs=Sr(Fs=jr(Fs=Ns(Fs=Us(Fs=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(Hs(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(Hs(t),"onKeyDown",(function(e){e.keyCode===On.ENTER&&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._shouldRender=function(){var e=this.props.isCasting||this.props.isCastAvailable;return this.props.onToggle("Cast",e),e},i.render=function(e){if(this._shouldRender()){var t=e.isCasting?dr.a.castButton+" "+dr.a.castButtonActive:dr.a.castButton;return N("div",{role:"button","aria-label":this.props.castText,className:dr.a.controlButtonContainer,onClick:this.onClick,onKeyDown:this.onKeyDown},N(Oo,{label:this.props.castText},N("google-cast-launcher",{className:t,tabIndex:"0"})))}},r}(j))||Fs)||Fs)||Fs)||Fs)||Fs);function Qs(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}Xs.displayName="Cast";var Js,Zs,el,tl,nl,rl=(Gs=Qt((function(e){return{isInFullscreen:e.engine.fullscreen}})),Ks=Bn("Fullscreen"),zs=Bs("Fullscreen"),Ws=hi("Fullscreen"),Ys=An({fullscreenText:"controls.fullscreen",fullscreenExitText:"controls.fullscreenExit"}),Gs(qs=Sr(qs=Ks(qs=zs(qs=Ws(qs=Ys(qs=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(Qs(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:On.F},action:function(e){t.handleKeydown(e)}},{key:{code:On.ESC},action:function(e){t.handleKeydown(e)}}]),$s(Qs(t),"toggleFullscreen",(function(){var e=t.props,n=e.logger,r=e.player;n.debug("Toggle fullscreen"),r.isFullscreen()?r.exitFullscreen():r.enterFullscreen(),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 On.F:this.props.player.isFullscreen()||this.toggleFullscreen();break;case On.ESC:this.props.player.isFullscreen()&&this.toggleFullscreen()}},i.render=function(){return N(ns,{name:"Fullscreen"},N(Oo,{label:this.props.isInFullscreen?this.props.fullscreenExitText:this.props.fullscreenText},N(Ho,{tabIndex:"0","aria-label":this.props.isInFullscreen?this.props.fullscreenExitText:this.props.fullscreenText,className:this.props.isInFullscreen?[dr.a.controlButton,dr.a.isFullscreen].join(" "):dr.a.controlButton,onClick:this.toggleFullscreen},N(ko,{type:mo.Maximize}),N(ko,{type:mo.Minimize}))))},r}(j))||qs)||qs)||qs)||qs)||qs)||qs);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=(Js=Qt((function(e){return{isPlayingAdOrPlayback:To(e.engine),isPlaying:e.engine.isPlaying,adBreak:e.engine.adBreak,isPlaybackEnded:e.engine.isPlaybackEnded}}),ur(ol({},sr,la,ha))),Zs=Bn("PlayPause"),el=hi("PlayPause"),tl=An({startOverText:"controls.startOver",pauseText:"controls.pause",playText:"controls.play"}),Js(nl=Sr(nl=Zs(nl=el(nl=jr(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),"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(){var e=this,t=this.props,n=t.eventManager,r=t.player,i=document.getElementById(r.config.ui.targetId);n.listen(r,r.Event.UI.USER_CLICKED_PLAY,(function(){i.focus()})),n.listen(document,"keydown",(function(t){"Space"!==t.code&&"Enter"!==t.code||document.activeElement===i&&(t.preventDefault(),e.props.isPlayingAdOrPlayback?e.props.updateOverlayActionIcon(mo.Pause):e.props.updateOverlayActionIcon(mo.Play),e.togglePlayPause(),e.props.updatePlayerHoverState(!0))}))},i.render=function(e){var t=this.props.isPlayingAdOrPlayback?[dr.a.controlButton,dr.a.isPlaying].join(" "):dr.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(ns,{name:"PlayPause"},N(Oo,{label:i},N(Ho,{tabIndex:"0","aria-label":i,className:t,onClick:this.togglePlayPause},n?N(ko,{type:mo.StartOver}):N("div",null,N(ko,{type:mo.Play}),N(ko,{type:mo.Pause})))))},r}(j))||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 dl(){return(dl=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 pl,hl,fl,gl,yl,vl,ml=Qt((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(dl({},la,ha)))(sl=An({buttonLabel:"controls.settings"})(sl=Sr(sl=jr(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?hp(n):null},i.render=function(e){var t=this,n=e.showAudioMenu&&e.audioTracks.length>1,r=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)||n||i)){var s=this.getButtonBadgeType()||"",l=document.getElementById(this.props.player.config.targetId)||document;return N(ns,{name:"Settings",ref:function(e){return e?t._controlSettingsElement=e:void 0}},N(Oo,{label:e.buttonLabel},N(Ho,{tabIndex:"0","aria-label":e.buttonLabel,"aria-haspopup":"true",className:[dr.a.controlButton,dr.a.buttonBadge,bo[s+"Active"],this.state.smartContainerOpen?dr.a.active:""].join(" "),onClick:this.onControlButtonClick},N(ko,{type:mo.Settings}))),this.state.smartContainerOpen&&!this.state.cvaaOverlay&&N(Ec,{targetId:e.player.config.targetId,title:N(bn,{id:"settings.title"}),onClose:this.onControlButtonClick},r&&N(bp,null),n&&N(Xd,null),i&&N(ip,{onAdvancedCaptionsClick:this.toggleCVAAOverlay}),a&&N(yp,null),o&&N(dp,null)),this.state.cvaaOverlay?Xe(N(Hu,{onClose:this.onCVAAOverlayClose}),l.querySelector(".overlay-portal")):N("div",null))}},r}(j))||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=(pl=Qt((function(e){return{isDraggingActive:e.volume.draggingActive,volume:e.engine.volume,muted:e.engine.muted,isMobile:e.shell.isMobile}}),ur(El({},Yi,Tr,ha))),hl=Bs("Volume"),fl=Bn("Volume"),gl=hi("Volume"),yl=An((function(e){return{volumeLabel:e.muted?N(bn,{id:"controls.unmute"},"Unmute"):N(bn,{id:"controls.mute"},"Mute"),sliderAriaLabel:N(bn,{id:"volume.volume_slider_aria_label"},"Volume control, use the arrows to control the volume")}})),pl(vl=Sr(vl=jr(vl=hl(vl=fl(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:On.UP},action:function(e){t.handleKeydown(e)}},{key:{code:On.DOWN},action:function(e){t.handleKeydown(e)}},{key:{code:On.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 On.UP:case On.DOWN:case On.ENTER:case On.SPACE:e.preventDefault(),e.stopPropagation(),t.handleKeydown(e);break;case On.TAB:break;default:t.setState({hover:!1})}})),_l(bl(t),"onFocus",(function(){t.props.isMobile||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()})),_l(bl(t),"onProgressBarKeyDown",(function(e){switch(e.keyCode){case On.TAB:t.setState({hover:!1});break;default:e.preventDefault(),e.stopPropagation(),t.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,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._shouldRender=function(){var e=!this.props.player.isImage();return this.props.onToggle("Volume",e),e},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 On.UP:this.props.updateOverlayActionIcon([mo.VolumeBase,mo.VolumeWaves]),i(t=Math.min(Math.round(100*r.volume)+5,100));break;case On.DOWN:0===(t=Math.max(Math.round(100*r.volume)-5,0))?this.props.updateOverlayActionIcon([mo.VolumeBase,mo.VolumeMute]):this.props.updateOverlayActionIcon([mo.VolumeBase,mo.VolumeWave]),i(t);break;case On.M:r.muted?this.props.updateOverlayActionIcon([mo.VolumeBase,mo.VolumeWaves]):this.props.updateOverlayActionIcon([mo.VolumeBase,mo.VolumeMute]),this.toggleMute();break;case On.ENTER:case On.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._shouldRender){var t=this.props,n=t.player,r=t.isDraggingActive,i=t.muted,a=t.volume,o=t.smartContainerOpen,s=[dr.a.volumeControl];return r&&s.push(dr.a.draggingActive),(i||0===a)&&s.push(dr.a.isMuted),this.state.hover&&!o&&s.push(dr.a.hover),N(ns,{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.volumeLabel,type:this.props.toolTipType?this.props.toolTipType:Lo.Left},N(Ho,{tabIndex:"0","aria-live":"polite","aria-label":this.props.volumeLabel,className:dr.a.controlButton,onMouseUp:this.toggleMute,onTouchEnd:this.onTouchEnd,onKeyDown:this.onKeyDown,onFocus:this.onFocus},N(ko,{type:mo.VolumeBase}),N(ko,{type:mo.VolumeWaves}),N(ko,{type:mo.VolumeMute}))),N("div",{tabIndex:"0","aria-orientation":"vertical","aria-label":this.props.sliderAriaLabel,onKeyDown:this.onProgressBarKeyDown,className:dr.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:dr.a.bar,ref:function(t){return t?e._volumeProgressBarElement=t:void 0},onMouseDown:this.onVolumeProgressBarMouseDown},N("div",{className:dr.a.progress,style:{height:this.getVolumeProgressHeight()}}))))}},r}(j))||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=Qt((function(e){return{isVr:e.engine.isVr,vrStereoMode:e.engine.vrStereoMode,config:e.config.components.vrStereo}}),ur(Il({},sr,Tr))),Tl=Bn("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===On.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,t=this.props.isVr&&!(0===Object.keys(e).length&&e.constructor===Object);return this.props.onToggle("VrStereo",t),t},i.componentWillMount=function(){this.props.updateVrStereoMode(this.props.config.vrStereoMode)},i.render=function(){return this._shouldRender()?N(ns,{name:"VrStereo"},N(Oo,{label:this.props.vrStereoText},N(Ho,{tabIndex:"0","aria-label":this.props.vrStereoText,className:this.props.vrStereoMode?[dr.a.controlButton,dr.a.vrStereoMode].join(" "):dr.a.controlButton,onClick:this.onClick,onKeyDown:this.onKeyDown},N(ko,{type:mo.vrStereo}),N(ko,{type:mo.vrStereoFull})))):void 0},r}(j))||wl)||wl)||wl)||wl);Pl.displayName="VrStereo";var Dl,Rl=Qt((function(e){return{textTracks:e.engine.textTracks,showCCButton:e.config.showCCButton}}))(Bn("ClosedCaptions")(hi("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}));me((function(){a("off"!==(null==l?void 0:l.language))}),[l]);var u=!(!(null==(n=e.textTracks)?void 0:n.length)||!e.showCCButton);if(e.onToggle("ClosedCaptions",u),u)return N(ns,{name:"ClosedCaptions"},i?N(Oo,{label:e.closedCaptionsOnText},N(Ho,{tabIndex:"0","aria-label":e.closedCaptionsOnText,className:[dr.a.controlButton,dr.a.ccOn].join(" "),onClick:function(){e.notifyClick(!0),s.hideTextTrack()}},N(ko,{type:mo.ClosedCaptionsOn}))):N(Oo,{label:e.closedCaptionsOffText},N(Ho,{tabIndex:"0","aria-label":e.closedCaptionsOffText,className:dr.a.controlButton,onClick:function(){e.notifyClick(!1),s.showTextTrack()}},N(ko,{type:mo.ClosedCaptionsOff}))))})))));Rl.displayName="ClosedCaptions";var Ll,Ol,Ml,Nl=Qt((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:[dr.a.btn,dr.a.btnDarkTransparent,dr.a.learnMore].join(" ")},N(bn,{id:"ads.learn_more"}))},r}(j))||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 Bl=(Ll=Qt((function(e){return{currentTime:e.engine.adProgress.currentTime,duration:e.engine.adProgress.duration,adSkipTimeOffset:e.engine.adSkipTimeOffset,adSkippableState:e.engine.adSkippableState}})),Ol=Bn("AdSkip"),Ll(Ml=Sr(Ml=Ol(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:[dr.a.btn,dr.a.btnBranded,dr.a.btnSkipAd].join(" "),onClick:this.skipAd},N(bn,{id:"ads.skip_ad"}))):N(En,null,N("span",{className:dr.a.skipAd},N(bn,{id:"ads.skip_in"})," "+this.getSkipTimeOffset())):void 0},r}(j))||Ml)||Ml)||Ml);Bl.displayName="AdSkip";var jl=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:dr.a.adNotice},N(bn,{id:"ads.ad_notice"}))},r}(j);jl.displayName="AdNotice";var Hl,Vl=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),Gl=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),Kl=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 Ql=((Hl={})[On.SPACE]=function(e,t,n){Yl(e,0,n)},Hl[On.UP]=function(e,t,n){n.dispatchEvent(new Qr(t.payload.volume))},Hl[On.DOWN]=function(e,t,n){n.dispatchEvent(new Qr(t.payload.volume))},Hl[On.F]=function(e,t,n){Xl(0,0,n)},Hl[On.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)},Hl[On.ESC]=function(e,t,n){Xl(0,0,n)},Hl[On.LEFT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Hl[On.RIGHT]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Hl[On.HOME]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Hl[On.END]=function(e,t,n){n.dispatchEvent(new zr(t.payload.from,t.payload.to))},Hl[On.M]=function(e,t,n){ql(e,0,n)},Hl[On.SEMI_COLON]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Hl[On.PERIOD]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Hl[On.COMMA]=function(e,t,n){n.dispatchEvent(new Wr(t.payload.speed))},Hl[On.C]=function(e,t,n){n.dispatchEvent(new Vr(t.payload.track))},Hl),$l=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 Or,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}(j);function Jl(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(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}($l,"defaultProps",{});var Zl,eu,tu={TimeDisplayPlaybackContainer:107};function nu(){return(nu=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 ru(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function iu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var au=[["VrStereo"],["Rewind","Forward"],["ClosedCaptions"],["PictureInPicture"],["Cast"]],ou=(Zl=Qt((function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded,guiClientRect:e.shell.guiClientRect,playerSize:e.shell.playerSize,playlist:e.engine.playlist}}),ur(sr)),Sr(eu=jr(eu=Zl(eu=function(e){var t,n;function r(t){var n;return iu(ru(n=e.call(this)||this),"bottomBarContainerRef",{current:null}),iu(ru(n),"presetControls",{}),iu(ru(n),"currentBarWidth",0),iu(ru(n),"onToggleControl",(function(e,t){e in n.state.activeControls&&n.state.activeControls[e]!==t&&n.setState((function(n){var r;return{activeControls:nu({},n.activeControls,(r={},r[e]=t,r))}}))})),t.leftControls=t.leftControls||[],t.rightControls=t.rightControls||[],t.leftControls.concat(t.rightControls).map((function(e){return e.displayName})).forEach((function(e){return n.presetControls[e]=!0})),n.state={fitInControls:n.presetControls,activeControls:n.presetControls},n}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.resizeObserver=new ResizeObserver((function(t){return e.onBarWidthChange(t)})),this.resizeObserver.observe(this.bottomBarContainerRef.current)},i.componentWillUnmount=function(){this.resizeObserver.disconnect()},i.onBarWidthChange=function(e){var t=this,n=e[0].contentRect.width;if(n!==this.currentBarWidth){var r=Object.keys(this.state.activeControls).filter((function(e){return t.state.activeControls[e]})),i=this.props.guiClientRect.width<=ki.SMALL?38:44,a=function(e,t,n,r){for(var i,a=0,o=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 Jl(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)?Jl(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;l in tu?o=tu[l]:l===Md.displayName?n>ki.SMALL&&(o=r?3*t:t):o=t,a+=o}return a}(r,i,this.props.guiClientRect.width,this.props.playlist),o=au.filter((function(e){return t.state.activeControls[e[0]]}));this.currentBarWidth=n,this.filterControls(n,a,i,o)}},i.filterControls=function(e,t,n,r){if(t>=e){var i=function(e,t,n,r){var i=Math.ceil((e-t)/n),a=r.flat().slice(0,i),o=[].concat(r).reverse().find((function(e){return e.length>1}));return a[a.length-1]===(null==o?void 0:o[0])&&a.push(o[1]),a}(t,e,n,r),a={};i.forEach((function(e){return a[e]=!1})),this.setState({fitInControls:nu({},this.presetControls,a)})}else this.setState({fitInControls:nu({},this.presetControls)})},i.render=function(e){var t=this,n=[dr.a.bottomBar];return e.isCasting&&e.isPlaybackEnded&&n.push(dr.a.hide),N("div",{className:n.join(" ")},N("div",{className:dr.a.bottomBarArea},N(qn,{shouldUpdate:!0,name:"BottomBar"},e.children)),N("div",{ref:this.bottomBarContainerRef,className:dr.a.controlsContainer},N("div",{className:dr.a.leftControls},N(qn,{shouldUpdate:!0,name:"BottomBarLeftControls"},e.leftControls&&e.leftControls.map((function(e){return t.presetControls[e.displayName]&&t.state.fitInControls[e.displayName]&&N(e,{key:e.displayName,onToggle:t.onToggleControl})})))),N("div",{className:dr.a.rightControls},N(qn,{shouldUpdate:!0,name:"BottomBarRightControls"},e.rightControls&&e.rightControls.map((function(e){return t.presetControls[e.displayName]&&t.state.fitInControls[e.displayName]&&N(e,{key:e.displayName,onToggle:t.onToggleControl})}))))))},r}(j))||eu)||eu)||eu);ou.displayName="BottomBar";var su,lu=function(e){var t=_e(null);return me((function(){var n;e.isActive&&(null==(n=t)||n.focus())}),[]),N("div",{role:"menuitemradio",tabIndex:"0","aria-checked":e.isActive?"true":"false",ref:function(n){t=n,e.addAccessibleChild(n)},className:e.classNames.join(" "),onClick:e.changeCaptionsStyle,onKeyDown:function(t){t.keyCode===On.ENTER&&e.changeCaptionsStyle()}},e.children,e.isActive?N("div",{className:dr.a.activeTick},N(ko,{type:mo.Check})):void 0)};function uu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}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 du,pu=Sr(su=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 cu(uu(t=e.call.apply(e,[this].concat(r))||this),"transitionToState",(function(){t.props.transitionToState(t.props.cvaaOverlayState.CustomCaptions)})),cu(uu(t),"onKeyDown",(function(e){e.keyCode===On.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:[dr.a.overlayScreen,dr.a.active].join(" ")},N("div",{className:dr.a.title},N(bn,{id:"cvaa.title"})),N("div",{role:"group"},N(lu,{addAccessibleChild:e.addAccessibleChild,classNames:[dr.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(lu,{addAccessibleChild:e.addAccessibleChild,classNames:[dr.a.sample,dr.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(lu,{addAccessibleChild:e.addAccessibleChild,classNames:[dr.a.sample,dr.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:dr.a.customCaptionsApplied},N("div",{className:[dr.a.sample,dr.a.custom].join(" "),style:e.customTextStyle.toCSS()},N(bn,{id:"cvaa.sample_custom_caption_tag"}),N("div",{className:dr.a.activeTick},N(ko,{type:mo.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:dr.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}(j))||su;function hu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fu(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}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=Qt((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,guiClientRect:e.shell.guiClientRect}}))(du=jr(du=Va(du=function(e){function t(){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),"handleClickOutside",(function(e){t.props.isMobile||t.props.isSmallSize||!t._menuElement||t._menuElement.contains(e.target)||t.props.onClose()})),gu(hu(t),"onChange",(function(e){t.onSelect(t.props.options[e.target.value])})),t}fu(t,e);var n=t.prototype;return n.componentWillMount=function(){this.setState({position:[dr.a.top,dr.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?[dr.a.top,dr.a.left]:e.bottom+e.height<t.bottom?[dr.a.bottom,dr.a.left]:(this._menuElement.style.maxHeight=.8*t.height+"px",[dr.a.stickBottom,dr.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?dr.a.mobileHiddenSelect:"";return N("select",{"aria-labelledby":e,role:"listbox",ref:function(e){t.props.pushRef&&t.props.pushRef(e)},className:n+=" "+dr.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:[dr.a.dropdownMenu].concat(this.state.position).join(" ")},e.options.map((function(n,r){return N(mu,{setDefaultFocusedElement:e.setDefaultFocusedElement,addAccessibleChild:e.addAccessibleChild,isSelected:t.isSelected,onSelect:function(e){t.onSelect(e)},key:r,data:n})})))},t}(j))||du)||du)||du;yu.displayName="Menu";var vu,mu=function(e){function t(){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),"onClick",(function(e){e.stopPropagation(),t.props.onSelect(t.props.data)})),gu(hu(t),"onKeyDown",(function(e){switch(e.keyCode){case On.ENTER:t.props.onSelect(t.props.data),e.stopPropagation()}})),t}return fu(t,e),t.prototype.render=function(e){var t=this,n=e.data.badgeType&&!e.isSelected(e.data)?bo[e.data.badgeType]:bo[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)?[dr.a.dropdownMenuItem,dr.a.active].join(" "):dr.a.dropdownMenuItem,onClick:this.onClick,onKeyDown:this.onKeyDown},N("span",{className:n?[dr.a.labelBadge,n].join(" "):""},e.data.label),N("span",{className:[dr.a.menuIconContainer,dr.a.active].join(" ")},N(ko,{type:mo.CheckActive})))},t}(j);function bu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Eu=Qt((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize}}))(vu=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 _u(bu(t=e.call.apply(e,[this].concat(r))||this),"onMenuChosen",(function(e){t.props.onMenuChosen(e),t.setState({dropMenuActive:!1})})),_u(bu(t),"onClick",(function(){t.state.dropMenuActive||setTimeout((function(){return t.toggleDropDown()}))})),_u(bu(t),"onKeyDown",(function(e){switch(e.keyCode){case On.ENTER:t.onClick();break;case On.SPACE:e.preventDefault(),t.onClick();break;case On.ESC:t.state.dropMenuActive&&(t.onClose(),e.stopPropagation())}})),_u(bu(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(yu,{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=bo[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?[dr.a.dropdown,dr.a.active].join(" "):dr.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:dr.a.dropdownButton,onClick:this.onClick,onKeyDown:this.onKeyDown},N("span",{id:i,className:s?[dr.a.labelBadge,s].join(" "):""},o),N(ko,{type:mo.ArrowDown}),this.state.dropMenuActive?N(yu,{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}(j))||vu;Eu.displayName="DropDown";var ku=function(e){return N("div",{className:e.classNames.join(" ")},N("label",{id:e.styleName},N(bn,{id:e.labelId})),N(Eu,{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 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=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),"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))}))})),Au(Tu(t),"onKeyDown",(function(e){e.keyCode!==On.LEFT&&e.keyCode!==On.RIGHT||t.onKeyboardDragging(e)})),Au(Tu(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))}))})),Au(Tu(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 On.RIGHT:(n+=5)>this.state.max&&(n=this.state.max);break;case On.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:dr.a.slider,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler,onKeyDown:this.onKeyDown},N("div",{className:dr.a.progress,style:{width:this.getPercentageByValue()+"%"}},N("div",{className:dr.a.handle,onMouseDown:this.mouseDownHandler,onTouchStart:this.mouseDownHandler})))},r}(j);wu.displayName="Slider";var Su,Cu=function(e){return N("div",{className:e.classNames.join(" ")},N("label",{id:e.styleName},N(bn,{id:e.labelId})),N(wu,{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 xu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Iu(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,Du,Ru,Lu,Ou,Mu=Sr(Su=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 Iu(xu(t=e.call.apply(e,[this].concat(r))||this),"changeCaptionsStyle",(function(){t.props.changeCaptionsStyle(t.props.customTextStyle)})),Iu(xu(t),"transitionToState",(function(){t.props.transitionToState(t.props.cvaaOverlayState.Main)})),Iu(xu(t),"onKeyDown",(function(e){e.keyCode===On.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,n=this.props.player,r=n.TextStyle.FontFamily,i=n.TextStyle.EdgeStyles,a=n.TextStyle.StandardColors,o=n.TextStyle.FontSizes.map((function(t){return{value:t.label,label:t.label,active:e.customTextStyle.fontSize===t.label}})),s=Object.keys(a).map((function(t){return{value:a[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.fontColor.every((function(e,n){return e===a[t][n]}))}})),l=Object.keys(r).map((function(t){return{value:r[t],label:r[t],active:e.customTextStyle.fontFamily===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.fontEdge===i[t]}})),c=Object.keys(a).map((function(t){return{value:a[t],label:t.charAt(0).toUpperCase()+t.toLowerCase().slice(1),active:e.customTextStyle.backgroundColor.every((function(e,n){return e===a[t][n]}))}}));return N("div",{className:[dr.a.overlayScreen,dr.a.active].join(" ")},N("form",{className:[dr.a.form,dr.a.customCaptionForm].join(" ")},N(ku,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.size_label",options:o,classNames:[dr.a.formGroupRow,dr.a.fontSize],styleName:"fontSize",changeCustomStyle:e.changeCustomStyle}),N(ku,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_color_label",options:s,classNames:[dr.a.formGroupRow,dr.a.fontColor],styleName:"fontColor",changeCustomStyle:e.changeCustomStyle}),N(ku,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_family_label",options:l,classNames:[dr.a.formGroupRow,dr.a.fontFamily],styleName:"fontFamily",changeCustomStyle:e.changeCustomStyle}),N(ku,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_style_label",options:u,classNames:[dr.a.formGroupRow,dr.a.fontStyle],styleName:"fontEdge",changeCustomStyle:e.changeCustomStyle}),N(Cu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.font_opacity_label",value:e.customTextStyle.fontOpacity,classNames:[dr.a.formGroupRow,dr.a.fontOpacity],styleName:"fontOpacity",changeCustomStyle:e.changeCustomStyle}),N(ku,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.background_color_label",options:c,classNames:[dr.a.formGroupRow,dr.a.backgroundColor],styleName:"backgroundColor",changeCustomStyle:e.changeCustomStyle}),N(Cu,{addAccessibleChild:e.addAccessibleChild,labelId:"cvaa.background_opacity_label",value:e.customTextStyle.backgroundOpacity,classNames:[dr.a.formGroupRow,dr.a.backgroundOpacity],styleName:"backgroundOpacity",changeCustomStyle:e.changeCustomStyle}),N("div",{className:dr.a.formGroupRow},N("a",{role:"button",tabIndex:"0",ref:function(t){e.addAccessibleChild(t)},onClick:function(){t.changeCaptionsStyle(),t.transitionToState()},onKeyDown:this.onKeyDown,className:[dr.a.btn,dr.a.btnBranded,dr.a.btnBlock].join(" ")},N(bn,{id:"cvaa.apply"}))),N("div",{className:dr.a.previewContainer},N("span",{style:e.getPreviewStyle()},N(bn,{id:"cvaa.caption_preview"})))))},r}(j))||Su;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)}var Bu,ju={Main:"main",CustomCaptions:"custom-captions"},Hu=(Pu=Qt((function(e){return{style:e.cvaa.style}}),ur(Fu({},ra,sr))),Du=Bn("CVAAOverlay"),Ru=hi("CVAAOverlay"),Lu=An({cvvaDialogText:"cvaa.title"}),Pu(Ou=Sr(Ou=Du(Ou=Ru(Ou=Va(Ou=Lu(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),"transitionToState",(function(e){t.setState({activeWindow:e})})),Uu(Nu(t),"changeCaptionsStyle",(function(e){t.props.updateCaptionsStyle(e),t.props.player.textStyle=e,t.props.notifyClick({textStyle:e})})),Uu(Nu(t),"getPreviewStyle",(function(){return"font-size: "+100*t.state.customTextStyle.implicitFontScale+"%!important; "+t.state.customTextStyle.toCSS()})),Uu(Nu(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:ju.Main})},i.componentWillMount=function(){var e=this.props.player;this.setState({activeWindow:ju.Main,customTextStyle:e.textStyle}),this.props.setIsModal(!0)},i.render=function(e){return e.clearAccessibleChildren(),N(zu,{open:!0,handleKeyDown:this.props.handleKeyDown,addAccessibleChild:this.props.addAccessibleChild,onClose:e.onClose,type:"cvaa",label:e.cvvaDialogText},this.state.activeWindow===ju.Main?N(pu,{cvaaOverlayState:ju,addAccessibleChild:e.addAccessibleChild,captionsStyleDefault:this.captionsStyleDefault,captionsStyleBlackBG:this.captionsStyleBlackBG,captionsStyleYellow:this.captionsStyleYellow,changeCaptionsStyle:this.changeCaptionsStyle,transitionToState:this.transitionToState,customTextStyle:this.state.customTextStyle}):N(Mu,{addAccessibleChild:e.addAccessibleChild,focusOnDefault:this.props.focusOnDefault,changeCaptionsStyle:this.changeCaptionsStyle,changeCustomStyle:this.changeCustomStyle,getPreviewStyle:this.getPreviewStyle,customTextStyle:this.state.customTextStyle,transitionToState:this.transitionToState,cvaaOverlayState:ju}))},r}(j))||Ou)||Ou)||Ou)||Ou)||Ou)||Ou);function Vu(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}function Ku(){return(Ku=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)}Hu.displayName="CVAAOverlay";var zu=Qt((function(e){return{overlayOpen:e.overlay.isOpen}}),ur(Ku({},sr,Sa)))(Bu=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(Vu(t=e.call.apply(e,[this].concat(r))||this),"_timeoutId",null),Gu(Vu(t),"onCloseButtonKeyDown",(function(e){e.keyCode!==On.ENTER&&e.keyCode!==On.SPACE||(e.preventDefault(),t.props.onClose())})),Gu(Vu(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(dr.a.overlayActive)}),0)},i.componentWillUnmount=function(){this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null),this.props.removePlayerClass(dr.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:dr.a.closeOverlay},N(ko,{type:mo.Close})))},i.render=function(e){var t=e.type,n=e.open,r=e.label,i=void 0===r?"dialog":r,a=[dr.a.overlay];if(t){var o=dr.a[t+"-overlay"]?dr.a[t+"-overlay"]:t+"-overlay";a.push(o)}return n&&(this.props.updateOverlay(n),a.push(dr.a.active)),N("div",{tabIndex:"-1",className:a.join(" "),role:"dialog",onKeyDown:this.onKeyDown,"aria-label":i},N("div",{className:dr.a.overlayContents},this.props.children),this.renderCloseButton(this.props))},r}(j))||Bu;function Wu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}zu.displayName="Overlay";var qu,Xu,Qu,$u=[{"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"}],Ju=function(e){var t,n;function r(t){var n;return Yu(Wu(n=e.call(this,t)||this),"_timeoutId",null),Yu(Wu(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})}})),Yu(Wu(n),"onKeyDown",(function(e){e.keyCode===On.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=[dr.a.btnCopyUrl,dr.a.btnBorderless,dr.a.onlyIcon].join(" ");return t+=this.state.copySuccess?" "+dr.a.copied:"",N(En,null,N(ns,{name:"CopyButton"},N(Oo,{label:N(bn,{id:"copy.button"})},N(Ho,{tabIndex:"0",ref:function(t){e.addAccessibleChild&&e.addAccessibleChild(t)},className:t,onClick:this.copy,onKeyDown:this.onKeyDown},N(Eo,{id:"copy",color:"#fff",path:$u,width:"24",height:"24",viewBox:"0 0 24 24"}),N(Eo,{type:mo.Check})))))},r}(j);function Zu(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ec(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Yu(Ju,"defaultProps",{icon:mo.Copy}),Ju.displayName="CopyButton";var tc,nc,rc,ic,ac=(qu=Qt((function(e){var t;return{hasError:e.engine.hasError,errorOverlaConfig:null==(t=e.config.components)?void 0:t.errorOverlay}}),ur(Tr)),Xu=Bn("ErrorOverlay"),qu(Qu=Sr(Qu=Xu(Qu=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 ec(Zu(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")})),ec(Zu(t),"handleClick",(function(){var e=t.props.player.getMediaInfo();t.props.player.loadMedia(e)})),ec(Zu(t),"getBackgroundUrl",(function(){var e=t.props.errorOverlaConfig;return null==e?void 0:e.backgroundUrl})),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:dr.a.linkOptionsContainer},N("div",{className:dr.a.copyUrlRow},N("div",{ref:function(t){return t?e.sessionEl=t:void 0},className:dr.a.errorSession},N(bn,{id:"error.default_session_text"})," "," "+n),N(Ju,{copy:this.copyError}))):void 0},i.renderRetryButton=function(){if(this.props.player.getMediaInfo()){var e=Boolean(this.getBackgroundUrl());return N("div",{className:dr.a.controlButtonContainer,onClick:this.handleClick},N(Ho,{className:[e?dr.a.btnTranslucent:dr.a.btnBorderless,dr.a.retryBtn].join(" ")},N(bn,{id:"error.retry"})))}},i.renderErrorHead=function(){var e=navigator.onLine?"error.default_error":"error.network_error";return N("div",{className:dr.a.headline},this.props.errorHead?this.props.errorHead:N(bn,{id:e}))},i.render=function(){if(this.props&&this.props.hasError||this.props.permanent){var e=this.getBackgroundUrl(),t=e?{backgroundImage:"url("+e+")"}:null;return N("div",{className:["overlay-portal",e?dr.a.customErrorSlate:""].join(" ")},N(zu,{open:!0,permanent:!0,type:"error"},N("div",{className:dr.a.errorOverlay,style:t},N("p",{className:dr.a.errorText}),this.renderErrorHead(),this.renderSessionID(),this.renderRetryButton())))}},r}(j))||Qu)||Qu)||Qu);function oc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ac.displayName="ErrorOverlay";var lc=(tc=Qt((function(e){return{isLive:e.engine.isLive,isDvr:e.engine.isDvr,currentTime:e.engine.currentTime,duration:e.engine.duration}})),nc=Bn("LiveTag"),rc=hi("LiveTag"),tc(ic=Sr(ic=nc(ic=rc(ic=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 sc(oc(t=e.call.apply(e,[this].concat(r))||this),"onKeyDown",(function(e){e.keyCode===On.ENTER&&t.onClick()})),sc(oc(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=[dr.a.liveTag];return e.isDvr&&!this.isOnLiveEdge()&&t.push(dr.a.nonLivePlayhead),N("div",{tabIndex:"0",className:t.join(" "),onClick:this.onClick,onKeyDown:this.onKeyDown},N(bn,{id:"controls.live"}))},r}(j))||ic)||ic)||ic)||ic);lc.displayName="LiveTag";var uc,cc,dc,pc,hc=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}(j);function fc(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)}}hc.displayName="OverlayPortal";var gc,yc,vc,mc=(uc=Qt((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)),cc=hi("SeekBarLivePlaybackContainer"),dc=Bn("SeekBarLivePlaybackContainer"),uc(pc=Sr(pc=jr(pc=cc(pc=dc(pc=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(Yp,{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}}])&&fc(i.prototype,a),r}(j))||pc)||pc)||pc)||pc)||pc);function bc(){return(bc=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 _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)}}mc.displayName="SeekBarLivePlaybackContainer";var Ec=(gc=Qt((function(e){return{isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize}}),ur(sr)),yc=An({settingsText:"settings.title"}),gc(vc=Va(vc=yc(vc=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(dr.a.smartContainerOpen),this.props.updateSmartContainerOpen(!0)},o.componentWillUnmount=function(){this.props.removePlayerClass(dr.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(zu,{open:!0,onClose:e.onClose,handleKeyDown:this.props.handleKeyDown,addAccessibleChild:this.props.addAccessibleChild,label:e.settingsText},N("div",{className:dr.a.title},e.title),this.renderChildren(e)),t.querySelector(".overlay-portal")):N("div",{onKeyDown:e.handleKeyDown,tabIndex:"-1",className:[dr.a.smartContainer,dr.a.top,dr.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,bc({pushRef:function(t){e.addAccessibleChild(t)}},t.props))}))},i=r,(a=[{key:"isPortal",get:function(){return this.props.isMobile||this.props.isSmallSize}}])&&_c(i.prototype,a),r}(j))||vc)||vc)||vc);Ec.displayName="SmartContainer";var kc=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:[dr.a.smartContainerItem,dr.a.selectMenuItem].join(" ")},N("label",{id:t,htmlFor:t},e.icon?N("div",{className:dr.a.labelIcon},N(ko,{type:e.icon})):void 0,e.label),e.options&&e.options.length?N(Eu,{pushRef:function(t){e.pushRef(t)},name:t,onMenuChosen:function(t){return e.onMenuChosen(t)},options:e.options}):N("div",{style:{paddingLeft:"20px"}},N(Vd,{pushRef:function(t){e.pushRef(t)},name:t,isChecked:e.isChecked,onMenuChosen:function(t){return e.onMenuChosen(t)}})))},r}(j);kc.displayName="SmartContainerItem";var Tc,Ac=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=Ga(e),a=Ga(t),o=Ga(t-e);return(r=(r=r.replace(/current/g,i)).replace(/total/g,a)).replace(/left/g,o)},i.render=function(e){var t=e.currentTime,n=e.duration,r=e.format,i=void 0===r?"current / total":r;return N("div",{className:dr.a.timeDisplay},N("span",null,this.getTimeDisplay(t,n,i)))},r}(j);function wc(){return(wc=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)}Ac.displayName="TimeDisplay";var Sc,Cc=Qt((function(e){return{adProgress:e.engine.adProgress}}))(Tc=Bn("TimeDisplayAdsContainer")(Tc=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(Ac,wc({currentTime:Math.round(e.adProgress.currentTime),duration:Math.round(e.adProgress.duration)},e))},r}(j))||Tc)||Tc;function xc(){return(xc=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)}Cc.displayName="TimeDisplayAdsContainer";var Ic,Pc=Qt((function(e){return{currentTime:e.engine.currentTime,duration:e.engine.duration}}))(Sc=Bn("TimeDisplayPlaybackContainer")(Sc=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(Ac,xc({currentTime:e.currentTime,duration:e.duration},e))},r}(j))||Sc)||Sc;Pc.displayName="TimeDisplayPlaybackContainer";var Dc,Rc,Lc,Oc=Qt((function(e){return{isCasting:e.engine.isCasting,isPlaybackEnded:e.engine.isPlaybackEnded}}))(Ic=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=[dr.a.topBar];return t&&o.push(dr.a.disabled),r&&n&&o.push(dr.a.hide),N("div",{className:o.join(" ")},N("div",{className:dr.a.topBarArea},N(qn,{name:"TopBar"})),e.children,N("div",{className:dr.a.leftControls},N(qn,{name:"TopBarLeftControls"},i)),N("div",{className:dr.a.rightControls},N(qn,{name:"TopBarRightControls"},a)))},r}(j))||Ic;function Mc(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Oc.displayName="TopBar";var Uc,Fc,Bc,jc=(Dc=Qt((function(e){return{fallbackToMutedAutoPlay:e.engine.fallbackToMutedAutoPlay}}),null),Rc=Bn("UnmuteIndication"),Dc(Lc=Sr(Lc=jr(Lc=Rc(Lc=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 Nc(Mc(t=e.call.apply(e,[this].concat(r))||this),"_iconTimeout",null),Nc(Mc(t),"onKeyDown",(function(e){e.keyCode===On.ENTER&&(t.props.player.muted=!t.props.player.muted)})),Nc(Mc(t),"onMouseOver",(function(){return t.setState({iconOnly:!1})})),Nc(Mc(t),"onMouseOut",(function(){return t.setState({iconOnly:!0})})),Nc(Mc(t),"onMouseUp",(function(){return t.props.player.muted=!t.props.player.muted})),Nc(Mc(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=[dr.a.unmuteButtonContainer];return e.hasTopBar&&t.push(dr.a.hasTopBar),this.state.iconOnly&&t.push(dr.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:[dr.a.btn,dr.a.btnDarkTransparent,dr.a.unmuteButton].join(" ")},N("div",{className:dr.a.unmuteIconContainer},N(ko,{type:mo.VolumeBase}),N(ko,{type:mo.VolumeMute})),N("span",null,N(bn,{id:"unmute.unmute"})))))}},r}(j))||Lc)||Lc)||Lc)||Lc);jc.displayName="UnmuteIndication";var Hc,Vc,Gc,Kc,zc=(Uc=Qt((function(e){return{config:Object.assign({placement:"top-left",timeout:0},e.config.components.watermark)}})),Fc=Bn("Watermark"),Uc(Bc=Sr(Bc=jr(Bc=Fc(Bc=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=[dr.a.watermark];return e.config.placement.split("-").forEach((function(e){t.push(dr.a[e])})),e.config.url||t.push(dr.a.emptyUrl),this.state.show||t.push(dr.a.hideWatermark),N("div",{className:t.join(" ")},N("a",{href:e.config.url,target:"_blank",rel:"noopener noreferrer"},N(En,null,N("img",{src:e.config.img,alt:N(bn,{id:"watermark.watermark_alt_text"})}))))}},r}(j))||Bc)||Bc)||Bc)||Bc);zc.displayName="Watermark";var Wc,Yc,qc,Xc=(Hc=Qt((function(e){return{isMobile:e.shell.isMobile,playerSize:e.shell.playerSize,config:e.config.components.logo}})),Vc=Bn("Logo"),Gc=An({logoText:"controls.logo"}),Hc(Kc=Sr(Kc=Vc(Kc=Gc(Kc=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(){var e=!(0===Object.keys(this.props.config).length&&this.props.config.constructor===Object)&&this.props.config.img;return this.props.onToggle("Logo",e),e},i.render=function(e){if(this._shouldRender())return N("div",{className:[dr.a.controlButtonContainer,e.config.url?"":dr.a.emptyUrl].join(" "),"aria-label":e.logoText,title:e.config.text},N("a",{className:dr.a.controlButton,href:e.config.url,target:"_blank",rel:"noopener noreferrer"},N("img",{className:dr.a.icon,src:e.config.img})))},r}(j))||Kc)||Kc)||Kc)||Kc);Xc.displayName="Logo";var Qc,$c,Jc,Zc,ed,td=Qt((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}}))(Wc=Bn("CastOverlay")((qc=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.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(Eo,{type:this.props.icon}):N("div",{className:dr.a.castConnectingSpinner})},i.render=function(e){if(e.castSession){var t={},n=[dr.a.castPoster];e.poster&&(t={backgroundImage:e.isChangingSource?"":"url("+e.poster+")",backgroundSize:"contain"},n.push(dr.a.hasPoster));var r=this.getStatus(),i=this.getIcon();return N("div",null,N("div",{className:dr.a.castOverlay},N("div",{className:n.join(" "),style:t,onMouseOver:function(e){return e.stopPropagation()}}),N("div",{className:dr.a.castBlackCover})),N("div",{className:dr.a.castBox},N("div",{className:dr.a.castIcon},i),N("div",{className:dr.a.castText},N(En,null,N("span",{className:dr.a.castStatus},r)),N("br",null),N("span",{className:dr.a.castDevice},e.castSession.deviceFriendlyName))))}},r}(j),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Yc,"defaultProps",{icon:mo.Cast}),Wc=qc))||Wc)||Wc;function nd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}td.displayName="CastOverlay";var id,ad,od,sd,ld,ud=(Qc=Qt((function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,prePlayback:e.engine.prePlayback,loading:e.loading.show,isCastAvailable:e.engine.isCastAvailable}})),$c=Bn("CastBeforePlay"),Qc(Jc=Sr(Jc=$c((ed=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 rd(nd(t=e.call.apply(e,[this].concat(r))||this),"_timeoutId",null),rd(nd(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=[dr.a.castOnTvButtonContainer];return this.state.show&&t.push(dr.a.showCastOnTv),N("div",{className:t.join(" ")},N(En,null,N(Ho,{tabIndex:"0","aria-label":N(bn,{id:"cast.play_on_tv"}),onClick:this.onClick,className:[dr.a.btn,dr.a.btnDarkTransparent,dr.a.castOnTvButton].join(" ")},N("div",{className:dr.a.castOnTvIconContainer},N(Eo,{type:e.icon})),N("span",null,N(bn,{id:"cast.play_on_tv"})))))}},r}(j),rd(Zc,"defaultProps",{icon:mo.Cast}),Jc=ed))||Jc)||Jc)||Jc);function cd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function dd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ud.displayName="CastBeforePlay";var pd,hd=(id=Qt((function(e){return{isPlaybackEnded:e.engine.isPlaybackEnded,isCasting:e.engine.isCasting}}),null),ad=Bn("CastAfterPlay"),id(od=Sr(od=ad((ld=sd=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 dd(cd(t=e.call.apply(e,[this].concat(r))||this),"_timeoutId",null),dd(cd(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=[dr.a.castOnTvButtonContainer];return this.state.show&&t.push(dr.a.showCastOnTv),N("div",null,N("div",{className:t.join(" "),onClick:this.onClick},N("a",{className:[dr.a.btn,dr.a.btnDarkTransparent,dr.a.castOnTvButton].join(" ")},N("div",{className:dr.a.castOnTvIconContainer},N(Eo,{type:e.icon})),N(En,null,N("span",null,N(bn,{id:"cast.disconnect_from_tv"}))))))}},r}(j),dd(sd,"defaultProps",{icon:mo.CastBrand}),od=ld))||od)||od)||od);hd.displayName="CastAfterPlay";var fd,gd=An({prevControlsText:"controls.prev",nextControlsText:"controls.next",playlistPrevText:"playlist.prev",playlistUpNextText:"playlist.up_next"})(pd=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?mo.Next:mo.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:"",d=N(Ho,{disabled:!i,tabIndex:"0","aria-label":s,className:""+dr.a.controlButton,onClick:a},N("div",null,N(ko,{type:o})));return N("div",{className:[dr.a.controlButtonContainer,dr.a.controlPlaylistButton].join(" ")},e.showPreview&&(u||c)?N(B,null,N("div",{className:dr.a.posterPreview},u?N("div",{className:dr.a.posterPreviewImg,style:"background-image: url("+u+");"}):void 0,N("div",{className:dr.a.posterPreviewText},N("div",{className:dr.a.posterPreviewTextTitle},l),N("div",{className:dr.a.posterPreviewTextName},""+(c||"")))),d):N(Oo,{label:s},d))},r}(j))||pd;function yd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function vd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var md,bd,_d,Ed=Qt((function(e){return{playlist:e.engine.playlist}}))(fd=Sr(fd=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 vd(yd(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(gd,{type:e.type,item:t,onClick:this.onClick.bind(this),showPreview:e.showPreview})},r}(j))||fd)||fd;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}Ed.displayName="PlaylistButton";var Ad,wd,Sd,Cd,xd,Id,Pd=(md=Qt((function(e){return{playlist:e.engine.playlist,isPlaybackEnded:e.engine.isPlaybackEnded}})),bd=Bn("PlaylistNextScreen"),md(_d=Sr(_d=bd(_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 Td(kd(t=e.call.apply(e,[this].concat(r))||this),"onPosterClick",(function(){t.props.player.playlist.playNext()})),Td(kd(t),"onKeyDown",(function(e){e.keyCode!==On.ENTER&&e.keyCode!==On.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:dr.a.playlistNextScreenOverlay},N("div",{className:dr.a.playlistNextScreenContent},N("div",{id:"playlistNextScreenTextId",className:dr.a.playlistNextScreenText},N(En,null,N("div",{className:dr.a.playlistNextScreenTextTitle},N(bn,{id:"playlist.next"}))),N("div",{className:dr.a.playlistNextScreenTextName},""+(n.sources.metadata?n.sources.metadata.name:""))),N("div",{className:dr.a.playlistNextScreenPosterPlaceholder},N("div",{className:dr.a.playlistNextScreenPosterAspectRatio},N("div",{role:"button","aria-labelledby":"playlistNextScreenTextId",ref:function(e){return e?t.focusElement=e:void 0},tabIndex:"0",className:dr.a.playlistNextScreenPoster,onClick:this.onPosterClick,onKeyDown:this.onKeyDown},N("div",{className:dr.a.playlistNextScreenPosterImg,style:"background-image: url("+this._getPosterUrl()+");"}),N(ko,{type:mo.Play}))))))}},r}(j))||_d)||_d)||_d);function Dd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Pd.displayName="PlaylistNextScreen";var Ld,Od=(Ad=Qt((function(e){return{isPictureInPictureSupported:e.engine.isPictureInPictureSupported,isInPictureInPicture:e.engine.isInPictureInPicture,playerSize:e.shell.playerSize}}),ur(sr)),wd=Bs("PictureInPicture"),Sd=Bn("PictureInPicture"),Cd=hi("PictureInPicture"),xd=An({pictureInPictureText:"controls.pictureInPicture",pictureInPictureExitText:"controls.pictureInPictureExit",pictureInPictureExpandText:"controls.pictureInPictureExpand"}),Ad(Id=Sr(Id=wd(Id=Sd(Id=Cd(Id=xd(Id=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 Rd(Dd(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:On.P},action:function(){t.togglePip(),t.props.updatePlayerHoverState(!0)}}]),Rd(Dd(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._shouldRender=function(){var e=!(void 0!==this.props.isPictureInPictureSupported&&!this.props.isPictureInPictureSupported);return this.props.onToggle("PictureInPicture",e),e},i.render=function(){if(this._shouldRender())return N(ns,{name:"PictureInPicture"},N(Oo,{label:this.props.isInPictureInPicture?this.props.pictureInPictureExpandText:this.props.pictureInPictureText},N(Ho,{tabIndex:"0","aria-label":this.props.isInPictureInPicture?this.props.pictureInPictureExitText:this.props.pictureInPictureText,className:this.props.isInPictureInPicture?[dr.a.controlButton,dr.a.isInPictureInPicture].join(" "):dr.a.controlButton,onClick:this.togglePip},N(ko,{type:mo.PictureInPictureStart}),N(ko,{type:mo.PictureInPictureStop}))))},r}(j))||Id)||Id)||Id)||Id)||Id)||Id);Od.displayName="PictureInPicture";var Md=Qt((function(e){return{playlist:e.engine.playlist}}))(Ld=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.showPreview,n=void 0===t||t,r=e.playlist,i=e.className,a=this.state.shouldUpdate;return a&&this.setState({shouldUpdate:!1}),N("div",{className:[dr.a.playbackControls,i].join(" ")},N(qn,{name:"BottomBarPlaybackControls",shouldUpdate:a},r?N(B,null,N(Ed,{type:"prev",showPreview:n}),N(ll,null),N(Ed,{type:"next",showPreview:n})):N(ll,null)))},r}(j))||Ld;function Nd(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}Md.displayName="PlaybackControls";var Fd,Bd,jd,Hd,Vd=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(Nd(t=e.call.apply(e,[this].concat(r))||this),"onChange",(function(e){t.props.onMenuChosen(e)})),Ud(Nd(t),"handleOnKeyDown",(function(e){e.keyCode!==On.ENTER&&e.keyCode!==On.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:dr.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:dr.a.toggleInput,type:"checkbox",checked:e.isChecked,onChange:function(e){return t.onChange(e.target.checked)}}),N("span",{className:dr.a.slider}))},r}(j);Vd.displayName="ToggleSwitch";var Gd,Kd,zd,Wd,Yd,qd,Xd=(Fd=Qt((function(e){return{audioTracks:e.engine.audioTracks}}),ur(la)),Bd=hi("AudioMenu"),jd=An({audioLabelText:"settings.audio"}),Fd(Hd=Sr(Hd=Bd(Hd=jd(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.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(kc,{pushRef:function(t){e.pushRef(t)},icon:mo.Audio,label:this.props.audioLabelText,options:n,onMenuChosen:function(e){return t.onAudioChange(e)}})},r}(j))||Hd)||Hd)||Hd)||Hd);function Qd(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Xd.displayName="AudioMenu";var Jd,Zd,ep,tp,np,rp,ip=(Gd=Qt((function(e){return{textTracks:e.engine.textTracks,isMobile:e.shell.isMobile,isSmallSize:e.shell.isSmallSize,showAdvancedCaptionsMenu:e.config.settings.showAdvancedCaptionsMenu}}),ur(ra)),Kd=Bs("CaptionsMenu"),zd=Bn("CaptionsMenu"),Wd=hi("CaptionsMenu"),Yd=An({captionsLabelText:"captions.captions",advancedCaptionsSettingsText:"captions.advanced_captions_settings"}),Gd(qd=Sr(qd=jr(qd=Kd(qd=zd(qd=Wd(qd=Yd(qd=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 $d(Qd(t=e.call.apply(e,[this].concat(r))||this),"_lastActiveTextLanguage",""),$d(Qd(t),"_keyboardEventHandlers",[{key:{code:On.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(kc,{pushRef:function(t){e.pushRef(t)},icon:mo.Captions,label:this.props.captionsLabelText,options:n,onMenuChosen:function(e){return t.onCaptionsChange(e)}})},r}(j))||qd)||qd)||qd)||qd)||qd)||qd)||qd);function ap(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function op(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}ip.displayName="CaptionsMenu";var sp,lp,up,cp,dp=(Jd=Qt(null,ur(la)),Zd=Bs("SpeedMenu"),ep=Bn("SpeedMenu"),tp=hi("SpeedMenu"),np=An({speedLabelText:"settings.speed",speedNormalLabelText:"settings.speedNormal"}),Jd(rp=Sr(rp=Zd(rp=ep(rp=tp(rp=np(rp=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 op(ap(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:On.PERIOD,shiftKey:!0},action:function(e){t.handleKeydown(e)}},{key:{code:On.SEMI_COLON,shiftKey:!0},action:function(e){t.handleKeydown(e)}},{key:{code:On.COMMA,shiftKey:!0},action:function(e){t.handleKeydown(e)}}]),op(ap(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 On.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(mo.SpeedUp),i.dispatchEvent(new Wr(i.playbackRate)));break;case On.SEMI_COLON:i.playbackRate!==i.defaultPlaybackRate&&(a.debug("Changing playback rate. "+i.playbackRate+" => "+i.defaultPlaybackRate),i.playbackRate=i.defaultPlaybackRate,this.props.updateOverlayActionIcon(mo.Speed),i.dispatchEvent(new Wr(i.playbackRate)));break;case On.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(mo.SpeedDown),i.dispatchEvent(new Wr(i.playbackRate)))}},i.render=function(e){var t=e.optionsRenderer?e.optionsRenderer(e.player.playbackRates):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(kc,{pushRef:function(t){e.pushRef(t)},icon:mo.Speed,label:e.speedLabelText,options:t,onMenuChosen:this.onSpeedChange})},r}(j))||rp)||rp)||rp)||rp)||rp)||rp);dp.displayName="SpeedMenu";var pp={HD:1080,UHD_4K:2160,UHD_8K:4320};function hp(e){var t=Object.keys(bo),n=t[0],r=t[2],i=t[4];return e>=pp.HD&&e<pp.UHD_4K?n:e>=pp.UHD_4K&&e<pp.UHD_8K?r:e>=pp.UHD_8K?i:null}var fp,gp=["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"],yp=(sp=Qt((function(e){return{videoTracks:e.engine.videoTracks}}),ur(la)),lp=hi("QualityMenu"),up=An({qualityLabelText:"settings.quality",qualityAutoLabelText:"settings.qualityAuto"}),sp(cp=Sr(cp=lp(cp=up(cp=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:hp(t.height)}}));if(n.length>1&&"progressive"!==e.player.streamType){var r,i,a=null==(r=n.find((function(e){return!0===e.value.active})))?void 0:r.value,o=(null==a?void 0:a.label)||"360p";i=gp.includes(this.props.player._localPlayer._config.ui.locale)?o+" - "+this.props.qualityAutoLabelText:this.props.qualityAutoLabelText+" - "+o,n.unshift({label:this.props.qualityAutoLabelText,dropdownOptions:{label:i,badgeType:hp((null==a?void 0:a.height)||360)},active:e.player.isAdaptiveBitrateEnabled(),value:"auto"})}return N(kc,{pushRef:function(t){e.pushRef(t)},icon:mo.Quality,label:e.qualityLabelText,options:n,onMenuChosen:function(e){return t.onQualityChange(e)}})},r}(j))||cp)||cp)||cp)||cp);function vp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}yp.displayName="QualityMenu";var bp=Qt((function(e){return{isAdvancedAudioDescChecked:e.settings.advancedAudioDesc}}),ur(la))(fp=hi("AdvancedAudioDescToggle")(fp=An({advancedAudioText:"settings.advancedAudioDescription"})(fp=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 mp(vp(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(kc,{pushRef:function(t){e.pushRef(t)},icon:mo.AdvancedAudioDescription,label:e.advancedAudioText,isChecked:e.isAdvancedAudioDescChecked,onMenuChosen:this.onAdvancedAudioClick})},r}(j))||fp)||fp)||fp;function _p(){return(_p=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)}bp.displayName="AdvancedAudioDescToggle";var Ep=On.ENTER,kp=On.SPACE,Tp=function(e){var t=e.isTextExpanded,n=e.readLessLabel,r=e.readMoreLabel,i=e.onClick,a=e.onKeyDown,o=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,["isTextExpanded","readLessLabel","readMoreLabel","onClick","onKeyDown"]);return N("div",_p({className:dr.a.moreButtonText,onClick:i,onKeyDown:a},o),t?n:r)},Ap=An({readMoreLabel:"controls.readMore",readLessLabel:"controls.readLess"})((function(e){var t=ye(!1),n=t[0],r=t[1],i=ye(!1),a=i[0],o=i[1],s=ye(!1),l=s[0],u=s[1],c=_e(null),d=_e(null);return be((function(){var e,t;(null==d?void 0:d.current)&&(null==c?void 0:c.current)&&(u(!0),o((null==d||null==(e=d.current)?void 0:e.getBoundingClientRect().height)<(null==c||null==(t=c.current)?void 0:t.getBoundingClientRect().height)))}),[l]),a||e.forceShowMore?N("div",null,n?e.children:N("div",{className:dr.a.expandableText,style:{"-webkit-line-clamp":e.lines}},e.text),N(Tp,_p({onClick:function(t){e.onClick&&e.onClick(t),r(!n)},onKeyDown:function(t){t.keyCode!==kp&&t.keyCode!==Ep||(e.onClick&&e.onClick(t),r(!n))},isTextExpanded:n,readLessLabel:e.readLessLabel,readMoreLabel:e.readMoreLabel},e.buttonProps))):N("div",{className:dr.a.contentText},N("div",{className:dr.a.titleWrapper},N("div",{ref:d,style:{"-webkit-line-clamp":e.lines},className:dr.a.expandableText},e.text),l?void 0:N("div",{ref:c,style:{"-webkit-line-clamp":e.lines+1},className:dr.a.expandableText},e.text)))}));function wp(){return(wp=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)}Ap.defaultProps={buttonProps:{}},Ap.displayName="ExpandableText";var Sp,Cp,xp=function(e){var t=e.children,n=e.isVertical,r=_e(null),i=ye(!1),a=i[0],o=i[1],s=ye(-1),l=s[0],u=s[1],c=function(){clearTimeout(l),o(!0),u(window.setTimeout((function(){o(!1)}),250))},d=function(e){e.preventDefault(),(null==r?void 0:r.current)&&(r.current.scrollLeft+=e.deltaY,c())},p=ke((function(){return n?{onScroll:c}:{onWheel:d,ref:r}}),[n]);return N("div",wp({className:dr.a.scrollable+" "+(a?dr.a.scrolling:"")+" "+(n?dr.a.vertical:dr.a.horizontal)},p),t)},Ip=Qt((function(e){return{dataLoaded:e.engine.dataLoaded,currentTime:e.seekbar.currentTime,duration:e.engine.duration,isMobile:e.shell.isMobile,adBreak:e.engine.adBreak}}))(Sp=Sr(Sp=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.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.render=function(e){var t=Math.round(this.getBufferedPercent())+"%",n=(e.player.isLive()&&e.player.isOnLiveEdge()?100:e.currentTime/e.duration*100)+"%";return N(B,null,N("div",{className:dr.a.buffered,style:{width:t}}),e.dataLoaded?N("div",{className:dr.a.progress,style:{width:n}}):void 0)},r}(j))||Sp)||Sp;Ip.displayName="ProgressIndicator";var Pp,Dp,Rp,Lp,Op,Mp,Np,Up=Qt((function(e){return{videoStyles:e.shell.layoutStyles.video}}))(Cp=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:dr.a.videoArea},N("div",{style:{pointerEvents:"auto"}},N(qn,{name:"VideoArea"},n)))},r}(j))||Cp,Fp=Sr(Pp=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:dr.a.interactiveArea},N("div",{style:{pointerEvents:"auto"}},N(qn,{name:"InteractiveArea"},e)))},r}(j))||Pp,Bp=(Dp=Qt((function(e){return{duration:e.engine.duration}})),Sr(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._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:[dr.a.framePreviewImgContainer,dr.a.nonSticky].join(" ")},N("div",{className:dr.a.framePreviewImg,style:this._getFramePreviewImgStyle(e)}))},r}(j))||Rp)||Rp);function jp(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}function Vp(){return(Vp=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)}Bp.displayName="SeekBarPreview";var Gp,Kp,zp,Wp,Yp=(Lp=Qt((function(e){return{config:e.config.components.seekbar,isMobile:e.shell.isMobile,previewHoverActive:e.seekbar.previewHoverActive,hidePreview:e.seekbar.hidePreview,hideTimeBubble:e.seekbar.hideTimeBubble,segments:e.seekbar.segments}}),ur(Vp({},sr,ha))),Op=Bs("SeekBar"),Mp=An({sliderAriaLabel:"controls.seekBarSlider"}),Lp(Np=Sr(Np=jr(Np=Op(Np=Mp(Np=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(jp(t=e.call.apply(e,[this].concat(r))||this),"_keyboardEventHandlers",[{key:{code:On.LEFT},action:function(e){t.handleKeydown(e,!1)}},{key:{code:On.RIGHT},action:function(e){t.handleKeydown(e,!1)}},{key:{code:On.HOME},action:function(e){t.handleKeydown(e,!1)}},{key:{code:On.END},action:function(e){t.handleKeydown(e,!1)}}]),Hp(jp(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)}})),Hp(jp(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})}})),Hp(jp(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)}})),Hp(jp(t),"onSeekbarMouseMove",(function(e){if(!t.props.isMobile&&!t.props.previewHoverActive){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration,!0)}})),Hp(jp(t),"onSeekbarTouchStart",(function(e){if(t.props.updateSeekbarDraggingStatus(!0),t.props.isDraggingActive){var n=t.getTime(e);t.updateSeekBarProgress(n,t.props.duration)}})),Hp(jp(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()})),Hp(jp(t),"onKeyDown",(function(e){switch(e.keyCode){case On.LEFT:case On.RIGHT:t.handleKeydown(e,!0);break;case On.ENTER:case On.SPACE:e.preventDefault(),t.togglePlayPause()}})),Hp(jp(t),"togglePlayPause",(function(){t.props.player.paused?t.props.player.play():t.props.player.pause()})),Hp(jp(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)})),Hp(jp(t),"onSeekbarMouseOver",(function(){t.props.isMobile||t.props.updateSeekbarHoverActive(!0)})),Hp(jp(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})}),dr.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 On.LEFT:t||this.props.updateOverlayActionIcon(mo.Rewind),o(a,a-5>0?a-5:0);break;case On.RIGHT:t||this.props.updateOverlayActionIcon(mo.Forward),o(a,a+5>i?i:a+5);break;case On.HOME:t||this.props.updateOverlayActionIcon(mo.StartOver),o(a,0);break;case On.END:t||this.props.updateOverlayActionIcon(mo.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.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?[dr.a.framePreview,dr.a.hideFramePreview].join(" "):dr.a.framePreview,style:this._getFramePreviewStyle(),ref:function(t){return t?e._framePreviewElement=t:void 0}},N(Bp,{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?"-"+Ga(this.props.duration-this.props.virtualTime):Ga(this.props.virtualTime);return N("div",{className:dr.a.timePreview,style:t,ref:function(t){return t?e._timeBubbleElement=t:void 0}},n)}},i.render=function(e,t){var n,r=this,i=e.virtualTime/e.duration*100+"%",a=e.currentTime/e.duration*(null==(n=this._seekBarElement)?void 0:n.clientWidth)+"px",o=[dr.a.seekBar];return e.adBreak&&o.push(dr.a.adBreak),e.isDvr&&o.push(dr.a.live),e.isMobile&&o.push(dr.a.hover),e.isDraggingActive&&o.push(dr.a.hover),t.resizing&&o.push(dr.a.resizing),N("div",{tabIndex:"0",className:o.join(" "),ref:function(e){return e?r._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":Ga(this.props.currentTime)+" of "+Ga(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:dr.a.progressBar},N(qn,{name:"SeekBar",shouldUpdate:!0},this.renderFramePreview(),this.renderTimeBubble(),N(Ip,null),e.adBreak?void 0:N("div",{id:"scrubber-container",style:"transform: translateX("+a+")"},N("div",{id:"scrubber",className:dr.a.scrubber})),N("div",{className:dr.a.virtualProgress,style:{width:i}},N("div",{className:dr.a.virtualProgressIndicator})))))},r}(j))||Np)||Np)||Np)||Np)||Np);Yp.displayName="SeekBar";var qp,Xp,Qp,$p=(Gp=Qt((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)),Kp=Bn("SeekBarPlaybackContainer"),zp=hi("SeekBarPlaybackContainer"),Gp(Wp=Sr(Wp=jr(Wp=Kp(Wp=zp(Wp=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(Yp,{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}(j))||Wp)||Wp)||Wp)||Wp)||Wp);function Jp(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}$p.displayName="SeekBarPlaybackContainer";var eh,th,nh,rh=(qp=Qt((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(ma)),Xp=Bn("PlaylistCountdown"),qp(Qp=Sr(Qp=jr(Qp=Xp(Qp=function(e){var t,n;function r(t){var n;return Zp(Jp(n=e.call(this,t)||this),"onClick",(function(){n.props.player.playlist.playNext()})),Zp(Jp(n),"cancelNext",(function(e){n.props.logger.debug("Cancel auto play next item"),e.stopPropagation(),n.props.updatePlaylistCountdownCanceled(!0)})),Zp(Jp(n),"onKeyDown",(function(e){switch(e.keyCode){case On.ENTER:n.onClick();break;case On.ESC:n.cancelNext(e)}})),Zp(Jp(n),"onCancelButtonKeyDown",(function(e){e.keyCode===On.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=[dr.a.playlistCountdown];return this.isHidden(this.state)?s.push(dr.a.hidden):this.isCanceled()?s.push(dr.a.canceled):s.push(dr.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:dr.a.playlistCountdownPoster,style:"background-image: url("+this.nextShown.sources.poster+");"}),N("div",{className:dr.a.playlistCountdownContentPlaceholder},N("div",{className:dr.a.playlistCountdownContentBackground},N("div",{className:dr.a.playlistCountdownContent},N(En,null,N("div",{id:"playlistCountdownTextId",className:dr.a.playlistCountdownText},N("div",{className:dr.a.playlistCountdownTextTitle},N(bn,{id:"playlist.up_next_in"}),N("div",{className:dr.a.playlistCountdownTimeLeft},o)),N("div",{className:dr.a.playlistCountdownTextName},""+(this.nextShown.sources.metadata?this.nextShown.sources.metadata.name:"")))),N("div",{className:[dr.a.controlButtonContainer,dr.a.playlistCountdownCancel].join(" ")},N(En,null,N(Ho,{tabIndex:this.state.focusable?0:-1,"aria-label":N(bn,{id:"playlist.cancel"}),className:[dr.a.controlButton,dr.a.playlistCountdownCancelButton].join(" "),onClick:this.cancelNext,onKeyDown:this.onCancelButtonKeyDown},N(ko,{type:mo.Close}))))))))}},r}(j))||Qp)||Qp)||Qp)||Qp);rh.displayName="PlaylistCountdown";var ih=(eh=Qt((function(e){return{poster:e.engine.poster,isInPictureInPicture:e.engine.isInPictureInPicture,isChangingSource:e.engine.isChangingSource}})),th=Bn("PictureInPictureOverlay"),eh(nh=Sr(nh=th(nh=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=[dr.a.pictureInPicturePoster];return this.props.poster&&(e={backgroundImage:this.props.isChangingSource?"":"url("+this.props.poster+")",backgroundSize:"contain"},t.push(dr.a.hasPoster)),N("div",null,N("div",{className:dr.a.pictureInPictureOverlay},N("div",{className:t.join(" "),style:e,onMouseOver:function(e){return e.stopPropagation()}},N("div",{className:dr.a.darkLayer})),N("div",{className:dr.a.pictureInPictureControl},N(En,null,N("span",{className:dr.a.pictureInPictureText},N(bn,{id:"pictureInPicture.overlay_text"}))))))}},r}(j))||nh)||nh)||nh);ih.displayName="PictureInPictureOverlay";var ah,oh=Qt((function(e){return{isAudio:e.engine.isAudio,playerSize:e.shell.playerSize}}))(jr(Sr((function(e){var t,n,r,i=function(e){return l.parseFromString(e,"text/html").body.textContent||""},a=_e(null),o=_e(null),s=ye(null),l=s[0],u=s[1],c=ye(!1),d=c[0],p=c[1],h=ye(!1),f=h[0],g=h[1],y=ye(!1),v=y[0],m=y[1],b=ye(!1),_=b[0],E=b[1];if(be((function(){var e,t,n,r;(null==a?void 0:a.current)&&(null==o?void 0:o.current)&&(g(!0),m((null==a||null==(e=a.current)?void 0:e.getBoundingClientRect().height)>(null==o||null==(t=o.current)?void 0:t.getBoundingClientRect().height))),_||E((null==a||null==(n=a.current)?void 0:n.getBoundingClientRect().height)>(null==o||null==(r=o.current)?void 0:r.getBoundingClientRect().height))})),be((function(){e.eventManager.listen(e.player,e.player.Event.CHANGE_SOURCE_STARTED,(function(){p(!1)})),e.eventManager.listen(e.player,e.player.Event.CHANGE_SOURCE_ENDED,(function(){p(!0)})),u(new DOMParser)}),[]),d&&e.isAudio&&((null==(t=e.player.sources)||null==(n=t.metadata)?void 0:n.name)||(null==(r=e.player.sources)?void 0:r.metadata.description))){var k=e.player.sources.metadata,T=k.name,A=void 0===T?"":T,w=k.description,S=void 0===w?"":w;A=i(A),S=i(S);var C=function(e){switch(e){case Ei.EXTRA_LARGE:case Ei.LARGE:return dr.a.audioEntryL;case Ei.MEDIUM:return dr.a.audioEntryM;default:return dr.a.audioEntryT}}(e.playerSize),x=dr.a.audioEntryTitle+" "+(v?dr.a.audioEntryTitleTrimmed:""),I=v?"":dr.a.audioEntryExpanded;return N("div",{className:dr.a.audioEntryBackdrop+" "+I},N("div",{className:dr.a.audioEntryDetails+" "+C},N(xp,{isVertical:!0},N("div",{className:dr.a.audioEntryContent},N("div",{ref:a,className:x},A),f?void 0:N("div",{ref:o,className:dr.a.audioEntryTitle+" "+dr.a.audioEntryTitleTrimmed},A),N("div",{className:dr.a.audioEntryDescription},N(Ap,{text:S,lines:3,onClick:function(){m(!v)},forceShowMore:_},S))))))}}))));oh.displayName="AudioEntryDetails";var sh,lh=Ui({allowSidePanels:!0,allowPlayerArea:!0})(ah=Bs("Playback")(ah=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:dr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:dr.a.playerGui,id:"player-gui"},N(Po,null),N(Up,null),N(so,null,N(B,null,N(oh,null),N(jc,null),N(ro,null),N(hc,null),N(ih,null),N(Md,{name:"OverlayPlaybackControls",className:dr.a.centerPlaybackControls}),N(Pd,null),N(Ko,null),N(ud,null)),(function(e){var t=e.containerRef;return N(B,null,N(Oc,null),N(Fp,null,N(zc,null),N(rh,null)),N(ou,{leftControls:[Md,ps,bs,Pc],rightControls:[Pl,Sl,Rl,ml,Xs,Od,rl,Xc]},N($p,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))},r}(j))||ah)||ah;function uh(e){return N(lh,e)}lh.displayName="Playback";var ch=Qt((function(e){return{isBumper:e.engine.adIsBumper}}))(sh=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(jl,null)},r}(j))||sh;ch.displayName="AdLeftControls";var dh,ph=Qt((function(e){return{state:{shell:e.shell,engine:{adIsLinear:e.engine.adIsLinear,adContentType:e.engine.adContentType}}}}))(Bs("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:dr.a.adGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:dr.a.playerGui,id:"player-gui"},N(so,null,N(B,null,N(ro,null),N(jc,{hasTopBar:!0})),N(B,null,N(Oc,{disabled:!0,leftControls:N(ch,null)}))))));var n=!1,r=!1,i=N(ou,{leftControls:[Md,Cc],rightControls:[Sl,rl]}),a=N(ou,{rightControls:[rl]});return N("div",{className:dr.a.adGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:dr.a.playerGui,id:"player-gui"},N(so,null,N(B,null,N(ro,null),N(jc,{hasTopBar:!0}),r?N(Bl,null):void 0,N(Md,{name:"OverlayPlaybackControls",className:dr.a.centerPlaybackControls})),N(B,null,N(Oc,{disabled:!0,leftControls:N(ch,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 hh(e){return N(ph,e)}function fh(){return N("div",{className:dr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N(so,null,N(B,null,N(ac,null)))))}function gh(e){return N(fh,e)}ph.displayName="Ads",fh.displayName="Error";var yh,vh=Ui({allowSidePanels:!0,allowPlayerArea:!0})(dh=Bs("Live")(dh=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:dr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:dr.a.playerGui,id:"player-gui"},N(Po,null),N(Up,null),N(so,null,N(B,null,N(ro,null),N(hc,null),N(ih,null),N(Md,{name:"OverlayPlaybackControls",className:dr.a.centerPlaybackControls}),N(Ko,null),N(ud,null)),(function(e){var t=e.containerRef;return N(B,null,N(Oc,null),N(Fp,null,N(zc,null),N(jc,null)),N(ou,{leftControls:[Md,ps,bs,lc],rightControls:[Pl,Sl,Rl,ml,Xs,Od,rl,Xc]},N(mc,{showFramePreview:!0,showTimeBubble:!0,playerContainer:t})))})))))},r}(j))||dh)||dh;function mh(e){return N(vh,e)}vh.displayName="Live";var bh,_h=Ui({allowSidePanels:!0,allowPlayerArea:!0})(yh=Bs("Img")(yh=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:dr.a.playbackGuiWrapper},N(qn,{name:"PresetArea"},N("div",{className:dr.a.playerGui,id:"player-gui"},N(Up,null),N(so,null,N(B,null,N(jc,null),N(ro,null),N(hc,null),N(Md,{name:"OverlayPlaybackControls",className:dr.a.centerPlaybackControls}),N(ud,null)),(function(){return N(B,null,N(Oc,null),N(Fp,null,N(zc,null)),N(ou,{rightControls:[Pl,Xs,rl,Xc],leftControls:[]}))})))))},r}(j))||yh)||yh;function Eh(e){return N(_h,e)}_h.displayName="Img";var kh=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){bh||(bh=Dn("UILoggerMiddleware")),e.debugActions&&bh.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"CaptionsMenu":!function(e,t,n){t.payload.type===n.Track.TEXT&&n.dispatchEvent(new Vr(t.payload.track))}(0,t,n);break;case"AudioMenu":!function(e,t,n){t.payload.type===n.Track.AUDIO&&n.dispatchEvent(new Hr(t.payload.track))}(0,t,n);break;case"QualityMenu":!function(e,t,n){t.payload.type===n.Track.VIDEO&&n.dispatchEvent(new Kr(t.payload.track))}(0,t,n);break;case"SpeedMenu":!function(e,t,n){"speed"===t.payload.type&&n.dispatchEvent(new Wr(t.payload.speed))}(0,t,n);break;case"AdvancedAudioDescToggle":!function(e,t,n){"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 Gr(t.payload.textStyle));break;case"Fullscreen":Xl(0,0,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 Qr(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 $n.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 $n.UPDATE_GUI_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.guiClientRect;n.dispatchEvent(new Gl(r))}(t,0,e);break;case $n.UPDATE_PLAYER_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.playerClientRect;n.dispatchEvent(new Vl(r))}(t,0,e);break;case $n.UPDATE_VIDEO_CLIENT_RECT:!function(e,t,n){var r=e.getState().shell.videoClientRect;n.dispatchEvent(new Kl(r))}(t,0,e)}}}}}(e))};function Th(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))}function Ah(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 wh={colors:{live:"--playkit-live-color",playerBackground:"--playkit-player-background-color",paper:"--playkit-paper-color",tone1:"--playkit-tone-1-color"}},Sh=["primary","secondary","success","danger","warning"],Ch=["--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"],xh=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.makeTextContrastColor=function(e){var t=Th(e),n=t[0],r=t[1],i=t[2];return(n<30||n>205)&&(i=i<70?100:0),n>30&&n<205&&(i=i<40?100:0),function(e,t,n){t/=100,n/=100;var r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),a=n-r/2,o=0,s=0,l=0;return 0<=e&&e<60?(o=r,s=i,l=0):60<=e&&e<120?(o=i,s=r,l=0):120<=e&&e<180?(o=0,s=r,l=i):180<=e&&e<240?(o=0,s=i,l=r):240<=e&&e<300?(o=i,s=0,l=r):300<=e&&e<360&&(o=r,s=0,l=i),o=Math.round(255*(o+a)).toString(16),s=Math.round(255*(s+a)).toString(16),l=Math.round(255*(l+a)).toString(16),1==o.length&&(o="0"+o),1==s.length&&(s="0"+s),1==l.length&&(l="0"+l),"#"+o+s+l}(n,r,i)},t.setColors=function(e){for(var t in e.colors.primary&&this.setSvgFillColor(e.colors.primary),e.colors)if(Sh.includes(t)){var n=e.colors[t];this.setAccentOrAcknowledgementColor(t+"-text-contrast",this.makeTextContrastColor(n)),this.setAccentOrAcknowledgementColor(t,n)}else this.setColor(wh.colors[t],e.colors[t])},t.setAccentOrAcknowledgementColor=function(e,t){var n=Th(t),r=n[0],i=n[1],a=n[2];this.setCSSVariable("--playkit-{name}-color".replace("{name}",e),t),this.setCSSVariable("--playkit-{name}-hsl-hue".replace("{name}",e),Math.round(r)+"deg"),this.setCSSVariable("--playkit-{name}-hsl-saturation".replace("{name}",e),Math.round(i)+"%"),this.setCSSVariable("--playkit-{name}-hsl-lightness".replace("{name}",e),Math.round(a)+"%")},t.setColor=function(e,t){this.setCSSVariable(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 Ah(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)?Ah(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)}(Ch);!(t=n()).done;){var r=t.value,i=this.getCSSVariable(r),a=e.replace("#","%23");this.setCSSVariable(r,i.replace(/fill='%23([a-f0-9]{3}){1,2}\b'/,"fill='"+a+"'"))}},t.getCSSVariable=function(e){var t;return getComputedStyle(null==(t=this.playerContainerElement)?void 0:t.querySelector("."+dr.a.player)).getPropertyValue(e)||""},t.setCSSVariable=function(e,t){var n;(null==(n=this.playerContainerElement)?void 0:n.querySelector("."+dr.a.player)).style.setProperty(e,t)},e}();function Ih(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 Ph(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Dh=function(){function e(e,t){var n,r;Ph(this,"_translations",{en:xa.en}),Ph(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 xh(e,t.userTheme,t.targetId),r=this.player.env,On.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 uo(e)},condition:function(e){return e.engine.isIdle}},{template:function(e){return gh(e)},condition:function(e){return e.engine.hasError}},{template:function(e){return hh(e)},condition:function(e){return e.engine.adBreak}},{template:function(e){return mh(e)},condition:function(e){return e.engine.isLive}},{template:function(e){return Eh(e)},condition:function(e){return e.engine.isImg}},{template:function(e){return uh(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 uh(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(Ca,t(kh(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(Mi,{uiComponents:this._uiComponents,setApi:function(e){e&&(t.addComponent=e)}},N(dn,{definition:this._translations[this._locale]},N(Ar,{player:this.player},N(Zr,{player:this.player,store:this.store},N(Ds,{playerContainer:this.container},N(Ti,null,N(La,null),N(Na,null),N(eo,{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)},r.getCSSVariable=function(e){return this._themesManager.getCSSVariable(e)},r.setCSSVariable=function(e,t){this._themesManager.setCSSVariable(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 Ln}}])&&Ih(t.prototype,n),e}(),Rh=Ln,Lh="0.77.12",Oh="@playkit-js/playkit-js-ui"}])},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,downloadUrl:this.downloadUrl}},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 Ae})),n.d(t,"ProviderParser",(function(){return K})),n.d(t,"NAME",(function(){return we})),n.d(t,"VERSION",(function(){return Se})),n.d(t,"RequestBuilder",(function(){return z.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 se})),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 f})),n.d(r,"KalturaPlaylist",(function(){return oe})),n.d(r,"KalturaRuleAction",(function(){return g})),n.d(r,"KalturaUIConfResponse",(function(){return me})),n.d(r,"KalturaDrmPlaybackPluginData",(function(){return h.a})),n.d(r,"KalturaAccessControlMessage",(function(){return p.a})),n.d(r,"BaseServiceResult",(function(){return d.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}(),d=n(4),p=n(7),h=n(6),f=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 h.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 f(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 p.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 f(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}(d.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}(d.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,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt,this.creatorId=e.creatorId,this.endDate=e.endDate,this.plays=e.plays,this.views=e.views,this.downloadUrl=e.downloadUrl};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(e){this.playlistLastEntryId=e.playlistLastEntryId,this.entryId=e.entryId,this.id=e.id,this.userId=e.userId,this.partnerId=e.partnerId,this.status=e.status,this.createdAt=e.createdAt,this.updatedAt=e.updatedAt},x=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,d=e.flavorIds;if(!n||isNaN(Number.parseInt(r))||!i||!s||!l)return"";var p=n;return n.endsWith("/")||(p+="/"),p+="p/"+r+"/sp/"+r+"00/playManifest/entryId/"+i+"/protocol/"+l+"/format/"+s,d?p+="/flavorIds/"+d:o&&(p+="/uiConfId/"+o),""!==a&&(p+="/ks/"+a),""!==u&&(p+="/a."+u),o&&""!==d&&(p+="?uiConfId="+o),p},e}(),I=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}(),P=n(1),D=n(12),R=n(9),L=n(8),O=n(5),M=function(){this.items=[]},N=n(16),U=n(17),F={SRT:"1",DFXP:"2",WEBVTT:"3",CAP:"4"},B={3:"vtt",1:"srt"},j=function(){function e(){}return e.createConfig=function(e,t){return e.map((function(e){var n=e.url,r=B[e.format];return[F.DFXP,F.CAP].includes(e.format)&&(n=e.webVttUrl,r=B[F.WEBVTT]),n=G(n,t),{default:!!e.isDefault,type:r,language:e.languageCode,label:e.label,url:n}}))},e}(),H=n(13),V=function(){function e(){}return e.getMediaEntry=function(t,n,r,i){var a=new P.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!==P.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 M,r=t.playlistData,i=t.playlistItems.entries,a=t.playlistUserEntries.entries;return n.id=r.id,n.name=r.name,n.description=r.description,n.poster=r.poster,n.playlistLastEntryId=a.map((function(e){return e.playlistLastEntryId}))[0],i.forEach((function(t){var r=new P.a;e._fillBaseData(r,t),n.items.push(r)})),n},e.getEntryList=function(t){var n=new N.a;return t.playlistItems.entries.forEach((function(t){var r=new P.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 U.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.downloadUrl=n.downloadUrl||"",t.metadata=e._parseMetadata(r),t.metadata.description=n.description||"",t.metadata.entryId=n.id||"",t.metadata.name=n.name||"",n.createdAt&&(t.metadata.createdAt=n.createdAt),n.updatedAt&&(t.metadata.updatedAt=n.updatedAt),n.creatorId&&(t.metadata.creatorId=n.creatorId),n.endDate&&(t.metadata.endDate=n.endDate),n.views&&(t.metadata.views=n.views),n.plays&&(t.metadata.plays=n.plays),t.metadata.tags=n.tags||"",t.status=n.status,t.type=e._getEntryType(n.entryType,n.type),t.type===P.a.Type.LIVE&&(t.dvrStatus=n.dvrStatus),t},e._getEntryType=function(e,t){var n=P.a.Type.UNKNOWN;switch(e){case S.MediaType.IMAGE.value:n=P.a.Type.IMAGE;break;case S.MediaType.AUDIO.value:n=P.a.Type.AUDIO;break;default:switch(t){case S.EntryType.MEDIA_CLIP.value:n=P.a.Type.VOD;break;case S.EntryType.LIVE_STREAM.value:case S.EntryType.LIVE_CHANNEL.value:n=P.a.Type.LIVE;break;default:n=P.a.Type.UNKNOWN}}return n},e._getParsedSources=function(t,n,r,i,a,o){var s,l,u=new L.a;return a.type===S.EntryType.EXTERNAL_MEDIA.value?((l=new R.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 H.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 R.a;if(t){var l="",u=O.b.get(t.format),c=t.getProtocol(e._getBaseProtocol()),d=t.deliveryProfileId,p=t.format,f="";if(u&&(f=u.pathExt,s.mimetype=u.mimeType),t.hasFlavorIds()?(!f&&n.flavorAssets&&n.flavorAssets.length>0&&(f=n.flavorAssets[0].fileExt),l=x.build({entryId:o,flavorIds:t.flavorIds,format:p,ks:r,partnerId:i,uiConfId:a,extension:f,protocol:c})):l=e.addKsToUrl(t.url,r),!l){var g="failed to create play url from source, discarding source: ("+o+"_"+d+"), "+p;return e._logger.warn(g),null}if(s.url=l,s.id=o+"_"+d+","+p,t.hasDrmData()){var y=[];t.drm.forEach((function(e){y.push(new D.a(e.licenseURL,h.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,d=t.deliveryProfileId,p=d+","+c;n.flavorAssets.map((function(t){var n=new R.a;n.id=t.id+p,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 h=x.build({entryId:o,flavorIds:t.id,format:c,ks:r,partnerId:i,uiConfId:a,extension:t.fileExt,protocol:u});if(""===h)return e._logger.warn("failed to create play url from source, discarding source: ("+o+"_"+d+"), "+c+"."),null;n.url=h,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=I.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 G=V.addKsToUrl,K=V,z=n(3),W=n(11),Y=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 W.a(a);return o.method="POST",o.service="multirequest",o.url=o.getUrl(r.serviceUrl),o.params=i,o},e}(),q=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,createdAt,updatedAt,endDate,plays,views,downloadUrl,creatorId"};!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(q,"Type",{INCLUDE_FIELDS:1,EXCLUDE_FIELDS:2});var 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.getPlaybackContext=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new z.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 z.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 q}},r}(Y),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.list=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new z.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}(Y),$=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}(d.a);function J(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&&J(e.prototype,t),n&&J(e,n),e}var ee=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(X.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(X.getPlaybackContext(t.serviceUrl,e.ks,r)),n.push(Q.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}(),te=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 z.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}(Y);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,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}}])&&ne(e.prototype,t),n&&ne(e,n);var i=r.prototype;return i.buildRequests=function(e){var t=c.get(),n=[];return n.push(te.anonymousSession(t.serviceUrl,e.widgetId)),n},i.isValid=function(){return!!this._widgetId},r}(),ie=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=Y.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),ae=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 z.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 q},i},r.get=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new z.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.getLastEntryId=function(e,t,n){var r=new Map;r.set("Content-Type","application/json");var i=new z.a(r);return i.service="userEntry",i.action="list",i.method="POST",i.url=i.getUrl(e),i.tag="userEntry-list",i.params={ks:t,filter:{objectType:"KalturaViewHistoryUserEntry",entryIdEqual:n,userIdEqualCurrent:1},responseProfile:{fields:"playlistLastEntryId",type:1}},i},r}(Y),oe=function(e){this.id=e.id,this.name=e.name,this.description=e.description,this.poster=e.thumbnailUrl},se=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}(d.a),le=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).hasError||(n.totalCount=t.totalCount,n.entries=[],n.totalCount>0&&t.objects.map((function(e){return n.entries.push(new C(e))}))),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r}(d.a);function ue(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 ce(e,t,n){return t&&ue(e.prototype,t),n&&ue(e,n),e}var de=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}ce(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(ae.get(t.serviceUrl,e.ks,e.playlistId)),n.push(ae.execute(t.serviceUrl,e.ks,e.playlistId)),n.push(ae.getLastEntryId(t.serviceUrl,e.ks,e.playlistId)),n},t.isValid=function(){return!!this._playlistId},ce(e,[{key:"requests",set:function(e){this._requests=e},get:function(){return this._requests}},{key:"response",set:function(e){this._response.playlistData=new oe(e[0].data),this._response.playlistItems=new se(e[1].data),this._response.playlistUserEntries=new le(e[2].data)},get:function(){return this._response}}]),e}(),pe=n(14);function he(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 fe(e,t,n){return t&&he(e.prototype,t),n&&he(e,n),e}var ge=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}fe(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(X.list(t.serviceUrl,e.ks,r.entryId||r,e.redirectFromEntryId,r.referenceId))})),n},t.isValid=function(){return!(!this._entries||!this._entries.length)},fe(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}(),ye=n(0);function ve(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var me=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}(d.a);function be(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 _e(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){be(a,r,i,o,s,"next",e)}function s(e){be(a,r,i,o,s,"throw",e)}o(void 0)}))}}ve(me,"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}),ve(me,"CreationMode",{WIZARD:2,ADVANCED:3});var Ee=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=_e(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=_e(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(ee.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}(Ee,"_logger",Object(s.b)("RegexActionHandler"));var ke=Ee;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 Ae=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 ie(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(re,{widgetId:t.widgetId}));var s=t._getEntryRedirectFilter(e);return t._dataLoader.add(ee,{entryId:i,ks:o,redirectFromEntryId:s,referenceId:a}),t._dataLoader.fetchData().then((function(e){try{var i=t._parseDataFromResponse(e);ke.handleRegexAction(i,e).then(n)}catch(e){r(e)}}),(function(e){r(e)}))}r(new ye.a(ye.a.Severity.CRITICAL,ye.a.Category.PROVIDER,ye.a.Code.MISSING_MANDATORY_PARAMS,{message:"missing entry id"}))}))},o.doRequest=function(e,t){var n=this,r=t||this.ks,i=new ie(this.playerVersion,this.partnerId,r,this._networkRetryConfig);return new Promise((function(t,a){return r||i.add(re,{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(re.id)){var n=e.get(re.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(ee.id)){var r=e.get(ee.id);if(r&&r.response){var i=r.response;if(K.hasBlockAction(i))throw new ye.a(ye.a.Severity.CRITICAL,ye.a.Category.SERVICE,ye.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 ye.a(ye.a.Severity.CRITICAL,ye.a.Category.SERVICE,ye.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 ie(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(re,{widgetId:t.widgetId})),t._dataLoader.add(de,{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(de.id)){var r=e.get(de.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,n.playlistLastEntryId=i.playlistLastEntryId,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 ie(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(re,{widgetId:t.widgetId}));var o=t._getEntryRedirectFilter(e);t._dataLoader.add(ge,{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(ge.id)){var r=e.get(ge.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:"",playlistLastEntryId:"",items:[]}},o._getDefaultSourcesObject=function(){return{hls:[],dash:[],progressive:[],image:[],id:"",duration:0,type:P.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,t.downloadUrl=e.downloadUrl,e.sources.captions&&(t.captions=e.sources.captions),e.metadata&&"string"==typeof e.metadata.tags&&e.metadata.tags.split(", ").includes("360")&&(t.vr={}),Object.assign(t.metadata,e.metadata),t},i=r,(a=[{key:"env",get:function(){return c.get()}}])&&Te(i.prototype,a),r}(pe.a),we="@playkit-js/playkit-js-providers-ovp",Se="2.40.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 p?t:p,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 d={};function p(){}function h(){}function f(){}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=f.prototype=p.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,d=u.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,o,s)}),(function(e){r("throw",e,o,s)})):t.resolve(d).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{value:void 0,done:!0}}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=k(o,n);if(s){if(s===d)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===d)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")),d;var i=c(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;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,d):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}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||""===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}}throw new TypeError(typeof e+" is not iterable")}return h.prototype=f,r(m,"constructor",{value:f,configurable:!0}),r(f,"constructor",{value:h,configurable:!0}),h.displayName=l(f,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,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,d):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),d},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),d}},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),d}},e}(e.exports);try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r,i;window,e.exports=(r=n(0),i=n(5),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,"enableWorker":false},"network":{}}')},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return g})),n.d(t,"NAME",(function(){return y}));var r=n(0),i=n(1),a=n.n(i),o=n(2);const s={[a.a.ErrorDetails.MANIFEST_LOAD_ERROR]:{category:r.Error.Category.MANIFEST,code:r.Error.Code.HTTP_ERROR},[a.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT]:{category:r.Error.Category.MANIFEST,code:r.Error.Code.TIMEOUT},[a.a.ErrorDetails.MANIFEST_PARSING_ERROR]:{category:r.Error.Category.MANIFEST,code:r.Error.Code.HLSJS_CANNOT_PARSE},[a.a.ErrorDetails.LEVEL_LOAD_ERROR]:{category:r.Error.Category.NETWORK,code:r.Error.Code.HTTP_ERROR},[a.a.ErrorDetails.LEVEL_LOAD_TIMEOUT]:{category:r.Error.Category.NETWORK,code:r.Error.Code.TIMEOUT},[a.a.ErrorDetails.LEVEL_SWITCH_ERROR]:{category:r.Error.Category.PLAYER,code:r.Error.Code.BITRATE_SWITCH_ISSUE},[a.a.ErrorDetails.FRAG_LOAD_ERROR]:{category:r.Error.Category.NETWORK,code:r.Error.Code.HTTP_ERROR},[a.a.ErrorDetails.FRAG_LOOP_LOADING_ERROR]:{category:r.Error.Category.NETWORK,code:r.Error.Code.HTTP_ERROR},[a.a.ErrorDetails.FRAG_LOAD_TIMEOUT]:{category:r.Error.Category.NETWORK,code:r.Error.Code.TIMEOUT},[a.a.ErrorDetails.FRAG_PARSING_ERROR]:{category:r.Error.Category.MEDIA,code:r.Error.Code.HLS_FRAG_PARSING_ERROR},[a.a.ErrorDetails.BUFFER_APPEND_ERROR]:{category:r.Error.Category.MEDIA,code:r.Error.Code.HLS_BUFFER_APPEND_ISSUE},[a.a.ErrorDetails.BUFFER_APPENDING_ERROR]:{category:r.Error.Category.MEDIA,code:r.Error.Code.HLS_BUFFER_APPENDING_ISSUE},[a.a.ErrorDetails.BUFFER_STALLED_ERROR]:{category:r.Error.Category.MEDIA,code:r.Error.Code.HLS_BUFFER_STALLED_ERROR}};class l extends a.a.DefaultConfig.loader{constructor(e){super(e),e&&e.readystatechange&&(this.readystatechange=e.readystatechange)}loadInternal(){let e,t=this.context;e=this.loader=new XMLHttpRequest;let n=this.stats;n.tfirst=0,n.loaded=0;const r=this.xhrSetup;let i;try{if(r)try{i=r(e,t.url,t)}catch(n){e.open("GET",t.url,!0),i=r(e,t.url,t)}e.readyState||e.open("GET",t.url,!0)}catch(e){i=Promise.reject(e)}i=i||Promise.resolve(),i.then(()=>{t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),e.send()}).catch(n=>{this.callbacks.onError({code:e.status,text:n.message},t,e)})}}class u extends l{constructor(e){super(e);const t=this.load.bind(this),n=u.redirectExternalStreamsHandler;this.load=(e,i,a)=>{const o=e.url;"manifest"===e.type?r.Utils.Http.jsonp(o,n,{timeout:u.redirectExternalStreamsTimeout}).then(n=>{e.url=n,t(e,i,a)}).catch(()=>t(e,i,a)):t(e,i,a)}}}var c,d,p;function h(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);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(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}c=u,p=(e,t)=>t,(d=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);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(d="redirectExternalStreamsHandler"))in c?Object.defineProperty(c,d,{value:p,enumerable:!0,configurable:!0,writable:!0}):c[d]=p;class f extends r.BaseMediaSourceAdapter{static createAdapter(e,t,n){let i=r.Utils.Object.copyDeep(o);if(r.Utils.Object.hasPropertyPath(n,"sources.options")){const e=n.sources.options;i.forceRedirectExternalStreams=e.forceRedirectExternalStreams,i.redirectExternalStreamsHandler=e.redirectExternalStreamsHandler,i.redirectExternalStreamsTimeout=e.redirectExternalStreamsTimeout,u.redirectExternalStreamsHandler=i.redirectExternalStreamsHandler,u.redirectExternalStreamsTimeout=i.redirectExternalStreamsTimeout}if(r.Utils.Object.hasPropertyPath(n,"sources.startTime")&&r.Utils.Object.getPropertyPath(n,"sources.startTime")>-1&&(i.hlsConfig.startPosition=n.sources.startTime),r.Utils.Object.hasPropertyPath(n,"text.useNativeTextTrack")&&(i.subtitleDisplay=r.Utils.Object.getPropertyPath(n,"text.useNativeTextTrack")),r.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedFramesInterval")&&(i.hlsConfig.fpsDroppedFramesInterval=n.abr.fpsDroppedFramesInterval),r.Utils.Object.hasPropertyPath(n,"abr.fpsDroppedMonitoringThreshold")&&(i.hlsConfig.fpsDroppedMonitoringThreshold=n.abr.fpsDroppedMonitoringThreshold),r.Utils.Object.hasPropertyPath(n,"abr.capLevelOnFPSDrop")&&(f._logger.debug("capLevelOnFPSDrop = ",n.abr.capLevelOnFPSDrop),i.hlsConfig.capLevelOnFPSDrop=n.abr.capLevelOnFPSDrop),r.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),r.Utils.Object.hasPropertyPath(n,"abr")){const e=n.abr;"boolean"==typeof e.enabled&&(i.abr.enabled=e.enabled),"boolean"==typeof e.capLevelToPlayerSize&&(i.hlsConfig.capLevelToPlayerSize=e.capLevelToPlayerSize),e.defaultBandwidthEstimate&&(i.hlsConfig.abrEwmaDefaultEstimate=e.defaultBandwidthEstimate),e.restrictions&&r.Utils.Object.createPropertyPath(i,"abr.restrictions",e.restrictions)}return r.Utils.Object.hasPropertyPath(n,"streaming.lowLatencyMode")&&(i.hlsConfig.lowLatencyMode=r.Utils.Object.getPropertyPath(n,"streaming.lowLatencyMode")),r.Utils.Object.hasPropertyPath(n,"playback.options.html5.hls")&&r.Utils.Object.mergeDeep(i.hlsConfig,n.playback.options.html5.hls),i.network=n.network,new this(e,t,i)}static canPlayType(e){let t="string"==typeof e&&f._hlsMimeTypes.includes(e.toLowerCase())&&f.isMSESupported();return f._logger.debug("canPlayType result for mimeType:"+e+" is "+t.toString()),t}static canPlayDrm(){return f._logger.warn("canPlayDrm result is false"),!1}static isSupported(){let e=a.a.isSupported();return f._logger.debug("isSupported:"+e),e}constructor(e,t,n){f._logger.debug("Creating adapter. Hls version: "+a.a.version),super(e,t,n),h(this,"_hlsjsLib",a.a),h(this,"_triedReloadWithRedirect",!1),h(this,"_playerTracks",[]),h(this,"_startTime",0),h(this,"_requestFilterError",!1),h(this,"_responseFilterError",!1),h(this,"_nativeTextTracksMap",{}),h(this,"_lastLoadedFragSN",-1),h(this,"_sameFragSNLoadedCount",0),h(this,"_adapterEventsBindings",{[a.a.Events.ERROR]:(e,t)=>this._onError(t),[a.a.Events.MANIFEST_LOADED]:(e,t)=>this._onManifestLoaded(t),[a.a.Events.LEVEL_SWITCHED]:(e,t)=>this._onLevelSwitched(e,t),[a.a.Events.AUDIO_TRACK_SWITCHED]:(e,t)=>this._onAudioTrackSwitched(e,t),[a.a.Events.FPS_DROP]:(e,t)=>this._onFpsDrop(t),[a.a.Events.FRAG_PARSING_METADATA]:(e,t)=>this._onFragParsingMetadata(t),[a.a.Events.FRAG_LOADED]:(e,t)=>this._onFragLoaded(t),[a.a.Events.MEDIA_ATTACHED]:()=>this._onMediaAttached(),[a.a.Events.LEVEL_LOADED]:(e,t)=>this._onLevelLoaded(e,t)}),h(this,"_onLevelLoaded",(e,t)=>{if(this.isLive()){const{details:{endSN:e}}=t;if(this._lastLoadedFragSN===e){if(this._sameFragSNLoadedCount++,f._logger.debug(`Same frag SN. Count is: ${this._sameFragSNLoadedCount}, Max is: ${this._config.network.maxStaleLevelReloads}`),this._sameFragSNLoadedCount>=this._config.network.maxStaleLevelReloads){f._logger.error("Same frag loading reached max count");const t=new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.NETWORK,r.Error.Code.LIVE_MANIFEST_REFRESH_ERROR,{fragSN:e});return this._trigger(r.EventType.ERROR,t),this.destroy()}f._logger.debug("Last frag SN is: "+e)}else this._sameFragSNLoadedCount=0;this._lastLoadedFragSN=e}}),this._config=r.Utils.Object.mergeDeep({},o,this._config),this._init()}_init(){this._config.forceRedirectExternalStreams&&(this._config.hlsConfig.pLoader=u),this._maybeSetFilters(),this._hls=new a.a(this._config.hlsConfig),this._capabilities.fpsControl=!0,this._hls.subtitleDisplay=this._config.subtitleDisplay,this._addBindings()}_maybeSetFilters(){if("function"==typeof r.Utils.Object.getPropertyPath(this._config,"network.requestFilter")&&(f._logger.debug("Register request filter"),r.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:l,xhrSetup:(e,t,n)=>{let i;const a={url:t,body:null,headers:{}};try{"manifest"===n.type&&(i=this._config.network.requestFilter(r.RequestType.MANIFEST,a)),n.frag&&"subtitle"!==n.frag.type&&(i=this._config.network.requestFilter(r.RequestType.SEGMENT,a))}catch(e){i=Promise.reject(e)}return i=i||Promise.resolve(a),i.then(t=>{n.url=t.url,e.open("GET",t.url,!0),Object.entries(t.headers).forEach(t=>{e.setRequestHeader(...t)}),"boolean"==typeof t.withCredentials&&(e.withCredentials=t.withCredentials)}).catch(e=>{throw this._requestFilterError=!0,e})}})),"function"==typeof r.Utils.Object.getPropertyPath(this._config,"network.responseFilter")){const e=this;f._logger.debug("Register response filter"),r.Utils.Object.mergeDeep(this._config.hlsConfig,{loader:l,readystatechange:function(t){let n=t.currentTarget,i=n.readyState,a=this.stats,o=this.context,s=this.config;if(!a.aborted&&i>=2){window.clearTimeout(this.requestTimeout);const{loading:t}=a;if(0===t.first&&(t.first=Math.max(performance.now(),t.start)),4===i){let i=n.status;if(i>=200&&i<300){let s,l;t.end=Math.max(a.tfirst,performance.now()),"arraybuffer"===o.responseType?(s=n.response,l=s.byteLength):(s=n.responseText,l=s.length),a.loaded=a.total=l;const u={url:n.responseURL,originalUrl:o.url,data:s,headers:r.Utils.Http.convertHeadersToDictionary(n.getAllResponseHeaders())};let c;try{"manifest"===o.type&&(c=e._config.network.responseFilter(r.RequestType.MANIFEST,u)),o.frag&&"subtitle"!==o.frag.type&&(c=e._config.network.responseFilter(r.RequestType.SEGMENT,u))}catch(e){c=Promise.reject(e)}return c=c||Promise.resolve(u),c.then(e=>{this.callbacks.onSuccess(e,a,o,n)}).catch(t=>{e._responseFilterError=!0,this.callbacks.onError({code:i,text:t.message},o,n)})}a.retry>=s.maxRetry||i>=400&&i<499?(f._logger.error(`${i} while loading ${o.url}`),this.callbacks.onError({code:i,text:n.statusText},o,n)):(f._logger.warn(`${i} while loading ${o.url}, retrying in ${this.retryDelay}...`),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),a.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.timeout)}}})}}_addBindings(){this._mediaAttachedPromise=new Promise(e=>this._onMediaAttached=e);for(const[e,t]of Object.entries(this._adapterEventsBindings))this._hls.on(e,t);this._onRecoveredCallback=()=>this._onRecovered(),this._onAddTrack=this._onAddTrack.bind(this),this._eventManager.listen(this._videoElement,"addtrack",this._onAddTrack),this._videoElement.textTracks.onaddtrack=this._onAddTrack}_onFpsDrop(e){this._trigger(r.EventType.FPS_DROP,e)}_onFragParsingMetadata(e){var t;this._trigger("hlsFragParsingMetadata",e);const n=Array.from(null==(t=this._videoElement)?void 0:t.textTracks).find(e=>"id3"===e.label),i=Array.from((null==n?void 0:n.cues)||[]),a=[];null==e||e.samples.forEach(e=>{const t=r.Utils.binarySearch(i,t=>t.startTime-e.pts);if(t){const e=Object(r.createTimedMetadata)(t);a.push(e)}}),a.length&&this._trigger(r.EventType.TIMED_METADATA_ADDED,{cues:a})}_onAddTrack(e){if(!this._hls.subtitleTracks.length){const t=this._parseCEATextTrack(e.track);t&&(f._logger.debug("A CEA 608/708 caption has been found",t),this._playerTracks.push(t),this._trigger(r.EventType.TRACKS_CHANGED,{tracks:this._playerTracks}))}}attachMediaSource(){this._hls||(this._videoElement&&this._videoElement.src&&(r.Utils.Dom.setAttribute(this._videoElement,"src",""),r.Utils.Dom.removeAttribute(this._videoElement,"src")),this._init())}detachMediaSource(){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 r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.HLS_FATAL_MEDIA_ERROR,"media detached while loading")),this._loadPromiseHandlers=null,this._loadPromise=null,this._hls=null)}handleMediaError(e){return e.code===e.MEDIA_ERR_DECODE&&(f._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(a.a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR))}load(e){return this._loadPromise||(this._startTime=e,this._loadPromise=new Promise((e,t)=>{this._loadPromiseHandlers={resolve:e,reject:t},this._loadInternal()})),this._loadPromise}_loadInternal(){var e;this._hls&&this._sourceObj&&this._sourceObj.url?(this._hls.loadSource(this._sourceObj.url),this._hls.attachMedia(this._videoElement),this._trigger(r.EventType.ABR_MODE_CHANGED,{mode:this.isAdaptiveBitrateEnabled()?"auto":"manual"})):null==(e=this._loadPromiseHandlers)||e.reject(new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.HLS_FATAL_MEDIA_ERROR,"no url provided"))}_reloadWithDirectManifest(){this._triedReloadWithRedirect=!0,this._reset(),this._config.hlsConfig.pLoader=u,this._hls=new a.a(this._config.hlsConfig),this._addBindings(),this._loadInternal()}destroy(){return new Promise((e,t)=>{super.destroy().then(()=>{var t;f._logger.debug("destroy"),this._playerTracks=[],this._nativeTextTracksMap={},this._sameFragSNLoadedCount=0,this._lastLoadedFragSN=-1,null==(t=this._loadPromiseHandlers)||t.reject(new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.HLS_FATAL_MEDIA_ERROR,"The adapter has been destroyed while loading")),this._loadPromiseHandlers=null,this._loadPromise=null,this._reset(),e()},()=>t())})}_reset(){this._removeBindings(),this._requestFilterError=!1,this._responseFilterError=!1,this._hls.detachMedia(),this._hls.destroy()}_parseTracks(){const e=this._parseAudioTracks(this._hls.audioTracks||[]),t=this._parseVideoTracks(this._hls.levels||[]),n=this._parseTextTracks(this._hls.subtitleTracks||[]);return e.concat(t).concat(n)}_parseAudioTracks(e){let t=[];for(let n=0;n<e.length;n++){let i={id:e[n].id,active:this._hls.audioTrack===e[n].id,label:e[n].name,language:e[n].lang,index:n};t.push(new r.AudioTrack(i))}return t}_parseVideoTracks(e){let t=[];for(let n=0;n<e.length;n++){let i={active:this._hls.startLevel===n,bandwidth:e[n].bitrate,width:e[n].width,height:e[n].height,language:"",index:n};t.push(new r.VideoTrack(i))}return t}_parseTextTracks(e){let t=[];for(const n of e){let e={id:n.id,active:!1,default:n.default,label:n.name,kind:n.type.toLowerCase(),language:n.lang};t.push(new r.TextTrack(e))}return t}_parseCEATextTrack(e){let t=null;if("captions"===e.kind){const n={id:e.id,active:"showing"===e.mode,label:e.label,kind:e.kind,language:e.language};t=new r.TextTrack(n),this._nativeTextTracksMap[t.index]=e}return t}selectAudioTrack(e){e instanceof r.AudioTrack&&!e.active&&this._hls.audioTracks&&(this._hls.audioTrack=e.id)}selectVideoTrack(e){e instanceof r.VideoTrack&&(!e.active||this.isAdaptiveBitrateEnabled())&&this._hls.levels&&(this.isAdaptiveBitrateEnabled()&&this._trigger(r.EventType.ABR_MODE_CHANGED,{mode:"manual"}),this._hls.currentLevel=e.index)}selectTextTrack(e){e instanceof r.TextTrack&&!e.active&&this._hls&&(this._hls.subtitleTracks.length?(this._hls.subtitleTrack=e.id,this._notifyTrackChanged(e)):this._selectNativeTextTrack(e))}_selectNativeTextTrack(e){const t=this._nativeTextTracksMap[e.index];t&&(this.disableNativeTextTracks(),t.mode=this._config.subtitleDisplay?"showing":"hidden",this._notifyTrackChanged(e))}_notifyTrackChanged(e){this._onTrackChanged(e)}hideTextTrack(){this._hls&&(this._hls.subtitleTracks.length?this._hls.subtitleTrack=-1:this.disableNativeTextTracks())}enableAdaptiveBitrate(){this.isAdaptiveBitrateEnabled()||(this._trigger(r.EventType.ABR_MODE_CHANGED,{mode:"auto"}),this._hls.nextLevel=-1)}isAdaptiveBitrateEnabled(){return!!this._hls&&this._hls.autoLevelEnabled}applyABRRestriction(e){r.Utils.Object.createPropertyPath(this._config,"abr.restrictions",e),this._hls.capLevelToPlayerSize||this._maybeApplyAbrRestrictions(e)}_getLevelDetails(){const 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:{}}_getLiveEdge(){try{let 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,e>0?e:this._videoElement.duration}catch(e){return f._logger.debug("Live edge calculation failed, fall back to duration"),this._videoElement.duration}}seekToLiveEdge(){try{this._videoElement.currentTime=this._getLiveEdge()}catch(e){return}}getSegmentDuration(){const e=r.Utils.Object.getPropertyPath(this._hls,"streamController.fragCurrent");return e?e.duration:0}get liveDuration(){return this._getLiveEdge()+this.getSegmentDuration()}isLive(){try{return!!this._getLevelDetails().live}catch(e){return!1}}_onManifestLoaded(e){f._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(()=>{var e;null==(e=this._loadPromiseHandlers)||e.resolve({tracks:this._playerTracks}),this._loadPromiseHandlers=null});const{loading:t}=e.stats,n=t.end-t.start;this._trigger(r.EventType.MANIFEST_LOADED,{miliSeconds:n})}_maybeApplyAbrRestrictions(e){const t=this._playerTracks.filter(e=>e instanceof r.VideoTrack),n=Object(r.filterTracksByRestriction)(t,e);if(n.length){const e=n[0],t=n.pop();this._hls.config.minAutoBitrate=e.bandwidth,this._hls.autoLevelCapping=t.index;const r=n.some(e=>e.active);this.isAdaptiveBitrateEnabled()||r||this.selectVideoTrack(e)}else f._logger.warn("Invalid restrictions, there are not tracks within the restriction range")}_onLevelSwitched(e,t){let n=this._playerTracks.find(e=>e instanceof r.VideoTrack&&e.index===t.level);this._onTrackChanged(n)}_onAudioTrackSwitched(e,t){let n=this._playerTracks.find(e=>e instanceof r.AudioTrack&&e.id===t.id);this._onTrackChanged(n),this._handleWaitingUponAudioTrackSwitch()}_handleWaitingUponAudioTrackSwitch(){if(["IE","Edge"].includes(r.Env.browser.name)){const e=()=>{this._trigger(r.EventType.PLAYING)};this._eventManager.listenOnce(this._videoElement,r.EventType.TIME_UPDATE,e)}}_getErrorDataObject(e){let t={};switch(t.name=e.details,t.name){case a.a.ErrorDetails.MANIFEST_LOAD_ERROR:case a.a.ErrorDetails.LEVEL_LOAD_ERROR:case a.a.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:t.url=e.url,t.responseCode=e.response?e.response.code:null;break;case a.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT:case a.a.ErrorDetails.LEVEL_LOAD_TIMEOUT:case a.a.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:t.url=e.url;break;case a.a.ErrorDetails.MANIFEST_PARSING_ERROR:t.url=e.url,t.reason=e.reason;break;case a.a.ErrorDetails.LEVEL_SWITCH_ERROR:t.level=e.level,t.reason=e.reason;break;case a.a.ErrorDetails.FRAG_LOAD_ERROR:t.fragUrl=e.frag?e.frag.url:null,t.responseCode=e.response?e.response.code:null;break;case a.a.ErrorDetails.FRAG_LOAD_TIMEOUT:t.fragUrl=e.frag?e.frag.url:null;break;case a.a.ErrorDetails.FRAG_DECRYPT_ERROR:case a.a.ErrorDetails.FRAG_PARSING_ERROR:t.reason=e.reason;break;case a.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 a.a.ErrorDetails.KEY_LOAD_TIMEOUT:t.fragDecryptedDataUri=e.frag&&e.frag.decryptdata?e.frag.decryptdata.uri:null;break;case a.a.ErrorDetails.BUFFER_ADD_CODEC_ERROR:t.mimeType=e.mimeType,t.errorMsg=e.err?e.err.message:null;break;case a.a.ErrorDetails.BUFFER_STALLED_ERROR:t.buffer=e.buffer}return(this._requestFilterError||this._responseFilterError)&&(t.reason=e.response.text),t}_onError(e){const t=e.type,n=e.details,i=e.fatal;let o=this._getErrorDataObject(e);if(i){let e;switch(t){case a.a.ErrorTypes.NETWORK_ERROR:{let t;t=this._requestFilterError?r.Error.Code.REQUEST_FILTER_ERROR:this._responseFilterError?r.Error.Code.RESPONSE_FILTER_ERROR:r.Error.Code.HTTP_ERROR,![a.a.ErrorDetails.MANIFEST_LOAD_ERROR,a.a.ErrorDetails.MANIFEST_LOAD_TIMEOUT].includes(n)||this._triedReloadWithRedirect||this._config.forceRedirectExternalStreams||this._requestFilterError||this._responseFilterError?e=new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.NETWORK,t,o):(e=new r.Error(r.Error.Severity.RECOVERABLE,r.Error.Category.NETWORK,t,o),this._reloadWithDirectManifest())}break;case a.a.ErrorTypes.MEDIA_ERROR:e=this._handleMediaError(n)?new r.Error(r.Error.Severity.RECOVERABLE,r.Error.Category.MEDIA,r.Error.Code.HLS_FATAL_MEDIA_ERROR,o):new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.MEDIA,r.Error.Code.HLS_FATAL_MEDIA_ERROR,o);break;default:e=new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.HLS_FATAL_MEDIA_ERROR,o)}var l;this._trigger(r.EventType.ERROR,e),e&&e.severity===r.Error.Severity.CRITICAL&&(this._loadPromiseHandlers&&(null==(l=this._loadPromiseHandlers)||l.reject(e),this._loadPromiseHandlers=null,this._loadPromise=null),this.destroy())}else{const{category:e,code:t}=this._requestFilterError||this._responseFilterError?{category:r.Error.Category.NETWORK,code:this._requestFilterError?r.Error.Code.REQUEST_FILTER_ERROR:r.Error.Code.RESPONSE_FILTER_ERROR}:s[n]||{category:0,code:0};f._logger.warn(new r.Error(r.Error.Severity.RECOVERABLE,e,t,o))}this._requestFilterError=!1,this._responseFilterError=!1}_handleMediaError(e){f._logger.error("_handleMediaError mediaErrorName:",e);const t=performance.now();let n=!0;return e===a.a.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR?(f._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,r.EventType.LOADED_METADATA,this._onRecoveredCallback),f._logger.debug("try to recover using: _recoverDecodingError()"),this._recoverDecodingError()):this._checkTimeDeltaHasPassed(t,this._recoverSwapAudioCodecDate,this._config.recoverSwapAudioCodecDelay)?(this._eventManager.listen(this._videoElement,r.EventType.LOADED_METADATA,this._onRecoveredCallback),f._logger.debug("try to recover using: _recoverSwapAudioCodec()"),this._recoverSwapAudioCodec()):(f._logger.error("cannot recover, last media error recovery failed error: ",e),n=!1),n}_onRecovered(){this._trigger(r.EventType.MEDIA_RECOVERED),this._videoElement.removeEventListener(r.EventType.LOADED_METADATA,this._onRecoveredCallback)}_checkTimeDeltaHasPassed(e,t,n){return!t||e-t>n}_recoverDecodingError(){this._recoverDecodingErrorDate=performance.now(),f._logger.warn("try to recover media Error"),this._hls.recoverMediaError()}_recoverSwapAudioCodec(){this._recoverSwapAudioCodecDate=performance.now(),f._logger.warn("try to swap Audio Codec and recover media Error"),this._hls.swapAudioCodec(),this._hls.recoverMediaError()}_removeBindings(){for(const[e,t]of Object.entries(this._adapterEventsBindings))this._hls.off(e,t);this._videoElement.textTracks.onaddtrack=null,this._onRecoveredCallback=null,this._eventManager&&this._eventManager.removeAll()}getStartTimeOfDvrWindow(){if(!this.isLive())return 0;try{const e=this._hls.levels[this._hls.nextLoadLevel].details,t=e.fragments,n=t.length,r=t[0].start+t[0].duration,i=t[n-1].start+t[n-1].duration,a=void 0!==this._hls.config.liveMaxLatencyDuration?this._hls.config.liveMaxLatencyDuration:this._hls.config.liveMaxLatencyDurationCount*e.targetduration;return Math.max(r-this._hls.config.maxFragLookUpTolerance,i-a)}catch(e){return f._logger.debug("Unable obtain the start of DVR window"),0}}_onFragLoaded(e){if(r.Utils.Object.hasPropertyPath(e,"frag.stats.loading")){const{stats:t}=e.frag,n=t.loading.end-t.loading.start;this._trigger(r.EventType.FRAG_LOADED,{miliSeconds:n,bytes:t.loaded,url:e.frag.url})}}get targetBuffer(){let 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),e):NaN}_getLiveTargetBuffer(){return this._hls.config.liveSyncDuration?this._hls.config.liveSyncDuration:this._hls.config.liveSyncDurationCount*this._getLevelDetails().targetduration}}h(f,"id","HlsAdapter"),h(f,"_logger",r.BaseMediaSourceAdapter.getLogger(f.id)),h(f,"_hlsMimeTypes",["application/x-mpegurl","application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"]);const g="1.32.9",y="@playkit-js/playkit-js-hls";t.default=f,f.isSupported()&&Object(r.registerMediaSourceAdapter)(f)}]))},function(e,t,n){!function t(n){var r;r=function(){"use strict";function e(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 r(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?e(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):e(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}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,y(r.key),r)}}function a(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function o(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(){return(s=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 l(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,c(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function d(){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 p(e,t,n){return(p=d()?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&&c(i,n.prototype),i}).apply(null,arguments)}function h(e){var t="function"==typeof Map?new Map:void 0;return(h=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 p(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)})(e)}function f(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){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 f(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)?f(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 y(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);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var v={exports:{}};!function(e,t){var n,r,i,a,o;n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(e,t,n){if(n=n||{},e=e.trim(),!(t=t.trim())){if(!n.alwaysNormalize)return e;var i=o.parseURL(e);if(!i)throw new Error("Error trying to parse base URL.");return i.path=o.normalizePath(i.path),o.buildURLFromParts(i)}var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse relative URL.");if(a.scheme)return n.alwaysNormalize?(a.path=o.normalizePath(a.path),o.buildURLFromParts(a)):t;var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse base URL.");if(!s.netLoc&&s.path&&"/"!==s.path[0]){var l=r.exec(s.path);s.netLoc=l[1],s.path=l[2]}s.netLoc&&!s.path&&(s.path="/");var u={scheme:s.scheme,netLoc:a.netLoc,path:null,params:a.params,query:a.query,fragment:a.fragment};if(!a.netLoc&&(u.netLoc=s.netLoc,"/"!==a.path[0]))if(a.path){var c=s.path,d=c.substring(0,c.lastIndexOf("/")+1)+a.path;u.path=o.normalizePath(d)}else u.path=s.path,a.params||(u.params=s.params,a.query||(u.query=s.query));return null===u.path&&(u.path=n.alwaysNormalize?o.normalizePath(a.path):a.path),o.buildURLFromParts(u)},parseURL:function(e){var t=n.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}},e.exports=o}(v);var m=v.exports,b=Number.isFinite||function(e){return"number"==typeof e&&isFinite(e)},_=function(e){return 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",e}({}),E=function(e){return e.NETWORK_ERROR="networkError",e.MEDIA_ERROR="mediaError",e.KEY_SYSTEM_ERROR="keySystemError",e.MUX_ERROR="muxError",e.OTHER_ERROR="otherError",e}({}),k=function(e){return 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_PARSING_ERROR="levelParsingError",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.FRAG_GAP="fragGap",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",e}({}),T=function(){},A={trace:T,debug:T,log:T,warn:T,info:T,error:T},w=A;function S(e){var t=self.console[e];return t?t.bind(self.console,"["+e+"] >"):T}function C(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){w[t]=e[t]?e[t].bind(e):S(t)}))}(e,"debug","log","info","warn","error");try{w.log('Debug logs enabled for "'+t+'" in hls.js version 1.4.11')}catch(e){w=A}}else w=A}var x=w,I=/^(\d+)x(\d+)$/,P=/(.+?)=(".*?"|.*?)(?:,|$)/g,D=function(){function e(t){for(var n in"string"==typeof t&&(t=e.parseAttrList(t)),t)t.hasOwnProperty(n)&&("X-"===n.substring(0,2)&&(this.clientAttrs=this.clientAttrs||[],this.clientAttrs.push(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=I.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(P.lastIndex=0;null!==(t=P.exec(e));){var r=t[2];0===r.indexOf('"')&&r.lastIndexOf('"')===r.length-1&&(r=r.slice(1,-1)),n[t[1].trim()]=r}return n},e}();function R(e){return"SCTE35-OUT"===e||"SCTE35-IN"===e}var L=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 r in n)if(Object.prototype.hasOwnProperty.call(e,r)&&e[r]!==n[r]){x.warn('DATERANGE tag attribute: "'+r+'" does not match for tags with ID: "'+e.ID+'"'),this._badValueForSameId=r;break}e=s(new D({}),n,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){var i=new Date(this.attr["END-DATE"]);b(i.getTime())&&(this._endDate=i)}}return a(e,[{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("DURATION"in this.attr){var e=this.attr.decimalFloatingPoint("DURATION");if(b(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}},{key:"plannedDuration",get:function(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}},{key:"endOnNext",get:function(){return this.attr.bool("END-ON-NEXT")}},{key:"isValid",get:function(){return!!this.id&&!this._badValueForSameId&&b(this.startDate.getTime())&&(null===this.duration||this.duration>=0)&&(!this.endOnNext||!!this.class)}}]),e}(),O=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}},M="audio",N="video",U="audiovideo",F=function(){function e(e){var t;this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams=((t={})[M]=null,t[N]=null,t[U]=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},a(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=m.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""},set:function(e){this._url=e}}]),e}(),B=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.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,r.urlId=0,r.data=void 0,r.bitrateTest=!1,r.title=null,r.initSegment=null,r.endList=void 0,r.gap=void 0,r.type=t,r}l(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)||e.abort(),null==(t=this.keyLoader)||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[M]=null,e[N]=null,e[U]=null},a(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(!b(this.programDateTime))return null;var e=b(this.duration)?this.duration:0;return this.programDateTime+1e3*e}},{key:"encrypted",get:function(){var e;if(null!=(e=this._decryptdata)&&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}(F),j=function(e){function t(t,n,r,i,a){var o;(o=e.call(this,r)||this).fragOffset=0,o.duration=0,o.gap=!1,o.independent=!1,o.relurl=void 0,o.fragment=void 0,o.index=void 0,o.stats=new O,o.duration=t.decimalFloatingPoint("DURATION"),o.gap=t.bool("GAP"),o.independent=t.bool("INDEPENDENT"),o.relurl=t.enumeratedString("URI"),o.fragment=n,o.index=i;var s=t.enumeratedString("BYTERANGE");return s&&o.setByteRange(s,a),a&&(o.fragOffset=a.fragOffset+a.duration),o}return l(t,e),a(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}(F),H=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.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}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.live,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},a(e,[{key:"hasProgramDateTime",get:function(){return!!this.fragments.length&&b(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)&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}},{key:"fragmentEnd",get:function(){var e;return null!=(e=this.fragments)&&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)&&e.length?this.partList[this.partList.length-1].index:-1}},{key:"lastPartSn",get:function(){var e;return null!=(e=this.partList)&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}]),e}();function V(e){return Uint8Array.from(atob(e),(function(e){return e.charCodeAt(0)}))}function G(e){return Uint8Array.from(unescape(encodeURIComponent(e)),(function(e){return e.charCodeAt(0)}))}var K={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},z="org.w3.clearkey",W="com.apple.streamingkeydelivery",Y="com.microsoft.playready",q="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";function X(e){switch(e){case W:return K.FAIRPLAY;case Y:return K.PLAYREADY;case q:return K.WIDEVINE;case z:return K.CLEARKEY}}var Q="edef8ba979d64acea3c827dcd51d21ed";function $(e){switch(e){case K.FAIRPLAY:return W;case K.PLAYREADY:return Y;case K.WIDEVINE:return q;case K.CLEARKEY:return z}}function J(e){var t=e.drmSystems,n=e.widevineLicenseUrl,r=t?[K.FAIRPLAY,K.WIDEVINE,K.PLAYREADY,K.CLEARKEY].filter((function(e){return!!t[e]})):[];return!r[K.WIDEVINE]&&n&&r.push(K.WIDEVINE),r}var Z="undefined"!=typeof self&&self.navigator&&self.navigator.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null;function ee(e,t,n){return Uint8Array.prototype.slice?e.slice(t,n):new Uint8Array(Array.prototype.slice.call(e,t,n))}var te,ne=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},re=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},ie=function(e,t){for(var n=t,r=0;ne(e,t);)r+=10,r+=ae(e,t+6),re(e,t+10)&&(r+=10),t+=r;if(r>0)return e.subarray(n,n+r)},ae=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]},oe=function(e,t){return ne(e,t)&&ae(e,t+6)+10<=e.length-t},se=function(e){return e&&"PRIV"===e.key&&"com.apple.streaming.transportStreamTimestamp"===e.info},le=function(e){var t=String.fromCharCode(e[0],e[1],e[2],e[3]),n=ae(e,4);return{type:t,size:n,data:e.subarray(10,10+n)}},ue=function(e){for(var t=0,n=[];ne(e,t);){for(var r=ae(e,t+6),i=(t+=10)+r;t+8<i;){var a=le(e.subarray(t)),o=ce(a);o&&n.push(o),t+=a.size+10}re(e,t)&&(t+=10)}return n},ce=function(e){return"PRIV"===e.type?de(e):"W"===e.type[0]?he(e):pe(e)},de=function(e){if(!(e.size<2)){var t=ge(e.data,!0),n=new Uint8Array(e.data.subarray(t.length+1));return{key:e.type,info:t,data:n.buffer}}},pe=function(e){if(!(e.size<2)){if("TXXX"===e.type){var t=1,n=ge(e.data.subarray(t),!0);t+=n.length+1;var r=ge(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=ge(e.data.subarray(1));return{key:e.type,data:i}}},he=function(e){if("WXXX"===e.type){if(e.size<2)return;var t=1,n=ge(e.data.subarray(t),!0);t+=n.length+1;var r=ge(e.data.subarray(t));return{key:e.type,info:n,data:r}}var i=ge(e.data);return{key:e.type,data:i}},fe=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)}},ge=function(e,t){void 0===t&&(t=!1);var n=(te||void 0===self.TextDecoder||(te=new self.TextDecoder("utf-8")),te);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};var ye=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},ve=Math.pow(2,32)-1,me=[].push,be={video:1,audio:2,id3:3,text:4};function _e(e){return String.fromCharCode.apply(null,e)}function Ee(e,t){var n=e[t]<<8|e[t+1];return n<0?65536+n:n}function ke(e,t){var n=Te(e,t);return n<0?4294967296+n:n}function Te(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]}function Ae(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 we(e,t){var n=[];if(!t.length)return n;for(var r=e.byteLength,i=0;i<r;){var a=ke(e,i),o=a>1?i+a:r;if(_e(e.subarray(i+4,i+8))===t[0])if(1===t.length)n.push(e.subarray(i+8,o));else{var s=we(e.subarray(i+8,o),t.slice(1));s.length&&me.apply(n,s)}i=o}return n}function Se(e){var t=[],n=e[0],r=8,i=ke(e,r);r+=4,r+=0===n?8:16,r+=2;var a=e.length+0,o=Ee(e,r);r+=2;for(var s=0;s<o;s++){var l=r,u=ke(e,l);l+=4;var c=2147483647&u;if(1==(2147483648&u)>>>31)return x.warn("SIDX has hierarchical references (not supported)"),null;var d=ke(e,l);l+=4,t.push({referenceSize:c,subsegmentDuration:d,info:{duration:d/i,start:a,end:a+c-1}}),a+=c,r=l+=4}return{earliestPresentationTime:0,timescale:i,version:n,referencesCount:o,references:t}}function Ce(e){for(var t=[],n=we(e,["moov","trak"]),r=0;r<n.length;r++){var i=n[r],a=we(i,["tkhd"])[0];if(a){var o=a[0],s=0===o?12:20,l=ke(a,s),u=we(i,["mdia","mdhd"])[0];if(u){var c=ke(u,s=0===(o=u[0])?12:20),d=we(i,["mdia","hdlr"])[0];if(d){var p=_e(d.subarray(8,12)),h={soun:M,vide:N}[p];if(h){var f=we(i,["mdia","minf","stbl","stsd"])[0],g=void 0;f&&(g=_e(f.subarray(12,16))),t[l]={timescale:c,type:h},t[h]={timescale:c,id:l,codec:g}}}}}}return we(e,["moov","mvex","trex"]).forEach((function(e){var n=ke(e,4),r=t[n];r&&(r.default={duration:ke(e,12),flags:ke(e,20)})})),t}function xe(e){var t=we(e,["schm"])[0];if(t){var n=_e(t.subarray(4,8));if("cbcs"===n||"cenc"===n)return we(e,["schi","tenc"])[0]}return x.error("[eme] missing 'schm' box"),null}function Ie(e){var t=ke(e,0),n=8;1&t&&(n+=4),4&t&&(n+=4);for(var r=0,i=ke(e,4),a=0;a<i;a++)256&t&&(r+=ke(e,n),n+=4),512&t&&(n+=4),1024&t&&(n+=4),2048&t&&(n+=4);return r}function Pe(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}function De(e,t){var n=[],r=t.samples,i=t.timescale,a=t.id,o=!1;return we(r,["moof"]).map((function(s){var l=s.byteOffset-8;we(s,["traf"]).map((function(s){var u=we(s,["tfdt"]).map((function(e){var t=e[0],n=ke(e,4);return 1===t&&(n*=Math.pow(2,32),n+=ke(e,8)),n/i}))[0];return void 0!==u&&(e=u),we(s,["tfhd"]).map((function(u){var c=ke(u,4),d=16777215&ke(u,0),p=0,h=0!=(16&d),f=0,g=0!=(32&d),y=8;c===a&&(0!=(1&d)&&(y+=8),0!=(2&d)&&(y+=4),0!=(8&d)&&(p=ke(u,y),y+=4),h&&(f=ke(u,y),y+=4),g&&(y+=4),"video"===t.type&&(o=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)),we(s,["trun"]).map((function(a){var s=a[0],u=16777215&ke(a,0),c=0!=(1&u),d=0,h=0!=(4&u),g=0!=(256&u),y=0,v=0!=(512&u),m=0,b=0!=(1024&u),_=0!=(2048&u),E=0,k=ke(a,4),T=8;c&&(d=ke(a,T),T+=4),h&&(T+=4);for(var A=d+l,w=0;w<k;w++){if(g?(y=ke(a,T),T+=4):y=p,v?(m=ke(a,T),T+=4):m=f,b&&(T+=4),_&&(E=0===s?ke(a,T):Te(a,T),T+=4),t.type===N)for(var S=0;S<m;){var C=ke(r,A);Re(o,r[A+=4])&&Le(r.subarray(A,A+C),o?2:1,e+E/i,n),A+=C,S+=C+4}e+=y/i}})))}))}))})),n}function Re(e,t){if(e){var n=t>>1&63;return 39===n||40===n}return 6==(31&t)}function Le(e,t,n,r){var i=Oe(e),a=0;a+=t;for(var o=0,s=0,l=!1,u=0;a<i.length;){o=0;do{if(a>=i.length)break;o+=u=i[a++]}while(255===u);s=0;do{if(a>=i.length)break;s+=u=i[a++]}while(255===u);var c=i.length-a;if(!l&&4===o&&a<i.length){if(l=!0,181===i[a++]){var d=Ee(i,a);if(a+=2,49===d){var p=ke(i,a);if(a+=4,1195456820===p){var h=i[a++];if(3===h){var f=i[a++],g=64&f,y=g?2+3*(31&f):0,v=new Uint8Array(y);if(g){v[0]=f;for(var m=1;m<y;m++)v[m]=i[a++]}r.push({type:h,payloadType:o,pts:n,bytes:v})}}}}}else if(5===o&&s<c){if(l=!0,s>16){for(var b=[],_=0;_<16;_++){var E=i[a++].toString(16);b.push(1==E.length?"0"+E:E),3!==_&&5!==_&&7!==_&&9!==_||b.push("-")}for(var k=s-16,T=new Uint8Array(k),A=0;A<k;A++)T[A]=i[a++];r.push({payloadType:o,pts:n,uuid:b.join(""),userData:ge(T),userDataBytes:T})}}else if(s<c)a+=s;else if(s>c)break}}function Oe(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}var Me={},Ne=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(){Me={}};var t=e.prototype;return t.isSupported=function(){if(this.method){if("AES-128"===this.method||"NONE"===this.method)return!0;if("identity"===this.keyFormat)return"SAMPLE-AES"===this.method;switch(this.keyFormat){case W:case q:case Y:case z: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||x.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=V(l)):(t=G(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 q:this.pssh=r,r.length>=22&&(this.keyId=r.subarray(r.length-22,r.length-6));break;case Y:var i=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=function(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),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];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}([112,115,115,104],new Uint8Array([r,0,0,0]),e,a,i,l,n||new Uint8Array)}(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),l=(new DOMParser).parseFromString(s,"text/xml").getElementsByTagName("KID")[0];if(l){var u=l.childNodes[0]?l.childNodes[0].nodeValue:l.getAttribute("VALUE");if(u){var c=V(u).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)}(c),this.keyId=c}}break;default:var d=r.subarray(0,16);if(16!==d.length){var p=new Uint8Array(16);p.set(d,16-d.length),d=p}this.keyId=d}if(!this.keyId||16!==this.keyId.byteLength){var h=Me[this.uri];if(!h){var f=Object.keys(Me).length%Number.MAX_SAFE_INTEGER;h=new Uint8Array(16),new DataView(h.buffer,12,4).setUint32(0,f),Me[this.uri]=h}this.keyId=h}return this},e}(),Ue=/\{\$([a-zA-Z0-9-_]+)\}/g;function Fe(e){return Ue.test(e)}function Be(e,t,n){if(null!==e.variableList||e.hasVariableRefs)for(var r=n.length;r--;){var i=n[r],a=t[i];a&&(t[i]=je(e,a))}}function je(e,t){if(null!==e.variableList||e.hasVariableRefs){var n=e.variableList;return t.replace(Ue,(function(t){var r=t.substring(2,t.length-1),i=null==n?void 0:n[r];return void 0===i?(e.playlistParsingError||(e.playlistParsingError=new Error('Missing preceding EXT-X-DEFINE tag for Variable Reference: "'+r+'"')),t):i}))}return t}function He(e,t,n){var r,i,a=e.variableList;if(a||(e.variableList=a={}),"QUERYPARAM"in t){r=t.QUERYPARAM;try{var o=new self.URL(n).searchParams;if(!o.has(r))throw new Error('"'+r+'" does not match any query parameter in URI: "'+n+'"');i=o.get(r)}catch(t){e.playlistParsingError||(e.playlistParsingError=new Error("EXT-X-DEFINE QUERYPARAM: "+t.message))}}else r=t.NAME,i=t.VALUE;r in a?e.playlistParsingError||(e.playlistParsingError=new Error('EXT-X-DEFINE duplicate Variable Name declarations: "'+r+'"')):a[r]=i||""}function Ve(e,t,n){var r=t.IMPORT;if(n&&r in n){var i=e.variableList;i||(e.variableList=i={}),i[r]=n[r]}else e.playlistParsingError||(e.playlistParsingError=new Error('EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "'+r+'"'))}function Ge(){if("undefined"!=typeof self)return self.MediaSource||self.WebKitMediaSource}var Ke={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}},ze=Ge();function We(e,t){var n;return null!=(n=null==ze?void 0:ze.isTypeSupported((t||"video")+'/mp4;codecs="'+e+'"'))&&n}var Ye=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,qe=/#EXT-X-MEDIA:(.*)/g,Xe=/^#EXT(?:INF|-X-TARGETDURATION):/m,Qe=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[\S ]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),$e=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|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("|")),Je=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 m.buildAbsoluteURL(t,e,{alwaysNormalize:!0})},e.isMediaPlaylist=function(e){return Xe.test(e)},e.parseMasterPlaylist=function(t,n){var r,i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:Fe(t)},a=[];for(Ye.lastIndex=0;null!=(r=Ye.exec(t));)if(r[1]){var o,s=new D(r[1]);Be(i,s,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);var l=je(i,r[2]),u={attrs:s,bitrate:s.decimalInteger("AVERAGE-BANDWIDTH")||s.decimalInteger("BANDWIDTH"),name:s.NAME,url:e.resolve(l,n)},c=s.decimalResolution("RESOLUTION");c&&(u.width=c.width,u.height=c.height),tt((s.CODECS||"").split(/[ ,]+/).filter((function(e){return e})),u),u.videoCodec&&-1!==u.videoCodec.indexOf("avc1")&&(u.videoCodec=e.convertAVC1ToAVCOTI(u.videoCodec)),null!=(o=u.unknownCodecs)&&o.length||a.push(u),i.levels.push(u)}else if(r[3]){var d=r[3],p=r[4];switch(d){case"SESSION-DATA":var h=new D(p);Be(i,h,["DATA-ID","LANGUAGE","VALUE","URI"]);var f=h["DATA-ID"];f&&(null===i.sessionData&&(i.sessionData={}),i.sessionData[f]=h);break;case"SESSION-KEY":var g=Ze(p,n,i);g.encrypted&&g.isSupported()?(null===i.sessionKeys&&(i.sessionKeys=[]),i.sessionKeys.push(g)):x.warn('[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "'+p+'"');break;case"DEFINE":var y=new D(p);Be(i,y,["NAME","VALUE","QUERYPARAM"]),He(i,y,n);break;case"CONTENT-STEERING":var v=new D(p);Be(i,v,["SERVER-URI","PATHWAY-ID"]),i.contentSteering={uri:e.resolve(v["SERVER-URI"],n),pathwayId:v["PATHWAY-ID"]||"."};break;case"START":i.startTimeOffset=et(p)}}var m=a.length>0&&a.length<i.levels.length;return i.levels=m?a:i.levels,0===i.levels.length&&(i.playlistParsingError=new Error("no levels found in manifest")),i},e.parseMasterPlaylistMedia=function(t,n,r){var i,a={},o=r.levels,s={AUDIO:o.map((function(e){return{id:e.attrs.AUDIO,audioCodec:e.audioCodec}})),SUBTITLES:o.map((function(e){return{id:e.attrs.SUBTITLES,textCodec:e.textCodec}})),"CLOSED-CAPTIONS":[]},l=0;for(qe.lastIndex=0;null!==(i=qe.exec(t));){var u=new D(i[1]),c=u.TYPE;if(c){var d=s[c],p=a[c]||[];a[c]=p,Be(r,u,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);var h={attrs:u,bitrate:0,id:l++,groupId:u["GROUP-ID"]||"",instreamId:u["INSTREAM-ID"],name:u.NAME||u.LANGUAGE||"",type:c,default:u.bool("DEFAULT"),autoselect:u.bool("AUTOSELECT"),forced:u.bool("FORCED"),lang:u.LANGUAGE,url:u.URI?e.resolve(u.URI,n):""};if(null!=d&&d.length){var f=e.findGroup(d,h.groupId)||d[0];nt(h,f,"audioCodec"),nt(h,f,"textCodec")}p.push(h)}}return a},e.parseLevelPlaylist=function(e,t,n,r,i,a){var o,l,u,c=new H(t),d=c.fragments,p=null,h=0,f=0,g=0,y=0,v=null,m=new B(r,t),_=-1,E=!1;for(Qe.lastIndex=0,c.m3u8=e,c.hasVariableRefs=Fe(e);null!==(o=Qe.exec(e));){E&&(E=!1,(m=new B(r,t)).start=g,m.sn=h,m.cc=y,m.level=n,p&&(m.initSegment=p,m.rawProgramDateTime=p.rawProgramDateTime,p.rawProgramDateTime=null));var k=o[1];if(k){m.duration=parseFloat(k);var T=(" "+o[2]).slice(1);m.title=T||null,m.tagList.push(T?["INF",k,T]:["INF",k])}else if(o[3]){if(b(m.duration)){m.start=g,u&&at(m,u,c),m.sn=h,m.level=n,m.cc=y,m.urlId=i,d.push(m);var A=(" "+o[3]).slice(1);m.relurl=je(c,A),rt(m,v),v=m,g+=m.duration,h++,f=0,E=!0}}else if(o[4]){var w=(" "+o[4]).slice(1);v?m.setByteRange(w,v):m.setByteRange(w)}else if(o[5])m.rawProgramDateTime=(" "+o[5]).slice(1),m.tagList.push(["PROGRAM-DATE-TIME",m.rawProgramDateTime]),-1===_&&(_=d.length);else{if(!(o=o[0].match($e))){x.warn("No matches on slow regex match for level playlist!");continue}for(l=1;l<o.length&&void 0===o[l];l++);var S=(" "+o[l]).slice(1),C=(" "+o[l+1]).slice(1),I=o[l+2]?(" "+o[l+2]).slice(1):"";switch(S){case"PLAYLIST-TYPE":c.type=C.toUpperCase();break;case"MEDIA-SEQUENCE":h=c.startSN=parseInt(C);break;case"SKIP":var P=new D(C);Be(c,P,["RECENTLY-REMOVED-DATERANGES"]);var R=P.decimalInteger("SKIPPED-SEGMENTS");if(b(R)){c.skippedSegments=R;for(var O=R;O--;)d.unshift(null);h+=R}var M=P.enumeratedString("RECENTLY-REMOVED-DATERANGES");M&&(c.recentlyRemovedDateranges=M.split("\t"));break;case"TARGETDURATION":c.targetduration=Math.max(parseInt(C),1);break;case"VERSION":c.version=parseInt(C);break;case"EXTM3U":break;case"ENDLIST":c.live=!1;break;case"#":(C||I)&&m.tagList.push(I?[C,I]:[C]);break;case"DISCONTINUITY":y++,m.tagList.push(["DIS"]);break;case"GAP":m.gap=!0,m.tagList.push([S]);break;case"BITRATE":m.tagList.push([S,C]);break;case"DATERANGE":var N=new D(C);Be(c,N,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Be(c,N,N.clientAttrs);var U=new L(N,c.dateRanges[N.ID]);U.isValid||c.skippedSegments?c.dateRanges[U.id]=U:x.warn('Ignoring invalid DATERANGE tag: "'+C+'"'),m.tagList.push(["EXT-X-DATERANGE",C]);break;case"DEFINE":var F=new D(C);Be(c,F,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in F?Ve(c,F,a):He(c,F,t);break;case"DISCONTINUITY-SEQUENCE":y=parseInt(C);break;case"KEY":var V=Ze(C,t,c);if(V.isSupported()){if("NONE"===V.method){u=void 0;break}u||(u={}),u[V.keyFormat]&&(u=s({},u)),u[V.keyFormat]=V}else x.warn('[Keys] Ignoring invalid EXT-X-KEY tag: "'+C+'"');break;case"START":c.startTimeOffset=et(C);break;case"MAP":var G=new D(C);if(Be(c,G,["BYTERANGE","URI"]),m.duration){var K=new B(r,t);it(K,G,n,u),p=K,m.initSegment=p,p.rawProgramDateTime&&!m.rawProgramDateTime&&(m.rawProgramDateTime=p.rawProgramDateTime)}else it(m,G,n,u),p=m,E=!0;break;case"SERVER-CONTROL":var z=new D(C);c.canBlockReload=z.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=z.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&z.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=z.optionalFloat("PART-HOLD-BACK",0),c.holdBack=z.optionalFloat("HOLD-BACK",0);break;case"PART-INF":var W=new D(C);c.partTarget=W.decimalFloatingPoint("PART-TARGET");break;case"PART":var Y=c.partList;Y||(Y=c.partList=[]);var q=f>0?Y[Y.length-1]:void 0,X=f++,Q=new D(C);Be(c,Q,["BYTERANGE","URI"]);var $=new j(Q,m,t,X,q);Y.push($),m.duration+=$.duration;break;case"PRELOAD-HINT":var J=new D(C);Be(c,J,["URI"]),c.preloadHint=J;break;case"RENDITION-REPORT":var Z=new D(C);Be(c,Z,["URI"]),c.renditionReports=c.renditionReports||[],c.renditionReports.push(Z);break;default:x.warn("line parsed but not handled: "+o)}}}v&&!v.relurl?(d.pop(),g-=v.duration,c.partList&&(c.fragmentHint=v)):c.partList&&(rt(m,v),m.cc=y,c.fragmentHint=m,u&&at(m,u,c));var ee=d.length,te=d[0],ne=d[ee-1];if((g+=c.skippedSegments*c.targetduration)>0&&ee&&ne){c.averagetargetduration=g/ee;var re=ne.sn;c.endSN="initSegment"!==re?re:0,c.live||(ne.endList=!0),te&&(c.startCC=te.cc)}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(g+=c.fragmentHint.duration),c.totalduration=g,c.endCC=y,_>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,_),c},e}();function Ze(e,t,n){var r,i,a=new D(e);Be(n,a,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);var o=null!=(r=a.METHOD)?r:"",s=a.URI,l=a.hexadecimalInteger("IV"),u=a.KEYFORMATVERSIONS,c=null!=(i=a.KEYFORMAT)?i:"identity";s&&a.IV&&!l&&x.error("Invalid IV: "+a.IV);var d=s?Je.resolve(s,t):"",p=(u||"1").split("/").map(Number).filter(Number.isFinite);return new Ne(o,d,c,p,l)}function et(e){var t=new D(e).decimalFloatingPoint("TIME-OFFSET");return b(t)?t:null}function tt(e,t){["video","audio","text"].forEach((function(n){var r=e.filter((function(e){return function(e,t){var n=Ke[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 nt(e,t,n){var r=t[n];r&&(e[n]=r)}function rt(e,t){e.rawProgramDateTime?e.programDateTime=Date.parse(e.rawProgramDateTime):null!=t&&t.programDateTime&&(e.programDateTime=t.endProgramDateTime),b(e.programDateTime)||(e.programDateTime=null,e.rawProgramDateTime=null)}function it(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 at(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 ot="manifest",st="level",lt="audioTrack",ut="subtitleTrack",ct="main",dt="audio",pt="subtitle";function ht(e){switch(e.type){case lt:return dt;case ut:return pt;default:return ct}}function ft(e,t){var n=e.url;return void 0!==n&&0!==n.indexOf("data:")||(n=t.url),n}var gt=function(){function e(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=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(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(_.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)},t.unregisterListeners=function(){var e=this.hls;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(_.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 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.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()},t.onManifestLoading=function(e,t){var n=t.url;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ot,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,level:r,responseType:"text",type:st,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:lt,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:ut,url:i,deliveryDirectives:a})},t.load=function(e){var t,n,r,i=this,a=this.hls.config,o=this.getInternalLoader(e);if(o){var l=o.context;if(l&&l.url===e.url)return void x.trace("[playlist-loader]: playlist request ongoing");x.log("[playlist-loader]: aborting previous loader for type: "+e.type),o.abort()}if(n=e.type===ot?a.manifestLoadPolicy.default:s({},a.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),o=this.createInternalLoader(e),null!=(t=e.deliveryDirectives)&&t.part&&(e.type===st&&null!==e.level?r=this.hls.levels[e.level].details:e.type===lt&&null!==e.id?r=this.hls.audioTracks[e.id].details:e.type===ut&&null!==e.id&&(r=this.hls.subtitleTracks[e.id].details),r)){var u=r.partTarget,c=r.targetduration;if(u&&c){var d=1e3*Math.max(3*u,.8*c);n=s({},n,{maxTimeToFirstByteMs:Math.min(d,n.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(d,n.maxTimeToFirstByteMs)})}}var p=n.errorRetry||n.timeoutRetry||{},h={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:p.maxNumRetry||0,retryDelay:p.retryDelayMs||0,maxRetryDelay:p.maxRetryDelayMs||0},f={onSuccess:function(e,t,n,r){var a=i.getInternalLoader(n);i.resetInternalLoader(n.type);var o=e.data;0===o.indexOf("#EXTM3U")?(t.parsing.start=performance.now(),Je.isMediaPlaylist(o)?i.handleTrackOrLevelPlaylist(e,t,n,r||null,a):i.handleMasterPlaylist(e,t,n,r)):i.handleManifestParsingError(e,n,new Error("no EXTM3U delimiter"),r||null,t)},onError:function(e,t,n,r){i.handleNetworkError(t,n,!1,e,r)},onTimeout:function(e,t,n){i.handleNetworkError(t,n,!0,void 0,e)}};o.load(e,h,f)},t.handleMasterPlaylist=function(e,t,n,r){var i=this.hls,a=e.data,o=ft(e,n),s=Je.parseMasterPlaylist(a,o);if(s.playlistParsingError)this.handleManifestParsingError(e,n,s.playlistParsingError,r,t);else{var l=s.contentSteering,u=s.levels,c=s.sessionData,d=s.sessionKeys,p=s.startTimeOffset,h=s.variableList;this.variableList=h;var f=Je.parseMasterPlaylistMedia(a,o,s),g=f.AUDIO,y=void 0===g?[]:g,v=f.SUBTITLES,m=f["CLOSED-CAPTIONS"];y.length&&(y.some((function(e){return!e.url}))||!u[0].audioCodec||u[0].attrs.AUDIO||(x.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),y.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new D({}),bitrate:0,url:""}))),i.trigger(_.MANIFEST_LOADED,{levels:u,audioTracks:y,subtitles:v,captions:m,contentSteering:l,url:o,stats:t,networkDetails:r,sessionData:c,sessionKeys:d,startTimeOffset:p,variableList:h})}},t.handleTrackOrLevelPlaylist=function(e,t,n,r,i){var a=this.hls,o=n.id,s=n.level,l=n.type,u=ft(e,n),c=b(o)?o:0,d=b(s)?s:c,p=ht(n),h=Je.parseLevelPlaylist(e.data,u,d,p,c,this.variableList);if(l===ot){var f={attrs:new D({}),bitrate:0,details:h,name:"",url:u};a.trigger(_.MANIFEST_LOADED,{levels:[f],audioTracks:[],url:u,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=h,this.handlePlaylistLoaded(h,e,t,n,r,i)},t.handleManifestParsingError=function(e,t,n,r,i){this.hls.trigger(_.ERROR,{type:E.NETWORK_ERROR,details:k.MANIFEST_PARSING_ERROR,fatal:t.type===ot,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})},t.handleNetworkError=function(e,t,n,i,a){void 0===n&&(n=!1);var o="A network "+(n?"timeout":"error"+(i?" (status "+i.code+")":""))+" occurred while loading "+e.type;e.type===st?o+=": "+e.level+" id: "+e.id:e.type!==lt&&e.type!==ut||(o+=" id: "+e.id+' group-id: "'+e.groupId+'"');var s=new Error(o);x.warn("[playlist-loader]: "+o);var l=k.UNKNOWN,u=!1,c=this.getInternalLoader(e);switch(e.type){case ot:l=n?k.MANIFEST_LOAD_TIMEOUT:k.MANIFEST_LOAD_ERROR,u=!0;break;case st:l=n?k.LEVEL_LOAD_TIMEOUT:k.LEVEL_LOAD_ERROR,u=!1;break;case lt:l=n?k.AUDIO_TRACK_LOAD_TIMEOUT:k.AUDIO_TRACK_LOAD_ERROR,u=!1;break;case ut:l=n?k.SUBTITLE_TRACK_LOAD_TIMEOUT:k.SUBTITLE_LOAD_ERROR,u=!1}c&&this.resetInternalLoader(e.type);var d={type:E.NETWORK_ERROR,details:l,fatal:u,url:e.url,loader:c,context:e,error:s,networkDetails:t,stats:a};if(i){var p=(null==t?void 0:t.url)||e.url;d.response=r({url:p,data:void 0},i)}this.hls.trigger(_.ERROR,d)},t.handlePlaylistLoaded=function(e,t,n,r,i,a){var o=this.hls,s=r.type,l=r.level,u=r.id,c=r.groupId,d=r.deliveryDirectives,p=ft(t,r),h=ht(r),f="number"==typeof r.level&&h===ct?l:void 0;if(e.fragments.length){e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));var g=e.playlistParsingError;if(g)o.trigger(_.ERROR,{type:E.NETWORK_ERROR,details:k.LEVEL_PARSING_ERROR,fatal:!1,url:p,error:g,reason:g.message,response:t,context:r,level:f,parent:h,networkDetails:i,stats:n});else switch(e.live&&a&&(a.getCacheAge&&(e.ageHeader=a.getCacheAge()||0),a.getCacheAge&&!isNaN(e.ageHeader)||(e.ageHeader=0)),s){case ot:case st:o.trigger(_.LEVEL_LOADED,{details:e,level:f||0,id:u||0,stats:n,networkDetails:i,deliveryDirectives:d});break;case lt:o.trigger(_.AUDIO_TRACK_LOADED,{details:e,id:u||0,groupId:c||"",stats:n,networkDetails:i,deliveryDirectives:d});break;case ut:o.trigger(_.SUBTITLE_TRACK_LOADED,{details:e,id:u||0,groupId:c||"",stats:n,networkDetails:i,deliveryDirectives:d})}}else{var y=new Error("No Segments found in Playlist");o.trigger(_.ERROR,{type:E.NETWORK_ERROR,details:k.LEVEL_EMPTY_ERROR,fatal:!1,url:p,error:y,reason:y.message,response:t,context:r,level:f,parent:h,networkDetails:i,stats:n})}},e}();function yt(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 vt(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){x.debug("[texttrack-utils]: "+n);try{var r=new self.TextTrackCue(t.startTime,t.endTime,t.text);r.id=t.id,e.addCue(r)}catch(e){x.debug("[texttrack-utils]: Legacy TextTrackCue fallback failed: "+e)}}"disabled"===n&&(e.mode=n)}function mt(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 bt(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 _t="org.id3",Et="https://aomedia.org/emsg/ID3";function kt(){if("undefined"!=typeof self)return self.WebKitDataCue||self.VTTCue||self.TextTrackCue}var Tt=function(){var e=kt();try{new e(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY}();function At(e,t){return e.getTime()/1e3-t}var wt=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(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this)},t._unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this)},t.onMediaAttached=function(e,t){this.media=t.media},t.onMediaDetaching=function(){this.id3Track&&(mt(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 yt(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=kt(),s=0;s<a.length;s++){var l=a[s].type;if((l!==Et||r)&&i){var u=ue(a[s].data);if(u){var c=a[s].pts,d=c+a[s].duration;d>Tt&&(d=Tt),d-c<=0&&(d=c+.25);for(var p=0;p<u.length;p++){var h=u[p];if(!se(h)){this.updateId3CueEnds(c,l);var f=new o(c,d,"");f.value=h,l&&(f.type=l),this.id3Track.addCue(f)}}}}}}}},t.updateId3CueEnds=function(e,t){var n,r=null==(n=this.id3Track)?void 0:n.cues;if(r)for(var i=r.length;i--;){var a=r[i];a.type===t&&a.startTime<e&&a.endTime===Tt&&(a.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)&&bt(a,n,r,"audio"===i?function(e){return e.type===_t&&u}:"video"===i?function(e){return e.type===Et&&l}:function(e){return e.type===_t&&u||e.type===Et&&l})}},t.onLevelUpdated=function(e,t){var n=this,r=t.details;if(this.media&&r.hasProgramDateTime&&this.hls.config.enableDateRangeMetadataCues){var i=this.dateRangeCuesAppended,a=this.id3Track,o=r.dateRanges,s=Object.keys(o);if(a)for(var l=Object.keys(i).filter((function(e){return!s.includes(e)})),u=function(){var e=l[c];Object.keys(i[e].cues).forEach((function(t){a.removeCue(i[e].cues[t])})),delete i[e]},c=l.length;c--;)u();var d=r.fragments[r.fragments.length-1];if(0!==s.length&&b(null==d?void 0:d.programDateTime)){this.id3Track||(this.id3Track=this.createTrack(this.media));for(var p=d.programDateTime/1e3-d.start,h=kt(),f=function(){var e=s[g],t=o[e],r=i[e],a=(null==r?void 0:r.cues)||{},l=(null==r?void 0:r.durationKnown)||!1,u=At(t.startDate,p),c=Tt,d=t.endDate;if(d)c=At(d,p),l=!0;else if(t.endOnNext&&!l){var f=s.reduce((function(e,n){var r=o[n];return r.class===t.class&&r.id!==n&&r.startDate>t.startDate&&e.push(r),e}),[]).sort((function(e,t){return e.startDate.getTime()-t.startDate.getTime()}))[0];f&&(c=At(f.startDate,p),l=!0)}for(var y,v,m=Object.keys(t.attr),b=0;b<m.length;b++){var _=m[b];if("ID"!==(v=_)&&"CLASS"!==v&&"START-DATE"!==v&&"DURATION"!==v&&"END-DATE"!==v&&"END-ON-NEXT"!==v){var E=a[_];if(E)l&&!r.durationKnown&&(E.endTime=c);else{var k=t.attr[_];E=new h(u,c,""),R(_)&&(y=k,k=Uint8Array.from(y.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer),E.value={key:_,data:k},E.type="com.apple.quicktime.HLS",E.id=e,n.id3Track.addCue(E),a[_]=E}}}i[e]={cues:a,dateRange:t,durationKnown:l}},g=0;g<s.length;g++)f()}}},e}(),St=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=e.prototype;return t.destroy=function(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null},t.registerListeners=function(){this.hls.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(_.ERROR,this.onError,this)},t.unregisterListeners=function(){this.hls.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(_.ERROR,this.onError,this)},t.onMediaAttached=function(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)},t.onMediaDetaching=function(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)},t.onManifestLoading=function(){this.levelDetails=null,this._latency=null,this.stallCount=0},t.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)},t.onError=function(e,t){var n;t.details===k.BUFFER_STALLED_ERROR&&(this.stallCount++,null!=(n=this.levelDetails)&&n.live&&x.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))},t.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)}}}}},t.estimateLiveEdge=function(){var e=this.levelDetails;return null===e?null:e.edge+e.age},t.computeLatency=function(){var e=this.estimateLiveEdge();return null===e?null:e-this.currentTime},a(e,[{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}}]),e}(),Ct=["NONE","TYPE-0","TYPE-1",null],xt=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}(),It=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,"")}return e.prototype.addFallback=function(e){this.url.push(e.url),this._attrs.push(e.attrs)},a(e,[{key:"maxBitrate",get:function(){return Math.max(this.realBitrate,this.bitrate)}},{key:"attrs",get:function(){return this._attrs[this._urlId]}},{key:"pathwayId",get:function(){return this.attrs["PATHWAY-ID"]||"."}},{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.fragmentError=0,this.loadError=0,this.details=void 0,this._urlId=t)}},{key:"audioGroupId",get:function(){var e;return null==(e=this.audioGroupIds)?void 0:e[this.urlId]}},{key:"textGroupId",get:function(){var e;return null==(e=this.textGroupIds)?void 0:e[this.urlId]}}]),e}();function Pt(e,t){var n=t.startPTS;if(b(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 Dt(e,t,n,r,i,a){r-n<=0&&(x.warn("Fragment should have a positive duration",t),r=n+t.duration,a=i+t.duration);var o=n,s=r,l=t.startPTS,u=t.endPTS;if(b(l)){var c=Math.abs(l-n);b(t.deltaPTS)?t.deltaPTS=Math.max(c,t.deltaPTS):t.deltaPTS=c,o=Math.max(n,l),n=Math.min(n,l),i=Math.min(i,t.startDTS),s=Math.min(r,u),r=Math.max(r,u),a=Math.max(a,t.endDTS)}var d=n-t.start;0!==t.start&&(t.start=n),t.duration=r-t.start,t.startPTS=n,t.maxStartPTS=o,t.startDTS=i,t.endPTS=r,t.minEndPTS=s,t.endDTS=a;var p,h=t.sn;if(!e||h<e.startSN||h>e.endSN)return 0;var f=h-e.startSN,g=e.fragments;for(g[f]=t,p=f;p>0;p--)Pt(g[p],g[p-1]);for(p=f;p<g.length-1;p++)Pt(g[p],g[p+1]);return e.fragmentHint&&Pt(g[g.length-1],e.fragmentHint),e.PTSKnown=e.alignedSliding=!0,d}function Rt(e,t){for(var n=null,r=e.fragments,i=r.length-1;i>=0;i--){var a=r[i].initSegment;if(a){n=a;break}}e.fragmentHint&&delete e.fragmentHint.endPTS;var o,l,u,c,d,p=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],d=s[u];r&&!d&&u<r&&(d=t.fragments[u]=c),c&&d&&n(c,d)}}(e,t,(function(e,r){e.relurl&&(p=e.cc-r.cc),b(e.startPTS)&&b(e.endPTS)&&(r.start=r.startPTS=e.startPTS,r.startDTS=e.startDTS,r.maxStartPTS=e.maxStartPTS,r.endPTS=e.endPTS,r.endDTS=e.endDTS,r.minEndPTS=e.minEndPTS,r.duration=e.endPTS-e.startPTS,r.duration&&(o=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.relurl)||(e.initSegment=n)})),t.skippedSegments)if(t.deltaUpdateFailed=t.fragments.some((function(e){return!e})),t.deltaUpdateFailed){x.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=(l=e.dateRanges,u=t.dateRanges,c=t.recentlyRemovedDateranges,d=s({},l),c&&c.forEach((function(e){delete d[e]})),Object.keys(u).forEach((function(e){var t=new L(u[e].attr,d[e]);t.isValid?d[e]=t:x.warn('Ignoring invalid Playlist Delta Update DATERANGE tag: "'+JSON.stringify(u[e].attr)+'"')})),d));var f=t.fragments;if(p){x.warn("discontinuity sliding from playlist, take drift into account");for(var g=0;g<f.length;g++)f[g].cc+=p}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?n(o,s):r--}}(e.partList,t.partList,(function(e,t){t.elementaryStreams=e.elementaryStreams,t.stats=e.stats})),o?Dt(t,o,o.startPTS,o.endPTS,o.startDTS,o.endDTS):Lt(e,t),f.length&&(t.totalduration=t.edge-f[0].start),t.driftStartTime=e.driftStartTime,t.driftStart=e.driftStart;var y=t.advancedDateTime;if(t.advanced&&y){var v=t.edge;t.driftStart||(t.driftStartTime=y,t.driftStart=v),t.driftEndTime=y,t.driftEnd=v}else t.driftEndTime=e.driftEndTime,t.driftEnd=e.driftEnd,t.advancedDateTime=e.advancedDateTime}function Lt(e,t){var n=t.startSN+t.skippedSegments-e.startSN,r=e.fragments;n<0||n>=r.length||Ot(t,r[n].start)}function Ot(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)}}function Mt(e,t,n){var r;return null!=e&&e.details?Nt(null==(r=e.details)?void 0:r.partList,t,n):null}function Nt(e,t,n){if(e)for(var r=e.length;r--;){var i=e[r];if(i.index===n&&i.fragment.sn===t)return i}return null}function Ut(e){switch(e.details){case k.FRAG_LOAD_TIMEOUT:case k.KEY_LOAD_TIMEOUT:case k.LEVEL_LOAD_TIMEOUT:case k.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Ft(e,t){var n=Ut(t);return e.default[(n?"timeout":"error")+"Retry"]}function Bt(e,t){var n="linear"===e.backoff?1:Math.pow(2,t);return Math.min(n*e.retryDelayMs,e.maxRetryDelayMs)}function jt(e){return r(r({},e),{errorRetry:null,timeoutRetry:null})}function Ht(e,t,n,r){return!!e&&t<e.maxNumRetry&&(function(e){return 0===e&&!1===navigator.onLine||!!e&&(e<400||e>499)}(r)||!!n)}var Vt=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 Gt(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===Kt(n,r,i))return i;var a=Vt(t,Kt.bind(null,n,r));return!a||a===e&&i?i:a}function Kt(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 zt(e,t,n){var r=1e3*Math.min(t,n.duration+(n.deltaPTS?n.deltaPTS:0));return(n.endProgramDateTime||0)-r>e}var Wt,Yt=function(){function e(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=x.log.bind(x,"[info]:"),this.warn=x.warn.bind(x,"[warning]:"),this.error=x.error.bind(x,"[error]:"),this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(_.ERROR,this.onError,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this)},t.unregisterListeners=function(){var e=this.hls;e&&(e.off(_.ERROR,this.onError,this),e.off(_.ERROR,this.onErrorOut,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this))},t.destroy=function(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}},t.startLoad=function(e){this.playlistError=0},t.stopLoad=function(){},t.getVariantLevelIndex=function(e){return(null==e?void 0:e.type)===ct?e.level:this.hls.loadLevel},t.onManifestLoading=function(){this.playlistError=0,this.penalizedRenditions={}},t.onLevelUpdated=function(){this.playlistError=0},t.onError=function(e,t){var n,r;if(!t.fatal){var i=this.hls,a=t.context;switch(t.details){case k.FRAG_LOAD_ERROR:case k.FRAG_LOAD_TIMEOUT:case k.KEY_LOAD_ERROR:case k.KEY_LOAD_TIMEOUT:return void(t.errorAction=this.getFragRetryOrSwitchAction(t));case k.FRAG_PARSING_ERROR:if(null!=(n=t.frag)&&n.gap)return void(t.errorAction={action:0,flags:0});case k.FRAG_GAP:case k.FRAG_DECRYPT_ERROR:return t.errorAction=this.getFragRetryOrSwitchAction(t),void(t.errorAction.action=2);case k.LEVEL_EMPTY_ERROR:case k.LEVEL_PARSING_ERROR:var o,s,l=t.parent===ct?t.level:i.loadLevel;return void(t.details===k.LEVEL_EMPTY_ERROR&&null!=(o=t.context)&&null!=(s=o.levelDetails)&&s.live?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,l):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,l)));case k.LEVEL_LOAD_ERROR:case k.LEVEL_LOAD_TIMEOUT:return void("number"==typeof(null==a?void 0:a.level)&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,a.level)));case k.AUDIO_TRACK_LOAD_ERROR:case k.AUDIO_TRACK_LOAD_TIMEOUT:case k.SUBTITLE_LOAD_ERROR:case k.SUBTITLE_TRACK_LOAD_TIMEOUT:if(a){var u=i.levels[i.loadLevel];if(u&&(a.type===lt&&a.groupId===u.audioGroupId||a.type===ut&&a.groupId===u.textGroupId))return t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.loadLevel),t.errorAction.action=2,void(t.errorAction.flags=1)}return;case k.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:var c=i.levels[i.loadLevel],d=null==c?void 0:c.attrs["HDCP-LEVEL"];return void(d&&(t.errorAction={action:2,flags:2,hdcpLevel:d}));case k.BUFFER_ADD_CODEC_ERROR:case k.REMUX_ALLOC_ERROR:return void(t.errorAction=this.getLevelSwitchAction(t,null!=(r=t.level)?r:i.loadLevel));case k.INTERNAL_EXCEPTION:case k.BUFFER_APPENDING_ERROR:case k.BUFFER_APPEND_ERROR:case k.BUFFER_FULL_ERROR:case k.LEVEL_SWITCH_ERROR:case k.BUFFER_STALLED_ERROR:case k.BUFFER_SEEK_OVER_HOLE:case k.BUFFER_NUDGE_ON_STALL:return void(t.errorAction={action:0,flags:0})}if(t.type===E.KEY_SYSTEM_ERROR){var p=this.getVariantLevelIndex(t.frag);return t.levelRetry=!1,void(t.errorAction=this.getLevelSwitchAction(t,p))}}},t.getPlaylistRetryOrSwitchAction=function(e,t){var n,r=Ft(this.hls.config.playlistLoadPolicy,e),i=this.playlistError++,a=null==(n=e.response)?void 0:n.code;if(Ht(r,i,Ut(e),a))return{action:5,flags:0,retryConfig:r,retryCount:i};var o=this.getLevelSwitchAction(e,t);return r&&(o.retryConfig=r,o.retryCount=i),o},t.getFragRetryOrSwitchAction=function(e){var t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],i=t.config,a=i.fragLoadPolicy,o=i.keyLoadPolicy,s=Ft(e.details.startsWith("key")?o:a,e),l=t.levels.reduce((function(e,t){return e+t.fragmentError}),0);if(r){var u;e.details!==k.FRAG_GAP&&r.fragmentError++;var c=null==(u=e.response)?void 0:u.code;if(Ht(s,l,Ut(e),c))return{action:5,flags:0,retryConfig:s,retryCount:l}}var d=this.getLevelSwitchAction(e,n);return s&&(d.retryConfig=s,d.retryCount=l),d},t.getLevelSwitchAction=function(e,t){var n=this.hls;null==t&&(t=n.loadLevel);var r=this.hls.levels[t];if(r&&(r.loadError++,n.autoLevelEnabled)){for(var i,a,o=-1,s=n.levels,l=n.loadLevel,u=n.minAutoLevel,c=n.maxAutoLevel,d=null==(i=e.frag)?void 0:i.type,p=null!=(a=e.context)?a:{},h=p.type,f=p.groupId,g=s.length;g--;){var y=(g+l)%s.length;if(y!==l&&y>=u&&y<=c&&0===s[y].loadError){var v=s[y];if(e.details===k.FRAG_GAP&&e.frag){var m=s[y].details;if(m){var b=Gt(e.frag,m.fragments,e.frag.start);if(null!=b&&b.gap)continue}}else{if(h===lt&&f===v.audioGroupId||h===ut&&f===v.textGroupId)continue;if(d===dt&&r.audioGroupId===v.audioGroupId||d===pt&&r.textGroupId===v.textGroupId)continue}o=y;break}}if(o>-1&&n.loadLevel!==o)return e.levelRetry=!0,this.playlistError=0,{action:2,flags:0,nextAutoLevel:o}}return{action:2,flags:1}},t.onErrorOut=function(e,t){var n;switch(null==(n=t.errorAction)?void 0:n.action){case 0:break;case 2:this.sendAlternateToPenaltyBox(t),t.errorAction.resolved||t.details===k.FRAG_GAP||(t.fatal=!0)}t.fatal&&this.hls.stopLoad()},t.sendAlternateToPenaltyBox=function(e){var t=this.hls,n=e.errorAction;if(n){var r=n.flags,i=n.hdcpLevel,a=n.nextAutoLevel;switch(r){case 0:this.switchLevel(e,a);break;case 1:n.resolved||(n.resolved=this.redundantFailover(e));break;case 2:i&&(t.maxHdcpLevel=Ct[Ct.indexOf(i)-1],n.resolved=!0),this.warn('Restricting playback to HDCP-LEVEL of "'+t.maxHdcpLevel+'" or lower')}n.resolved||this.switchLevel(e,a)}},t.switchLevel=function(e,t){void 0!==t&&e.errorAction&&(this.warn("switching to level "+t+" after "+e.details),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)},t.redundantFailover=function(e){var t=this,n=this.hls,r=this.penalizedRenditions,i=e.parent===ct?e.level:n.loadLevel,a=n.levels[i],o=a.url.length,s=e.frag?e.frag.urlId:a.urlId;a.urlId!==s||e.frag&&!a.details||this.penalizeRendition(a,e);for(var l=function(){var l=(s+u)%o,c=r[l];if(!c||function(e,t,n){if(performance.now()-e.lastErrorPerfMs>3e5)return!0;var r=e.details;if(t.details===k.FRAG_GAP&&r&&t.frag){var i=t.frag.start,a=Gt(null,r.fragments,i);if(a&&!a.gap)return!0}if(n&&e.errors.length<n.errors.length){var o=e.errors[e.errors.length-1];if(r&&o.frag&&t.frag&&Math.abs(o.frag.start-t.frag.start)>3*r.targetduration)return!0}return!1}(c,e,r[s]))return t.warn("Switching to Redundant Stream "+(l+1)+"/"+o+': "'+a.url[l]+'" after '+e.details),t.playlistError=0,n.levels.forEach((function(e){e.urlId=l})),n.nextLoadLevel=i,{v:!0}},u=1;u<o;u++){var c=l();if("object"==typeof c)return c.v}return!1},t.penalizeRendition=function(e,t){var n=this.penalizedRenditions,r=n[e.urlId]||{lastErrorPerfMs:0,errors:[],details:void 0};r.lastErrorPerfMs=performance.now(),r.errors.push(t),r.details=e.details,n[e.urlId]=r},e}(),qt=function(){function e(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=x.log.bind(x,t+":"),this.warn=x.warn.bind(x,t+":"),this.hls=e}var t=e.prototype;return t.destroy=function(){this.clearTimer(),this.hls=this.log=this.warn=null},t.clearTimer=function(){clearTimeout(this.timer),this.timer=-1},t.startLoad=function(){this.canLoad=!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=-1,i=0;i<n.length;i++){var a=n[i],o=void 0;try{o=new self.URL(a.URI,t.url).href}catch(e){x.warn("Could not construct new URL for Rendition Report: "+e),o=a.URI||""}if(o===e){r=i;break}o===e.substring(0,o.length)&&(r=i)}if(-1!==r){var s=n[r],l=parseInt(s["LAST-MSN"])||(null==t?void 0:t.lastPartSn),u=parseInt(s["LAST-PART"])||(null==t?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){var c=Math.min(t.age-t.partTarget,t.targetduration);u>=0&&c>t.partTarget&&(u+=1)}return new xt(l,u>=0?u:void 0,"")}}},t.loadPlaylist=function(e){-1===this.requestScheduled&&(this.requestScheduled=self.performance.now())},t.shouldLoadPlaylist=function(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)},t.shouldReloadPlaylist=function(e){return-1===this.timer&&-1===this.requestScheduled&&this.shouldLoadPlaylist(e)},t.playlistLoaded=function(e,t,n){var r=this,i=t.details,a=t.stats,o=self.performance.now(),s=a.loading.first?Math.max(0,o-a.loading.first):0;if(i.advancedDateTime=Date.now()-s,i.live||null!=n&&n.live){if(i.reloaded(n),n&&this.log("live playlist "+e+" "+(i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED")),n&&i.fragments.length>0&&Rt(n,i),!this.canLoad||!i.live)return;var l,u=void 0,c=void 0;if(i.canBlockReload&&i.endSN&&i.advanced){var d=this.hls.config.lowLatencyMode,p=i.lastPartSn,h=i.endSN,f=i.lastPartIndex,g=p===h;-1!==f?(u=g?h+1:p,c=g?d?0:f:f+1):u=h+1;var y=i.age,v=y+i.ageHeader,m=Math.min(v-i.partTarget,1.5*i.targetduration);if(m>0){if(n&&m>n.tuneInGoal)this.warn("CDN Tune-in goal increased from: "+n.tuneInGoal+" to: "+m+" with playlist age: "+i.age),m=0;else{var b=Math.floor(m/i.targetduration);u+=b,void 0!==c&&(c+=Math.round(m%i.targetduration/i.partTarget)),this.log("CDN Tune-in age: "+i.ageHeader+"s last advanced "+y.toFixed(2)+"s goal: "+m+" skip sn "+b+" to part "+c)}i.tuneInGoal=m}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,u,c),d||!g)return void this.loadPlaylist(l)}else i.canBlockReload&&(l=this.getDeliveryDirectives(i,t.deliveryDirectives,u,c));var _=this.hls.mainForwardBufferInfo,E=_?_.end-_.len:0,k=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-E));i.updated&&o>this.requestScheduled+k&&(this.requestScheduled=a.loading.start),void 0!==u&&i.canBlockReload?this.requestScheduled=a.loading.first+k-(1e3*i.partTarget||1e3):-1===this.requestScheduled||this.requestScheduled+k<o?this.requestScheduled=o:this.requestScheduled-o<=0&&(this.requestScheduled+=k);var T=this.requestScheduled-o;T=Math.max(0,T),this.log("reload live playlist "+e+" in "+Math.round(T)+" ms"),this.timer=self.setTimeout((function(){return r.loadPlaylist(l)}),T)}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?"v2":"YES":""}(e,n);return null!=t&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=""),new xt(n,r,i)},t.checkRetry=function(e){var t=this,n=e.details,r=Ut(e),i=e.errorAction,a=i||{},o=a.action,s=a.retryCount,l=void 0===s?0:s,u=a.retryConfig,c=!!i&&!!u&&(5===o||!i.resolved&&2===o);if(c){var d;if(this.requestScheduled=-1,l>=u.maxNumRetry)return!1;if(r&&null!=(d=e.context)&&d.deliveryDirectives)this.warn("Retrying playlist loading "+(l+1)+"/"+u.maxNumRetry+' after "'+n+'" without delivery-directives'),this.loadPlaylist();else{var p=Bt(u,l);this.timer=self.setTimeout((function(){return t.loadPlaylist()}),p),this.warn("Retrying playlist loading "+(l+1)+"/"+u.maxNumRetry+' after "'+n+'" in '+p+"ms")}e.levelRetry=!0,i.resolved=!0}return c},e}(),Xt=function(e){function t(t,n){var r;return(r=e.call(this,t,"[level-controller]")||this)._levels=[],r._firstLevel=-1,r._startLevel=void 0,r.currentLevel=null,r.currentLevelIndex=-1,r.manualLevelIndex=-1,r.steering=void 0,r.onParsedComplete=void 0,r.steering=n,r._registerListeners(),r}l(t,e);var n=t.prototype;return n._registerListeners=function(){var e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this),e.on(_.ERROR,this.onError,this)},n._unregisterListeners=function(){var e=this.hls;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this),e.off(_.ERROR,this.onError,this)},n.destroy=function(){this._unregisterListeners(),this.steering=null,this.resetLevels(),e.prototype.destroy.call(this)},n.startLoad=function(){this._levels.forEach((function(e){e.loadError=0,e.fragmentError=0})),e.prototype.startLoad.call(this)},n.resetLevels=function(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[]},n.onManifestLoading=function(e,t){this.resetLevels()},n.onManifestLoaded=function(e,t){var n,r=[],i={};t.levels.forEach((function(e){var t,a=e.attrs;-1!==(null==(t=e.audioCodec)?void 0:t.indexOf("mp4a.40.34"))&&(Wt||(Wt=/chrome|firefox/i.test(navigator.userAgent)),Wt&&(e.audioCodec=void 0));var o=a.AUDIO,s=a.CODECS,l=a["FRAME-RATE"],u=a["PATHWAY-ID"],c=a.RESOLUTION,d=a.SUBTITLES,p=(u||".")+"-"+e.bitrate+"-"+c+"-"+l+"-"+s;(n=i[p])?n.addFallback(e):(n=new It(e),i[p]=n,r.push(n)),Qt(n,"audio",o),Qt(n,"text",d)})),this.filterAndSortMediaOptions(r,t)},n.filterAndSortMediaOptions=function(e,t){var n=this,r=[],i=[],a=!1,o=!1,s=!1,l=e.filter((function(e){var t=e.audioCodec,n=e.videoCodec,r=e.width,i=e.height,l=e.unknownCodecs;return a||(a=!(!r||!i)),o||(o=!!n),s||(s=!!t),!(null!=l&&l.length)&&(!t||We(t,"audio"))&&(!n||We(n,"video"))}));if((a||o)&&s&&(l=l.filter((function(e){var t=e.videoCodec,n=e.width,r=e.height;return!!t||!(!n||!r)}))),0!==l.length){t.audioTracks&&$t(r=t.audioTracks.filter((function(e){return!e.audioCodec||We(e.audioCodec,"audio")}))),t.subtitles&&$t(i=t.subtitles);var u=l.slice(0);l.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["FRAME-RATE"]!==t.attrs["FRAME-RATE"]?e.attrs.decimalFloatingPoint("FRAME-RATE")-t.attrs.decimalFloatingPoint("FRAME-RATE"):e.attrs.SCORE!==t.attrs.SCORE?e.attrs.decimalFloatingPoint("SCORE")-t.attrs.decimalFloatingPoint("SCORE"):a&&e.height!==t.height?e.height-t.height:0}));var c=u[0];if(this.steering&&(l=this.steering.filterParsedLevels(l)).length!==u.length)for(var d=0;d<u.length;d++)if(u[d].pathwayId===l[0].pathwayId){c=u[d];break}this._levels=l;for(var p=0;p<l.length;p++)if(l[p]===c){this._firstLevel=p,this.log("manifest loaded, "+l.length+" level(s) found, first bitrate: "+c.bitrate);break}var h=s&&!o,f={levels:l,audioTracks:r,subtitleTracks:i,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:s,video:o,altAudio:!h&&r.some((function(e){return!!e.url}))};this.hls.trigger(_.MANIFEST_PARSED,f),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}else Promise.resolve().then((function(){if(n.hls){var e=new Error("no level with compatible codecs found in manifest");n.hls.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:e,reason:e.message})}}))},n.onError=function(e,t){!t.fatal&&t.context&&t.context.type===st&&t.context.level===this.level&&this.checkRetry(t)},n.onFragLoaded=function(e,t){var n=t.frag;if(void 0!==n&&n.type===ct){var r=this._levels[n.level];void 0!==r&&(r.loadError=0)}},n.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)&&r.skip&&(a.deltaUpdateFailed=!0));i===this.currentLevelIndex?(0===o.fragmentError&&(o.loadError=0),this.playlistLoaded(i,t,o.details)):null!=(n=t.deliveryDirectives)&&n.skip&&(a.deltaUpdateFailed=!0)},n.onAudioTrackSwitched=function(e,t){var n=this.currentLevel;if(n){var r=this.hls.audioTracks[t.id].groupId;if(n.audioGroupIds&&n.audioGroupId!==r){for(var i=-1,a=0;a<n.audioGroupIds.length;a++)if(n.audioGroupIds[a]===r){i=a;break}-1!==i&&i!==n.urlId&&(n.urlId=i,this.canLoad&&this.startLoad())}}},n.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.currentLevelIndex,r=this.currentLevel;if(r&&this.shouldLoadPlaylist(r)){var i=r.urlId,a=r.uri;if(t)try{a=t.addDirectives(a)}catch(e){this.warn("Could not construct new URL with HLS Delivery Directives: "+e)}var o=r.attrs["PATHWAY-ID"];this.log("Loading level index "+n+(void 0!==(null==t?void 0:t.msn)?" at sn "+t.msn+" part "+t.part:"")+" with"+(o?" Pathway "+o:"")+" URI "+(i+1)+"/"+r.url.length+" "+a),this.clearTimer(),this.hls.trigger(_.LEVEL_LOADING,{url:a,level:n,id:i,deliveryDirectives:t||null})}},n.removeLevel=function(e,t){var n=this,r=function(e,n){return n!==t},i=this._levels.filter((function(i,a){return a!==e||(i.url.length>1&&void 0!==t?(i.url=i.url.filter(r),i.audioGroupIds&&(i.audioGroupIds=i.audioGroupIds.filter(r)),i.textGroupIds&&(i.textGroupIds=i.textGroupIds.filter(r)),i.urlId=0,!0):(n.steering&&n.steering.removeLevel(i),!1))}));this.hls.trigger(_.LEVELS_UPDATED,{levels:i})},n.onLevelsUpdated=function(e,t){var n=t.levels;n.forEach((function(e,t){var n=e.details;null!=n&&n.fragments&&n.fragments.forEach((function(e){e.level=t}))})),this._levels=n},a(t,[{key:"levels",get:function(){return 0===this._levels.length?null:this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(e){var t=this._levels;if(0!==t.length){if(e<0||e>=t.length){var n=new Error("invalid level idx"),r=e<0;if(this.hls.trigger(_.ERROR,{type:E.OTHER_ERROR,details:k.LEVEL_SWITCH_ERROR,level:e,fatal:r,error:n,reason:n.message}),r)return;e=Math.min(e,t.length-1)}var i=this.currentLevelIndex,a=this.currentLevel,o=a?a.attrs["PATHWAY-ID"]:void 0,l=t[e],u=l.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=l,i!==e||!l.details||!a||o!==u){this.log("Switching to level "+e+(u?" with Pathway "+u:"")+" from level "+i+(o?" with Pathway "+o:""));var c=s({},l,{level:e,maxBitrate:l.maxBitrate,attrs:l.attrs,uri:l.uri,urlId:l.urlId});delete c._attrs,delete c._urlId,this.hls.trigger(_.LEVEL_SWITCHING,c);var d=l.details;if(!d||d.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)}}]),t}(qt);function Qt(e,t,n){n&&("audio"===t?(e.audioGroupIds||(e.audioGroupIds=[]),e.audioGroupIds[e.url.length-1]=n):"text"===t&&(e.textGroupIds||(e.textGroupIds=[]),e.textGroupIds[e.url.length-1]=n))}function $t(e){var t={};e.forEach((function(e){var n=e.groupId||"";e.id=t[n]=t[n]||0,t[n]++}))}var Jt="NOT_LOADED",Zt="APPENDING",en="PARTIAL",tn="OK",nn=function(){function e(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}var t=e.prototype;return t._registerListeners=function(){var e=this.hls;e.on(_.BUFFER_APPENDED,this.onBufferAppended,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this)},t._unregisterListeners=function(){var e=this.hls;e.off(_.BUFFER_APPENDED,this.onBufferAppended,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this)},t.destroy=function(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null},t.getAppendedFrag=function(e,t){var n=this.activePartLists[t];if(n)for(var r=n.length;r--;){var i=n[r];if(!i)break;var a=i.end;if(i.start<=e&&null!==a&&e<=a)return i}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,r){var i=this;this.timeRanges&&(this.timeRanges[e]=t);var a=(null==r?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach((function(r){var o=i.fragments[r];if(o&&!(a>=o.body.sn))if(o.buffered||o.loaded){var s=o.range[e];s&&s.time.some((function(e){var n=!i.isTimeBuffered(e.startPTS,e.endPTS,t);return n&&i.removeFragment(o.body),n}))}else o.body.type===n&&i.removeFragment(o.body)}))},t.detectPartialFragments=function(e){var t=this,n=this.timeRanges,r=e.frag,i=e.part;if(n&&"initSegment"!==r.sn){var a=an(r),o=this.fragments[a];if(!(!o||o.buffered&&r.gap)){var s=!r.relurl;Object.keys(n).forEach((function(e){var a=r.elementaryStreams[e];if(a){var l=n[e],u=s||!0===a.partial;o.range[e]=t.getBufferedTimes(r,i,u,l)}})),o.loaded=null,Object.keys(o.range).length?(o.buffered=!0,(o.body.endList=r.endList||o.body.endList)&&(this.endListFragments[o.body.type]=o),rn(o)||this.removeParts(r.sn-1,r.type)):this.removeFragment(o.body)}}},t.removeParts=function(e,t){var n=this.activePartLists[t];n&&(this.activePartLists[t]=n.filter((function(t){return t.fragment.sn>=e})))},t.fragBuffered=function(e,t){var n=an(e),r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,r.buffered=!0)},t.getBufferedTimes=function(e,t,n,r){for(var i={time:[],partial:n},a=e.start,o=e.end,s=e.minEndPTS||o,l=e.maxStartPTS||a,u=0;u<r.length;u++){var c=r.start(u)-this.bufferPadding,d=r.end(u)+this.bufferPadding;if(l>=c&&s<=d){i.time.push({startPTS:Math.max(a,r.start(u)),endPTS:Math.min(o,r.end(u))});break}if(a<d&&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&&rn(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||rn(t))},t.getState=function(e){var t=an(e),n=this.fragments[t];return n?n.buffered?rn(n)?en:tn:Zt:Jt},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){var i=r?null:t,a=an(n);this.fragments[a]={body:n,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}},t.onBufferAppended=function(e,t){var n=this,r=t.frag,i=t.part,a=t.timeRanges;if("initSegment"!==r.sn){var o=r.type;if(i){var s=this.activePartLists[o];s||(this.activePartLists[o]=s=[]),s.push(i)}this.timeRanges=a,Object.keys(a).forEach((function(e){var t=a[e];n.detectEvictedFragments(e,t,o,i)}))}},t.onFragBuffered=function(e,t){this.detectPartialFragments(t)},t.hasFragment=function(e){var t=an(e);return!!this.fragments[t]},t.hasParts=function(e){var t;return!(null==(t=this.activePartLists[e])||!t.length)},t.removeFragmentsInRange=function(e,t,n,r,i){var a=this;r&&!this.hasGaps||Object.keys(this.fragments).forEach((function(o){var s=a.fragments[o];if(s){var l=s.body;l.type!==n||r&&!l.gap||l.start<t&&l.end>e&&(s.buffered||i)&&a.removeFragment(l)}}))},t.removeFragment=function(e){var t=an(e);e.stats.loaded=0,e.clearElementaryStreamInfo();var n=this.activePartLists[e.type];if(n){var r=e.sn;this.activePartLists[e.type]=n.filter((function(e){return e.fragment.sn!==r}))}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.activePartLists=Object.create(null),this.hasGaps=!1},e}();function rn(e){var t,n,r;return e.buffered&&(e.body.gap||(null==(t=e.range.video)?void 0:t.partial)||(null==(n=e.range.audio)?void 0:n.partial)||(null==(r=e.range.audiovideo)?void 0:r.partial))}function an(e){return e.type+"_"+e.level+"_"+e.urlId+"_"+e.sn}var on=Math.pow(2,17),sn=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,i=e.url;if(!i)return Promise.reject(new cn({type:E.NETWORK_ERROR,details:k.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error("Fragment does not have a "+(i?"part list":"url")),networkDetails:null}));this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,u){if(n.loader&&n.loader.destroy(),e.gap){if(e.tagList.some((function(e){return"GAP"===e[0]})))return void u(un(e));e.gap=!1}var c=n.loader=e.loader=o?new o(a):new s(a),d=ln(e),p=jt(a.fragLoadPolicy.default),h={loadPolicy:p,timeout:p.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:"initSegment"===e.sn?1/0:on};e.stats=c.stats,c.load(d,h,{onSuccess:function(t,r,i,a){n.resetLoader(e,c);var o=t.data;i.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(o.slice(0,16)),o=o.slice(16)),l({frag:e,part:null,payload:o,networkDetails:a})},onError:function(t,a,o,s){n.resetLoader(e,c),u(new cn({type:E.NETWORK_ERROR,details:k.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:r({url:i,data:void 0},t),error:new Error("HTTP Error "+t.code+" "+t.text),networkDetails:o,stats:s}))},onAbort:function(t,r,i){n.resetLoader(e,c),u(new cn({type:E.NETWORK_ERROR,details:k.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:i,stats:t}))},onTimeout:function(t,r,i){n.resetLoader(e,c),u(new cn({type:E.NETWORK_ERROR,details:k.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error("Timeout after "+h.timeout+"ms"),networkDetails:i,stats:t}))},onProgress:function(n,r,i,a){t&&t({frag:e,part:null,payload:i,networkDetails:a})}})}))},t.loadPart=function(e,t,n){var i=this;this.abort();var a=this.config,o=a.fLoader,s=a.loader;return new Promise((function(l,u){if(i.loader&&i.loader.destroy(),e.gap||t.gap)u(un(e,t));else{var c=i.loader=e.loader=o?new o(a):new s(a),d=ln(e,t),p=jt(a.fragLoadPolicy.default),h={loadPolicy:p,timeout:p.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:on};t.stats=c.stats,c.load(d,h,{onSuccess:function(r,a,o,s){i.resetLoader(e,c),i.updateStatsFromPart(e,t);var u={frag:e,part:t,payload:r.data,networkDetails:s};n(u),l(u)},onError:function(n,a,o,s){i.resetLoader(e,c),u(new cn({type:E.NETWORK_ERROR,details:k.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:r({url:d.url,data:void 0},n),error:new Error("HTTP Error "+n.code+" "+n.text),networkDetails:o,stats:s}))},onAbort:function(n,r,a){e.stats.aborted=t.stats.aborted,i.resetLoader(e,c),u(new cn({type:E.NETWORK_ERROR,details:k.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:a,stats:n}))},onTimeout:function(n,r,a){i.resetLoader(e,c),u(new cn({type:E.NETWORK_ERROR,details:k.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error("Timeout after "+h.timeout+"ms"),networkDetails:a,stats:n}))}})}}))},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 ln(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,a=n.byteRangeEndOffset;if(b(i)&&b(a)){var o,s=i,l=a;if("initSegment"===e.sn&&"AES-128"===(null==(o=e.decryptdata)?void 0:o.method)){var u=a-i;u%16&&(l=a+(16-u%16)),0!==i&&(r.resetIV=!0,s=i-16)}r.rangeStart=s,r.rangeEnd=l}return r}function un(e,t){var n=new Error("GAP "+(e.gap?"tag":"attribute")+" found"),r={type:E.MEDIA_ERROR,details:k.FRAG_GAP,fatal:!1,frag:e,error:n,networkDetails:null};return t&&(r.part=t),(t||e).stats.aborted=!0,new cn(r)}var cn=function(e){function t(t){var n;return(n=e.call(this,t.error.message)||this).data=void 0,n.data=t,n}return l(t,e),t}(h(Error)),dn=function(){function e(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}var t=e.prototype;return t.abort=function(e){for(var t in this.keyUriToKeyInfo){var n=this.keyUriToKeyInfo[t].loader;if(n){if(e&&e!==n.context.frag.type)return;n.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,i){return void 0===t&&(t=k.KEY_LOAD_ERROR),new cn({type:E.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})},t.loadClear=function(e,t){var n=this;if(this.emeController&&this.config.emeEnabled)for(var r=e.sn,i=e.cc,a=function(){var e=t[o];if(i<=e.cc&&("initSegment"===r||"initSegment"===e.sn||r<e.sn))return n.emeController.selectKeySystemFormat(e).then((function(t){e.setKeyFormat(t)})),"break"},o=0;o<t.length&&"break"!==a();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=new Error(t?"Expected frag.decryptdata to be defined after setting format "+t:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,k.KEY_LOAD_ERROR,a))}var o=i.uri;if(!o)return Promise.reject(this.createKeyLoadError(e,k.KEY_LOAD_ERROR,new Error('Invalid key URI: "'+o+'"')));var s,l=this.keyUriToKeyInfo[o];if(null!=(n=l)&&n.decryptdata.key)return i.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if(null!=(r=l)&&r.keyLoadPromise)switch(null==(s=l.mediaKeySessionContext)?void 0:s.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then((function(t){return i.key=t.keyInfo.decryptdata.key,{frag:e,keyInfo:l}}))}switch(l=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(l,e):this.loadKeyEME(l,e);case"AES-128":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,k.KEY_LOAD_ERROR,new Error('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,i=this.config,a=new(0,i.loader)(i);return t.keyLoader=e.loader=a,e.keyLoadPromise=new Promise((function(o,s){var l={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},u=i.keyLoadPolicy.default,c={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},d={onSuccess:function(e,t,r,i){var a=r.frag,l=r.keyInfo,u=r.url;if(!a.decryptdata||l!==n.keyUriToKeyInfo[u])return s(n.createKeyLoadError(a,k.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),i));l.decryptdata.key=a.decryptdata.key=new Uint8Array(e.data),a.keyLoader=null,l.loader=null,o({frag:a,keyInfo:l})},onError:function(e,i,a,o){n.resetLoader(i),s(n.createKeyLoadError(t,k.KEY_LOAD_ERROR,new Error("HTTP Error "+e.code+" loading key "+e.text),a,r({url:l.url,data:void 0},e)))},onTimeout:function(e,r,i){n.resetLoader(r),s(n.createKeyLoadError(t,k.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),i))},onAbort:function(e,r,i){n.resetLoader(r),s(n.createKeyLoadError(t,k.INTERNAL_ABORTED,new Error("key loading aborted"),i))}};a.load(l,c,d)}))},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}(),pn=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._tickCallCount=0,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}(),hn={length:0,start:function(){return 0},end:function(){return 0}},fn=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,d=0;d<r.length;d++){var p=r[d].start,h=r[d].end;if(t+n>=p&&t<h)u=p,l=(c=h)-t;else if(t+n<p){s=p;break}}return{len:l,start:u||0,end:c||0,nextStart:s}},e.getBuffered=function(e){try{return e.buffered}catch(e){return x.log("failed to get media.buffered",e),hn}},e}(),gn=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 yn(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 vn(e,t){if(e){var n=e.start+t;e.start=e.startPTS=n,e.endPTS=n+e.duration}}function mn(e,t){for(var n=t.fragments,r=0,i=n.length;r<i;r++)vn(n[r],e);t.fragmentHint&&vn(t.fragmentHint,e),t.alignedSliding=!0}function bn(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=yn(n,i.cc)||n[Math.round(n.length/2)-1],o=i.programDateTime,s=a.programDateTime;null!==o&&null!==s&&mn((s-o)/1e3-(a.start-i.start),e)}}}var _n=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}(),En=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}(),kn=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],d=s[3],p=new Uint32Array(256),h=0,f=0,g=0;for(g=0;g<256;g++)p[g]=g<128?g<<1:g<<1^283;for(g=0;g<256;g++){var y=f^f<<1^f<<2^f<<3^f<<4;y=y>>>8^255&y^99,e[h]=y,t[y]=h;var v=p[h],m=p[v],b=p[m],_=257*p[y]^16843008*y;r[h]=_<<24|_>>>8,i[h]=_<<16|_>>>16,a[h]=_<<8|_>>>24,o[h]=_,_=16843009*b^65537*m^257*v^16843008*h,l[y]=_<<24|_>>>8,u[y]=_<<16|_>>>16,c[y]=_<<8|_>>>24,d[y]=_,h?(h=v^p[p[p[b^v]]],f^=p[p[f]]):h=f=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),d=this.invKeySchedule=new Uint32Array(u),p=this.sBox,h=this.rcon,f=this.invSubMix,g=f[0],y=f[1],v=f[2],m=f[3];for(a=0;a<u;a++)a<i?s=c[a]=t[a]:(l=s,a%i==0?(l=p[(l=l<<8|l>>>24)>>>24]<<24|p[l>>>16&255]<<16|p[l>>>8&255]<<8|p[255&l],l^=h[a/i|0]<<24):i>6&&a%i==4&&(l=p[l>>>24]<<24|p[l>>>16&255]<<16|p[l>>>8&255]<<8|p[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],d[o]=o<4||a<=4?l:g[p[l>>>24]]^y[p[l>>>16&255]]^v[p[l>>>8&255]]^m[p[255&l]],d[o]=d[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,d,p,h,f,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(d=R(P[t]),p=R(P[t+1]),h=R(P[t+2]),f=R(P[t+3]),s=d^m[0],l=f^m[1],u=h^m[2],c=p^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=d,C=p,x=h,I=f,t+=4}return D.buffer},e}(),Tn=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,a=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?(i=(r=(n=a).byteLength)&&new DataView(n.buffer).getUint8(r-1))?ee(n,0,r-i):n:a},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,a=this.remainderData;this.logOnce("JS AES decrypt"),a&&(e=Pe(a,e),this.remainderData=null);var o=this.getValidChunk(e);if(!o.length)return null;r&&(n=r);var s=this.softwareDecrypter;s||(s=this.softwareDecrypter=new kn),s.expandKey(t);var l=i;return this.currentResult=s.decrypt(o.buffer,0,n),this.currentIV=ee(o,-16).buffer,l||null},t.webCryptoDecrypt=function(e,t,n){var r=this,i=this.subtle;return this.key===t&&this.fastAesKey||(this.key=t,this.fastAesKey=new En(i,t)),this.fastAesKey.expandKey().then((function(t){return i?(r.logOnce("WebCrypto AES decrypt"),new _n(i,new Uint8Array(n)).decrypt(e.buffer,t)):Promise.reject(new Error("web crypto not initialized"))})).catch((function(i){return x.warn("[decrypter]: WebCrypto Error, disable WebCrypto API, "+i.name+": "+i.message),r.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=ee(e,0,n),this.remainderData=ee(e,n)),t},t.logOnce=function(e){this.logEnabled&&(x.log("[decrypter]: "+e),this.logEnabled=!1)},e}(),An="STOPPED",wn="IDLE",Sn="KEY_LOADING",Cn="FRAG_LOADING",xn="FRAG_LOADING_WAITING_RETRY",In="WAITING_TRACK",Pn="PARSING",Dn="PARSED",Rn="ENDED",Ln="ERROR",On="WAITING_INIT_PTS",Mn="WAITING_LEVEL",Nn=function(e){function t(t,n,r,i,a){var o;return(o=e.call(this)||this).hls=void 0,o.fragPrevious=null,o.fragCurrent=null,o.fragmentTracker=void 0,o.transmuxer=null,o._state=An,o.playlistType=void 0,o.media=null,o.mediaBuffer=null,o.config=void 0,o.bitrateTest=!1,o.lastCurrentTime=0,o.nextLoadPosition=0,o.startPosition=0,o.startTimeOffset=null,o.loadedmetadata=!1,o.retryDate=0,o.levels=null,o.fragmentLoader=void 0,o.keyLoader=void 0,o.levelLastLoaded=null,o.startFragRequested=!1,o.decrypter=void 0,o.initPTS=[],o.onvseeking=null,o.onvended=null,o.logPrefix="",o.log=void 0,o.warn=void 0,o.playlistType=a,o.logPrefix=i,o.log=x.log.bind(x,i+":"),o.warn=x.warn.bind(x,i+":"),o.hls=t,o.fragmentLoader=new sn(t.config),o.keyLoader=r,o.fragmentTracker=n,o.config=t.config,o.decrypter=new Tn(t.config),t.on(_.MANIFEST_LOADED,o.onManifestLoaded,function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(o)),o}l(t,e);var n=t.prototype;return n.doTick=function(){this.onTickEnd()},n.onTickEnd=function(){},n.startLoad=function(e){},n.stopLoad=function(){this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);var e=this.fragCurrent;null!=e&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=An},n._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 fn.isBuffered(this.media,r.start+r.duration/2)}var i=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)},n.getLevelDetails=function(){var e;if(this.levels&&null!==this.levelLastLoaded)return null==(e=this.levels[this.levelLastLoaded])?void 0:e.details},n.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===An&&this.startLoad(r.startPosition)},n.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()},n.onMediaSeeking=function(){var e=this.config,t=this.fragCurrent,n=this.media,r=this.mediaBuffer,i=this.state,a=n?n.currentTime:0,o=fn.bufferInfo(r||n,a,e.maxBufferHole);if(this.log("media seeking to "+(b(a)?a.toFixed(3):a)+", state: "+i),this.state===Rn)this.resetLoadingState();else if(t){var s=e.maxFragLookUpTolerance,l=t.start-s,u=t.start+t.duration+s;if(!o.len||u<o.start||l>o.end){var c=a>u;(a<l||c)&&(c&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}n&&(this.fragmentTracker.removeFragmentsInRange(a,1/0,this.playlistType,!0),this.lastCurrentTime=a),this.loadedmetadata||o.len||(this.nextLoadPosition=this.startPosition=a),this.tickImmediate()},n.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},n.onManifestLoaded=function(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]},n.onHandlerDestroying=function(){this.stopLoad(),e.prototype.onHandlerDestroying.call(this)},n.onHandlerDestroyed=function(){this.state=An,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)},n.loadFragment=function(e,t,n){this._loadFragForPlayback(e,t,n)},n._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){var n=r.state;r.fragContextChanged(e)?(n===Cn||!r.fragCurrent&&n===Pn)&&(r.fragmentTracker.removeFragment(e),r.state=wn):("payload"in t&&(r.log("Loaded fragment "+e.sn+" of level "+e.level),r.hls.trigger(_.FRAG_LOADED,t)),r._handleFragmentLoadComplete(t))}})).catch((function(t){r.state!==An&&r.state!==Ln&&(r.warn(t),r.resetFragmentLoading(e))}))},n.clearTrackerIfNeeded=function(e){var t,n=this.fragmentTracker;if(n.getState(e)===Zt){var r=e.type,i=this.getFwdBufferInfo(this.mediaBuffer,r),a=Math.max(e.duration,i?i.len:this.config.maxBufferLength);this.reduceMaxBufferLength(a)&&n.removeFragment(e)}else 0===(null==(t=this.mediaBuffer)?void 0:t.buffered.length)?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===en&&n.removeFragment(e))},n.checkLiveUpdate=function(e){if(e.updated&&!e.live){var t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)},n.flushMainBuffer=function(e,t,n){if(void 0===n&&(n=null),e-t){var r={startOffset:e,endOffset:t,type:n};this.hls.trigger(_.BUFFER_FLUSHING,r)}},n._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 o=self.performance.now();return n.decrypter.decrypt(new Uint8Array(i),a.key.buffer,a.iv.buffer).catch((function(t){throw r.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_DECRYPT_ERROR,fatal:!1,error:t,reason:t.message,frag:e}),t})).then((function(n){var i=self.performance.now();return r.trigger(_.FRAG_DECRYPTED,{frag:e,payload:n,stats:{tstart:o,tdecrypt:i}}),t.payload=n,t}))}return t})).then((function(r){var i=n.fragCurrent,a=n.hls;if(!n.levels)throw new Error("init load aborted, missing levels");var o=e.stats;n.state=wn,t.fragmentError=0,e.data=new Uint8Array(r.payload),o.parsing.start=o.buffering.start=self.performance.now(),o.parsing.end=o.buffering.end=self.performance.now(),r.frag===i&&a.trigger(_.FRAG_BUFFERED,{stats:o,frag:i,part:null,id:e.type}),n.tick()})).catch((function(t){n.state!==An&&n.state!==Ln&&(n.warn(t),n.resetFragmentLoading(e))}))},n.fragContextChanged=function(e){var t=this.fragCurrent;return!e||!t||e.level!==t.level||e.sn!==t.sn||e.urlId!==t.urlId},n.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 "+(this.playlistType===ct?"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}(fn.getBuffered(o)):"(detached)")+")"),this.state=wn,o&&(!this.loadedmetadata&&e.type==ct&&o.buffered.length&&(null==(i=this.fragCurrent)?void 0:i.sn)===(null==(a=this.fragPrevious)?void 0:a.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())},n.seekToStartPos=function(){},n._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 gn(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!a);t.flush(o)}},n._handleFragmentLoadProgress=function(e){},n._doFragLoad=function(e,t,n,r){var i,a=this;void 0===n&&(n=null);var o=null==t?void 0:t.details;if(!this.levels||!o)throw new Error("frag load aborted, missing level"+(o?"":" detail")+"s");var s=null;if(!e.encrypted||null!=(i=e.decryptdata)&&i.key?!e.encrypted&&o.encryptedFragments.length&&this.keyLoader.loadClear(e,o.encryptedFragments):(this.log("Loading key for "+e.sn+" of ["+o.startSN+"-"+o.endSN+"], "+("[stream-controller]"===this.logPrefix?"level":"track")+" "+e.level),this.state=Sn,this.fragCurrent=e,s=this.keyLoader.load(e).then((function(e){if(!a.fragContextChanged(e.frag))return a.hls.trigger(_.KEY_LOADED,e),a.state===Sn&&(a.state=wn),e})),this.hls.trigger(_.KEY_LOADING,{frag:e}),null===this.fragCurrent&&(s=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))),n=Math.max(e.start,n||0),this.config.lowLatencyMode&&"initSegment"!==e.sn){var l=o.partList;if(l&&r){n>e.end&&o.fragmentHint&&(e=o.fragmentHint);var u=this.getNextPart(l,e,n);if(u>-1){var c,d=l[u];return this.log("Loading part sn: "+e.sn+" p: "+d.index+" cc: "+e.cc+" of playlist ["+o.startSN+"-"+o.endSN+"] parts [0-"+u+"-"+(l.length-1)+"] "+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),this.nextLoadPosition=d.start+d.duration,this.state=Cn,c=s?s.then((function(n){return!n||a.fragContextChanged(n.frag)?null:a.doFragPartsLoad(e,d,t,r)})).catch((function(e){return a.handleFragLoadError(e)})):this.doFragPartsLoad(e,d,t,r).catch((function(e){return a.handleFragLoadError(e)})),this.hls.trigger(_.FRAG_LOADING,{frag:e,part:d,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):c}if(!e.url||this.loadedEndOfParts(l,n))return Promise.resolve(null)}}this.log("Loading fragment "+e.sn+" cc: "+e.cc+" "+(o?"of ["+o.startSN+"-"+o.endSN+"] ":"")+("[stream-controller]"===this.logPrefix?"level":"track")+": "+e.level+", target: "+parseFloat(n.toFixed(3))),b(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Cn;var p,h=this.config.progressive;return p=h&&s?s.then((function(t){return!t||a.fragContextChanged(null==t?void 0:t.frag)?null:a.fragmentLoader.load(e,r)})).catch((function(e){return a.handleFragLoadError(e)})):Promise.all([this.fragmentLoader.load(e,h?r:void 0),s]).then((function(e){var t=e[0];return!h&&t&&r&&r(t),t})).catch((function(e){return a.handleFragLoadError(e)})),this.hls.trigger(_.FRAG_LOADING,{frag:e,targetBufferTime:n}),null===this.fragCurrent?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):p},n.doFragPartsLoad=function(e,t,n,r){var i=this;return new Promise((function(a,o){var s,l=[],u=null==(s=n.details)?void 0:s.partList;!function t(s){i.fragmentLoader.loadPart(e,s,r).then((function(r){l[s.index]=r;var o=r.part;i.hls.trigger(_.FRAG_LOADED,r);var c=Mt(n,e.sn,s.index+1)||Nt(u,e.sn,s.index+1);if(!c)return a({frag:e,part:o,partsLoaded:l});t(c)})).catch(o)}(t)}))},n.handleFragLoadError=function(e){if("data"in e){var t=e.data;e.data&&t.details===k.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(_.ERROR,t)}else this.hls.trigger(_.ERROR,{type:E.OTHER_ERROR,details:k.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null},n._handleTransmuxerFlush=function(e){var t=this.getCurrentContext(e);if(t&&this.state===Pn){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===An||this.state===Ln||(this.state=wn)},n.getCurrentContext=function(e){var t=this.levels,n=this.fragCurrent,r=e.level,i=e.sn,a=e.part;if(null==t||!t[r])return this.warn("Levels object was unset while buffering fragment "+i+" of level "+r+". The current chunk will not be buffered."),null;var o=t[r],s=a>-1?Mt(o,i,a):null,l=s?s.fragment:function(e,t,n){if(null==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)}(o,i,n);return l?(n&&n!==l&&(l.stats=n.stats),{frag:l,part:s,level:o}):null},n.bufferFragmentData=function(e,t,n,r,i){var a;if(e&&this.state===Pn){var o=e.data1,s=e.data2,l=o;if(o&&s&&(l=Pe(o,s)),null!=(a=l)&&a.length){var u={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:l};if(this.hls.trigger(_.BUFFER_APPENDING,u),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}}},n.flushBufferGap=function(e){var t=this.media;if(t)if(fn.isBuffered(t,t.currentTime)){var n=t.currentTime,r=fn.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)},n.getFwdBufferInfo=function(e,t){var n=this.getLoadPosition();return b(n)?this.getFwdBufferInfoAtPos(e,n,t):null},n.getFwdBufferInfoAtPos=function(e,t,n){var r=this.config.maxBufferHole,i=fn.bufferInfo(e,t,r);if(0===i.len&&void 0!==i.nextStart){var a=this.fragmentTracker.getBufferedFrag(t,n);if(a&&i.nextStart<a.end)return fn.bufferInfo(e,t,Math.max(i.nextStart,r))}return i},n.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)},n.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)},n.getAppendedFrag=function(e,t){var n=this.fragmentTracker.getAppendedFrag(e,ct);return n&&"fragment"in n?n.fragment:n},n.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)},n.isLoopLoading=function(e,t){var n=this.fragmentTracker.getState(e);return(n===tn||n===en&&!!e.gap)&&this.nextLoadPosition>t},n.getNextFragmentLoopLoading=function(e,t,n,r,i){var a=e.gap,o=this.getNextFragment(this.nextLoadPosition,t);if(null===o)return o;if(e=o,a&&e&&!e.gap&&n.nextStart){var s=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r);if(null!==s&&n.len+s.len>=i)return this.log('buffer full after gaps in "'+r+'" playlist starting at sn: '+e.sn),null}return e},n.mapToInitFragWhenRequired=function(e){return null==e||!e.initSegment||null!=e&&e.initSegment.data||this.bitrateTest?e:e.initSegment},n.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},n.loadedEndOfParts=function(e,t){var n=e[e.length-1];return n&&t>n.start&&n.loaded},n.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||!b(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(zt(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 a=t[i-e.startSN];n.cc===a.cc&&(r=a,this.log("Live playlist, switching playlist, load frag with next SN: "+r.sn))}r||(r=function(e,t){return Vt(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 o=this.hls.liveSyncPosition;null!==o&&(r=this.getFragmentAtPosition(o,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r},n.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=n.partList,d=!!(i.lowLatencyMode&&null!=c&&c.length&&l);if(d&&l&&!this.bitrateTest&&(o=o.concat(l),s=l.sn),r=e<t?Gt(a,o,e,e>t-u?0:u):o[o.length-1]){var p=r.sn-n.startSN,h=this.fragmentTracker.getState(r);if((h===tn||h===en&&r.gap)&&(a=r),a&&r.sn===a.sn&&(!d||c[0].fragment.sn>r.sn)&&a&&r.level===a.level){var f=o[p+1];r=r.sn<s&&this.fragmentTracker.getState(f)!==tn?f:null}}return r},n.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))}}},n.alignPlaylists=function(e,t){var n=this.levels,r=this.levelLastLoaded,i=this.fragPrevious,a=null!==r?n[r]:null,o=e.fragments.length;if(!o)return this.warn("No fragments in live playlist"),0;var s=e.fragments[0].start,l=!t,u=e.alignedSliding&&b(s);if(l||!u&&!s){!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){var r=e.fragments,i=t.fragments;if(i.length&&r.length){var a=yn(r,i[0].cc);if(a&&(!a||a.startPTS))return a;x.log("No frag in previous level to align on")}else x.log("No fragments to align")}(n.details,t);r&&b(r.start)&&(x.log("Adjusting PTS using last level due to CC increase within current level "+t.url),mn(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&&b(i)&&(x.log("Adjusting PTS using programDateTime delta "+(r-n)+"ms, sliding:"+i.toFixed(3)+" "+e.url+" "),mn(i,e))}}(n,t.details),n.alignedSliding||!t.details||n.skippedSegments||Lt(t.details,n))}(i,a,e);var c=e.fragments[0].start;return this.log("Live playlist sliding: "+c.toFixed(2)+" start-sn: "+(t?t.startSN:"na")+"->"+e.startSN+" prev-sn: "+(i?i.sn:"na")+" fragments: "+o),c}return s},n.waitForCdnTuneIn=function(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,3*e.partTarget)},n.setStartPosition=function(e,t){var n=this.startPosition;if(n<t&&(n=-1),-1===n||-1===this.lastCurrentTime){var r=null!==this.startTimeOffset,i=r?this.startTimeOffset:e.startTimeOffset;null!==i&&b(i)?(n=t+i,i<0&&(n+=e.totalduration),n=Math.min(Math.max(t,n),t+e.totalduration),this.log("Start time offset "+i+" found in "+(r?"multivariant":"media")+" 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},n.getLoadPosition=function(){var e=this.media,t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t},n.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))},n.resetFragmentLoading=function(e){this.fragCurrent&&(this.fragContextChanged(e)||this.state===xn)||(this.state=wn)},n.onFragmentOrKeyLoadError=function(e,t){if(t.chunkMeta&&!t.frag){var n=this.getCurrentContext(t.chunkMeta);n&&(t.frag=n.frag)}var r=t.frag;if(r&&r.type===e&&this.levels)if(this.fragContextChanged(r)){var i;this.warn("Frag load error must match current frag to retry "+r.url+" > "+(null==(i=this.fragCurrent)?void 0:i.url))}else{var a=t.details===k.FRAG_GAP;a&&this.fragmentTracker.fragBuffered(r,!0);var o=t.errorAction,s=o||{},l=s.action,u=s.retryCount,c=void 0===u?0:u,d=s.retryConfig;if(o&&5===l&&d){var p;this.resetStartWhenNotLoaded(null!=(p=this.levelLastLoaded)?p:r.level);var h=Bt(d,c);this.warn("Fragment "+r.sn+" of "+e+" "+r.level+" errored with "+t.details+", retrying loading "+(c+1)+"/"+d.maxNumRetry+" in "+h+"ms"),o.resolved=!0,this.retryDate=self.performance.now()+h,this.state=xn}else d&&o?(this.resetFragmentErrors(e),c<d.maxNumRetry?a||(o.resolved=!0):x.warn(t.details+" reached or exceeded max retry ("+c+")")):2===(null==o?void 0:o.action)?this.state=Mn:this.state=Ln;this.tickImmediate()}},n.reduceLengthAndFlushBuffer=function(e){if(this.state===Pn||this.state===Dn){var t=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,t),r=n&&n.len>.5;r&&this.reduceMaxBufferLength(n.len);var i=!r;return i&&this.warn("Buffer full error while media.currentTime is not buffered, flush "+t+" buffer"),e.frag&&(this.fragmentTracker.removeFragment(e.frag),this.nextLoadPosition=e.frag.start),this.resetLoadingState(),i}return!1},n.resetFragmentErrors=function(e){e===dt&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==An&&(this.state=wn)},n.afterBufferFlushed=function(e,t,n){if(e){var r=fn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Rn&&this.resetLoadingState()}},n.resetLoadingState=function(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=wn},n.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}},n.resetWhenMissingContext=function(e){var t;this.warn("The loading context changed while buffering fragment "+e.sn+" of level "+e.level+". This chunk will not be buffered."),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(null!=(t=this.levelLastLoaded)?t:e.level),this.resetLoadingState()},n.removeUnbufferedFrags=function(e){void 0===e&&(e=0),this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)},n.updateLevelTiming=function(e,t,n,r){var i,a=this,o=n.details;if(o){if(Object.keys(e.elementaryStreams).reduce((function(t,i){var s=e.elementaryStreams[i];if(s){var l=s.endPTS-s.startPTS;if(l<=0)return a.warn("Could not parse fragment "+e.sn+" "+i+" duration reliably ("+l+")"),t||!1;var u=r?0:Dt(o,e,s.startPTS,s.endPTS,s.startDTS,s.endDTS);return a.hls.trigger(_.LEVEL_PTS_UPDATED,{details:o,level:n,drift:u,type:i,frag:e,start:s.startPTS,end:s.endPTS}),!0}return t}),!1))n.fragmentError=0;else if(null===(null==(i=this.transmuxer)?void 0:i.error)){var s=new Error("Found no media in fragment "+e.sn+" of level "+e.level+" resetting transmuxer to fallback to playlist timing");if(0===n.fragmentError&&(n.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(s.message),this.hls.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_PARSING_ERROR,fatal:!1,error:s,frag:e,reason:"Found no media in msn "+e.sn+' of level "'+n.url+'"'}),!this.hls)return;this.resetTransmuxer()}this.state=Dn,this.hls.trigger(_.FRAG_PARSED,{frag:e,part:t})}else this.warn("level.details undefined")},n.resetTransmuxer=function(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)},n.recoverWorkerError=function(e){var t,n,r;"demuxerWorker"===e.event&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),this.resetStartWhenNotLoaded(null!=(t=null!=(n=this.levelLastLoaded)?n:null==(r=this.fragCurrent)?void 0:r.level)?t:0),this.resetLoadingState())},a(t,[{key:"state",get:function(){return this._state},set:function(e){var t=this._state;t!==e&&(this._state=e,this.log(t+"->"+e))}}]),t}(pn);function Un(){return self.SourceBuffer||self.WebKitSourceBuffer}function Fn(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 Bn=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=Pe(this.cachedData,e),this.cachedData=null);var n,r=ie(e,0),i=r?r.length:0,a=this._audioTrack,o=this._id3Track,s=r?function(e){for(var t=ue(e),n=0;n<t.length;n++){var r=t[n];if(se(r))return fe(r)}}(r):void 0,l=e.length;for((null===this.basePTS||0===this.frameIndex&&b(s))&&(this.basePTS=jn(s,t,this.initPTS),this.lastPTS=this.basePTS),null===this.lastPTS&&(this.lastPTS=this.basePTS),r&&r.length>0&&o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:_t,duration:Number.POSITIVE_INFINITY});i<l;){if(this.canParse(e,i)){var u=this.appendFrame(a,e,i);u?(this.frameIndex++,this.lastPTS=u.sample.pts,n=i+=u.length):i=l}else oe(e,i)?(r=ie(e,i),o.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:_t,duration:Number.POSITIVE_INFINITY}),n=i+=r.length):i++;if(i===l&&n!==l){var c=ee(e,n);this.cachedData?this.cachedData=Pe(this.cachedData,c):this.cachedData=c}}return{audioTrack:a,videoTrack:Fn(),id3Track:o,textTrack:Fn()}},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:Fn(),id3Track:this._id3Track,textTrack:Fn()}},t.destroy=function(){},e}(),jn=function(e,t,n){return b(e)?90*e:9e4*t+(n?9e4*n.baseTime/n.timescale:0)};function Hn(e,t){return 255===e[t]&&240==(246&e[t+1])}function Vn(e,t){return 1&e[t+1]?7:9}function Gn(e,t){return(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5}function Kn(e,t){return t+1<e.length&&Hn(e,t)}function zn(e,t){if(Kn(e,t)){var n=Vn(e,t);if(t+n>=e.length)return!1;var r=Gn(e,t);if(r<=n)return!1;var i=t+r;return i===e.length||Kn(e,i)}return!1}function Wn(e,t,n,r,i){if(!e.samplerate){var a=function(e,t,n,r){var i,a,o,s,l=navigator.userAgent.toLowerCase(),u=r,c=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=1+((192&t[n+2])>>>6);var d=(60&t[n+2])>>>2;if(!(d>c.length-1))return o=(1&t[n+2])<<2,o|=(192&t[n+3])>>>6,x.log("manifest codec:"+r+", ADTS type:"+i+", samplingIndex:"+d),/firefox/i.test(l)?d>=6?(i=5,s=new Array(4),a=d-3):(i=2,s=new Array(2),a=d):-1!==l.indexOf("android")?(i=2,s=new Array(2),a=d):(i=5,s=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&d>=6?a=d-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(d>=6&&1===o||/vivaldi/i.test(l))||!r&&1===o)&&(i=2,s=new Array(2)),a=d)),s[0]=i<<3,s[0]|=(14&d)>>1,s[1]|=(1&d)<<7,s[1]|=o<<3,5===i&&(s[1]|=(14&a)>>1,s[2]=(1&a)<<7,s[2]|=8,s[3]=0),{config:s,samplerate:c[d],channelCount:o,codec:"mp4a.40."+i,manifestCodec:u};e.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+d})}(t,n,r,i);if(!a)return;e.config=a.config,e.samplerate=a.samplerate,e.channelCount=a.channelCount,e.codec=a.codec,e.manifestCodec=a.manifestCodec,x.log("parsed codec:"+e.codec+", rate:"+a.samplerate+", channels:"+a.channelCount)}}function Yn(e){return 9216e4/e}function qn(e,t,n,r,i){var a,o=r+i*Yn(e.samplerate),s=function(e,t){var n=Vn(e,t);if(t+n<=e.length){var r=Gn(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,d=Math.max(0,n+c-t.length);d?(a=new Uint8Array(c-u)).set(t.subarray(n+u,t.length),0):a=t.subarray(n+u,n+c);var p={unit:a,pts:o};return d||e.samples.push(p),{sample:p,length:c,missing:d}}var h=t.length-n;return(a=new Uint8Array(h)).set(t.subarray(n,t.length),0),{sample:{unit:a,pts:o},length:h,missing:-1}}var Xn=function(e){function t(t,n){var r;return(r=e.call(this)||this).observer=void 0,r.config=void 0,r.observer=t,r.config=n,r}l(t,e);var n=t.prototype;return n.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}},t.probe=function(e){if(!e)return!1;for(var t=(ie(e,0)||[]).length,n=e.length;t<n;t++)if(zn(e,t))return x.log("ADTS sync word found !"),!0;return!1},n.canParse=function(e,t){return function(e,t){return function(e,t){return t+5<e.length}(e,t)&&Hn(e,t)&&Gn(e,t)<=e.length-t}(e,t)},n.appendFrame=function(e,t,n){Wn(e,this.observer,t,n,e.manifestCodec);var r=qn(e,t,n,this.basePTS,this.frameIndex);if(r&&0===r.missing)return r},t}(Bn),Qn=/\/emsg[-/]ID3/i,$n=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=Fn("video",1),a=this.audioTrack=Fn("audio",1),o=this.txtTrack=Fn("text",1);if(this.id3Track=Fn("id3",1),this.timeOffset=0,null!=e&&e.byteLength){var s=Ce(e);if(s.video){var l=s.video,u=l.id,c=l.timescale,d=l.codec;i.id=u,i.timescale=o.timescale=c,i.codec=d}if(s.audio){var p=s.audio,h=p.id,f=p.timescale,g=p.codec;a.id=h,a.timescale=f,a.codec=g}o.id=be.text,i.sampleDuration=0,i.duration=a.duration=r}},t.resetContiguity=function(){this.remainderData=null},e.probe=function(e){return we(e=e.length>16384?e.subarray(0,16384):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=Pe(this.remainderData,e));var a=function(e){var t={valid:null,remainder:null},n=we(e,["moof"]);if(!n)return t;if(n.length<2)return t.remainder=e,t;var r=n[n.length-1];return t.valid=ee(e,0,r.byteOffset-8),t.remainder=ee(e,r.byteOffset-8),t}(n);this.remainderData=a.remainder,r.samples=a.valid||new Uint8Array}else r.samples=n;var o=this.extractID3Track(r,t);return i.samples=De(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=De(e,t),{videoTrack:t,audioTrack:Fn(),id3Track:r,textTrack:Fn()}},t.extractID3Track=function(e,t){var n=this.id3Track;if(e.samples.length){var r=we(e.samples,["emsg"]);r&&r.forEach((function(e){var r=function(e){var t=e[0],n="",r="",i=0,a=0,o=0,s=0,l=0,u=0;if(0===t){for(;"\0"!==_e(e.subarray(u,u+1));)n+=_e(e.subarray(u,u+1)),u+=1;for(n+=_e(e.subarray(u,u+1)),u+=1;"\0"!==_e(e.subarray(u,u+1));)r+=_e(e.subarray(u,u+1)),u+=1;r+=_e(e.subarray(u,u+1)),u+=1,i=ke(e,12),a=ke(e,16),s=ke(e,20),l=ke(e,24),u=28}else if(1===t){i=ke(e,u+=4);var c=ke(e,u+=4),d=ke(e,u+=4);for(u+=4,o=Math.pow(2,32)*c+d,Number.isSafeInteger(o)||(o=Number.MAX_SAFE_INTEGER,x.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),s=ke(e,u),l=ke(e,u+=4),u+=4;"\0"!==_e(e.subarray(u,u+1));)n+=_e(e.subarray(u,u+1)),u+=1;for(n+=_e(e.subarray(u,u+1)),u+=1;"\0"!==_e(e.subarray(u,u+1));)r+=_e(e.subarray(u,u+1)),u+=1;r+=_e(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)}}(e);if(Qn.test(r.schemeIdUri)){var i=b(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 o=r.payload;n.samples.push({data:o,len:o.byteLength,dts:i,pts:i,type:Et,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}(),Jn=null,Zn=[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],er=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],tr=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],nr=[0,1,1,4];function rr(e,t,n,r,i){if(!(n+24>t.length)){var a=ir(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 ir(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*Zn[14*(3===n?3-r:3===r?3:4)+i-1],u=er[3*(3===n?0:2===n?1:2)+a],c=3===s?1:2,d=tr[n][r],p=nr[r],h=8*d*p,f=Math.floor(d*l/u+o)*p;if(null===Jn){var g=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Jn=g?parseInt(g[1]):0}return!!Jn&&Jn<=87&&2===r&&l>=224e3&&0===s&&(e[t+3]=128|e[t+3]),{sampleRate:u,channelCount:c,frameLength:f,samplesPerFrame:h}}}function ar(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}function or(e,t){return t+1<e.length&&ar(e,t)}function sr(e,t){if(t+1<e.length&&ar(e,t)){var n=ir(e,t),r=4;null!=n&&n.frameLength&&(r=n.frameLength);var i=t+r;return i===e.length||or(e,i)}return!1}var lr=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&&x.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),d=this.skipBits.bind(this),p=this.skipEG.bind(this),h=this.skipUEG.bind(this),f=this.skipScalingList.bind(this);s();var g=s();if(l(5),d(3),s(),h(),100===g||110===g||122===g||244===g||44===g||83===g||86===g||118===g||128===g){var y=u();if(3===y&&d(1),h(),h(),d(1),c())for(t=3!==y?8:12,n=0;n<t;n++)c()&&f(n<6?16:64)}h();var v=u();if(0===v)u();else if(1===v)for(d(1),p(),p(),e=u(),n=0;n<e;n++)p();h(),d(1);var m=u(),b=u(),_=l(1);0===_&&d(1),d(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}(),ur=function(){function e(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new Tn(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=Oe(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}(),cr=188,dr=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&&x.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-cr)+1,r=0;r<n;){for(var i=!1,a=-1,o=0,s=r;s<t;s+=cr){if(71!==e[s]){if(o)return-1;break}if(o++,-1===a&&0!==(a=s)&&(n=Math.min(a+18612,e.length-cr)+1),i||(i=0===hr(e,s)),i&&o>1&&(0===a&&o>2||s+cr>n))return a}r++}return-1},e.createTrack=function(e,t){return{container:"video"===e||"audio"===e?"video/mp2t":void 0,type:e,id:be[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,r,i){var a;void 0===r&&(r=!1),void 0===i&&(i=!1),r||(this.sampleAes=null);var o=this._avcTrack,s=this._audioTrack,l=this._id3Track,u=this._txtTrack,c=o.pid,d=o.pesData,p=s.pid,h=l.pid,f=s.pesData,g=l.pesData,y=null,v=this.pmtParsed,m=this._pmtId,b=t.length;if(this.remainderData&&(b=(t=Pe(this.remainderData,t)).length,this.remainderData=null),b<cr&&!i)return this.remainderData=t,{audioTrack:s,videoTrack:o,id3Track:l,textTrack:u};var T=Math.max(0,e.syncOffset(t));(b-=(b-T)%cr)<t.byteLength&&!i&&(this.remainderData=new Uint8Array(t.buffer,b,t.buffer.byteLength-b));for(var A=0,w=T;w<b;w+=cr)if(71===t[w]){var S=!!(64&t[w+1]),C=hr(t,w),I=void 0;if((48&t[w+3])>>4>1){if((I=w+5+t[w+4])===w+cr)continue}else I=w+4;switch(C){case c:S&&(d&&(a=yr(d))&&this.parseAVCPES(o,u,a,!1),d={data:[],size:0}),d&&(d.data.push(t.subarray(I,w+cr)),d.size+=w+cr-I);break;case p:if(S){if(f&&(a=yr(f)))switch(s.segmentCodec){case"aac":this.parseAACPES(s,a);break;case"mp3":this.parseMPEGPES(s,a)}f={data:[],size:0}}f&&(f.data.push(t.subarray(I,w+cr)),f.size+=w+cr-I);break;case h:S&&(g&&(a=yr(g))&&this.parseID3PES(l,a),g={data:[],size:0}),g&&(g.data.push(t.subarray(I,w+cr)),g.size+=w+cr-I);break;case 0:S&&(I+=t[I]+1),m=this._pmtId=fr(t,I);break;case m:S&&(I+=t[I]+1);var P=gr(t,I,this.typeSupported,r);(c=P.avc)>0&&(o.pid=c),(p=P.audio)>0&&(s.pid=p,s.segmentCodec=P.segmentCodec),(h=P.id3)>0&&(l.pid=h),null===y||v||(x.warn("MPEG-TS PMT found at "+w+" after unknown PID '"+y+"'. Backtracking to sync byte @"+T+" to parse all TS packets."),y=null,w=T-188),v=this.pmtParsed=!0;break;case 17:case 8191:break;default:y=C}}else A++;if(A>0){var D=new Error("Found "+A+" TS packet/s that do not start with 0x47");this.observer.emit(_.ERROR,_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_PARSING_ERROR,fatal:!1,error:D,reason:D.message})}o.pesData=d,s.pesData=f,l.pesData=g;var R={audioTrack:s,videoTrack:o,id3Track:l,textTrack:u};return i&&this.extractRemainingSamples(R),R},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=yr(o))?(this.parseAVCPES(r,a,t,!0),r.pesData=null):r.pesData=o,s&&(t=yr(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&&x.log("last AAC PES packet truncated,might overlap between fragments"),n.pesData=s;l&&(t=yr(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 ur(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&&(vr(s,e),s=this.avcSample=pr(!1,n.pts,n.dts,"")),o.forEach((function(r){var o;switch(r.type){case 1:var u=!1;i=!0;var c,d=r.data;if(l&&d.length>4){var p=new lr(d).readSliceType();2!==p&&4!==p&&7!==p&&9!==p||(u=!0)}u&&null!=(c=s)&&c.frame&&!s.key&&(vr(s,e),s=a.avcSample=null),s||(s=a.avcSample=pr(!0,n.pts,n.dts,"")),s.frame=!0,s.key=u;break;case 5:i=!0,null!=(o=s)&&o.frame&&!s.key&&(vr(s,e),s=a.avcSample=null),s||(s=a.avcSample=pr(!0,n.pts,n.dts,"")),s.key=!0,s.frame=!0;break;case 6:i=!0,Le(r.data,1,n.pts,t.samples);break;case 7:if(i=!0,l=!0,!e.sps){var h=r.data,f=new lr(h).readSPS();e.width=f.width,e.height=f.height,e.pixelRatio=f.pixelRatio,e.sps=[h],e.duration=a._duration;for(var g=h.subarray(1,4),y="avc1.",v=0;v<3;v++){var m=g[v].toString(16);m.length<2&&(m="0"+m),y+=m}e.codec=y}break;case 8:i=!0,e.pps||(e.pps=[r.data]);break;case 9:i=!1,e.audFound=!0,s&&vr(s,e),s=a.avcSample=pr(!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&&(vr(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)&&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 d={data:t.subarray(u,l-a-1),type:c};s.push(d)}else{var p=this.getLastNalUnit(e.samples);if(p&&(o&&l<=4-o&&p.state&&(p.data=p.data.subarray(0,p.data.byteLength-o)),(r=l-a-1)>0)){var h=new Uint8Array(p.data.byteLength+r);h.set(p.data,0),h.set(t.subarray(0,r),p.data.byteLength),p.data=h,p.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 f={data:t.subarray(u,i),type:c,state:a};s.push(f)}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,r,i,a=0,o=this.aacOverFlow,s=t.data;if(o){this.aacOverFlow=null;var l=o.missing,u=o.sample.unit.byteLength;if(-1===l){var c=new Uint8Array(u+s.byteLength);c.set(o.sample.unit,0),c.set(s,u),s=c}else{var d=u-l;o.sample.unit.set(s.subarray(0,l),d),e.samples.push(o.sample),a=o.missing}}for(n=a,r=s.length;n<r-1&&!Kn(s,n);n++);if(n!==a){var p,h=n<r-1;p=h?"AAC PES did not start with ADTS header,offset:"+n:"No ADTS header found in AAC PES";var f=new Error(p);if(x.warn("parsing error: "+p),this.observer.emit(_.ERROR,_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_PARSING_ERROR,fatal:!1,levelRetry:h,error:f,reason:p}),!h)return}if(Wn(e,this.observer,s,n,this.audioCodec),void 0!==t.pts)i=t.pts;else{if(!o)return void x.warn("[tsdemuxer]: AAC PES unknown PTS");var g=Yn(e.samplerate);i=o.sample.pts+g}for(var y,v=0;n<r;){if(n+=(y=qn(e,s,n,i,v)).length,y.missing){this.aacOverFlow=y;break}for(v++;n<r-1&&!Kn(s,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(or(n,a)){var s=rr(e,n,a,o,i);if(!s)break;a+=s.length,i++}else a++;else x.warn("[tsdemuxer]: MPEG PES unknown PTS")},t.parseID3PES=function(e,t){if(void 0!==t.pts){var n=s({},t,{type:this._avcTrack?Et:_t,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}else x.warn("[tsdemuxer]: ID3 PES unknown PTS")},e}();function pr(e,t,n,r){return{key:e,frame:!1,pts:t,dts:n,units:[],debug:r,length:0}}function hr(e,t){return((31&e[t+1])<<8)+e[t+2]}function fr(e,t){return(31&e[t+10])<<8|e[t+11]}function gr(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=hr(e,t);switch(e[t]){case 207:if(!r){x.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){x.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?x.log("MPEG audio found, not supported in this browser"):-1===i.audio&&(i.audio=o,i.segmentCodec="mp3");break;case 36:x.warn("Unsupported HEVC stream type found")}t+=5+((15&e[t+3])<<8|e[t+4])}return i}function yr(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&&(x.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 d=new Uint8Array(e.size),p=0,h=s.length;p<h;p++){var f=(t=s[p]).byteLength;if(c){if(c>f){c-=f;continue}t=t.subarray(c),f-=c,c=0}d.set(t,o),o+=f}return n&&(n-=r+3),{data:d,pts:i,dts:a,len:n}}return null}function vr(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&&x.log(e.pts+"/"+e.dts+":"+e.debug)}var mr=function(e){function t(){return e.apply(this,arguments)||this}l(t,e);var n=t.prototype;return n.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}},t.probe=function(e){if(!e)return!1;for(var t=(ie(e,0)||[]).length,n=e.length;t<n;t++)if(sr(e,t))return x.log("MPEG Audio sync word found !"),!0;return!1},n.canParse=function(e,t){return function(e,t){return ar(e,t)&&4<=e.length-t}(e,t)},n.appendFrame=function(e,t,n){if(null!==this.basePTS)return rr(e,t,n,this.basePTS,this.frameIndex)},t}(Bn),br=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}(),_r=Math.pow(2,32)-1,Er=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/(_r+1)),i=Math.floor(n%(_r+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/(_r+1)),i=Math.floor(n%(_r+1)),a=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,a)},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],d=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,d>>24,d>>16&255,d>>8&255,255&d])))},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,a=t.height,o=Math.floor(r/(_r+1)),s=Math.floor(r%(_r+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,o>>24,o>>16&255,o>>8&255,255&o,s>>24,s>>16&255,s>>8&255,255&s,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,a>>8&255,255&a,0,0]))},e.traf=function(t,n){var r=e.sdtp(t),i=t.id,a=Math.floor(n/(_r+1)),o=Math.floor(n%(_r+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,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o])),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,d=12+16*c,p=new Uint8Array(d);for(n+=8+d,p.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,p.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,p)},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}();function kr(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 Tr(e,t){return void 0===t&&(t=!1),kr(e,1e3,1/9e4,t)}Er.types=void 0,Er.HDLR_TYPES=void 0,Er.STTS=void 0,Er.STSC=void 0,Er.STCO=void 0,Er.STSZ=void 0,Er.VMHD=void 0,Er.SMHD=void 0,Er.STSD=void 0,Er.FTYP=void 0,Er.DINF=void 0;var Ar=null,wr=null,Sr=function(){function e(e,t,n,r){if(this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,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===Ar){var i=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Ar=i?parseInt(i[1]):0}if(null===wr){var a=navigator.userAgent.match(/Safari\/(\d+)/i);wr=a?parseInt(a[1]):0}}var t=e.prototype;return t.destroy=function(){},t.resetTimeStamp=function(e){x.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e},t.resetNextTimestamp=function(){x.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1},t.resetInitSegment=function(){x.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,Cr(e,n.pts)):r>0?e:n.pts}),e[0].pts);return t&&x.debug("PTS rollover detected"),n},t.remux=function(e,t,n,r,i,a,o,s){var l,u,c,d,p,h,f=i,g=i,y=e.pid>-1,v=t.pid>-1,m=t.samples.length,b=e.samples.length>0,_=o&&m>0||m>1;if((!y||b)&&(!v||_)||this.ISGenerated||o){this.ISGenerated||(c=this.generateIS(e,t,i,a));var E,k=this.isVideoContiguous,T=-1;if(_&&(T=function(e){for(var t=0;t<e.length;t++)if(e[t].key)return t;return-1}(t.samples),!k&&this.config.forceKeyFrameOnDiscontinuity))if(h=!0,T>0){x.warn("[mp4-remuxer]: Dropped "+T+" out of "+m+" video samples due to a missing keyframe");var A=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(T),t.dropped+=T,E=g+=(t.samples[0].pts-A)/t.inputTimeScale}else-1===T&&(x.warn("[mp4-remuxer]: No keyframe found out of "+m+" video samples"),h=!1);if(this.ISGenerated){if(b&&_){var w=this.getVideoStartPts(t.samples),S=(Cr(e.samples[0].pts,w)-w)/t.inputTimeScale;f+=Math.max(0,S),g+=Math.max(0,-S)}if(b){if(e.samplerate||(x.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),c=this.generateIS(e,t,i,a)),u=this.remuxAudio(e,f,this.isAudioContiguous,a,v||_||s===dt?g:void 0),_){var C=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(x.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),c=this.generateIS(e,t,i,a)),l=this.remuxVideo(t,g,k,C)}}else _&&(l=this.remuxVideo(t,g,k,0));l&&(l.firstKeyFrame=T,l.independent=-1!==T,l.firstKeyFramePTS=E)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(p=xr(n,i,this._initPTS,this._initDTS)),r.samples.length&&(d=Ir(r,i,this._initPTS))),{audio:u,video:l,initSegment:c,independent:h,text:d,id3:p}},t.generateIS=function(e,t,n,r){var i,a,o,s=e.samples,l=t.samples,u=this.typeSupported,c={},d=this._initPTS,p=!d||r,h="audio/mp4";if(p&&(i=a=1/0),e.config&&s.length&&(e.timescale=e.samplerate,"mp3"===e.segmentCodec&&(u.mpeg?(h="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3")),c.audio={id:"audio",container:h,codec:e.codec,initSegment:"mp3"===e.segmentCodec&&u.mpeg?new Uint8Array(0):Er.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(o=e.inputTimeScale,d&&o===d.timescale?p=!1:i=a=s[0].pts-Math.round(o*n))),t.sps&&t.pps&&l.length&&(t.timescale=t.inputTimeScale,c.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:Er.initSegment([t]),metadata:{width:t.width,height:t.height}},p))if(o=t.inputTimeScale,d&&o===d.timescale)p=!1;else{var f=this.getVideoStartPts(l),g=Math.round(o*n);a=Math.min(a,Cr(l[0].dts,f)-g),i=Math.min(i,f-g)}if(Object.keys(c).length)return this.ISGenerated=!0,p?(this._initPTS={baseTime:i,timescale:o},this._initDTS={baseTime:a,timescale:o}):i=o=void 0,{tracks:c,initPTS:i,timescale:o}},t.remuxVideo=function(e,t,n,r){var i,a,o=e.inputTimeScale,l=e.samples,u=[],c=l.length,d=this._initPTS,p=this.nextAvcDts,h=8,f=this.videoSampleDuration,g=Number.POSITIVE_INFINITY,y=Number.NEGATIVE_INFINITY,v=!1;n&&null!==p||(p=t*o-(l[0].pts-Cr(l[0].dts,l[0].pts)));for(var m=d.baseTime*o/d.timescale,b=0;b<c;b++){var T=l[b];T.pts=Cr(T.pts-m,p),T.dts=Cr(T.dts-m,p),T.dts<l[b>0?b-1:b].dts&&(v=!0)}v&&l.sort((function(e,t){var n=e.dts-t.dts,r=e.pts-t.pts;return n||r})),i=l[0].dts;var A=l[l.length-1].dts-i,w=A?Math.round(A/(c-1)):f||e.inputTimeScale/30;if(n){var S=i-p,C=S>w,I=S<-1;if((C||I)&&(C?x.warn("AVC: "+Tr(S,!0)+" ms ("+S+"dts) hole between fragments detected, filling it"):x.warn("AVC: "+Tr(-S,!0)+" ms ("+S+"dts) overlapping between fragments detected"),!I||p>=l[0].pts)){i=p;var P=l[0].pts-S;l[0].dts=i,l[0].pts=P,x.log("Video: First PTS/DTS adjusted: "+Tr(P,!0)+"/"+Tr(i,!0)+", delta: "+Tr(S,!0)+" ms")}}i=Math.max(0,i);for(var D=0,R=0,L=0;L<c;L++){for(var O=l[L],M=O.units,N=M.length,U=0,F=0;F<N;F++)U+=M[F].data.length;R+=U,D+=N,O.length=U,O.dts=Math.max(O.dts,i),g=Math.min(O.pts,g),y=Math.max(O.pts,y)}a=l[c-1].dts;var B,j=R+4*D+8;try{B=new Uint8Array(j)}catch(e){return void this.observer.emit(_.ERROR,_.ERROR,{type:E.MUX_ERROR,details:k.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:j,reason:"fail allocating video mdat "+j})}var H=new DataView(B.buffer);H.setUint32(0,j),B.set(Er.types.mdat,4);for(var V=!1,G=Number.POSITIVE_INFINITY,K=Number.POSITIVE_INFINITY,z=Number.NEGATIVE_INFINITY,W=Number.NEGATIVE_INFINITY,Y=0;Y<c;Y++){for(var q=l[Y],X=q.units,Q=0,$=0,J=X.length;$<J;$++){var Z=X[$],ee=Z.data,te=Z.data.byteLength;H.setUint32(h,te),h+=4,B.set(ee,h),h+=te,Q+=4+te}var ne=void 0;if(Y<c-1)f=l[Y+1].dts-q.dts,ne=l[Y+1].pts-q.pts;else{var re=this.config,ie=Y>0?q.dts-l[Y-1].dts:w;if(ne=Y>0?q.pts-l[Y-1].pts:w,re.stretchShortVideoTrack&&null!==this.nextAudioPts){var ae=Math.floor(re.maxBufferHole*o),oe=(r?g+r*o:this.nextAudioPts)-q.pts;oe>ae?((f=oe-ie)<0?f=ie:V=!0,x.log("[mp4-remuxer]: It is approximately "+oe/90+" ms to the next segment; using duration "+f/90+" ms for the last video frame.")):f=ie}else f=ie}var se=Math.round(q.pts-q.dts);G=Math.min(G,f),z=Math.max(z,f),K=Math.min(K,ne),W=Math.max(W,ne),u.push(new Dr(q.key,f,Q,se))}if(u.length)if(Ar){if(Ar<70){var le=u[0].flags;le.dependsOn=2,le.isNonSync=0}}else if(wr&&W-K<z-G&&w/z<.025&&0===u[0].cts){x.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");for(var ue=i,ce=0,de=u.length;ce<de;ce++){var pe=ue+u[ce].duration,he=ue+u[ce].cts;if(ce<de-1){var fe=pe+u[ce+1].cts;u[ce].duration=fe-he}else u[ce].duration=ce?u[ce-1].duration:w;u[ce].cts=0,ue=pe}}f=V||!f?w:f,this.nextAvcDts=p=a+f,this.videoSampleDuration=f,this.isVideoContiguous=!0;var ge={data1:Er.moof(e.sequenceNumber++,i,s({},e,{samples:u})),data2:B,startPTS:g/o,endPTS:(y+f)/o,startDTS:i/o,endDTS:p/o,type:"video",hasAudio:!1,hasVideo:!0,nb:u.length,dropped:e.dropped};return e.samples=[],e.dropped=0,ge},t.remuxAudio=function(e,t,n,r,i){var a=e.inputTimeScale,o=a/(e.samplerate?e.samplerate:a),l="aac"===e.segmentCodec?1024:1152,u=l*o,c=this._initPTS,d="mp3"===e.segmentCodec&&this.typeSupported.mpeg,p=[],h=void 0!==i,f=e.samples,g=d?0:8,y=this.nextAudioPts||-1,v=t*a,m=c.baseTime*a/c.timescale;if(this.isAudioContiguous=n=n||f.length&&y>0&&(r&&Math.abs(v-y)<9e3||Math.abs(Cr(f[0].pts-m,v)-y)<20*u),f.forEach((function(e){e.pts=Cr(e.pts-m,v)})),!n||y<0){if(!(f=f.filter((function(e){return e.pts>=0}))).length)return;y=0===i?0:r&&!h?Math.max(0,v):f[0].pts}if("aac"===e.segmentCodec)for(var b=this.config.maxAudioFramesDrift,T=0,A=y;T<f.length;T++){var w=f[T],S=w.pts,C=S-A,I=Math.abs(1e3*C/a);if(C<=-b*u&&h)0===T&&(x.warn("Audio frame @ "+(S/a).toFixed(3)+"s overlaps nextAudioPts by "+Math.round(1e3*C/a)+" ms."),this.nextAudioPts=y=A=S);else if(C>=b*u&&I<1e4&&h){var P=Math.round(C/u);(A=S-P*u)<0&&(P--,A+=u),0===T&&(this.nextAudioPts=y=A),x.warn("[mp4-remuxer]: Injecting "+P+" audio frame @ "+(A/a).toFixed(3)+"s due to "+Math.round(1e3*C/a)+" ms gap.");for(var D=0;D<P;D++){var R=Math.max(A,0),L=br.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);L||(x.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),L=w.unit.subarray()),f.splice(T,0,{unit:L,pts:R}),A+=u,T++}}w.pts=A,A+=u}for(var O,M=null,N=null,U=0,F=f.length;F--;)U+=f[F].unit.byteLength;for(var B=0,j=f.length;B<j;B++){var H=f[B],V=H.unit,G=H.pts;if(null!==N)p[B-1].duration=Math.round((G-N)/o);else{if(n&&"aac"===e.segmentCodec&&(G=y),M=G,!(U>0))return;U+=g;try{O=new Uint8Array(U)}catch(e){return void this.observer.emit(_.ERROR,_.ERROR,{type:E.MUX_ERROR,details:k.REMUX_ALLOC_ERROR,fatal:!1,error:e,bytes:U,reason:"fail allocating audio mdat "+U})}d||(new DataView(O.buffer).setUint32(0,U),O.set(Er.types.mdat,4))}O.set(V,g);var K=V.byteLength;g+=K,p.push(new Dr(!0,l,K,0)),N=G}var z=p.length;if(z){var W=p[p.length-1];this.nextAudioPts=y=N+o*W.duration;var Y=d?new Uint8Array(0):Er.moof(e.sequenceNumber++,M/o,s({},e,{samples:p}));e.samples=[];var q=M/a,X=y/a,Q={data1:Y,data2:O,startPTS:q,endPTS:X,startDTS:q,endDTS:X,type:"audio",hasAudio:!0,hasVideo:!1,nb:z};return this.isAudioContiguous=!0,Q}},t.remuxEmptyAudio=function(e,t,n,r){var i=e.inputTimeScale,a=i/(e.samplerate?e.samplerate:i),o=this.nextAudioPts,s=this._initDTS,l=9e4*s.baseTime/s.timescale,u=(null!==o?o:r.startDTS*i)+l,c=r.endDTS*i+l,d=1024*a,p=Math.ceil((c-u)/d),h=br.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(x.warn("[mp4-remuxer]: remux empty Audio"),h){for(var f=[],g=0;g<p;g++){var y=u+g*d;f.push({unit:h,pts:y,dts:y})}return e.samples=f,this.remuxAudio(e,t,n,!1)}x.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec")},e}();function Cr(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 xr(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=Cr(s.pts-n.baseTime*a/n.timescale,t*a)/a,s.dts=Cr(s.dts-r.baseTime*a/r.timescale,t*a)/a}var l=e.samples;return e.samples=[],{samples:l}}}function Ir(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=Cr(o.pts-n.baseTime*i/n.timescale,t*i)/i}e.samples.sort((function(e,t){return e.pts-t.pts}));var s=e.samples;return e.samples=[],{samples:s}}}var Pr,Dr=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 Rr(e)},Rr=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},Lr=function(){function e(){this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,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(function(e,t){if(!e||!t)return e;var n=t.keyId;return n&&t.isCommonEncryption&&we(e,["moov","trak"]).forEach((function(e){var t=we(e,["mdia","minf","stbl","stsd"])[0].subarray(8),r=we(t,["enca"]),i=r.length>0;i||(r=we(t,["encv"])),r.forEach((function(e){we(i?e.subarray(28):e.subarray(78),["sinf"]).forEach((function(e){var t=xe(e);if(t){var r=t.subarray(8,24);r.some((function(e){return 0!==e}))||(x.log("[eme] Patching keyId in 'enc"+(i?"a":"v")+">sinf>>tenc' box: "+ye(r)+" -> "+ye(n)),t.set(n,8))}}))}))})),e}(e,r)),this.emitInitSegment=!0},t.generateInitSegment=function(e){var t=this.audioCodec,n=this.videoCodec;if(null==e||!e.byteLength)return this.initTracks=void 0,void(this.initData=void 0);var r=this.initData=Ce(e);t||(t=Or(r.audio,M)),n||(n=Or(r.video,N));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"}:x.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i},t.remux=function(e,t,n,r,i,a){var o,s,l=this.initPTS,u=this.lastEndTime,c={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};b(u)||(u=this.lastEndTime=i||0);var d=t.samples;if(null==d||!d.length)return c;var p={initPTS:void 0,timescale:1},h=this.initData;if(null!=(o=h)&&o.length||(this.generateInitSegment(d),h=this.initData),null==(s=h)||!s.length)return x.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),c;this.emitInitSegment&&(p.tracks=this.initTracks,this.emitInitSegment=!1);var f=function(e,t){for(var n=0,r=0,i=0,a=we(e,["moof","traf"]),o=0;o<a.length;o++){var s=a[o],l=we(s,["tfhd"])[0],u=t[ke(l,4)];if(u){var c=u.default,d=ke(l,0)|(null==c?void 0:c.flags),p=null==c?void 0:c.duration;8&d&&(p=ke(l,2&d?12:8));for(var h=u.timescale||9e4,f=we(s,["trun"]),g=0;g<f.length;g++)!(n=Ie(f[g]))&&p&&(n=p*ke(f[g],4)),u.type===N?r+=n/h:u.type===M&&(i+=n/h)}}if(0===r&&0===i){for(var y=0,v=we(e,["sidx"]),m=0;m<v.length;m++){var b=Se(v[m]);null!=b&&b.references&&(y+=b.references.reduce((function(e,t){return e+t.info.duration||0}),0))}return y}return r||i}(d,h),g=function(e,t){return we(t,["moof","traf"]).reduce((function(t,n){var r=we(n,["tfdt"])[0],i=r[0],a=we(n,["tfhd"]).reduce((function(t,n){var a=ke(n,4),o=e[a];if(o){var s=ke(r,4);if(1===i){if(s===ve)return x.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),t;s*=ve+1,s+=ke(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)}(h,d),y=null===g?i:g;(function(e,t,n,r){if(null===e)return!0;var i=Math.max(r,1),a=t-e.baseTime/e.timescale;return Math.abs(a-n)>i}(l,y,i,f)||p.timescale!==l.timescale&&a)&&(p.initPTS=y-i,l&&1===l.timescale&&x.warn("Adjusting initPTS by "+(p.initPTS-l.baseTime)),this.initPTS=l={baseTime:p.initPTS,timescale:1});var v=e?y-l.baseTime/l.timescale:u,m=v+f;!function(e,t,n){we(t,["moof","traf"]).forEach((function(t){we(t,["tfhd"]).forEach((function(r){var i=ke(r,4),a=e[i];if(a){var o=a.timescale||9e4;we(t,["tfdt"]).forEach((function(e){var t=e[0],r=ke(e,4);if(0===t)r-=n*o,Ae(e,4,r=Math.max(r,0));else{r*=Math.pow(2,32),r+=ke(e,8),r-=n*o,r=Math.max(r,0);var i=Math.floor(r/(ve+1)),a=Math.floor(r%(ve+1));Ae(e,4,i),Ae(e,8,a)}}))}}))}))}(h,d,l.baseTime/l.timescale),f>0?this.lastEndTime=m:(x.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());var _=!!h.audio,E=!!h.video,k="";_&&(k+="audio"),E&&(k+="video");var T={data1:d,startPTS:v,startDTS:v,endPTS:m,endDTS:m,type:k,hasAudio:_,hasVideo:E,nb:1,dropped:0};return c.audio="audio"===T.type?T:void 0,c.video="audio"!==T.type?T:void 0,c.initSegment=p,c.id3=xr(n,i,l,l),r.samples.length&&(c.text=Ir(r,i,l)),c},e}();function Or(e,t){var n=null==e?void 0:e.codec;return n&&n.length>4?n:"hvc1"===n||"hev1"===n?"hvc1.1.6.L120.90":"av01"===n?"av01.0.04M.08":"avc1"===n||t===N?"avc1.42e01e":"mp4a.40.5"}try{Pr=self.performance.now.bind(self.performance)}catch(e){x.debug("Unable to use Performance API on this environment"),Pr="undefined"!=typeof self&&self.Date.now}var Mr=[{demux:$n,remux:Lr},{demux:dr,remux:Sr},{demux:Xn,remux:Sr},{demux:mr,remux:Sr}],Nr=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=Pr();var o=new Uint8Array(e),s=this.currentTransmuxState,l=this.transmuxConfig;r&&(this.currentTransmuxState=r);var u=r||s,c=u.contiguous,d=u.discontinuity,p=u.trackSwitch,h=u.accurateTimeOffset,f=u.timeOffset,g=u.initSegmentChange,y=l.audioCodec,v=l.videoCodec,m=l.defaultInitPts,b=l.duration,T=l.initSegmentData,A=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(A&&"AES-128"===A.method){var w=this.getDecrypter();if(!w.isSync())return this.decryptionPromise=w.webCryptoDecrypt(o,A.key.buffer,A.iv.buffer).then((function(e){var t=i.push(e,null,n);return i.decryptionPromise=null,t})),this.decryptionPromise;var S=w.softwareDecrypt(o,A.key.buffer,A.iv.buffer);if(n.part>-1&&(S=w.flush()),!S)return a.executeEnd=Pr(),Ur(n);o=new Uint8Array(S)}var C=this.needsProbing(d,p);if(C){var I=this.configureTransmuxer(o);if(I)return x.warn("[transmuxer] "+I.message),this.observer.emit(_.ERROR,_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_PARSING_ERROR,fatal:!1,error:I,reason:I.message}),a.executeEnd=Pr(),Ur(n)}(d||p||g||C)&&this.resetInitSegment(T,y,v,b,t),(d||g||C)&&this.resetInitialTimestamp(m),c||this.resetContiguity();var P=this.transmux(o,A,f,h,n),D=this.currentTransmuxState;return D.contiguous=!0,D.discontinuity=!1,D.trackSwitch=!1,a.executeEnd=Pr(),P},t.flush=function(e){var t=this,n=e.transmuxing;n.executeStart=Pr();var r=this.decrypter,i=this.currentTransmuxState,a=this.decryptionPromise;if(a)return a.then((function(){return t.flush(e)}));var o=[],s=i.timeOffset;if(r){var l=r.flush();l&&o.push(this.push(l,null,e))}var u=this.demuxer,c=this.remuxer;if(!u||!c)return n.executeEnd=Pr(),[Ur(e)];var d=u.flush(s);return Fr(d)?d.then((function(n){return t.flushRemux(o,n,e),o})):(this.flushRemux(o,d,e),o)},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;x.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=Pr()},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=Mr.length;o<s;o++)if(Mr[o].demux.probe(e)){t=Mr[o];break}if(!t)return new Error("Failed to find demuxer by probing fragment data");var l=this.demuxer,u=this.remuxer,c=t.remux,d=t.demux;u&&u instanceof c||(this.remuxer=new c(r,n,i,a)),l&&l instanceof d||(this.demuxer=new d(r,n,i),this.probe=d.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 Tn(this.config)),e},e}(),Ur=function(e){return{remuxResult:{},chunkMeta:e}};function Fr(e){return"then"in e&&e.then instanceof Function}var Br=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||null},jr=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},Hr={exports:{}};!function(e){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],d=arguments.length;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),d){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(d-1);u<d;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var p,h=c.length;for(u=0;u<h;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),d){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(p=1,l=new Array(d-1);p<d;p++)l[p-1]=arguments[p];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}(Hr);var Vr=function(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}(Hr.exports);function Gr(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&&Kr(r,a),o&&Kr(r,o),e.postMessage({event:"transmuxComplete",data:t},r),!0}function Kr(e,t){t.data1&&e.push(t.data1.buffer),t.data2&&e.push(t.data2.buffer)}function zr(e,t,n){t.reduce((function(t,n){return Gr(e,n)||t}),!1)||e.postMessage({event:"transmuxComplete",data:t[0]}),e.postMessage({event:"flush",data:n})}void 0!==n&&n&&function(e){var t=new Vr,n=function(t,n){e.postMessage({event:t,data:n})};t.on(_.FRAG_DECRYPTED,n),t.on(_.ERROR,n);e.addEventListener("message",(function(r){var i=r.data;switch(i.cmd){case"init":var a=JSON.parse(i.config);e.transmuxer=new Nr(t,i.typeSupported,a,i.vendor,i.id),C(a.debug,i.id),function(){var e=function(e){x[e]=function(t){n("workerLog",{logType:e,message:t})}};for(var t in x)e(t)}(),n("init",null);break;case"configure":e.transmuxer.configure(i.config);break;case"demux":var o=e.transmuxer.push(i.data,i.decryptdata,i.chunkMeta,i.state);Fr(o)?(e.transmuxer.async=!0,o.then((function(t){Gr(e,t)})).catch((function(e){n(_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_PARSING_ERROR,chunkMeta:i.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker push error"})}))):(e.transmuxer.async=!1,Gr(e,o));break;case"flush":var s=i.chunkMeta,l=e.transmuxer.flush(s);Fr(l)||e.transmuxer.async?(Fr(l)||(l=Promise.resolve(l)),l.then((function(t){zr(e,t,s)})).catch((function(e){n(_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_PARSING_ERROR,chunkMeta:i.chunkMeta,fatal:!1,error:e,err:e,reason:"transmuxer-worker flush error"})}))):zr(e,l,s)}}))}(self);var Wr=Ge()||{isTypeSupported:function(){return!1}},Yr=function(){function e(e,n,r,i){var a=this;this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;var o=e.config;this.hls=e,this.id=n,this.useWorker=!!o.enableWorker,this.onTransmuxComplete=r,this.onFlush=i;var s=function(e,t){(t=t||{}).frag=a.frag,t.id=a.id,e===_.ERROR&&(a.error=t.error),a.hls.trigger(e,t)};this.observer=new Vr,this.observer.on(_.FRAG_DECRYPTED,s),this.observer.on(_.ERROR,s);var l,u,c,d,p={mp4:Wr.isTypeSupported("video/mp4"),mpeg:Wr.isTypeSupported("audio/mpeg"),mp3:Wr.isTypeSupported('audio/mp4; codecs="mp3"')},h=navigator.vendor;if(!this.useWorker||"undefined"==typeof Worker||(o.workerPath,0))this.transmuxer=new Nr(this.observer,p,o,h,n);else try{o.workerPath?(x.log("loading Web Worker "+o.workerPath+' for "'+n+'"'),this.workerContext=(c=o.workerPath,d=new self.URL(c,self.location.href).href,{worker:new self.Worker(d),scriptURL:d})):(x.log('injecting Web Worker for "'+n+'"'),this.workerContext=(l=new self.Blob(["var exports={};var module={exports:exports};function define(f){f()};define.amd=true;("+t.toString()+")(true);"],{type:"text/javascript"}),u=self.URL.createObjectURL(l),{worker:new self.Worker(u),objectURL:u})),this.onwmsg=function(e){return a.onWorkerMessage(e)};var f=this.workerContext.worker;f.addEventListener("message",this.onwmsg),f.onerror=function(e){var t=new Error(e.message+"  ("+e.filename+":"+e.lineno+")");o.enableWorker=!1,x.warn('Error in "'+n+'" Web Worker, fallback to inline'),a.hls.trigger(_.ERROR,{type:E.OTHER_ERROR,details:k.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:t})},f.postMessage({cmd:"init",typeSupported:p,vendor:h,id:n,config:JSON.stringify(o)})}catch(e){x.warn('Error setting up "'+n+'" Web Worker, fallback to inline',e),this.resetWorker(),this.error=null,this.transmuxer=new Nr(this.observer,p,o,h,n)}}var n=e.prototype;return n.resetWorker=function(){if(this.workerContext){var e=this.workerContext,t=e.worker,n=e.objectURL;n&&self.URL.revokeObjectURL(n),t.removeEventListener("message",this.onwmsg),t.onerror=null,t.terminate(),this.workerContext=null}},n.destroy=function(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{var e=this.transmuxer;e&&(e.destroy(),this.transmuxer=null)}var t=this.observer;t&&t.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null},n.push=function(e,t,n,r,i,a,o,s,l,u){var c,d,p=this;l.transmuxing.start=self.performance.now();var h=this.transmuxer,f=a?a.start:i.start,g=i.decryptdata,y=this.frag,v=!(y&&i.cc===y.cc),m=!(y&&l.level===y.level),b=y?l.sn-y.sn:-1,_=this.part?l.part-this.part.index:-1,E=0===b&&l.id>1&&l.id===(null==y?void 0:y.stats.chunkCount),k=!m&&(1===b||0===b&&(1===_||E&&_<=0)),T=self.performance.now();(m||b||0===i.stats.parsing.start)&&(i.stats.parsing.start=T),!a||!_&&k||(a.stats.parsing.start=T);var A=!(y&&(null==(c=i.initSegment)?void 0:c.url)===(null==(d=y.initSegment)?void 0:d.url)),w=new jr(v,k,s,m,f,A);if(!k||v||A){x.log("[transmuxer-interface, "+i.type+"]: Starting new transmux session for sn: "+l.sn+" p: "+l.part+" level: "+l.level+" id: "+l.id+"\n        discontinuity: "+v+"\n        trackSwitch: "+m+"\n        contiguous: "+k+"\n        accurateTimeOffset: "+s+"\n        timeOffset: "+f+"\n        initSegmentChange: "+A);var S=new Br(n,r,t,o,u);this.configureTransmuxer(S)}if(this.frag=i,this.part=a,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:g,chunkMeta:l,state:w},e instanceof ArrayBuffer?[e]:[]);else if(h){var C=h.push(e,g,l,w);Fr(C)?(h.async=!0,C.then((function(e){p.handleTransmuxComplete(e)})).catch((function(e){p.transmuxerError(e,l,"transmuxer-interface push error")}))):(h.async=!1,this.handleTransmuxComplete(C))}},n.flush=function(e){var t=this;e.transmuxing.start=self.performance.now();var n=this.transmuxer;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(n){var r=n.flush(e);Fr(r)||n.async?(Fr(r)||(r=Promise.resolve(r)),r.then((function(n){t.handleFlushResult(n,e)})).catch((function(n){t.transmuxerError(n,e,"transmuxer-interface flush error")}))):this.handleFlushResult(r,e)}},n.transmuxerError=function(e,t,n){this.hls&&(this.error=e,this.hls.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_PARSING_ERROR,chunkMeta:t,fatal:!1,error:e,err:e,reason:n}))},n.handleFlushResult=function(e,t){var n=this;e.forEach((function(e){n.handleTransmuxComplete(e)})),this.onFlush(t)},n.onWorkerMessage=function(e){var t=e.data,n=this.hls;switch(t.event){case"init":var r,i=null==(r=this.workerContext)?void 0:r.objectURL;i&&self.URL.revokeObjectURL(i);break;case"transmuxComplete":this.handleTransmuxComplete(t.data);break;case"flush":this.onFlush(t.data);break;case"workerLog":x[t.data.logType]&&x[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)}},n.configureTransmuxer=function(e){var t=this.transmuxer;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)},n.handleTransmuxComplete=function(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)},e}(),qr=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,l=!this.seeking&&o;if(this.seeking=o,a===e){if(l||s)this.stalled=null;else if(!(r.paused&&!o||r.ended||0===r.playbackRate)&&fn.getBuffered(r).length){var u=fn.bufferInfo(r,a,0),c=u.len>0,d=u.nextStart||0;if(c||d){if(o){var p=u.len>2,h=!d||t&&t.start<=a||d-a>2&&!this.fragmentTracker.getPartialFragment(a);if(p||h)return;this.moved=!1}if(!this.moved&&null!==this.stalled){var f,g=Math.max(d,u.start||0)-a,y=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,v=(null==y||null==(f=y.details)?void 0:f.live)?2*y.details.targetduration:2,m=this.fragmentTracker.getPartialFragment(a);if(g>0&&(g<=v||m))return void this._trySkipBufferHole(m)}var b=self.performance.now();if(null!==i){var _=b-i;if(o||!(_>=250)||(this._reportStall(u),this.media)){var E=fn.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;x.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||e.nextStart&&e.nextStart-a<n.maxBufferHole)&&t>1e3*n.highBufferWatchdogPeriod&&(x.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}},t._reportStall=function(e){var t=this.hls,n=this.media;if(!this.stallReported&&n){this.stallReported=!0;var r=new Error("Playback stalling at @"+n.currentTime+" due to low buffer ("+JSON.stringify(e)+")");x.warn(r.message),t.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.BUFFER_STALLED_ERROR,fatal:!1,error:r,buffer:e.len})}},t._trySkipBufferHole=function(e){var t=this.config,n=this.hls,r=this.media;if(null===r)return 0;var i=r.currentTime,a=fn.bufferInfo(r,i,0),o=i<a.start?a.start:a.nextStart;if(o){var s=a.len<=t.maxBufferHole,l=a.len>0&&a.len<1&&r.readyState<3,u=o-i;if(u>0&&(s||l)){if(u>t.maxBufferHole){var c=this.fragmentTracker,d=!1;if(0===i){var p=c.getAppendedFrag(0,ct);p&&o<p.end&&(d=!0)}if(!d){var h=e||c.getAppendedFrag(i,ct);if(h){for(var f=!1,g=h.end;g<o;){var y=c.getPartialFragment(g);if(!y){f=!0;break}g+=y.duration}if(f)return 0}}}var v=Math.max(o+.05,i+.1);if(x.warn("skipping hole, adjusting currentTime from "+i+" to "+v),this.moved=!0,this.stalled=null,r.currentTime=v,e&&!e.gap){var m=new Error("fragment loaded with buffer holes, seeking from "+i+" to "+v);n.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:m,reason:m.message,frag:e})}return v}}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,o=new Error("Nudging 'currentTime' from "+i+" to "+a);x.warn(o.message),n.currentTime=a,t.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.BUFFER_NUDGE_ON_STALL,error:o,fatal:!1})}else{var s=new Error("Playhead still not moving while enough data buffered @"+i+" after "+e.nudgeMaxRetry+" nudges");x.error(s.message),t.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.BUFFER_STALLED_ERROR,error:s,fatal:!0})}}},e}(),Xr=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r,"[stream-controller]",ct)||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}l(t,e);var n=t.prototype;return n._registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(_.ERROR,this.onError,this),e.on(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this),e.on(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this)},n._unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(_.ERROR,this.onError,this),e.off(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(_.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(_.BUFFER_CREATED,this.onBufferCreated,this),e.off(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(_.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this)},n.onHandlerDestroying=function(){this._unregisterListeners(),this.onMediaDetaching()},n.startLoad=function(e){if(this.levels){var t=this.lastCurrentTime,n=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,!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=wn,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=An},n.stopLoad=function(){this._forceStartLoad=!1,e.prototype.stopLoad.call(this)},n.doTick=function(){switch(this.state){case Mn:var e,t=this.levels,n=this.level,r=null==t||null==(e=t[n])?void 0:e.details;if(r&&(!r.live||this.levelLastLoaded===this.level)){if(this.waitForCdnTuneIn(r))break;this.state=wn;break}if(this.hls.nextLoadLevel!==this.level){this.state=wn;break}break;case xn:var i,a=self.performance.now(),o=this.retryDate;(!o||a>=o||null!=(i=this.media)&&i.seeking)&&(this.resetStartWhenNotLoaded(this.level),this.state=wn)}this.state===wn&&this.doTickIdle(),this.onTickEnd()},n.onTickEnd=function(){e.prototype.onTickEnd.call(this),this.checkBuffer(),this.checkFragmentChanged()},n.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)&&null!=n&&n[a]){var o=n[a],s=this.getMainFwdBufferInfo();if(null!==s){var l=this.getLevelDetails();if(l&&this._streamEnded(s,l)){var u={};return this.altAudio&&(u.type="video"),this.hls.trigger(_.BUFFER_EOS,u),void(this.state=Rn)}e.loadLevel!==a&&-1===e.manualLevel&&this.log("Adapting to level "+a+" from level "+this.level),this.level=e.nextLoadLevel=a;var c=o.details;if(!c||this.state===Mn||c.live&&this.levelLastLoaded!==a)return this.level=a,void(this.state=Mn);var d=s.len,p=this.getMaxBufferLength(o.maxBitrate);if(!(d>=p)){this.backtrackFragment&&this.backtrackFragment.start>s.end&&(this.backtrackFragment=null);var h=this.backtrackFragment?this.backtrackFragment.start:s.end,f=this.getNextFragment(h,c);if(this.couldBacktrack&&!this.fragPrevious&&f&&"initSegment"!==f.sn&&this.fragmentTracker.getState(f)!==tn){var g,y=(null!=(g=this.backtrackFragment)?g:f).sn-c.startSN,v=c.fragments[y-1];v&&f.cc===v.cc&&(f=v,this.fragmentTracker.removeFragment(v))}else this.backtrackFragment&&s.len&&(this.backtrackFragment=null);if(f&&this.isLoopLoading(f,h)){if(!f.gap){var m=this.audioOnly&&!this.altAudio?M:N,b=(m===N?this.videoBuffer:this.mediaBuffer)||this.media;b&&this.afterBufferFlushed(b,m,ct)}f=this.getNextFragmentLoopLoading(f,c,s,ct,p)}f&&(!f.initSegment||f.initSegment.data||this.bitrateTest||(f=f.initSegment),this.loadFragment(f,o,h))}}}},n.loadFragment=function(t,n,r){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,i===Jt||i===en?"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)):this.clearTrackerIfNeeded(t)},n.getBufferedFrag=function(e){return this.fragmentTracker.getBufferedFrag(e,ct)},n.followingBufferedFrag=function(e){return e?this.getBufferedFrag(e.end+.5):null},n.immediateLevelSwitch=function(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},n.nextLevelSwitch=function(){var e=this.levels,t=this.media;if(null!=t&&t.readyState){var n,r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);var i=this.getLevelDetails();if(null!=i&&i.live){var a=this.getMainFwdBufferInfo();if(!a||a.len<2*i.targetduration)return}if(!t.paused&&e){var o=e[this.hls.nextLoadLevel],s=this.fragLastKbps;n=s&&this.fragCurrent?this.fragCurrent.duration*o.maxBitrate/(1e3*s)+1:0}else n=0;var l=this.getBufferedFrag(t.currentTime+n);if(l){var u=this.followingBufferedFrag(l);if(u){this.abortCurrentFrag();var c=u.maxStartPTS?u.maxStartPTS:u.start,d=u.duration,p=Math.max(l.end,c+Math.min(Math.max(d-this.config.maxFragLookUpTolerance,.5*d),.75*d));this.flushMainBuffer(p,Number.POSITIVE_INFINITY)}}}},n.abortCurrentFrag=function(){var e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Sn:case Cn:case xn:case Pn:case Dn:this.state=wn}this.nextLoadPosition=this.getLoadPosition()},n.flushMainBuffer=function(t,n){e.prototype.flushMainBuffer.call(this,t,n,this.altAudio?"video":null)},n.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 qr(this.config,r,this.fragmentTracker,this.hls)},n.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)},n.onMediaPlaying=function(){this.tick()},n.onMediaSeeked=function(){var e=this.media,t=e?e.currentTime:null;b(t)&&this.log("Media seeked to "+t.toFixed(3));var n=this.getMainFwdBufferInfo();null!==n&&0!==n.len?this.tick():this.warn('Main forward buffer length on "seeked" event '+(n?n.len:"empty")+")")},n.onManifestLoading=function(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(_.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=0,this.levels=this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1},n.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=Un())||null==(r=i.prototype)?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},n.onLevelLoading=function(e,t){var n=this.levels;if(n&&this.state===wn){var r=n[t.level];(!r.details||r.details.live&&this.levelLastLoaded!==t.level||this.waitForCdnTuneIn(r.details))&&(this.state=Mn)}},n.onLevelLoaded=function(e,t){var n,r=this.levels,i=t.level,a=t.details,o=a.totalduration;if(r){this.log("Level "+i+" loaded ["+a.startSN+","+a.endSN+"]"+(a.lastPartSn?"[part-"+a.lastPartSn+"-"+a.lastPartIndex+"]":"")+", cc ["+a.startCC+", "+a.endCC+"] duration:"+o);var s=r[i],l=this.fragCurrent;!l||this.state!==Cn&&this.state!==xn||l.level===t.level&&l.urlId===s.urlId||!l.loader||this.abortCurrentFrag();var u=0;if(a.live||null!=(n=s.details)&&n.live){if(this.checkLiveUpdate(a),a.deltaUpdateFailed)return;u=this.alignPlaylists(a,s.details)}if(s.details=a,this.levelLastLoaded=i,this.hls.trigger(_.LEVEL_UPDATED,{details:a,level:i}),this.state===Mn){if(this.waitForCdnTuneIn(a))return;this.state=wn}this.startFragRequested?a.live&&this.synchronizeToLiveEdge(a):this.setStartPosition(a,u),this.tick()}else this.warn("Levels were reset while loading level "+i)},n._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)return this.warn("Dropping fragment "+n.sn+" of level "+n.level+" after level details were reset"),void this.fragmentTracker.removeFragment(n);var l=o.videoCodec,u=s.PTSKnown||!s.live,c=null==(t=n.initSegment)?void 0:t.data,d=this._getAudioCodec(o),p=this.transmuxer=this.transmuxer||new Yr(this.hls,ct,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),h=r?r.index:-1,f=-1!==h,g=new gn(n.level,n.sn,n.stats.chunkCount,i.byteLength,h,f),y=this.initPTS[n.cc];p.push(i,c,d,l,n,r,s.totalduration,u,g,y)}else this.warn("Levels were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},n.onAudioTrackSwitching=function(e,t){var n=this.altAudio;if(!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r&&(this.log("Switching to main audio track, cancel main fragment load"),r.abortRequests(),this.fragmentTracker.removeFragment(r)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();var i=this.hls;n&&(i.trigger(_.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),i.trigger(_.AUDIO_TRACK_SWITCHED,t)}},n.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()},n.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},n.onFragBuffered=function(e,t){var n=t.frag,r=t.part;if(!n||n.type===ct){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===Dn&&(this.state=wn));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)}},n.onError=function(e,t){var n;if(t.fatal)this.state=Ln;else switch(t.details){case k.FRAG_GAP:case k.FRAG_PARSING_ERROR:case k.FRAG_DECRYPT_ERROR:case k.FRAG_LOAD_ERROR:case k.FRAG_LOAD_TIMEOUT:case k.KEY_LOAD_ERROR:case k.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ct,t);break;case k.LEVEL_LOAD_ERROR:case k.LEVEL_LOAD_TIMEOUT:case k.LEVEL_PARSING_ERROR:t.levelRetry||this.state!==Mn||(null==(n=t.context)?void 0:n.type)!==st||(this.state=wn);break;case k.BUFFER_FULL_ERROR:if(!t.parent||"main"!==t.parent)return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case k.INTERNAL_EXCEPTION:this.recoverWorkerError(t)}},n.checkBuffer=function(){var e=this.media,t=this.gapController;if(e&&t&&e.readyState){if(this.loadedmetadata||!fn.getBuffered(e).length){var n=this.state!==wn?this.fragCurrent:null;t.poll(this.lastCurrentTime,n)}this.lastCurrentTime=e.currentTime}},n.onFragLoadEmergencyAborted=function(){this.state=wn,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()},n.onBufferFlushed=function(e,t){var n=t.type;if(n!==M||this.audioOnly&&!this.altAudio){var r=(n===N?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,n,ct)}},n.onLevelsUpdated=function(e,t){this.levels=t.levels},n.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},n.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=fn.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}}},n._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},n._loadBitrateTestFrag=function(e,t){var n=this;e.bitrateTest=!0,this._doFragLoad(e,t).then((function(r){var i=n.hls;if(r&&!n.fragContextChanged(e)){t.fragmentError=0,n.state=wn,n.startFragRequested=!1,n.bitrateTest=!1;var a=e.stats;a.parsing.start=a.parsing.end=a.buffering.start=a.buffering.end=self.performance.now(),i.trigger(_.FRAG_LOADED,r),e.bitrateTest=!1}}))},n._handleTransmuxComplete=function(e){var t,n="main",r=this.hls,i=e.remuxResult,a=e.chunkMeta,o=this.getCurrentContext(a);if(o){var s=o.frag,l=o.part,u=o.level,c=i.video,d=i.text,p=i.id3,h=i.initSegment,f=u.details,g=this.altAudio?void 0:i.audio;if(this.fragContextChanged(s))this.fragmentTracker.removeFragment(s);else{if(this.state=Pn,h){if(null!=h&&h.tracks){var y=s.initSegment||s;this._bufferInitSegment(u,h.tracks,y,a),r.trigger(_.FRAG_PARSING_INIT_SEGMENT,{frag:y,id:n,tracks:h.tracks})}var v=h.initPTS,m=h.timescale;b(v)&&(this.initPTS[s.cc]={baseTime:v,timescale:m},r.trigger(_.INIT_PTS_FOUND,{frag:s,id:n,initPTS:v,timescale:m}))}if(c&&f&&"initSegment"!==s.sn){var E=f.fragments[s.sn-1-f.startSN],k=s.sn===f.startSN,T=!E||s.cc>E.cc;if(!1!==i.independent){var A=c.startPTS,w=c.endPTS,S=c.startDTS,C=c.endDTS;if(l)l.elementaryStreams[c.type]={startPTS:A,endPTS:w,startDTS:S,endDTS:C};else if(c.firstKeyFrame&&c.independent&&1===a.id&&!T&&(this.couldBacktrack=!0),c.dropped&&c.independent){var x=this.getMainFwdBufferInfo(),I=(x?x.end:this.getLoadPosition())+this.config.maxBufferHole,P=c.firstKeyFramePTS?c.firstKeyFramePTS:A;if(!k&&I<P-this.config.maxBufferHole&&!T)return void this.backtrack(s);T&&(s.gap=!0),s.setElementaryStreamInfo(c.type,s.start,w,s.start,C,!0)}s.setElementaryStreamInfo(c.type,A,w,S,C),this.backtrackFragment&&(this.backtrackFragment=s),this.bufferFragmentData(c,s,l,a,k||T)}else{if(!k&&!T)return void this.backtrack(s);s.gap=!0}}if(g){var D=g.startPTS,R=g.endPTS,L=g.startDTS,O=g.endDTS;l&&(l.elementaryStreams[M]={startPTS:D,endPTS:R,startDTS:L,endDTS:O}),s.setElementaryStreamInfo(M,D,R,L,O),this.bufferFragmentData(g,s,l,a)}if(f&&null!=p&&null!=(t=p.samples)&&t.length){var N={id:n,frag:s,details:f,samples:p.samples};r.trigger(_.FRAG_PARSING_METADATA,N)}if(f&&d){var U={id:n,frag:s,details:f,samples:d.samples};r.trigger(_.FRAG_PARSING_USERDATA,U)}}}else this.resetWhenMissingContext(a)},n._bufferInitSegment=function(e,t,n,r){var i=this;if(this.state===Pn){this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;var a=t.audio,o=t.video,s=t.audiovideo;if(a){var l=e.audioCodec,u=navigator.userAgent.toLowerCase();this.audioCodecSwitch&&(l&&(l=-1!==l.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),1!==a.metadata.channelCount&&-1===u.indexOf("firefox")&&(l="mp4a.40.5")),-1!==u.indexOf("android")&&"audio/mpeg"!==a.container&&(l="mp4a.40.2",this.log("Android: force audio codec to "+l)),e.audioCodec&&e.audioCodec!==l&&this.log('Swapping manifest audio codec "'+e.audioCodec+'" for "'+l+'"'),a.levelCodec=l,a.id="main",this.log("Init audio buffer, container:"+a.container+", codecs[selected/level/parsed]=["+(l||"")+"/"+(e.audioCodec||"")+"/"+a.codec+"]")}o&&(o.levelCodec=e.videoCodec,o.id="main",this.log("Init video buffer, container:"+o.container+", codecs[level/parsed]=["+(e.videoCodec||"")+"/"+o.codec+"]")),s&&this.log("Init audiovideo buffer, container:"+s.container+", codecs[level/parsed]=["+(e.attrs.CODECS||"")+"/"+s.codec+"]"),this.hls.trigger(_.BUFFER_CODECS,t),Object.keys(t).forEach((function(e){var a=t[e].initSegment;null!=a&&a.byteLength&&i.hls.trigger(_.BUFFER_APPENDING,{type:e,data:a,frag:n,part:null,chunkMeta:r,parent:n.type})})),this.tick()}},n.getMainFwdBufferInfo=function(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,ct)},n.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=wn},n.checkFragmentChanged=function(){var e=this.media,t=null;if(e&&e.readyState>1&&!1===e.seeking){var n=e.currentTime;if(fn.isBuffered(e,n)?t=this.getAppendedFrag(n):fn.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(_.FRAG_CHANGED,{frag:t}),r&&r.level===i||this.hls.trigger(_.LEVEL_SWITCHED,{level:i}))}}},a(t,[{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&&b(t)&&b(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}}]),t}(Nn),Qr=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}(),$r=function(){function e(e,t,n,r){void 0===r&&(r=100),this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Qr(e),this.fast_=new Qr(t),this.defaultTTFB_=r,this.ttfb_=new Qr(e)}var t=e.prototype;return t.update=function(e,t){var n=this.slow_,r=this.fast_,i=this.ttfb_;n.halfLife!==e&&(this.slow_=new Qr(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new Qr(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new Qr(e,i.getEstimate(),i.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.sampleTTFB=function(e){var t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))},t.canEstimate=function(){return this.fast_.getTotalWeight()>=this.minWeight_},t.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},t.getEstimateTTFB=function(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_},t.destroy=function(){},e}(),Jr=function(){function e(e){this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=0,this._nextAutoLevel=-1,this.timer=-1,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 $r(t.abrEwmaSlowVoD,t.abrEwmaFastVoD,t.abrEwmaDefaultEstimate),this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(_.FRAG_LOADING,this.onFragLoading,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this),e.on(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this)},t.unregisterListeners=function(){var e=this.hls;e.off(_.FRAG_LOADING,this.onFragLoading,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this),e.off(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this)},t.destroy=function(){this.unregisterListeners(),this.clearTimer(),this.hls=this.onCheck=null,this.fragCurrent=this.partCurrent=null},t.onFragLoading=function(e,t){var n,r=t.frag;this.ignoreFragment(r)||(this.fragCurrent=r,this.partCurrent=null!=(n=t.part)?n:null,this.clearTimer(),this.timer=self.setInterval(this.onCheck,100))},t.onLevelSwitching=function(e,t){this.clearTimer()},t.getTimeToLoadFrag=function(e,t,n,r){return e+n/t+(r?this.lastLevelLoadSec:0)},t.onLevelLoaded=function(e,t){var n=this.hls.config,r=t.stats,i=r.total,a=r.bwEstimate;b(i)&&b(a)&&(this.lastLevelLoadSec=8*i/a),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD)},t._abandonRulesCheck=function(){var e=this.fragCurrent,t=this.partCurrent,n=this.hls,r=n.autoLevelEnabled,i=n.media;if(e&&i){var a=performance.now(),o=t?t.stats:e.stats,s=t?t.duration:e.duration,l=a-o.loading.start;if(o.aborted||o.loaded&&o.loaded===o.total||0===e.level)return this.clearTimer(),void(this._nextAutoLevel=-1);if(r&&!i.paused&&i.playbackRate&&i.readyState){var u=n.mainForwardBufferInfo;if(null!==u){var c=this.bwEstimator.getEstimateTTFB(),d=Math.abs(i.playbackRate);if(!(l<=Math.max(c,s/(2*d)*1e3))){var p=u.len/d;if(!(p>=2*s/d)){var h=o.loading.first?o.loading.first-o.loading.start:-1,f=o.loaded&&h>-1,g=this.bwEstimator.getEstimate(),y=n.levels,v=n.minAutoLevel,m=y[e.level],E=o.total||Math.max(o.loaded,Math.round(s*m.maxBitrate/8)),k=l-h;k<1&&f&&(k=Math.min(l,8*o.loaded/g));var T=f?1e3*o.loaded/k:0,A=T?(E-o.loaded)/T:8*E/g+c/1e3;if(!(A<=p)){var w,S=T?8*T:g,C=Number.POSITIVE_INFINITY;for(w=e.level-1;w>v;w--){var I=y[w].maxBitrate;if((C=this.getTimeToLoadFrag(c/1e3,S,s*I,!y[w].details))<p)break}C>=A||C>10*s||(n.nextLoadLevel=w,f?this.bwEstimator.sample(l-Math.min(c,h),o.loaded):this.bwEstimator.sampleTTFB(l),this.clearTimer(),x.warn("[abr] Fragment "+e.sn+(t?" part "+t.index:"")+" of level "+e.level+" is loading too slowly;\n      Time to underbuffer: "+p.toFixed(3)+" s\n      Estimated load time for current fragment: "+A.toFixed(3)+" s\n      Estimated load time for down switch fragment: "+C.toFixed(3)+" s\n      TTFB estimate: "+h+"\n      Current BW estimate: "+(b(g)?(g/1024).toFixed(3):"Unknown")+" Kb/s\n      New BW estimate: "+(this.bwEstimator.getEstimate()/1024).toFixed(3)+" Kb/s\n      Aborting and switching to level "+w),e.loader&&(this.fragCurrent=this.partCurrent=null,e.abortRequests()),n.trigger(_.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,part:t,stats:o}))}}}}}}},t.onFragLoaded=function(e,t){var n=t.frag,r=t.part,i=r?r.stats:n.stats;if(n.type===ct&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(n)){if(this.clearTimer(),this.lastLoadedFragLevel=n.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var a=r?r.duration:n.duration,o=this.hls.levels[n.level],s=(o.loaded?o.loaded.bytes:0)+i.loaded,l=(o.loaded?o.loaded.duration:0)+a;o.loaded={bytes:s,duration:l},o.realBitrate=Math.round(8*s/l)}if(n.bitrateTest){var u={stats:i,frag:n,part:r,id:n.type};this.onFragBuffered(_.FRAG_BUFFERED,u),n.bitrateTest=!1}}},t.onFragBuffered=function(e,t){var n=t.frag,r=t.part,i=null!=r&&r.stats.loaded?r.stats:n.stats;if(!i.aborted&&!this.ignoreFragment(n)){var a=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(a,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),n.bitrateTest?this.bitrateTestDelay=a/1e3:this.bitrateTestDelay=0}},t.ignoreFragment=function(e){return e.type!==ct||"initSegment"===e.sn},t.clearTimer=function(){self.clearInterval(this.timer)},t.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,l=o&&0!==o.playbackRate?Math.abs(o.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():i.abrEwmaDefaultEstimate,c=n.mainForwardBufferInfo,d=(c?c.len:0)/l,p=this.findBestLevel(u,a,r,d,i.abrBandWidthFactor,i.abrBandWidthUpFactor);if(p>=0)return p;x.trace("[abr] "+(d?"rebuffering expected":"buffer is empty")+", finding optimal quality level");var h=s?Math.min(s,i.maxStarvationDelay):i.maxStarvationDelay,f=i.abrBandWidthFactor,g=i.abrBandWidthUpFactor;if(!d){var y=this.bitrateTestDelay;y&&(h=(s?Math.min(s,i.maxLoadingDelay):i.maxLoadingDelay)-y,x.trace("[abr] bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*h)+" ms"),f=g=1)}return p=this.findBestLevel(u,a,r,d+h,f,g),Math.max(p,0)},t.findBestLevel=function(e,t,n,r,i,a){for(var o,s=this.fragCurrent,l=this.partCurrent,u=this.lastLoadedFragLevel,c=this.hls.levels,d=c[u],p=!(null==d||null==(o=d.details)||!o.live),h=null==d?void 0:d.codecSet,f=l?l.duration:s?s.duration:0,g=this.bwEstimator.getEstimateTTFB()/1e3,y=t,v=-1,m=n;m>=t;m--){var _=c[m];if(!_||h&&_.codecSet!==h)_&&(y=Math.min(m,y),v=Math.max(m,v));else{-1!==v&&x.trace("[abr] Skipped level(s) "+y+"-"+v+' with CODECS:"'+c[v].attrs.CODECS+'"; not compatible with "'+d.attrs.CODECS+'"');var E,k=_.details,T=(l?null==k?void 0:k.partTarget:null==k?void 0:k.averagetargetduration)||f;E=m<=u?i*e:a*e;var A=c[m].maxBitrate,w=this.getTimeToLoadFrag(g,E,A*T,void 0===k);if(x.trace("[abr] level:"+m+" adjustedbw-bitrate:"+Math.round(E-A)+" avgDuration:"+T.toFixed(1)+" maxFetchDuration:"+r.toFixed(1)+" fetchDuration:"+w.toFixed(1)),E>A&&(0===w||!b(w)||p&&!this.bitrateTestDelay||w<r))return m}}return-1},a(e,[{key:"nextAutoLevel",get:function(){var e=this._nextAutoLevel,t=this.bwEstimator;if(-1!==e&&!t.canEstimate())return e;var n=this.getNextABRAutoLevel();if(-1!==e){var r=this.hls.levels;if(r.length>Math.max(e,n)&&r[e].loadError<=r[n].loadError)return e}return-1!==e&&(n=Math.min(e,n)),n},set:function(e){this._nextAutoLevel=e}}]),e}(),Zr=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}(),ei=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r,"[audio-stream-controller]",dt)||this).videoBuffer=null,i.videoTrackCC=-1,i.waitingVideoCC=-1,i.bufferedTrack=null,i.switchingTrack=null,i.trackId=-1,i.waitingData=null,i.mainDetails=null,i.bufferFlushed=!1,i.cachedTrackLoadedData=null,i._registerListeners(),i}l(t,e);var n=t.prototype;return n.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null},n._registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(_.ERROR,this.onError,this),e.on(_.BUFFER_RESET,this.onBufferReset,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this),e.on(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this)},n._unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(_.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(_.ERROR,this.onError,this),e.off(_.BUFFER_RESET,this.onBufferReset,this),e.off(_.BUFFER_CREATED,this.onBufferCreated,this),e.off(_.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this)},n.onInitPtsFound=function(e,t){var n=t.frag,r=t.id,i=t.initPTS,a=t.timescale;if("main"===r){var o=n.cc;this.initPTS[n.cc]={baseTime:i,timescale:a},this.log("InitPTS for cc: "+o+" found from main: "+i),this.videoTrackCC=o,this.state===On&&this.tick()}},n.startLoad=function(e){if(!this.levels)return this.startPosition=e,void(this.state=An);var t=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),t>0&&-1===e?(this.log("Override startPosition with lastCurrentTime @"+t.toFixed(3)),e=t,this.state=wn):(this.loadedmetadata=!1,this.state=In),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},n.doTick=function(){switch(this.state){case wn:this.doTickIdle();break;case In:var t,n=this.levels,r=this.trackId,i=null==n||null==(t=n[r])?void 0:t.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=On}break;case xn:var a,o=performance.now(),s=this.retryDate;(!s||o>=s||null!=(a=this.media)&&a.seeking)&&(this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded(this.trackId),this.state=wn);break;case On:var l=this.waitingData;if(l){var u=l.frag,c=l.part,d=l.cache,p=l.complete;if(void 0!==this.initPTS[u.cc]){this.waitingData=null,this.waitingVideoCC=-1,this.state=Cn;var h={frag:u,part:c,payload:d.flush(),networkDetails:null};this._handleFragmentLoadProgress(h),p&&e.prototype._handleFragmentLoadComplete.call(this,h)}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 f=this.getLoadPosition(),g=fn.bufferInfo(this.mediaBuffer,f,this.config.maxBufferHole);Kt(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=wn}this.onTickEnd()},n.clearWaitingFragment=function(){var e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=wn)},n.resetLoadingState=function(){this.clearWaitingFragment(),e.prototype.resetLoadingState.call(this)},n.onTickEnd=function(){var e=this.media;null!=e&&e.readyState&&(this.lastCurrentTime=e.currentTime)},n.doTickIdle=function(){var e=this.hls,t=this.levels,n=this.media,r=this.trackId,i=e.config;if(null!=t&&t[r]&&(n||!this.startFragRequested&&i.startFragPrefetch)){var a=t[r],o=a.details;if(!o||o.live&&this.levelLastLoaded!==r||this.waitForCdnTuneIn(o))this.state=In;else{var s=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&s&&(this.bufferFlushed=!1,this.afterBufferFlushed(s,M,dt));var l=this.getFwdBufferInfo(s,dt);if(null!==l){var u=this.bufferedTrack,c=this.switchingTrack;if(!c&&this._streamEnded(l,o))return e.trigger(_.BUFFER_EOS,{type:"audio"}),void(this.state=Rn);var d=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,ct),p=l.len,h=this.getMaxBufferLength(null==d?void 0:d.len);if(!(p>=h)||c){var f=o.fragments[0].start,g=l.end;if(c&&n){var y=this.getLoadPosition();u&&c.attrs!==u.attrs&&(g=y),o.PTSKnown&&y<f&&(l.end>f||l.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=f+.05)}var v=this.getNextFragment(g,o),m=!1;if(v&&this.isLoopLoading(v,g)&&(m=!!v.gap,v=this.getNextFragmentLoopLoading(v,o,l,ct,h)),v){var b=d&&v.start>d.end+o.targetduration;if(b||(null==d||!d.len)&&l.len){var E=this.getAppendedFrag(v.start,ct);if(null===E)return;if(m||(m=!!E.gap||!!b&&0===d.len),b&&!m||m&&l.nextStart&&l.nextStart<E.end)return}this.loadFragment(v,a,g)}else this.bufferFlushed=!0}}}}},n.getMaxBufferLength=function(t){var n=e.prototype.getMaxBufferLength.call(this);return t?Math.min(Math.max(n,t),this.config.maxMaxBufferLength):n},n.onMediaDetaching=function(){this.videoBuffer=null,e.prototype.onMediaDetaching.call(this)},n.onAudioTracksUpdated=function(e,t){var n=t.audioTracks;this.resetTransmuxer(),this.levels=n.map((function(e){return new It(e)}))},n.onAudioTrackSwitching=function(e,t){var n=!!t.url;this.trackId=t.id;var r=this.fragCurrent;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?this.setInterval(100):this.resetTransmuxer(),n?(this.switchingTrack=t,this.state=wn):(this.switchingTrack=null,this.bufferedTrack=t,this.state=An),this.tick()},n.onManifestLoading=function(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1},n.onLevelLoaded=function(e,t){this.mainDetails=t.details,null!==this.cachedTrackLoadedData&&(this.hls.trigger(_.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)},n.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+"]"+(i.lastPartSn?"[part-"+i.lastPartSn+"-"+i.lastPartIndex+"]":"")+",duration:"+i.totalduration);var o=r[a],s=0;if(i.live||null!=(n=o.details)&&n.live){this.checkLiveUpdate(i);var l=this.mainDetails;if(i.deltaUpdateFailed||!l)return;!o.details&&i.hasProgramDateTime&&l.hasProgramDateTime?(bn(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!==In||this.waitForCdnTuneIn(i)||(this.state=wn),this.tick()}else this.warn("Audio tracks were reset while loading level "+a)}else this.cachedTrackLoadedData=t},n._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];if(l){var u=l.details;if(!u)return this.warn("Audio track details undefined on fragment load progress"),void this.removeUnbufferedFrags(n.start);var c=a.defaultAudioCodec||l.audioCodec||"mp4a.40.2",d=this.transmuxer;d||(d=this.transmuxer=new Yr(this.hls,dt,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));var p=this.initPTS[n.cc],h=null==(t=n.initSegment)?void 0:t.data;if(void 0!==p){var f=r?r.index:-1,g=-1!==f,y=new gn(n.level,n.sn,n.stats.chunkCount,i.byteLength,f,g);d.push(i,h,c,"",n,r,u.totalduration,!1,y,p)}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 Zr,complete:!1}).cache.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=On}else this.warn("Audio track is undefined on fragment load progress")}else this.warn("Audio tracks were reset while fragment load was in progress. Fragment "+n.sn+" of level "+n.level+" will not be buffered")},n._handleFragmentLoadComplete=function(t){this.waitingData?this.waitingData.complete=!0:e.prototype._handleFragmentLoadComplete.call(this,t)},n.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},n.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)},n.onFragBuffered=function(e,t){var n=t.frag,i=t.part;if(n.type===dt)if(this.fragContextChanged(n))this.warn("Fragment "+n.sn+(i?" p: "+i.index:"")+" of level "+n.level+" finished buffering, but was aborted. state: "+this.state+", audioSwitch: "+(this.switchingTrack?this.switchingTrack.name:"false"));else{if("initSegment"!==n.sn){this.fragPrevious=n;var a=this.switchingTrack;a&&(this.bufferedTrack=a,this.switchingTrack=null,this.hls.trigger(_.AUDIO_TRACK_SWITCHED,r({},a)))}this.fragBufferedComplete(n,i)}else if(!this.loadedmetadata&&n.type===ct){var o=this.videoBuffer||this.media;o&&fn.getBuffered(o).length&&(this.loadedmetadata=!0)}},n.onError=function(t,n){var r;if(n.fatal)this.state=Ln;else switch(n.details){case k.FRAG_GAP:case k.FRAG_PARSING_ERROR:case k.FRAG_DECRYPT_ERROR:case k.FRAG_LOAD_ERROR:case k.FRAG_LOAD_TIMEOUT:case k.KEY_LOAD_ERROR:case k.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(dt,n);break;case k.AUDIO_TRACK_LOAD_ERROR:case k.AUDIO_TRACK_LOAD_TIMEOUT:case k.LEVEL_PARSING_ERROR:n.levelRetry||this.state!==In||(null==(r=n.context)?void 0:r.type)!==lt||(this.state=wn);break;case k.BUFFER_FULL_ERROR:if(!n.parent||"audio"!==n.parent)return;this.reduceLengthAndFlushBuffer(n)&&(this.bufferedTrack=null,e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio"));break;case k.INTERNAL_EXCEPTION:this.recoverWorkerError(n)}},n.onBufferFlushed=function(e,t){t.type===M&&(this.bufferFlushed=!0,this.state===Rn&&(this.state=wn))},n._handleTransmuxComplete=function(e){var t,n="audio",r=this.hls,i=e.remuxResult,a=e.chunkMeta,o=this.getCurrentContext(a);if(o){var l=o.frag,u=o.part,c=o.level.details,d=i.audio,p=i.text,h=i.id3,f=i.initSegment;if(!this.fragContextChanged(l)&&c){if(this.state=Pn,this.switchingTrack&&d&&this.completeAudioSwitch(this.switchingTrack),null!=f&&f.tracks){var g=l.initSegment||l;this._bufferInitSegment(f.tracks,g,a),r.trigger(_.FRAG_PARSING_INIT_SEGMENT,{frag:g,id:n,tracks:f.tracks})}if(d){var y=d.startPTS,v=d.endPTS,m=d.startDTS,b=d.endDTS;u&&(u.elementaryStreams[M]={startPTS:y,endPTS:v,startDTS:m,endDTS:b}),l.setElementaryStreamInfo(M,y,v,m,b),this.bufferFragmentData(d,l,u,a)}if(null!=h&&null!=(t=h.samples)&&t.length){var E=s({id:n,frag:l,details:c},h);r.trigger(_.FRAG_PARSING_METADATA,E)}if(p){var k=s({id:n,frag:l,details:c},p);r.trigger(_.FRAG_PARSING_USERDATA,k)}}else this.fragmentTracker.removeFragment(l)}else this.resetWhenMissingContext(a)},n._bufferInitSegment=function(e,t,n){if(this.state===Pn){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(_.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(_.BUFFER_APPENDING,a)}this.tick()}}},n.loadFragment=function(t,n,r){var i,a=this.fragmentTracker.getState(t);this.fragCurrent=t,this.switchingTrack||a===Jt||a===en?"initSegment"===t.sn?this._loadInitSegment(t,n):null!=(i=n.details)&&i.live&&!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=On):(this.startFragRequested=!0,e.prototype.loadFragment.call(this,t,n,r)):this.clearTrackerIfNeeded(t)},n.completeAudioSwitch=function(t){var n=this.hls,i=this.media,a=this.bufferedTrack,o=null==a?void 0:a.attrs,s=t.attrs;i&&o&&(o.CHANNELS!==s.CHANNELS||o.NAME!==s.NAME||o.LANGUAGE!==s.LANGUAGE)&&(this.log("Switching audio track : flushing all audio"),e.prototype.flushMainBuffer.call(this,0,Number.POSITIVE_INFINITY,"audio")),this.bufferedTrack=t,this.switchingTrack=null,n.trigger(_.AUDIO_TRACK_SWITCHED,r({},t))},t}(Nn),ti=function(e){function t(t){var n;return(n=e.call(this,t,"[audio-track-controller]")||this).tracks=[],n.groupId=null,n.tracksInGroup=[],n.trackId=-1,n.currentTrack=null,n.selectDefaultTrack=!0,n.registerListeners(),n}l(t,e);var n=t.prototype;return n.registerListeners=function(){var e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(_.ERROR,this.onError,this)},n.unregisterListeners=function(){var e=this.hls;e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(_.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(_.ERROR,this.onError,this)},n.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,e.prototype.destroy.call(this)},n.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0},n.onManifestParsed=function(e,t){this.tracks=t.audioTracks||[]},n.onAudioTrackLoaded=function(e,t){var n=t.id,r=t.groupId,i=t.details,a=this.tracksInGroup[n];if(a&&a.groupId===r){var o=a.details;a.details=t.details,this.log("audio-track "+n+' "'+a.name+'" lang:'+a.lang+" group:"+r+" loaded ["+i.startSN+"-"+i.endSN+"]"),n===this.trackId&&this.playlistLoaded(n,t,o)}else this.warn("Track with id:"+n+" and group:"+r+" not found in active group "+a.groupId)},n.onLevelLoading=function(e,t){this.switchLevel(t.level)},n.onLevelSwitching=function(e,t){this.switchLevel(t.level)},n.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||null;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 group:"+n),this.hls.trigger(_.AUDIO_TRACKS_UPDATED,i),this.selectInitialTrack()}else this.shouldReloadPlaylist(this.currentTrack)&&this.setAudioTrack(this.trackId)}},n.onError=function(e,t){!t.fatal&&t.context&&t.context.type===lt&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&(this.requestScheduled=-1,this.checkRetry(t))},n.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=this.currentTrack;t[this.trackId];var i=t[e],a=i.groupId,o=i.name;if(this.log("Switching to audio-track "+e+' "'+o+'" lang:'+i.lang+" group:"+a),this.trackId=e,this.currentTrack=i,this.selectDefaultTrack=!1,this.hls.trigger(_.AUDIO_TRACK_SWITCHING,r({},i)),!i.details||i.details.live){var s=this.switchParams(i.url,null==n?void 0:n.details);this.loadPlaylist(s)}}},n.selectInitialTrack=function(){var e=this.tracksInGroup,t=this.findTrackId(this.currentTrack)|this.findTrackId(null);if(-1!==t)this.setAudioTrack(t);else{var n=new Error("No track found for running audio group-ID: "+this.groupId+" track count: "+e.length);this.warn(n.message),this.hls.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:n})}},n.findTrackId=function(e){for(var t=this.tracksInGroup,n=0;n<t.length;n++){var r=t[n];if(!this.selectDefaultTrack||r.default){if(!e||void 0!==e.attrs["STABLE-RENDITION-ID"]&&e.attrs["STABLE-RENDITION-ID"]===r.attrs["STABLE-RENDITION-ID"])return r.id;if(e.name===r.name&&e.lang===r.lang)return r.id}}return-1},n.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(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 "+r+' "'+n.name+'" lang:'+n.lang+" group:"+i),this.clearTimer(),this.hls.trigger(_.AUDIO_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},a(t,[{key:"audioTracks",get:function(){return this.tracksInGroup}},{key:"audioTrack",get:function(){return this.trackId},set:function(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}}]),t}(qt);function ni(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!ri(e[n].attrs,t[n].attrs))return!1;return!0}function ri(e,t){var n=e["STABLE-RENDITION-ID"];return n?n===t["STABLE-RENDITION-ID"]:!["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED"].some((function(n){return e[n]!==t[n]}))}var ii=function(e){function t(t,n,r){var i;return(i=e.call(this,t,n,r,"[subtitle-stream-controller]",pt)||this).levels=[],i.currentTrackId=-1,i.tracksBuffered=[],i.mainDetails=null,i._registerListeners(),i}l(t,e);var n=t.prototype;return n.onHandlerDestroying=function(){this._unregisterListeners(),this.mainDetails=null},n._registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.LEVEL_LOADED,this.onLevelLoaded,this),e.on(_.ERROR,this.onError,this),e.on(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(_.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(_.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.FRAG_BUFFERED,this.onFragBuffered,this)},n._unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.LEVEL_LOADED,this.onLevelLoaded,this),e.off(_.ERROR,this.onError,this),e.off(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(_.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(_.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.FRAG_BUFFERED,this.onFragBuffered,this)},n.startLoad=function(e){this.stopLoad(),this.state=wn,this.setInterval(500),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()},n.onManifestLoading=function(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()},n.onMediaDetaching=function(){this.tracksBuffered=[],e.prototype.onMediaDetaching.call(this)},n.onLevelLoaded=function(e,t){this.mainDetails=t.details},n.onSubtitleFragProcessed=function(e,t){var n=t.frag,r=t.success;if(this.fragPrevious=n,this.state=wn,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)}}},n.onBufferFlushing=function(e,t){var n=t.startOffset,r=t.endOffset;if(0===n&&r!==Number.POSITIVE_INFINITY){var i=r-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach((function(e){for(var t=0;t<e.length;)if(e[t].end<=i)e.shift();else{if(!(e[t].start<i))break;e[t].start=i,t++}})),this.fragmentTracker.removeFragmentsInRange(n,i,pt)}},n.onFragBuffered=function(e,t){var n;this.loadedmetadata||t.frag.type!==ct||null!=(n=this.media)&&n.buffered.length&&(this.loadedmetadata=!0)},n.onError=function(e,t){var n=t.frag;(null==n?void 0:n.type)===pt&&(this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==An&&(this.state=wn))},n.onSubtitleTracksUpdated=function(e,t){var n=this,r=t.subtitleTracks;ni(this.levels,r)?this.levels=r.map((function(e){return new It(e)})):(this.tracksBuffered=[],this.levels=r.map((function(e){var t=new It(e);return n.tracksBuffered[t.id]=[],t})),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,pt),this.fragPrevious=null,this.mediaBuffer=null)},n.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()},n.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)&&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&&Ot(r,l=c.start):r.hasProgramDateTime&&u.hasProgramDateTime?(bn(r,u),l=r.fragments[0].start):c&&Ot(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===wn&&(Gt(null,r.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),s.details=void 0))}}},n._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 o=performance.now();this.decrypter.decrypt(new Uint8Array(r),i.key.buffer,i.iv.buffer).catch((function(e){throw a.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.FRAG_DECRYPT_ERROR,fatal:!1,error:e,reason:e.message,frag:n}),e})).then((function(e){var t=performance.now();a.trigger(_.FRAG_DECRYPTED,{frag:n,payload:e,stats:{tstart:o,tdecrypt:t}})})).catch((function(e){t.warn(e.name+": "+e.message),t.state=wn}))}},n.doTick=function(){if(this.media){if(this.state===wn){var e=this.currentTrackId,t=this.levels,n=t[e];if(!t.length||!n||!n.details)return;var r=this.config,i=this.getLoadPosition(),a=fn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),o=a.end,s=a.len,l=this.getFwdBufferInfo(this.media,ct),u=n.details;if(s>this.getMaxBufferLength(null==l?void 0:l.len)+u.levelTargetDuration)return;var c=u.fragments,d=c.length,p=u.edge,h=null,f=this.fragPrevious;if(o<p){var g=r.maxFragLookUpTolerance,y=o>p-g?0:g;!(h=Gt(f,c,Math.max(c[0].start,o),y))&&f&&f.start<c[0].start&&(h=c[0])}else h=c[d-1];if(!h)return;if("initSegment"!==(h=this.mapToInitFragWhenRequired(h)).sn){var v=c[h.sn-u.startSN-1];v&&v.cc===h.cc&&this.fragmentTracker.getState(v)===Jt&&(h=v)}this.fragmentTracker.getState(h)===Jt&&this.loadFragment(h,n,o)}}else this.state=wn},n.getMaxBufferLength=function(t){var n=e.prototype.getMaxBufferLength.call(this);return t?Math.max(n,t):n},n.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))},a(t,[{key:"mediaBufferTimeRanges",get:function(){return new ai(this.tracksBuffered[this.currentTrackId]||[])}}]),t}(Nn),ai=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)}}},oi=function(e){function t(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}l(t,e);var n=t.prototype;return n.destroy=function(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.trackChangeListener=this.asyncPollTrackChange=null,e.prototype.destroy.call(this)},n.registerListeners=function(){var e=this.hls;e.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.LEVEL_LOADING,this.onLevelLoading,this),e.on(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(_.ERROR,this.onError,this)},n.unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.LEVEL_LOADING,this.onLevelLoading,this),e.off(_.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(_.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(_.ERROR,this.onError,this)},n.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))},n.pollTrackChange=function(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.trackChangeListener,e)},n.onMediaDetaching=function(){this.media&&(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),si(this.media.textTracks).forEach((function(e){mt(e)})),this.subtitleTrack=-1,this.media=null)},n.onManifestLoading=function(){this.tracks=[],this.groupId=null,this.tracksInGroup=[],this.trackId=-1,this.selectDefaultTrack=!0},n.onManifestParsed=function(e,t){this.tracks=t.subtitleTracks},n.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.playlistLoaded(n,t,o)}else this.warn("Invalid subtitle track id "+n)},n.onLevelLoading=function(e,t){this.switchLevel(t.level)},n.onLevelSwitching=function(e,t){this.switchLevel(t.level)},n.switchLevel=function(e){var t=this.hls.levels[e];if(null!=t&&t.textGroupIds){var n=t.textGroupIds[t.urlId],r=this.tracksInGroup?this.tracksInGroup[this.trackId]:void 0;if(this.groupId!==n){var 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||null;var o={subtitleTracks:i};this.log("Updating subtitle tracks, "+i.length+' track(s) found in "'+n+'" group-id'),this.hls.trigger(_.SUBTITLE_TRACKS_UPDATED,o),-1!==a&&this.setSubtitleTrack(a,r)}else this.shouldReloadPlaylist(r)&&this.setSubtitleTrack(this.trackId,r)}},n.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},n.onError=function(e,t){!t.fatal&&t.context&&t.context.type===ut&&t.context.id===this.trackId&&t.context.groupId===this.groupId&&this.checkRetry(t)},n.loadPlaylist=function(t){e.prototype.loadPlaylist.call(this);var n=this.tracksInGroup[this.trackId];if(this.shouldLoadPlaylist(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(_.SUBTITLE_TRACK_LOADING,{url:a,id:r,groupId:i,deliveryDirectives:t||null})}},n.toggleTrackModes=function(e){var t=this,n=this.media,r=this.trackId;if(n){var i=si(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")}},n.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])&&n.details)||e<-1||e>=r.length)){this.clearTimer();var i=r[e];if(this.log("Switching to subtitle-track "+e+(i?' "'+i.name+'" lang:'+i.lang+" group:"+i.groupId:"")),this.trackId=e,i){var a=i.id,o=i.groupId,s=void 0===o?"":o,l=i.name,u=i.type,c=i.url;this.hls.trigger(_.SUBTITLE_TRACK_SWITCH,{id:a,groupId:s,name:l,type:u,url:c});var d=this.switchParams(i.url,null==t?void 0:t.details);this.loadPlaylist(d)}else this.hls.trigger(_.SUBTITLE_TRACK_SWITCH,{id:e})}}else this.queuedDefaultTrack=e},n.onTextTracksChanged=function(){if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),this.media&&this.hls.config.renderTextTracksNatively){for(var e=-1,t=si(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)}},a(t,[{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)}}]),t}(qt);function si(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}var li=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){x.warn("[buffer-operation-queue]: Unhandled exception executing the current operation"),a.onError(t),null!=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}(),ui=Ge(),ci=/([ha]vc.)(?:\.[^.,]+)+/,di=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;x.log("[buffer-controller]: Media source opened"),e&&(e.removeEventListener("emptied",t._onMediaEmptied),t.updateMediaElementDuration(),t.hls.trigger(_.MEDIA_ATTACHED,{media:e})),n&&n.removeEventListener("sourceopen",t._onMediaSourceOpen),t.checkPendingTracks()},this._onMediaSourceClose=function(){x.log("[buffer-controller]: Media source closed")},this._onMediaSourceEnded=function(){x.log("[buffer-controller]: Media source ended")},this._onMediaEmptied=function(){var e=t.media,n=t._objectUrl;e&&e.src!==n&&x.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(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.BUFFER_RESET,this.onBufferReset,this),e.on(_.BUFFER_APPENDING,this.onBufferAppending,this),e.on(_.BUFFER_CODECS,this.onBufferCodecs,this),e.on(_.BUFFER_EOS,this.onBufferEos,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(_.FRAG_PARSED,this.onFragParsed,this),e.on(_.FRAG_CHANGED,this.onFragChanged,this)},t.unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.BUFFER_RESET,this.onBufferReset,this),e.off(_.BUFFER_APPENDING,this.onBufferAppending,this),e.off(_.BUFFER_CODECS,this.onBufferCodecs,this),e.off(_.BUFFER_EOS,this.onBufferEos,this),e.off(_.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(_.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(_.FRAG_PARSED,this.onFragParsed,this),e.off(_.FRAG_CHANGED,this.onFragChanged,this)},t._initSourceBuffer=function(){this.sourceBuffer={},this.operationQueue=new li(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.lastMpegAudioChunk=null},t.onManifestLoading=function(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null},t.onManifestParsed=function(e,t){var n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=n,x.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},t.onMediaAttaching=function(e,t){var n=this.media=t.media;if(n&&ui){var r=this.mediaSource=new ui;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(x.log("[buffer-controller]: media source detaching"),"open"===t.readyState)try{t.endOfStream()}catch(e){x.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()):x.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(_.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){x.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,l=a.levelCodec,u=a.container,c=a.metadata,d=(i.levelCodec||i.codec).replace(ci,"$1"),p=(l||s).replace(ci,"$1");if(d!==p){var h=u+";codecs="+(l||s);n.appendChangeType(e,h),x.log("[buffer-controller]: switching codec "+d+" to "+p),n.tracks[e]={buffer:i.buffer,codec:s,container:u,levelCodec:l,metadata:c,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&&(x.log("[buffer-controller]: changing "+e+" sourceBuffer type to "+t),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:function(){},onComplete:function(){},onError:function(t){x.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,o=t.data,s=t.type,l=t.frag,u=t.part,c=t.chunkMeta,d=c.buffering[s],p=self.performance.now();d.start=p;var h=l.stats.buffering,f=u?u.stats.buffering:null;0===h.start&&(h.start=p),f&&0===f.start&&(f.start=p);var g=a.audio,y=!1;"audio"===s&&"audio/mpeg"===(null==g?void 0:g.container)&&(y=!this.lastMpegAudioChunk||1===c.id||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);var v=l.start,m={execute:function(){if(d.executeStart=self.performance.now(),y){var e=n.sourceBuffer[s];if(e){var t=v-e.timestampOffset;Math.abs(t)>=.1&&(x.log("[buffer-controller]: Updating audio SourceBuffer timestampOffset to "+v+" (delta: "+t+") sn: "+l.sn+")"),e.timestampOffset=v)}}n.appendExecutor(o,s)},onStart:function(){},onComplete:function(){var e=self.performance.now();d.executeEnd=d.end=e,0===h.first&&(h.first=e),f&&0===f.first&&(f.first=e);var t=n.sourceBuffer,r={};for(var i in t)r[i]=fn.getBuffered(t[i]);n.appendError=0,n.hls.trigger(_.BUFFER_APPENDED,{type:s,frag:l,part:u,chunkMeta:c,parent:l.type,timeRanges:r})},onError:function(e){x.error("[buffer-controller]: Error encountered while trying to append to the "+s+" SourceBuffer",e);var t={type:E.MEDIA_ERROR,parent:l.type,details:k.BUFFER_APPEND_ERROR,frag:l,part:u,chunkMeta:c,error:e,err:e,fatal:!1};e.code===DOMException.QUOTA_EXCEEDED_ERR?t.details=k.BUFFER_FULL_ERROR:(n.appendError++,t.details=k.BUFFER_APPEND_ERROR,n.appendError>r.config.appendErrorMaxRetry&&(x.error("[buffer-controller]: Failed "+r.config.appendErrorMaxRetry+" times to append segment in sourceBuffer"),t.fatal=!0)),r.trigger(_.ERROR,t)}};i.append(m,s)},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(_.BUFFER_FLUSHED,{type:e})},onError:function(t){x.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=[],o=i?i.elementaryStreams:r.elementaryStreams;o[U]?a.push("audiovideo"):(o[M]&&a.push("audio"),o[N]&&a.push("video")),0===a.length&&x.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(_.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,x.log("[buffer-controller]: "+r+" sourceBuffer now EOS"))),e&&!(i&&!i.ended)}),!0)&&(x.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?(x.log("[buffer-controller]: Calling mediaSource.endOfStream()"),e.endOfStream()):e&&x.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 a=t.live&&null!==e.config.liveBackBufferLength?e.config.liveBackBufferLength:e.config.backBufferLength;if(b(a)&&!(a<0)){var o=n.currentTime,s=t.levelTargetDuration,l=Math.max(a,s),u=Math.floor(o/s)*s-l;i.forEach((function(n){var i=r[n];if(i){var a=fn.getBuffered(i);if(a.length>0&&u>a.start(0)){if(e.trigger(_.BACK_BUFFER_REACHED,{bufferEnd:u}),t.live)e.trigger(_.LIVE_BACK_BUFFER_REACHED,{bufferEnd:u});else if(i.ended&&a.end(a.length-1)-o<2*s)return void x.info("[buffer-controller]: Cannot flush "+n+" back buffer while SourceBuffer is in ended state");e.trigger(_.BUFFER_FLUSHING,{startOffset:0,endOffset:u,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,a=n.duration,o=b(r.duration)?r.duration:0;e.live&&t.config.liveDurationInfinity?(x.log("[buffer-controller]: Media Source duration is set to Infinity"),r.duration=1/0,this.updateSeekableRange(e)):(i>o&&i>a||!b(a))&&(x.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(i.length)this.hls.trigger(_.BUFFER_CREATED,{tracks:this.tracks}),i.forEach((function(e){t.executeNext(e)}));else{var a=new Error("could not create source buffer for media codec(s)");this.hls.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:a,reason:a.message})}}},t.createSourceBuffers=function(e){var t=this.sourceBuffer,n=this.mediaSource;if(!n)throw Error("createSourceBuffers called when mediaSource was null");for(var r in e)if(!t[r]){var i=e[r];if(!i)throw Error("source buffer exists for track "+r+", however track does not");var a=i.levelCodec||i.codec,o=i.container+";codecs="+a;x.log("[buffer-controller]: creating sourceBuffer("+o+")");try{var s=t[r]=n.addSourceBuffer(o),l=r;this.addBufferListener(l,"updatestart",this._onSBUpdateStart),this.addBufferListener(l,"updateend",this._onSBUpdateEnd),this.addBufferListener(l,"error",this._onSBUpdateError),this.tracks[r]={buffer:s,codec:a,container:i.container,levelCodec:i.levelCodec,metadata:i.metadata,id:i.id}}catch(e){x.error("[buffer-controller]: error while trying to add sourceBuffer: "+e.message),this.hls.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:e,mimeType:o})}}},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){var n=new Error(e+" SourceBuffer error");x.error("[buffer-controller]: "+n,t),this.hls.trigger(_.ERROR,{type:E.MEDIA_ERROR,details:k.BUFFER_APPENDING_ERROR,error:n,fatal:!1});var r=this.operationQueue.current(e);r&&r.onError(t)},t.removeExecutor=function(e,t,n){var r=this.media,i=this.mediaSource,a=this.operationQueue,o=this.sourceBuffer[e];if(!r||!i||!o)return x.warn("[buffer-controller]: Attempting to remove from the "+e+" SourceBuffer, but it does not exist"),void a.shiftAndExecuteNext(e);var s=b(r.duration)?r.duration:1/0,l=b(i.duration)?i.duration:1/0,u=Math.max(0,t),c=Math.min(n,s,l);c>u&&!o.ending?(o.ended=!1,x.log("[buffer-controller]: Removing ["+u+","+c+"] from the "+e+" SourceBuffer"),o.remove(u,c)):a.shiftAndExecuteNext(e)},t.appendExecutor=function(e,t){var n=this.operationQueue,r=this.sourceBuffer[t];if(!r)return x.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 x.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];null!=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}(),pi={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},hi=function(e){var t=e;return pi.hasOwnProperty(e)&&(t=pi[e]),String.fromCharCode(t)},fi=100,gi={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},yi={17:2,18:4,21:6,22:8,23:10,19:13,20:15},vi={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},mi={25:2,26:4,29:6,30:8,31:10,27:13,28:15},bi=["white","green","blue","cyan","red","yellow","magenta","black","transparent"],_i=function(){function e(){this.time=null,this.verboseLevel=0}return e.prototype.log=function(e,t){if(this.verboseLevel>=e){var n="function"==typeof t?t():t;x.log(this.time+" ["+e+"] "+n)}},e}(),Ei=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].toString(16));return t},ki=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}(),Ti=function(){function e(e,t,n,r,i,a){this.uchar=void 0,this.penState=void 0,this.uchar=e||" ",this.penState=new ki(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}(),Ai=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<fi;t++)this.chars.push(new Ti);this.logger=e,this.pos=0,this.currPenState=new ki}var t=e.prototype;return t.equals=function(e){for(var t=!0,n=0;n<fi;n++)if(!this.chars[n].equals(e.chars[n])){t=!1;break}return t},t.copy=function(e){for(var t=0;t<fi;t++)this.chars[t].copy(e.chars[t])},t.isEmpty=function(){for(var e=!0,t=0;t<fi;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(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>fi&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=fi)},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=hi(e);this.pos>=fi?this.logger.log(0,(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<fi;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<fi;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}(),wi=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 Ai(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(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)},t.setPAC=function(e){this.logger.log(2,(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 d={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(d)},t.setBkgData=function(e){this.logger.log(2,(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(1,(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(2,"Rolling up")}else this.logger.log(3,"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}(),Si=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 wi(n),this.nonDisplayedMemory=new wi(n),this.lastOutputScreen=new wi(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(2,(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(2,(function(){return r+": "+t.writeScreen.getDisplayText(!0)})),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(1,(function(){return"DISPLAYED: "+t.displayedMemory.getDisplayText(!0)})),this.outputDataUpdate())},t.ccRCL=function(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},t.ccBS=function(){this.logger.log(2,"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(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},t.ccRU=function(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)},t.ccFON=function(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},t.ccRDC=function(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")},t.ccTR=function(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")},t.ccRTD=function(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")},t.ccEDM=function(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},t.ccCR=function(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},t.ccENM=function(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},t.ccEOC=function(){var e=this;if(this.logger.log(2,"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(1,(function(){return"DISP: "+e.displayedMemory.getDisplayText()}))}this.outputDataUpdate(!0)},t.ccTO=function(e){this.logger.log(2,"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(2,"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}(),Ci=function(){function e(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var r=new _i;this.channels=[null,new Si(e,t,r),new Si(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(3,"["+Ei([t[o],t[o+1]])+"] -> ("+Ei([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(2,"No channel found yet. TEXT-MODE?")}n||a||this.logger.log(2,"Couldn't parse cleaned data "+Ei([r,i])+" orig: "+Ei([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(Ii(e,t,n))return xi(null,null,n),this.logger.log(3,"Repeated command ("+Ei([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),xi(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(0,"Mismatch channel in midrow parsing"),!1;var r=this.channels[n];return!!r&&(r.ccMIDROW(t),this.logger.log(3,"MIDROW ("+Ei([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(Ii(e,t,r))return xi(null,null,r),!0;var i=e<=23?1:2;n=t>=64&&t<=95?1===i?gi[e]:vi[e]:1===i?yi[e]:mi[e];var a=this.channels[i];return!!a&&(a.setPAC(this.interpretPAC(n,t)),xi(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(2,"Special char '"+hi(r)+"' in channel "+n),i=[r]):e>=32&&e<=127&&(i=0===t?[e]:[e,t]),i){var o=Ei(i);this.logger.log(3,"Char codes =  "+o.join(",")),xi(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=bi[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),xi(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}();function xi(e,t,n){n.a=e,n.b=t}function Ii(e,t,n){return n.a===e&&n.b===t}var Pi=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}(),Di=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,d=t,p=a,h=o,f=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 d},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"endTime",i({},l,{get:function(){return p},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(s,"text",i({},l,{get:function(){return h},set:function(e){h=""+e,this.hasBeenReset=!0}})),Object.defineProperty(s,"region",i({},l,{get:function(){return f},set:function(e){f=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}(),Ri=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 Li(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 Oi=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 Mi(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 Ni=new Di(0,0,""),Ui="middle"===Ni.align?"middle":"center";function Fi(e,t,n){var r=e;function i(){var t=Li(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 Oi;Mi(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",Ui,"end"]);break;case"position":i=t.split(","),r.percent(e,i[0]),2===i.length&&r.alt("positionAlign",i[1],["start",Ui,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",Ui,"end","left","right"])}}),/:/,/\s/),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===Ni.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",Ui);var a=r.get("position","auto");"auto"===a&&50===Ni.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}function Bi(e){return e.replace(/<br(?: \/)?>/gi,"\n")}var ji=function(){function e(){this.state="INITIAL",this.buffer="",this.decoder=new Ri,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=Bi(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(null==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)?Mi(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 Di(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{Fi(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}(),Hi=/\r\n|\n\r|\n|\r/g,Vi=function(e,t,n){return void 0===n&&(n=0),e.slice(n,n+t.length)===t},Gi=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return(t>>>0).toString()};function Ki(e,t,n){return Gi(e.toString())+Gi(t.toString())+Gi(n)}var zi="stpp.ttml.im1t",Wi=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Yi=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,qi={left:"start",center:"center",right:"end",start:"start",end:"end"};function Xi(e,t,n,r){var i=we(new Uint8Array(e),["mdat"]);if(0!==i.length){var a,o,l,u=i.map((function(e){return ge(e)})),c=(a=t.baseTime,1,void 0===(o=t.timescale)&&(o=1),void 0===l&&(l=!1),kr(a,1,1/o,l));try{u.forEach((function(e){return n(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=$i(Qi(n,"styling","style")),l=$i(Qi(n,"layout","region")),u=Qi(n,"body","[begin]");return[].map.call(u,(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)&&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=ea(e.getAttribute("begin"),i),u=ea(e.getAttribute("dur"),i),c=ea(e.getAttribute("end"),i);if(null===r)throw Zi(e);if(null===c){if(null===u)throw Zi(e);c=r+u}var d=new Di(r-t,c-t,n);d.id=Ki(d.startTime,d.endTime,d.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=Ji(t,r,a)||Ji(e,r,a)||Ji(i,r,a);return o&&(n[a]=o),n}),{})}(l[e.getAttribute("region")],o[e.getAttribute("style")],o),h=p.textAlign;if(h){var f=qi[h];f&&(d.lineAlign=f),d.align=h}return s(d,p),d})).filter((function(e){return null!==e}))}(e,c))}))}catch(e){r(e)}}else r(new Error("Could not parse IMSC1 mdat"))}function Qi(e,t,n){var r=e.getElementsByTagName(t)[0];return r?[].slice.call(r.querySelectorAll(n)):[]}function $i(e){return e.reduce((function(e,t){var n=t.getAttribute("xml:id");return n&&(e[n]=t),e}),{})}function Ji(e,t,n){return e&&e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function Zi(e){return new Error("Could not parse ttml timestamp "+e)}function ea(e,t){if(!e)return null;var n=Li(e);return null===n&&(Wi.test(e)?n=function(e,t){var n=Wi.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):Yi.test(e)&&(n=function(e,t){var n=Yi.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 ta=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.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 Pi(this,"textTrack1"),n=new Pi(this,"textTrack2"),r=new Pi(this,"textTrack3"),i=new Pi(this,"textTrack4");this.cea608Parser1=new Ci(1,t,n),this.cea608Parser2=new Ci(3,r,i)}e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(_.FRAG_LOADING,this.onFragLoading,this),e.on(_.FRAG_LOADED,this.onFragLoaded,this),e.on(_.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(_.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(_.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(_.BUFFER_FLUSHING,this.onBufferFlushing,this)}var t=e.prototype;return t.destroy=function(){var e=this.hls;e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(_.FRAG_LOADING,this.onFragLoading,this),e.off(_.FRAG_LOADED,this.onFragLoaded,this),e.off(_.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(_.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(_.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(_.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(_.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,o,s,l,u=!1,c=i.length;c--;){var d=i[c],p=(a=d[0],o=d[1],s=t,l=n,Math.min(o,l)-Math.max(a,s));if(p>=0&&(d[0]=Math.min(d[0],t),d[1]=Math.max(d[1],n),u=!0,p/(n-t)>.5))return}if(u||i.push([t,n]),this.config.renderTextTracksNatively){var h=this.captionsTracks[e];this.Cues.newCue(h,t,n,r)}else{var f=this.Cues.newCue(null,t,n,r);this.hls.trigger(_.CUES_PARSED,{type:"captions",cues:f,track:e})}},t.onInitPtsFound=function(e,t){var n=this,r=t.frag,i=t.id,a=t.initPTS,o=t.timescale,s=this.unparsedVttFrags;"main"===i&&(this.initPTS[r.cc]={baseTime:a,timescale:o}),s.length&&(this.unparsedVttFrags=[],s.forEach((function(e){n.onFragLoaded(_.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,mt(n[e]),yt(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(_.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){mt(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.initPTS=[],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++)mt(t[n])}},t.onSubtitleTracksUpdated=function(e,t){var n=this,r=t.subtitleTracks||[],i=r.some((function(e){return e.textCodec===zi}));if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(ni(this.tracks,r))return void(this.tracks=r);if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){var a=this.media?this.media.textTracks:null;this.tracks.forEach((function(e,t){var r;if(a&&t<a.length){for(var i=null,o=0;o<a.length;o++)if(na(a[o],e)){i=a[o];break}i&&(r=i)}if(r)mt(r);else{var s=n._captionsOrSubtitlesFromCharacteristics(e);(r=n.createTextTrack(s,e.name,e.lang))&&(r.mode="disabled")}r&&(r.groupId=e.groupId,n.textTracks.push(r))}))}else if(this.tracks.length){var o=this.tracks.map((function(e){return{label:e.name,kind:e.type.toLowerCase(),default:e.default,subtitleTrack:e}}));this.hls.trigger(_.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:o})}}},t._captionsOrSubtitlesFromCharacteristics=function(e){if(e.attrs.CHARACTERISTICS){var t=/transcribes-spoken-dialog/gi.test(e.attrs.CHARACTERISTICS),n=/describes-music-and-sound/gi.test(e.attrs.CHARACTERISTICS);if(t&&n)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===ct){var o,s,l=t.frag.sn,u=null!=(o=null==t||null==(s=t.part)?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;if(n.type===pt)if(r.byteLength){var i=n.decryptdata,a="stats"in t;if(null==i||!i.encrypted||a){var o=this.tracks[n.level],s=this.vttCCs;s[n.cc]||(s[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),o&&o.textCodec===zi?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})},t._parseIMSC1=function(e,t){var n=this,r=this.hls;Xi(t,this.initPTS[e.cc],(function(t){n._appendCues(t,e.level),r.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})}),(function(t){x.log("Failed to parse IMSC1: "+t),r.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:t})}))},t._parseVTTs=function(e){var t,n=this,r=e.frag,i=e.payload,a=this.initPTS,o=this.unparsedVttFrags,s=a.length-1;if(a[r.cc]||-1!==s){var l=this.hls;!function(e,t,n,r,i,a,o){var s,l,u,c=new ji,d=ge(new Uint8Array(e)).trim().replace(Hi,"\n").split("\n"),p=[],h=t?(s=t.baseTime,void 0===(l=t.timescale)&&(l=1),kr(s,9e4,1/l)):0,f="00:00.000",g=0,y=0,v=!0;c.oncue=function(e){var a=n[r],o=n.ccOffset,s=(g-h)/9e4;if(null!=a&&a.new&&(void 0!==y?o=n.ccOffset=a.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)&&a.new;){var a;e.ccOffset+=r.start-i.start,r.new=!1,i=e[(r=i).prevCC]}e.presentationOffset=n}(n,r,s)),s){if(!t)return void(u=new Error("Missing initPTS for VTT MPEGTS"));o=s-n.presentationOffset}var l=e.endTime-e.startTime,c=Cr(9e4*(e.startTime+o-y),9e4*i)/9e4;e.startTime=Math.max(c,0),e.endTime=Math.max(c+l,0);var d=e.text.trim();e.text=decodeURIComponent(encodeURIComponent(d)),e.id||(e.id=Ki(e.startTime,e.endTime,d)),e.endTime>0&&p.push(e)},c.onparsingerror=function(e){u=e},c.onflush=function(){u?o(u):a(p)},d.forEach((function(e){if(v){if(Vi(e,"X-TIMESTAMP-MAP=")){v=!1,e.slice(16).split(",").forEach((function(e){Vi(e,"LOCAL:")?f=e.slice(6):Vi(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(!(b(t)&&b(n)&&b(r)&&b(i)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+e);return t+=1e3*n,(t+=6e4*r)+36e5*i}(f)/1e3}catch(e){u=e}return}""===e&&(v=!1)}c.parse(e+"\n")})),c.flush()}(null!=(t=r.initSegment)&&t.data?Pe(r.initSegment.data,new Uint8Array(i)):i,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,(function(e){n._appendCues(e,r.level),l.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})}),(function(t){var a="Missing initPTS for VTT MPEGTS"===t.message;a?o.push(e):n._fallbackToIMSC1(r,i),x.log("Failed to parse VTT cue: "+t),a&&s>r.cc||l.trigger(_.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:t})}))}else o.push(e)},t._fallbackToIMSC1=function(e,t){var n=this,r=this.tracks[e.level];r.textCodec||Xi(t,this.initPTS[e.cc],(function(){r.textCodec=zi,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 vt(r,e)}))}else{var i=this.tracks[t];if(!i)return;var a=i.default?"default":"subtitles"+t;n.trigger(_.CUES_PARSED,{type:"subtitles",cues:e,track:a})}},t.onFragDecrypted=function(e,t){t.frag.type===pt&&this.onFragLoaded(_.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!==ct||"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 bt(s[e],n,r)}))}if(this.config.renderTextTracksNatively&&0===n&&void 0!==i){var l=this.textTracks;Object.keys(l).forEach((function(e){return bt(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 na(e,t){return!!e&&e.label===t.name&&!(e.textTrack1||e.textTrack2)}var ra=function(){function e(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=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=e.prototype;return t.setStreamController=function(e){this.streamController=e},t.destroy=function(){this.unregisterListener(),this.hls.config.capLevelToPlayerSize&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null},t.registerListeners=function(){var e=this.hls;e.on(_.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.BUFFER_CODECS,this.onBufferCodecs,this),e.on(_.MEDIA_DETACHING,this.onMediaDetaching,this)},t.unregisterListener=function(){var e=this.hls;e.off(_.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.BUFFER_CODECS,this.onBufferCodecs,this),e.off(_.MEDIA_DETACHING,this.onMediaDetaching,this)},t.onFpsDropLevelCapping=function(e,t){var n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})},t.onMediaAttaching=function(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null},t.onManifestParsed=function(e,t){var n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()},t.onBufferCodecs=function(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},t.onMediaDetaching=function(){this.stopCapping()},t.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}}},t.getMaxLevel=function(t){var n=this,r=this.hls.levels;if(!r.length)return-1;var i=r.filter((function(e,r){return n.isLevelAllowed(e)&&r<=t}));return this.clientRect=null,e.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},t.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())},t.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)},t.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},t.isLevelAllowed=function(e){return!this.restrictedLevels.some((function(t){return e.bitrate===t.bitrate&&e.width===t.width&&e.height===t.height}))},e.getMaxLevelByMediaSize=function(e,t,n){if(null==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},a(e,[{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}}]),e}(),ia=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(_.MEDIA_ATTACHING,this.onMediaAttaching,this)},t.unregisterListeners=function(){this.hls.off(_.MEDIA_ATTACHING,this.onMediaAttaching,this)},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,o=t-this.lastDecodedFrames,s=1e3*a/i,l=this.hls;if(l.trigger(_.FPS_DROP,{currentDropped:a,currentDecoded:o,totalDroppedFrames:n}),s>0&&a>l.config.fpsDroppedMonitoringThreshold*o){var u=l.currentLevel;x.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(_.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,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}(),aa="[eme]",oa=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=x.debug.bind(x,aa),this.log=x.log.bind(x,aa),this.warn=x.warn.bind(x,aa),this.error=x.error.bind(x,aa),this.hls=t,this.config=t.config,this.registerListeners()}var t=e.prototype;return t.destroy=function(){this.unregisterListeners(),this.onMediaDetached();var e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.onMediaEncrypted=this.onWaitingForKey=this.keyIdToKeySessionPromise=null,this.config=null},t.registerListeners=function(){this.hls.on(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(_.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(_.MANIFEST_LOADED,this.onManifestLoaded,this)},t.unregisterListeners=function(){this.hls.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(_.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(_.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(_.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===K.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 s=o.shift();t.getMediaKeysPromise(s,i,a).then((function(e){return n({keySystem:s,mediaKeys:e})})).catch((function(t){o.length?e(o):r(t instanceof sa?t:new sa({type:E.KEY_SYSTEM_ERROR,details:k.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===Z&&"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 K.FAIRPLAY:i=["cenc","sinf"];break;case K.WIDEVINE:case K.PLAYREADY:i=["cenc"];break;case K.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: '+ye(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 ye(e.keyId)},t.updateKeySession=function(e,t){var n,r=e.mediaKeysSession;return this.log('Updating key-session "'+r.sessionId+'" for keyID '+ye((null==(n=e.decryptdata)?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=J(t.config),a=e.map(X).filter((function(e){return!!e&&-1!==i.indexOf(e)}));return t.getKeySystemSelectionPromise(a).then((function(e){var t=e.keySystem,i=$(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(!this.hls)throw new Error("invalid state")},t.handleError=function(e){this.hls&&(this.error(e.message),e instanceof sa?this.hls.trigger(_.ERROR,e.data):this.hls.trigger(_.ERROR,{type:E.KEY_SYSTEM_ERROR,details:k.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=X(e.keyFormat),i=r?[r]:J(this.config);return this.attemptKeySystemAccess(i)}return n},t.getKeySystemSelectionPromise=function(e){if(e.length||(e=J(this.config)),0===e.length)throw new sa({type:E.KEY_SYSTEM_ERROR,details:k.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[K.FAIRPLAY]){var o=_e(new Uint8Array(r));try{var s=V(JSON.parse(o).sinf),l=xe(new Uint8Array(s));if(!l)return;i=l.subarray(8,24),a=K.FAIRPLAY}catch(e){return void this.warn('Failed to parse sinf "encrypted" event message initData')}}else{var u=function(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=ye(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}(r);if(null===u)return;0===u.version&&u.systemId===Q&&u.data&&(i=u.data.subarray(8,24)),a=function(e){if(e===Q)return K.WIDEVINE}(u.systemId)}if(a&&i){for(var c=ye(i),d=this.keyIdToKeySessionPromise,p=this.mediaKeySessions,h=d[c],f=function(){var e=p[g],a=e.decryptdata;if(a.pssh||!a.keyId)return"continue";var o=ye(a.keyId);return c===o||-1!==a.uri.replace(/-/g,"").indexOf(c)?(h=d[o],delete d[o],a.pssh=new Uint8Array(r),a.keyId=i,h=d[c]=h.then((function(){return t.generateRequestWithPreferredKeySession(e,n,r,"encrypted-event-key-match")})),"break"):void 0},g=0;g<p.length;g++){var y=f();if("continue"!==y&&"break"===y)break}h||(h=d[c]=this.getKeySystemSelectionPromise([a]).then((function(e){var a,o=e.keySystem,s=e.mediaKeys;t.throwIfDestroyed();var l=new Ne("ISO-23001-7",c,null!=(a=$(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,s=null==(i=this.config.drmSystems)||null==(a=i[e.keySystem])?void 0:a.generateRequest;if(s)try{var l=s.call(this.hls,t,n,e);if(!l)throw new Error("Invalid response from configured generateRequest filter");t=l.initDataType,n=e.decryptdata.pssh=l.initData?new Uint8Array(l.initData):null}catch(e){var u;if(this.warn(e.message),null!=(u=this.hls)&&u.config.debug)throw e}if(null===n)return this.log('Skipping key-session request for "'+r+'" (no initData)'),Promise.resolve(e);var c=this.getKeyIdString(e.decryptdata);this.log('Generating key-session request for "'+r+'": '+c+" (init data type: "+t+" length: "+(n?n.byteLength:null)+")");var d=new Vr;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===K.FAIRPLAY&&(o.updateKeySession(e,G("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 "+c),o.renewKeySession(e))}else d.emit("error",new Error("invalid state"))};var p=new Promise((function(e,t){d.on("error",t),d.on("keyStatus",(function(n){n.startsWith("usable")?e():"output-restricted"===n?t(new sa({type:E.KEY_SYSTEM_ERROR,details:k.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):"internal-error"===n?t(new sa({type:E.KEY_SYSTEM_ERROR,details:k.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.sessionId)+'" keyId: '+c)})).catch((function(e){throw new sa({type:E.KEY_SYSTEM_ERROR,details:k.KEY_SYSTEM_NO_SESSION,error:e,fatal:!1},"Error generating key-session request: "+e)})).then((function(){return p})).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: '+ye("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))+" session keyId: "+ye(new Uint8Array(e.decryptdata.keyId||[]))+" uri: "+e.decryptdata.uri),e.keyStatus=n}))},t.fetchServerCertificate=function(e){var t=this.config,n=new(0,t.loader)(t),i=this.getServerCertificateUrl(e);return i?(this.log('Fetching serverCertificate for "'+e+'"'),new Promise((function(a,o){var s={responseType:"arraybuffer",url:i},l=t.certLoadPolicy.default,u={loadPolicy:l,timeout:l.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},c={onSuccess:function(e,t,n,r){a(e.data)},onError:function(t,n,a,l){o(new sa({type:E.KEY_SYSTEM_ERROR,details:k.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:r({url:s.url,data:void 0},t)},'"'+e+'" certificate request failed ('+i+"). Status: "+t.code+" ("+t.text+")"))},onTimeout:function(t,n,r){o(new sa({type:E.KEY_SYSTEM_ERROR,details:k.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:r,response:{url:s.url,data:void 0}},'"'+e+'" certificate request timed out ('+i+")"))},onAbort:function(e,t,n){o(new Error("aborted"))}};n.load(s,u,c)}))):Promise.resolve()},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 sa({type:E.KEY_SYSTEM_ERROR,details:k.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 sa({type:E.KEY_SYSTEM_ERROR,details:k.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,r=this.config.keyLoadPolicy.default;return new Promise((function(i,a){var o=n.getLicenseServerUrl(e.keySystem);n.log("Sending license request to URL: "+o);var s=new XMLHttpRequest;s.responseType="arraybuffer",s.onreadystatechange=function(){if(!n.hls||!e.mediaKeysSession)return a(new Error("invalid state"));if(4===s.readyState)if(200===s.status){n._requestLicenseFailureCount=0;var l=s.response;n.log("License received "+(l instanceof ArrayBuffer?l.byteLength:l));var u=n.config.licenseResponseCallback;if(u)try{l=u.call(n.hls,s,o,e)}catch(e){n.error(e)}i(l)}else{var c=r.errorRetry,d=c?c.maxNumRetry:0;if(n._requestLicenseFailureCount++,n._requestLicenseFailureCount>d||s.status>=400&&s.status<500)a(new sa({type:E.KEY_SYSTEM_ERROR,details:k.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:s,response:{url:o,data:void 0,code:s.status,text:s.statusText}},"License Request XHR failed ("+o+"). Status: "+s.status+" ("+s.statusText+")"));else{var p=d-n._requestLicenseFailureCount+1;n.warn("Retrying license request, "+p+" attempts left"),n.requestLicense(e,t).then(i,a)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=s,n.setupLicenseXHR(s,o,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={},Ne.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.onManifestLoading=function(){this.keyFormatPromise=null},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}();oa.CDMCleanupPromise=void 0;var sa=function(e){function t(t,n){var r;return(r=e.call(this,n)||this).data=void 0,t.error||(t.error=new Error(n)),r.data=t,t.err=t.error,r}return l(t,e),t}(h(Error)),la=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:"m",su:!n.initialized})}catch(e){x.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};"v"!==i&&"a"!==i&&"av"!=i||(a.br=r.bitrate/1e3,a.tb=n.getTopBandwidth(i)/1e3,a.bl=n.getBufferLength(i)),n.apply(e,a)}catch(e){x.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(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(_.MEDIA_DETACHED,this.onMediaDetached,this),e.on(_.BUFFER_CREATED,this.onBufferCreated,this)},t.unregisterListeners=function(){var e=this.hls;e.off(_.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(_.MEDIA_DETACHED,this.onMediaDetached,this),e.off(_.BUFFER_CREATED,this.onBufferCreated,this)},t.destroy=function(){this.unregisterListeners(),this.onMediaDetached(),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.buffer,this.videoBuffer=null==(r=t.tracks.video)?void 0:r.buffer},t.createData=function(){var e;return{v:1,sf:"h",sid:this.sid,cid:this.cid,pr:null==(e=this.media)?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}},t.apply=function(t,n){void 0===n&&(n={}),s(n,this.createData());var r="i"===n.ot||"v"===n.ot||"av"===n.ot;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={}),s(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?"tt":"initSegment"===e.sn?"i":"audio"===t?"a":"main"===t?this.hls.audioTracks.length?"v":"av":void 0},t.getTopBandwidth=function(e){var t,n=0,r=this.hls;if("a"===e)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=g(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="a"===e?this.audioBuffer:this.videoBuffer;return n&&t?1e3*fn.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)},a(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)},a(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=g(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 d,p=typeof u;d="ot"===l||"sf"===l||"st"===l?l+"="+u:"boolean"===p?l:"number"===p?l+"="+u:l+"="+JSON.stringify(u),n.push(d)}}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}(),ua=function(){function e(e){this.hls=void 0,this.log=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this.pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.log=x.log.bind(x,"[content-steering]:"),this.registerListeners()}var t=e.prototype;return t.registerListeners=function(){var e=this.hls;e.on(_.MANIFEST_LOADING,this.onManifestLoading,this),e.on(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(_.MANIFEST_PARSED,this.onManifestParsed,this),e.on(_.ERROR,this.onError,this)},t.unregisterListeners=function(){var e=this.hls;e&&(e.off(_.MANIFEST_LOADING,this.onManifestLoading,this),e.off(_.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(_.MANIFEST_PARSED,this.onManifestParsed,this),e.off(_.ERROR,this.onError,this))},t.startLoad=function(){if(this.started=!0,self.clearTimeout(this.reloadTimer),this.enabled&&this.uri)if(this.updated){var e=Math.max(1e3*this.timeToLoad-(performance.now()-this.updated),0);this.scheduleRefresh(this.uri,e)}else this.loadSteeringManifest(this.uri)},t.stopLoad=function(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),self.clearTimeout(this.reloadTimer)},t.destroy=function(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null},t.removeLevel=function(e){var t=this.levels;t&&(this.levels=t.filter((function(t){return t!==e})))},t.onManifestLoading=function(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null},t.onManifestLoaded=function(e,t){var n=t.contentSteering;null!==n&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())},t.onManifestParsed=function(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks},t.onError=function(e,t){var n=t.errorAction;if(2===(null==n?void 0:n.action)&&1===n.flags){var r=this.pathwayPriority,i=this.pathwayId;this.penalizedPathways[i]||(this.penalizedPathways[i]=performance.now()),!r&&this.levels&&(r=this.levels.reduce((function(e,t){return-1===e.indexOf(t.pathwayId)&&e.push(t.pathwayId),e}),[])),r&&r.length>1&&(this.updatePathwayPriority(r),n.resolved=this.pathwayId!==i)}},t.filterParsedLevels=function(e){this.levels=e;var t=this.getLevelsForPathway(this.pathwayId);if(0===t.length){var n=e[0].pathwayId;this.log("No levels found in Pathway "+this.pathwayId+'. Setting initial Pathway to "'+n+'"'),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length?(this.log("Found "+t.length+"/"+e.length+' levels in Pathway "'+this.pathwayId+'"'),t):e},t.getLevelsForPathway=function(e){return null===this.levels?[]:this.levels.filter((function(t){return e===t.pathwayId}))},t.updatePathwayPriority=function(e){var t;this.pathwayPriority=e;var n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach((function(e){r-n[e]>3e5&&delete n[e]}));for(var i=0;i<e.length;i++){var a=e[i];if(!n[a]){if(a===this.pathwayId)return;var o=this.hls.nextLoadLevel,s=this.hls.levels[o];if((t=this.getLevelsForPathway(a)).length>0){this.log('Setting Pathway to "'+a+'"'),this.pathwayId=a,this.hls.trigger(_.LEVELS_UPDATED,{levels:t});var l=this.hls.levels[o];s&&l&&this.levels&&(l.attrs["STABLE-VARIANT-ID"]!==s.attrs["STABLE-VARIANT-ID"]&&l.bitrate!==s.bitrate&&this.log("Unstable Pathways change from bitrate "+s.bitrate+" to "+l.bitrate),this.hls.nextLoadLevel=o);break}}}},t.clonePathways=function(e){var t=this,n=this.levels;if(n){var r={},i={};e.forEach((function(e){var a=e.ID,o=e["BASE-ID"],l=e["URI-REPLACEMENT"];if(!n.some((function(e){return e.pathwayId===a}))){var u=t.getLevelsForPathway(o).map((function(e){var t=s({},e);t.details=void 0,t.url=da(e.uri,e.attrs["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",l);var n=new D(e.attrs);n["PATHWAY-ID"]=a;var o=n.AUDIO&&n.AUDIO+"_clone_"+a,u=n.SUBTITLES&&n.SUBTITLES+"_clone_"+a;o&&(r[n.AUDIO]=o,n.AUDIO=o),u&&(i[n.SUBTITLES]=u,n.SUBTITLES=u),t.attrs=n;var c=new It(t);return Qt(c,"audio",o),Qt(c,"text",u),c}));n.push.apply(n,u),ca(t.audioTracks,r,l,a),ca(t.subtitleTracks,i,l,a)}}))}},t.loadSteeringManifest=function(e){var t,n=this,r=this.hls.config,i=r.loader;this.loader&&this.loader.destroy(),this.loader=new i(r);try{t=new self.URL(e)}catch(t){return this.enabled=!1,void this.log("Failed to parse Steering Manifest URI: "+e)}if("data:"!==t.protocol){var a=0|(this.hls.bandwidthEstimate||r.abrEwmaDefaultEstimate);t.searchParams.set("_HLS_pathway",this.pathwayId),t.searchParams.set("_HLS_throughput",""+a)}var o={responseType:"json",url:t.href},s=r.steeringManifestLoadPolicy.default,l=s.errorRetry||s.timeoutRetry||{},u={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:function(e,r,i,a){n.log('Loaded steering manifest: "'+t+'"');var o=e.data;if(1===o.VERSION){n.updated=performance.now(),n.timeToLoad=o.TTL;var s=o["RELOAD-URI"],l=o["PATHWAY-CLONES"],u=o["PATHWAY-PRIORITY"];if(s)try{n.uri=new self.URL(s,t).href}catch(e){return n.enabled=!1,void n.log("Failed to parse Steering Manifest RELOAD-URI: "+s)}n.scheduleRefresh(n.uri||i.url),l&&n.clonePathways(l),u&&n.updatePathwayPriority(u)}else n.log("Steering VERSION "+o.VERSION+" not supported!")},onError:function(e,t,r,i){if(n.log("Error loading steering manifest: "+e.code+" "+e.text+" ("+t.url+")"),n.stopLoad(),410===e.code)return n.enabled=!1,void n.log("Steering manifest "+t.url+" no longer available");var a=1e3*n.timeToLoad;if(429!==e.code)n.scheduleRefresh(n.uri||t.url,a);else{var o=n.loader;if("function"==typeof(null==o?void 0:o.getResponseHeader)){var s=o.getResponseHeader("Retry-After");s&&(a=1e3*parseFloat(s))}n.log("Steering manifest "+t.url+" rate limited")}},onTimeout:function(e,t,r){n.log("Timeout loading steering manifest ("+t.url+")"),n.scheduleRefresh(n.uri||t.url)}};this.log("Requesting steering manifest: "+t),this.loader.load(o,u,c)},t.scheduleRefresh=function(e,t){var n=this;void 0===t&&(t=1e3*this.timeToLoad),self.clearTimeout(this.reloadTimer),this.reloadTimer=self.setTimeout((function(){n.loadSteeringManifest(e)}),t)},e}();function ca(e,t,n,r){e&&Object.keys(t).forEach((function(i){var a=e.filter((function(e){return e.groupId===i})).map((function(e){var a=s({},e);return a.details=void 0,a.attrs=new D(a.attrs),a.url=a.attrs.URI=da(e.url,e.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",n),a.groupId=a.attrs["GROUP-ID"]=t[i],a.attrs["PATHWAY-ID"]=r,a}));e.push.apply(e,a)}))}function da(e,t,n,r){var i,a=r.HOST,o=r.PARAMS,s=r[n];t&&(i=null==s?void 0:s[t])&&(e=i);var l=new self.URL(e);return a&&!i&&(l.host=a),o&&Object.keys(o).sort().forEach((function(e){e&&l.searchParams.set(e,o[e])})),l.href}var pa=/^age:\s*[\d.]+\s*$/im,ha=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 O,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)&&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.loadInternal()},t.loadInternal=function(){var e=this,t=this.config,n=this.context;if(t){var r=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;var a=this.xhrSetup;a?Promise.resolve().then((function(){if(!e.stats.aborted)return a(r,n.url)})).catch((function(e){return r.open("GET",n.url,!0),a(r,n.url)})).then((function(){e.stats.aborted||e.openAndSendXhr(r,n,t)})).catch((function(t){e.callbacks.onError({code:r.status,text:t.message},n,r,i)})):this.openAndSendXhr(r,n,t)}},t.openAndSendXhr=function(e,t,n){e.readyState||e.open("GET",t.url,!0);var r=this.context.headers,i=n.loadPolicy,a=i.maxTimeToFirstByteMs,o=i.maxLoadTimeMs;if(r)for(var s in r)e.setRequestHeader(s,r[s]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=a&&b(a)?a:o,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.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&&(0===n.loading.first&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),4===r)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;var a=t.status,o="text"!==t.responseType;if(a>=200&&a<300&&(o&&t.response||null!==t.responseText)){n.loading.end=Math.max(self.performance.now(),n.loading.first);var s=o?t.response:t.responseText,l="arraybuffer"===t.responseType?s.byteLength:s.length;if(n.loaded=n.total=l,n.bwEstimate=8e3*n.total/(n.loading.end-n.loading.first),!this.callbacks)return;var u=this.callbacks.onProgress;if(u&&u(n,e,s,t),!this.callbacks)return;var c={url:t.responseURL,data:s,code:a};this.callbacks.onSuccess(c,n,e,t)}else{var d=i.loadPolicy.errorRetry;Ht(d,n.retry,!1,a)?this.retry(d):(x.error(a+" while loading "+e.url),this.callbacks.onError({code:a,text:t.statusText},e,t,n))}}}},t.loadtimeout=function(){var e,t=null==(e=this.config)?void 0:e.loadPolicy.timeoutRetry;if(Ht(t,this.stats.retry,!0))this.retry(t);else{x.warn("timeout while loading "+this.context.url);var n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))}},t.retry=function(e){var t=this.context,n=this.stats;this.retryDelay=Bt(e,n.retry),n.retry++,x.warn((status?"HTTP Status "+status:"Timeout")+" while loading "+t.url+", retrying "+n.retry+"/"+e.maxNumRetry+" in "+this.retryDelay+"ms"),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)},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&&pa.test(this.loader.getAllResponseHeaders())){var t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e},t.getResponseHeader=function(e){return this.loader&&new RegExp("^"+e+":\\s*[\\d.]+\\s*$","im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null},e}(),fa=/(\d+)-(\d+)\/(\d+)/,ga=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||ya,this.controller=new self.AbortController,this.stats=new O}var t=e.prototype;return t.destroy=function(){this.loader=this.callbacks=null,this.abortInternal()},t.abortInternal=function(){var e=this.response;null!=e&&e.ok||(this.stats.aborted=!0,this.controller.abort())},t.abort=function(){var e;this.abortInternal(),null!=(e=this.callbacks)&&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 a=function(e,t){var n={method:"GET",mode:"cors",credentials:"same-origin",signal:t,headers:new self.Headers(s({},e.headers))};return e.rangeEnd&&n.headers.set("Range","bytes="+e.rangeStart+"-"+String(e.rangeEnd-1)),n}(e,this.controller.signal),o=n.onProgress,l="arraybuffer"===e.responseType,u=l?"byteLength":"length",c=t.loadPolicy,d=c.maxTimeToFirstByteMs,p=c.maxLoadTimeMs;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,a),self.clearTimeout(this.requestTimeout),t.timeout=d&&b(d)?d:p,this.requestTimeout=self.setTimeout((function(){r.abortInternal(),n.onTimeout(i,e,r.response)}),t.timeout),self.fetch(this.request).then((function(a){r.response=r.loader=a;var s=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(r.requestTimeout),t.timeout=p,r.requestTimeout=self.setTimeout((function(){r.abortInternal(),n.onTimeout(i,e,r.response)}),p-(s-i.loading.start)),!a.ok){var u=a.status,c=a.statusText;throw new va(c||"fetch, bad network response",u,a)}return i.loading.first=s,i.total=function(e){var t=e.get("Content-Range");if(t){var n=function(e){var t=fa.exec(e);if(t)return parseInt(t[2])-parseInt(t[1])+1}(t);if(b(n))return n}var r=e.get("Content-Length");if(r)return parseInt(r)}(a.headers)||i.total,o&&b(t.highWaterMark)?r.loadProgressively(a,i,e,t.highWaterMark,o):l?a.arrayBuffer():"json"===e.responseType?a.json():a.text()})).then((function(a){var s=r.response;self.clearTimeout(r.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);var l=a[u];l&&(i.loaded=i.total=l);var c={url:s.url,data:a,code:s.status};o&&!b(t.highWaterMark)&&o(i,e,a,s),n.onSuccess(c,i,e,s)})).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,i)}}))},t.getCacheAge=function(){var e=null;if(this.response){var t=this.response.headers.get("age");e=t?parseFloat(t):null}return e},t.getResponseHeader=function(e){return this.response?this.response.headers.get(e):null},t.loadProgressively=function(e,t,n,r,i){void 0===r&&(r=0);var a=new Zr,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 ya(e,t){return new self.Request(e.url,t)}var va=function(e){function t(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 l(t,e),t}(h(Error)),ma=/\s/,ba=r(r({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,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:ha,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Jr,bufferController:di,capLevelController:ra,errorController:Yt,fpsController:ia,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:Z,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,certLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null}},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},{cueHandler:{newCue:function(e,t,n,r){for(var i,a,o,s,l,u=[],c=self.VTTCue||self.TextTrackCue,d=0;d<r.rows.length;d++)if(o=!0,s=0,l="",!(i=r.rows[d]).isEmpty()){for(var p,h=0;h<i.chars.length;h++)ma.test(i.chars[h].uchar)&&o?s++:(l+=i.chars[h].uchar,o=!1);i.cueStartTime=t,t===n&&(n+=1e-4),s>=16?s--:s++;var f=Bi(l.trim()),g=Ki(t,n,f);null!=e&&null!=(p=e.cues)&&p.getCueById(g)||((a=new c(t,n,f)).id=g,a.line=d+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 vt(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:ii,subtitleTrackController:oi,timelineController:ta,audioStreamController:ei,audioTrackController:ti,emeController:oa,cmcdController:la,contentSteeringController:ua});function _a(e){return e&&"object"==typeof e?Array.isArray(e)?e.map(_a):Object.keys(e).reduce((function(t,n){return t[n]=_a(e[n]),t}),{}):e}var Ea=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 Vr,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,C(t.debug||!1,"Hls instance");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"');var n=_a(e),i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return["manifest","level","frag"].forEach((function(e){var r=("level"===e?"playlist":e)+"LoadPolicy",a=void 0===t[r],o=[];i.forEach((function(i){var s=e+"Loading"+i,l=t[s];if(void 0!==l&&a){o.push(s);var u=n[r].default;switch(t[r]={default:u},i){case"TimeOut":u.maxLoadTimeMs=l,u.maxTimeToFirstByteMs=l;break;case"MaxRetry":u.errorRetry.maxNumRetry=l,u.timeoutRetry.maxNumRetry=l;break;case"RetryDelay":u.errorRetry.retryDelayMs=l,u.timeoutRetry.retryDelayMs=l;break;case"MaxRetryTimeout":u.errorRetry.maxRetryDelayMs=l,u.timeoutRetry.maxRetryDelayMs=l}}})),o.length&&x.warn('hls.js config: "'+o.join('", "')+'" setting(s) are deprecated, use "'+r+'": '+JSON.stringify(t[r]))})),r(r({},n),t)}(e.DefaultConfig,t);this.userConfig=t,this._autoLevelCapping=-1,n.progressive&&function(e){var t=e.loader;t!==ga&&t!==ha?(x.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=ga,e.progressive=!0,e.enableSoftwareAES=!0,x.log("[config]: Progressive streaming enabled, using FetchLoader"))}(n);var i=n.abrController,a=n.bufferController,o=n.capLevelController,s=n.errorController,l=n.fpsController,u=new s(this),c=this.abrController=new i(this),d=this.bufferController=new a(this),p=this.capLevelController=new o(this),h=new l(this),f=new gt(this),g=new wt(this),y=n.contentSteeringController,v=y?new y(this):null,m=this.levelController=new Xt(this,v),b=new nn(this),E=new dn(this.config),k=this.streamController=new Xr(this,b,E);p.setStreamController(k),h.setStreamController(k);var T=[f,m,k];v&&T.splice(1,0,v),this.networkControllers=T;var A=[c,d,p,h,g,b];this.audioTrackController=this.createController(n.audioTrackController,T);var w=n.audioStreamController;w&&T.push(new w(this,b,E)),this.subtitleTrackController=this.createController(n.subtitleTrackController,T);var S=n.subtitleStreamController;S&&T.push(new S(this,b,E)),this.createController(n.timelineController,A),E.emeController=this.emeController=this.createController(n.emeController,A),this.cmcdController=this.createController(n.cmcdController,A),this.latencyController=this.createController(St,A),this.coreComponents=A,T.push(u);var I=u.onErrorOut;"function"==typeof I&&this.on(_.ERROR,I,u)}e.isSupported=function(){return function(){var e=Ge();if(!e)return!1;var t=Un(),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=e.prototype;return t.createController=function(e,t){if(e){var n=new e(this);return t&&t.push(n),n}return null},t.on=function(e,t,n){void 0===n&&(n=this),this._emitter.on(e,t,n)},t.once=function(e,t,n){void 0===n&&(n=this),this._emitter.once(e,t,n)},t.removeAllListeners=function(e){this._emitter.removeAllListeners(e)},t.off=function(e,t,n,r){void 0===n&&(n=this),this._emitter.off(e,t,n,r)},t.listeners=function(e){return this._emitter.listeners(e)},t.emit=function(e,t,n){return this._emitter.emit(e,t,n)},t.trigger=function(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(t){x.error("An internal error happened while handling event "+e+'. Error message: "'+t.message+'". Here is a stacktrace:',t),this.trigger(_.ERROR,{type:E.OTHER_ERROR,details:k.INTERNAL_EXCEPTION,fatal:!1,event:e,error:t})}return!1},t.listenerCount=function(e){return this._emitter.listenerCount(e)},t.destroy=function(){x.log("destroy"),this.trigger(_.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;var e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null},t.attachMedia=function(e){x.log("attachMedia"),this._media=e,this.trigger(_.MEDIA_ATTACHING,{media:e})},t.detachMedia=function(){x.log("detachMedia"),this.trigger(_.MEDIA_DETACHING,void 0),this._media=null},t.loadSource=function(e){this.stopLoad();var t=this.media,n=this.url,r=this.url=m.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});x.log("loadSource:"+r),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(_.MANIFEST_LOADING,{url:e})},t.startLoad=function(e){void 0===e&&(e=-1),x.log("startLoad("+e+")"),this.networkControllers.forEach((function(t){t.startLoad(e)}))},t.stopLoad=function(){x.log("stopLoad"),this.networkControllers.forEach((function(e){e.stopLoad()}))},t.swapAudioCodec=function(){x.log("swapAudioCodec"),this.streamController.swapAudioCodec()},t.recoverMediaError=function(){x.log("recoverMediaError");var e=this._media;this.detachMedia(),e&&this.attachMedia(e)},t.removeLevel=function(e,t){void 0===t&&(t=0),this.levelController.removeLevel(e,t)},a(e,[{key:"levels",get:function(){return this.levelController.levels||[]}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(e){x.log("set currentLevel:"+e),this.loadLevel=e,this.abrController.clearTimer(),this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(e){x.log("set nextLevel:"+e),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(e){x.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){x.log("set firstLevel:"+e),this.levelController.firstLevel=e}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(e){x.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&&(x.log("set autoLevelCapping:"+e),this._autoLevelCapping=e)}},{key:"bandwidthEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimate():NaN}},{key:"ttfbEstimate",get:function(){var e=this.abrController.bwEstimator;return e?e.getEstimateTTFB():NaN}},{key:"maxHdcpLevel",get:function(){return this._maxHdcpLevel},set:function(e){Ct.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}}],[{key:"version",get:function(){return"1.4.11"}},{key:"Events",get:function(){return _}},{key:"ErrorTypes",get:function(){return E}},{key:"ErrorDetails",get:function(){return k}},{key:"DefaultConfig",get:function(){return e.defaultConfig?e.defaultConfig:ba},set:function(t){e.defaultConfig=t}}]),e}();return Ea.defaultConfig=void 0,Ea},e.exports=r()}(!1)},function(e,t,n){var r,i;window,e.exports=(r=n(0),i=n(7),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 d=o(c),p={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(a[d].references++,a[d].updater(p)):a.push({identifier:c,updater:g(p,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 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=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 p(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,f=0;function g(e,t){var n,r,i;if(t.singleton){var a=f++;n=h||(h=l(t)),r=d.bind(null,n,a,!1),i=d.bind(null,n,a,!0)}else n=l(t),r=p.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 Q}));var r,i,a,o,s,l,u,c=n(0),d=n(1),p=n.n(d),h=(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),f=(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 L=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 O(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;O(this,"_tracks",[]),O(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,d=e.height,p=a.startNumber,h=a.duration,f=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:d,duration:h,rows:b,cols:_,url:r._buildTemplateUrl(f,s,t,n),customData:{bitrate:l,startNumber:p,timescale:g,presentationTimeOffset:y}}))}))})),O(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]})),O(this,"_getEssentialValue",(function(e,t){return e?e.value:t.essentialProperty?t.essentialProperty.value:""})),O(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})})),O(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,d=Math.floor(u*r*i/n);return new c.ThumbnailInfo({width:Math.floor(a),height:Math.floor(o),x:Math.floor(d%i)*a,y:Math.floor(d/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 B(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)?B(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 B(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 j(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 H(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}var G="error",K="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: "+p.a.Player.version),V(H(a=e.call(this,t,n,r)||this),"_shakaLib",p.a),V(H(a),"_adapterEventsBindings",((i={})[G]=function(e){return a._onError(e)},i[K]=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)),V(H(a),"_buffering",!1),V(H(a),"_waitingSent",!1),V(H(a),"_playingSent",!1),V(H(a),"_videoSizeUpdateTimer",null),V(H(a),"_stallInterval",null),V(H(a),"VIDEO_ERROR_CODE",3016),V(H(a),"_lastTimeDetach",NaN),V(H(a),"_requestFilterError",!1),V(H(a),"_responseFilterError",!1),V(H(a),"_isDestroyInProgress",!1),V(H(a),"_isStartOver",!0),V(H(a),"_seekRangeStart",0),V(H(a),"_isLive",!1),V(H(a),"_isStaticLive",!1),V(H(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),p.a.polyfill.installAll();var t=p.a.Player.isBrowserSupported();return e&&(window.VTTCue=void 0),o._logger.debug("isSupported:"+t),t},a._init=function(){p.a.polyfill.installAll(),this._shaka=new p.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,d=Math.max(l,0),p=Math.max(i,n("height"));p>=d?(r.minHeight=d,r.maxHeight=p):o._logger.warn("Invalid maxHeight restriction, maxHeight must be greater than minHeight",l,i);var h=Math.max(u,0),f=Math.max(a,n("width"));f>=h?(r.minWidth=h,r.maxWidth=f):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,K,this._adapterEventsBindings.adaptation),this._eventManager.listen(this._shaka,G,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 p.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 p.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&&L.isValid()&&(o._logger.debug("Creating parser for the first time"),this._manifestParser=new L(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="number"==typeof 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 p.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}}])&&j(r.prototype,i),o}(c.BaseMediaSourceAdapter);V(q,"id","DashAdapter"),V(q,"_logger",c.BaseMediaSourceAdapter.getLogger(q.id)),V(q,"_dashMimeType","application/dash+xml"),V(q,"_drmProtocols",[h,f]),V(q,"_availableDrmProtocol",[]);var X="1.35.3",Q="@playkit-js/playkit-js-dash";t.default=q,q.isSupported()&&Object(c.registerMediaSourceAdapter)(q)}]))},function(e,t,n){(function(e){
/*
 @license
 Shaka Player
 Copyright 2016 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
!function(){var n="undefined"!=typeof window?window:e,r={};for(var i in function(e,t,n){
/*
 @license
 Shaka Player
 Copyright 2023 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
var r;function i(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var a="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var o=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof e&&e,"object"==typeof self&&self,"object"==typeof t&&t];for(var r=0;r<n.length;++r){var i=n[r];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this);function s(e,t){if(t)e:{var n=o;e=e.split(".");for(var r=0;r<e.length-1;r++){var i=e[r];if(!(i in n))break e;n=n[i]}(t=t(r=n[e=e[e.length-1]]))!=r&&null!=t&&a(n,e,{configurable:!0,writable:!0,value:t})}}function l(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function u(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:i(e)}}function c(e){if(!(e instanceof Array)){e=u(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}s("Symbol",(function(e){function t(e,t){this.g=e,a(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return function e(i){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(i||"")+"_"+r++,i)}})),s("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var r=o[t[n]];"function"==typeof r&&"function"!=typeof r.prototype[e]&&a(r.prototype,e,{configurable:!0,writable:!0,value:function(){return l(i(this))}})}return e}));var d,p="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)d=Object.setPrototypeOf;else{var h;e:{var f={};try{f.__proto__={a:!0},h=f.a;break e}catch(e){}h=!1}d=h?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var g=d;function y(e,t){if(e.prototype=p(t.prototype),e.prototype.constructor=e,g)g(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.Vi=t.prototype}function v(){this.o=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.u=this.i=null}function m(e){if(e.o)throw new TypeError("Generator is already running");e.o=!0}function b(e,t){e.i={Ff:t,Pf:!0},e.g=e.m||e.j}function _(e,t,n){return e.g=n,{value:t}}function E(e){e.g=0}function k(e,t,n){e.m=t,null!=n&&(e.j=n)}function T(e,t){e.m=0,e.j=t||0}function A(e,t,n){e.g=t,e.m=n||0}function w(e,t){return e.m=t||0,t=e.i.Ff,e.i=null,t}function S(e){e.u=[e.i],e.m=0,e.j=0}function C(e,t){var n=e.u.splice(0)[0];(n=e.i=e.i||n)?n.Pf?e.g=e.m||e.j:null!=n.B&&e.j<n.B?(e.g=n.B,e.i=null):e.g=e.j:e.g=t}function x(e){this.g=new v,this.h=e}function I(e,t,n,r){try{var i=t.call(e.g.l,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");if(!i.done)return e.g.o=!1,i;var a=i.value}catch(t){return e.g.l=null,b(e.g,t),P(e)}return e.g.l=null,r.call(e.g,a),P(e)}function P(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.o=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,b(e.g,t)}if(e.g.o=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.Pf)throw t.Ff;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function D(e){this.next=function(t){return m(e.g),e.g.l?t=I(e,e.g.l.next,t,e.g.s):(e.g.s(t),t=P(e)),t},this.throw=function(t){return m(e.g),e.g.l?t=I(e,e.g.l.throw,t,e.g.s):(b(e.g,t),t=P(e)),t},this.return=function(t){return function(e,t){m(e.g);var n=e.g.l;return n?I(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),P(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function R(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(r,i){!function e(a){a.done?r(a.value):Promise.resolve(a.value).then(t,n).then(e,i)}(e.next())}))}(new D(new x(e)))}function L(){for(var e=Number(this),t=[],n=e;n<arguments.length;n++)t[n-e]=arguments[n];return t}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function M(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var a=e[i];if(t.call(n,a,i,e))return{Nf:i,v:a}}return{Nf:-1,v:void 0}}function N(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function U(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}v.prototype.s=function(e){this.h=e},v.prototype.return=function(e){this.i={return:e},this.g=this.j},v.prototype.B=function(e){this.g=e},s("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.o=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i((function(){t.l()}))}this.g.push(e)};var i=o.setTimeout;n.prototype.i=function(e){i(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i((function(){throw e}))},t.prototype.j=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.F),reject:e(this.l)}},t.prototype.F=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.H(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.C(e):this.m(e)}},t.prototype.C=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.I(t,e):this.m(e)},t.prototype.l=function(e){this.s(2,e)},t.prototype.m=function(e){this.s(1,e)},t.prototype.s=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.G(),this.u()},t.prototype.G=function(){var e=this;i((function(){if(e.A()){var t=o.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.A=function(){if(this.o)return!1;var e=o.CustomEvent,t=o.Event,n=o.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=o.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.u=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.H=function(e){var t=this.j();e.pd(t.resolve,t.reject)},t.prototype.I=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){a(e)}}:t}var i,a,o=new t((function(e,t){i=e,a=t}));return this.pd(r(e,i),r(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.pd=function(e,t){function n(){switch(r.h){case 1:e(r.i);break;case 2:t(r.i);break;default:throw Error("Unexpected state: "+r.h)}}var r=this;null==this.g?a.h(n):this.g.push(n),this.o=!0},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=u(e),a=i.next();!a.done;a=i.next())r(a.value).pd(t,n)}))},t.all=function(e){var n=u(e),i=n.next();return i.done?r([]):new t((function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,r(i.value).pd(a(o.length-1),t),i=n.next()}while(!i.done)}))},t})),s("WeakMap",(function(e){function t(e){if(this.g=(l+=Math.random()+1).toString(),e){e=u(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function r(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function i(e){if(!O(e,s)){var t=new n;a(e,s,{value:t})}}function o(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&i(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var l=0;return t.prototype.set=function(e,t){if(!r(e))throw Error("Invalid WeakMap key");if(i(e),!O(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return r(e)&&O(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return r(e)&&O(e,s)&&O(e[s],this.g)},t.prototype.delete=function(e){return!!(r(e)&&O(e,s)&&O(e[s],this.g))&&delete e[s][this.g]},t})),s("Map",(function(e){function t(){var e={};return e.ob=e.next=e.head=e}function n(e,t){var n=e.g;return l((function(){if(n){for(;n.head!=e.g;)n=n.ob;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function r(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var r=e.h[n];if(r&&O(e.h,n))for(e=0;e<r.length;e++){var i=r[e];if(t!=t&&i.key!=i.key||t===i.key)return{id:n,list:r,index:e,entry:i}}return{id:n,list:r,index:-1,entry:void 0}}function i(e){if(this.h={},this.g=t(),this.size=0,e){e=u(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(u([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&!((i=r.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!r.next().done)}catch(e){return!1}}())return e;var a=new WeakMap;i.prototype.set=function(e,t){var n=r(this,e=0===e?0:e);return n.list||(n.list=this.h[n.id]=[]),n.entry?n.entry.value=t:(n.entry={next:this.g,ob:this.g.ob,head:this.g,key:e,value:t},n.list.push(n.entry),this.g.ob.next=n.entry,this.g.ob=n.entry,this.size++),this},i.prototype.delete=function(e){return!(!(e=r(this,e)).entry||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this.h[e.id],e.entry.ob.next=e.entry.next,e.entry.next.ob=e.entry.ob,e.entry.head=null,this.size--,!0)},i.prototype.clear=function(){this.h={},this.g=this.g.ob=t(),this.size=0},i.prototype.has=function(e){return!!r(this,e).entry},i.prototype.get=function(e){return(e=r(this,e).entry)&&e.value},i.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},i.prototype.keys=function(){return n(this,(function(e){return e.key}))},i.prototype.values=function(){return n(this,(function(e){return e.value}))},i.prototype.forEach=function(e,t){for(var n,r=this.entries();!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var o=0;return i})),s("Set",(function(e){function t(e){if(this.g=new Map,e){e=u(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(u([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&(!(i=r.next()).done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&r.next().done)}catch(e){return!1}}()?e:(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach((function(r){return e.call(t,r,r,n)}))},t)})),s("Array.prototype.findIndex",(function(e){return e||function(e,t){return M(this,e,t).Nf}})),s("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),s("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length;for(0>(t=t||0)&&(t=Math.max(t+r,0));t<r;t++){var i=n[t];if(i===e||Object.is(i,e))return!0}return!1}})),s("String.prototype.includes",(function(e){return e||function(e,t){return-1!==N(this,e,"includes").indexOf(e,t||0)}})),s("Array.prototype.find",(function(e){return e||function(e,t){return M(this,e,t).v}})),s("String.prototype.startsWith",(function(e){return e||function(e,t){var n=N(this,e,"startsWith"),r=n.length,i=e.length;t=Math.max(0,Math.min(0|t,n.length));for(var a=0;a<i&&t<r;)if(n[t++]!=e[a++])return!1;return a>=i}})),s("Array.prototype.keys",(function(e){return e||function(){return U(this,(function(e){return e}))}})),s("WeakSet",(function(e){function t(e){if(this.g=new WeakMap,e){e=u(e);for(var t;!(t=e.next()).done;)this.add(t.value)}}return function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([t]);return!(!r.has(t)||r.has(n))&&(r.delete(t),r.add(n),!r.has(t)&&r.has(n))}catch(e){return!1}}()?e:(t.prototype.add=function(e){return this.g.set(e,!0),this},t.prototype.has=function(e){return this.g.has(e)},t.prototype.delete=function(e){return this.g.delete(e)},t)})),s("Array.from",(function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var r=[],i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof i){e=i.call(e);for(var a=0;!(i=e.next()).done;)r.push(t.call(n,i.value,a++))}else for(i=e.length,a=0;a<i;a++)r.push(t.call(n,e[a],a));return r}}));var F="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)O(r,i)&&(e[i]=r[i])}return e};s("Object.assign",(function(e){return e||F})),s("Array.prototype.values",(function(e){return e||function(){return U(this,(function(e,t){return t}))}})),s("Promise.prototype.finally",(function(e){return e||function(e){return this.then((function(t){return Promise.resolve(e()).then((function(){return t}))}),(function(t){return Promise.resolve(e()).then((function(){throw t}))}))}})),s("Array.prototype.entries",(function(e){return e||function(){return U(this,(function(e,t){return[e,t]}))}})),s("String.prototype.repeat",(function(e){return e||function(e){var t=N(this,null,"repeat");if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}})),s("Number.isNaN",(function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}})),s("Number.isFinite",(function(e){return e||function(e){return"number"==typeof e&&(!isNaN(e)&&1/0!==e&&-1/0!==e)}})),s("Object.values",(function(e){return e||function(e){var t,n=[];for(t in e)O(e,t)&&n.push(e[t]);return n}})),s("Math.log2",(function(e){return e||function(e){return Math.log(e)/Math.LN2}})),s("Number.MAX_SAFE_INTEGER",(function(){return 9007199254740991})),s("Math.trunc",(function(e){return e||function(e){if(e=Number(e),isNaN(e)||1/0===e||-1/0===e||0===e)return e;var t=Math.floor(Math.abs(e));return 0>e?-t:t}})),s("Object.entries",(function(e){return e||function(e){var t,n=[];for(t in e)O(e,t)&&n.push([t,e[t]]);return n}}));var B=this||self;function j(e,t){e=e.split(".");var n,r=B;e[0]in r||void 0===r.execScript||r.execScript("var "+e[0]);for(;e.length&&(n=e.shift());)e.length||void 0===t?r=r[n]&&r[n]!==Object.prototype[n]?r[n]:r[n]={}:r[n]=t}function H(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function V(e){return e.h/(1-Math.pow(e.g,e.i))}function G(){this.h=new H(2),this.j=new H(5),this.g=0,this.i=128e3,this.l=16e3}function K(){}function z(){}function W(){}function Y(e){var t=L.apply(1,arguments);X.has(e)||(X.add(e),W.apply(K,c(t)))}function q(){}H.prototype.sample=function(e,t){var n=Math.pow(this.g,e);t=t*(1-n)+n*this.h,isNaN(t)||(this.h=t,this.i+=e)},G.prototype.configure=function(e){this.i=e.minTotalBytes,this.l=e.minBytes,this.h.g=Math.exp(Math.log(.5)/e.fastHalfLife),this.j.g=Math.exp(Math.log(.5)/e.slowHalfLife)},G.prototype.sample=function(e,t){if(!(t<this.l)){var n=8e3*t/e;e/=1e3,this.g+=t,this.h.sample(e,n),this.j.sample(e,n)}},G.prototype.getBandwidthEstimate=function(e){return this.g<this.i?e:Math.min(V(this.h),V(this.j))};var X=new Set;function Q(t){if(J.has(t))return J.get(t);if(e.ManagedMediaSource){var n=ManagedMediaSource.isTypeSupported(t);return J.set(t,n),n}return!!e.MediaSource&&(n=MediaSource.isTypeSupported(t),J.set(t,n),n)}function $(){return!!e.SourceBuffer&&!!SourceBuffer.prototype&&!!SourceBuffer.prototype.changeType}e.console&&(W=function(){return console.warn.apply(console,c(L.apply(0,arguments)))},z=function(){console.error.apply(console,c(L.apply(0,arguments)))});var J=new Map;function Z(){}function ee(){}function te(){}function ne(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(re(e)==re(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;var n=ae(e);t=ae(t);for(var r=0;r<e.byteLength;r++)if(n[r]!=t[r])return!1;return!0}function re(e){return e instanceof ArrayBuffer?e:e.buffer}function ie(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function ae(e,t,n){return le(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function oe(e,t,n){return le(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint16Array)}function se(e,t,n){return le(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function le(e,t,n,r){var i=re(e),a=1;"BYTES_PER_ELEMENT"in r&&(a=r.BYTES_PER_ELEMENT);var o=((e.byteOffset||0)+e.byteLength)/a;return new r(i,e=Math.floor(Math.max(0,Math.min(((e.byteOffset||0)+t)/a,o))),Math.floor(Math.min(e+Math.max(n,0),o))-e)}function ue(){}function ce(e){this.l=new ee,(e=de[e.toLowerCase()])&&(this.l=e()),this.g=new Z,(e=pe)&&(this.g=e())}Z.prototype.extract=function(){},Z.prototype.decode=function(){return[]},Z.prototype.clear=function(){},Z.prototype.getStreams=function(){return[]},ee.prototype.init=function(){},ee.prototype.parse=function(){return[]},j("shaka.util.BufferUtils",te),te.toDataView=se,te.toUint16=oe,te.toUint8=ae,te.toArrayBuffer=ie,te.equal=ne,ue.prototype.init=function(){},ue.prototype.i=function(){},ue.prototype.h=function(){},ue.prototype.j=function(){},j("shaka.media.IClosedCaptionParser",ue),ce.prototype.init=function(e){this.l.init(e)},ce.prototype.i=function(e){for(var t=(e=u(e=this.l.parse(e))).next();!t.done;t=e.next()){var n=ae((t=t.value).packet);0<n.length&&this.g.extract(n,t.pts)}return this.g.decode()},ce.prototype.h=function(){this.g.clear()},ce.prototype.j=function(){return this.g.getStreams()},j("shaka.media.ClosedCaptionParser",ce),ce.findDecoder=function(){return pe},ce.unregisterDecoder=function(){pe=null},ce.registerDecoder=function(e){pe=e},ce.findParser=function(e){return de[e]},ce.unregisterParser=function(e){delete de[e]},ce.registerParser=function(e,t){de[e]=t};var de={},pe=null;function he(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function fe(e,t){-1<(t=e.indexOf(t))&&e.splice(t,1)}function ge(e,t,n){if(n||(n=he),e.length!=t.length)return!1;t=t.slice();for(var r={},i=(e=u(e)).next();!i.done;r={Wd:r.Wd},i=e.next()){if(r.Wd=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.Wd,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function ye(e,t,n){if(n||(n=he),e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function ve(e,t,n){this.startTime=e,this.endTime=t,this.payload=n,this.region=new Me,this.position=null,this.positionAlign=_e,this.size=0,this.textAlign=Ee,this.direction=we,this.writingMode=Se,this.lineInterpretation=Ce,this.line=null,this.lineHeight="",this.lineAlign=xe,this.displayAlign=Te,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Re,this.fontStyle=Le,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textCombineUpright="",this.textDecoration=[],this.textStrokeWidth=this.textStrokeColor=this.textShadow="",this.wrapLine=!0,this.id="",this.nestedCues=[],this.lineBreak=this.isContainer=!1,this.rubyTag=null,this.cellResolution={Ib:32,rows:15}}function me(e,t){return(e=new ve(e,t,"")).lineBreak=!0,e}function be(e,t){if(e.startTime!=t.startTime||e.endTime!=t.endTime||e.payload!=t.payload)return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n)if("nestedCues"==n){if(!ye(e.nestedCues,t.nestedCues,be))return!1}else if("region"==n||"cellResolution"==n){for(var r in e[n])if(e[n][r]!=t[n][r])return!1}else if(Array.isArray(e[n])){if(!ye(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}ve.prototype.clone=function(){var e,t=new ve(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},j("shaka.text.Cue",ve),ve.equal=be,ve.prototype.clone=ve.prototype.clone;var _e="auto";ve.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:_e};var Ee="center",ke={LEFT:"left",RIGHT:"right",CENTER:Ee,START:"start",END:"end"};ve.textAlign=ke;var Te="after",Ae={BEFORE:"before",CENTER:"center",AFTER:Te};ve.displayAlign=Ae;var we="ltr";ve.direction={HORIZONTAL_LEFT_TO_RIGHT:we,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Se="horizontal-tb";ve.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Se,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Ce=0;ve.lineInterpretation={LINE_NUMBER:Ce,PERCENTAGE:1};var xe="start",Ie={CENTER:"center",START:xe,END:"end"};ve.lineAlign=Ie;var Pe={white:"white",lime:"lime",cyan:"cyan",red:"red",yellow:"yellow",magenta:"magenta",blue:"blue",black:"black"};ve.defaultTextColor=Pe;var De={bg_white:"white",bg_lime:"lime",bg_cyan:"cyan",bg_red:"red",bg_yellow:"yellow",bg_magenta:"magenta",bg_blue:"blue",bg_black:"black"};ve.defaultTextBackgroundColor=De;var Re=400;ve.fontWeight={NORMAL:Re,BOLD:700};var Le="normal",Oe={NORMAL:Le,ITALIC:"italic",OBLIQUE:"oblique"};function Me(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ne,this.scroll=Ue}ve.fontStyle=Oe,ve.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},j("shaka.text.CueRegion",Me);var Ne=1;Me.units={PX:0,PERCENTAGE:Ne,LINES:2};var Ue="";function Fe(){}function Be(e,t,n){He[e.toLowerCase().split(";")[0]+"-"+n]={priority:n,Qd:t}}function je(e,t){for(var n=e.toLowerCase().split(";")[0],r=u([ze,Ke,Ge,Ve]),i=r.next();!i.done;i=r.next())if(i=He[n+"-"+i.value]){var a=i.Qd(),o=a.isSupported(e,t);if(a.destroy(),o)return i.Qd}return null}Me.scrollMode={NONE:Ue,UP:"up"},Fe.prototype.destroy=function(){},j("shaka.transmuxer.TransmuxerEngine",Fe),Fe.findTransmuxer=je,Fe.unregisterTransmuxer=function(e,t){delete He[e.toLowerCase().split(";")[0]+"-"+t]},Fe.registerTransmuxer=Be,Fe.prototype.destroy=Fe.prototype.destroy;var He={},Ve=1,Ge=2,Ke=3,ze=4;Fe.PluginPriority={FALLBACK:Ve,PREFERRED_SECONDARY:Ge,PREFERRED:Ke,APPLICATION:ze};
/*
 @license
 Copyright 2008 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/
var We=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");
/*
 @license
 Copyright 2006 The Closure Library Authors
 SPDX-License-Identifier: Apache-2.0
*/function Ye(e){var t;e instanceof Ye?(qe(this,e.Xa),this.Vb=e.Vb,Xe(this,e.jb),Qe(this,e.ic),this.Ea=e.Ea,$e(this,e.g.clone()),this.Jb=e.Jb):e&&(t=String(e).match(We))?(qe(this,t[1]||"",!0),this.Vb=Je(t[2]||""),Xe(this,t[3]||"",!0),Qe(this,t[4]),this.Ea=Je(t[5]||"",!0),$e(this,t[6]||"",!0),this.Jb=Je(t[7]||"")):this.g=new ot(null)}function qe(e,t,n){e.Xa=n?Je(t,!0):t,e.Xa&&(e.Xa=e.Xa.replace(/:$/,""))}function Xe(e,t,n){e.jb=n?Je(t,!0):t}function Qe(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.ic=t}else e.ic=null}function $e(e,t,n){t instanceof ot?e.g=t:(n||(t=Ze(t,it)),e.g=new ot(t))}function Je(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Ze(e,t,n){return null!=e?(e=encodeURI(e).replace(t,et),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function et(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(r=Ye.prototype).Xa="",r.Vb="",r.jb="",r.ic=null,r.Ea="",r.Jb="",r.toString=function(){var e=[],t=this.Xa;if(t&&e.push(Ze(t,tt,!0),":"),t=this.jb){e.push("//");var n=this.Vb;n&&e.push(Ze(n,tt,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.ic)&&e.push(":",String(t))}return(t=this.Ea)&&(this.jb&&"/"!=t.charAt(0)&&e.push("/"),e.push(Ze(t,"/"==t.charAt(0)?rt:nt,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.Jb)&&e.push("#",Ze(t,at)),e.join("")},r.resolve=function(e){var t=this.clone();"data"===t.Xa&&(t=new Ye);var n=!!e.Xa;n?qe(t,e.Xa):n=!!e.Vb,n?t.Vb=e.Vb:n=!!e.jb,n?Xe(t,e.jb):n=null!=e.ic;var r=e.Ea;if(n)Qe(t,e.ic);else if(n=!!e.Ea){if("/"!=r.charAt(0))if(this.jb&&!this.Ea)r="/"+r;else{var i=t.Ea.lastIndexOf("/");-1!=i&&(r=t.Ea.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o<r.length;){var s=r[o++];"."==s?i&&o==r.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),i&&o==r.length&&a.push("")):(a.push(s),i=!0)}r=a.join("/")}}return n?t.Ea=r:n=""!==e.g.toString(),n?$e(t,e.g.clone()):n=!!e.Jb,n&&(t.Jb=e.Jb),t},r.clone=function(){return new Ye(this)};var tt=/[#\/\?@]/g,nt=/[#\?:]/g,rt=/[#\?]/g,it=/[#\?@]/g,at=/#/g;function ot(e){this.g=e||null}function st(e){if(!e.ua&&(e.ua={},e.Kc=0,e.g))for(var t=e.g.split("&"),n=0;n<t.length;n++){var r=t[n].indexOf("="),i=null;if(0<=r){var a=t[n].substring(0,r);i=t[n].substring(r+1)}else a=t[n];a=decodeURIComponent(a.replace(/\+/g," ")),i=i||"",e.add(a,decodeURIComponent(i.replace(/\+/g," ")))}}function lt(e){return st(e),e.Kc}function ut(e,t,n){var r=L.apply(3,arguments);if(this.severity=e,this.category=t,this.code=n,this.data=r,this.handled=!1,this.message="Shaka Error "+this.code,ct)try{throw Error(this.message||"Shaka Error")}catch(e){this.stack=e.stack}}(r=ot.prototype).ua=null,r.Kc=null,r.add=function(e,t){st(this),this.g=null;var n=this.ua.hasOwnProperty(e)?this.ua[e]:null;return n||(this.ua[e]=n=[]),n.push(t),this.Kc++,this},r.set=function(e,t){return st(this),this.g=null,this.ua.hasOwnProperty(e)?this.ua[e]=[t]:this.add(e,t),this},r.get=function(e){return st(this),this.ua[e]||[]},r.toString=function(){if(this.g)return this.g;if(!this.ua)return"";var e,t=[];for(e in this.ua)for(var n=encodeURIComponent(e),r=this.ua[e],i=0;i<r.length;i++){var a=n;""!==r[i]&&(a+="="+encodeURIComponent(r[i])),t.push(a)}return this.g=t.join("&")},r.clone=function(){var e=new ot;if(e.g=this.g,this.ua){var t,n={};for(t in this.ua)n[t]=this.ua[t].concat();e.ua=n,e.Kc=this.Kc}return e},ut.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null,"  ")},j("shaka.util.Error",ut);var ct=!0;function dt(e,t){if(0==t.length)return e;if(1==e.length&&1==t.length){var n=new Ye(e[0]);return t=new Ye(t[0]),[n.resolve(t).toString()]}t=t.map((function(e){return new Ye(e)})),n=[];for(var r=(e=u(e)).next();!r.done;r=e.next()){r=new Ye(r.value);for(var i=u(t),a=i.next();!a.done;a=i.next())n.push(r.resolve(a.value).toString())}return n}function pt(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:t||[],keyIds:new Set}}function ht(e,t){if(1==t.length)return t[0];if(null!=(e=ft(e,t)))return e;throw new ut(2,4,4025,t)}function ft(e,t){for(var n=u(vt[e]),r=n.next();!r.done;r=n.next()){r=r.value;for(var i=u(t),a=i.next();!a.done;a=i.next())if(a=a.value,r.test(a.trim()))return a.trim()}return e==gt?"":null}ut.Severity={RECOVERABLE:1,CRITICAL:2},ut.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},ut.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,SEGMENT_MISSING:1011,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_EXTRACT_CUE_START_TIME:2009,INVALID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,CHAPTERS_TRACK_FAILED:2015,UNSUPPORTED_EXTERNAL_THUMBNAILS_URI:2017,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,TRANSMUXING_FAILED:3018,CONTENT_TRANSFORMATION_FAILED:3019,MSS_MISSING_DATA_FOR_TRANSMUXING:3020,MSS_TRANSMUXING_CODEC_UNKNOWN:3021,MSS_TRANSMUXING_FAILED:3022,TRANSMUXING_NO_VIDEO_DATA: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,RESTRICTIONS_CANNOT_BE_MET:4012,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_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,CONTENT_UNSUPPORTED_BY_BROWSER:4032,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED:4040,HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED:4041,NO_WEB_CRYPTO_API:4042,CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM:4045,MSS_INVALID_XML:4046,MSS_LIVE_CONTENT_NOT_SUPPORTED:4047,AES_128_INVALID_IV_LENGTH:4048,AES_128_INVALID_KEY_LENGTH:4049,DASH_CONFLICTING_AES_128:4050,DASH_UNSUPPORTED_AES_128:4051,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,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,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,MIN_HDCP_VERSION_NOT_MATCH:6018,ERROR_CHECKING_HDCP_VERSION:6019,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,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,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,MODIFY_OPERATION_NOT_SUPPORTED:9016,INDEXED_DB_INIT_TIMED_OUT:9017,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004,MT_AD_MANAGER_NOT_INITIALIZED:10005};var gt="text",yt={$:"video",O:"audio",ha:gt,Cc:"image",Wh:"application"},vt={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4$/,/^dts[cex]$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av01/,/^dvh/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function mt(){}function bt(e,t){var n=e;return t&&!Ct.includes(e)&&(n+='; codecs="'+t+'"'),n}function _t(e,t){return t&&(e+='; codecs="'+t+'"'),e}function Et(e,t,n){var r=bt(e,t);return je(t=_t(e,t))?(e=je(t))?(n=(e=e()).convertCodecs(n,t),e.destroy()):n=t:n="video/mp2t"!=e&&"audio"==n?r.replace("video","audio"):r,n}function kt(e){var t=St(e);switch(e=t[0],t=t[1].toLowerCase(),!0){case"mp4a"===e&&"69"===t:case"mp4a"===e&&"6b"===t:case"mp4a"===e&&"40.34"===t:return"mp3";case"mp4a"===e&&"66"===t:case"mp4a"===e&&"67"===t:case"mp4a"===e&&"68"===t:case"mp4a"===e&&"40.2"===t:case"mp4a"===e&&"40.02"===t:case"mp4a"===e&&"40.5"===t:case"mp4a"===e&&"40.05"===t:case"mp4a"===e&&"40.29"===t:case"mp4a"===e&&"40.42"===t:return"aac";case"mp4a"===e&&"a5"===t:return"ac-3";case"mp4a"===e&&"a6"===t:return"ec-3";case"mp4a"===e&&"b2"===t:return"dtsx";case"mp4a"===e&&"a9"===t:return"dtsc";case"avc1"===e:case"avc3"===e:return"avc";case"hvc1"===e:case"hev1"===e:return"hevc";case"dvh1"===e:case"dvhe"===e:return"dovi"}return e}function Tt(e){for(var t=[],n=(e=u(e.split(","))).next();!n.done;n=e.next())n=St(n.value),t.push(n[0]);return t.sort().join(",")}function At(e){return e.split(";")[0]}function wt(e){return(e=e.split(/ *; */)).shift(),(e=e.find((function(e){return e.startsWith("codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function St(e){var t=(e=e.split("."))[0];return e.shift(),[t,e.join(".")]}j("shaka.util.MimeUtils",mt),mt.getFullTypeWithAllCodecs=_t,mt.getFullType=bt,(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");var Ct=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"];function xt(e){this.i=null,this.j=e,this.u=!1,this.l=this.s=0,this.m=1/0,this.h=this.g=null,this.A="",this.o=new Map}function It(e){return!!Rt[e]||("application/cea-608"==e||"application/cea-708"==e)&&!!pe}function Pt(e,t,n){if(e.A=t,t=e.o.get(t))for(var r=u(t.keys()),i=r.next();!i.done;i=r.next())(i=t.get(i.value).filter((function(e){return e.endTime<=n})))&&e.j.append(i)}function Dt(e,t,n){t.startTime+=n,t.endTime+=n;for(var r=(t=u(t.nestedCues)).next();!r.done;r=t.next())Dt(e,r.value,n)}xt.prototype.destroy=function(){return this.j=this.i=null,this.o.clear(),Promise.resolve()},xt.prototype.remove=function(e,t){var n=this;return R((function(r){if(1==r.g)return _(r,Promise.resolve(),2);!n.j||!n.j.remove(e,t)||null==n.g||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),E(r)}))},j("shaka.text.TextEngine",xt),xt.prototype.destroy=xt.prototype.destroy,xt.findParser=function(e){return Rt[e]},xt.unregisterParser=function(e){delete Rt[e]},xt.registerParser=function(e,t){Rt[e]=t};var Rt={};function Lt(e,t){return e.concat(t)}function Ot(){}function Mt(e){return null!=e}function Nt(){}function Ut(e,t){return e=jt(e),t=jt(t),e.split("-")[0]==t.split("-")[0]}function Ft(e,t){return e=jt(e),t=jt(t),e=e.split("-"),t=t.split("-"),e[0]==t[0]&&1==e.length&&2==t.length}function Bt(e,t){return e=jt(e),t=jt(t),e=e.split("-"),t=t.split("-"),2==e.length&&2==t.length&&e[0]==t[0]}function jt(e){var t=e.split("-x-"),n=t[0].split("-");return e=n[0]||"",n=n[1]||"",t=t[1]?"x-"+t[1]:"",e=e.toLowerCase(),e=zt.get(e)||e,((n=n.toUpperCase())?e+"-"+n:e)+(t?"-"+t:"")}function Ht(e,t){return e=jt(e),(t=jt(t))==e?4:Ft(t,e)?3:Bt(t,e)?2:Ft(e,t)?1:0}function Vt(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),zt.get(e)||e}function Gt(e){return e.language?jt(e.language):e.audio&&e.audio.language?jt(e.audio.language):e.video&&e.video.language?jt(e.video.language):"und"}function Kt(e,t){e=jt(e);var n=new Set,r=u(t);for(t=r.next();!t.done;t=r.next())n.add(jt(t.value));for(t=(r=u(n)).next();!t.done;t=r.next())if((t=t.value)==e)return t;for(t=(r=u(n)).next();!t.done;t=r.next())if(Ft(t=t.value,e))return t;for(t=(r=u(n)).next();!t.done;t=r.next())if(Bt(t=t.value,e))return t;for(t=(n=u(n)).next();!t.done;t=n.next())if(Ft(e,t=t.value))return t;return null}j("shaka.util.LanguageUtils",Nt),Nt.findClosestLocale=Kt,Nt.getLocaleForVariant=Gt,Nt.getLocaleForText=function(e){return jt(e.language||"und")},Nt.getBase=Vt,Nt.relatedness=Ht,Nt.areSiblings=function(e,t){var n=Vt(e),r=Vt(t);return e!=n&&t!=r&&n==r},Nt.normalize=jt,Nt.isSiblingOf=Bt,Nt.isParentOf=Ft,Nt.areLanguageCompatible=Ut,Nt.areLocaleCompatible=function(e,t){return(e=jt(e))==(t=jt(t))};var zt=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze","cs"],["dan","da"],["deu","de"],["div","dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice","is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao","mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san","sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie","vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);function Wt(){this.g={}}function Yt(e){var t=new WeakSet;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;t.add(n);var i,a=r?[]:{};for(i in n)a[i]=e(n[i]);return r&&(a.length=n.length),a}}(e)}function qt(e){var t,n={};for(t in e)n[t]=e[t];return n}function Xt(e){this.h=e,this.g=null}function Qt(e){this.h=e,this.g=null}function $t(){var t=e.ManagedMediaSource||e.MediaSource;return!(!t||!t.isTypeSupported)}function Jt(e){return""!=cn().canPlayType(e)}function Zt(){return!!navigator.userAgent.match(/Edge?\//)}function en(){return un("Xbox One")}function tn(){return un("Tizen")}function nn(){return un("Tizen 3")}function rn(){return un("Tizen 2")}function an(){return un("Web0S")&&un("Chrome/38.0.2125.122 Safari/537.36")}function on(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!tn()&&!un("PC=EOS")&&!un("VirginMedia")&&!un("SOPOpenBrowser")&&!sn()&&!un("AFT")}function sn(){return un("PlayStation 4")}function ln(){if(!on())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function un(e){return(navigator.userAgent||"").includes(e)}function cn(){return pn||(dn||(dn=new Qt((function(){pn=null}))),(pn=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(pn=document.createElement("video")),dn.U(1),pn)}(r=Wt.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},r.get=function(e){return(e=this.g[e])?e.slice():null},r.remove=function(e,t){e in this.g&&(this.g[e]=this.g[e].filter((function(e){return e!=t})),0==this.g[e].length&&delete this.g[e])},r.forEach=function(e){for(var t in this.g)e(t,this.g[t])},r.size=function(){return Object.keys(this.g).length},r.keys=function(){return Object.keys(this.g)},Xt.prototype.U=function(t){var n=this;this.stop();var r=!0,i=null;return this.g=function(){e.clearTimeout(i),r=!1},i=e.setTimeout((function(){r&&n.h()}),1e3*t),this},Xt.prototype.stop=function(){this.g&&(this.g(),this.g=null)},Qt.prototype.lc=function(){return this.stop(),this.h(),this},Qt.prototype.U=function(e){var t=this;return this.stop(),this.g=new Xt((function(){t.h()})).U(e),this},Qt.prototype.Wa=function(e){var t=this;return this.stop(),this.g=new Xt((function(){t.g.U(e),t.h()})).U(e),this},Qt.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},j("shaka.util.Timer",Qt),Qt.prototype.stop=Qt.prototype.stop,Qt.prototype.tickEvery=Qt.prototype.Wa,Qt.prototype.tickAfter=Qt.prototype.U,Qt.prototype.tickNow=Qt.prototype.lc;var dn=null,pn=null;function hn(){}function fn(e,t,n,r){var i=e.variants;if((t.length||n.length)&&(i=function(e,t,n){for(var r={},i=(t=u(t)).next();!i.done;r={be:r.be},i=t.next())if(r.be=i.value,(i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.be)}}(r))).length){e=i;break}for(r={},n=u(n),t=n.next();!t.done;r={Vd:r.Vd},t=n.next())if(r.Vd=t.value,(t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.Vd)}}(r))).length){e=t;break}return e}(i,t,n)),r.length){for(t=new Wt,i=(n=u(i)).next();!i.done;i=n.next())i=i.value,t.push(String(i.video.width||0),i);var a=[];t.forEach((function(e,t){e=0;for(var n=[],i={},o=(t=u(t)).next();!o.done;i={Bc:i.Bc},o=t.next())i.Bc=o.value,(o=r.filter(function(e){return function(t){return e.Bc.decodingInfos[0][t]}}(i)).length)>e?(e=o,n=[i.Bc]):o==e&&n.push(i.Bc);a.push.apply(a,c(n))})),i=a}n=new Set,t=new Set;var o=u(i);for(i=o.next();!i.done;i=o.next())(i=i.value).audio&&n.add(i.audio),i.video&&t.add(i.video);n=Array.from(n).sort((function(e,t){return e.bandwidth-t.bandwidth}));var s=[];for(i=new Map,o=(n=u(n)).next();!o.done;o=n.next()){var l=(o=o.value).language+(o.channelsCount||0)+(o.audioSamplingRate||0)+o.roles.join(",")+o.label+o.groupId+o.fastSwitching,d=i.get(l)||[];if(d.length){var p=d[d.length-1],h=kt(p.codecs),f=kt(o.codecs);h==f&&o.bandwidth>p.bandwidth&&(d.push(o),s.push(o.id))}else d.push(o),s.push(o.id);i.set(l,d)}n=Array.from(t).sort((function(e,t){return e.bandwidth&&t.bandwidth?e.bandwidth-t.bandwidth:e.width-t.width})),t=$();var g=[];for(i=new Map,o=(n=u(n)).next();!o.done;o=n.next()){if(o=o.value,l=Math.round(o.frameRate||0)+(o.hdr||"")+o.fastSwitching,(d=i.get(l)||[]).length){if(p=d[d.length-1],!t&&(h=kt(p.codecs))!==(f=kt(o.codecs)))continue;o.width>p.width||o.height>p.height?(d.push(o),g.push(o.id)):o.width==p.width&&o.height==p.height&&((h=kt(p.codecs))==(f=kt(o.codecs))&&o.bandwidth<p.bandwidth&&(d.push(o),g.push(o.id)))}else d.push(o),g.push(o.id);i.set(l,d)}e.variants=e.variants.filter((function(e){var t=e.audio;return e=e.video,!(t&&!s.includes(t.id)||e&&!g.includes(e.id))}))}function gn(e,t,n){function r(e,t,n){return e>=t&&e<=n}var i=e.video;return!(i&&i.width&&i.height&&(!r(i.width,t.minWidth,Math.min(t.maxWidth,n.width))||!r(i.height,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function yn(e,t){return R((function(n){return 1==n.g?_(n,vn(e,t,0<t.offlineSessionIds.length),2):(function(e){e.textStreams=e.textStreams.filter((function(e){return It(e=bt(e.mimeType,e.codecs))}))}(t),_(n,function(e){var t,n,r,i,a,o,s;return R((function(l){switch(l.g){case 1:t=[],n=u(e.imageStreams),r=n.next();case 2:if(r.done){l.B(4);break}if(i=r.value,"application/mp4"==(a=i.mimeType)&&"mjpg"==i.codecs&&(a="image/jpg"),Fn.has(a)){l.B(5);break}if(!(o=Bn.get(a))){Fn.set(a,!1),l.B(5);break}return _(l,function(e){return new Promise((function(t){var n=new Image;n.src=e,"decode"in n?n.decode().then((function(){t(!0)})).catch((function(){t(!1)})):n.onload=n.onerror=function(){t(2===n.height)}}))}(o),7);case 7:s=l.h,Fn.set(a,s);case 5:Fn.get(a)&&t.push(i),r=n.next(),l.B(2);break;case 4:e.imageStreams=t,E(l)}}))}(t),0))}))}function vn(e,t,n){var r,i,a,o;return R((function(s){if(1==s.g)return _(s,bn(t.variants,n,!1,[]),2);r=null,e&&(i=e.g)&&(r=i.keySystem),a=yt,o=en(),t.variants=t.variants.filter((function(e){var t=e.video,n=t&&t.width||0,i=t&&t.height||0;if(o&&t&&(1920<n||1080<i)&&(t.codecs.includes("avc1.")||t.codecs.includes("avc3.")))return On(e),!1;if(t){if(n=kn(t.codecs),t.codecs.includes(",")){if(i=t.codecs.split(","),n=kn(n=ht(a.$,i)),i=En(i=ht(a.O,i)),!Q(Et(t.mimeType,i,a.O)))return!1;n=[n,i].join()}if(!Q(i=Et(t.mimeType,n,a.$)))return!1;t.codecs=n}if(t=e.audio){if(n=En(t.codecs),!Q(i=Et(t.mimeType,n,a.O)))return!1;t.codecs=n}return(t=e.decodingInfos.some((function(e){return!(!e.supported||r&&(e=e.keySystemAccess)&&e.keySystem!=r)})))||On(e),t})),E(s)}))}function mn(e,t){var n,r,i,a,o,s,l;return R((function(c){if(1==c.g)return n=function e(t){var n=[];for(r in t)n.push(r);n.sort();for(var r=[],i=(n=u(n)).next();!i.done;i=n.next()){var a=i.value;i=JSON.stringify(a),(a=t[a])instanceof Object?(a=e(a),r.push(i+":"+a)):(a=JSON.stringify(a),r.push(i+":"+a))}return"{"+r.join(",")+"}"}(t),(r=Nn)[n]?(e.decodingInfos.push(r[n]),c.B(0)):_(c,function(e){var t=[""];e.video&&(t=wt(e.video.contentType).split(","));var n=[""];e.audio&&(n=wt(e.audio.contentType).split(","));for(var r=[],i=(t=u(t)).next();!i.done;i=t.next()){i=i.value;for(var a={},o=u(n),s=o.next();!s.done;a={Eb:a.Eb},s=o.next())s=s.value,a.Eb=Yt(e),e.video&&(a.Eb.video.contentType=bt(At(a.Eb.video.contentType),i)),e.audio&&(a.Eb.audio.contentType=bt(At(a.Eb.audio.contentType),s)),r.push(new Promise(function(e){return function(t,n){navigator.mediaCapabilities.decodingInfo(e.Eb).then((function(e){t(e)})).catch(n)}}(a)))}return Promise.all(r).catch((function(){return JSON.stringify(e),null}))}(t),3);if((i=c.h)&&i.length){for(a=null,o=u(i),s=o.next();!s.done;s=o.next())l=s.value,a?(a.supported=a.supported&&l.supported,a.powerEfficient=a.powerEfficient&&l.powerEfficient,a.smooth=a.smooth&&l.smooth,l.keySystemAccess||(a.keySystemAccess=null)):a=l;a&&(r[n]=a,e.decodingInfos.push(a))}E(c)}))}function bn(e,t,n,r){var i,a,o,s,l,c,d,p,h,f,g,y,v,m,b,E;return R((function(k){switch(k.g){case 1:if(e.some((function(e){return e.decodingInfos.length})))return k.return();i={},a=u(r),o=a.next();case 2:if(o.done){k.B(4);break}i.Xd=o.value,s=!1,l=u(e),c=l.next();case 5:if(c.done){k.B(7);break}d=c.value,p=_n(d,t,n).filter((T=i,function(e){return(e.keySystemConfiguration&&e.keySystemConfiguration.keySystem)===T.Xd})),h=u(p),f=h.next();case 8:if(f.done){k.B(10);break}return g=f.value,_(k,mn(d,g),9);case 9:f=h.next(),k.B(8);break;case 10:d.decodingInfos.length&&(s=!0),c=l.next(),k.B(5);break;case 7:if(s)return k.return();i={Xd:i.Xd},o=a.next(),k.B(2);break;case 4:y=u(e),c=y.next();case 12:if(c.done){k.B(0);break}v=c.value,m=_n(v,t,n).filter((function(e){return!(e=e.keySystemConfiguration&&e.keySystemConfiguration.keySystem)||!r.includes(e)})),b=u(m),f=b.next();case 15:if(f.done){c=y.next(),k.B(12);break}return E=f.value,_(k,mn(v,E),16);case 16:f=b.next(),k.B(15)}var T}))}function _n(e,t,n){var r=e.audio,i=e.video;if(n={type:n?"file":"media-source"},i){var a=i.codecs;if(i.codecs.includes(",")){var o=i.codecs.split(",");a=kn(a=ht("video",o)),o=En(o=ht("audio",o)),o=Et(i.mimeType,o,"audio"),n.audio={contentType:o,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1}}if(a=kn(a),a=Et(i.mimeType,a,"video"),n.video={contentType:a,width:i.width||64,height:i.height||64,bitrate:i.bandwidth||e.bandwidth||1,framerate:i.frameRate||1},i.hdr)switch(i.hdr){case"SDR":n.video.transferFunction="srgb";break;case"PQ":n.video.transferFunction="pq";break;case"HLG":n.video.transferFunction="hlg"}}if(r&&(a=En(r.codecs),a=Et(r.mimeType,a,"audio"),n.audio={contentType:a,channels:r.channelsCount||2,bitrate:r.bandwidth||e.bandwidth||1,samplerate:r.audioSamplingRate||1,spatialRendering:r.spatialAudio}),!(o=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])).length)return[n];e=[],a=new Map;for(var s=(o=u(o)).next();!s.done;s=o.next()){var l=s.value;a.get(l.keySystem)||a.set(l.keySystem,[]),a.get(l.keySystem).push(l)}o=t?"required":"optional",t=t?["persistent-license"]:["temporary"];for(var c=(l=u(a.keys())).next();!c.done;c=l.next()){var d=c.value;c=Object.assign({},n);var p=a.get(d);for(d={keySystem:d,initDataType:"cenc",persistentState:o,distinctiveIdentifier:"optional",sessionTypes:t},s=(p=u(p)).next();!s.done;s=p.next()){if((s=s.value).initData&&s.initData.length){for(var h=new Set,f=u(s.initData),g=f.next();!g.done;g=f.next())h.add(g.value.initDataType);d.initDataType=s.initData[0].initDataType}s.distinctiveIdentifierRequired&&(d.distinctiveIdentifier="required"),s.persistentStateRequired&&(d.persistentState="required"),s.sessionType&&(d.sessionTypes=[s.sessionType]),r&&(""!=s.audioRobustness?d.audio?d.audio.robustness=d.audio.robustness||s.audioRobustness:d.audio={robustness:s.audioRobustness}:d.audio||(d.audio={})),i&&(""!=s.videoRobustness?d.video?d.video.robustness=d.video.robustness||s.videoRobustness:d.video={robustness:s.videoRobustness}:d.video||(d.video={}))}c.keySystemConfiguration=d,e.push(c)}return e}function En(e){return"fLaC"===e?"flac":"Opus"===e?"opus":tn()&&"ac-3"==e.toLowerCase()?"ec-3":e}function kn(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return e=t.shift()+".",(e+=parseInt(t.shift(),10).toString(16))+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}else if("vp9"==e)return"vp09.00.41.08";return e}function Tn(e){var t=e.audio,n=e.video,r=t?t.mimeType:null,i=n?n.mimeType:null,a=t?t.codecs:null,o=n?n.codecs:null,s=[];o&&s.push(o),a&&s.push(a);var l=[];n&&l.push(n.mimeType),t&&l.push(t.mimeType),l=l[0]||null;var c=[];t&&c.push(t.kind),n&&c.push(n.kind),c=c[0]||null;var d=new Set;if(t)for(var p=u(t.roles),h=p.next();!h.done;h=p.next())d.add(h.value);if(n)for(h=(p=u(n.roles)).next();!h.done;h=p.next())d.add(h.value);return e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:c,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:l,audioMimeType:r,videoMimeType:i,codecs:s.join(", "),audioCodec:a,videoCodec:o,primary:e.primary,roles:Array.from(d),audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null,e.hdr=n.hdr||null,e.videoLayout=n.videoLayout||null),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.spatialAudio=t.spatialAudio,e.label=t.label,e.audioRoles=t.roles,e.accessibilityPurpose=t.accessibilityPurpose,e.originalLanguage=t.originalLanguage),e}function An(e){return{id:e.id,active:!1,type:gt,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null,accessibilityPurpose:e.accessibilityPurpose,originalLanguage:e.originalLanguage}}function wn(e){var t=e.width||null,n=e.height||null,r=null;e.segmentIndex&&(r=e.segmentIndex.get(0));var i=e.tilesLayout;return r&&(i=r.tilesLayout||i),i&&null!=t&&(t/=Number(i.split("x")[0])),i&&null!=n&&(n/=Number(i.split("x")[1])),{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:t,height:n,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:e.mimeType,audioMimeType:null,videoMimeType:null,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:i||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId,accessibilityPurpose:null,originalLanguage:null}}function Sn(e){return e.__shaka_id||(e.__shaka_id=Un++),e.__shaka_id}function Cn(e){var t=In(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),"subtitles"==e.kind&&(t.mimeType="text/vtt"),e.kind&&(t.roles=[e.kind]),"forced"==e.kind&&(t.forced=!0),t}function xn(e){var t=In(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function In(e){var t=e.language;return{id:Sn(e),active:!1,type:"",bandwidth:0,language:jt(t||"und"),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,videoLayout:null,mimeType:null,audioMimeType:null,videoMimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioRoles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null,accessibilityPurpose:null,originalLanguage:t}}function Pn(e){return e.allowedByApplication&&e.allowedByKeySystem&&0==e.disabledUntilTime}function Dn(e){return e.filter((function(e){return Pn(e)}))}function Rn(e,t,n,r){var i=e,a=e.filter((function(e){return e.primary}));a.length&&(i=a);var o=i.length?i[0].language:"";if(i=i.filter((function(e){return e.language==o})),t){var s=Kt(jt(t),e.map((function(e){return e.language})));s&&(i=e.filter((function(e){return jt(e.language)==s})))}if(i=i.filter((function(e){return e.forced==r})),n){if((e=Ln(i,n)).length)return e}else if((e=i.filter((function(e){return 0==e.roles.length}))).length)return e;return(e=i.map((function(e){return e.roles})).reduce(Lt,[])).length?Ln(i,e[0]):i}function Ln(e,t){return e.filter((function(e){return e.roles.includes(t)}))}function On(e){var t=[];return e.audio&&t.push(Mn(e.audio)),e.video&&t.push(Mn(e.video)),t.join(", ")}function Mn(e){return"audio"==e.type?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:"video"==e.type?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}j("shaka.util.StreamUtils",hn),hn.meetsRestrictions=gn;var Nn={},Un=0,Fn=(new Map).set("image/svg+xml",!0).set("image/png",!0).set("image/jpeg",!0).set("image/jpg",!0),Bn=(new Map).set("image/webp","data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA").set("image/avif","data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=");function jn(){var e=this;this.o=null,this.s=!1,this.i=new G,this.A=null,navigator.connection&&navigator.connection.addEventListener&&(this.A=function(){if(e.s&&e.g.useNetworkInformation){e.i=new G,e.g&&e.i.configure(e.g.advanced);var t=e.chooseVariant();t&&navigator.onLine&&e.o(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}},navigator.connection.addEventListener("change",this.A)),this.m=[],this.C=1,this.G=!1,this.h=this.l=this.g=this.u=null,this.F=new Qt((function(){if(e.g.restrictToElementSize){var t=e.chooseVariant();t&&e.o(t,e.g.clearBufferSwitch,e.g.safeMarginSwitch)}})),this.j=null}function Hn(e,t,n,r,i){if(e.j){var a=e.j.Kf();a&&(n=n.filter((function(e){return!e.bandwidth||!a||e.bandwidth<=a})))}return t&&(n=n.filter((function(e){return gn(e,t,{width:i,height:r})}))),n.sort((function(e,t){return e.bandwidth-t.bandwidth}))}(r=jn.prototype).stop=function(){this.o=null,this.s=!1,this.m=[],this.C=1,this.l=this.u=null,this.h&&(this.h.disconnect(),this.h=null),this.F.stop(),this.j=null},r.release=function(){navigator.connection&&navigator.connection.removeEventListener&&(navigator.connection.removeEventListener("change",this.A),this.A=null),this.F=null},r.init=function(e){this.o=e},r.chooseVariant=function(t){t=void 0!==t&&t;var n=1/0,r=1/0;if(this.g.restrictToScreenSize&&(r=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio,n=e.screen.height*r,r*=e.screen.width),this.h&&this.g.restrictToElementSize){var i=this.g.ignoreDevicePixelRatio?1:e.devicePixelRatio;n=Math.min(n,this.l.clientHeight*i),r=Math.min(r,this.l.clientWidth*i)}var a=this.m.filter((function(e){return!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)}));if(a.length||(a=this.m),i=a,t&&a.length!=this.m.length&&(i=this.m.filter((function(e){return!!(e.audio&&e.audio.fastSwitching||e.video&&e.video.fastSwitching)}))),t=Hn(this,this.g.restrictions,i,1/0,1/0),1/0!=n||1/0!=r){for(t=function(e){for(var t=[],n=(e=u(e)).next();!n.done;n=e.next())(n=n.value.video)&&n.height&&n.width&&t.push({height:n.height,width:n.width});return t.sort((function(e,t){return e.width-t.width}))}(t),a=(t=u(t)).next();!a.done;a=t.next())if((a=a.value).height>=n&&a.width>=r){n=a.height,r=a.width;break}t=Hn(this,this.g.restrictions,i,n,r)}for(n=this.getBandwidthEstimate(),i.length&&!t.length&&(t=[(t=Hn(this,null,i,1/0,1/0))[0]]),r=t[0]||null,i=0;i<t.length;i++){a=t[i];for(var o=isNaN(this.C)?1:Math.abs(this.C),s=o*a.bandwidth/this.g.bandwidthDowngradeTarget,l={bandwidth:1/0},c=i+1;c<t.length;c++)if(a.bandwidth!=t[c].bandwidth){l=t[c];break}o=o*l.bandwidth/this.g.bandwidthUpgradeTarget,n>=s&&n<=o&&r.bandwidth!=a.bandwidth&&(r=a)}return this.u=Date.now(),r},r.enable=function(){this.s=!0},r.disable=function(){this.s=!1},r.segmentDownloaded=function(e,t,n){if(this.i.sample(e,t),n&&null!=this.u&&this.s)e:{if(this.G){if(Date.now()-this.u<1e3*this.g.switchInterval)break e}else{if(!((e=this.i).g>=e.i))break e;this.G=!0}e=this.chooseVariant(),this.getBandwidthEstimate(),e&&this.o(e,this.g.clearBufferSwitch,this.g.safeMarginSwitch)}},r.getBandwidthEstimate=function(){var e=this.g.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&this.g.useNetworkInformation&&(e=1e6*navigator.connection.downlink),e=this.i.getBandwidthEstimate(e),this.j?this.j.getBandwidthEstimate(e):e},r.setVariants=function(e){this.m=e},r.playbackRateChanged=function(e){this.C=e},r.setMediaElement=function(t){var n=this;this.l=t,this.h&&(this.h.disconnect(),this.h=null),this.l&&"ResizeObserver"in e&&(this.h=new ResizeObserver((function(){n.F.U(Vn)})),this.h.observe(this.l))},r.setCmsdManager=function(e){this.j=e},r.configure=function(e){this.g=e,this.i&&this.g&&this.i.configure(this.g.advanced)},j("shaka.abr.SimpleAbrManager",jn),jn.prototype.configure=jn.prototype.configure,jn.prototype.setCmsdManager=jn.prototype.setCmsdManager,jn.prototype.setMediaElement=jn.prototype.setMediaElement,jn.prototype.playbackRateChanged=jn.prototype.playbackRateChanged,jn.prototype.setVariants=jn.prototype.setVariants,jn.prototype.getBandwidthEstimate=jn.prototype.getBandwidthEstimate,jn.prototype.segmentDownloaded=jn.prototype.segmentDownloaded,jn.prototype.disable=jn.prototype.disable,jn.prototype.enable=jn.prototype.enable,jn.prototype.chooseVariant=jn.prototype.chooseVariant,jn.prototype.init=jn.prototype.init,jn.prototype.release=jn.prototype.release,jn.prototype.stop=jn.prototype.stop;var Vn=1;function Gn(e,t){this.g=e,this.h=t}function Kn(e,t){var n=new Gn(5,0),r=Yn,i=r.g,a=n.h-i.h;(0<(n.g-i.g||a)?r.i:r.h)(r.g,n,e,t)}function zn(e,t,n,r){W([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function Wn(e,t,n,r){z([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(""))}Gn.prototype.toString=function(){return"v"+this.g+"."+this.h};var Yn=null;function qn(e,t,n,r){for(n=void 0===n||n,r=void 0!==r&&r,this.h=e,this.g=new Set([e]),t=(e=u(t=t||[])).next();!t.done;t=e.next())this.add(t.value,n,r)}function Xn(e,t,n,r){var i;if(!(i=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(i=e.audio&&t.audio)){i=e.audio;var a=t.audio;i=!!((!i.channelsCount||!a.channelsCount||2<i.channelsCount||2<a.channelsCount)&&i.channelsCount!=a.channelsCount||n&&!Qn(i,a)||!$n(i.roles,a.roles)||r&&i.groupId!==a.groupId)}return!(r=i)&&(r=e.video&&t.video)&&(e=e.video,t=t.video,r=!((!n||Qn(e,t))&&$n(e.roles,t.roles))),!r}function Qn(e,t){if(e.mimeType!=t.mimeType)return!1;if(e=e.codecs.split(",").map((function(e){return Tt(e)})),t=t.codecs.split(",").map((function(e){return Tt(e)})),e.length!=t.length)return!1;e.sort(),t.sort();for(var n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function $n(e,t){if(e=new Set(e),t=new Set(t),e.delete("main"),t.delete("main"),e.size!=t.size)return!1;for(var n=(e=u(e)).next();!n.done;n=e.next())if(!t.has(n.value))return!1;return!0}function Jn(e,t,n){t=void 0===t?"reload":t,n=void 0!==n&&n,this.i=e,this.h=t,this.g=n,this.j=new Zn(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"",!1,"","","",t,n)}function Zn(e,t,n,r,i,a,o,s,l,u){this.s=e,this.u=t,this.h=n,this.i=r,this.A=i,this.l=a,this.g=void 0===o?"":o,this.j=void 0===s?"":s,this.m=void 0===l?"reload":l,this.o=void 0!==u&&u}function er(){this.g=rr,this.h=(new Map).set(rr,2).set(nr,1)}function tr(e,t,n){e.h.set(rr,n).set(nr,t)}j("shaka.config.AutoShowText",{NEVER:0,ALWAYS:1,IF_PREFERRED_TEXT_LANGUAGE:2,IF_SUBTITLES_MAY_BE_NEEDED:3}),j("shaka.config.CodecSwitchingStrategy",{xi:"reload",qg:"smooth"}),qn.prototype.add=function(e,t,n){return!!Xn(this.h,e,void 0===t||t,void 0!==n&&n)&&(this.g.add(e),!0)},qn.prototype.values=function(){return this.g.values()},Jn.prototype.create=function(e){var t=this,n="smooth"==this.h&&$(),r=e.filter((function(e){return Xn(t.i,e,!n,t.g)}));return r.length?new qn(r[0],r,!n,this.g):this.j.create(e)},Zn.prototype.create=function(t){var n=[];n=function(e,t){var n=Kt(t=jt(t),e.map((function(e){return Gt(e)})));return n?e.filter((function(e){return n==Gt(e)})):[]}(t,this.s);var r=t.filter((function(e){return e.primary}));return(t=function(e,t){return e.filter((function(e){return!!e.audio&&(t?e.audio.roles.includes(t):0==e.audio.roles.length)}))}(n=n.length?n:r.length?r:t,this.u)).length&&(n=t),this.l&&((t=function(e,t){return e.filter((function(e){return!e.video||!e.video.videoLayout||e.video.videoLayout==t}))}(n,this.l)).length&&(n=t)),this.i&&((t=function(t,n){return"AUTO"==n&&(n=e.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR"),t.filter((function(e){return!e.video||!e.video.hdr||e.video.hdr==n}))}(n,this.i)).length&&(n=t)),this.h&&((t=function(e,t){return e.filter((function(e){return!e.audio||!e.audio.channelsCount||e.audio.channelsCount==t}))}(n,this.h)).length&&(n=t)),this.g&&((t=function(e,t){return e.filter((function(e){return!(!e.audio||!e.audio.label)&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(n,this.g)).length&&(n=t)),this.j&&((t=function(e,t){return e.filter((function(e){return!(!e.video||!e.video.label)&&e.video.label.toLowerCase()==t.toLowerCase()}))}(n,this.j)).length&&(n=t)),(t=function(e,t){return e.filter((function(e){return!e.audio||e.audio.spatialAudio==t}))}(n,this.A)).length&&(n=t),new qn(n[0],n,!("smooth"==this.m&&$()),this.o)};var nr=0,rr=1;function ir(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4};this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.o=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.m=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function ar(e){var t,n;return R((function(r){if(1==r.g){if(e.g>=e.l){if(!e.i)throw new ut(2,7,1010);e.g=1,e.h=e.j}return t=e.g,e.g++,0==t?r.return():(n=e.h*(1+(2*Math.random()-1)*e.o),_(r,new Promise((function(e){new Qt(e).U(n/1e3)})),2))}e.h*=e.m,E(r)}))}function or(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function sr(e,t){this.promise=e,this.i=t,this.g=!1}function lr(e){return new sr(Promise.reject(e),(function(){return Promise.resolve()}))}function ur(){var e=Promise.reject(new ut(2,7,7001));return e.catch((function(){})),new sr(e,(function(){return Promise.resolve()}))}function cr(e){return new sr(Promise.resolve(e),(function(){return Promise.resolve()}))}function dr(e){return new sr(e,(function(){return e.catch((function(){}))}))}function pr(e){return new sr(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function hr(t,n){if(n)if(n instanceof Map)for(var r=u(n.keys()),i=r.next();!i.done;i=r.next())i=i.value,Object.defineProperty(this,i,{value:n.get(i),writable:!0,enumerable:!0});else for(r in n)Object.defineProperty(this,r,{value:n[r],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function fr(e){var t,n=new hr(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}or.prototype.resolve=function(){},or.prototype.reject=function(){},sr.prototype.abort=function(){return this.g=!0,this.i()},sr.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},sr.prototype.pa=function(e,t){function n(n){return function(s){if(i.g&&n)a.reject(o);else{var l=n?e:t;l?r=function(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then((function(){}),(function(){}))})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(l,s,a):(n?a.resolve:a.reject)(s)}}}function r(){return a.reject(o),i.abort()}var i=this,a=new or,o=new ut(2,7,7001);return this.promise.then(n(!0),n(!1)),new sr(a,(function(){return r()}))},j("shaka.util.AbortableOperation",sr),sr.prototype.chain=sr.prototype.pa,sr.prototype.finally=sr.prototype.finally,sr.all=pr,sr.prototype.abort=sr.prototype.abort,sr.notAbortable=dr,sr.completed=cr,sr.aborted=ur,sr.failed=lr,hr.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},hr.prototype.stopImmediatePropagation=function(){this.g=!0},hr.prototype.stopPropagation=function(){},j("shaka.util.FakeEvent",hr);var gr={Yh:"abrstatuschanged",Zh:"adaptation",$h:"buffering",ai:"complete",bi:"downloadfailed",ci:"downloadheadersreceived",di:"drmsessionupdate",fi:"emsg",wi:"prft",Error:"error",gi:"expirationupdated",hi:"firstquartile",ii:"gapjumped",li:"keystatuschanged",ni:"loaded",oi:"loading",ri:"manifestparsed",si:"manifestupdated",ti:"mediaqualitychanged",Metadata:"metadata",ui:"midpoint",vi:"onstatechange",yi:"ratechange",zi:"segmentappended",Ai:"sessiondata",Bi:"stalldetected",Ci:"started",Di:"statechanged",Ei:"streaming",Fi:"textchanged",Gi:"texttrackvisibility",Hi:"thirdquartile",Ii:"timelineregionadded",Ji:"timelineregionenter",Ki:"timelineregionexit",Li:"trackschanged",Ni:"unloading",Pi:"variantchanged"};function yr(){this.la=new Wt,this.wd=this}function vr(){this.g=[]}function mr(e,t){e.g.push(t.finally((function(){fe(e.g,t)})))}function br(e,t,n,r,i){yr.call(this),this.i=!1,this.m=new vr,this.g=new Set,this.h=new Set,this.l=e||null,this.j=t||null,this.s=n||null,this.u=r||null,this.A=i||null,this.o=!1}function _r(e,t,n,r){n=n||Sr;var i=Cr[e];(!i||n>=i.priority)&&(Cr[e]={priority:n,Qd:t,zh:void 0!==r&&r})}function Er(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,drmInfo:null,initData:null,initDataType:null,streamDataCallback:void 0===n?null:n}}function kr(e){if(e){var t=e.segment;if(e=e.stream,t&&e&&e.fastSwitching&&t.A&&!t.u)return!1}return!0}function Tr(){this.g=0}function Ar(e,t,n){sr.call(this,e,t),this.h=n}yr.prototype.addEventListener=function(e,t){this.la&&this.la.push(e,t)},yr.prototype.removeEventListener=function(e,t){this.la&&this.la.remove(e,t)},yr.prototype.dispatchEvent=function(e){if(!this.la)return!0;var t=this.la.get(e.type)||[],n=this.la.get("All");for(n&&(t=t.concat(n)),n=(t=u(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.wd,e.currentTarget=this.wd;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},yr.prototype.release=function(){this.la=null},vr.prototype.destroy=function(){for(var e=[],t=u(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch((function(){})),e.push(n.abort());return this.g=[],Promise.all(e)},y(br,yr),(r=br.prototype).gf=function(e){this.o=e},r.Ah=function(e){this.g.add(e)},r.Sh=function(e){this.g.delete(e)},r.zg=function(){this.g.clear()},r.Bh=function(e){this.h.add(e)},r.Th=function(e){this.h.delete(e)},r.Ag=function(){this.h.clear()},r.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),yr.prototype.release.call(this),this.m.destroy()},r.request=function(e,t,n){var r=this,i=new Tr;if(this.i){var a=Promise.reject(new ut(2,7,7001));return a.catch((function(){})),new Ar(a,(function(){return Promise.resolve()}),i)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?Yt(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=Yt(t.uris);var o=(a=function(e,t,n,r){function i(e){a=a.pa((function(){return n.body&&(n.body=ie(n.body)),e(t,n,r)}))}var a=cr(void 0);e.u&&i(e.u);for(var o=(e=u(e.g)).next();!o.done;o=e.next())i(o.value);return a.pa(void 0,(function(e){if(e instanceof ut&&7001==e.code)throw e;throw new ut(2,1,1006,e)}))}(this,e,t,n)).pa((function(){return function e(t,n,r,i,a,o,s,l){t.o&&(r.uris[o]=r.uris[o].replace("http://","https://")),0<o&&t.A&&t.A(n,i,r.uris[o],r.uris[o-1]);var u=new Ye(r.uris[o]),c=u.Xa,d=!1;c||(c=(c=location.protocol).slice(0,-1),qe(u,c),r.uris[o]=u.toString()),c=c.toLowerCase();var p=(c=Cr[c])?c.Qd:null;if(!p)return lr(new ut(2,1,1e3,u));var h,f=c.zh,g=null,y=null,v=!1,m=!1;return dr(ar(a)).pa((function(){if(t.i)return ur();h=Date.now();var e=p(r.uris[o],r,n,(function(e,r,a){g&&g.stop(),y&&y.U(s/1e3),t.l&&n==wr&&(t.l(e,r,kr(i)),d=!0,l.g=a)}),(function(e){t.j&&t.j(e,r,n),m=!0}));if(!f)return e;var a=r.retryParameters.connectionTimeout;a&&(g=new Qt((function(){v=!0,e.abort()}))).U(a/1e3);var s=r.retryParameters.stallTimeout;return s&&(y=new Qt((function(){v=!0,e.abort()}))),e})).pa((function(e){g&&g.stop(),y&&y.stop(),null==e.timeMs&&(e.timeMs=Date.now()-h);var i={response:e,ih:d};return!m&&t.j&&t.j(e.headers,r,n),i}),(function(u){if(g&&g.stop(),y&&y.stop(),t.s){var c=null,d=0;u instanceof ut&&(c=u,1001==u.code&&(d=u.data[1])),t.s(r,c,d,v)}if(t.i)return ur();if(v&&(u=new ut(1,1,1003,r.uris[o],n)),u instanceof ut){if(7001==u.code)throw u;if(1010==u.code)throw s;if(1==u.severity)return c=new hr("retry",c=(new Map).set("error",u)),t.dispatchEvent(c),o=(o+1)%r.uris.length,e(t,n,r,i,a,o,u,l)}throw u}))}(r,e,t,n,new ir(t.retryParameters,!1),0,null,i)})),s=o.pa((function(t){return function(e,t,n,r){for(var i=cr(void 0),a={},o=(e=u(e.h)).next();!o.done;a={Zd:a.Zd},o=e.next())a.Zd=o.value,i=i.pa(function(e){return function(){var i=n.response;return i.data&&(i.data=ie(i.data)),e.Zd(t,i,r)}}(a));return i.pa((function(){return n}),(function(e){var t=2;if(e instanceof ut){if(7001==e.code)throw e;t=e.severity}throw new ut(t,1,1007,e)}))}(r,e,t,n)})),l=Date.now(),c=0;a.promise.then((function(){c=Date.now()-l}),(function(){}));var d=0;o.promise.then((function(){d=Date.now()}),(function(){}));var p=s.pa((function(i){var a=Date.now()-d,o=i.response;return o.timeMs+=c,o.timeMs+=a,i.ih||!r.l||o.fromCache||"HEAD"==t.method||e!=wr||r.l(o.timeMs,o.data.byteLength,kr(n)),o}),(function(e){throw e&&(e.severity=2),e}));return a=new Ar(p.promise,(function(){return p.abort()}),i),mr(this.m,a),a},j("shaka.net.NetworkingEngine",br),br.prototype.request=br.prototype.request,br.prototype.destroy=br.prototype.destroy,br.makeRequest=Er,br.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},br.prototype.clearAllResponseFilters=br.prototype.Ag,br.prototype.unregisterResponseFilter=br.prototype.Th,br.prototype.registerResponseFilter=br.prototype.Bh,br.prototype.clearAllRequestFilters=br.prototype.zg,br.prototype.unregisterRequestFilter=br.prototype.Sh,br.prototype.registerRequestFilter=br.prototype.Ah,br.unregisterScheme=function(e){delete Cr[e]},br.registerScheme=_r,br.prototype.setForceHTTPS=br.prototype.gf,br.NumBytesRemainingClass=Tr,y(Ar,sr),br.PendingRequest=Ar;var wr=1;br.RequestType={MANIFEST:0,SEGMENT:wr,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5,KEY:6,ADS:7,CONTENT_STEERING:8},br.AdvancedRequestType={INIT_SEGMENT:0,MEDIA_SEGMENT:1,MEDIA_PLAYLIST:2,MASTER_PLAYLIST:3,MPD:4,MSS:5};var Sr=3;br.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:Sr};var Cr={};function xr(e){this.g=!1,this.h=new or,this.i=e}function Ir(e,t){if(e.g){if(t instanceof ut&&7003==t.code)throw t;throw new ut(2,7,7003,t)}}function Pr(){this.g=new Wt}function Dr(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!n.has(e)})),function(e){var t=Rr;if(null==t){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch(e){t=!1}Rr=t}return t||!1}(e)?t:t.capture||!1}(e,r),this.target.addEventListener(t,n,this.g)}xr.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then((function(){e.h.resolve()}),(function(){e.h.resolve()})))},(r=Pr.prototype).release=function(){this.Bb(),this.g=null},r.D=function(e,t,n,r){this.g&&(e=new Dr(e,t,n,r),this.g.push(t,e))},r.ka=function(e,t,n,r){var i=this;this.D(e,t,(function r(a){i.Ub(e,t,r),n(a)}),r)},r.Ub=function(e,t,n){if(this.g)for(var r=this.g.get(t)||[],i=(r=u(r)).next();!i.done;i=r.next())(i=i.value).target!=e||n!=i.listener&&n||(i.Ub(),this.g.remove(t,i))},r.Bb=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,c(t.g[e]));for(n=(t=u(n)).next();!n.done;n=t.next())n.value.Ub();this.g.g={}}},j("shaka.util.EventManager",Pr),Pr.prototype.removeAll=Pr.prototype.Bb,Pr.prototype.unlisten=Pr.prototype.Ub,Pr.prototype.listenOnce=Pr.prototype.ka,Pr.prototype.listen=Pr.prototype.D,Pr.prototype.release=Pr.prototype.release,Dr.prototype.Ub=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Rr=void 0;function Lr(e,t){for(var n=[],r=(e=u(e)).next();!r.done;r=e.next())n.push(t(r.value));return n}function Or(e){this.h=e,this.g=void 0}function Mr(e){for(var t=new Map,n=u(Object.keys(e)),r=n.next();!r.done;r=n.next())r=r.value,t.set(r,e[r]);return t}function Nr(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function Ur(e,t){if(!e&&!t)return!0;if(e&&!t||t&&!e)return!1;if(e.size!=t.size)return!1;for(var n=(e=u(e)).next();!n.done;n=e.next()){var r=u(n.value);if(n=r.next().value,r=r.next().value,!t.has(n))return!1;if((n=t.get(n))!=r||null==n)return!1}return!0}function Fr(){}function Br(t){if(!t)return"";if(239==(t=ae(t))[0]&&187==t[1]&&191==t[2]&&(t=t.subarray(3)),e.TextDecoder&&!sn())return(t=(new TextDecoder).decode(t)).includes("�")&&z('Decoded string contains an "unknown character" codepoint.  That probably means the UTF8 encoding was incorrect!'),t;for(var n="",r=0;r<t.length;++r){var i=65533;if(0==(128&t[r])?i=t[r]:t.length>=r+2&&192==(224&t[r])&&128==(192&t[r+1])?(i=(31&t[r])<<6|63&t[r+1],r+=1):t.length>=r+3&&224==(240&t[r])&&128==(192&t[r+1])&&128==(192&t[r+2])?(i=(15&t[r])<<12|(63&t[r+1])<<6|63&t[r+2],r+=2):t.length>=r+4&&240==(241&t[r])&&128==(192&t[r+1])&&128==(192&t[r+2])&&128==(192&t[r+3])&&(i=(7&t[r])<<18|(63&t[r+1])<<12|(63&t[r+2])<<6|63&t[r+3],r+=3),65535>=i)n+=String.fromCharCode(i);else{var a=1023&(i-=65536);n+=String.fromCharCode(55296+(i>>10)),n+=String.fromCharCode(56320+a)}}return n}function jr(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new ut(2,2,2004);n=Math.floor(e.byteLength/2);var r=new Uint16Array(n);e=se(e);for(var i=0;i<n;i++)r[i]=e.getUint16(2*i,t);return Kr.value()(r)}function Hr(e){function t(e){return n.byteLength<=e||32<=n[e]&&126>=n[e]}if(!e)return"";var n=ae(e);if(239==n[0]&&187==n[1]&&191==n[2])return Br(n);if(254==n[0]&&255==n[1])return jr(n.subarray(2),!1);if(255==n[0]&&254==n[1])return jr(n.subarray(2),!0);if(0==n[0]&&0==n[2])return jr(e,!1);if(0==n[1]&&0==n[3])return jr(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return Br(e);throw new ut(2,2,2003)}function Vr(t){if(e.TextEncoder&&!sn()){var n=new TextEncoder;return ie(n.encode(t))}t=encodeURIComponent(t),t=unescape(t),n=new Uint8Array(t.length);for(var r=0;r<t.length;r++)n[r]=t[r].charCodeAt(0);return ie(n)}function Gr(e,t){for(var n=new ArrayBuffer(2*e.length),r=new DataView(n),i=0;i<e.length;++i)r.setUint16(2*i,e.charCodeAt(i),t);return n}Or.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},j("shaka.util.StringUtils",Fr),Fr.resetFromCharCode=function(){Kr.g=void 0},Fr.toUTF16=Gr,Fr.toUTF8=Vr,Fr.fromBytesAutoDetect=Hr,Fr.fromUTF16=jr,Fr.fromUTF8=Br;var Kr=new Or((function(){function e(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}for(var t={ub:65536};0<t.ub;(t={ub:t.ub}).ub/=2)if(e(t.ub))return function(e){return function(t){for(var n="",r=0;r<t.length;r+=e.ub)n+=String.fromCharCode.apply(null,t.subarray(r,r+e.ub));return n}}(t);return null}));function zr(e,t){this.h=se(e),this.i=t==Yr,this.g=0}function Wr(){return new ut(2,3,3e3)}(r=zr.prototype).ja=function(){return this.g<this.h.byteLength},r.qa=function(){return this.g},r.getLength=function(){return this.h.byteLength},r.ea=function(){try{var e=this.h.getUint8(this.g);return this.g+=1,e}catch(e){throw Wr()}},r.Ba=function(){try{var e=this.h.getUint16(this.g,this.i);return this.g+=2,e}catch(e){throw Wr()}},r.L=function(){try{var e=this.h.getUint32(this.g,this.i);return this.g+=4,e}catch(e){throw Wr()}},r.Zf=function(){try{var e=this.h.getInt32(this.g,this.i);return this.g+=4,e}catch(e){throw Wr()}},r.jc=function(){try{if(this.i)var e=this.h.getUint32(this.g,!0),t=this.h.getUint32(this.g+4,!0);else t=this.h.getUint32(this.g,!1),e=this.h.getUint32(this.g+4,!1)}catch(e){throw Wr()}if(2097151<t)throw new ut(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},r.pb=function(e){if(this.g+e>this.h.byteLength)throw Wr();var t=ae(this.h,this.g,e);return this.g+=e,t},r.skip=function(e){if(this.g+e>this.h.byteLength)throw Wr();this.g+=e},r.Ih=function(e){if(this.g<e)throw Wr();this.g-=e},r.seek=function(e){if(0>e||e>this.h.byteLength)throw Wr();this.g=e},r.Zc=function(){for(var e=this.g;this.ja()&&0!=this.h.getUint8(this.g);)this.g+=1;return e=ae(this.h,e,this.g-e),this.g+=1,Br(e)},j("shaka.util.DataViewReader",zr),zr.prototype.readTerminatedString=zr.prototype.Zc,zr.prototype.seek=zr.prototype.seek,zr.prototype.rewind=zr.prototype.Ih,zr.prototype.skip=zr.prototype.skip,zr.prototype.readBytes=zr.prototype.pb,zr.prototype.readUint64=zr.prototype.jc,zr.prototype.readInt32=zr.prototype.Zf,zr.prototype.readUint32=zr.prototype.L,zr.prototype.readUint16=zr.prototype.Ba,zr.prototype.readUint8=zr.prototype.ea,zr.prototype.getLength=zr.prototype.getLength,zr.prototype.getPosition=zr.prototype.qa,zr.prototype.hasMoreData=zr.prototype.ja;var Yr=1;function qr(){this.i=[],this.h=[],this.g=!1}function Xr(e){for(var t=ti(e);e.reader.ja()&&!e.parser.g;)e.parser.Xc(e.start+t,e.reader,e.partialOkay)}function Qr(e){for(var t=ti(e),n=e.reader.L(),r=0;r<n&&(e.parser.Xc(e.start+t,e.reader,e.partialOkay),!e.parser.g);r++);}function $r(e){var t=ti(e);for(e.reader.skip(78);e.reader.ja()&&!e.parser.g;)e.parser.Xc(e.start+t,e.reader,e.partialOkay)}function Jr(e){return function(t){e(t.reader.pb(t.reader.getLength()-t.reader.qa()))}}function Zr(e){for(var t=0,n=(e=u(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function ei(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function ti(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}zr.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:Yr},(r=qr.prototype).box=function(e,t){return e=Zr(e),this.i[e]=ni,this.h[e]=t,this},r.P=function(e,t){return e=Zr(e),this.i[e]=ri,this.h[e]=t,this},r.stop=function(){this.g=!0},r.parse=function(e,t,n){for(e=new zr(e,0),this.g=!1;e.ja()&&!this.g;)this.Xc(0,e,t,n)},r.Xc=function(e,t,n,r){var i=t.qa();if(r&&i+8>t.getLength())this.g=!0;else{var a=t.L(),o=t.L(),s=ei(o),l=!1;switch(a){case 0:a=t.getLength()-i;break;case 1:if(r&&t.qa()+8>t.getLength())return void(this.g=!0);a=t.jc(),l=!0}var u=this.h[o];if(u){var c=null,d=null;if(this.i[o]==ri){if(r&&t.qa()+4>t.getLength())return void(this.g=!0);c=(d=t.L())>>>24,d&=16777215}o=i+a,n&&o>t.getLength()&&(o=t.getLength()),r&&o>t.getLength()?this.g=!0:(r=o-t.qa(),u({name:s,parser:this,partialOkay:n||!1,version:c,flags:d,reader:t=new zr(t=0<r?t.pb(r):new Uint8Array(0),0),size:a,start:i+e,has64BitSize:l}))}else t.skip(Math.min(i+a-t.qa(),t.getLength()-t.qa()))}},j("shaka.util.Mp4Parser",qr),qr.headerSize=ti,qr.typeToString=ei,qr.allData=Jr,qr.visualSampleEntry=$r,qr.sampleDescription=Qr,qr.children=Xr,qr.prototype.parseNext=qr.prototype.Xc,qr.prototype.parse=qr.prototype.parse,qr.prototype.stop=qr.prototype.stop,qr.prototype.fullBox=qr.prototype.P,qr.prototype.box=qr.prototype.box;var ni=0,ri=1;function ii(){}function ai(e){return e=ae(e),e=Kr.value()(e),btoa(e)}function oi(e,t){return t=null==t||t,e=ai(e).replace(/\+/g,"-").replace(/\//g,"_"),t?e:e.replace(/[=]*$/,"")}function si(t){t=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));for(var n=new Uint8Array(t.length),r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}function li(t){for(var n=t.length/2,r=new Uint8Array(n),i=0;i<n;i++)r[i]=e.parseInt(t.substr(2*i,2),16);return r}function ui(e){var t=ae(e);e="";for(var n=(t=u(t)).next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function ci(){for(var e=L.apply(0,arguments),t=0,n=u(e),r=n.next();!r.done;r=n.next())t+=r.value.byteLength;for(t=new Uint8Array(t),n=0,r=(e=u(e)).next();!r.done;r=e.next())(r=r.value)instanceof Uint8Array?t.set(r,n):t.set(ae(r),n),n+=r.byteLength;return t}function di(e){var t=this;this.g=[],this.h=[],this.data=[],(new qr).box("moov",Xr).box("moof",Xr).P("pssh",(function(e){if(!(1<e.version)){var n=ae(e.reader.h,-12,e.size);if(t.data.push(n),t.g.push(ui(e.reader.pb(16))),0<e.version){n=e.reader.L();for(var r=0;r<n;r++){var i=ui(e.reader.pb(16));t.h.push(i)}}}})).parse(e)}function pi(e,t,n,r){var i=e.length,a=t.length+16+i;0<r&&(a+=4+16*n.size);var o=new Uint8Array(a),s=se(o),l=0;if(s.setUint32(l,a),l+=4,s.setUint32(l,1886614376),l+=4,1>r?s.setUint32(l,0):s.setUint32(l,16777216),l+=4,o.set(t,l),l+=t.length,0<r)for(s.setUint32(l,n.size),l+=4,n=(t=u(n)).next();!n.done;n=t.next())n=li(n.value),o.set(n,l),l+=n.length;return s.setUint32(l,i),o.set(e,l+4),o}function hi(e,t){return 1!=(e=gi(e,t)).length?null:e[0]}function fi(e,t,n){return 1!=(e=yi(e,t,n)).length?null:e[0]}function gi(e,t){for(var n=[],r=(e=u(e.childNodes)).next();!r.done;r=e.next())(r=r.value)instanceof Element&&r.tagName==t&&n.push(r);return n}function yi(e,t,n){for(var r=[],i=(e=u(e.childNodes)).next();!i.done;i=e.next())(i=i.value)instanceof Element&&i.localName==n&&i.namespaceURI==t&&r.push(i);return r}function vi(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function mi(e,t,n){for(var r=(t=u(t)).next();!r.done;r=t.next())if(r=r.value,e.hasAttributeNS(r,n))return e.getAttributeNS(r,n);return null}function bi(e){return Array.from(e.childNodes).every(_i)?e.textContent.trim():null}function _i(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}function Ei(e,t,n,r){r=void 0===r?null:r;var i=null;return null!=(e=e.getAttribute(t))&&(i=n(e)),null==i?r:i}function ki(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:e/1e3):null}function Ti(e){return e&&(e=RegExp("^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$").exec(e))?(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null):null}function Ai(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null}function wi(e){return 0==(e=Number(e))%1?e:null}function Si(e){return 0==(e=Number(e))%1&&0<e?e:null}function Ci(e){return 0==(e=Number(e))%1&&0<=e?e:null}function xi(e){return e=Number(e),isNaN(e)?null:e}function Ii(e){return!!e&&"true"===e.toLowerCase()}function Pi(e){var t,n=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e);return isNaN(n)?null:n}function Di(e,t){var n=new DOMParser,r=Li.value()(e);e=null;try{e=n.parseFromString(r,"text/xml")}catch(e){return null}if(!(n=e.documentElement)||n.getElementsByTagName("parsererror").length||n.tagName!=t)return null;if(!("createNodeIterator"in document))return n;for(t=document.createNodeIterator(e,NodeFilter.SHOW_ALL);e=t.nextNode();)if(e instanceof HTMLElement||e instanceof SVGElement)return null;return n}function Ri(e,t){try{return Di(Hr(e),t)}catch(e){return null}}j("shaka.util.Uint8ArrayUtils",ii),ii.concat=ci,ii.toHex=ui,ii.fromHex=li,ii.fromBase64=si,ii.toBase64=oi,ii.toStandardBase64=ai;var Li=new Or((function(){if("undefined"!=typeof trustedTypes){var e=trustedTypes.createPolicy("shaka-player#xml",{createHTML:function(e){return e}});return function(t){return e.createHTML(t)}}return function(e){return e}}));function Oi(e,t){var n=this;t=void 0===t?1:t,this.C=e,this.G=new Set,this.m=this.s=null,this.na=this.fa=!1,this.H=0,this.g=null,this.A=new Pr,this.i=new Map,this.u=new Map,this.l=new or,this.h=null,this.o=function(t){2==t.severity&&n.l.reject(t),e.onError(t)},this.V=new Map,this.ga=new Map,this.W=new Qt((function(){return function(e){var t=e.V,n=e.ga;n.clear(),t.forEach((function(e,t){return n.set(t,e)})),(t=Array.from(n.values())).length&&t.every((function(e){return"expired"==e}))&&e.o(new ut(2,6,6014)),e.C.Pd(Nr(n))}(n)})),this.K=!1,this.J=[],this.N=!1,this.la=new Qt((function(){!function(e){e.i.forEach((function(t,n){var r=t.Ve,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.C.onExpirationUpdated(n.sessionId,i),t.Ve=i)}))}(n)})).Wa(t),this.l.catch((function(){})),this.j=new xr((function(){return function(e){return R((function(t){switch(t.g){case 1:return e.A.release(),e.A=null,e.l.reject(),e.la.stop(),e.la=null,e.W.stop(),e.W=null,_(t,Xi(e),2);case 2:if(!e.m){t.B(3);break}return k(t,4),_(t,e.m.setMediaKeys(null),6);case 6:A(t,5);break;case 4:w(t);case 5:e.m=null;case 3:e.g=null,e.G.clear(),e.s=null,e.u=new Map,e.h=null,e.o=function(){},e.C=null,e.Z=!1,e.F=null,E(t)}}))}(n)})),this.Z=!1,this.I=this.F=null}function Mi(e,t,n){e.u=new Map;for(var r=(n=u(n)).next();!r.done;r=n.next())e.u.set(r.value,{initData:null,initDataType:null});for(r=(n=u(e.h.persistentSessionsMetadata)).next();!r.done;r=n.next())r=r.value,e.u.set(r.sessionId,{initData:r.initData,initDataType:r.initDataType});return e.K=0<e.u.size,Ni(e,t)}function Ni(t,n){var r,i,a,o,s,l,c,d,p,h,f,g,y,v,m;return R((function(b){if(1==b.g){if(r=function(t){if(0==(t=Mr(t.h.clearKeys)).size)return null;var n=[],r=[];t.forEach((function(e,t){var i=t;22!=i.length&&(i=oi(li(t),!1)),22!=(t=e).length&&(t=oi(li(e),!1)),e={kty:"oct",kid:i,k:t},n.push(e),r.push(e.kid)})),t=JSON.stringify({keys:n});var i=JSON.stringify({kids:r});return i=[{initData:ae(Vr(i)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:i,keyIds:new Set(r)}}(t))for(i=u(n),a=i.next();!a.done;a=i.next())(o=a.value).video&&(o.video.drmInfos=[r]),o.audio&&(o.audio.drmInfos=[r]);for((s=n.some((function(e){return!!(e.video&&e.video.drmInfos.length||e.audio&&e.audio.drmInfos.length)})))||(l=Mr(t.h.servers),function(e,t){var n=[];for(t.forEach((function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})})),e=u(e),t=e.next();!t.done;t=e.next())(t=t.value).video&&(t.video.drmInfos=n),t.audio&&(t.audio.drmInfos=n)}(n,l)),c=new Set,d=u(n),a=d.next();!a.done;a=d.next())for(p=a.value,h=Ji(p),f=u(h),g=f.next();!g.done;g=f.next())y=g.value,c.add(y);for(v=u(c),g=v.next();!g.done;g=v.next())ta(g.value,Mr(t.h.servers),Mr(t.h.advanced||{}),t.h.keySystemsMapping);return _(b,bn(n,t.K,t.Z,t.h.preferredKeySystems),2)}return s||Object.keys(t.h.servers).length?(m=Gi(t,void 0,n),b.return(s?m:m.catch((function(){})))):(t.fa=!0,b.return(Promise.resolve()))}))}function Ui(e){var t;return R((function(n){switch(n.g){case 1:if(e.m.mediaKeys)return n.return();if(!e.F){n.B(2);break}return _(n,e.F,3);case 3:return Ir(e.j),n.return();case 2:return k(n,4),e.F=e.m.setMediaKeys(e.s),_(n,e.F,6);case 6:A(n,5);break;case 4:t=w(n),e.o(new ut(2,6,6003,t.message));case 5:Ir(e.j),E(n)}}))}function Fi(e){var t,n;return R((function(r){switch(r.g){case 1:if(!e.s||!e.g)return r.return();if(!e.g.serverCertificateUri||e.g.serverCertificate&&e.g.serverCertificate.length){r.B(2);break}return t=Er([e.g.serverCertificateUri],e.h.retryParameters),k(r,3),_(r,e.C.Sb.request(5,t).promise,5);case 5:n=r.h,e.g.serverCertificate=ae(n.data),A(r,4);break;case 3:throw new ut(2,6,6017,w(r));case 4:if(e.j.g)return r.return();case 2:return e.g.serverCertificate&&e.g.serverCertificate.length?(k(r,6),_(r,e.s.setServerCertificate(e.g.serverCertificate),8)):r.return();case 8:A(r,0);break;case 6:throw new ut(2,6,6004,w(r).message)}}))}function Bi(e){var t,n,r,i;return R((function(a){if(1==a.g)return e.u.size?(e.u.forEach((function(t,n){Wi(e,n,t)})),_(a,e.l,3)):a.B(2);if(2!=a.g){if(0<(e.g&&e.g.keyIds||new Set([])).size&&function(e){for(var t=u(e.g&&e.g.keyIds||new Set([])),n=t.next();!n.done;n=t.next())if("usable"!==e.V.get(n.value))return!1;return!0}(e))return a.return(e.l);e.l=new or,e.l.catch((function(){}))}for(t=(e.g?e.g.initData:[])||[],n=u(t),r=n.next();!r.done;r=n.next())i=r.value,ji(e,i.initDataType,i.initData);return t.length||e.l.resolve(),a.return(e.l)}))}function ji(e,t,n){if(n.length){for(var r=e.i.values(),i=(r=u(r)).next();!i.done;i=r.next())if(ne(n,i.value.initData)&&e.h.ignoreDuplicateInitData)return;0<e.i.size&&Zi(e)&&(e.l.resolve(),e.l=new or,e.l.catch((function(){}))),function(e,t,n,r){try{var i=e.s.createSession(r)}catch(t){return void e.o(new ut(2,6,6005,t.message))}e.A.D(i,"message",(function(t){e.m&&e.h.delayLicenseRequestUntilPlayed&&e.m.paused&&!e.N?e.J.push(t):Yi(e,t)})),e.A.D(i,"keystatuseschange",(function(t){return qi(e,t)})),e.i.set(i,{initData:n,initDataType:t,loaded:!1,Ve:1/0,bb:null,type:r});try{n=e.h.initDataTransform(n,t,e.g)}catch(n){return t=n,n instanceof ut||(t=new ut(2,6,6016,n)),void e.o(t)}e.h.logLicenseExchange&&oi(n),i.generateRequest(t,n).catch((function(t){if(!e.j.g){e.i.delete(i);var n=t.errorCode;if(n&&n.systemCode){var r=n.systemCode;0>r&&(r+=Math.pow(2,32)),r="0x"+r.toString(16)}e.o(new ut(2,6,6006,t.message,t,r))}}))}(e,t,n,e.g.sessionType)}}function Hi(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function Vi(e){return e=Lr(e=e.i.keys(),(function(e){return e.sessionId})),Array.from(e)}function Gi(e,t,n){var r,i,a,o,s,l,c,d,p,h,f,g,y,v;return R((function(m){switch(m.g){case 1:if(r=new Map,n.length){i=function(e,t,n){for(var r=u(t),i=r.next();!i.done;i=r.next()){var a=u(Ji(i.value));for(i=a.next();!i.done;i=a.next())i=i.value,n.has(i.keySystem)||n.set(i.keySystem,[]),n.get(i.keySystem).push(i)}if(1==n.size&&n.has(""))throw new ut(2,6,6e3);for(r={},e=u(e.h.preferredKeySystems),i=e.next();!i.done;r={Yd:r.Yd},i=e.next())for(r.Yd=i.value,a=u(t),i=a.next();!i.done;i=a.next())if(i=i.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.Yd}}(r)))return i.keySystemAccess;for(e=u([!0,!1]),i=e.next();!i.done;i=e.next())for(r=i.value,a=u(t),i=a.next();!i.done;i=a.next()){var o=u(i.value.decodingInfos);for(i=o.next();!i.done;i=o.next()){var s=i.value;if(s.supported&&s.keySystemAccess){var l=u(i=n.get(s.keySystemAccess.keySystem));for(i=l.next();!i.done;i=l.next())if(!!i.value.licenseServerUri==r)return s.keySystemAccess}}}return null}(e,n,r),m.B(2);break}return _(m,function(e,t){var n,r,i,a,o,s,l,c,d,p,h,f,g,y;return R((function(v){switch(v.g){case 1:if(1==t.size&&t.has(""))throw new ut(2,6,6e3);for(r=u(t.values()),i=r.next();!i.done;i=r.next())0==(a=i.value).audioCapabilities.length&&delete a.audioCapabilities,0==a.videoCapabilities.length&&delete a.videoCapabilities;o=u(e.h.preferredKeySystems),s=o.next();case 2:if(s.done){v.B(4);break}if(l=s.value,!t.has(l)){v.B(3);break}return c=t.get(l),k(v,6),_(v,navigator.requestMediaKeySystemAccess(l,[c]),8);case 8:return n=v.h,v.return(n);case 6:w(v);case 7:Ir(e.j);case 3:s=o.next(),v.B(2);break;case 4:d=u([!0,!1]),p=d.next();case 9:if(p.done){v.B(11);break}h=p.value,f=u(t.keys()),s=f.next();case 12:if(s.done){p=d.next(),v.B(9);break}if(g=s.value,y=t.get(g),y.drmInfos.some((function(e){return!!e.licenseServerUri}))!=h){v.B(13);break}return k(v,15),_(v,navigator.requestMediaKeySystemAccess(g,[y]),17);case 17:return n=v.h,v.return(n);case 15:w(v);case 16:Ir(e.j);case 13:s=f.next(),v.B(12);break;case 11:return v.return(n)}}))}(e,t),3);case 3:i=m.h;case 2:if(!(a=i))throw new ut(2,6,6001);for(Ir(e.j),k(m,4),e.G.clear(),o=a.getConfiguration(),s=o.audioCapabilities||[],l=o.videoCapabilities||[],c=u(s),d=c.next();!d.done;d=c.next())p=d.value,e.G.add(p.contentType.toLowerCase());for(h=u(l),d=h.next();!d.done;d=h.next())f=d.value,e.G.add(f.contentType.toLowerCase());if(n.length){var b=a.keySystem,E=r.get(a.keySystem),T=[],S=[],C=[],x=[],I=new Set;ea(E,T,C,S,x,I);var P=e.K?"persistent-license":"temporary";for(b={keySystem:b,licenseServerUri:T[0],distinctiveIdentifierRequired:E[0].distinctiveIdentifierRequired,persistentStateRequired:E[0].persistentStateRequired,sessionType:E[0].sessionType||P,audioRobustness:E[0].audioRobustness||"",videoRobustness:E[0].videoRobustness||"",serverCertificate:C[0],serverCertificateUri:S[0],initData:x,keyIds:I},T=(E=u(E)).next();!T.done;T=E.next())(T=T.value).distinctiveIdentifierRequired&&(b.distinctiveIdentifierRequired=T.distinctiveIdentifierRequired),T.persistentStateRequired&&(b.persistentStateRequired=T.persistentStateRequired);E=b}else E=a.keySystem,b=t.get(a.keySystem),T=[],S=[],C=[],x=[],I=new Set,ea(b.drmInfos,T,C,S,x,I),E={keySystem:E,licenseServerUri:T[0],distinctiveIdentifierRequired:"required"==b.distinctiveIdentifier,persistentStateRequired:"required"==b.persistentState,sessionType:b.sessionTypes[0]||"temporary",audioRobustness:(b.audioCapabilities?b.audioCapabilities[0].robustness:"")||"",videoRobustness:(b.videoCapabilities?b.videoCapabilities[0].robustness:"")||"",serverCertificate:C[0],serverCertificateUri:S[0],initData:x,keyIds:I};if(e.g=E,!e.g.licenseServerUri)throw new ut(2,6,6012,e.g.keySystem);return _(m,a.createMediaKeys(),6);case 6:if(g=m.h,Ir(e.j),e.s=g,""==e.h.minHdcpVersion||!("getStatusForPolicy"in e.s)){m.B(7);break}return k(m,8),_(m,e.s.getStatusForPolicy({minHdcpVersion:e.h.minHdcpVersion}),10);case 10:if("usable"!=m.h)throw new ut(2,6,6018);Ir(e.j),A(m,7,4);break;case 8:if((y=w(m,4))instanceof ut)throw y;throw new ut(2,6,6019,y.message);case 7:return e.fa=!0,_(m,Fi(e),11);case 11:Ir(e.j),A(m,0);break;case 4:if(v=w(m),Ir(e.j,v),e.g=null,e.G.clear(),v instanceof ut)throw v;throw new ut(2,6,6002,v.message)}}))}function Ki(e){Zi(e)&&e.l.resolve()}function zi(e,t){new Qt((function(){t.loaded=!0,Ki(e)})).U(ra)}function Wi(e,t,n){var r,i,a,o,s,l,u;return R((function(c){switch(c.g){case 1:try{r=e.s.createSession("persistent-license")}catch(t){return i=new ut(2,6,6005,t.message),e.o(i),c.return(Promise.reject(i))}return e.A.D(r,"message",(function(t){e.m&&e.h.delayLicenseRequestUntilPlayed&&e.m.paused&&!e.N?e.J.push(t):Yi(e,t)})),e.A.D(r,"keystatuseschange",(function(t){return qi(e,t)})),a={initData:n.initData,initDataType:n.initDataType,loaded:!1,Ve:1/0,bb:null,type:"persistent-license"},e.i.set(r,a),k(c,2),_(c,r.load(t),4);case 4:return o=c.h,Ir(e.j),o||(e.i.delete(r),s=e.h.persistentSessionOnlinePlayback?1:2,e.o(new ut(s,6,6013)),a.loaded=!0),zi(e,a),Ki(e),c.return(r);case 2:l=w(c),Ir(e.j,l),e.i.delete(r),u=e.h.persistentSessionOnlinePlayback?1:2,e.o(new ut(u,6,6005,l.message)),a.loaded=!0,Ki(e);case 3:return c.return(Promise.resolve())}}))}function Yi(e,t){var n,r,i,a,o,s,l,c,d,p,h,f;R((function(g){switch(g.g){case 1:if(n=t.target,e.h.logLicenseExchange&&oi(t.message),r=e.i.get(n),i=e.g.licenseServerUri,a=e.h.advanced[e.g.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),(o=Er([i],e.h.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,o.drmInfo=e.g,r&&(o.initData=r.initData,o.initDataType=r.initDataType),Hi(e.g.keySystem)){var y=jr(o.body,!0,!0);if(y.includes("PlayReadyKeyMessage")){for(var v=u((y=Di(y,"PlayReadyKeyMessage")).getElementsByTagName("HttpHeader")),m=v.next();!m.done;m=v.next())m=m.value,o.headers[m.getElementsByTagName("name")[0].textContent]=m.getElementsByTagName("value")[0].textContent;o.body=si(y.getElementsByTagName("Challenge")[0].textContent)}else o.headers["Content-Type"]="text/xml; charset=utf-8"}return s=Date.now(),k(g,2),_(g,e.C.Sb.request(2,o).promise,4);case 4:l=g.h,A(g,3);break;case 2:return c=w(g),d=new ut(2,6,6007,c),e.o(d),r&&r.bb&&r.bb.reject(d),g.return();case 3:return e.j.g?g.return():(e.H+=(Date.now()-s)/1e3,e.h.logLicenseExchange&&oi(l.data),k(g,5),_(g,n.update(l.data),7));case 7:A(g,6);break;case 5:return p=w(g),h=new ut(2,6,6008,p.message),e.o(h),r&&r.bb&&r.bb.reject(h),g.return();case 6:if(e.j.g)return g.return();f=new hr("drmsessionupdate"),e.C.onEvent(f),r&&(r.bb&&r.bb.resolve(),zi(e,r)),E(g)}}))}function qi(e,t){t=t.target;var n=e.i.get(t),r=!1;t.keyStatuses.forEach((function(t,i){if("string"==typeof i){var a=i;i=t,t=a}if(Hi(e.g.keySystem)&&16==i.byteLength&&(Zt()||sn())){var o=(a=se(i)).getUint32(0,!0),s=a.getUint16(4,!0),l=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,l,!1)}"status-pending"!=t&&(n.loaded=!0),"expired"==t&&(r=!0),i=ui(i).slice(0,32),e.V.set(i,t)}));var i=t.expiration-Date.now();(0>i||r&&1e3>i)&&n&&!n.bb&&(e.i.delete(t),t.close().catch((function(){}))),Zi(e)&&(e.l.resolve(),e.W.U(ia))}function Xi(e){var t;return R((function(n){return t=Array.from(e.i.entries()),e.i.clear(),_(n,Promise.all(t.map((function(t){var n=(t=u(t)).next().value,r=t.next().value;return R((function(t){return 1==t.g?(k(t,2),e.na||e.u.has(n.sessionId)||"persistent-license"!==r.type||e.h.persistentSessionOnlinePlayback?_(t,function(e){var t;return R((function(n){return 1==n.g?(t=new Promise((function(e,t){new Qt(t).U(na)})),k(n,2),_(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?A(n,0):(w(n),void E(n))}))}(n),5):_(t,n.remove(),5)):2!=t.g?A(t,0):(w(t),void E(t))}))}))),0)}))}function Qi(e,t){return!e.length||!t.length||e===t||0<$i(e,t).length}function $i(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],r=(e=u(e)).next();!r.done;r=e.next()){r=r.value;for(var i=u(t),a=i.next();!a.done;a=i.next())if(a=a.value,r.keySystem==a.keySystem){i=new Map;for(var o=u((r.initData||[]).concat(a.initData||[])),s=o.next();!s.done;s=o.next())s=s.value,i.set(s.keyId,s);i=Array.from(i.values()),o=r.keyIds&&a.keyIds?new Set([].concat(c(r.keyIds),c(a.keyIds))):r.keyIds||a.keyIds,n.push({keySystem:r.keySystem,licenseServerUri:r.licenseServerUri||a.licenseServerUri,distinctiveIdentifierRequired:r.distinctiveIdentifierRequired||a.distinctiveIdentifierRequired,persistentStateRequired:r.persistentStateRequired||a.persistentStateRequired,videoRobustness:r.videoRobustness||a.videoRobustness,audioRobustness:r.audioRobustness||a.audioRobustness,serverCertificate:r.serverCertificate||a.serverCertificate,serverCertificateUri:r.serverCertificateUri||a.serverCertificateUri,initData:i,keyIds:o});break}}return n}function Ji(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Zi(e){return function(e,t){for(var n=(e=u(e)).next();!n.done;n=e.next())if(!t(n.value))return!1;return!0}(e=e.i.values(),(function(e){return e.loaded}))}function ea(e,t,n,r,i,a){for(var o={},s=(e=u(e)).next();!s.done;o={Ca:o.Ca},s=e.next()){if(o.Ca=s.value,t.includes(o.Ca.licenseServerUri)||t.push(o.Ca.licenseServerUri),r.includes(o.Ca.serverCertificateUri)||r.push(o.Ca.serverCertificateUri),o.Ca.serverCertificate&&(n.some(function(e){return function(t){return ne(t,e.Ca.serverCertificate)}}(o))||n.push(o.Ca.serverCertificate)),o.Ca.initData){s={};for(var l=u(o.Ca.initData),c=l.next();!c.done;s={hd:s.hd},c=l.next())s.hd=c.value,i.some(function(e){return function(t){var n=e.hd;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&ne(t.initData,n.initData)}}(s))||i.push(s.hd)}if(o.Ca.keyIds)for(l=(s=u(o.Ca.keyIds)).next();!l.done;l=s.next())a.add(l.value)}}function ta(t,n,r,i){var a=t.keySystem;!a||"org.w3.clearkey"==a&&t.licenseServerUri||(n.size&&(n=n.get(a)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(r=r.get(a))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=r.persistentStateRequired),t.videoRobustness||(t.videoRobustness=r.videoRobustness),t.audioRobustness||(t.audioRobustness=r.audioRobustness),t.serverCertificate||(t.serverCertificate=r.serverCertificate),r.sessionType&&(t.sessionType=r.sessionType),t.serverCertificateUri||(t.serverCertificateUri=r.serverCertificateUri)),i[a]&&(t.keySystem=i[a]),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==a&&(t.keySystem="com.chromecast.playready"))}(r=Oi.prototype).destroy=function(){return this.j.destroy()},r.configure=function(e){this.h=e},r.Fc=function(e){var t=this;return R((function(n){if(1==n.g)return t.s?(t.m=e,t.A.ka(t.m,"play",(function(){for(var e=u(t.J),n=e.next();!n.done;n=e.next())Yi(t,n.value);t.N=!0,t.J=[]})),"webkitCurrentPlaybackTargetIsWireless"in t.m&&t.A.D(t.m,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Xi(t)})),t.I=t.g&&t.g.initData.find((function(e){return 0<e.initData.length}))||null,t.I||"com.apple.fps"!==t.g.keySystem||t.u.size?_(n,Ui(t),2):n.B(2)):(t.A.ka(e,"encrypted",(function(){t.o(new ut(2,6,6010))})),n.return());Bi(t).catch((function(){})),t.I||t.u.size||t.h.parseInbandPsshEnabled||t.A.D(t.m,"encrypted",(function(e){return function(e,t){return R((function(n){if(1==n.g)return _(n,Ui(e),2);ji(e,t.initDataType,ae(t.initData)),E(n)}))}(t,e)})),E(n)}))},r.ze=function(){var e=this,t=this.i.keys();return t=Lr(t,(function(t){var n=e.i.get(t);return{sessionId:t.sessionId,sessionType:n.type,initData:n.initData,initDataType:n.initDataType}})),Array.from(t)},r.Oc=function(){for(var e=1/0,t=this.i.keys(),n=(t=u(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},r.yd=function(){return Nr(this.ga)};var na=1,ra=5,ia=.5,aa=new Or((function(){return ie(new Uint8Array([0]))}));function oa(){}function sa(e,t){if(t&&(t=la[t.toLowerCase()]))return t;throw new ut(2,4,4e3,e)}j("shaka.media.ManifestParser",oa),oa.unregisterParserByMime=function(e){delete la[e]},oa.registerParserByMime=function(e,t){la[e]=t},oa.registerParserByExtension=function(){Kn("ManifestParser","Please use an ManifestParser with registerParserByMime function.")},oa.AccessibilityPurpose={Oi:"visually impaired",ji:"hard of hearing"};var la={};function ua(e,t,n,r,i){var a=da.value(),o=e.subarray(n.start,n.start+n.size),s=se(o),l=new Uint8Array(n.size+a.byteLength);for(l.set(o,0),(o=se(l)).setUint32(4,i),l.set(a,n.size),i=s.getUint32(4),o.setUint32(n.size+16,i),ca(l,0,l.byteLength),i=new Uint8Array(e.byteLength+l.byteLength),n=en()?n.start:n.start+n.size,a=e.subarray(n),i.set(e.subarray(0,n)),i.set(l,n),i.set(a,n+l.byteLength),r=(e=u(r)).next();!r.done;r=e.next())ca(i,(r=r.value).start,r.size+l.byteLength);return l=se(i,t.start),t=ti(t),e=l.getUint32(t),l.setUint32(t,e+1),i}function ca(e,t,n){0!=(t=(e=se(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}var da=new Or((function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}));function pa(e,t,n,r,i,a,o){this.Y=e,this.Na=t,this.ta=n,this.Re=void 0===r?null:r,this.timescale=void 0===i?null:i,this.g=void 0===a?null:a,this.aes128Key=void 0===o?null:o,this.mimeType=this.codecs=null}function ha(e,t){return e&&t?e.Qc()==t.Qc()&&e.Nc()==t.Nc()&&ye(e.Y().sort(),t.Y().sort())&&ne(e.g,t.g):e==t}function fa(e,t,n,r,i,a,o,s,l,c,d,p,h,f,g,y){for(c=void 0===c?[]:c,f=void 0===f?ga:f,this.startTime=e,this.i=this.endTime=t,this.G=n,this.Na=r,this.ta=i,this.aa=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=l,this.g=c,this.tilesLayout=void 0===d?"":d,this.F=void 0===p?null:p,this.h=void 0===h?null:h,this.status=f,this.m=!1,this.l=!0,this.o=!1,this.aes128Key=void 0===g?null:g,this.C=null,this.j=0,this.s=void 0!==y&&y,this.u=this.A=!1,t=(e=u(this.g)).next();!t.done;t=e.next())t.value.Tf();this.s&&this.g.length&&this.g[this.g.length-1].Sf(),this.mimeType=this.codecs=null}pa.prototype.Qc=function(){return this.Na},pa.prototype.Nc=function(){return this.ta},j("shaka.media.InitSegmentReference",pa),pa.prototype.getEndByte=pa.prototype.Nc,pa.prototype.getStartByte=pa.prototype.Qc,(r=fa.prototype).Y=function(){return this.G()},r.getStartTime=function(){return this.startTime},r.Mg=function(){return this.endTime},r.Qc=function(){return this.Na},r.Nc=function(){return this.ta},r.dh=function(){return this.tilesLayout},r.bh=function(){return this.F},r.Ob=function(){return this.status},r.sh=function(){this.status=ya},r.Qe=function(){this.m=!0},r.ph=function(){return this.m},r.Jd=function(){this.l=!1},r.mh=function(){return this.l},r.Tf=function(){this.A=!0},r.oh=function(){return this.A},r.Sf=function(){this.u=!0},r.nh=function(){return this.u},r.Rf=function(){this.o=!0},r.jh=function(){return this.o},r.jg=function(e){this.C=e},r.ah=function(){return this.C},r.offset=function(e){this.startTime+=e,this.endTime+=e,this.i+=e;for(var t=u(this.g),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.i+=e},r.kf=function(e){null==this.h?z("Sync attempted without sync time!"):(e=this.h-e-this.startTime,.001<=Math.abs(e)&&this.offset(e))},j("shaka.media.SegmentReference",fa),fa.prototype.syncAgainst=fa.prototype.kf,fa.prototype.offset=fa.prototype.offset,fa.prototype.getThumbnailSprite=fa.prototype.ah,fa.prototype.setThumbnailSprite=fa.prototype.jg,fa.prototype.hasByterangeOptimization=fa.prototype.jh,fa.prototype.markAsByterangeOptimization=fa.prototype.Rf,fa.prototype.isLastPartial=fa.prototype.nh,fa.prototype.markAsLastPartial=fa.prototype.Sf,fa.prototype.isPartial=fa.prototype.oh,fa.prototype.markAsPartial=fa.prototype.Tf,fa.prototype.isIndependent=fa.prototype.mh,fa.prototype.markAsNonIndependent=fa.prototype.Jd,fa.prototype.isPreload=fa.prototype.ph,fa.prototype.markAsPreload=fa.prototype.Qe,fa.prototype.markAsUnavailable=fa.prototype.sh,fa.prototype.getStatus=fa.prototype.Ob,fa.prototype.getTileDuration=fa.prototype.bh,fa.prototype.getTilesLayout=fa.prototype.dh,fa.prototype.getEndByte=fa.prototype.Nc,fa.prototype.getStartByte=fa.prototype.Qc,fa.prototype.getEndTime=fa.prototype.Mg,fa.prototype.getStartTime=fa.prototype.getStartTime,fa.prototype.getUris=fa.prototype.Y;var ga=0,ya=1;function va(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function ma(e,t){return!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t>=e.start(0)}function ba(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,r=(e=u(_a(e))).next();!r.done;r=e.next()){var i=r.value;r=i.start,(i=i.end)>t&&(n+=i-Math.max(r,t))}return n}function _a(e){if(!e)return[];for(var t=[],n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}
/*
 @license
 Shaka Player
 Copyright 2022 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function Ea(){}function ka(e,t){return t+10<=e.length&&73===e[t]&&68===e[t+1]&&51===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function Ta(e,t){return t+10<=e.length&&51===e[t]&&68===e[t+1]&&73===e[t+2]&&255>e[t+3]&&255>e[t+4]&&128>e[t+6]&&128>e[t+7]&&128>e[t+8]&&128>e[t+9]}function Aa(e,t){var n=(127&e[t])<<21;return n|=(127&e[t+1])<<14,(n|=(127&e[t+2])<<7)|127&e[t+3]}function wa(e){var t={key:e.type,description:"",data:"",mimeType:null,pictureType:null};if("APIC"===e.type){if(2>e.size||3!==e.data[0])return null;var n=e.data.subarray(1).indexOf(0);if(-1===n)return null;var r=Br(ae(e.data,1,n)),i=e.data[2+n],a=e.data.subarray(3+n).indexOf(0);if(-1===a)return null;var o,s=Br(ae(e.data,3+n,a));return o="--\x3e"===r?Br(ae(e.data,4+n+a)):ie(e.data.subarray(4+n+a)),t.mimeType=r,t.pictureType=i,t.description=s,t.data=o,t}return"TXXX"===e.type||"WXXX"===e.type?2>e.size||3!==e.data[0]||-1===(r=e.data.subarray(1).indexOf(0))?null:(n=Br(ae(e.data,1,r)),e=Br(ae(e.data,2+r)).replace(/\0*$/,""),t.description=n,t.data=e,t):"PRIV"===e.type?2>e.size||-1===(n=e.data.indexOf(0))?null:(n=Br(ae(e.data,0,n)),t.description=n,"com.apple.streaming.transportStreamTimestamp"==n?(n=e.data.subarray(n.length+1),e=1&n[3],n=(n[4]<<23)+(n[5]<<15)+(n[6]<<7)+n[7],n/=45,e&&(n+=47721858.84),t.data=n):(e=ie(e.data.subarray(n.length+1)),t.data=e),t):"T"===e.type[0]?2>e.size||3!==e.data[0]?null:(e=Br(e.data.subarray(1)).replace(/\0*$/,""),t.data=e,t):"W"===e.type[0]?(e=Br(e.data).replace(/\0*$/,""),t.data=e,t):e.data?(t.data=ie(e.data),t):null}function Sa(e){for(var t=0,n=[];ka(e,t);){var r=Aa(e,t+6);for(e[t+5]>>6&1&&(t+=10),r=(t+=10)+r;t+10<r;){var i=e.subarray(t),a=Aa(i,4);(a=wa(i={type:String.fromCharCode(i[0],i[1],i[2],i[3]),size:a,data:i.subarray(10,10+a)}))&&n.push(a),t+=i.size+10}Ta(e,t)&&(t+=10)}return n}function Ca(e,t){for(var n=t=void 0===t?0:t,r=0;ka(e,t);)e[t+5]>>6&1&&(r+=10),r+=10,r+=Aa(e,t+6),Ta(e,t+10)&&(r+=10),t+=r;return 0<r?e.subarray(n,n+r):new Uint8Array([])}function xa(e,t){var n=null,r=null,i=null,a=e.L();return 1&t&&(i=e.jc()),2&t&&e.skip(4),8&t&&(n=e.L()),16&t&&(r=e.L()),{trackId:a,Df:n,Eg:r,Qi:i}}function Ia(e,t){return 1==t?(t=e.L(),e=e.L(),{baseMediaDecodeTime:t*Math.pow(2,32)+e}):{baseMediaDecodeTime:e.L()}}function Pa(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),t=e.L(),e.skip(4),e=e.Ba(),{timescale:t,language:String.fromCharCode(96+(e>>10))+String.fromCharCode(96+((960&e)>>5))+String.fromCharCode(96+(31&e))}}function Da(e,t,n){var r=e.L(),i=[],a=null;1&n&&(a=e.L()),4&n&&e.skip(4);for(var o=0;o<r;o++){var s={cf:null,sampleSize:null,Rd:null};256&n&&(s.cf=e.L()),512&n&&(s.sampleSize=e.L()),1024&n&&e.skip(4),2048&n&&(s.Rd=0==t?e.L():e.Zf()),i.push(s)}return{Ui:r,bg:i,Dg:a}}function Ra(e,t){1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4));var n=e.L();return 1==t?e.skip(8):e.skip(4),e.skip(4),e.skip(8),e.skip(2),e.skip(2),e.skip(2),e.skip(2),e.skip(36),{trackId:n,width:t=e.Ba()+e.Ba()/16,height:e=e.Ba()+e.Ba()/16}}function La(e,t){return e.skip(87),{ia:t+"."+this.g(e.ea())+this.g(e.ea())+this.g(e.ea())}}function Oa(e){return{ia:ei(e=e.L())}}function Ma(e,t){if(this.j=e,void 0!==t&&t){t=new Uint8Array(e.byteLength);for(var n=0,r=0;r<e.byteLength;r++)2<=r&&3==e[r]&&0==e[r-1]&&0==e[r-2]||(t[n]=e[r],n++);this.j=ae(t,0,n)}this.i=this.j.byteLength,this.g=this.h=0}function Na(e){var t=e.j.byteLength-e.i,n=new Uint8Array(4),r=Math.min(4,e.i);0!==r&&(n.set(e.j.subarray(t,t+r)),e.h=new zr(n,0).L(),e.g=8*r,e.i-=r)}function Ua(e,t){if(e.g<=t){t-=e.g;var n=Math.floor(t/8);t-=8*n,e.g-=n,Na(e)}e.h<<=t,e.g-=t}function Fa(e,t){var n=Math.min(e.g,t),r=e.h>>>32-n;return e.g-=n,0<e.g?e.h<<=n:0<e.i&&Na(e),0<(n=t-n)?r<<n|Fa(e,n):r}function Ba(e){var t;for(t=0;t<e.g;++t)if(0!=(e.h&2147483648>>>t))return e.h<<=t,e.g-=t,t;return Na(e),t+Ba(e)}function ja(e){Ua(e,1+Ba(e))}function Ha(e){return Fa(e,Ba(e)+1)-1}function Va(e){return 1&(e=Ha(e))?1+e>>>1:-1*(e>>>1)}function Ga(e){return 1===Fa(e,1)}function Ka(e){return Fa(e,8)}function za(e,t){for(var n=8,r=8,i=0;i<t;i++)0!==r&&(r=(n+(r=Va(e))+256)%256),n=0===r?n:r}function Wa(e){return Ka(e),Ha(e),Ha(e)}function Ya(){this.A=null,this.C=!1,this.m=this.F=null,this.j=[],this.g=[],this.o=this.s=null,this.i=[],this.h=[],this.u=null,this.l=[]}function qa(e){if(1!=(e[0]<<16|e[1]<<8|e[2]))return null;var t={data:new Uint8Array(0),Yf:e[4]<<8|e[5],pts:null,dts:null,zb:[]};if(t.Yf&&t.Yf>e.byteLength-6)return null;var n=e[7];return 192&n&&(t.pts=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,t.dts=t.pts,64&n&&(t.dts=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)),n=e[8]+9,e.byteLength<=n?null:(t.data=e.subarray(n),t)}function Xa(e){return!(0>Qa(e))}function Qa(e){for(var t=Math.min(1e3,e.length-564),n=0;n<t;){if(71==e[n]&&71==e[n+188]&&71==e[n+376])return n;n++}return-1}fa.Status={Xh:ga,Mi:ya,pi:2},j("shaka.util.Id3Utils",Ea),Ea.getID3Data=Ca,Ea.getID3Frames=Sa,j("shaka.util.ExpGolomb",Ma),(r=Ya.prototype).clearData=function(){this.j=[],this.g=[],this.i=[],this.h=[],this.l=[]},r.parse=function(e){if(564>e.length)return this;for(var t=Math.max(0,Qa(e)),n=e.length-(e.length+t)%188,r=!1,i=t;i<n;i+=188)if(71==e[i]){var a=!!(64&e[i+1]),o=((31&e[i+1])<<8)+e[i+2];if(1<(48&e[i+3])>>4){var s=i+5+e[i+4];if(s==i+188)continue}else s=i+4;switch(o){case 0:a&&(s+=e[s]+1),this.A=(31&e[s+10])<<8|e[s+11];break;case 17:case 8191:break;case this.A:a&&(s+=e[s]+1),o={audio:-1,video:-1,Hd:-1,audioCodec:"",videoCodec:""};var l=s+3+((15&(a=e)[s+1])<<8|a[s+2])-4;for(s+=12+((15&a[s+10])<<8|a[s+11]);s<l;){var u=(31&a[s+1])<<8|a[s+2],c=(15&a[s+3])<<8|a[s+4];switch(a[s]){case 6:if(-1==o.audio&&0<c)for(var d=s+5,p=c;2<p;){switch(a[d]){case 106:o.audio=u,o.audioCodec="ac3";break;case 122:o.audio=u,o.audioCodec="ec3"}var h=a[d+1]+2;d+=h,p-=h}break;case 15:-1==o.audio&&(o.audio=u,o.audioCodec="aac");break;case 21:-1==o.Hd&&(o.Hd=u);break;case 27:-1==o.video&&(o.video=u,o.videoCodec="avc");break;case 3:case 4:-1==o.audio&&(o.audio=u,o.audioCodec="mp3");break;case 36:-1==o.video&&(o.video=u,o.videoCodec="hvc");break;case 129:-1==o.audio&&(o.audio=u,o.audioCodec="ac3");break;case 132:case 135:-1==o.audio&&(o.audio=u,o.audioCodec="ec3")}s+=c+5}-1!=(a=o).video&&(this.F=a.video,this.m=a.videoCodec),-1!=a.audio&&(this.s=a.audio,this.o=a.audioCodec),-1!=a.Hd&&(this.u=a.Hd),r&&!this.C&&(r=!1,i=t-188),this.C=!0;break;case this.F:s=e.subarray(s,i+188),a?this.j.push(s):this.j.length&&(a=this.j[this.j.length-1])&&(this.j[this.j.length-1]=ci(a,s));break;case this.s:s=e.subarray(s,i+188),a?this.i.push(s):this.i.length&&(a=this.i[this.i.length-1])&&(this.i[this.i.length-1]=ci(a,s));break;case this.u:s=e.subarray(s,i+188),a?this.l.push(s):this.l.length&&(a=this.l[this.l.length-1])&&(this.l[this.l.length-1]=ci(a,s));break;default:r=!0}}return this},r.yh=function(e){return Kn("TsParser","Please use parseNalus function instead."),this.Ye(e)},r.Ye=function(e,t){var n=e.pts?e.pts/9e4:null,r=(e=e.data).byteLength,i=1;"hvc"==this.m&&(i=2);for(var a,o=0,s=[],l=-1,u=0,c=0;c<r;++c){var d=e[c];if(d){if(2<=o&&1==d){if(t&&!s.length&&-1==l&&(0!=(d=c-(3<o?3:o))&&(d=e.subarray(0,d),t.data=ci(t.data,d),t.da=ci(t.da,d))),0<=l?(o=c-((3<o?3:o)+1),s.push({data:e.subarray(l+i,o+1),da:e.subarray(l,o+1),type:u,time:n})):t&&!s.length&&(0<(l=c-o)&&(l=e.subarray(0,l),t.data=ci(t.data,l),t.da=ci(t.da,l))),c>=r-i)return s;l=++c,u="hvc"==this.m?e[c]>>1&63:31&e[c]}o=0}else o++;c>=r-1&&0<=l&&0<=o&&(a={data:e.subarray(l+i,r),da:e.subarray(l,r),type:u,time:n})}return a&&s.push(a),!s.length&&t&&(t.data=ci(t.data,e),t.da=ci(t.da,e)),s},r.getMetadata=function(){for(var e=[],t=u(this.l),n=t.next();!n.done;n=t.next())(n=qa(n.value))&&e.push({cueTime:n.pts?n.pts/9e4:null,data:n.data,frames:Sa(n.data),dts:n.dts,pts:n.pts});return e},r.Kb=function(){if(this.i.length&&!this.h.length){for(var e=!1,t=u(this.i),n=t.next();!n.done;n=t.next()){var r=qa(n=n.value);r&&null!=r.pts&&null!=r.dts?(this.h.length&&r.dts<(this.h[this.h.length-1].dts||0)&&(e=!0),this.h.push(r)):this.h.length&&(n=r?r.data:n)&&((r=this.h.pop()).data=ci(r.data,n),this.h.push(r))}e&&(this.h=this.h.sort((function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n})))}return this.h},r.ec=function(e){if(e=void 0===e||e,this.j.length&&!this.g.length){for(var t=!1,n=u(this.j),r=n.next();!r.done;r=n.next()){var i=qa(r=r.value);i&&null!=i.pts&&null!=i.dts?(this.g.length&&i.dts<(this.g[this.g.length-1].dts||0)&&(t=!0),this.g.push(i)):this.g.length&&(r=i?i.data:r)&&((i=this.g.pop()).data=ci(i.data,r),this.g.push(i))}if(e){var a;for(r=(n=u(this.g)).next();!r.done;r=n.next())(r=r.value).zb=this.Ye(r,a),r.zb.length&&(a=r.zb[r.zb.length-1]);this.g=this.g.filter((function(e){return e.zb.length}))}t&&(this.g=this.g.sort((function(e,t){var n=(e.pts||0)-(t.pts||0);return(e.dts||0)-(t.dts||0)||n})))}return e?this.g:(e=this.g,this.g=[],e)},r.getStartTime=function(e){if("audio"==e){e=null;var t=this.Kb();return t.length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e}return"video"==e?(e=null,(t=this.ec(!1)).length&&(e=t[0],e=Math.min(e.dts,e.pts)/9e4),e):null},r.Lc=function(){return{audio:this.o,video:this.m}},r.Dd=function(){for(var e=[],t=u(this.ec()),n=t.next();!n.done;n=t.next())e.push.apply(e,c(n.value.zb));return e},r.gh=function(){Kn("TsParser","Please use getVideoInfo function instead.");var e=this.De();return{height:e.height,width:e.width}},r.De=function(){return"hvc"==this.m?function(e){var t={height:null,width:null,ia:null};if(!(e=e.Dd()).length)return t;if(!(e=e.find((function(e){return 33==e.type}))))return t;var n=new Ma(e.da,!0);Ka(n),Ka(n),Fa(n,4);var r=Fa(n,3);Ga(n);var i=Fa(n,2),a=Fa(n,1),o=Fa(n,5),s=Fa(n,32);e=Ka(n);for(var l=Ka(n),u=Ka(n),c=Ka(n),d=Ka(n),p=Ka(n),h=Ka(n),f=[],g=[],y=0;y<r;y++)f.push(Ga(n)),g.push(Ga(n));if(0<r)for(y=r;8>y;y++)Fa(n,2);for(y=0;y<r;y++)f[y]&&Fa(n,88),g[y]&&Ka(n);Ha(n),3==(r=Ha(n))&&Fa(n,1),f=Ha(n),g=Ha(n);var v=y=0,m=0,b=0;return Ga(n)&&(y+=Ha(n),v+=Ha(n),m+=Ha(n),b+=Ha(n)),t.width=String(f-(y+v)*(1===r||2===r?2:1)),t.height=String(g-(m+b)*(1===r?2:1)),n=function(e){for(var t=0,n=0;32>n;n++)t|=(e>>n&1)<<31-n;return t>>>0}(s),a=1==a?"H":"L",i="hvc1."+["","A","B","C"][i]+o,i+="."+n.toString(16).toUpperCase(),i+="."+a+h,p&&(i+="."+p.toString(16).toUpperCase()),d&&(i+="."+d.toString(16).toUpperCase()),c&&(i+="."+c.toString(16).toUpperCase()),u&&(i+="."+u.toString(16).toUpperCase()),l&&(i+="."+l.toString(16).toUpperCase()),e&&(i+="."+e.toString(16).toUpperCase()),t.ia=i,t}(this):function(e){var t={height:null,width:null,ia:null};if(!(e=e.Dd()).length)return t;if(!(e=e.find((function(e){return 7==e.type}))))return t;var n=Ka(e=new Ma(e.data)),r=Ka(e),i=Ka(e);if(ja(e),$a.includes(n)){var a=Ha(e);if(3===a&&Ua(e,1),ja(e),ja(e),Ua(e,1),Ga(e)){a=3!==a?8:12;for(var o=0;o<a;o++)Ga(e)&&za(e,6>o?16:64)}}if(ja(e),0===(a=Ha(e)))Ha(e);else if(1===a)for(Ua(e,1),ja(e),ja(e),a=Ha(e),o=0;o<a;o++)ja(e);ja(e),Ua(e,1),a=Ha(e),o=Ha(e);var s=Fa(e,1);0===s&&Ua(e,1),Ua(e,1);var l=0,u=0,c=0,d=0;return Ga(e)&&(l=Ha(e),u=Ha(e),c=Ha(e),d=Ha(e)),t.height=String((2-s)*(o+1)*16-2*c-2*d),t.width=String(16*(a+1)-2*l-2*u),t.ia="avc1."+("0"+n.toString(16).toUpperCase()).slice(-2)+("0"+r.toString(16).toUpperCase()).slice(-2)+("0"+i.toString(16).toUpperCase()).slice(-2),t}(this)},j("shaka.util.TsParser",Ya),Ya.syncOffset=Qa,Ya.probe=Xa,Ya.prototype.getVideoInfo=Ya.prototype.De,Ya.prototype.getVideoResolution=Ya.prototype.gh,Ya.prototype.getVideoNalus=Ya.prototype.Dd,Ya.prototype.getCodecs=Ya.prototype.Lc,Ya.prototype.getStartTime=Ya.prototype.getStartTime,Ya.prototype.getVideoData=Ya.prototype.ec,Ya.prototype.getAudioData=Ya.prototype.Kb,Ya.prototype.getMetadata=Ya.prototype.getMetadata,Ya.prototype.parseNalus=Ya.prototype.Ye,Ya.prototype.parseAvcNalus=Ya.prototype.yh,Ya.prototype.parse=Ya.prototype.parse,Ya.prototype.clearData=Ya.prototype.clearData,Ya.Timescale=9e4;var $a=[100,110,122,244,44,83,86,118,128,138,139,134];function Ja(e,t,n){this.g=null,this.o=-1,this.l=e,this.i=t,this.m=n,this.j=!1;e:{if("undefined"==typeof libDPIModule&&W("Could not find LCEVC Library dependencies on this page"),"undefined"!=typeof LCEVCdec)this.h=LCEVCdec;else{if("undefined"==typeof LcevcDil){W("Could not find LCEVC Library on this page"),e=!1;break e}this.h=LcevcDil,this.j=!0,Kn("LcevcDil","lcevc_dil.js is deprecated, please use lcevc_dec.js instead")}void 0===this.h.SupportObject?(W("Could not find LCEVC Library on this page"),e=!1):(this.h.SupportObject.SupportStatus||W(this.h.SupportObject.SupportError),e=void 0!==this.h&&"undefined"!=typeof libDPIModule&&this.i instanceof HTMLCanvasElement&&this.h.SupportObject.SupportStatus)}e&&!this.g&&this.h.SupportObject.webGLSupport(this.i)&&(this.i.classList.remove("shaka-hidden"),this.g=this.j?new this.h.LcevcDil(this.l,this.i,this.m):new this.h.LCEVCdec(this.l,this.i,this.m))}function Za(e){e.g&&e.i.classList.add("shaka-hidden")}function eo(e,t,n){var r=to,i=oo;switch(t.mimeType){case"video/webm":r=no;break;case"video/mp4":r=ro}switch(n){case"DASH":i=ao;break;case"HLS":i=io}e.g&&(e.o=t.id,e.g.setLevelSwitching(t.id,!0),e.g.setContainerFormat(r),e.j||e.g.setStreamingFormat(i))}Ja.prototype.release=function(){this.g&&(this.g.close(),this.g=null)},j("shaka.lcevc.Dec",Ja),Ja.prototype.release=Ja.prototype.release;var to=0,no=1,ro=2,io=0,ao=1,oo=-1;function so(e,t,n,r){var i=this;this.i=e,this.C=null,this.F=t,this.g={},this.G={},this.na={},this.h=null,this.Z=!1,this.xa=n||function(){},this.N=r||null,this.j={},this.s=new Pr,this.m={},this.H=null,this.J=new or,this.K="",this.fa=!1,this.l=lo(this,this.J),this.A=!1,this.I=new xr((function(){return function(e){var t,n,r,i,a,o,s;return R((function(l){if(1==l.g){for(n in t=[],e.j)for(r=e.j[n],i=r[0],e.j[n]=r.slice(0,1),i&&t.push(i.p.catch(Ot)),a=u(r.slice(1)),o=a.next();!o.done;o=a.next())o.value.p.reject(new ut(2,7,7003,void 0));for(s in e.h&&t.push(e.h.destroy()),e.F&&t.push(e.F.destroy()),e.m)t.push(e.m[s].destroy());return _(l,Promise.all(t),2)}e.s&&(e.s.release(),e.s=null),e.i&&(e.i.removeAttribute("src"),e.i.load(),e.i=null),e.C=null,e.l=null,e.h=null,e.F=null,e.g={},e.m={},e.H=null,e.j={},e.N=null,E(l)}))}(i)})),this.u=!1,this.W="UNKNOWN",this.la=this.wa=!1,this.Da=new or,this.o=!1,this.ga=!0,this.V=null}function lo(t,n){if(e.ManagedMediaSource){t.i.disableRemotePlayback=!0;var r=new ManagedMediaSource;return t.s.ka(r,"sourceopen",(function(){URL.revokeObjectURL(t.K),n.resolve()})),t.s.D(r,"startstreaming",(function(){t.ga=!0})),t.s.D(r,"endstreaming",(function(){t.ga=!1})),t.s.ka(t.i,"playing",(function(){t.fa=!0})),t.K=xo(r),t.i.src=t.K,r}return r=new MediaSource,t.s.ka(r,"sourceopen",(function(){URL.revokeObjectURL(t.K),n.resolve()})),t.s.ka(t.i,"playing",(function(){t.fa=!0})),t.K=xo(r),t.i.src=t.K,r}function uo(e,t,n,r){var i=bt(n.mimeType,r);if(t==gt)co(e,i,e.u,n.external);else{var a=e.C.forceTransmux;(!Q(i)||!e.u&&Ct.includes(i))&&(a=!0);var o=_t(n.mimeType,r);if(a){if(a=ft("audio",(r||"").split(",")),r=ft("video",(r||"").split(",")),a&&r)return e.o=!0,uo(e,"audio",n,a),void uo(e,"video",n,r);(r=je(o))&&(i=r(),e.m[t]=i,i=i.convertCodecs(t,o))}o=i+e.C.sourceBufferExtraFeatures,Ir(e.I);try{var s=e.l.addSourceBuffer(o)}catch(t){throw new ut(2,3,3015,t,"The mediaSource_ status was "+e.l.readyState+" expected 'open'")}e.u&&(s.mode=Io),e.s.D(s,"error",(function(){e.j[t][0].p.reject(new ut(2,3,3014,e.i.error?e.i.error.code:0))})),e.s.D(s,"updateend",(function(){return ko(e,t)})),e.g[t]=s,e.G[t]=i,e.na[t]=!!n.drmInfos.length}}function co(e,t,n,r){e.h||(e.h=new xt(e.F));var i=e.h;r=r||e.Z,e=e.W,"application/cea-608"==t||"application/cea-708"==t?i.i=null:(i.i=(0,Rt[t])(),i.i.setSequenceMode?i.i.setSequenceMode(n):W('Text parsers should have a "setSequenceMode" method!'),i.i.setManifestType?i.i.setManifestType(e):W('Text parsers should have a "setManifestType" method!'),i.u=r)}function po(e){return!e.A&&(!e.l||"ended"==e.l.readyState)}function ho(e,t){return e.A||!Object.keys(e.g).length?e=null:t==gt?e=e.h.g:e=!(e=go(e,t))||1==e.length&&1e-6>e.end(0)-e.start(0)?null:1==e.length&&0>e.start(0)?0:e.length?e.start(0):null,e}function fo(e,t){return e.A?null:t==gt?e.h.h:va(go(e,t))}function go(e,t){try{return e.g[t].buffered}catch(e){return null}}function yo(e,t,n,r,i,a,o,s,l,c){var d,p,h,f,g,y,v,m,b,k;return o=void 0!==o&&o,s=void 0!==s&&s,l=void 0!==l&&l,c=void 0!==c&&c,R((function(T){switch(T.g){case 1:if(t!=(d=yt).ha){T.B(2);break}if(!e.u){T.B(3);break}return _(T,e.Da,4);case 4:p=T.h,e.h.s=p;case 3:return _(T,function(e,t,n,r,i){var a,o,s,l;return R((function(u){return 1==u.g?_(u,Promise.resolve(),2):e.i&&e.j?null==n||null==r?(e.i.parseInit(ae(t)),u.return()):(a=e.u?n:e.s,o={periodStart:e.s,segmentStart:n,segmentEnd:r,vttOffset:a},s=e.i.parseMedia(ae(t),o,i),l=s.filter((function(t){return t.startTime>=e.l&&t.startTime<e.m})),e.j.append(l),null==e.g&&(e.g=Math.max(n,e.l)),e.h=Math.min(r,e.m),void E(u)):u.return()}))}(e.h,n,r?r.startTime:null,r?r.endTime:null,r?r.Y()[0]:null),5);case 5:return T.return();case 2:if(c||!e.o){T.B(6);break}return _(T,yo(e,d.O,n,r,i,a,o,s,l,!0),7);case 7:return _(T,yo(e,d.$,n,r,i,a,o,s,l,!0),8);case 8:return T.return();case 6:if(!e.g[t])return T.return();if(h=e.g[t].timestampOffset,f=e.G[t],e.m[t]&&(f=e.m[t].getOriginalMimeType()),r&&(null!=(g=function(e,t,n,r,i,a){var o=null,s=ae(n);if(Ct.includes(i))(a=Sa(s)).length&&r&&((t=a.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&t.data&&(o=Math.round(t.data)/1e3),e.xa([{cueTime:r.startTime,data:s,frames:a,dts:r.startTime,pts:r.startTime}],0,r.endTime));else if(i.includes("/mp4")&&r&&0==r.timestampOffset&&r.aa&&r.aa.timescale){var l=r.aa.timescale;if(!isNaN(l)){var u=0,c=!1;(new qr).box("moof",Xr).box("traf",Xr).P("tfdt",(function(e){u=Ia(e.reader,e.version).baseMediaDecodeTime/l,c=!0,e.parser.stop()})).parse(n,!0),c&&(o=u)}}else i.includes("/mp4")||i.includes("/webm")||!Xa(s)||(null!=(t=(s=(new Ya).parse(s)).getStartTime(t))&&(o=t),(s=s.getMetadata()).length&&e.xa(s,a,r?r.endTime:null));return o}(e,t,n,r,f,h))&&(y=r.startTime-g,(.1<=Math.abs(h-y)||o||s)&&(!l||0<y||!h)&&(h=y,e.la&&(To(e,t,(function(){return _o(e,t)})),To(e,t,(function(){return Eo(e,t,h)})))),v=t==d.$||!(d.$ in e.g),e.u&&v&&e.Da.resolve(h))),a&&t==d.$&&(e.h||co(e,"application/cea-608",e.u,!1),e.H||(m=f.split(";",1)[0],e.H=new ce(m)),r?(b=e.H.i(n)).length&&function(e,t,n,r,i){for(var a=n+" "+r,o=new Map,s=(t=u(t)).next();!s.done;s=t.next()){var l=s.value;s=l.stream,l=l.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),Dt(e,l,i),l.startTime>=e.l&&l.startTime<e.m&&(o.get(s).get(a).push(l),s==e.A&&e.j.append([l]))}for(a=(i=u(o.keys())).next();!a.done;a=i.next())for(a=a.value,e.o.has(a)||e.o.set(a,new Map),s=(t=u(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,l=o.get(a).get(s),e.o.get(a).set(s,l);e.g=null==e.g?Math.max(n,e.l):Math.min(e.g,Math.max(n,e.l)),e.h=Math.max(e.h,Math.min(r,e.m))}(e.h,b,r.startTime,r.endTime,h):e.H.init(n)),!e.m[t]){T.B(9);break}return _(T,e.m[t].transmux(n,i,r,e.l.duration,t),10);case 10:n=T.h;case 9:return n=function(e,t,n,r){var i=e.na[r];return e.C.insertFakeEncryptionInInit&&null==n&&i&&(tn()||en()||un("SOPOpenBrowser"))&&"mp4"==e.G[r].split(";")[0].split("/")[1]&&(t=function(e){function t(){i=!0}function n(e){a.push(e),Xr(e)}e=ae(e);var r,i=!1,a=[],o=[];if((new qr).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).P("stsd",(function(e){r=e,a.push(e),Qr(e)})).P("encv",t).P("enca",t).P("hev1",(function(e){o.push({box:e,Ab:1701733238})})).P("hvc1",(function(e){o.push({box:e,Ab:1701733238})})).P("avc1",(function(e){o.push({box:e,Ab:1701733238})})).P("avc3",(function(e){o.push({box:e,Ab:1701733238})})).P("ac-3",(function(e){o.push({box:e,Ab:1701733217})})).P("ec-3",(function(e){o.push({box:e,Ab:1701733217})})).P("ac-4",(function(e){o.push({box:e,Ab:1701733217})})).P("mp4a",(function(e){o.push({box:e,Ab:1701733217})})).parse(e),i)return e;if(0==o.length||!r)throw ui(e),new ut(2,3,3019);o.reverse();for(var s=u(o),l=s.next();!l.done;l=s.next())l=l.value,e=ua(e,r,l.box,a,l.Ab);return e}(t)),t}(e,n,r?r.startTime:null,t),r&&e.u&&t!=d.ha&&(o||s)&&(k=r.startTime,To(e,t,(function(){return _o(e,t)})),To(e,t,(function(){return Eo(e,t,k)}))),_(T,To(e,t,(function(){var r=n;if("video"==t&&e.N){var i=e.N;i.g&&i.g.appendBuffer(r,"video",i.o,-h)}e.g[t].appendBuffer(r)})),11);case 11:E(T)}}))}function vo(e,t){var n;return R((function(r){return 1==r.g?t==(n=yt).ha?e.h?_(r,e.h.remove(0,1/0),0):r.return():_(r,To(e,t,(function(){return bo(e,t,0,e.l.duration)})),4):e.o?_(r,To(e,n.O,(function(){return bo(e,n.O,0,e.l.duration)})),0):r.B(0)}))}function mo(e,t,n,r,i,a,o,s,l){var u,c;return R((function(d){return 1==d.g?t==(u=yt).ha?(a||(e.h.s=n),function(e,t,n){e.l=t,e.m=n}(e.h,r,i),d.return()):(c=[],_(d,function(e,t,n,r,i){var a,o,s,l,u,c,d,p,h,f,g,y,v,m,b;return R((function(E){return 1==E.g?t==(a=yt).ha?E.return(!1):(o=Tt(wt(e.G[t])),s=At(e.G[t]),u=!1,c=bt(n,r),d=e.C.forceTransmux,(!Q(c)||!e.u&&Ct.includes(c))&&(d=!0),d&&(p=_t(n,r),h=je(p))&&(l=h(),f=ft(a.O,(r||"").split(",")),g=ft(a.$,(r||"").split(",")),f&&g?(u=!0,y=g,t==a.O&&(y=f),c=l.convertCodecs(t,_t(n,y))):c=l.convertCodecs(t,p)),v=Tt(wt(c)),m=At(c),o===v&&s===m?E.return(!1):(b=!0,(e.o||u&&l&&!e.m[t])&&(b=!1),b&&"smooth"===e.C.codecSwitchingStrategy&&$()?_(E,function(e,t,n,r){return To(e,t,(function(){t!==gt&&($()&&(e.m[t]&&(e.m[t].destroy(),delete e.m[t]),r&&(e.m[t]=r),e.g[t].changeType(n+e.C.sourceBufferExtraFeatures),e.G[t]=n),ko(e,t))}))}(e,t,c,l),3):(l&&l.destroy(),_(E,Co(e,i),3)))):E.return(!0)}))}(e,t,o,s,l),2)):(d.h||(c.push(To(e,t,(function(){return _o(e,t)}))),e.o&&c.push(To(e,u.O,(function(){return _o(e,u.O)})))),a||(c.push(To(e,t,(function(){return Eo(e,t,n)}))),e.o&&c.push(To(e,u.O,(function(){return Eo(e,u.O,n)})))),c.push(To(e,t,(function(){e.g[t].appendWindowStart=0,e.g[t].appendWindowEnd=i,e.g[t].appendWindowStart=r,ko(e,t)}))),e.o&&c.push(To(e,u.O,(function(){var t=u.O;e.g[t].appendWindowStart=0,e.g[t].appendWindowEnd=i,e.g[t].appendWindowStart=r,ko(e,t)}))),_(d,Promise.all(c),0))}))}function bo(e,t,n,r){r<=n?ko(e,t):e.g[t].remove(n,r)}function _o(e,t){var n=e.g[t].appendWindowStart,r=e.g[t].appendWindowEnd;e.g[t].abort(),e.g[t].appendWindowStart=n,e.g[t].appendWindowEnd=r,ko(e,t)}function Eo(e,t,n){0>n&&(n+=.001),e.g[t].timestampOffset=n,ko(e,t)}function ko(e,t){if(!e.A){var n=e.j[t][0];n&&(n.p.resolve(),wo(e,t))}}function To(e,t,n){return Ir(e.I),n={start:n,p:new or},e.j[t].push(n),1==e.j[t].length&&So(e,t),n.p}function Ao(e,t){var n,r,i,a,o;return R((function(s){switch(s.g){case 1:for(i in Ir(e.I),n=[],r={},e.g)r.uc=new or,a={start:function(e){return function(){return e.uc.resolve()}}(r),p:r.uc},e.j[i].push(a),n.push(r.uc),1==e.j[i].length&&a.start(),r={uc:r.uc};return k(s,2),_(s,Promise.all(n),4);case 4:A(s,3);break;case 2:throw w(s);case 3:return k(s,5,6),_(s,t(),6);case 6:for(o in S(s),e.g)wo(e,o);C(s,0);break;case 5:throw new ut(2,3,3015,w(s),e.i.error||"No error in the media element")}}))}function wo(e,t){e.j[t].shift(),So(e,t)}function So(e,t){var n=e.j[t][0];if(n)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new ut(2,3,3017,t)):n.p.reject(new ut(2,3,3015,r,e.i.error||"No error in the media element")),wo(e,t)}}function Co(e,t){return Ao(e,(function(){return function(e,t){var n,r,i,a,o,s,l,c,d,p,h,f,g,y,v,m,b,E,k,A,w,x;return R((function(I){switch(I.g){case 1:for(s in n=yt,e.A=!0,e.o=!1,r=e.i.currentTime,i=e.i.autoplay,a=e.i.paused,e.fa&&(e.i.autoplay=!1),T(I,2),e.s.Bb(),o=[],e.m)o.push(e.m[s].destroy());for(l in e.j)for(c=e.j[l],d=c[0],e.j[l]=c.slice(0,1),d&&o.push(d.p.catch(Ot)),p=u(c.slice(1)),h=p.next();!h.done;h=p.next())h.value.p.reject(new ut(2,7,7003,void 0));for(f in e.g){g=e.g[f];try{e.l.removeSourceBuffer(g)}catch(e){}}return _(I,Promise.all(o),4);case 4:return e.m={},e.g={},y=e.l.duration,e.J=new or,e.l=lo(e,e.J),_(I,e.J,5);case 5:for(!isNaN(y)&&y?e.l.duration=y:!isNaN(e.V)&&e.V&&(e.l.duration=e.V),v=new or,m=e.l.sourceBuffers,b=t.size,E=0,e.s.D(m,"addsourcebuffer",(function(){++E===b&&v.resolve()})),k=u(t.keys()),A=k.next();!A.done;A=k.next())w=A.value,x=t.get(w),uo(e,w,x,x.codecs),e.o?(e.j[n.O]=[],e.j[n.$]=[]):e.j[w]=[];return e.i.currentTime=r,_(I,v,2);case 2:S(I),e.A=!1,Ir(e.I),e.s.ka(e.i,"canplay",(function(){Ir(e.I),e.i.autoplay=i,a||e.i.play()})),C(I,0)}}))}(e,t)}))}(r=so.prototype).destroy=function(){return this.I.destroy()},r.init=function(e,t,n,r){t=void 0!==t&&t,n=void 0===n?"UNKNOWN":n,r=void 0!==r&&r;var i,a,o,s,l,c=this;return R((function(d){if(1==d.g)return i=yt,_(d,c.J,2);for(c.u=t,c.W=n,c.wa=r,c.la=!c.u&&"HLS"==c.W&&!c.wa,a=u(e.keys()),o=a.next();!o.done;o=a.next())s=o.value,l=e.get(s),uo(c,s,l,l.codecs),c.o?(c.j[i.O]=[],c.j[i.$]=[]):c.j[s]=[];E(d)}))},r.configure=function(e){this.C=e},r.kb=function(){var e={total:this.A?[]:_a(this.i.buffered),audio:this.A?[]:_a(go(this,"audio")),video:this.A?[]:_a(go(this,"video")),text:[]};if(this.h){var t=this.h.g,n=this.h.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},r.remove=function(e,t,n){var r,i=this;return R((function(a){return 1==a.g?e==(r=yt).ha?_(a,i.h.remove(t,n),0):_(a,To(i,e,(function(){return bo(i,e,t,n)})),4):i.o?_(a,To(i,r.O,(function(){return bo(i,r.O,t,n)})),0):a.B(0)}))},r.flush=function(e){var t,n=this;return R((function(r){return 1==r.g?e==(t=yt).ha?r.return():_(r,To(n,e,(function(){n.i.currentTime-=.001,ko(n,e)})),2):n.o?_(r,To(n,t.O,(function(){var e=t.O;n.i.currentTime-=.001,ko(n,e)})),0):r.B(0)}))},r.endOfStream=function(e){var t=this;return R((function(n){return _(n,Ao(t,(function(){po(t)||"closed"===t.l.readyState||(e?t.l.endOfStream(e):t.l.endOfStream())})),0)}))},r.Ma=function(e){var t=this;return R((function(n){return _(n,Ao(t,(function(){if(e<t.l.duration)for(var n in t.g){var r={start:function(){},p:new or};t.j[n].unshift(r)}t.l.duration=e,t.V=e})),0)}))},r.getDuration=function(){return this.l.duration};var xo=e.URL.createObjectURL,Io="sequence";function Po(e,t,n){this.i=e,this.m=t,this.s=this.j=1/0,this.g=1,this.h=this.l=null,this.o=0,this.C=!0,this.F=0,this.u=void 0===n||n,this.G=0,this.A=!1}function Do(e,t,n){this.j=n,this.l=e,this.s=Lo(e),this.g=e.g.currentTime,this.m=Date.now()/1e3,this.h=!1,this.o=0,this.u=t,this.i=function(){}}function Ro(e){this.g=e}function Lo(e){if(e.g.paused||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime;for(var n=(e=u(_a(e.g.buffered))).next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function Oo(e,t,n,r,i){var a=this;this.u=i,this.g=e,this.A=t,this.s=n,this.l=new Pr,this.j=!1,this.F=e.readyState,this.C=this.i=0,this.h=r,this.o=!1,this.l.D(e,"waiting",(function(){return Mo(a)})),this.m=new Qt((function(){Mo(a)})).Wa(this.s.gapJumpTimerTime)}function Mo(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.j)return}else e.j=!1;if(!e.g.paused||e.g.currentTime==e.i&&(e.g.autoplay||e.g.currentTime!=e.i)){var t;if(e.g.readyState!=e.F&&(e.F=e.g.readyState),!(t=!e.h)){var n=(t=e.h).l,r=Lo(n),i=n.g.currentTime,a=Date.now()/1e3;t.g==i&&t.s==r||(t.m=a,t.g=i,t.s=r,t.h=!1),(r=(i=a-t.m)>=t.u&&r&&!t.h)&&(t.i(t.g,i),t.h=!0,t.g=n.g.currentTime,t.o++,t.j(new hr("stalldetected"))),t=!r}t&&(t=e.g.currentTime,null==(r=function(e,t,n){return!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)?null:0<=(e=_a(e).findIndex((function(e,r,i){return e.start>t&&(0==r||i[r-1].end-t<=n)})))?e:null}(n=e.g.buffered,t,e.s.gapDetectionThreshold))||0==r&&!e.o||((i=n.start(r))>=e.A.lb()||.001>i-t||(0!=r&&n.end(r-1),e.g.currentTime=i,t==e.i&&(e.i=i),e.C++,e.u(new hr("gapjumped")))))}}}function No(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=Uo.value().get(t),n.ka(e,t,r))}(r=Po.prototype).getDuration=function(){return this.j},r.Sg=function(){return this.g},r.ig=function(e){this.i=e},r.Ma=function(e){this.j=e},r.Wg=function(){return this.i},r.gg=function(e){this.o=e},r.kc=function(e){this.C=e},r.Sd=function(e){this.s=e},r.hg=function(e){this.m=e},r.Lg=function(){return this.m},r.Xf=function(e,t){if(0!=e.length){var n=e[e.length-1].end+t;this.Nd(e[0].start+t),this.g=e.reduce((function(e,t){return Math.max(e,t.end-t.start)}),this.g),this.h=Math.max(this.h,n),null!=this.i&&this.u&&!this.A&&(this.i=(Date.now()+this.o)/1e3-this.h-this.g)}},r.Wc=function(e){if(0!=e.length){for(var t=e[0].startTime,n=e[0].endTime,r=(Date.now()+this.o)/1e3,i=(e=u(e)).next();!i.done;i=e.next())r<(i=i.value).startTime||(t=Math.min(t,i.startTime),n=Math.max(n,i.endTime),this.g=Math.max(this.g,i.endTime-i.startTime));this.Nd(t),this.h=Math.max(this.h,n),null!=this.i&&this.u&&!this.A&&(this.i=r-this.h-this.g)}},r.Id=function(){this.A=!0},r.Nd=function(e){this.l=null==this.l?e:Math.min(this.l,e)},r.Te=function(e){this.g=Math.max(this.g,e)},r.offset=function(e){null!=this.l&&(this.l+=e),null!=this.h&&(this.h+=e)},r.S=function(){return 1/0==this.j&&!this.C},r.Qb=function(){return 1/0!=this.j&&!this.C},r.mb=function(){return Math.max(this.F,this.wb()-this.s)},r.kg=function(e){this.F=e},r.wb=function(){return this.S()||this.Qb()?Math.min(Math.max(0,(Date.now()+this.o)/1e3-this.g-this.i)+this.G,this.j):this.h?Math.min(this.h,this.j):this.j},r.Pc=function(e){var t=Math.max(this.l,this.F);return 1/0==this.s?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.wb()-this.s+e,this.lb()))},r.cc=function(){return this.Pc(0)},r.lb=function(){return Math.max(0,this.wb()-(this.S()||this.Qb()?this.m:0))},r.ng=function(){return!(null==this.i||null!=this.h&&this.u)},r.fg=function(e){this.G=e},j("shaka.media.PresentationTimeline",Po),Po.prototype.setAvailabilityTimeOffset=Po.prototype.fg,Po.prototype.usingPresentationStartTime=Po.prototype.ng,Po.prototype.getSeekRangeEnd=Po.prototype.lb,Po.prototype.getSeekRangeStart=Po.prototype.cc,Po.prototype.getSafeSeekRangeStart=Po.prototype.Pc,Po.prototype.getSegmentAvailabilityEnd=Po.prototype.wb,Po.prototype.setUserSeekStart=Po.prototype.kg,Po.prototype.getSegmentAvailabilityStart=Po.prototype.mb,Po.prototype.isInProgress=Po.prototype.Qb,Po.prototype.isLive=Po.prototype.S,Po.prototype.offset=Po.prototype.offset,Po.prototype.notifyMaxSegmentDuration=Po.prototype.Te,Po.prototype.notifyMinSegmentStartTime=Po.prototype.Nd,Po.prototype.lockStartTime=Po.prototype.Id,Po.prototype.notifySegments=Po.prototype.Wc,Po.prototype.notifyTimeRange=Po.prototype.Xf,Po.prototype.getDelay=Po.prototype.Lg,Po.prototype.setDelay=Po.prototype.hg,Po.prototype.setSegmentAvailabilityDuration=Po.prototype.Sd,Po.prototype.setStatic=Po.prototype.kc,Po.prototype.setClockOffset=Po.prototype.gg,Po.prototype.getPresentationStartTime=Po.prototype.Wg,Po.prototype.setDuration=Po.prototype.Ma,Po.prototype.setPresentationStartTime=Po.prototype.ig,Po.prototype.getMaxSegmentDuration=Po.prototype.Sg,Po.prototype.getDuration=Po.prototype.getDuration,Do.prototype.release=function(){this.j=this.l=null,this.i=function(){}},Oo.prototype.release=function(){this.l&&(this.l.release(),this.l=null),null!=this.m&&(this.m.stop(),this.m=null),this.h&&(this.h.release(),this.h=null),this.g=this.A=this.u=null},Oo.prototype.We=function(){this.o=!0,Mo(this)};var Uo=new Or((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function Fo(e,t,n,r){var i=this;this.g=e,this.m=t,this.s=n,this.l=null,this.j=function(){return null==i.l&&(i.l=r()),i.l},this.o=!1,this.h=new Pr,this.i=new Go(e),No(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){Ho(i,i.j())}))}function Bo(e){return e.o?e.g.currentTime:e.j()}function jo(e,t){0<e.g.readyState?Ko(e.i,t):No(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){Ho(e,e.j())}))}function Ho(e,t){.001>Math.abs(e.g.currentTime-t)?Vo(e):(e.h.ka(e.g,"seeking",(function(){Vo(e)})),Ko(e.i,e.g.currentTime&&0!=e.g.currentTime?e.g.currentTime:t))}function Vo(e){e.o=!0,e.h.D(e.g,"seeking",(function(){return e.m()})),e.s(e.g.currentTime)}function Go(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new Qt((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function Ko(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.Wa(.1)}function zo(e){this.g=e,this.j=!1,this.h=null,this.i=new Pr}function Wo(e,t,n,r,i,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.A=t.minBufferTime||0,this.l=n,this.u=i,this.s=null,this.o=function(e,t,n){if(!t.stallEnabled)return null;var r=t.stallSkip;return function(e,t){e.i=t}(t=new Do(new Ro(e),t.stallThreshold,n),(function(){r?e.currentTime+=r:(e.pause(),e.play())})),t}(e,n,a),this.j=new Oo(e,t.presentationTimeline,n,this.o,a),this.h=new Fo(e,(function(){var e=o.j;e.j=!0,e.o=!1;var t=Bo(o.h);return e=qo(o,t),.001<Math.abs(e-t)&&(t=Date.now()/1e3,!o.s||o.s<t-1)?(o.s=t,jo(o.h,e),e=void 0):(o.u(),e=void 0),e}),(function(e){var t=o.j;t.g.seeking&&!t.j&&(t.j=!0,t.i=e)}),(function(){var e=r;return null==e?e=1/0>o.g.getDuration()?o.g.cc():o.g.lb():0>e&&(e=o.g.lb()+e),Yo(o,Xo(o,e))})),this.m=new Qt((function(){if(0!=o.i.readyState&&!o.i.paused){var e=Bo(o.h),t=o.g.cc(),n=o.g.lb();3>n-t&&(t=n-3),e<t&&(e=qo(o,e),o.i.currentTime=e)}}))}function Yo(e,t){var n=e.g.getDuration();return t>=n?n-e.l.durationBackoff:t}function qo(e,t){var n=Math.max(e.A,e.l.rebufferingGoal),r=e.l.safeSeekOffset,i=e.g.cc(),a=e.g.lb(),o=e.g.getDuration();3>a-i&&(i=a-3);var s=e.g.Pc(n),l=e.g.Pc(r);return n=e.g.Pc(n+r),t>=o?Yo(e,t):t>a?a:t<i?ma(e.i.buffered,l)?l:n:t>=s||ma(e.i.buffered,t)?t:n}function Xo(e,t){var n=e.g.cc();return t<n?n:t>(e=e.g.lb())?e:t}function Qo(e){this.g=e,this.l=null,this.j=0,this.o=!1}function $o(e,t){for(var n=(e=u(e.g)).next();!n.done;n=e.next())t(n.value)}function Jo(e,t,n){return new Qo([e=new fa(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function Zo(e,t,n){this.i=e,this.g=t,this.h=n}function es(){Qo.call(this,[]),this.h=[]}function ts(e){var t=this;this.g=e,this.h=this.g.Cd(),this.i=new Qt((function(){t.g.Uf(.25*t.h)}))}function ns(e){var t=this;this.h=e,this.g=new Set,this.i=new Qt((function(){rs(t,!1)})).Wa(.25)}function rs(e,t){for(var n=u(e.g),r=n.next();!r.done;r=n.next())r.value.j(e.h.currentTime,t)}function is(e){yr.call(this),this.g=new Map,this.h=e}function as(e){yr.call(this);var t=this;this.g=new Set,this.i=e,this.h=new Qt((function(){for(var e=t.i(),n=u(t.g),r=n.next();!r.done;r=n.next())(r=r.value).endTime<e.start&&(t.g.delete(r),r=new hr("regionremove",new Map([["region",r]])),t.dispatchEvent(r))})).Wa(2)}function os(e,t){yr.call(this);var n=this;this.i=e,this.l=t,this.g=new Map,this.m=[{Xb:null,Wb:us,Pb:function(e,t){return ss(n,"enter",e,t)}},{Xb:ls,Wb:us,Pb:function(e,t){return ss(n,"enter",e,t)}},{Xb:cs,Wb:us,Pb:function(e,t){return ss(n,"enter",e,t)}},{Xb:us,Wb:ls,Pb:function(e,t){return ss(n,"exit",e,t)}},{Xb:us,Wb:cs,Pb:function(e,t){return ss(n,"exit",e,t)}},{Xb:ls,Wb:cs,Pb:function(e,t){return ss(n,"skip",e,t)}},{Xb:cs,Wb:ls,Pb:function(e,t){return ss(n,"skip",e,t)}}],this.h=new Pr,this.h.D(this.i,"regionremove",(function(e){n.g.delete(e.region)}))}function ss(e,t,n,r){t=new hr(t,new Map([["region",n],["seeking",r]])),e.dispatchEvent(t)}Fo.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.m=function(){},this.g=null},Go.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},(r=zo.prototype).ce=function(){var e=this;No(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.i,(function(){null==e.h||0==e.h?e.j=!0:(e.i.ka(e.g,"seeking",(function(){e.j=!0})),e.g.currentTime=Math.max(0,e.g.currentTime+e.h))}))},r.release=function(){this.i&&(this.i.release(),this.i=null),this.g=null},r.de=function(e){this.h=this.j?this.h:e},r.od=function(){return(this.j?this.g.currentTime:this.h)||0},r.uf=function(){return 0},r.tf=function(){return 0},r.Wf=function(){},(r=Wo.prototype).ce=function(){this.m.Wa(.25)},r.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.m&&(this.m.stop(),this.m=null),this.i=this.h=this.g=this.l=null,this.u=function(){}},r.de=function(e){jo(this.h,e)},r.od=function(){var e=Bo(this.h);return 0<this.i.readyState&&!this.i.paused?Xo(this,e):e},r.uf=function(){return this.o?this.o.o:0},r.tf=function(){return this.j.C},r.Wf=function(){this.j.We()},(r=Qo.prototype).Nb=function(){return this.g.length},r.release=function(){this.o||(this.g=[],this.l&&this.l.stop(),this.l=null)},r.th=function(){this.o=!0},r.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var r=this.g[n],i=n<t?this.g[n+1].startTime:r.endTime;if(e>=r.startTime&&e<i)return n+this.j}return this.g.length&&e<this.g[0].startTime?this.j:null},r.get=function(e){return 0==this.g.length||0>(e-=this.j)||e>=this.g.length?null:this.g[e]},r.offset=function(e){if(!this.o)for(var t=u(this.g),n=t.next();!n.done;n=t.next())n.value.offset(e)},r.Ld=function(e){if(!this.o&&e.length){var t=Math.round(1e3*e[0].startTime)/1e3;this.g=this.g.filter((function(e){return Math.round(1e3*e.startTime)/1e3<t})),this.g.push.apply(this.g,c(e))}},r.Vc=function(e,t){var n=this;e=e.filter((function(e){return e.endTime>t&&(0==n.g.length||e.endTime>n.g[0].startTime)})),this.Ld(e),this.Ya(t)},r.Ya=function(e){if(!this.o){var t=this.g.length;this.g=this.g.filter((function(t){return t.endTime>e})),this.j+=t-this.g.length}},r.$b=function(e,t,n){if(n=void 0!==n&&n,!this.o){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.j++;0!=this.g.length&&(e=this.g[this.g.length-1],this.g[this.g.length-1]=new fa(e.startTime,t,e.G,e.Na,e.ta,e.aa,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout,e.F,e.h,e.status,e.aes128Key),this.g[this.g.length-1].j=e.j)}},r.Td=function(e,t){var n=this;this.o||(this.l&&this.l.stop(),this.l=new Qt((function(){var e=t();e?n.g.push.apply(n.g,c(e)):(n.l.stop(),n.l=null)})),this.l.Wa(e))},Qo.prototype[Symbol.iterator]=function(){return this.Lb(0)},Qo.prototype.Lb=function(e){var t=this.find(e);if(null==t)return null;t--;var n=this.get(t+1),r=-1;if(n&&0<n.g.length)for(var i=n.g.length-1;0<=i;--i){var a=n.g[i];if(e>=a.startTime&&e<a.endTime){for(;i&&!a.l;)i--,a=n.g[i];if(!a.l)return z("No independent partial segment found!"),null;t++,r=i-1;break}}return new Zo(this,t,r)},j("shaka.media.SegmentIndex",Qo),Qo.forSingleSegment=Jo,Qo.prototype.getIteratorForTime=Qo.prototype.Lb,Qo.prototype.updateEvery=Qo.prototype.Td,Qo.prototype.fit=Qo.prototype.$b,Qo.prototype.evict=Qo.prototype.Ya,Qo.prototype.mergeAndEvict=Qo.prototype.Vc,Qo.prototype.offset=Qo.prototype.offset,Qo.prototype.get=Qo.prototype.get,Qo.prototype.find=Qo.prototype.find,Qo.prototype.markImmutable=Qo.prototype.th,Qo.prototype.release=Qo.prototype.release,Zo.prototype.Cg=function(){return this.g},Zo.prototype.current=function(){var e=this.i.get(this.g);return e&&0<e.g.length&&e.s&&this.h>=e.g.length&&(this.g++,this.h=0,e=this.i.get(this.g)),e&&0<e.g.length?e.g[this.h]:e},Zo.prototype.next=function(){var e=this.i.get(this.g);return e&&0<e.g.length?(this.h++,e.s&&this.h==e.g.length&&(this.g++,this.h=0)):(this.g++,this.h=0),{value:e=this.current(),done:!e}},j("shaka.media.SegmentIterator",Zo),Zo.prototype.next=Zo.prototype.next,Zo.prototype.current=Zo.prototype.current,Zo.prototype.currentPosition=Zo.prototype.Cg,y(es,Qo),(r=es.prototype).clone=function(){var e=new es;return e.h=this.h.slice(),e},r.release=function(){for(var e=u(this.h),t=e.next();!t.done;t=e.next())t.value.release();this.h=[]},r.find=function(e){for(var t=0,n=u(this.h),r=n.next();!r.done;r=n.next()){var i=(r=r.value).find(e);if(null!=i)return i+t;t+=r.j+r.Nb()}return null},r.get=function(e){for(var t=0,n=u(this.h),r=n.next();!r.done;r=n.next()){var i=(r=r.value).get(e-t);if(i)return i;t+=r.j+r.Nb()}return null},r.offset=function(){},r.Ld=function(){},r.Ya=function(){},r.Vc=function(){},r.$b=function(){},r.Td=function(){},j("shaka.media.MetaSegmentIndex",es),es.prototype.updateEvery=es.prototype.Td,es.prototype.fit=es.prototype.$b,es.prototype.mergeAndEvict=es.prototype.Vc,es.prototype.evict=es.prototype.Ya,es.prototype.merge=es.prototype.Ld,es.prototype.offset=es.prototype.offset,es.prototype.get=es.prototype.get,es.prototype.find=es.prototype.find,es.prototype.release=es.prototype.release,ts.prototype.release=function(){this.i&&(this.i.stop(),this.i=null),this.g=null},ts.prototype.set=function(e){if(this.h!=e)e:{if(this.h=e,this.i.stop(),0<=this.h)try{var t=this.h;this.g.Cd()!=t&&this.g.jf(t);break e}catch(e){}this.i.Wa(.25),0!=this.g.Cd()&&this.g.jf(0)}},ts.prototype.Mc=function(){return this.g.Mc()},ns.prototype.release=function(){this.i.stop();for(var e=u(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},y(is,yr),is.prototype.release=function(){this.g.clear(),yr.prototype.release.call(this)},is.prototype.j=function(e){for(var t=u(this.g.values()),n=t.next();!n.done;n=t.next()){e:{for(var r=(n=n.value).Yc,i=r.length-1;0<=i;i--){var a=r[i];if(a.position<=e){r=a.Re;break e}}r=null}if((i=r)&&(i=!((i=n.Bf)===r||i&&r&&i.bandwidth==r.bandwidth&&i.audioSamplingRate==r.audioSamplingRate&&i.codecs==r.codecs&&i.contentType==r.contentType&&i.frameRate==r.frameRate&&i.height==r.height&&i.mimeType==r.mimeType&&i.channelsCount==r.channelsCount&&i.pixelAspectRatio==r.pixelAspectRatio&&i.width==r.width)),i)e:{if(i=e,a=r.contentType,(a=this.h()[a])&&0<a.length){var o=a[a.length-1].end;if(i>=a[0].start&&i<o){i=!0;break e}}i=!1}i&&(n.Bf=r,JSON.stringify(r),n=new hr("qualitychange",new Map([["quality",r],["position",e]])),this.dispatchEvent(n))}},y(as,yr),as.prototype.release=function(){this.g.clear(),this.h.stop(),yr.prototype.release.call(this)},y(os,yr),os.prototype.release=function(){this.i=null,this.g.clear(),this.h.release(),this.h=null,yr.prototype.release.call(this)},os.prototype.j=function(e,t){if(!this.l||0!=e){this.l=!1;for(var n=u(this.i.g),r=n.next();!r.done;r=n.next()){r=r.value;var i=this.g.get(r),a=e<r.startTime?ls:e>r.endTime?cs:us;this.g.set(r,a);for(var o=u(this.m),s=o.next();!s.done;s=o.next())(s=s.value).Xb==i&&s.Wb==a&&s.Pb(r,t)}}};var ls=1,us=2,cs=3;function ds(e,t,n){this.i=e,this.h=t,this.j=0,this.l=n,this.g=new Map}function ps(e,t,n){if(n=void 0!==n&&n,e.h.segmentIndex){var r=e.h.segmentIndex.Lb(Math.max(t.startTime,e.j));if(r){var i=t;for(n&&(i=r.next().value)&&i.startTime==t.startTime&&i.endTime==t.endTime&&(i=null);e.g.size<e.i&&null!=i;)t=!0,i.m&&null!=i.ta&&(t=!1),2==i.Ob()&&(t=!1),t&&!e.g.has(i)&&(ys(t=new gs(e.l),i,e.h),e.g.set(i,t)),e.j=i.startTime,i=r.next().value}}}function hs(e){if(0!==e.g.size){for(var t=u(e.g.keys()),n=t.next();!n.done;n=t.next())(n=n.value)&&fs(e,n);e.j=0}}function fs(e,t){var n=e.g.get(t);e.g.delete(t),n&&n.abort()}function gs(e){this.i=e,this.g=this.h=null}function ys(e,t,n){var r=new Uint8Array(0);e.g=e.i(t,n,(function(t){return R((function(n){if(1==n.g)return r=0<r.byteLength?ci(r,t):t,e.h?_(n,e.h(r),3):n.B(0);r=new Uint8Array(0),E(n)}))}))}function vs(e,t,n,r,i){return e=Er(e,r,i),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function ms(e,t){var n=this;this.g=t,this.m=e,this.h=null,this.u=1,this.o=this.j=null,this.F=0,this.C=!1,this.i=new Map,this.A=!1,this.G=null,this.s=!1,this.l=new xr((function(){return function(e){var t,n,r,i;return R((function(a){if(1==a.g){for(t=[],n=u(e.i.values()),r=n.next();!r.done;r=n.next())Ls(i=r.value),t.push(Os(i));return _(a,Promise.all(t),2)}e.i.clear(),e.g=null,e.m=null,e.h=null,E(a)}))}(n)})),this.H=0}function bs(e,t){var n=e.i.get("video");if(n){var r=n.stream;r&&(t?(t=r.trickModeVideo)&&!n.Tb&&(ks(e,t,!1,0,!1),n.Tb=r):(r=n.Tb)&&(n.Tb=null,ks(e,r,!0,0,!1)))}}function _s(e,t,n,r,i,a){n=void 0!==n&&n,r=void 0===r?0:r,i=void 0!==i&&i,a=void 0!==a&&a,e.j=t,e.A&&(t.video&&ks(e,t.video,n,r,i,a),t.audio&&ks(e,t.audio,n,r,i,a))}function Es(e,t){R((function(n){if(1==n.g)return e.o=t,e.A?t.segmentIndex?n.B(2):_(n,t.createSegmentIndex(),2):n.return();ks(e,t,!0,0,!1),E(n)}))}function ks(e,t,n,r,i,a){var o=e.i.get(t.type);o||t.type!=gt?o&&(o.Tb&&(t.trickModeVideo?(o.Tb=t,t=t.trickModeVideo):o.Tb=null),o.stream!=t||i)&&(o.ra&&function(e,t){t&&t!==e.h&&(hs(e),e.h=t)}(o.ra,t),t.type==gt&&(i=bt(t.mimeType,t.codecs),co(e.g.T,i,e.m.sequenceMode,t.external)),o.stream.closeSegmentIndex&&o.stream.closeSegmentIndex(),o.stream=t,o.X=null,o.vf=!!a,n&&(o.Ic?o.Ud=!0:o.Aa?(o.rb=!0,o.sd=r,o.Ud=!0):(Ls(o),Ds(e,o,!0,r).catch((function(t){e.g&&e.g.onError(t)})))),function(e,t){var n,r;return R((function(i){if(1==i.g)return t.Ka?(n=t.stream,r=t.Ka,n.segmentIndex?i.B(2):_(i,n.createSegmentIndex(),2)):i.return();if(t.Ka!=r||t.stream!=n)return i.return();var a=e.g.Bd(),o=fo(e.g.T,t.type),s=t.stream.segmentIndex.find(t.za?t.za.endTime:a),l=null==s?null:t.stream.segmentIndex.get(s);s=l&&l.ta?l.ta-l.Na:null,l&&!s&&(s=(l.endTime-l.getStartTime())*(t.stream.bandwidth||0)/8),s?((l=l.aa)&&(s+=(l.ta?l.ta-l.Na:null)||0),a=8*s/(l=e.g.getBandwidthEstimate())<(o||0)-a-Math.max(e.m.minBufferTime||0,e.h.rebufferingGoal)||t.Ka.h.g>s):a=!1,a&&t.Ka.abort(),E(i)}))}(e,o).catch((function(t){e.g&&e.g.onError(t)}))):function(e,t){var n,r,i,a,o,s;R((function(l){switch(l.g){case 1:return n=yt,e.F++,r=e.F,k(l,2),_(l,vo(e.g.T,n.ha),4);case 4:A(l,3);break;case 2:i=w(l),e.g&&e.g.onError(i);case 3:a=bt(t.mimeType,t.codecs),co(e.g.T,a,e.m.sequenceMode,t.external),o=e.g.T.F,(o.isTextVisible()||e.h.alwaysStreamText)&&e.F==r&&(s=As(e,t),e.i.set(n.ha,s),Rs(e,s,0)),E(l)}}))}(e,t)}function Ts(e,t){t.Ic||t.rb||(t.Aa?(t.rb=!0,t.sd=0):null==ho(e.g.T,t.type)?null==t.cb&&Rs(e,t,0):(Ls(t),Ds(e,t,!1,0).catch((function(t){e.g&&e.g.onError(t)}))))}function As(e,t){return{stream:t,type:t.type,X:null,ra:ws(e,t),za:null,yb:null,Ne:null,Le:null,Ke:null,Tb:null,endOfStream:!1,Aa:!1,cb:null,rb:!1,sd:0,Ud:!1,Ic:!1,bd:!0,Se:!1,af:!1,Sc:!1,Ka:null}}function ws(e,t){return"video"!==t.type&&"audio"!==t.type?null:0<e.h.segmentPrefetchLimit?new ds(e.h.segmentPrefetchLimit,t,(function(t,n,r){return Ps(e,t,n,r)})):null}function Ss(t,n){var r,i,a,o,s;return R((function(l){switch(l.g){case 1:if(Ir(t.l),n.Aa||null==n.cb||n.Ic)return l.return();if(n.cb=null,!n.rb){l.B(2);break}return _(l,Ds(t,n,n.Ud,n.sd),3);case 3:return l.return();case 2:if(n.stream.segmentIndex){l.B(4);break}return r=n.stream,_(l,n.stream.createSegmentIndex(),5);case 5:if(r!=n.stream)return r.closeSegmentIndex&&r.closeSegmentIndex(),n.Aa||n.cb||Rs(t,n,0),l.return();case 4:k(l,6),null!=(i=function(t,n){if(xs(n))return function(e,t){var n=fo(e,"video")||0;Pt(e.h,t,n)}(t.g.T,n.stream.originalId||""),null;if(n.type==gt&&function(e){e.h&&Pt(e.h,"",0)}(t.g.T),!t.g.T.ga&&n.type!=gt)return t.h.updateIntervalSeconds/2;var r=t.g.Bd(),i=n.za?n.za.endTime:r,a=function(e,t,n){return e.A?0:t==gt?null==(e=e.h).h||e.h<n?0:e.h-Math.max(n,e.g):ba(e=go(e,t),n)}(t.g.T,n.type,r),o=Math.max(1,Math.max(t.m.minBufferTime||0,t.h.rebufferingGoal,t.h.bufferingGoal)*t.u),s=t.m.presentationTimeline.getDuration()-i,l=fo(t.g.T,n.type);if(1e-6>s&&l)return n.endOfStream=!0,"video"==n.type&&(t=t.i.get(gt))&&xs(t)&&(t.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return t.h.updateIntervalSeconds/2;if(!(a=function(e,t,n,r){if(t.X)return t.X.current();if(t.za||r)return n=t.za?t.za.endTime:r,t.Se=!0,t.X=t.stream.segmentIndex.Lb(n),t.X&&t.X.next().value;e=e.h.inaccurateManifestTolerance,r=Math.max(n-e,0);var i=null;return e&&(t.X=t.stream.segmentIndex.Lb(r),i=t.X&&t.X.next().value),i||(t.X=t.stream.segmentIndex.Lb(n),i=t.X&&t.X.next().value),i}(t,n,r,l)))return t.h.updateIntervalSeconds;for(o=1/0,s=u(s=Array.from(t.i.values())),l=s.next();!l.done;l=s.next())xs(l=l.value)||l.X&&!l.X.current()||(o=Math.min(o,l.za?l.za.endTime:r));return i>=o+t.m.presentationTimeline.g?t.h.updateIntervalSeconds:(n.ra&&n.X&&(!(i=a.aa)||n.za&&ha(i,n.yb)||function(e,t){if(e.h.segmentIndex&&e.g.size<e.i&&!e.g.has(t)){var n=new gs(e.l);ys(n,t,e.h),e.g.set(t,n)}}(n.ra,i),ps(n.ra,a)),function(t,n,r,i){var a,o,s,l,u,c,d,p,h,f,g,y,v,m,b;return R((function(T){switch(T.g){case 1:if(a=yt,o=n.stream,s=n.X,n.Aa=!0,k(T,2),2==i.Ob())throw new ut(1,1,1011);return _(T,function(e,t,n){var r,i,a,o,s,l,u,c,d,p,h,f,g;return R((function(y){return 1==y.g?(r=yt,i=[],a=Math.max(0,n.appendWindowStart-.1),o=n.appendWindowEnd+.01,s=Tt(t.stream.codecs),l=At(t.stream.mimeType),(u=n.timestampOffset)==t.Ne&&a==t.Le&&o==t.Ke&&s==t.Me&&l==t.Qf?y.B(2):((c=t.Me&&t.Qf&&function(e,t,n){if(t==gt)var r=!1;else{r=Tt(wt(e.G[t]));var i=At(e.G[t]),a=bt(n.mimeType,n.codecs),o=e.C.forceTransmux;(!Q(a)||!e.u&&Ct.includes(a))&&(o=!0),n=_t(n.mimeType,n.codecs),o&&(o=je(n))&&(a=(o=o()).convertCodecs(t,n),o.destroy()),t=Tt(wt(a)),a=At(a),r=r!==t||i!==a}return!!r&&("smooth"!==e.C.codecSwitchingStrategy||!$()||e.o)}(e.g.T,t.type,t.stream))&&(d=null,t.type===r.$?d=e.i.get(r.O):t.type===r.O&&(d=e.i.get(r.$)),d&&(d.yb=null,Ts(e,d),Os(d).catch((function(){})))),p=function(){var i,d,p,h;return R((function(f){if(1==f.g)return i=new Map,e.j.audio&&i.set(r.O,e.j.audio),e.j.video&&i.set(r.$,e.j.video),k(f,2),t.Le=a,t.Ke=o,t.Me=s,t.Qf=l,t.Ne=u,d=e.m.sequenceMode||"HLS"==e.m.type,_(f,mo(e.g.T,t.type,u,a,o,d,n.mimeType||t.stream.mimeType,n.codecs||t.stream.codecs,i),4);if(2!=f.g)return c&&(p=null,t.type===r.$?p=e.i.get(r.O):t.type===r.O&&(p=e.i.get(r.$)),p&&(p.rb=!1,p.Aa=!1,Ts(e,p))),A(f,0);throw h=w(f),t.Le=null,t.Ke=null,t.Me=null,t.Ne=null,h}))},_(y,p(),2))):(ha(n.aa,t.yb)||(t.yb=n.aa,n.l&&n.aa&&(h=Is(e,t,n.aa),f=function(){var i,a,o,s,l;return R((function(u){switch(u.g){case 1:return k(u,2),_(u,h,4);case 4:return i=u.h,Ir(e.l),a=null,o=new Map,(new qr).box("moov",Xr).box("trak",Xr).box("mdia",Xr).P("mdhd",(function(e){a=Pa(e.reader,e.version).timescale})).box("hdlr",(function(e){(e=e.reader).skip(8),e=e.pb(4);var t=String.fromCharCode(e[0]);switch(t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])){case"soun":o.set(r.O,a);break;case"vide":o.set(r.$,a)}a=null})).parse(i),o.has(t.type)?n.aa.timescale=o.get(t.type):null!=a&&(n.aa.timescale=a),s=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,_(u,e.g.wf(t.type,i),5);case 5:return _(u,yo(e.g.T,t.type,i,null,t.stream,s),6);case 6:A(u,0);break;case 2:throw l=w(u),t.yb=null,l}}))},e.g.vh(n.startTime,n.aa),i.push(f()))),e.m.sequenceMode&&(g=t.za?t.za.j:null,n.j!=g||t.Se)&&(t.Se=!1,i.push(function(e,t,n){var r;return R((function(i){return 1==i.g?t==(r=yt).ha?i.return():(To(e,t,(function(){return _o(e,t)})),e.o&&To(e,r.O,(function(){return _o(e,r.O)})),_(i,To(e,t,(function(){return Eo(e,t,n)})),2)):e.o?_(i,To(e,r.O,(function(){return Eo(e,r.O,n)})),0):i.B(0)}))}(e.g.T,t.type,n.startTime))),_(y,Promise.all(i),0))}))}(t,n,i),4);case 4:return Ir(t.l),t.s?T.return():(l="video/mp4"==o.mimeType||"audio/mp4"==o.mimeType,u=e.ReadableStream,t.h.lowLatencyMode&&u&&l&&("HLS"!=t.m.type||i.o)?(d=new Uint8Array(0),h=p=!1,g=function(e){var a,s,l;return R((function(u){switch(u.g){case 1:if(p)return u.return();if(h=!0,Ir(t.l),t.s)return u.return();if(k(u,2),d=function(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(d,e),a=!1,s=0,(new qr).box("mdat",(function(e){s=e.size+e.start,a=!0})).parse(d,!1,!0),!a){u.B(4);break}return l=d.subarray(0,s),d=d.subarray(s),_(u,Cs(t,n,r,o,i,l,!0),5);case 5:n.ra&&n.X&&ps(n.ra,i,!0);case 4:A(u,0);break;case 2:f=w(u),E(u)}}))},_(T,Is(t,n,i,g),9)):_(T,Is(t,n,i),7));case 7:return c=T.h,Ir(t.l),t.s?T.return():(Ir(t.l),n.rb?(n.Aa=!1,Rs(t,n,0),T.return()):_(T,Cs(t,n,r,o,i,c),6));case 9:if(y=T.h,f)throw f;if(h){T.B(10);break}return p=!0,Ir(t.l),t.s?T.return():n.rb?(n.Aa=!1,Rs(t,n,0),T.return()):_(T,Cs(t,n,r,o,i,y),10);case 10:n.ra&&n.X&&ps(n.ra,i,!0);case 6:if(Ir(t.l),t.s)return T.return();n.za=i,s.next(),n.Aa=!1,n.af=!1,v=t.g.T.kb(),m=v[n.type],JSON.stringify(m),n.rb||t.g.We(i.startTime,i.endTime,n.type),Rs(t,n,0),A(T,0);break;case 2:if(b=w(T),Ir(t.l,b),t.s)return T.return();if(n.Aa=!1,7001==b.code)n.Aa=!1,Ls(n),Rs(t,n,0),T.B(0);else if(n.type==a.ha&&t.h.ignoreTextStreamFailures)t.i.delete(a.ha),T.B(0);else{if(3017!=b.code)return n.Sc=!0,b.severity=2,_(T,Ms(t,n,b),0);(function(e,t,n){if(!Array.from(e.i.values()).some((function(e){return e!=t&&e.af}))){if(0<e.h.maxDisabledTime&&e.g.ud(t.stream,e.h.maxDisabledTime))return;var r=Math.round(100*e.u);if(20<r)e.u-=.2;else{if(!(4<r))return t.Sc=!0,e.s=!0,void e.g.onError(n);e.u-=.04}t.af=!0}Rs(e,t,4)})(t,n,b),T.B(0)}}}))}(t,n,r,a).catch((function(){})),null)}(t,n))&&(Rs(t,n,i),n.Sc=!1),A(l,7);break;case 6:return a=w(l),_(l,Ms(t,n,a),8);case 8:return l.return();case 7:if(o=Array.from(t.i.values()),!t.A||!o.every((function(e){return e.endOfStream}))){l.B(0);break}return _(l,t.g.T.endOfStream(),10);case 10:Ir(t.l),0!=(s=t.g.T.getDuration())&&s<t.m.presentationTimeline.getDuration()&&t.m.presentationTimeline.Ma(s),E(l)}}))}function Cs(e,t,n,r,i,a,o){var s,l,u,c,d,p;return o=void 0!==o&&o,R((function(h){switch(h.g){case 1:return s=r.closedCaptions&&0<r.closedCaptions.size,u=null!=r.emsgSchemeIdUris&&0<r.emsgSchemeIdUris.length||e.h.dispatchAllEmsgBoxes,c=e.h.parsePrftBox&&!e.C,(u||c)&&(l=new qr),u&&l.P("emsg",(function(t){var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.Zc(),o=t.reader.Zc(),s=t.reader.L(),l=t.reader.L(),u=t.reader.L(),c=t.reader.L(),d=i.startTime+l/s;else s=t.reader.L(),l=(d=t.reader.jc()/s+i.timestampOffset)-i.startTime,u=t.reader.L(),c=t.reader.L(),a=t.reader.Zc(),o=t.reader.Zc();t=t.reader.pb(t.reader.getLength()-t.reader.qa()),(n&&n.includes(a)||e.h.dispatchAllEmsgBoxes)&&("urn:mpeg:dash:event:2012"==a?e.g.wh():((n=new hr("emsg",n=(new Map).set("detail",{startTime:d,endTime:d+u/s,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:l,eventDuration:u,id:c,messageData:t}))).cancelable=!0,e.g.onEvent(n),n.defaultPrevented||"https://aomedia.org/emsg/ID3"!=a&&"https://developer.apple.com/streaming/emsg-id3"!=a||(a=Sa(t)).length&&i&&e.g.xh([{cueTime:i.startTime,data:t,frames:a,dts:i.startTime,pts:i.startTime}],0,i.endTime)))})),c&&l.P("prft",(function(t){if(!e.C&&i.aa.timescale){var n=t.reader,r=t.version;n.L(),t=1e3*(t=n.L())+n.L()/Math.pow(2,32)*1e3,0===r?n=n.L():(r=n.L(),n=n.L(),n=r*Math.pow(2,32)+n),t=new Date(new Date(Date.UTC(1900,0,1,0,0,0)).getTime()+t).getTime(),n=new hr("prft",n=(new Map).set("detail",{wallClockTime:t,programStartDate:new Date(t-n/i.aa.timescale*1e3)})),e.g.onEvent(n),e.C=!0}})),(u||c)&&l.parse(a),_(h,function(e,t,n){var r,i,a;return R((function(o){if(1==o.g)return r=Math.max(e.h.bufferBehind,e.m.presentationTimeline.g),null==(i=ho(e.g.T,t.type))||.01>=(a=n-i-r)?o.return():_(o,e.g.T.remove(t.type,i,i+a),2);Ir(e.l),E(o)}))}(e,t,n),2);case 2:return Ir(e.l),d=t.bd,t.bd=!1,p=t.vf,t.vf=!1,_(h,e.g.wf(t.type,a),3);case 3:return _(h,yo(e.g.T,t.type,a,i,r,s,d,p,o),4);case 4:Ir(e.l),E(h)}}))}function xs(e){return e&&e.type==gt&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function Is(t,n,r,i){var a,o,s,l,u;return R((function(c){switch(c.g){case 1:if(r instanceof pa&&(a=r.g))return c.return(a);if(o=null,n.ra){var d=n.ra;if(d.g.has(r)){var p=d.g.get(r);i&&(p.h=i),d.g.delete(r),o=p.g}else o=null}return o||(o=Ps(t,r,n.stream,i)),s=0,n.X&&(s=n.X.g),n.Ka=o,_(c,o.promise,2);case 2:if(l=c.h,n.Ka=null,u=l.data,!r.aes128Key){c.B(3);break}return _(c,function(t,n,r){var i,a,o,s;return R((function(l){if(1==l.g)return(i=n).cryptoKey?l.B(2):_(l,i.fetchKey(),3);if(!(a=i.iv))for(a=ae(new ArrayBuffer(16)),o=i.firstMediaSequenceNumber+r,s=a.byteLength-1;0<=s;s--)a[s]=255&o,o>>=8;return l.return(e.crypto.subtle.decrypt({name:"AES-CBC",iv:a},i.cryptoKey,t))}))}(u,r.aes128Key,s),4);case 4:u=c.h;case 3:return c.return(u)}}))}function Ps(e,t,n,r){var i=t instanceof fa?t:void 0,a=i?1:0;return t=vs(t.Y(),t.Na,t.ta,e.h.retryParameters,r),e.g.Sb.request(wr,t,{type:a,stream:n,segment:i})}function Ds(e,t,n,r){var i,a;return R((function(o){return 1==o.g?(t.rb=!1,t.Ud=!1,t.sd=0,t.Ic=!0,t.za=null,t.yb=null,t.X=null,t.ra&&hs(t.ra),r?(i=e.g.Bd(),a=e.g.T.getDuration(),_(o,e.g.T.remove(t.type,i+r,a),3)):_(o,vo(e.g.T,t.type),4)):3!=o.g?(Ir(e.l),n?_(o,e.g.T.flush(t.type),3):o.B(3)):(Ir(e.l),t.Ic=!1,t.endOfStream=!1,t.Aa||t.cb||Rs(e,t,0),void E(o))}))}function Rs(e,t,n){var r=t.type;(r!=gt||e.i.has(r))&&(t.cb=new Xt((function(){var n;return R((function(r){return 1==r.g?(k(r,2),_(r,Ss(e,t),4)):2!=r.g?A(r,0):(n=w(r),e.g&&e.g.onError(n),void E(r))}))})).U(n))}function Ls(e){null!=e.cb&&(e.cb.stop(),e.cb=null)}function Os(e){return R((function(t){return e.Ka?_(t,e.Ka.abort(),0):t.B(0)}))}function Ms(e,t,n){var r;return R((function(i){if(1==i.g)return _(i,ar(e.G),2);Ir(e.l),r=0===e.h.maxDisabledTime&&1011==n.code?1:e.h.maxDisabledTime,1===n.category&&0<r&&(n.handled=e.g.ud(t.stream,r),n.handled&&(n.severity=1)),e.g.onError(n),n.handled||e.h.failureCallback(n),E(i)}))}function Ns(e,t,n){var r,i,a,o;return R((function(s){if(1==s.g){var l=new Ye(e).Ea.split("/").pop().split(".");return r=1==l.length?"":l.pop().toLowerCase(),(i=Us[r])?s.return(i):((a=Er([e],n)).method="HEAD",_(s,t.request(0,a).promise,2))}return o=s.h,i=o.headers["content-type"],s.return(i?i.toLowerCase().split(";").shift():"")}))}gs.prototype.abort=function(){this.g&&this.g.abort()},(r=ms.prototype).destroy=function(){return this.l.destroy()},r.configure=function(e){this.h=e,this.G=new ir({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0);for(var t=u(this.i.keys()),n=t.next();!n.done;n=t.next())if((n=this.i.get(n.value)).ra){var r=n.ra,i=e.segmentPrefetchLimit;r.i=i;for(var a=Array.from(r.g.keys());a.length>i;){var o=a.pop();o&&fs(r,o)}0<e.segmentPrefetchLimit||(n.ra=null)}else 0<e.segmentPrefetchLimit&&(n.ra=ws(this,n.stream))},r.start=function(){var e=this;return R((function(t){if(1==t.g)return _(t,function(e){var t,n,r,i,a,o,s,l;return R((function(c){if(1==c.g){if(t=yt,!e.j)throw new ut(2,5,5006);return n=new Map,r=new Set,e.j.audio&&(n.set(t.O,e.j.audio),r.add(e.j.audio)),e.j.video&&(n.set(t.$,e.j.video),r.add(e.j.video)),e.o&&(n.set(t.ha,e.o),r.add(e.o)),_(c,e.g.T.init(n,e.m.sequenceMode,e.m.type,e.m.ignoreManifestTimestampsInSegmentsMode),2)}for(Ir(e.l),e.updateDuration(),i=u(n.keys()),a=i.next();!a.done;a=i.next())o=a.value,s=n.get(o),e.i.has(o)||(l=As(e,s),e.i.set(o,l),Rs(e,l,0));E(c)}))}(e),2);Ir(e.l),e.A=!0,E(t)}))},r.bd=function(){if(this.g)for(var e=this.g.Bd(),t=u(this.i.keys()),n=t.next();!n.done;n=t.next()){var r=n.value,i=null;(n=this.i.get(r)).X&&(i=n.X.current()),(!i||i.startTime>e||i.endTime<e)&&(n.X=null),(i=this.g.T).A?i=!1:r==gt?i=null!=(i=i.h).g&&null!=i.h&&(e>=i.g&&e<i.h):i=ma(i=go(i,r),e),i||((null!=fo(this.g.T,r)||n.Aa)&&Ts(this,n),n.Ka&&(n.Ka.abort(),n.Ka=null),r===gt&&((r=this.g.T).H&&r.H.h()),n.bd=!0)}},r.updateDuration=function(){var e=this.m.presentationTimeline.getDuration();1/0>e?this.g.T.Ma(e):this.g.T.Ma(Math.pow(2,32))};var Us={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mpd:"application/dash+xml",ism:"application/vnd.ms-sstr+xml",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav",sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Fs(e,t){if(e.lineBreak)return"\n";if(e.nestedCues.length)return e.nestedCues.map((function(t){return Fs(t,e)})).join("");var n=[],r=700<=e.fontWeight,i="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return r&&n.push(["b"]),i&&n.push(["i"]),a&&n.push(["u"]),""==(i=e.color)&&t&&(i=t.color),r="",(i=Bs(i))&&(r+="."+i),""==(i=e.backgroundColor)&&t&&(i=t.backgroundColor),(t=Bs(i))&&(r+=".bg_"+t),r&&n.push(["c",r]),n.reduceRight((function(e,t){var n=u(t);return"<"+(t=n.next().value)+(void 0===(n=n.next().value)?"":n)+">"+e+"</"+t+">"}),e.payload)}function Bs(e){var t=(e=e.toLowerCase()).replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);switch(t?e="#"+(256|parseInt(t[1],10)).toString(16).slice(1)+(256|parseInt(t[2],10)).toString(16).slice(1)+(256|parseInt(t[3],10)).toString(16).slice(1):e.startsWith("#")&&7<e.length&&(e=e.slice(0,7)),e){case"white":case"#fff":case"#ffffff":return"white";case"lime":case"#0f0":case"#00ff00":return"lime";case"cyan":case"#0ff":case"#00ffff":return"cyan";case"red":case"#f00":case"#ff0000":return"red";case"yellow":case"#ff0":case"#ffff00":return"yellow";case"magenta":case"#f0f":case"#ff00ff":return"magenta";case"blue":case"#00f":case"#0000ff":return"blue";case"black":case"#000":case"#000000":return"black"}return null}function js(e,t){for(var n=[],r=(e=u(e)).next();!r.done;r=e.next())if((r=r.value).isContainer)n.push.apply(n,c(js(r.nestedCues,r)));else{var i=r.clone();i.nestedCues=[],i.payload=Fs(r,t),n.push(i)}return n}function Hs(e,t){this.g=null;for(var n=u(Array.from(e.textTracks)),r=n.next();!r.done;r=n.next())(r=r.value).mode="disabled",r.label==t&&(this.g=r);this.g||(this.g=e.addTextTrack("subtitles",t)),this.g.mode="hidden"}function Vs(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function Gs(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var r=u(Array.from(e.cues)),i=r.next();!i.done;i=r.next())(i=i.value)&&t(i)&&e.removeCue(i);e.mode=n}function Ks(){}function zs(){}function Ws(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function Ys(t,n){var r=this;this.m=!1,this.i=[],this.A=t,this.s=n,this.j=null,this.g=document.createElement("div"),this.g.classList.add("shaka-text-container"),this.g.style.textAlign="center",this.g.style.display="flex",this.g.style.flexDirection="column",this.g.style.alignItems="center",this.g.style.justifyContent="flex-end",this.s.appendChild(this.g),this.C=new Qt((function(){Xs(r)})).Wa(.25),this.h=new Map,this.l=new Pr,this.l.D(document,"fullscreenchange",(function(){Xs(r,!0)})),this.l.D(this.A,"resize",(function(){var e=r.A,t=e.videoWidth;e=e.videoHeight,r.j=t&&e?t/e:null})),this.o=null,"ResizeObserver"in e&&(this.o=new ResizeObserver((function(){Xs(r,!0)})),this.o.observe(this.g)),this.u=new Map}function qs(e,t){for(;null!=t;){if(t==e.g)return!0;t=t.parentElement}return!1}function Xs(e,t){if(e.g){var n=e.A.currentTime;if(!e.m||void 0!==t&&t){for(var r=(t=u(e.u.values())).next();!r.done;r=t.next())Ws(r.value);Ws(e.g),e.h.clear(),e.u.clear()}if(e.m){t=new Map;for(var i=(r=u(e.h.keys())).next();!i.done;i=r.next())i=i.value,t.set(i,e.h.get(i));!function e(t,n,r,i,a){for(var o=!1,s=[],l=[],c=(n=u(n)).next();!c.done;c=n.next()){c=c.value,a.push(c);var d=t.h.get(c),p=c.startTime<=i&&c.endTime>i,h=d?d.og:null;d&&(s.push(d.je),d.$c&&s.push(d.$c),p||(o=!0,t.h.delete(c),d=null)),p&&(l.push(c),d?qs(t,h)||(o=!0):(Qs(t,c,a),h=(d=t.h.get(c)).og,o=!0)),0<c.nestedCues.length&&h&&e(t,c.nestedCues,h,i,a),a.pop()}if(o){for(a=(i=u(s)).next();!a.done;a=i.next())(a=a.value).parentElement&&a.parentElement.removeChild(a);for(l.sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime})),c=(l=u(l)).next();!c.done;c=l.next())(i=t.h.get(c.value)).$c?(r.appendChild(i.$c),i.$c.appendChild(i.je)):r.appendChild(i.je)}}(e,e.i,e.g,n,[])}}}function Qs(e,t,n){var r=1<n.length,i=r?"span":"div";t.lineBreak&&(i="br"),t.rubyTag&&(i=t.rubyTag),r=!r&&0<t.nestedCues.length;var a=document.createElement(i);if("br"!=i&&function(e,t,n,r,i){var a=t.style,o=0==n.nestedCues.length,s=1<r.length;a.whiteSpace="pre-wrap";var l=n.payload.replace(/\s+$/g,(function(e){return" ".repeat(e.length)}));if(a.webkitTextStrokeColor=n.textStrokeColor,a.webkitTextStrokeWidth=n.textStrokeWidth,a.color=n.color,a.direction=n.direction,a.opacity=n.opacity,a.paddingLeft=$s(n.linePadding,n,e.s),a.paddingRight=$s(n.linePadding,n,e.s),a.textCombineUpright=n.textCombineUpright,a.textShadow=n.textShadow,n.backgroundImage)a.backgroundImage="url('"+n.backgroundImage+"')",a.backgroundRepeat="no-repeat",a.backgroundSize="contain",a.backgroundPosition="center",a.width="100%",a.height="100%";else{if(n.nestedCues.length)var u=t;else u=document.createElement("span"),t.appendChild(u);n.border&&(u.style.border=n.border),!i&&((t=Js(r,(function(e){return e.backgroundColor})))?u.style.backgroundColor=t:l&&(u.style.backgroundColor="rgba(0, 0, 0, 0.8)"),t=Js(r,(function(e){return e.fontFamily})))&&(u.style.fontFamily=t),l&&(u.textContent=l)}s&&!r[r.length-1].isContainer?a.display="inline":(a.display="flex",a.flexDirection="column",a.alignItems="center",a.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),o||(a.margin="0"),a.fontFamily=n.fontFamily,a.fontWeight=n.fontWeight.toString(),a.fontStyle=n.fontStyle,a.letterSpacing=n.letterSpacing,a.fontSize=$s(n.fontSize,n,e.s),null!=(r=n.line)&&((o=n.lineInterpretation)==Ce&&(o=1,s=16,e.j&&1>e.j&&(s=32),r=0>r?100+r/s*100:r/s*100),1==o&&(a.position="absolute",n.writingMode==Se?(a.width="100%",n.lineAlign==xe?a.top=r+"%":"end"==n.lineAlign&&(a.bottom=100-r+"%")):"vertical-lr"==n.writingMode?(a.height="100%",n.lineAlign==xe?a.left=r+"%":"end"==n.lineAlign&&(a.right=100-r+"%")):(a.height="100%",n.lineAlign==xe?a.right=r+"%":"end"==n.lineAlign&&(a.left=100-r+"%")))),a.lineHeight=n.lineHeight,null!=n.position&&(n.writingMode==Se?a.paddingLeft=n.position:a.paddingTop=n.position),"line-left"==(e=function(e){var t=e.direction,n=e.positionAlign;return e=e.textAlign,n!==_e?n:"left"===e||"start"===e&&t===we||"end"===e&&"rtl"===t?"line-left":"right"===e||"start"===e&&"rtl"===t||"end"===e&&t===we?"line-right":"center"}(n))?a.cssFloat="left":"line-right"==e&&(a.cssFloat="right"),a.textAlign=n.textAlign,a.textDecoration=n.textDecoration.join(" "),a.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&a.writingMode==n.writingMode||(a.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==Se?a.width=n.size+"%":a.height=n.size+"%")}(e,a,t,n,r),n=null,t.region&&t.region.id){n=t.region,i=e.j===4/3?2.5:1.9;var o=n.id+"_"+n.width+"x"+n.height+(n.heightUnits==Ne?"%":"px")+"-"+n.viewportAnchorX+"x"+n.viewportAnchorY+(n.viewportAnchorUnits==Ne?"%":"px");if(e.u.has(o))n=e.u.get(o);else{var s=document.createElement("span"),l=n.heightUnits==Ne?"%":"px",u=n.widthUnits==Ne?"%":"px",c=n.viewportAnchorUnits==Ne?"%":"px";s.id="shaka-text-region---"+o,s.classList.add("shaka-text-region"),s.style.position="absolute",2===n.heightUnits&&2===n.widthUnits?(s.style.height=5.33*n.height+"%",s.style.width=n.width*i+"%"):(s.style.height=n.height+l,s.style.width=n.width+u),2===n.viewportAnchorUnits?(l=n.viewportAnchorY/75*100,u=n.viewportAnchorX/(e.j===4/3?160:210)*100,l-=n.regionAnchorY*n.height*5.33/100,u-=n.regionAnchorX*n.width*i/100,s.style.top=l+"%",s.style.left=u+"%"):(s.style.top=n.viewportAnchorY-n.regionAnchorY*n.height/100+c,s.style.left=n.viewportAnchorX-n.regionAnchorX*n.width/100+c),s.style.display="flex",s.style.flexDirection="column",s.style.alignItems="center",s.style.justifyContent="before"==t.displayAlign?"flex-start":"center"==t.displayAlign?"center":"flex-end",e.u.set(o,s),n=s}}i=a,r&&((i=document.createElement("span")).classList.add("shaka-text-wrapper"),i.style.backgroundColor=t.backgroundColor,i.style.lineHeight="normal",a.appendChild(i)),e.h.set(t,{je:a,og:i,$c:n})}function $s(e,t,n){var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),unit:r[2]}:null;if(!r)return e;var i=r.value;switch(r.unit){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return e}}function Js(e,t){for(var n=e.length-1;0<=n;n--){var r=t(e[n]);if(r||0===r)return r}return null}function Zs(e,t){this.h=e,this.g=t,this.j="",this.o=void 0,this.i=!1,this.m=!0,this.l=!1}function el(t){return t.j||(t.j=t.g.sessionId||e.crypto.randomUUID()),{v:1,sf:t.o,sid:t.j,cid:t.g.contentId,mtp:t.h.getBandwidthEstimate()/1e3}}function tl(e,t,n){n=void 0===n?{}:n;var r=void 0===r?e.g.useHeaders:r;if(e.g.enabled){Object.assign(n,el(e)),n.pr=e.h.zd();var i=n.ot===ol||n.ot===sl;if(e.l&&i&&(n.bs=!0,n.su=!0,e.l=!1),null==n.su&&(n.su=e.m),r)e=function(e){for(var t=Object.keys(e),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=(t=u(t)).next();!o.done;o=t.next())o=o.value,i[null!=a[o]?a[o]:1][o]=e[o];for(e=0;e<i.length;e++)(a=nl(i[e]))&&(n["CMCD-"+r[e]]=a);return n}(n),Object.keys(e).length&&Object.assign(t.headers,e);else{var a=nl(n);a&&(t.uris=t.uris.map((function(e){return rl(e,a)})))}}}function nl(e){function t(e){return 100*n(e/100)}function n(e){return Math.round(e)}for(var r,i=[],a={br:n,d:n,bl:t,dl:t,mtp:t,nor:function(e){return encodeURIComponent(e)},rtp:t,tb:n},o=Object.keys(e||{}).sort(),s=(o=u(o)).next();!s.done;s=o.next()){var l=e[s=s.value];if(!(r=l,Number.isNaN(r)||null==r||""===r||!1===r||"v"===s&&1===l||"pr"==s&&1===l)){var c=a[s];c&&(l=c(l));var d;d="string"===(c=typeof l)&&"ot"!==s&&"sf"!==s&&"st"!==s?s+"="+JSON.stringify(l):"boolean"===c?s:"symbol"===c?s+"="+l.description:s+"="+l,i.push(d)}}return i.join(",")}function rl(e,t){return!t||e.includes("offline:")?e:((e=new Ye(e)).g.set("CMCD",t),e.toString())}(r=Hs.prototype).remove=function(e,t){return!!this.g&&(Gs(this.g,(function(n){return n.startTime<t&&n.endTime>e})),!0)},r.append=function(e){var t=js(e),n=[];e=this.g.cues?Array.from(this.g.cues):[];for(var r={},i=(t=u(t)).next();!i.done;r={Yb:r.Yb},i=t.next())r.Yb=i.value,e.some(function(e){return function(t){return t.startTime==e.Yb.startTime&&t.endTime==e.Yb.endTime&&t.text==e.Yb.payload}}(r))||(i=Vs(r.Yb))&&n.push(i);for(r=(e=u(e=n.slice().sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?n.indexOf(t)-n.indexOf(e):n.indexOf(e)-n.indexOf(t)})))).next();!r.done;r=e.next())this.g.addCue(r.value)},r.destroy=function(){return this.g&&(Gs(this.g,(function(){return!0})),this.g.mode="disabled"),this.g=null,Promise.resolve()},r.isTextVisible=function(){return"showing"==this.g.mode},r.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},j("shaka.text.SimpleTextDisplayer",Hs),Hs.prototype.setTextVisibility=Hs.prototype.setTextVisibility,Hs.prototype.isTextVisible=Hs.prototype.isTextVisible,Hs.prototype.destroy=Hs.prototype.destroy,Hs.prototype.append=Hs.prototype.append,Hs.prototype.remove=Hs.prototype.remove,(r=Ks.prototype).remove=function(){},r.append=function(){},r.destroy=function(){},r.isTextVisible=function(){return!1},r.setTextVisibility=function(){},j("shaka.text.StubTextDisplayer",Ks),Ks.prototype.setTextVisibility=Ks.prototype.setTextVisibility,Ks.prototype.isTextVisible=Ks.prototype.isTextVisible,Ks.prototype.destroy=Ks.prototype.destroy,Ks.prototype.append=Ks.prototype.append,Ks.prototype.remove=Ks.prototype.remove,j("shaka.util.Dom",zs),zs.removeAllChildren=Ws,(r=Ys.prototype).append=function(e){for(var t=[].concat(c(this.i)),n={},r=(e=u(e)).next();!r.done;n={gd:n.gd},r=e.next())n.gd=r.value,t.some(function(e){return function(t){return be(t,e.gd)}}(n))||this.i.push(n.gd);Xs(this)},r.destroy=function(){this.s.removeChild(this.g),this.g=null,this.m=!1,this.i=[],this.C&&this.C.stop(),this.h.clear(),this.l&&(this.l.release(),this.l=null),this.o&&(this.o.disconnect(),this.o=null)},r.remove=function(e,t){if(!this.g)return!1;var n=this.i.length;return this.i=this.i.filter((function(n){return n.startTime<e||n.endTime>=t})),Xs(this,n>this.i.length),!0},r.isTextVisible=function(){return this.m},r.setTextVisibility=function(e){this.m=e},j("shaka.text.UITextDisplayer",Ys),Ys.prototype.setTextVisibility=Ys.prototype.setTextVisibility,Ys.prototype.isTextVisible=Ys.prototype.isTextVisible,Ys.prototype.remove=Ys.prototype.remove,Ys.prototype.destroy=Ys.prototype.destroy,Ys.prototype.append=Ys.prototype.append,j("shaka.text.WebVttGenerator",(function(){})),Zs.prototype.configure=function(e){this.g=e};var il="m",al="a",ol="v",sl="av",ll="i",ul="c",cl="tt";function dl(e){this.h=e,this.g=null}function pl(e){return!e||"false"!==e.toLowerCase()&&(/^[-0-9]/.test(e)?parseInt(e,10):e.replace(/["]+/g,""))}j("shaka.util.CmcdManager.StreamingFormat",{DASH:"d",HLS:"h",qg:"s",OTHER:"o"}),(r=dl.prototype).configure=function(e){this.h=e},r.Kf=function(){return this.h.enabled&&this.h.applyMaximumSuggestedBitrate&&this.g&&this.g.has(fl)?1e3*this.g.get(fl):null},r.Jf=function(){return this.h.enabled&&this.g&&this.g.has(hl)?1e3*this.g.get(hl):null},r.Xg=function(){return this.h.enabled&&this.g&&this.g.has(gl)?this.g.get(gl):null},r.Yg=function(){return this.h.enabled&&this.g&&this.g.has(yl)?this.g.get(yl):null},r.getBandwidthEstimate=function(e){var t=this.Jf();if(!t)return e;var n=this.h.estimatedThroughputWeightRatio;return 0<n&&1>=n?e*(1-n)+t*n:e},j("shaka.util.CmsdManager",dl),dl.prototype.getBandwidthEstimate=dl.prototype.getBandwidthEstimate,dl.prototype.getRoundTripTime=dl.prototype.Yg,dl.prototype.getResponseDelay=dl.prototype.Xg,dl.prototype.getEstimatedThroughput=dl.prototype.Jf,dl.prototype.getMaxBitrate=dl.prototype.Kf;var hl="etp",fl="mb",gl="rd",yl="rtt";function vl(){}function ml(e,t,n,r,i){var a,o=i in r,s=!0;for(a in t){var l=i+"."+a,u=o?r[i]:n[a];o||a in n?void 0===t[a]?void 0===u||o?delete e[a]:e[a]=Yt(u):u.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=Yt(u)),l=ml(e[a],t[a],u,r,l),s=s&&l):typeof t[a]!=typeof u||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=u.constructor?(z("Invalid config, wrong type for "+l),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&W("Unexpected number of arguments for "+l),e[a]=t[a]):(z("Invalid config, unrecognized key "+l),s=!1)}return s}function bl(e,t){for(var n={},r=n,i=0,a=0;!(0>(i=e.indexOf(".",i)));)0!=i&&"\\"==e[i-1]||(r[a=e.substring(a,i).replace(/\\\./g,".")]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function _l(e,t){return e&&t}function El(){this.g=null,this.h=[]}function kl(e,t){return R((function(n){if(1==n.g)return e.g?_(n,new Promise((function(t){return e.h.push(t)})),2):n.B(2);e.g=t,E(n)}))}function Tl(){}function Al(e){return new Ye(e=Hr(e)).jb}function wl(e,t,n){function r(e){se(a).setUint32(o,e.byteLength,!0),o+=4,a.set(ae(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new ut(2,6,6015);var i;i="string"==typeof t?Gr(t,!0):t,e=Gr(e=Hr(e),!0);var a=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),o=0;return r(e),r(i),r(n),a}function Sl(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,wl(e,n=Hr(e).split("skd://").pop(),t))}function Cl(e,t){2===e&&(t.headers["Content-Type"]="application/octet-stream")}function xl(){}function Il(){var t=1/0;navigator.connection&&navigator.connection.saveData&&(t=360);var n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,persistentSessionOnlinePlayback:!1,persistentSessionsMetadata:[],initDataTransform:function(t,n,r){return e.shakaMediaKeysPolyfill&&"skd"==n&&(n=r.serverCertificate,t=wl(t,r=Al(t),n)),t},logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[],keySystemsMapping:{},parseInbandPsshEnabled:en(),minHdcpVersion:"",ignoreDuplicateInitData:!rn()},r="reload",i=!1;rn()||nn()||un("Tizen 4")||an()||navigator.userAgent.match(/webOS\/4/i)||navigator.userAgent.match(/webOS\/5/i)||(r="smooth",i=!0),i={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,segmentRelativeVttTiming:!1,raiseFatalErrorOnManifestUpdateRequestFailure:!1,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(e){return _l([e],e)},sequenceMode:!1,enableAudioGroups:!1,multiTypeVariantsAllowed:i},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E",ignoreManifestProgramDateTime:!1,mediaPlaylistFullMimeType:'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"',useSafariBehaviorForLive:!0,liveSegmentsDelay:3,sequenceMode:!(nn()||rn()||an()||sn()),ignoreManifestTimestampsInSegmentsMode:!1,disableCodecGuessing:!1,allowLowLatencyByteRangeOptimization:!0},mss:{manifestPreprocessor:function(e){return _l([e],e)},sequenceMode:!1,keySystemsBySystemId:{"9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready"}}};var a={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(e){return _l([e])},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.5,gapJumpTimerTime:.25,durationBackoff:1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1,maxDisabledTime:30,parsePrftBox:!1,segmentPrefetchLimit:0,liveSync:!1,liveSyncMaxLatency:1,liveSyncPlaybackRate:1.1,liveSyncMinLatency:0,liveSyncMinPlaybackRate:1,allowMediaSourceRecoveries:!0,minTimeBetweenRecoveries:5};(un("Web0S")||tn()||un("CrKey")||un("Hisense")||un("VIDAA"))&&(a.stallSkip=0);var o={trackSelectionCallback:function(e){return R((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return R((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?_(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))}))},progressCallback:function(e,t){return _l([e,t])},usePersistentLicense:!0,numberOfParallelDownloads:5},s={drm:n,manifest:i,streaming:a,mediaSource:{codecSwitchingStrategy:r,sourceBufferExtraFeatures:"",forceTransmux:!1,insertFakeEncryptionInInit:!0},offline:o,abrFactory:function(){return new jn},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:t,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5},restrictToElementSize:!1,restrictToScreenSize:!1,ignoreDevicePixelRatio:!1,clearBufferSwitch:!1,safeMarginSwitch:0},autoShowText:3,preferredAudioLanguage:"",preferredAudioLabel:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoHdrLevel:"AUTO",preferredVideoLayout:"",preferredVideoLabel:"",preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferSpatialAudio:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1},cmsd:{enabled:!0,applyMaximumSuggestedBitrate:!0,estimatedThroughputWeightRatio:.5},lcevc:{enabled:!1,dynamicPerformanceScaling:!0,logLevel:0,drawLogo:!1},ads:{customPlayheadTracker:!1}};return o.trackSelectionCallback=function(t){return R((function(n){return n.return(function(t,n,r){var i=r;"AUTO"==i&&(i=e.matchMedia("(color-gamut: p3)").matches?"PQ":"SDR");var a=t.filter((function(e){return!("variant"!=e.type||e.hdr&&e.hdr!=i)}));r=[];var o=Kt(n,a.map((function(e){return e.language})));o&&(r=a.filter((function(e){return jt(e.language)==o}))),0==r.length&&(r=a.filter((function(e){return e.primary}))),0==r.length&&(a.map((function(e){return e.language})),r=a);var s=r.filter((function(e){return e.height&&480>=e.height}));for(s.length&&(s.sort((function(e,t){return t.height-e.height})),r=s.filter((function(e){return e.height==s[0].height}))),n=[],r.length&&(a=Math.floor(r.length/2),r.sort((function(e,t){return e.bandwidth-t.bandwidth})),n.push(r[a])),t=u(t),r=t.next();!r.done;r=t.next())(r=r.value).type!=gt&&"image"!=r.type||n.push(r);return n}(t,s.preferredAudioLanguage,s.preferredVideoHdrLevel))}))},s}function Pl(e,t,n){var r={".drm.keySystemsMapping":"",".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return ml(e,t,n||Il(),r,"")}function Dl(){this.g=null,this.h=[]}function Rl(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var r=(e=u(e.h)).next();!r.done;r=e.next())n+=(r=r.value).state==t?r.duration:0;return n}function Ll(){this.i=this.h=null,this.g=[]}function Ol(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function Ml(){this.u=this.A=this.G=this.C=this.s=this.j=this.F=this.m=this.i=this.K=this.N=this.H=this.I=this.J=this.l=this.o=NaN,this.g=new Dl,this.h=new Ll}function Nl(t,n){yr.call(this);var r=this;this.l=Lu,this.td=this.g=null,this.fa=!1,this.xd=new Pr,this.Dc=new Pr,this.m=new Pr,this.C=this.G=this.o=this.H=null,this.Ed=0,this.W=new El,this.na=this.ga=this.i=this.Gd=this.F=this.j=this.wa=this.J=this.Vf=this.Z=this.V=this.xa=this.K=this.I=this.hb=null,this.gb=!1,this.He=this.s=null,this.Pe=1e9,this.Hc=[],this.N=NaN,this.h=nu(this),this.Je={width:1/0,height:1/0},this.u=null,this.Da=new Zn(this.h.preferredAudioLanguage,this.h.preferredVariantRole,this.h.preferredAudioChannelCount,this.h.preferredVideoHdrLevel,this.h.preferSpatialAudio,this.h.preferredVideoLayout,this.h.preferredAudioLabel,this.h.preferredVideoLabel,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),this.fb=this.h.preferredTextLanguage,this.Gc=this.h.preferredTextRole,this.Ec=this.h.preferForcedSubs,this.nc=[],n&&n(this),this.V=function(e){return new Zs({getBandwidthEstimate:function(){return e.s?e.s.getBandwidthEstimate():NaN},kb:function(){return e.kb()},getCurrentTime:function(){return e.g?e.g.currentTime:0},zd:function(){return e.zd()},Mb:function(){return e.Mb()},xb:function(){return e.xb()},S:function(){return e.S()}},e.h.cmcd)}(this),this.Z=new dl(this.h.cmsd),this.H=function(e){return new br((function(t,n,r){e.s&&e.s.segmentDownloaded(t,n,r)}),(function(t,n,r){if(n=(new Map).set("headers",t).set("request",n).set("requestType",r),e.dispatchEvent(Fl("downloadheadersreceived",n)),e.Z&&(n=e.Z).h.enabled){if(r=t["cmsd-static"])try{var i=new Map,a=r.split(",");for(r=0;r<a.length;r++){var o=a[r].split("=");i.set(o[0],pl(o[1]))}}catch(e){}if(t=t["cmsd-dynamic"]){try{var s=new Map,l=t.split(";");for(t=1;t<l.length;t++){var u=l[t].split("=");s.set(u[0],pl(u[1]))}var c=s}catch(e){c=null}c&&(n.g=c)}}}),(function(t,n,r,i){t=(new Map).set("request",t).set("error",n).set("httpResponseCode",r).set("aborted",i),e.dispatchEvent(Fl("downloadfailed",t))}),(function(t,n,r){var i=e.V;if(r=void 0===r?{}:r,i.g.enabled)if("HEAD"===n.method)tl(i,n);else switch(t){case 0:try{if(i.g.enabled){if(r.type){e:{switch(r.type){case 4:var a="d";break e;case 3:case 2:a="h";break e;case 5:a="s";break e}a=void 0}i.o=a}tl(i,n,{ot:il,su:!i.i})}}catch(e){Y("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}break;case wr:t=r;try{if(i.g.enabled){var o=t.segment;a=0,o&&(a=o.endTime-o.startTime);var s={d:1e3*a,st:i.h.S()?"l":"v"};s.ot=function(e){if(0===e.type)return ll;if(e=e.stream){var t=e.type;if("video"==t)return e.codecs&&e.codecs.includes(",")?sl:ol;if("audio"==t)return al;if("text"==t)return"application/mp4"===e.mimeType?cl:ul}}(t);var l=s.ot===ol||s.ot===al||s.ot===sl||s.ot===cl,c=t.stream;c&&(l&&(s.bl=function(e,t){if(!(t=e.h.kb()[t]).length)return NaN;var n=e.h.getCurrentTime();return(e=t.find((function(e){return e.start<=n&&e.end>=n})))?1e3*(e.end-n):NaN}(i,c.type)),c.bandwidth&&(s.br=c.bandwidth/1e3)),l&&s.ot!==cl&&(s.tb=function(e,t){var n=e.h.xb();if(!n.length)return NaN;e=n[0];for(var r=(n=u(n)).next();!r.done;r=n.next())"variant"===(r=r.value).type&&r.bandwidth>e.bandwidth&&(e=r);switch(t){case ol:return e.videoBandwidth||NaN;case al:return e.audioBandwidth||NaN;default:return e.bandwidth}}(i,s.ot)/1e3),tl(i,n,s)}}catch(e){Y("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}break;case 2:case 5:case 6:tl(i,n,{ot:"k"});break;case 4:tl(i,n,{ot:"o"})}}),(function(t,n,r,i){e.F&&e.F.banLocation&&e.F.banLocation(i)}))}(this),this.H.gf(this.h.streaming.forceHTTPS),this.A=null,Bu&&(this.A=Bu()),this.xd.D(e,"online",(function(){Eu(r),r.bf()})),this.vd=new Qt((function(){return function(e){for(var t=Date.now()/1e3,n=!1,r=u(e.i.variants),i=r.next();!i.done;i=r.next())0<(i=i.value).disabledUntilTime&&i.disabledUntilTime<=t&&(i.disabledUntilTime=0,n=!0,a=i,o=void 0,o="",a.video&&(o+="video:"+a.video.id),a.audio&&(o=o+(o?"&":"")+"audio:"+a.audio.id));var a,o;e.i.variants.every((function(e){return 0===e.disabledUntilTime}))&&e.vd.stop(),n&&hu(e,!0,void 0,!1,!1)}(r)})),t&&(Kn("Player","Please migrate from initializing Player with a mediaElement; use the attach method instead."),this.Fc(t,!0))}function Ul(e){null!=e.J&&(Za(e.J),e.J.release(),e.J=null)}function Fl(e,t){return new hr(e,t)}function Bl(e,t){e.dispatchEvent(Fl("onstatechange",(new Map).set("state",t)))}function jl(e,t){var n;return R((function(r){return 1==r.g?(n=++e.Ed,_(r,kl(e.W,t),2)):n!=e.Ed?(e.W.release(),r.return(!0)):r.return(!1)}))}function Hl(e){var t,n,r,i,a;return R((function(o){if(1==o.g)return Bl(e,"media-source"),t=e.h.textDisplayFactory,n=t(),e.Ie=t,(r=function(e,t,n,r){return new so(e,t,n,r)}(e.g,n,(function(t,n,r){Vl(e,t,n,r)}),e.J)).configure(e.h.mediaSource),i=e.h.manifest,a=i.segmentRelativeVttTiming,r.Z=a,_(o,r.J,2);e.G=r,E(o)}))}function Vl(e,t,n,r){for(var i=(t=u(t)).next();!i.done;i=t.next())if((i=i.value).data&&i.cueTime&&i.frames){var a=i.cueTime+n,o=r;o&&a>o&&(o=a);for(var s=u(i.frames),l=s.next();!l.done;l=s.next())Gl(e,a,o,"org.id3",l.value);e.A&&e.A.onHlsTimedMetadata(i,a)}}function Gl(e,t,n,r,i){t=(new Map).set("startTime",t).set("endTime",n).set("metadataType",r).set("payload",i),e.dispatchEvent(Fl("metadata",t))}function Kl(e,t){if(t&&"chapters"==t.kind){t.mode="hidden";var n=new Qt((function(){t.mode="hidden"})).lc().U(.5);e.nc.push((function(){n.stop()}))}}function zl(e,t){return new Oi(t,e.h.drm.updateExpirationTime)}function Wl(e,t,n){e.K=new er,e.K.g=nr,tr(e.K,n,Math.min(.5,n/2)),ou(e),e.m.D(t,"waiting",(function(){return Yl(e)})),e.m.D(t,"stalled",(function(){return Yl(e)})),e.m.D(t,"canplaythrough",(function(){return Yl(e)})),e.m.D(t,"progress",(function(){return Yl(e)}))}function Yl(e){switch(e.l){case Mu:if(e.g.ended)var t=!0;else{var n=va(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case Ou:e:if(e.g.ended||po(e.G))t=!0;else{if(e.i.presentationTimeline.S()){n=e.i.presentationTimeline.wb();var r=va(e.g.buffered);if(null!=r&&r>=n){t=!0;break e}}t=!1}break;default:t=!1}r=ba(e.g.buffered,e.g.currentTime);var i=t,a=(n=e.K).h.get(n.g);t=n.g,r=i||r>=a?rr:nr,n.g=r,t!=r&&ou(e)}function ql(e){if(e.F){var t=Yt(e.h.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.F.configure(t)}if(e.o&&e.o.configure(e.h.drm),e.j){e.j.configure(e.h.streaming);try{iu(e,e.i)}catch(t){ku(e,t)}e.s&&du(e),!(t=e.j.j)||t.allowedByApplication&&t.allowedByKeySystem||hu(e)}if(e.H&&e.H.gf(e.h.streaming.forceHTTPS),e.G&&(e.G.configure(e.h.mediaSource),e.G.Z=e.h.manifest.segmentRelativeVttTiming,t=e.h.textDisplayFactory,e.Ie!=t)){var n=t(),r=e.G,i=r.F;r.F=n,i&&(n.setTextVisibility(i.isTextVisible()),i.destroy()),r.h&&(r.h.j=n),e.Ie=t,e.j&&((n=(t=e.j).i.get(gt))&&ks(t,n.stream,!0,0,!0))}e.s&&(e.s.configure(e.h.abr),e.h.abr.enabled?e.s.enable():e.s.disable(),_u(e)),e.K&&(t=e.h.streaming.rebufferingGoal,e.i&&(t=Math.max(t,e.i.minBufferTime)),tr(e.K,t,Math.min(.5,t/2))),e.i&&Cu(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.A&&e.A.configure(e.h.ads),e.V&&e.V.configure(e.h.cmcd),e.Z&&e.Z.configure(e.h.cmsd)}function Xl(e){return e&&(e=/(\d+)x(\d+)/.exec(e))?{Ib:parseInt(e[1],10),rows:parseInt(e[2],10)}:null}function Ql(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function $l(e){return Array.from(e.g.textTracks).filter((function(e){return"chapters"==e.kind}))}function Jl(e,t){var n;return R((function(r){switch(r.g){case 1:return k(r,2),_(r,Ns(t,e.H,e.h.streaming.retryParameters),4);case 4:n=r.h,A(r,3);break;case 2:w(r);case 3:if(n)return r.return(n);throw new ut(1,2,2011,t)}}))}function Zl(e,t,n,r,i,a,o){var s,l,u,c;return R((function(d){if(1==d.g)return"text/vtt"!=i||o.length?_(d,eu(e,t,e.H,e.h.streaming.retryParameters),3):d.B(2);2!=d.g&&(s=d.h,l=tu(e,s,i,o),u=new Blob([l],{type:"text/vtt"}),t=xo(u),i="text/vtt"),c=document.createElement("track");var p=e.V,h=t;try{if(p.g.enabled){var f=el(p);f.ot=ul,f.su=!0;var g=rl(h,nl(f))}else g=h}catch(e){Y("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),g=h}return c.src=g,c.label=a,c.kind=r,c.srclang=n,e.g.getAttribute("crossorigin")||e.g.setAttribute("crossorigin","anonymous"),e.g.appendChild(c),d.return(c)}))}function eu(e,t,n,r){var i,a,o;return R((function(s){if(1==s.g){i=wr,(a=Er([t],r)).method="GET";var l=e.V;try{l.g.enabled&&tl(l,a,{ot:ul,su:!0})}catch(e){Y("CMCD_TEXT_ERROR","Could not generate text CMCD data.",e)}return _(s,n.request(i,a).promise,2)}return o=s.h,s.return(o.data)}))}function tu(e,t,n,r){var i=Rt[n];if(i)return n=i(),e={periodStart:0,segmentStart:0,segmentEnd:e.g.duration,vttOffset:0},t=ae(t),function(e,t){function n(e){for(var n=e,r=u(t),i=r.next();!i.done;i=r.next())(i=i.value).end&&i.start<e&&(n+=i.end-i.start);return(10>(e=Math.floor(n/3600))?"0":"")+e+":"+(10>(r=Math.floor(n/60%60))?"0":"")+r+":"+(10>(i=Math.floor(n%60))?"0":"")+i+"."+(100>(n=Math.floor(1e3*n%1e3))?10>n?"00":"0":"")+n}var r=js(e);e="WEBVTT\n\n";for(var i=(r=u(r)).next();!i.done;i=r.next())e+=n((i=i.value).startTime)+" --\x3e "+n(i.endTime)+function(e){var t=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case Ee:t.push("align:middle");break;case"start":t.push("align:start");break;case"end":t.push("align:end")}switch(e.writingMode){case"vertical-lr":t.push("vertical:lr");break;case"vertical-rl":t.push("vertical:rl")}return t.length?" "+t.join(" "):""}(i)+"\n",e+=i.payload+"\n\n";return e}(t=n.parseMedia(t,e,null),r);throw new ut(2,2,2014,n)}function nu(e){var t=Il();return t.streaming.failureCallback=function(t){if(e.S()){var n=null;1001==t.code||1002==t.code?n=1:1003==t.code&&(n=.1),null!=n&&(t.severity=1,e.bf(n))}},t.textDisplayFactory=function(){return e.td?new Ys(e.g,e.td):HTMLMediaElement.prototype.addTextTrack?new Hs(e.g,"Shaka Player TextTrack"):new Ks},t}function ru(e,t){return R((function(n){if(1==n.g)return _(n,function(e,t){return R((function(n){if(1==n.g)return _(n,yn(e.o,t),2);if(!t.variants.some(Pn))throw new ut(2,4,4032);E(n)}))}(e,t),2);iu(e,t),E(n)}))}function iu(e,t){if(e.l!=Ru){for(var n=e.h.restrictions,r=e.Je,i=!1,a=u(t.variants),o=a.next();!o.done;o=a.next()){var s=(o=o.value).allowedByApplication;o.allowedByApplication=gn(o,n,r),s!=o.allowedByApplication&&(i=!0)}if(i&&e.j&&yu(e),(n=e.o?e.o.g:null)&&e.o.s)for(i=(r=u(t.variants)).next();!i.done;i=r.next())i=i.value,au(e,n.keySystem,i.video),au(e,n.keySystem,i.audio);xu(e,t)}}function au(e,t,n){if(n)for(var r=(n=u(n.drmInfos)).next();!r.done;r=n.next())if((r=r.value).keySystem==t)for(var i=(r=u(r.initData||[])).next();!i.done;i=r.next())i=i.value,ji(e.o,i.initDataType,i.initData)}function ou(e){var t=e.Ee();if(e.u&&e.K&&e.C){if(e.V){var n=e.V;t||n.i||(n.i=!0),n.i&&t&&(n.l=!0),n.m=t}lu(e)}t=(new Map).set("buffering",t),e.dispatchEvent(Fl("buffering",t))}function su(e){var t=e.g.playbackRate;0!=t&&(e.I&&e.I.set(t),t=Fl("ratechange"),e.dispatchEvent(t))}function lu(e){if(e.u&&e.K){var t=e.u.g,n="playing";e.K.g==nr?n="buffering":e.g.paused?n="paused":e.g.ended&&(n="ended");var r=n;if(null==t.g)t.g={timestamp:Date.now()/1e3,state:r,duration:0},t=!0;else{var i=Date.now()/1e3;t.g.duration=i-t.g.timestamp,t.g.state==r?t=!1:(t.h.push(t.g),t.g={timestamp:i,state:r,duration:0},t=!0)}t&&(n=(new Map).set("newstate",n),e.dispatchEvent(Fl("statechanged",n)))}}function uu(e){if(e.S()){var t=e.Cb();if(Number.isFinite(t.end)&&!(e.g.currentTime<t.start)){if(e.h.streaming.liveSync)var n=e.h.streaming.liveSyncMaxLatency,r=e.h.streaming.liveSyncPlaybackRate;else e.i&&e.i.serviceDescription&&(n=e.i.serviceDescription.maxLatency||e.h.streaming.liveSyncMaxLatency,r=e.i.serviceDescription.maxPlaybackRate||e.h.streaming.liveSyncPlaybackRate);if(e.h.streaming.liveSync)var i=e.h.streaming.liveSyncMinLatency,a=e.h.streaming.liveSyncMinPlaybackRate;else e.i&&e.i.serviceDescription&&(i=e.i.serviceDescription.minLatency||e.h.streaming.liveSyncMinLatency,a=e.i.serviceDescription.minPlaybackRate||e.h.streaming.liveSyncMinPlaybackRate);var o=e.g.playbackRate,s=t.end-e.g.currentTime,l=0;if(e.l==Mu){var u=e.g.buffered;0<u.length&&(l=u.end(u.length-1),l=Math.max(r,l-t.end))}n&&r&&s-l>n?o!=r&&e.pf(r):i&&a&&s-l<i?o!=a&&e.pf(a):o!==e.I.Mc()&&e.xf()}}}function cu(e){if(e.g){var t,n=!1,r=e.g.currentTime/e.g.duration;if(isNaN(r)||(r=Math.round(100*r),isNaN(e.N)?(e.N=r,n=!0):(r=Math.max(e.N,r),e.N!=r&&(e.N=r,n=!0))),n)0==e.N?t=Fl("started"):25==e.N?t=Fl("firstquartile"):50==e.N?t=Fl("midpoint"):75==e.N?t=Fl("thirdquartile"):100==e.N&&(t=Fl("complete")),t&&e.dispatchEvent(t)}}function du(e){try{xu(e,e.i)}catch(t){return ku(e,t),!1}var t=Dn(e.i.variants);return t=e.Da.create(t),e.s.setVariants(Array.from(t.values())),!0}function pu(e,t){return t=void 0!==t&&t,du(e)?e.s.chooseVariant(t):null}function hu(e,t,n,r,i){t=void 0===t||t,n=void 0===n?0:n,r=void 0!==r&&r,i=void 0===i||i;var a=pu(e);a&&fu(e,a,i,t,n,r)}function fu(e,t,n,r,i,a){a=void 0!==a&&a;var o=e.j.j;if(t==o)r&&_s(e.j,t,r,i,!0);else{var s=e.u.h;s.h!=t&&(s.h=t,s.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),_s(e.j,t,r,i,a,n),r=null,o&&(r=Tn(o)),t=Tn(t),n?(n=(new Map).set("oldTrack",r).set("newTrack",t),e.J&&eo(e.J,t,e.Be()),Iu(e,n=Fl("adaptation",n))):vu(e,r,t)}}function gu(e,t){var n=Array.from(e.g.audioTracks).find((function(e){return e.enabled}));t.enabled=!0,t.id!==n.id&&(n.enabled=!1),vu(e,n=xn(n),t=xn(t))}function yu(e){Iu(e,Fl("trackschanged"))}function vu(e,t,n){t=(new Map).set("oldTrack",t).set("newTrack",n),e.J&&eo(e.J,n,e.Be()),Iu(e,n=Fl("variantchanged",t))}function mu(e){Iu(e,Fl("textchanged"))}function bu(e){Iu(e,Fl("texttrackvisibility"))}function _u(e){e.h.abr.enabled||Eu(e),Iu(e,Fl("abrstatuschanged",(new Map).set("newStatus",e.h.abr.enabled)))}function Eu(e,t){if(t=void 0===t||t,e.l==Ou){e.vd.stop();for(var n=u(e.i.variants),r=n.next();!r.done;r=n.next())r.value.disabledUntilTime=0;t&&du(e)}}function ku(e,t){var n,r,i;return R((function(a){switch(a.g){case 1:if(e.l==Ru)return a.return();if(n=!0,!(e.gb&&e.i&&e.j)||3016!=t.code&&3014!=t.code&&3015!=t.code&&3018!=t.code){a.B(2);break}return k(a,3),_(a,function(e){var t,n,r,i,a,o;return R((function(s){return 1==s.g?(t=Date.now()/1e3,n=e.h.minTimeBetweenRecoveries,!e.h.allowMediaSourceRecoveries||t-e.H<n?s.return(!1):(e.H=t,r=yt,(i=e.i.get(r.O))&&(i.yb=null,Ts(e,i),Os(i).catch((function(){}))),(a=e.i.get(r.$))&&(a.yb=null,Ts(e,a),Os(a).catch((function(){}))),o=new Map,e.j.audio&&o.set(r.O,e.j.audio),e.j.video&&o.set(r.$,e.j.video),_(s,Co(e.g.T,o),2))):s.return(!0)}))}(e.j),5);case 5:r=a.h,n=!r,A(a,2);break;case 3:w(a),n=!0;case 2:if(!n)return a.return();2===t.severity&&Eu(e,!1),i=Fl("error",(new Map).set("detail",t)),e.dispatchEvent(i),i.defaultPrevented&&(t.handled=!0),E(a)}}))}function Tu(e,t,n){n=(new Map).set("detail",{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}),e.dispatchEvent(Fl(t,n))}function Au(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new ut(2,3,3016,t,n,e.g.error.message)}function wu(e,t){if(e.j){var n=Fl("keystatuschanged");e.dispatchEvent(n);var r=Object.keys(t);n=1==r.length&&"00"==r[0];var i=!1;if(r.length)for(var a=(r=u(e.i.variants)).next();!a.done;a=r.next()){var o=[];(a=a.value).audio&&o.push(a.audio),a.video&&o.push(a.video);for(var s=(o=u(o)).next();!s.done;s=o.next()){var l=s.value;if(s=a.allowedByKeySystem,l.keyIds.size){a.allowedByKeySystem=!0;for(var c=(l=u(l.keyIds)).next();!c.done;c=l.next())c=c.value,c=t[n?"00":c],a.allowedByKeySystem=a.allowedByKeySystem&&!!c&&!Uu.includes(c)}s!=a.allowedByKeySystem&&(i=!0)}}if(i&&(yu(e),!du(e)))return;(t=e.j.j)&&!t.allowedByKeySystem&&hu(e)}}function Su(e,t,n){e.F&&e.F.onExpirationUpdated&&e.F.onExpirationUpdated(t,n),t=Fl("expirationupdated"),e.dispatchEvent(t)}function Cu(e,t,n){0<t&&(e.S()||e.kg(t)),n<(t=e.getDuration())&&(e.S()||e.Ma(n))}function xu(e,t){e=e.o?e.o.yd():{};var n=Object.keys(e);n=n.length&&"00"==n[0];for(var r=!1,i=!1,a=new Set,o=new Set,s=(t=u(t.variants)).next();!s.done;s=t.next()){var l=[];(s=s.value).audio&&l.push(s.audio),s.video&&l.push(s.video);for(var c=(l=u(l)).next();!c.done;c=l.next())if((c=c.value).keyIds.size)for(var d=(c=u(c.keyIds)).next();!d.done;d=c.next()){d=d.value;var p=e[n?"00":d];p?Uu.includes(p)&&o.add(p):a.add(d)}s.allowedByApplication?s.allowedByKeySystem&&(r=!0):i=!0}if(!r)throw new ut(2,4,4012,e={hasAppRestrictions:i,missingKeys:Array.from(a),restrictedKeyStatuses:Array.from(o)})}function Iu(e,t){R((function(n){if(1==n.g)return _(n,Promise.resolve(),2);e.l!=Ru&&e.dispatchEvent(t),E(n)}))}function Pu(e){for(var t=new Set,n=(e=u(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(jt(n.language)):t.add("und");return t}function Du(e){for(var t=new Map,n=new Map,r=(e=u(e)).next();!r.done;r=e.next()){var i="und",a=[];(r=r.value).language&&(i=jt(r.language)),(a="variant"==r.type?r.audioRoles:r.roles)&&a.length||(a=[""]),t.has(i)||t.set(i,new Set);for(var o=(a=u(a)).next();!o.done;o=a.next())o=o.value,t.get(i).add(o),r.label&&(n.has(i)||n.set(i,new Map),n.get(i).set(o,r.label))}var s=[];return t.forEach((function(e,t){for(var r=(e=u(e)).next();!r.done;r=e.next()){r=r.value;var i=null;n.has(t)&&n.get(t).has(r)&&(i=n.get(t).get(r)),s.push({language:t,role:r,label:i})}})),s}j("shaka.util.ConfigUtils",vl),vl.convertToConfigObject=bl,vl.mergeConfigObjects=ml,El.prototype.release=function(){0<this.h.length?this.h.shift()():this.g=null},j("shaka.util.FairPlayUtils",Tl),Tl.commonFairPlayResponse=function(e,t){if(2===e){try{var n=Br(t.data)}catch(e){return}e=!1,"<ckc>"===(n=n.trim()).substr(0,5)&&"</ckc>"===n.substr(-6)&&(n=n.slice(5,-6),e=!0);try{var r=JSON.parse(n);r.ckc&&(n=r.ckc,e=!0),r.CkcMessage&&(n=r.CkcMessage,e=!0),r.License&&(n=r.License,e=!0)}catch(e){}e&&(t.data=ie(si(n)))}},Tl.expressplayFairPlayRequest=function(e,t){Cl(e,t)},Tl.conaxFairPlayRequest=function(e,t){Cl(e,t)},Tl.ezdrmFairPlayRequest=function(e,t){Cl(e,t)},Tl.verimatrixFairPlayRequest=function(e,t){2===e&&(e=oi(e=ae(t.body)),t.headers["Content-Type"]="application/x-www-form-urlencoded",t.body=Vr("spc="+e))},Tl.expressplayInitDataTransform=function(e,t,n){return Sl(e,t,n)},Tl.conaxInitDataTransform=function(t,n,r){if("skd"!==n)return t;n=r.serverCertificate,r=Hr(t).split("skd://").pop().split("?").shift(),r=e.atob(r);var i=new ArrayBuffer(2*r.length);i=oe(i);for(var a=0,o=r.length;a<o;a++)i[a]=r.charCodeAt(a);return wl(t,i,n)},Tl.ezdrmInitDataTransform=function(e,t,n){return"skd"!==t?e:(t=n.serverCertificate,wl(e,n=Hr(e).split(";").pop(),t))},Tl.verimatrixInitDataTransform=function(e,t,n){return Sl(e,t,n)},Tl.initDataTransform=wl,Tl.defaultGetContentId=Al,Tl.isFairPlaySupported=function(){var e;return R((function(t){return 1==t.g?(e={initDataTypes:["cenc","sinf","skd"],videoCapabilities:[{contentType:'video/mp4; codecs="avc1.42E01E"'}]},k(t,2),_(t,navigator.requestMediaKeySystemAccess("com.apple.fps",[e]),4)):2!=t.g?t.return(!0):(w(t),t.return(!1))}))},j("shaka.util.PlayerConfiguration",xl),xl.mergeConfigObjects=Pl,xl.createDefault=Il,y(Nl,yr),(r=Nl.prototype).destroy=function(){var e,t=this;return R((function(n){switch(n.g){case 1:return t.l==Ru?n.return():(Ul(t),e=t.detach(),t.l=Ru,_(n,e,2));case 2:if(t.xd&&(t.xd.release(),t.xd=null),t.Dc&&(t.Dc.release(),t.Dc=null),t.m&&(t.m.release(),t.m=null),t.He=null,t.h=null,t.u=null,t.td=null,t.V=null,t.Z=null,!t.H){n.B(3);break}return _(n,t.H.destroy(),4);case 4:t.H=null;case 3:t.s&&(t.s.release(),t.s=null),yr.prototype.release.call(t),E(n)}}))},r.Fc=function(e,t){t=void 0===t||t;var n,r,i=this;return R((function(a){switch(a.g){case 1:if(i.l==Ru)throw new ut(2,7,7e3);if(!i.g||i.g==e){a.B(2);break}return _(a,i.detach(),2);case 2:return _(a,jl(i,"attach"),4);case 4:if(a.h)return a.return();if(k(a,5,6),Bl(i,"attach"),n=function(){var e=Au(i);e&&ku(i,e)},i.Dc.D(e,"error",n),i.g=e,!t||!$t()||i.G){a.B(6);break}return _(a,Hl(i),6);case 6:S(a),i.W.release(),C(a,0);break;case 5:return r=w(a),_(a,i.detach(),10);case 10:throw r}}))},r.wg=function(e){this.Vf=e},r.detach=function(e){e=void 0!==e&&e;var t=this;return R((function(n){if(1==n.g){if(t.l==Ru)throw new ut(2,7,7e3);return _(n,t.mc(!1,e),2)}if(3!=n.g)return _(n,jl(t,"detach"),3);if(n.h)return n.return();try{t.g&&(t.Dc.Bb(),t.g=null),Bl(t,"detach"),t.A&&!e&&t.A.release()}finally{t.W.release()}E(n)}))},r.mc=function(e,t){e=void 0===e||e,t=void 0!==t&&t;var n,r,i,a,o,s,l,c,d,p=this;return R((function(h){switch(h.g){case 1:return p.l!=Ru&&(p.l=Lu),_(h,jl(p,"unload"),2);case 2:return h.h?h.return():(T(h,3),p.gb=!1,Bl(p,"unload"),e&&!$t()&&(e=!1),Ul(p),n=p.nc.map((function(e){return e()})),p.nc=[],_(h,Promise.all(n),5));case 5:if(p.dispatchEvent(Fl("unloading")),p.xa&&(p.xa.release(),p.xa=null),p.g&&p.m.Bb(),p.vd.stop(),p.hb&&(p.hb.release(),p.hb=null),!p.F){h.B(6);break}return _(h,p.F.stop(),7);case 7:p.F=null,p.Gd=null;case 6:if(!p.s){h.B(8);break}return _(h,p.s.stop(),8);case 8:if(!p.j){h.B(10);break}return _(h,p.j.destroy(),11);case 11:p.j=null;case 10:if(p.I&&(p.I.release(),p.I=null),p.C&&(p.C.release(),p.C=null),!p.G){h.B(12);break}return _(h,p.G.destroy(),13);case 13:p.G=null;case 12:if(p.A&&!t&&p.A.onAssetUnload(),p.Z&&(p.Z.g=null),p.g&&Ws(p.g),!p.g||!p.g.src){h.B(14);break}return _(h,new Promise((function(e){return new Qt(e).U(.1)})),15);case 15:p.g.removeAttribute("src"),p.g.load();case 14:if(!p.o){h.B(16);break}return _(h,p.o.destroy(),17);case 17:p.o=null;case 16:if(p.ga=null,p.K=null,p.i){for(r=u(p.i.variants),i=r.next();!i.done;i=r.next())for(a=i.value,o=u([a.audio,a.video]),s=o.next();!s.done;s=o.next())(l=s.value)&&l.segmentIndex&&l.segmentIndex.release();for(c=u(p.i.textStreams),s=c.next();!s.done;s=c.next())(d=s.value).segmentIndex&&d.segmentIndex.release()}p.i=null,p.u=new Ml,p.Ie=null,p.Hc=[],p.N=NaN,ou(p);case 3:S(h),p.W.release(),C(h,4);break;case 4:if(e&&$t()&&!p.G)return _(h,Hl(p),0);h.B(0)}}))},r.Vh=function(e){this.na=e},r.load=function(e,t,n){t=void 0===t?null:t;var r,i,a,o,s,l=this;return R((function(c){switch(c.g){case 1:if(l.l==Ru)throw new ut(2,7,7e3);return _(c,kl(l.W,"load"),2);case 2:if(l.W.release(),!l.g)throw new ut(2,7,7002);if(!l.ga){c.B(3);break}return _(c,l.mc(!1),3);case 3:if(r=++l.Ed,i=function(){if(l.Ed!=r)throw new ut(2,7,7e3)},a=function(e,t){return R((function(n){switch(n.g){case 1:return T(n,2),_(n,kl(l.W,t),4);case 4:return i(),_(n,e(),5);case 5:i();case 2:S(n),l.W.release(),C(n,0)}}))},k(c,5),l.na=t,l.gb=!1,l.dispatchEvent(Fl("loading")),o=Date.now()/1e3,l.u=new Ml,l.ga=e,n){c.B(7);break}return _(c,a((function(){return R((function(e){if(1==e.g)return _(e,function(e){var t,n;return R((function(r){return 1==r.g?(t=e.h.manifest.retryParameters,_(r,Ns(e.ga,e.H,t),2)):("application/x-mpegurl"==(n=r.h)&&on()&&(n="application/vnd.apple.mpegurl"),r.return(n))}))}(l),2);n=e.h,E(e)}))}),"guessMimeType_"),7);case 7:if(function(e,t){if(!$t())return!0;if(t){if(""==(e.g||cn()).canPlayType(t))return!1;if(!$t()||!(t in la))return!0;if("application/x-mpegurl"===t||"application/vnd.apple.mpegurl"===t){if(e.h.streaming.preferNativeHls)return!0;if(on())return e.h.streaming.useNativeHlsOnSafari}}return!1}(l,n))return _(c,a((function(){return R((function(e){return _(e,function(e,t){var n,r,i,a;return R((function(o){return 1==o.g?(n=yt,r=Date.now()/1e3,i=!0,e.o=zl(e,{Sb:e.H,onError:function(t){ku(e,t)},Pd:function(t){wu(e,t)},onExpirationUpdated:function(t,n){Su(e,t,n)},onEvent:function(t){e.dispatchEvent(t),"drmsessionupdate"==t.type&&i&&(i=!1,e.u.j=Date.now()/1e3-r)}}),e.o.configure(e.h.drm),a={id:0,language:"und",disabledUntilTime:0,primary:!1,audio:null,video:{id:0,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:t?At(t):"",codecs:t?wt(t):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.$,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.o.Z=!0,_(o,Mi(e.o,[a],[]),2)):_(o,e.o.Fc(e.g),0)}))}(l,n),0)}))}),"initializeSrcEqualsDrmInner_"),16);if(l.G){c.B(11);break}return _(c,a((function(){return R((function(e){return _(e,Hl(l),0)}))}),"initializeMediaSourceEngineInner_"),11);case 11:return _(c,a((function(){return R((function(e){return _(e,function(e,t){var n,r,i,a,o,s,l,c;return R((function(d){if(1==d.g)return n=e.H,Bl(e,"manifest-parser"),e.Gd=sa(e.ga,t||null),e.F=e.Gd(),r=Yt(e.h.manifest),e.g&&"AUDIO"===e.g.nodeName&&(r.disableVideo=!0),e.F.configure(r),e.xa=new as((function(){return e.Cb()})),e.xa.addEventListener("regionadd",(function(t){t=t.region,Tu(e,"timelineregionadded",t),e.A&&e.A.onDashTimedMetadata(t)})),e.wa=null,e.h.streaming.observeQualityChanges&&(e.wa=new is((function(){return e.kb()})),e.wa.addEventListener("qualitychange",(function(t){var n=t.quality;t=t.position,n=(new Map).set("mediaQuality",{bandwidth:n.bandwidth,audioSamplingRate:n.audioSamplingRate,codecs:n.codecs,contentType:n.contentType,frameRate:n.frameRate,height:n.height,mimeType:n.mimeType,channelsCount:n.channelsCount,pixelAspectRatio:n.pixelAspectRatio,width:n.width}).set("position",t),e.dispatchEvent(Fl("mediaqualitychanged",n))}))),i={networkingEngine:n,filter:function(t){return ru(e,t)},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,r=u(t.textStreams),i=r.next();!i.done;i=r.next())"application/cea-608"!=(i=i.value).mimeType&&"application/cea-708"!=i.mimeType||n.add(i.originalId);for(r=u(t.variants),i=r.next();!i.done;i=r.next())if((i=i.value.video)&&i.closedCaptions)for(var a=u(i.closedCaptions.keys()),o=a.next();!o.done;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",l=new es,c=i.closedCaptions.get(o);s={id:e.Pe++,originalId:o,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:l,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:c,originalLanguage:c,label:null,type:gt,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:i.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1},t.textStreams.push(s),n.add(o)}}(e,t)},onTimelineRegionAdded:function(t){var n=e.xa;e:{for(var r=u(n.g),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){r=i;break e}r=null}null==r&&(n.g.add(t),t=new hr("regionadd",new Map([["region",t]])),n.dispatchEvent(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return ku(e,t)},isLowLatencyMode:function(){return e.h.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return e.h.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){e.configure("streaming.lowLatencyMode",!0)},updateDuration:function(){e.j&&e.j.updateDuration()},newDrmInfo:function(t){var n=e.o?e.o.g:null;n&&e.o.s&&au(e,n.keySystem,t)},onManifestUpdated:function(){var t=(new Map).set("isLive",e.S());e.dispatchEvent(Fl("manifestupdated",t)),e.A&&e.A.onManifestUpdated(e.S())},getBandwidthEstimate:function(){return e.s.getBandwidthEstimate()}},a=Date.now()/1e3,Bl(e,"manifest"),o=e,_(d,e.F.start(e.ga,i),2);if(o.i=d.h,s=Fl("manifestparsed"),e.dispatchEvent(s),0==e.i.variants.length)throw new ut(2,4,4036);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}(e.i),l=Date.now()/1e3,c=l-a,e.u.F=c,E(d)}))}(l,n),0)}))}),"parseManifestInner_"),13);case 13:return _(c,a((function(){return R((function(e){return _(e,function(e){var t,n;return R((function(r){return 1==r.g?(Bl(e,"drm-engine"),t=Date.now()/1e3,n=!0,e.o=zl(e,{Sb:e.H,onError:function(t){ku(e,t)},Pd:function(t){wu(e,t)},onExpirationUpdated:function(t,n){Su(e,t,n)},onEvent:function(r){e.dispatchEvent(r),"drmsessionupdate"==r.type&&n&&(n=!1,e.u.j=Date.now()/1e3-t,e.J&&Za(e.J))}}),e.o.configure(e.h.drm),_(r,Mi(e.o,e.i.variants,e.i.offlineSessionIds),2)):3!=r.g?_(r,e.o.Fc(e.g),3):_(r,ru(e,e.i),0)}))}(l),0)}))}),"initializeDrmInner_"),14);case 14:return _(c,a((function(){return R((function(e){return _(e,function(e,t){var n,r,i,a,o,s,l,c,d,p,h,f,g,y,v,m,b,k;return R((function(T){switch(T.g){case 1:for(Bl(e,"load"),n=e.g,e.I=new ts({Cd:function(){return n.playbackRate},Mc:function(){return n.defaultPlaybackRate},jf:function(e){n.playbackRate=e},Uf:function(e){n.currentTime+=e}}),r=function(){return lu(e)},i=function(){return su(e)},e.m.D(n,"playing",r),e.m.D(n,"pause",r),e.m.D(n,"ended",r),e.m.D(n,"ratechange",i),function(e,t){if(t.lcevc.enabled){var n=e.xb();n&&n[0]&&"video/mp2t"==n[0].videoMimeType&&(Zt()||navigator.userAgent.match(/Edge\//))&&(t.mediaSource.forceTransmux||W("LCEVC Warning: For MPEG-2 TS decoding the config.mediaSource.forceTransmux must be enabled.")),Ul(e),null==e.J&&(e.J=new Ja(e.g,e.Vf,t.lcevc),e.G&&(e.G.N=e.J))}else Ul(e)}(e,e.h),a=e.h.abrFactory,e.s&&e.He==a||(e.He=a,e.s=a(),"function"!=typeof e.s.setMediaElement&&(Kn("AbrManager","Please use an AbrManager with setMediaElement function."),e.s.setMediaElement=function(){}),"function"!=typeof e.s.setCmsdManager&&(Kn("AbrManager","Please use an AbrManager with setCmsdManager function."),e.s.setCmsdManager=function(){}),e.s.configure(e.h.abr)),e.Da=new Zn(e.h.preferredAudioLanguage,e.h.preferredVariantRole,e.h.preferredAudioChannelCount,e.h.preferredVideoHdrLevel,e.h.preferSpatialAudio,e.h.preferredVideoLayout,e.h.preferredAudioLabel,e.h.preferredVideoLabel,e.h.mediaSource.codecSwitchingStrategy,e.h.manifest.dash.enableAudioGroups),e.fb=e.h.preferredTextLanguage,e.Gc=e.h.preferredTextRole,e.Ec=e.h.preferForcedSubs,Cu(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.s.init((function(t,n,r){e.j&&t!=e.j.j&&fu(e,t,!0,void 0!==n&&n,void 0===r?0:r)})),e.s.setMediaElement(n),e.s.setCmsdManager(e.Z),fn(e.i,e.h.preferredVideoCodecs,e.h.preferredAudioCodecs,e.h.preferredDecodingAttributes),e.j=function(e){return new ms(e.i,{Bd:function(){return e.C?e.C.od():0},getBandwidthEstimate:function(){return e.s.getBandwidthEstimate()},T:e.G,Sb:e.H,onError:function(t){return ku(e,t)},onEvent:function(t){return e.dispatchEvent(t)},wh:function(){e.F&&e.F.update&&e.F.update()},We:function(t,n,r){e.C&&e.C.Wf(),Yl(e),t=(new Map).set("start",t).set("end",n).set("contentType",r),e.dispatchEvent(Fl("segmentappended",t))},vh:function(t,n){(n=n.Re)&&e.wa&&function(e,t,n){var r=function(e,t){var n=e.g.get(t);return n||(n={Yc:[],Bf:null,contentType:t},e.g.set(t,n)),n}(e,t.contentType);!function(e,t){if((e=e.h()[t.contentType])&&0<e.length){var n=e[0].start,r=e[e.length-1].end,i=t.Yc;t.Yc=i.filter((function(e,t){return!(e.position<=n&&t+1<i.length&&i[t+1].position<=n||e.position>=r)}))}else t.Yc=[]}(e,r),e={Re:t,position:n},0<=(t=(r=r.Yc).findIndex((function(e){return e.position>=n})))?r.splice(t,r[t].position==n?1:0,e):r.push(e)}(e.wa,n,t)},wf:function(t,n){var r=e.o;if(r.h.parseInbandPsshEnabled&&!r.I&&["audio","video"].includes(t)){var i=0,a=u((n=new di(ae(n))).data);for(t=a.next();!t.done;t=a.next())i+=t.value.length;if(0==i)r=Promise.resolve();else{for(i=new Uint8Array(i),a=0,t=(n=u(n.data)).next();!t.done;t=n.next())t=t.value,i.set(t,a),a+=t.length;ji(r,"cenc",i),r=r.l}}else r=Promise.resolve();return r},xh:function(t,n,r){Vl(e,t,n,r)},ud:function(t,n){return e.ud(t,n)}})}(e),e.j.configure(e.h.streaming),e.l=Ou,n.textTracks&&e.m.D(n.textTracks,"addtrack",(function(t){if(t.track)switch(t=t.track,t.kind){case"chapters":Kl(e,t)}})),e.dispatchEvent(Fl("streaming")),o=null,(s=e.j.j)||(o=pu(e,!0)),l=[],d=u([(c=s||o).video,c.audio]),p=d.next();!p.done;p=d.next())(h=p.value)&&!h.segmentIndex&&l.push(h.createSegmentIndex());if(!(0<l.length)){T.B(2);break}return _(T,Promise.all(l),2);case 2:if(e.F&&e.F.onInitialVariantChosen&&e.F.onInitialVariantChosen(c),Cu(e.i.presentationTimeline,e.h.playRangeStart,e.h.playRangeEnd),e.C=function(e,t){return new Wo(e.g,e.i,e.h.streaming,t,(function(){e.hb&&rs(e.hb,!0),e.j&&e.j.bd(),e.K&&Yl(e)}),(function(t){return e.dispatchEvent(t)}))}(e,e.na),e.hb=function(e,t){(t=new os(e.xa,e.S()||0<t)).addEventListener("enter",(function(t){Tu(e,"timelineregionenter",t.region)})),t.addEventListener("exit",(function(t){Tu(e,"timelineregionexit",t.region)})),t.addEventListener("skip",(function(t){var n=t.region;t.seeking||(Tu(e,"timelineregionenter",n),Tu(e,"timelineregionexit",n))}));var n=new ns(e.g);return n.g.add(t),e.wa&&n.g.add(e.wa),n}(e,t),f=Math.max(e.i.minBufferTime,e.h.streaming.rebufferingGoal),Wl(e,n,f),s){T.B(4);break}if(fu(e,o,!0,!1,0),!e.h.streaming.startAtSegmentBoundary){T.B(4);break}return g=e.C,y=g.de,_(T,function(e,t){var n,r,i,a,o;return R((function(s){return 1==s.g?(n=e.audio,r=e.video,i=function(e,t){var n,r,i;return R((function(a){return 1==a.g?e?_(a,e.createSegmentIndex(),2):a.return(null):(r=(n=e.segmentIndex.Lb(t))?n.next().value:null)?(i=r.startTime,a.return(i)):a.return(null)}))},_(s,i(n,t),2)):3!=s.g?(a=s.h,_(s,i(r,t),3)):null!=(o=s.h)&&null!=a?s.return(Math.max(o,a)):null!=o?s.return(o):null!=a?s.return(a):s.return(t)}))}(o,e.C.od()),6);case 6:y.call(g,T.h);case 4:return e.C.ce(),e.dc().find((function(e){return e.active}))||((v=Rn(e.i.textStreams,e.fb,e.Gc,e.Ec)[0]||null)&&Ol(e.u.h,v,!0),o&&(v?(o.audio&&function(e,t,n){if(0==e.h.autoShowText)return!1;if(1==e.h.autoShowText)return!0;var r=jt(e.h.preferredTextLanguage);return n=jt(n.language),2==e.h.autoShowText?Ut(n,r):3==e.h.autoShowText?(e=jt(t.language),Ut(n,r)&&!Ut(e,n)):(W("Invalid autoShowText setting!"),!1)}(e,o.audio,v)&&(e.fa=!0),e.fa&&e.G.F.setTextVisibility(!0),bu(e)):e.fa=!1),v&&(e.h.streaming.alwaysStreamText||e.Ge())&&Es(e.j,v)),_(T,e.j.start(),7);case 7:e.h.abr.enabled&&(e.s.enable(),_u(e)),yu(e),du(e),e.i.variants.some((function(e){return e.primary})),(m=e.S())&&(e.h.streaming.liveSync||e.i.serviceDescription)?(b=function(){return uu(e)},e.m.D(n,"timeupdate",b)):m||(k=function(){return cu(e)},e.m.D(n,"timeupdate",k),cu(e)),e.A&&e.A.onManifestUpdated(m),e.gb=!0,e.m.ka(n,"loadedmetadata",(function(){e.u.m=Date.now()/1e3-t})),E(T)}}))}(l,o),0)}))}),"loadInner_"),10);case 16:return _(c,a((function(){return R((function(e){return _(e,function(e,t,n){var r,i,a,o,s,l,c,d,p,h;return R((function(f){if(1==f.g)return Bl(e,"src-equals"),r=e.g,e.C=new zo(r),i=!1,e.nc.push((function(){i=!0})),null!=e.na&&e.C.de(e.na),e.I=new ts({Cd:function(){return r.playbackRate},Mc:function(){return r.defaultPlaybackRate},jf:function(e){r.playbackRate=e},Uf:function(e){r.currentTime+=e}}),a=e.h.streaming.rebufferingGoal,Wl(e,r,a),o=function(){return lu(e)},s=function(){return su(e)},e.m.D(r,"playing",o),e.m.D(r,"pause",o),e.m.D(r,"ended",o),e.m.D(r,"ratechange",s),"none"!=r.preload&&e.m.ka(r,"loadedmetadata",(function(){e.u.m=Date.now()/1e3-t})),r.audioTracks&&(e.m.D(r.audioTracks,"addtrack",(function(){return yu(e)})),e.m.D(r.audioTracks,"removetrack",(function(){return yu(e)})),e.m.D(r.audioTracks,"change",(function(){return yu(e)}))),r.textTracks&&(e.m.D(r.textTracks,"addtrack",(function(t){if(t.track)switch(t=t.track,t.kind){case"metadata":!function(e,t){if("metadata"==t.kind){t.mode="hidden",e.m.D(t,"cuechange",(function(){if(t.activeCues)for(var n=u(t.activeCues),r=n.next();!r.done;r=n.next())r=r.value,Gl(e,r.startTime,r.endTime,r.type,r.value),e.A&&e.A.onCueMetadataChange(r.value)}));var n=new Qt((function(){for(var t=function(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"==e.kind}))}(e),n=(t=u(t)).next();!n.done;n=t.next())n.value.mode="hidden"})).lc().U(.5);e.nc.push((function(){n.stop()}))}}(e,t);break;case"chapters":Kl(e,t);break;default:yu(e)}})),e.m.D(r.textTracks,"removetrack",(function(){return yu(e)})),e.m.D(r.textTracks,"change",(function(){return yu(e)}))),r.src=function(e,t,n){try{if(!e.g.enabled)return t;var r=el(e);e:{switch(n.toLowerCase()){case"video/webm":case"video/mp4":case"video/mpeg":case"video/mp2t":var i=sl;break e;case"application/x-mpegurl":case"application/vnd.apple.mpegurl":case"application/dash+xml":case"video/vnd.mpeg.dash.mpd":i=il;break e}i=void 0}return r.ot=i,r.su=!0,rl(t,nl(r))}catch(e){return Y("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(e.V,e.ga,n),(tn()||un("Web0S"))&&r.load(),e.l=Mu,e.dispatchEvent(Fl("streaming")),l=new or,No(r,HTMLMediaElement.HAVE_METADATA,e.m,(function(){e.C.ce(),l.resolve()})),No(r,HTMLMediaElement.HAVE_CURRENT_DATA,e.m,(function(){var t;return R((function(n){return 1==n.g?(function(e){var t=e.h.preferredAudioLanguage;""!=t&&e.cg(t,e.h.preferredVariantRole)}(e),(t=Ql(e)).find((function(e){return"disabled"!=e.mode}))?(0<t.length&&(e.fa=!0),n.B(2)):_(n,new Promise((function(t){e.m.ka(r.textTracks,"change",t),new Qt(t).U(1)})),2)):i?n.return():(function(e){var t=e.h.preferredTextLanguage;""!=t&&e.dg(t,e.h.preferredTextRole,e.h.preferForcedSubs)}(e),void E(n))}))})),r.error?l.reject(Au(e)):"none"==r.preload&&(W('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),l.resolve()),e.m.ka(r,"error",(function(){l.reject(Au(e))})),_(f,l,2);(c=e.S())&&e.h.streaming.liveSync?(d=function(){return uu(e)},e.m.D(r,"timeupdate",d)):c||(p=function(){return cu(e)},e.m.D(r,"timeupdate",p),cu(e)),e.A&&(e.A.onManifestUpdated(c),c&&(h=e.Cb().end,e.m.D(r,"progress",(function(){var t=e.Cb().end;h!=t&&(e.A.onManifestUpdated(e.S()),h=t)})))),e.gb=!0,E(f)}))}(l,o,n),0)}))}),"srcEqualsInner_"),10);case 10:l.dispatchEvent(Fl("loaded")),A(c,0);break;case 5:if(7e3==(s=w(c)).code){c.B(18);break}return _(c,l.mc(!1),18);case 18:throw s}}))},r.Dh=function(){for(var e=this.W;e.g;)e.release()},r.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=bl(e,t)),e.streaming&&"forceTransmuxTS"in e.streaming&&(Kn("streaming.forceTransmuxTS configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmuxTS,delete e.streaming.forceTransmuxTS),e.streaming&&"forceTransmux"in e.streaming&&(Kn("streaming.forceTransmux configuration","Please Use mediaSource.forceTransmux instead."),e.mediaSource.mediaSource=e.streaming.forceTransmux,delete e.streaming.forceTransmux),e.streaming&&e.streaming.lowLatencyMode&&(null==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),null==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01),null==e.streaming.segmentPrefetchLimit&&(e.streaming.segmentPrefetchLimit=2),null==e.streaming.retryParameters&&(e.streaming.retryParameters={}),null==e.streaming.retryParameters.baseDelay&&(e.streaming.retryParameters.baseDelay=100),null==e.manifest&&(e.manifest={}),null==e.manifest.retryParameters&&(e.manifest.retryParameters={}),null==e.manifest.retryParameters.baseDelay&&(e.manifest.retryParameters.baseDelay=100),null==e.drm&&(e.drm={}),null==e.drm.retryParameters&&(e.drm.retryParameters={}),null==e.drm.retryParameters.baseDelay&&(e.drm.retryParameters.baseDelay=100));var n=Pl(this.h,e,nu(this));return ql(this),n},r.getConfiguration=function(){var e=nu(this);return Pl(e,this.h,nu(this)),e},r.Ig=function(){if(this.g){var e=this.g.buffered.length;e=e?this.g.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(e>=(t=Math.min(this.g.currentTime+t,this.Cb().end)))return 1;if(!(e<=this.g.currentTime)&&e<t)return(e-this.g.currentTime)/(t-this.g.currentTime)}return 0},r.Hh=function(){for(var e in this.h)delete this.h[e];Pl(this.h,nu(this),nu(this)),ql(this)},r.Pg=function(){return this.l},r.Be=function(){return this.i?this.i.type:null},r.Tg=function(){return this.g},r.Mb=function(){return this.H},r.Ae=function(){return this.ga},r.Hf=function(){return this.A?this.A:null},r.S=function(){return this.i?this.i.presentationTimeline.S():!(!this.g||!this.g.src)&&1/0==this.g.duration},r.Qb=function(){return!!this.i&&this.i.presentationTimeline.Qb()},r.kh=function(){if(this.i){var e=this.i.variants;return!!e.length&&!e[0].video}return!(!this.g||!this.g.src)&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},r.Cb=function(){if(this.i){if(!this.gb&&"HLS"==this.i.type)return{start:0,end:0};var e=this.i.presentationTimeline;return{start:e.cc(),end:e.lb()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},r.hh=function(){this.S()&&(this.g.currentTime=this.Cb().end)},r.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},r.drmInfo=function(){return this.o?this.o.g:null},r.Oc=function(){return this.o?this.o.Oc():1/0},r.ze=function(){return this.o?this.o.ze():[]},r.yd=function(){return this.o?this.o.yd():{}},r.Ee=function(){return!!this.K&&this.K.g==nr},r.zd=function(){return this.g?this.I?this.I.h:1:0},r.pf=function(e){0==e?W("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.I.set(e),this.l==Ou&&(this.s.playbackRateChanged(e),bs(this.j,1<Math.abs(e))))},r.xf=function(){var e=this.I.Mc();this.l==Mu&&this.I.set(e),this.l==Ou&&(this.I.set(e),this.s.playbackRateChanged(e),bs(this.j,!1))},r.xb=function(){if(this.i){for(var e=this.j?this.j.j:null,t=[],n=0,r=u(this.i.variants),i=r.next();!i.done;i=r.next())if(Pn(i=i.value)){var a=Tn(i);a.active=i==e,a.active||1==n||null==e||i.video!=e.video||i.audio!=e.audio||(a.active=!0),a.active&&n++,t.push(a)}return t}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map((function(e){return xn(e)})):[]},r.dc=function(){if(this.i){for(var e=this.j?this.j.o:null,t=[],n=u(this.i.textStreams),r=n.next();!r.done;r=n.next()){var i=An(r=r.value);i.active=r==e,t.push(i)}return t}return this.g&&this.g.src&&this.g.textTracks?Ql(this).map((function(e){return Cn(e)})):[]},r.Og=function(){var e=this.Hc;return this.i&&(e=this.i.imageStreams),e.map((function(e){return wn(e)}))},r.Fg=function(e){var t,n,r,i,a=this;return R((function(o){return 1==o.g?a.l!=Ou&&a.l!=Mu?o.return(null):(t=a.Hc,a.i&&(t=a.i.imageStreams),(n=t.find((function(t){return t.id==e})))?n.segmentIndex?o.B(2):_(o,n.createSegmentIndex(),2):o.return(null)):4!=o.g?(r=[],$o(n.segmentIndex,(function(t){var i=Xl(t.tilesLayout||n.tilesLayout);if(i){i=i.rows*i.Ib;for(var o=t.i-t.startTime,s=0;s<i;s++)r.push(a.Mf(e,t.startTime+o*s/i))}})),_(o,Promise.all(r),4)):(i=o.h,o.return(i.filter((function(e){return e}))))}))},r.Mf=function(e,t){var n,r,i,a,o,s,l,u,c,d,p,h,f,g,y,v,m,b,E=this;return R((function(k){return 1==k.g?E.l!=Ou&&E.l!=Mu?k.return(null):(n=E.Hc,E.i&&(n=E.i.imageStreams),(r=n.find((function(t){return t.id==e})))?r.segmentIndex?k.B(2):_(k,r.createSegmentIndex(),2):k.return(null)):null==(i=r.segmentIndex.find(t))?k.return(null):(a=r.segmentIndex.get(i),(o=Xl(a.tilesLayout||r.tilesLayout))?(s=r.width||0,l=r.height||0,u=s/o.Ib,c=l/o.rows,d=o.Ib*o.rows,p=a.i-a.startTime,h=a.F||p/d,f=a.startTime,y=g=0,1<d&&(v=Math.floor((t-a.startTime)/h),f=a.startTime+v*h,g=v%o.Ib*u,y=Math.floor(v/o.Ib)*c),m=!1,(b=a.C)&&(m=!0,c=b.height,g=b.positionX,y=b.positionY,u=b.width),k.return({segment:a,imageHeight:l,imageWidth:s,height:c,positionX:g,positionY:y,startTime:f,duration:h,uris:a.Y(),width:u,sprite:m})):k.return(null))}))},r.eg=function(e){if(this.i&&this.j){var t=this.i.textStreams.find((function(t){return t.id==e.id}));t&&t!=this.j.o&&(Ol(this.u.h,t,!1),Es(this.j,t),mu(this),this.fb=t.language)}else if(this.g&&this.g.src&&this.g.textTracks){for(var n=(t=u(t=Ql(this))).next();!n.done;n=t.next())Sn(n=n.value)==e.id?n.mode=this.fa?"showing":"hidden":n.mode="disabled";mu(this)}},r.ef=function(e,t,n){if(t=void 0!==t&&t,n=void 0===n?0:n,this.i&&this.j){this.h.abr.enabled&&W("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var r=this.i.variants.find((function(t){return t.id==e.id}));r&&Pn(r)&&(fu(this,r,!1,t,n),this.Da=new Jn(r,this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),du(this))}else if(this.g&&this.g.audioTracks)for(n=(t=u(t=Array.from(this.g.audioTracks))).next();!n.done;n=t.next())if(Sn(n=n.value)==e.id){gu(this,n);break}},r.Hg=function(){return Du(this.xb())},r.$g=function(){return Du(this.dc())},r.Gg=function(){return Array.from(Pu(this.xb()))},r.Zg=function(){return Array.from(Pu(this.dc()))},r.cg=function(e,t,n,r){if(n=void 0===n?0:n,r=void 0===r?0:r,this.i&&this.C){this.Da=new Zn(e,t||"",n,"",!1,"","","",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),e=function(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0},t=this.j.j;var i=this.Da.create(this.i.variants);n=null;for(var a=(i=u(i.values())).next();!a.done;a=i.next())a=a.value,(!n||e(n,t)>e(a,t))&&(n=a);n?(e=Tn(n),this.ef(e,!0,r)):hu(this)}else this.g&&this.g.audioTracks&&(r=Rn(this.xb(),e,t||"",!1)[0])&&this.ef(r)},r.dg=function(e,t,n){n=void 0!==n&&n,this.i&&this.C?(this.fb=e,this.Gc=t||"",this.Ec=n,(e=Rn(this.i.textStreams,this.fb,this.Gc,this.Ec)[0]||null)&&e!=this.j.o&&(Ol(this.u.h,e,!1),this.h.streaming.alwaysStreamText||this.Ge())&&(Es(this.j,e),mu(this))):(e=Rn(this.dc(),e,t||"",n)[0])&&this.eg(e)},r.Lh=function(e,t,n){if(t=void 0===t||t,n=void 0===n?0:n,this.i&&this.C){for(var r=null,i=u(this.i.variants),a=i.next();!a.done;a=i.next())if((a=a.value).audio.label==e){r=a;break}null!=r&&(this.Da=new Zn(r.language,"",0,"",!1,"",e,"",this.h.mediaSource.codecSwitchingStrategy,this.h.manifest.dash.enableAudioGroups),hu(this,t,n))}else if(this.g&&this.g.audioTracks){for(t=null,r=(n=u(n=Array.from(this.g.audioTracks))).next();!r.done;r=n.next())(r=r.value).label==e&&(t=r);t&&gu(this,t)}},r.Ge=function(){var e=this.fa;return this.G&&this.l==Ou?this.G.F.isTextVisible():this.g&&this.g.src&&this.g.textTracks?Ql(this).some((function(e){return"showing"==e.mode})):e},r.If=function(){return this.g&&this.g.src&&this.g.textTracks?$l(this).map((function(e){return Cn(e)})):[]},r.Jg=function(e){if(!this.g||!this.g.src||!this.g.textTracks)return[];var t=jt(e),n=$l(this).filter((function(e){return jt(e.language)==t}));if(!n||!n.length)return[];e=[];for(var r=new Set,i=(n=u(n)).next();!i.done;i=n.next())if((i=i.value)&&i.cues)for(var a=(i=u(i.cues)).next();!a.done;a=i.next()){var o=a.value;(a=o.id)&&""!=a||(a=o.startTime+"-"+o.endTime+"-"+o.text),o={id:a,title:o.text,startTime:o.startTime,endTime:o.endTime},r.has(a)||(e.push(o),r.add(a))}return e},r.Qh=function(e){if(e=!!e,this.fa!=e){if(this.fa=e,this.l==Ou)this.G.F.setTextVisibility(e),this.h.streaming.alwaysStreamText||(e?this.j.o||0<(e=Rn(this.i.textStreams,this.fb,this.Gc,this.Ec)).length&&(Es(this.j,e[0]),mu(this)):function(e){var t=e.i.get(gt);t&&(Ls(t),Os(t).catch((function(){})),e.i.delete(gt)),e.o=null}(this.j));else if(this.g&&this.g.src&&this.g.textTracks)for(var t=Ql(this),n=(t=u(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");bu(this)}},r.Vg=function(){if(!this.S())return null;if(this.C)var e=this.C.od();else{if(null==this.na)return new Date;e=this.na}if(this.i)return new Date(1e3*(this.i.presentationTimeline.i+e));if(this.g&&this.g.getStartDate){var t=this.g.getStartDate();return isNaN(t.getTime())?null:new Date(t.getTime()+1e3*e)}return null},r.Lf=function(){if(!this.S())return null;if(this.i)return new Date(1e3*this.i.presentationTimeline.i);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?null:e}return null},r.kb=function(){if(this.l==Ou)return this.G.kb();var e={total:[],audio:[],video:[],text:[]};return this.l==Mu&&(e.total=_a(this.g.buffered)),e},r.getStats=function(){if(this.l!=Ou&&this.l!=Mu)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,stallsDetected:NaN,gapsJumped:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};lu(this);var e=this.g,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.u;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}if(this.C&&(this.u.K=this.C.tf(),this.u.N=this.C.uf()),e.getVideoPlaybackQuality){n=e.getVideoPlaybackQuality(),t=this.u;var r=Number(n.totalVideoFrames);t.J=Number(n.droppedVideoFrames),t.I=r,this.u.H=Number(n.corruptedVideoFrames)}this.o?n=(n=this.o).H?n.H:NaN:n=NaN,this.u.s=n,this.l==Ou&&((n=this.j.j)&&(this.u.A=(this.I?this.I.h:1)*n.bandwidth),n&&n.video&&(t=this.u,r=n.video.height||NaN,t.o=n.video.width||NaN,t.l=r),this.S()&&(n=this.Lf().valueOf()+1e3*this.Cb().end,this.u.C=(Date.now()-n)/1e3),this.i&&this.i.presentationTimeline&&(this.u.G=this.i.presentationTimeline.g),n=this.s.getBandwidthEstimate(),this.u.u=n),this.l==Mu&&(n=this.u,t=e.videoHeight||NaN,n.o=e.videoWidth||NaN,n.l=t);var i=this.u;e=i.o,n=i.l,t=i.A,r=i.I;for(var a=i.J,o=i.H,s=i.N,l=i.K,c=i.u,d=i.i,p=i.m,h=i.F,f=i.j,g=Rl(i.g,"playing"),y=Rl(i.g,"paused"),v=Rl(i.g,"buffering"),m=i.s,b=i.C,_=i.G,E=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],r=u(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}(i.g),k=[],T=(i=u(i.h.g)).next();!T.done;T=i.next())T=T.value,k.push({timestamp:T.timestamp,id:T.id,type:T.type,fromAdaptation:T.fromAdaptation,bandwidth:T.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:r,droppedFrames:a,corruptedFrames:o,stallsDetected:s,gapsJumped:l,estimatedBandwidth:c,completionPercent:d,loadLatency:p,manifestTimeSeconds:h,drmTimeSeconds:f,playTime:g,pauseTime:y,bufferingTime:v,licenseTime:m,liveLatency:b,maxSegmentDuration:_,stateHistory:E,switchHistory:k}},r.tg=function(e,t,n,r,i,a,o){o=void 0!==o&&o;var s,l,u,c,d,p,h,f,g,y,v,m=this;return R((function(b){switch(b.g){case 1:if(m.l!=Ou&&m.l!=Mu)throw new ut(1,7,7004);if(r){b.B(2);break}return _(b,Jl(m,e),3);case 3:r=b.h;case 2:if(s=[],m.A&&(s=m.A.getCuePoints()),m.l!=Mu){b.B(4);break}return o&&(n="forced"),_(b,Zl(m,e,t,n,r,a||"",s),5);case 5:if(l=jt(t),u=m.dc(),c=u.find((function(e){return jt(e.language)==l&&e.label==(a||"")&&e.kind==n})))return yu(m),b.return(c);throw new ut(1,2,2012);case 4:if(d=yt,p=m.g.duration,m.i&&(p=m.i.presentationTimeline.getDuration()),1/0==p)throw new ut(1,4,4033);if(!s.length){b.B(6);break}return _(b,eu(m,e,m.H,m.h.streaming.retryParameters),7);case 7:h=b.h,f=tu(m,h,r,s),g=new Blob([f],{type:"text/vtt"}),e=xo(g),r="text/vtt";case 6:if(y={id:m.Pe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:Jo(0,p,[e]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,originalLanguage:t,label:a||null,type:d.ha,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1},v=bt(y.mimeType,y.codecs),!It(v))throw new ut(2,2,2014,r);return m.i.textStreams.push(y),yu(m),b.return(An(y))}}))},r.ug=function(e,t){var n,r,i,a,o,s,l,c,d,p,h,f,g,y,v,m,b=this;return R((function(E){switch(E.g){case 1:if(b.l!=Ou&&b.l!=Mu)throw new ut(1,7,7004);if(t){E.B(2);break}return _(E,Jl(b,e),3);case 3:t=E.h;case 2:if("text/vtt"!=t)throw new ut(1,2,2017,e);if(n=yt,r=b.g.duration,b.i&&(r=b.i.presentationTimeline.getDuration()),1/0==r)throw new ut(1,4,4045);return _(E,eu(b,e,b.H,b.h.streaming.retryParameters),4);case 4:if(i=E.h,!(a=Rt[t]))throw new ut(2,2,2014,t);for(o=a(),s={periodStart:0,segmentStart:0,segmentEnd:r,vttOffset:0},l=ae(i),c=o.parseMedia(l,s,e),d=[],p={},h=u(c),f=h.next();!f.done;p={rc:p.rc},f=h.next())g=f.value,p.rc=dt([e],[g.payload])[0],y=new fa(g.startTime,g.endTime,function(e){return function(){return[e.rc]}}(p),0,null,null,0,0,1/0),p.rc.includes("#xywh")&&(4===(v=p.rc.split("#xywh=")[1].split(",")).length&&y.jg({height:parseInt(v[3],10),positionX:parseInt(v[0],10),positionY:parseInt(v[1],10),width:parseInt(v[2],10)})),d.push(y);return m={id:b.Pe++,originalId:null,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Qo(d),mimeType:t||"",codecs:"",kind:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"und",originalLanguage:null,label:null,type:n.Cc,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,tilesLayout:"1x1",accessibilityPurpose:null,external:!0,fastSwitching:!1},b.l==Mu?b.Hc.push(m):b.i.imageStreams.push(m),yu(b),E.return(wn(m))}}))},r.sg=function(e,t,n){var r,i,a,o,s=this;return R((function(l){switch(l.g){case 1:if(s.l!=Ou&&s.l!=Mu)throw new ut(1,7,7004);if(n){l.B(2);break}return _(l,Jl(s,e),3);case 3:n=l.h;case 2:return r=[],s.A&&(r=s.A.getCuePoints()),_(l,Zl(s,e,t,"chapters",n,"",r),4);case 4:if(i=l.h,a=s.If(),!(o=a.find((function(e){return e.language==t})))){l.B(5);break}return _(l,new Promise((function(e,t){s.m.ka(i,"load",e),s.m.ka(i,"error",(function(){t(new ut(1,2,2015))}))})),6);case 6:return yu(s),l.return(o);case 5:throw new ut(1,2,2012)}}))},r.hf=function(e,t){this.Je.width=e,this.Je.height=t},r.bf=function(e){if(this.l==Ou){var t=this.j;if(e=void 0===e?.1:e,t.l.g)t=!1;else if(t.s)t=!1;else{for(var n=u(t.i.values()),r=n.next();!r.done;r=n.next())!(r=r.value).Sc||r.Aa||r.cb||(r.Sc=!1,Rs(t,r,e));t=!0}}else t=!1;return t},r.Qg=function(){return W("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees.  It may change at any time!  Please consider filing a feature request for whatever you use getManifest() for."),this.i},r.Rg=function(){return this.Gd},r.lg=function(e){this.td=e},r.ud=function(e,t){if(!this.h.abr.enabled||this.l===Ru||!navigator.onLine)return!1;if(this.i.variants.some((function(t){return!(!(t=t[e.type])||t.id===e.id)&&("audio"!=e.type||e.language===t.language)}))){for(var n=u(this.i.variants),r=n.next();!r.done;r=n.next()){var i=(r=r.value)[e.type];i&&i.id===e.id&&(r.disabledUntilTime=Date.now()/1e3+t)}return this.vd.Wa(1),hu(this,!0,t=this.kb().video.reduce((function(e,t){return e+t.end-t.start}),0),!0,!1),!0}return!1},j("shaka.Player",Nl),Nl.prototype.setVideoContainer=Nl.prototype.lg,Nl.prototype.getManifestParserFactory=Nl.prototype.Rg,Nl.prototype.getManifest=Nl.prototype.Qg,Nl.prototype.retryStreaming=Nl.prototype.bf,Nl.prototype.setMaxHardwareResolution=Nl.prototype.hf,Nl.prototype.addChaptersTrack=Nl.prototype.sg,Nl.prototype.addThumbnailsTrack=Nl.prototype.ug,Nl.prototype.addTextTrackAsync=Nl.prototype.tg,Nl.prototype.getStats=Nl.prototype.getStats,Nl.prototype.getBufferedInfo=Nl.prototype.kb,Nl.prototype.getPresentationStartTimeAsDate=Nl.prototype.Lf,Nl.prototype.getPlayheadTimeAsDate=Nl.prototype.Vg,Nl.prototype.setTextTrackVisibility=Nl.prototype.Qh,Nl.prototype.getChapters=Nl.prototype.Jg,Nl.prototype.getChaptersTracks=Nl.prototype.If,Nl.prototype.isTextTrackVisible=Nl.prototype.Ge,Nl.prototype.selectVariantsByLabel=Nl.prototype.Lh,Nl.prototype.selectTextLanguage=Nl.prototype.dg,Nl.prototype.selectAudioLanguage=Nl.prototype.cg,Nl.prototype.getTextLanguages=Nl.prototype.Zg,Nl.prototype.getAudioLanguages=Nl.prototype.Gg,Nl.prototype.getTextLanguagesAndRoles=Nl.prototype.$g,Nl.prototype.getAudioLanguagesAndRoles=Nl.prototype.Hg,Nl.prototype.selectVariantTrack=Nl.prototype.ef,Nl.prototype.selectTextTrack=Nl.prototype.eg,Nl.prototype.getThumbnails=Nl.prototype.Mf,Nl.prototype.getAllThumbnails=Nl.prototype.Fg,Nl.prototype.getImageTracks=Nl.prototype.Og,Nl.prototype.getTextTracks=Nl.prototype.dc,Nl.prototype.getVariantTracks=Nl.prototype.xb,Nl.prototype.cancelTrickPlay=Nl.prototype.xf,Nl.prototype.trickPlay=Nl.prototype.pf,Nl.prototype.getPlaybackRate=Nl.prototype.zd,Nl.prototype.isBuffering=Nl.prototype.Ee,Nl.prototype.getKeyStatuses=Nl.prototype.yd,Nl.prototype.getActiveSessionsMetadata=Nl.prototype.ze,Nl.prototype.getExpiration=Nl.prototype.Oc,Nl.prototype.drmInfo=Nl.prototype.drmInfo,Nl.prototype.keySystem=Nl.prototype.keySystem,Nl.prototype.goToLive=Nl.prototype.hh,Nl.prototype.seekRange=Nl.prototype.Cb,Nl.prototype.isAudioOnly=Nl.prototype.kh,Nl.prototype.isInProgress=Nl.prototype.Qb,Nl.prototype.isLive=Nl.prototype.S,Nl.prototype.getAdManager=Nl.prototype.Hf,Nl.prototype.getAssetUri=Nl.prototype.Ae,Nl.prototype.getNetworkingEngine=Nl.prototype.Mb,Nl.prototype.getMediaElement=Nl.prototype.Tg,Nl.prototype.getManifestType=Nl.prototype.Be,Nl.prototype.getLoadMode=Nl.prototype.Pg,Nl.prototype.resetConfiguration=Nl.prototype.Hh,Nl.prototype.getBufferFullness=Nl.prototype.Ig,Nl.prototype.getConfiguration=Nl.prototype.getConfiguration,Nl.prototype.configure=Nl.prototype.configure,Nl.prototype.releaseAllMutexes=Nl.prototype.Dh,Nl.prototype.load=Nl.prototype.load,Nl.prototype.updateStartTime=Nl.prototype.Vh,Nl.prototype.unload=Nl.prototype.mc,Nl.prototype.detach=Nl.prototype.detach,Nl.prototype.attachCanvas=Nl.prototype.wg,Nl.prototype.attach=Nl.prototype.Fc,Nl.probeSupport=function(e){var t,n,r,i,a;return e=void 0===e||e,R((function(o){if(1==o.g)return t={},e?_(o,function(){var e,t,n,r,i,a;return R((function(o){return 1==o.g?(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),n=[{videoCapabilities:t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],persistentState:"required",sessionTypes:["persistent-license"]},{initDataTypes:["cenc"],videoCapabilities:t}],r=new Map,i=function(e){var t,i,a;return R((function(o){switch(o.g){case 1:if(k(o,2),"org.w3.clearkey"===e&&ln())throw Error("Unsupported keySystem");return _(o,navigator.requestMediaKeySystemAccess(e,n),4);case 4:return t=o.h,a=!!(i=t.getConfiguration().sessionTypes)&&i.includes("persistent-license"),nn()&&(a=!1),r.set(e,{persistentState:a}),_(o,t.createMediaKeys(),5);case 5:A(o,0);break;case 2:w(o),r.set(e,null),E(o)}}))},a=e.map((function(e){return i(e)})),_(o,Promise.all(a),2)):o.return(Nr(r))}))}(),3):o.B(2);2!=o.g&&(t=o.h);var s={};if($t())for(var l in la)s[l]=!0;for(var d=(l=u(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!d.done;d=l.next())s[d=d.value]=$t()?!!la[d]:Jt(d);for(n=s,s={},d=(l=u(l='video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",video/mp4; codecs="av01.0.01M.08",video/mp4; codecs="dvh1.20.01",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="ac-4",audio/mp4; codecs="opus",audio/mp4; codecs="flac",audio/mp4; codecs="dtsc",audio/mp4; codecs="dtse",audio/mp4; codecs="dtsx",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").concat(c(Ct)))).next();!d.done;d=l.next()){s[d=d.value]=$t()?!!It(d)||(Q(d)||!!je(d)):Jt(d);var p=d.split(";")[0];s[p]=s[p]||s[d]}for(a in r={manifest:n,media:s,drm:t},i=Fu)r[a]=i[a]();return o.return(r)}))},Nl.isBrowserSupported=function(){if(e.Promise||W("A Promise implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&Array.prototype.forEach)||un("Trident/"))return!1;var t=ln();return!(t&&9>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!$t()||Jt("application/x-mpegurl"))},Nl.setAdManagerFactory=function(e){Bu=e},Nl.registerSupportPlugin=function(e,t){Fu[e]=t},Nl.prototype.destroy=Nl.prototype.destroy;var Ru=0,Lu=1,Ou=2,Mu=3;Nl.LoadMode={DESTROYED:Ru,NOT_LOADED:Lu,MEDIA_SOURCE:Ou,SRC_EQUALS:Mu},Nl.version="v4.7.0";var Nu=["4","7"];Yn=new function(e){this.g=e,this.i=zn,this.h=Wn}(new Gn(Number(Nu[0]),Number(Nu[1])));var Uu=["output-restricted","internal-error"],Fu={},Bu=null;function ju(){this.h=[],this.j=this.i=this.g=0}function Hu(e,t,n){var r=this;this.g=e,this.h=t,this.m=n,this.i=!1,this.l=this.h.getVolume(),this.j=new Pr,this.j.D(this.h,google.ima.AdEvent.Type.PAUSED,(function(){r.i=!0})),this.j.D(this.h,google.ima.AdEvent.Type.RESUMED,(function(){r.i=!1}))}function Vu(t,n,r,i,a){var o=this;this.o=t,this.i=n,this.A=!1,this.s=this.C=null,this.F=NaN,this.m=a,this.j=null,this.h=new Pr,google.ima.settings.setLocale(r),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(!0),(t=new google.ima.AdDisplayContainer(this.o,this.i)).initialize(),this.l=new google.ima.AdsLoader(t),this.l.getSettings().setPlayerType("shaka-player"),this.l.getSettings().setPlayerVersion("v4.7.0"),this.g=null,this.u=i||new google.ima.AdsRenderingSettings,this.h.D(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(t){!function(t,n){if(t.m(new hr("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-t.F))),t.C.customPlayheadTracker){var r={currentTime:t.i.currentTime};t.g=n.getAdsManager(r,t.u),t.i.muted?t.g.setVolume(0):t.g.setVolume(t.i.volume),t.h.D(t.i,"timeupdate",(function(){t.i.duration&&(r.currentTime=t.i.currentTime)})),t.h.D(t.i,"volumechange",(function(){t.i.muted?t.g.setVolume(0):t.g.setVolume(t.i.volume)}))}else t.g=n.getAdsManager(t.i,t.u);t.m(new hr("ima-ad-manager-loaded",(new Map).set("imaAdManager",t.g)));var i=t.g.getCuePoints();if(i.length){n=[];for(var a=(i=u(i)).next();!a.done;a=i.next())n.push({start:a.value,end:null});t.m(new hr("ad-cue-points-changed",(new Map).set("cuepoints",n)))}!function(e){function t(t,n){t=(new Map).set("originalEvent",t),e.m(new hr(n,t))}e.h.D(e.g,google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){Gu(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(t){zu(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.STARTED,(function(t){zu(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.FIRST_QUARTILE,(function(e){t(e,"ad-first-quartile")})),e.h.D(e.g,google.ima.AdEvent.Type.MIDPOINT,(function(e){t(e,"ad-midpoint")})),e.h.D(e.g,google.ima.AdEvent.Type.THIRD_QUARTILE,(function(e){t(e,"ad-third-quartile")})),e.h.D(e.g,google.ima.AdEvent.Type.COMPLETE,(function(e){t(e,"ad-complete")})),e.h.D(e.g,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(t){Wu(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){Wu(e,t)})),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPED,(function(e){t(e,"ad-skipped")})),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_CHANGED,(function(e){t(e,"ad-volume-changed")})),e.h.D(e.g,google.ima.AdEvent.Type.VOLUME_MUTED,(function(e){t(e,"ad-muted")})),e.h.D(e.g,google.ima.AdEvent.Type.PAUSED,(function(n){e.j&&(e.j.i=!0,t(n,"ad-paused"))})),e.h.D(e.g,google.ima.AdEvent.Type.RESUMED,(function(n){e.j&&(e.j.i=!1,t(n,"ad-resumed"))})),e.h.D(e.g,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,(function(n){e.j&&t(n,"ad-skip-state-changed")})),e.h.D(e.g,google.ima.AdEvent.Type.CLICK,(function(e){t(e,"ad-clicked")})),e.h.D(e.g,google.ima.AdEvent.Type.AD_PROGRESS,(function(e){t(e,"ad-progress")})),e.h.D(e.g,google.ima.AdEvent.Type.AD_BUFFERING,(function(e){t(e,"ad-buffering")})),e.h.D(e.g,google.ima.AdEvent.Type.IMPRESSION,(function(e){t(e,"ad-impression")})),e.h.D(e.g,google.ima.AdEvent.Type.DURATION_CHANGE,(function(e){t(e,"ad-duration-changed")})),e.h.D(e.g,google.ima.AdEvent.Type.USER_CLOSE,(function(e){t(e,"ad-closed")})),e.h.D(e.g,google.ima.AdEvent.Type.LOADED,(function(e){t(e,"ad-loaded")})),e.h.D(e.g,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(e){t(e,"all-ads-completed")})),e.h.D(e.g,google.ima.AdEvent.Type.LINEAR_CHANGED,(function(e){t(e,"ad-linear-changed")})),e.h.D(e.g,google.ima.AdEvent.Type.AD_METADATA,(function(e){t(e,"ad-metadata")})),e.h.D(e.g,google.ima.AdEvent.Type.LOG,(function(e){t(e,"ad-recoverable-error")})),e.h.D(e.g,google.ima.AdEvent.Type.AD_BREAK_READY,(function(e){t(e,"ad-break-ready")})),e.h.D(e.g,google.ima.AdEvent.Type.INTERACTION,(function(e){t(e,"ad-interaction")}))}(t);try{t.g.init(t.i.offsetWidth,t.i.offsetHeight,Ku(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),t.h.D(t.i,"loadeddata",(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Ku(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),"ResizeObserver"in e?(t.s=new ResizeObserver((function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Ku(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.s.observe(t.i)):t.h.D(document,"fullscreenchange",(function(){t.g.resize(t.i.offsetWidth,t.i.offsetHeight,Ku(t)?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),t.A?t.g.start():t.h.ka(t.i,"play",(function(){t.A=!0,t.g.start()}))}catch(e){Wu(t,null)}}(o,t)})),this.h.D(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){Gu(o,e)})),this.h.D(this.i,"ended",(function(){o.l.contentComplete()})),this.h.ka(this.i,"play",(function(){o.A=!0}))}function Gu(e,t){t.getError(),t=(new Map).set("originalEvent",t),e.m(new hr("ad-error",t)),Wu(e,null),e.m(new hr("ad-cue-points-changed",(new Map).set("cuepoints",[])))}function Ku(e){return document.fullscreenEnabled?!!document.fullscreenElement:!!(e=e.i).webkitSupportsFullscreen&&e.webkitDisplayingFullscreen}function zu(e,t){var n=t.getAd();n?(e.j=new Hu(n,e.g,e.i),t=(new Map).set("ad",e.j).set("sdkAdObject",n).set("originalEvent",t),e.m(new hr("ad-started",t)),e.j.isLinear()&&(e.o.setAttribute("ad-active","true"),e.i.pause(),e.j.setVolume(e.i.volume),e.i.muted&&e.j.setMuted(!0))):W("The IMA SDK fired a "+t.type+" event with no associated ad. Unable to play ad!")}function Wu(e,t){e.m(new hr("ad-stopped",(new Map).set("originalEvent",t))),e.j&&e.j.isLinear()&&(e.o.removeAttribute("ad-active"),e.i.ended||e.i.play())}function Yu(e,t,n,r,i){this.h=e,this.g=i,this.i=t,this.j=n,this.l=r}function qu(e,t,n,r){this.A=e,this.I=t,this.g=n,this.l=null,this.W=NaN,this.i=r,this.H=!1,this.u=null,this.j=[],this.K=[],this.J=this.C=this.h=null,this.F=new Map,this.m=[],this.s=[],this.N="",this.V=!0,this.G="",this.o=new Pr}function Xu(e,t){var n,r,i,a,o,s,l;R((function(u){return 1==u.g?t.staticResource?(n=Qu(t),e.F.get(n)?u.return():(r=Er([t.staticResource],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),i=e.I.request(7,r),k(u,2),e.F.set(n,[]),_(u,i.promise,4))):u.return():2!=u.g?(a=u.h,o=Br(a.data),s=JSON.parse(o),l=s.apps,e.F.set(n,l),A(u,0)):(w(u),e.F.delete(n),void E(u))}))}function Qu(e){return[e.adId,e.adParameters,e.adSystem,e.adTitle,e.creativeAdId,e.creativeId,e.creativeSequence,e.height,e.width,e.staticResource].join("")}function $u(e){var t=e.g.currentTime;if(0!=t&&null==e.u){for(var n,r,i=u(e.j),a=i.next();!a.done;a=i.next())for(var o=u((a=a.value).ads),s=o.next();!s.done;s=o.next())if(s=s.value,r){if(s.startTimeInSeconds<t&&s.startTimeInSeconds>r.startTimeInSeconds+r.durationInSeconds){r=s,n=a;break}}else s.startTimeInSeconds<t&&(r=s,n=a);n&&r&&!e.K.includes(r.adId)&&(e.u=t,e.g.currentTime=n.startTimeInSeconds)}}function Ju(e){if(e.g.duration&&(e.h||e.j.length)){var t=e.g.currentTime,n=!1;if(e.h){n=!0;var r=e.C,i=r.startTimeInSeconds+.5*r.durationInSeconds,a=r.startTimeInSeconds+.75*r.durationInSeconds;t>=r.startTimeInSeconds+.25*r.durationInSeconds&&!e.s.includes("firstQuartile")?(e.s.push("firstQuartile"),tc(e,"firstQuartile")):t>=i&&!e.s.includes("midpoint")?(e.s.push("midpoint"),tc(e,"midpoint")):t>=a&&!e.s.includes("thirdQuartile")&&(e.s.push("thirdQuartile"),tc(e,"thirdQuartile")),r=e.h.getRemainingTime(),0<(i=e.h.getDuration())&&(0>=r||r>i)&&Zu(e)}if(!e.h||!e.h.isLinear()){e:for(r=u(e.j),i=r.next();!i.done&&(i=i.value,!e.h||!e.h.isLinear());i=r.next())for(a=0;a<i.ads.length;a++){var o=i.ads[a],s=o.startTimeInSeconds+o.durationInSeconds;if(o.startTimeInSeconds<=t&&s>t){if(e.K.includes(o.adId)){if(e.g.ended)continue;e.g.currentTime=s;break e}Zu(e),e.J=i,e.h=new Yu(o,a+1,i.ads.length,!0,e.g),e.C=o,0===a&&tc(e,"breakStart"),ec(e);break}}if(!e.h)for(i=(r=u(e.j)).next();!i.done&&(i=i.value,!e.h);i=r.next())for(a=0;a<i.nonLinearAdsList.length;a++)if((o=i.nonLinearAdsList[a]).nonLinearAdList.length){s=i.startTimeInSeconds;var l=e.F.get(Qu(o.nonLinearAdList[0]));if(s<=t&&l&&l.length){Zu(e),s=e;for(var c=(l=u(l)).next();!c.done;c=l.next())if((c=c.value).data.source.length){var d=document.createElement("img");d.setAttribute("src",c.data.source[0].url),d.style.top=(c.placeholder.top||0)+"%",d.style.height=100-(c.placeholder.top||0)+"%",d.style.left=(c.placeholder.left||0)+"%",d.style.maxWidth=100-(c.placeholder.left||0)+"%",d.style.objectFit="contain",d.style.position="absolute",s.A.appendChild(d)}e.J=i,e.h=new Yu(o,a+1,i.ads.length,!1,e.g),e.C=o,0===a&&tc(e,"breakStart"),ec(e);break}}n&&!e.h&&(t=e.g.currentTime,e.u&&e.u>t&&(e.g.currentTime=e.u),e.u=null)}}}function Zu(e){if(e.h){for(;e.A.lastChild;)e.A.removeChild(e.A.firstChild);e.H||e.K.push(e.C.adId),tc(e,"complete");for(var t=u(e.m),n=t.next();!n.done;n=t.next())n=n.value,e.o.Ub(n.target,n.type,n.listener);e.m=[],e.s=[],(t=e.h.getPositionInSequence())===(n=e.h.getSequenceLength())&&tc(e,"breakEnd"),e.h=null,e.C=null,e.J=null}}function ec(e){var t=!1;e.g.paused?t=!0:(tc(e,"impression"),tc(e,"start")),e.m.push({target:e.g,type:"volumechange",listener:function(){e.g.muted&&tc(e,"mute")}}),e.m.push({target:e.g,type:"volumechange",listener:function(){e.g.muted||tc(e,"unmute")}}),e.m.push({target:e.g,type:"play",listener:function(){t?(tc(e,"impression"),tc(e,"start"),t=!1):tc(e,"resume")}}),e.m.push({target:e.g,type:"pause",listener:function(){tc(e,"pause")}});for(var n=u(e.m),r=n.next();!r.done;r=n.next())r=r.value,e.o.D(r.target,r.type,r.listener)}function tc(e,t){var n=e.C.trackingEvents.find((function(e){return e.eventType==t}));if(n||(n=e.J.adBreakTrackingEvents.find((function(e){return e.eventType==t}))),n)for(var r=(n=u(n.beaconUrls)).next();!r.done;r=n.next())(r=r.value)&&""!=r&&((r=Er([r],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4})).method="POST",e.I.request(7,r));switch(t){case"impression":e.i(new hr("ad-impression"));break;case"start":e.i(new hr("ad-started",(new Map).set("ad",e.h)));break;case"mute":e.i(new hr("ad-muted"));break;case"unmute":e.i(new hr("ad-volume-changed"));break;case"resume":e.i(new hr("ad-resumed"));break;case"pause":e.i(new hr("ad-paused"));break;case"firstQuartile":e.i(new hr("ad-first-quartile"));break;case"midpoint":e.i(new hr("ad-midpoint"));break;case"thirdQuartile":e.i(new hr("ad-third-quartile"));break;case"complete":e.i(new hr("ad-complete")),e.i(new hr("ad-stopped"));break;case"breakStart":e.A.setAttribute("ad-active","true");break;case"breakEnd":e.A.removeAttribute("ad-active")}}function nc(e,t){this.g=e,this.i=null,this.h=t}function rc(e,t,n,r){var i=this;this.s=e,this.l=t,this.j=null,this.F=NaN,this.i=r,this.G=!1,this.u=this.m=this.o=null,this.A="",this.C=[],this.h=new Pr,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.g=new google.ima.dai.api.StreamManager(this.l,this.s,e),this.i(new hr("ima-stream-manager-loaded",(new Map).set("imaStreamManager",this.g))),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.LOADED,(function(e){!function(e,t){e.i(new hr("ads-loaded",(new Map).set("loadTime",Date.now()/1e3-e.F))),t=t.getStreamData().url,e.j.resolve(t),e.j=null,e.G||e.h.D(e.l,"seeked",(function(){var t=e.l.currentTime;if(0!=t){e.g.streamTimeForContentTime(t);var n=e.g.previousCuePointForStreamTime(t);n&&!n.played&&(e.o=t,e.l.currentTime=n.start)}}))}(i,e)})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.ERROR,(function(){i.A.length?i.j.resolve(i.A):i.j.reject("IMA Stream request returned an error and there was no backup asset uri provided."),i.j=null})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,(function(){})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.STARTED,(function(e){e=e.getAd(),i.m=new nc(e,i.l),i.u&&(i.m.i=i.u),i.i(new hr("ad-started",(new Map).set("ad",i.m))),i.s.setAttribute("ad-active","true")})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,(function(){i.s.removeAttribute("ad-active");var e=i.l.currentTime;i.o&&i.o>e&&(i.l.currentTime=i.o,i.o=null)})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,(function(e){i.u=e.getStreamData().adProgressData,i.m&&(i.m.i=i.u)})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,(function(){i.i(new hr("ad-first-quartile"))})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.MIDPOINT,(function(){i.i(new hr("ad-midpoint"))})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,(function(){i.i(new hr("ad-third-quartile"))})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.COMPLETE,(function(){i.i(new hr("ad-complete")),i.i(new hr("ad-stopped")),i.s.removeAttribute("ad-active"),i.m=null})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.SKIPPED,(function(){i.i(new hr("ad-skipped")),i.i(new hr("ad-stopped"))})),this.h.D(this.g,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,(function(e){var t=e.getStreamData();e=[];for(var n=(t=u(t.cuepoints)).next();!n.done;n=t.next())n=n.value,e.push({start:n.start,end:n.end});i.C=e,i.i(new hr("ad-cue-points-changed",(new Map).set("cuepoints",e)))}))}function ic(){yr.call(this),this.g=this.i=this.h=null,this.j=new ju,this.m=navigator.language,this.l=null}function ac(e,t){if(t&&t.type)switch(t.type){case"ads-loaded":e.j.h.push(t.loadTime);break;case"ad-started":e.j.g++;break;case"ad-complete":e.j.i++;break;case"ad-skipped":e.j.j++}e.dispatchEvent(t)}function oc(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof hr){var n={};for(r in t)(e=t[r])&&"object"==typeof e?"detail"==r&&(n[r]=e):r in Event||(n[r]=e);return n}if(t instanceof Error){var r=new Set(["name","message","stack"]);for(n in t)r.add(n);for(n=(e=u(Object.getOwnPropertyNames(t))).next();!n.done;n=e.next())r.add(n.value);for(e={},n=(r=u(r)).next();!n.done;n=r.next())e[n=n.value]=t[n];t={__type__:"Error",contents:e}}else if(t instanceof TimeRanges){for(r={__type__:"TimeRanges",length:t.length,start:[],end:[]},n=(t=u(_a(t))).next();!n.done;n=t.next())e=(n=n.value).end,r.start.push(n.start),r.end.push(e);t=r}else t=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return t}}))}function sc(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)n=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){for(n in e=t.contents,t=Error(e.message),e)t[n]=e[n];n=t}else n=t;return n}))}(r=Hu.prototype).getDuration=function(){return this.g.getDuration()},r.getMinSuggestedDuration=function(){return this.g.getMinSuggestedDuration()},r.getRemainingTime=function(){return this.h.getRemainingTime()},r.isPaused=function(){return this.i},r.isSkippable=function(){return 0<=this.g.getSkipTimeOffset()},r.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},r.canSkipNow=function(){return this.h.getAdSkippableState()},r.skip=function(){return this.h.skip()},r.pause=function(){return this.h.pause()},r.play=function(){return this.h.resume()},r.getVolume=function(){return this.h.getVolume()},r.setVolume=function(e){return this.h.setVolume(e)},r.isMuted=function(){return 0==this.h.getVolume()},r.isLinear=function(){return this.g.isLinear()},r.resize=function(e,t){var n=!1,r=this.m;document.fullscreenEnabled?n=!!document.fullscreenElement:r.webkitSupportsFullscreen&&(n=r.webkitDisplayingFullscreen),this.h.resize(e,t,n?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},r.setMuted=function(e){e?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)},r.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},r.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},r.getTitle=function(){return this.g.getTitle()},r.getDescription=function(){return this.g.getDescription()},r.getVastMediaBitrate=function(){return this.g.getVastMediaBitrate()},r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},r.getAdId=function(){return this.g.getAdId()},r.getCreativeAdId=function(){return this.g.getCreativeAdId()},r.getAdvertiserName=function(){return this.g.getAdvertiserName()},r.getMediaUrl=function(){return this.g.getMediaUrl()},r.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},r.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},r.release=function(){this.h=this.g=null},j("shaka.ads.ClientSideAd",Hu),Hu.prototype.release=Hu.prototype.release,Hu.prototype.getPodIndex=Hu.prototype.getPodIndex,Hu.prototype.getTimeOffset=Hu.prototype.getTimeOffset,Hu.prototype.getMediaUrl=Hu.prototype.getMediaUrl,Hu.prototype.getAdvertiserName=Hu.prototype.getAdvertiserName,Hu.prototype.getCreativeAdId=Hu.prototype.getCreativeAdId,Hu.prototype.getAdId=Hu.prototype.getAdId,Hu.prototype.getVastMediaWidth=Hu.prototype.getVastMediaWidth,Hu.prototype.getVastMediaHeight=Hu.prototype.getVastMediaHeight,Hu.prototype.getVastMediaBitrate=Hu.prototype.getVastMediaBitrate,Hu.prototype.getDescription=Hu.prototype.getDescription,Hu.prototype.getTitle=Hu.prototype.getTitle,Hu.prototype.getPositionInSequence=Hu.prototype.getPositionInSequence,Hu.prototype.getSequenceLength=Hu.prototype.getSequenceLength,Hu.prototype.setMuted=Hu.prototype.setMuted,Hu.prototype.resize=Hu.prototype.resize,Hu.prototype.isLinear=Hu.prototype.isLinear,Hu.prototype.isMuted=Hu.prototype.isMuted,Hu.prototype.setVolume=Hu.prototype.setVolume,Hu.prototype.getVolume=Hu.prototype.getVolume,Hu.prototype.play=Hu.prototype.play,Hu.prototype.pause=Hu.prototype.pause,Hu.prototype.skip=Hu.prototype.skip,Hu.prototype.canSkipNow=Hu.prototype.canSkipNow,Hu.prototype.getTimeUntilSkippable=Hu.prototype.getTimeUntilSkippable,Hu.prototype.isSkippable=Hu.prototype.isSkippable,Hu.prototype.isPaused=Hu.prototype.isPaused,Hu.prototype.getRemainingTime=Hu.prototype.getRemainingTime,Hu.prototype.getMinSuggestedDuration=Hu.prototype.getMinSuggestedDuration,Hu.prototype.getDuration=Hu.prototype.getDuration,Vu.prototype.configure=function(e){this.C=e},Vu.prototype.stop=function(){this.g&&this.g.stop(),this.o&&Ws(this.o)},Vu.prototype.release=function(){this.stop(),this.s&&this.s.disconnect(),this.h&&this.h.release(),this.g&&this.g.destroy(),this.l.destroy()},(r=Yu.prototype).getDuration=function(){return this.h.durationInSeconds},r.getMinSuggestedDuration=function(){return this.getDuration()},r.getRemainingTime=function(){return this.h.startTimeInSeconds+this.h.durationInSeconds-this.g.currentTime},r.isPaused=function(){return this.g.paused},r.isSkippable=function(){return!!this.h.skipOffset},r.getTimeUntilSkippable=function(){if(!this.h.skipOffset)return this.getRemainingTime();var e=this.getRemainingTime()-this.h.skipOffset;return Math.max(e,0)},r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},r.skip=function(){this.g.currentTime+=this.getRemainingTime()},r.pause=function(){return this.g.pause()},r.play=function(){return this.g.play()},r.getVolume=function(){return this.g.volume},r.setVolume=function(e){this.g.volume=e},r.isMuted=function(){return this.g.muted},r.isLinear=function(){return this.l},r.resize=function(){},r.setMuted=function(e){this.g.muted=e},r.getSequenceLength=function(){return this.j?this.j:1},r.getPositionInSequence=function(){return this.i?this.i:1},r.getTitle=function(){return this.h.adTitle},r.getDescription=function(){return""},r.getVastMediaBitrate=function(){return 0},r.getVastMediaHeight=function(){return 0},r.getVastMediaWidth=function(){return 0},r.getAdId=function(){return this.h.adId},r.getCreativeAdId=function(){return this.h.creativeId},r.getAdvertiserName=function(){return""},r.getMediaUrl=function(){return null},r.getTimeOffset=function(){return 0},r.getPodIndex=function(){return 0},r.release=function(){this.j=this.i=this.g=this.h=null},j("shaka.ads.MediaTailorAd",Yu),Yu.prototype.release=Yu.prototype.release,Yu.prototype.getPodIndex=Yu.prototype.getPodIndex,Yu.prototype.getTimeOffset=Yu.prototype.getTimeOffset,Yu.prototype.getMediaUrl=Yu.prototype.getMediaUrl,Yu.prototype.getAdvertiserName=Yu.prototype.getAdvertiserName,Yu.prototype.getCreativeAdId=Yu.prototype.getCreativeAdId,Yu.prototype.getAdId=Yu.prototype.getAdId,Yu.prototype.getVastMediaWidth=Yu.prototype.getVastMediaWidth,Yu.prototype.getVastMediaHeight=Yu.prototype.getVastMediaHeight,Yu.prototype.getVastMediaBitrate=Yu.prototype.getVastMediaBitrate,Yu.prototype.getDescription=Yu.prototype.getDescription,Yu.prototype.getTitle=Yu.prototype.getTitle,Yu.prototype.getPositionInSequence=Yu.prototype.getPositionInSequence,Yu.prototype.getSequenceLength=Yu.prototype.getSequenceLength,Yu.prototype.setMuted=Yu.prototype.setMuted,Yu.prototype.resize=Yu.prototype.resize,Yu.prototype.isLinear=Yu.prototype.isLinear,Yu.prototype.isMuted=Yu.prototype.isMuted,Yu.prototype.setVolume=Yu.prototype.setVolume,Yu.prototype.getVolume=Yu.prototype.getVolume,Yu.prototype.play=Yu.prototype.play,Yu.prototype.pause=Yu.prototype.pause,Yu.prototype.skip=Yu.prototype.skip,Yu.prototype.canSkipNow=Yu.prototype.canSkipNow,Yu.prototype.getTimeUntilSkippable=Yu.prototype.getTimeUntilSkippable,Yu.prototype.isSkippable=Yu.prototype.isSkippable,Yu.prototype.isPaused=Yu.prototype.isPaused,Yu.prototype.getRemainingTime=Yu.prototype.getRemainingTime,Yu.prototype.getMinSuggestedDuration=Yu.prototype.getMinSuggestedDuration,Yu.prototype.getDuration=Yu.prototype.getDuration,qu.prototype.stop=function(){for(var e=u(this.m),t=e.next();!t.done;t=e.next())t=t.value,this.o.Ub(t.target,t.type,t.listener);Zu(this),this.m=[],this.s=[],this.N="",this.V=!0,this.G="",this.u=null,this.j=[],this.K=[],this.F.clear()},qu.prototype.release=function(){this.stop(),this.o&&this.o.release()},qu.prototype.onManifestUpdated=function(e){this.H=e,""!=this.N&&(function(e,t,n){var r,i,a,o,s,l,c,d,p,h,f,g,y,v,m;R((function(b){if(1==b.g)return r=Er([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}),i=e.I.request(7,r),k(b,2),_(b,i.promise,4);if(2!=b.g){if(a=b.h,o=[],s=Br(a.data),0<(l=JSON.parse(s)).avails.length){if(JSON.stringify(e.j)!=JSON.stringify(l.avails)){for(e.j=l.avails,c=u(e.j),d=c.next();!d.done;d=c.next())for(p=d.value,h=u(p.nonLinearAdsList),f=h.next();!f.done;f=h.next())for(g=f.value,y=u(g.nonLinearAdList),v=y.next();!v.done;v=y.next())m=v.value,Xu(e,m);o=e.getCuePoints(),e.i(new hr("ad-cue-points-changed",(new Map).set("cuepoints",o)))}}else e.j.length&&e.i(new hr("ad-cue-points-changed",(new Map).set("cuepoints",o))),Zu(e),e.j=[];return n&&(e.H||0<o.length)&&function(e){Ju(e),e.H||($u(e),e.o.D(e.g,"seeked",(function(){$u(e)})),e.o.D(e.g,"ended",(function(){Zu(e)}))),e.o.D(e.g,"timeupdate",(function(){Ju(e)}))}(e),A(b,0)}w(b),E(b)}))}(this,this.N,this.V),this.V=!1)},qu.prototype.getCuePoints=function(){for(var e=[],t=u(this.j),n=t.next();!n.done;n=t.next())for(var r=(n=u(n.value.ads)).next();!r.done;r=n.next())r=r.value,e.push({start:r.startTimeInSeconds,end:r.startTimeInSeconds+r.durationInSeconds});return e},(r=nc.prototype).getDuration=function(){return this.i?this.i.duration:-1},r.getMinSuggestedDuration=function(){return this.getDuration()},r.getRemainingTime=function(){return this.i?this.i.duration-this.i.currentTime:-1},r.isPaused=function(){return this.h.paused},r.isSkippable=function(){return this.g.isSkippable()},r.getTimeUntilSkippable=function(){var e=this.g.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},r.skip=function(){this.h.currentTime+=this.getRemainingTime()},r.pause=function(){return this.h.pause()},r.play=function(){return this.h.play()},r.getVolume=function(){return this.h.volume},r.setVolume=function(e){this.h.volume=e},r.isMuted=function(){return this.h.muted},r.isLinear=function(){return!0},r.resize=function(){},r.setMuted=function(e){this.h.muted=e},r.getSequenceLength=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getTotalAds()},r.getPositionInSequence=function(){var e=this.g.getAdPodInfo();return null==e?1:e.getAdPosition()},r.getTitle=function(){return this.g.getTitle()},r.getDescription=function(){return this.g.getDescription()},r.getVastMediaBitrate=function(){return 0},r.getVastMediaHeight=function(){return this.g.getVastMediaHeight()},r.getVastMediaWidth=function(){return this.g.getVastMediaWidth()},r.getAdId=function(){return this.g.getAdId()},r.getCreativeAdId=function(){return this.g.getCreativeAdId()},r.getAdvertiserName=function(){return this.g.getAdvertiserName()},r.getMediaUrl=function(){return null},r.getTimeOffset=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getTimeOffset()},r.getPodIndex=function(){var e=this.g.getAdPodInfo();return null==e?0:e.getPodIndex()},r.release=function(){this.h=this.i=this.g=null},j("shaka.ads.ServerSideAd",nc),nc.prototype.release=nc.prototype.release,nc.prototype.getPodIndex=nc.prototype.getPodIndex,nc.prototype.getTimeOffset=nc.prototype.getTimeOffset,nc.prototype.getMediaUrl=nc.prototype.getMediaUrl,nc.prototype.getAdvertiserName=nc.prototype.getAdvertiserName,nc.prototype.getCreativeAdId=nc.prototype.getCreativeAdId,nc.prototype.getAdId=nc.prototype.getAdId,nc.prototype.getVastMediaWidth=nc.prototype.getVastMediaWidth,nc.prototype.getVastMediaHeight=nc.prototype.getVastMediaHeight,nc.prototype.getVastMediaBitrate=nc.prototype.getVastMediaBitrate,nc.prototype.getDescription=nc.prototype.getDescription,nc.prototype.getTitle=nc.prototype.getTitle,nc.prototype.getPositionInSequence=nc.prototype.getPositionInSequence,nc.prototype.getSequenceLength=nc.prototype.getSequenceLength,nc.prototype.setMuted=nc.prototype.setMuted,nc.prototype.resize=nc.prototype.resize,nc.prototype.isLinear=nc.prototype.isLinear,nc.prototype.isMuted=nc.prototype.isMuted,nc.prototype.setVolume=nc.prototype.setVolume,nc.prototype.getVolume=nc.prototype.getVolume,nc.prototype.play=nc.prototype.play,nc.prototype.pause=nc.prototype.pause,nc.prototype.skip=nc.prototype.skip,nc.prototype.canSkipNow=nc.prototype.canSkipNow,nc.prototype.getTimeUntilSkippable=nc.prototype.getTimeUntilSkippable,nc.prototype.isSkippable=nc.prototype.isSkippable,nc.prototype.isPaused=nc.prototype.isPaused,nc.prototype.getRemainingTime=nc.prototype.getRemainingTime,nc.prototype.getMinSuggestedDuration=nc.prototype.getMinSuggestedDuration,nc.prototype.getDuration=nc.prototype.getDuration,(r=rc.prototype).configure=function(){},r.stop=function(){this.A="",this.o=null,this.C=[]},r.release=function(){this.stop(),this.h&&this.h.release()},r.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.g.onTimedMetadata(t)}},r.getCuePoints=function(){return this.C},y(ic,yr),(r=ic.prototype).setLocale=function(e){this.m=e},r.configure=function(e){this.l=e,this.h&&this.h.configure(this.l),this.g&&this.g.configure(this.l)},r.initClientSide=function(t,n,r){var i=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new ut(2,10,1e4);this.h&&this.h.release(),this.h=new Vu(t,n,this.m,r,(function(e){return ac(i,e)})),this.h.configure(this.l)},r.release=function(){this.h&&(this.h.release(),this.h=null),this.i&&(this.i.release(),this.i=null),this.g&&(this.g.release(),this.g=null),yr.prototype.release.call(this)},r.onAssetUnload=function(){this.h&&this.h.stop(),this.i&&this.i.stop(),this.g&&this.g.stop(),this.dispatchEvent(new hr("ad-stopped")),this.j=new ju},r.requestClientSideAds=function(e){if(!this.h)throw new ut(1,10,10001);var t=this.h;t.g&&t.g.destroy(),t.l&&t.l.contentComplete(),t.F=Date.now()/1e3,t.l.requestAds(e)},r.updateClientSideAdsRenderingSettings=function(e){if(!this.h)throw new ut(1,10,10001);var t=this.h;t.u=e,t.g&&t.g.updateAdsRenderingSettings(t.u)},r.initMediaTailor=function(e,t,n){var r=this;this.i&&this.i.release(),this.i=new qu(e,t,n,(function(e){return ac(r,e)}))},r.requestMediaTailorStream=function(e,t,n){if(!this.i)throw new ut(1,10,10005);var r=this.i;return n=void 0===n?"":n,r.l?e=Promise.reject(new ut(1,10,10004)):(r.l=new or,function(e,t,n){var r,i,a,o,s,l,u,c,d,p,h;R((function(f){if(1==f.g)return(r=Er([t],{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4})).method="POST",n&&(i=JSON.stringify(n),r.body=Vr(i)),a=e.I.request(7,r),k(f,2),_(f,a.promise,4);if(2!=f.g){if(o=f.h,s=Br(o.data),!(l=JSON.parse(s)).manifestUrl||!l.trackingUrl)throw Error("Insufficient data from MediaTailor.");return u=new Ye(t),c=new Ye(l.trackingUrl),e.N=u.resolve(c).toString(),d=Date.now()/1e3,p=d-e.W,e.i(new hr("ads-loaded",(new Map).set("loadTime",p))),h=new Ye(l.manifestUrl),e.l.resolve(u.resolve(h).toString()),e.l=null,A(f,0)}if(w(f),!e.G.length)return e.l.reject("MediaTailor request returned an error and there was no backup asset uri provided."),e.l=null,f.return();e.l.resolve(e.G),e.l=null,E(f)}))}(r,e,t),r.G=n||"",r.W=Date.now()/1e3,e=r.l),e},r.initServerSide=function(t,n){var r=this;if(!e.google||!google.ima||!google.ima.dai)throw new ut(2,10,10002);this.g&&this.g.release(),this.g=new rc(t,n,this.m,(function(e){return ac(r,e)})),this.g.configure(this.l)},r.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new ut(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;return(n.mpt||n.mpv)&&W('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v4.7.0",(n=this.g).j?e=Promise.reject(new ut(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.G=!0),n.j=new or,n.g.requestStream(e),n.A=t||"",n.F=Date.now()/1e3,e=n.j),e},r.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new ut(1,10,10003);(e.mpt||e.mpv)&&W('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.mpt="Shaka Player",e.mpv="v4.7.0",this.g.g.replaceAdTagParameters(e)},r.getServerSideCuePoints=function(){return Kn("AdManager","Please use getCuePoints function."),this.getCuePoints()},r.getCuePoints=function(){var e=[];return this.g&&(e=e.concat(this.g.getCuePoints())),this.i&&(e=e.concat(this.i.getCuePoints())),e},r.getStats=function(){var e=this.j;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},r.onManifestUpdated=function(e){this.i&&this.i.onManifestUpdated(e)},r.onDashTimedMetadata=function(e){if(this.g&&"urn:google:dai:2018"==e.schemeIdUri){var t=e.schemeIdUri,n=e.eventElement?e.eventElement.getAttribute("messageData"):null;this.g.g.processMetadata(t,n,e.startTime)}},r.onHlsTimedMetadata=function(e,t){this.g&&this.g.g.processMetadata("ID3",e.data,t)},r.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},j("shaka.ads.AdManager",ic),ic.prototype.onCueMetadataChange=ic.prototype.onCueMetadataChange,ic.prototype.onHlsTimedMetadata=ic.prototype.onHlsTimedMetadata,ic.prototype.onDashTimedMetadata=ic.prototype.onDashTimedMetadata,ic.prototype.onManifestUpdated=ic.prototype.onManifestUpdated,ic.prototype.getStats=ic.prototype.getStats,ic.prototype.getCuePoints=ic.prototype.getCuePoints,ic.prototype.getServerSideCuePoints=ic.prototype.getServerSideCuePoints,ic.prototype.replaceServerSideAdTagParameters=ic.prototype.replaceServerSideAdTagParameters,ic.prototype.requestServerSideStream=ic.prototype.requestServerSideStream,ic.prototype.initServerSide=ic.prototype.initServerSide,ic.prototype.requestMediaTailorStream=ic.prototype.requestMediaTailorStream,ic.prototype.initMediaTailor=ic.prototype.initMediaTailor,ic.prototype.updateClientSideAdsRenderingSettings=ic.prototype.updateClientSideAdsRenderingSettings,ic.prototype.requestClientSideAds=ic.prototype.requestClientSideAds,ic.prototype.onAssetUnload=ic.prototype.onAssetUnload,ic.prototype.release=ic.prototype.release,ic.prototype.initClientSide=ic.prototype.initClientSide,ic.prototype.configure=ic.prototype.configure,ic.prototype.setLocale=ic.prototype.setLocale,ic.ADS_LOADED="ads-loaded",ic.AD_STARTED="ad-started",ic.AD_FIRST_QUARTILE="ad-first-quartile",ic.AD_MIDPOINT="ad-midpoint",ic.AD_THIRD_QUARTILE="ad-third-quartile",ic.AD_COMPLETE="ad-complete",ic.AD_STOPPED="ad-stopped",ic.AD_SKIPPED="ad-skipped",ic.AD_VOLUME_CHANGED="ad-volume-changed",ic.AD_MUTED="ad-muted",ic.AD_PAUSED="ad-paused",ic.AD_RESUMED="ad-resumed",ic.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",ic.CUEPOINTS_CHANGED="ad-cue-points-changed",ic.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",ic.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",ic.AD_CLICKED="ad-clicked",ic.AD_PROGRESS="ad-progress",ic.AD_BUFFERING="ad-buffering",ic.AD_IMPRESSION="ad-impression",ic.AD_DURATION_CHANGED="ad-duration-changed",ic.AD_CLOSED="ad-closed",ic.AD_LOADED="ad-loaded",ic.ALL_ADS_COMPLETED="all-ads-completed",ic.AD_LINEAR_CHANGED="ad-linear-changed",ic.AD_METADATA="ad-metadata",ic.AD_RECOVERABLE_ERROR="ad-recoverable-error",ic.AD_ERROR="ad-error",ic.AD_BREAK_READY="ad-break-ready",ic.AD_INTERACTION="ad-interaction",Bu=function(){return new ic};var lc="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),uc="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),cc=["loop","playbackRate"],dc=["pause","play"],pc={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getLoadMode:10,getManifestType:10},hc={getConfiguration:4,getStats:5,getTextTracks:2,getVariantTracks:2},fc={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},gc=[["getConfiguration","configure"]],yc=[["isTextTrackVisible","setTextTrackVisibility"]],vc="addChaptersTrack addTextTrackAsync addThumbnailsTrack cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay updateStartTime goToLive".split(" "),mc=["attach","attachCanvas","detach","load","unload"];function bc(e,t,n,r,i,a,o){var s=this;this.G=e,this.K=o,this.j=new Qt(t),this.N=n,this.u=!1,this.s=r,this.F=i,this.I=a,this.h=this.m=!1,this.J="",this.o=null,this.A=function(){return Ac(s)},this.C=function(e,t){switch((e=sc(t)).type){case"event":var n=e.targetName,r=fr(e.event);s.s(n,r);break;case"update":for(r in n=e.update)for(var i in e=s.g[r]||{},n[r])e[i]=n[r][i];s.u&&(s.N(),s.u=!1);break;case"asyncComplete":if(r=e.id,i=e.error,e=s.i[r],delete s.i[r],e)if(i){for(n in r=new ut(i.severity,i.category,i.code),i)r[n]=i[n];e.reject(r)}else e.resolve()}},this.g={video:{},player:{}},this.H=0,this.i={},this.l=null,Dc.add(this)}function _c(e,t,n){Ic=n,n.addUpdateListener(e.A),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.C),Ac(e),Sc(e,{type:"init",initState:t,appData:e.o}),e.l.resolve()}function Ec(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.l.reject(new ut(2,8,n,t))}function kc(e,t){var n=e.I();e.l=new or,e.u=!0,_c(e,n,t)}function Tc(e){var t=Ic;t.removeUpdateListener(e.A),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.C)}function Ac(e){var t=!!Ic&&"connected"==Ic.status;if(e.h&&!t){for(var n in e.F(),e.g)e.g[n]={};wc(e)}e.h=t,e.J=t?Ic.receiver.friendlyName:"",e.j.lc()}function wc(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new ut(1,7,7e3))}}function Sc(e,t){t=oc(t);var n=Ic;try{n.sendMessage("urn:x-cast:com.google.shaka.v2",t,(function(){}),q)}catch(r){throw t=new ut(2,8,8005,r),n=new hr("error",(new Map).set("detail",t)),e.s("player",n),e.ac(),t}}(r=bc.prototype).destroy=function(){return Dc.delete(this),wc(this),Ic&&Tc(this),this.j&&(this.j.stop(),this.j=null),this.F=this.s=null,this.h=this.m=!1,this.C=this.A=this.l=this.i=this.g=this.o=null,Promise.resolve()},r.Ia=function(){return this.h},r.$e=function(){return this.J},r.init=function(){if(this.G.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.lc();var t=new chrome.cast.SessionRequest(this.G,[],null,this.K,null);t=new chrome.cast.ApiConfig(t,(function(e){for(var t=u(Dc),n=t.next();!n.done;n=t.next())kc(n.value,e)}),(function(e){for(var t=u(Dc),n=t.next();!n.done;n=t.next())n=n.value,xc="available"==e,n.j.lc()}),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),xc&&this.j.U(Cc),(t=Ic)&&t.status!=chrome.cast.SessionStatus.STOPPED?kc(this,t):Ic=null}else e.__onGCastApiAvailable!==Rc&&(Pc=e.__onGCastApiAvailable||null,e.__onGCastApiAvailable=Rc)},r.ff=function(e){this.o=e,this.h&&Sc(this,{type:"appData",appData:this.o})},r.cast=function(e){var t=this;return R((function(n){if(!t.m)throw new ut(1,8,8e3);if(!xc)throw new ut(1,8,8001);if(t.h)throw new ut(1,8,8002);return t.l=new or,chrome.cast.requestSession((function(n){return _c(t,e,n)}),(function(e){return Ec(t,e)})),_(n,t.l,0)}))},r.ac=function(){if(this.h){if(wc(this),Ic){Tc(this);try{Ic.stop((function(){}),(function(){}))}catch(e){}Ic=null}Ac(this)}},r.get=function(e,t){var n=this;if("video"==e){if(dc.includes(t))return function(){return n.ag.apply(n,[e,t].concat(c(L.apply(0,arguments))))}}else if("player"==e){if(fc[t]&&!this.get("player","isLive")())return function(){};if(vc.includes(t))return function(){return n.ag.apply(n,[e,t].concat(c(L.apply(0,arguments))))};if(mc.includes(t))return function(){return n.Eh.apply(n,[e,t].concat(c(L.apply(0,arguments))))};if(pc[t]||hc[t])return function(){return n.g[e][t]}}return this.g[e][t]},r.set=function(e,t,n){this.g[e][t]=n,Sc(this,{type:"set",targetName:e,property:t,value:n})},r.ag=function(e,t){Sc(this,{type:"call",targetName:e,methodName:t,args:L.apply(2,arguments)})},r.Eh=function(e,t){var n=L.apply(2,arguments),r=new or,i=this.H.toString();this.H++,this.i[i]=r;try{Sc(this,{type:"asyncCall",targetName:e,methodName:t,args:n,id:i})}catch(e){r.reject(e)}return r};var Cc=.02,xc=!1,Ic=null,Pc=null,Dc=new Set;function Rc(t){if(Pc?e.__onGCastApiAvailable=Pc:delete e.__onGCastApiAvailable,Pc=null,t)for(var n=u(Dc),r=n.next();!r.done;r=n.next())r.value.init();"function"==typeof e.__onGCastApiAvailable&&e.__onGCastApiAvailable(t)}function Lc(e,t,n,r){r=void 0!==r&&r,yr.call(this);var i=this;this.i=e,this.h=t,this.m=this.o=this.j=this.s=this.l=null,this.C=n,this.A=r,this.u=new Map,this.g=new bc(n,(function(){return Nc(i)}),(function(){return Uc(i)}),(function(e,t){return jc(i,e,t)}),(function(){return Fc(i)}),(function(){return Mc(i)}),r),function(e){e.g.init(),e.m=new Pr;for(var t=u(lc),n=t.next();!n.done;n=t.next())e.m.D(e.i,n.value,(function(t){e.g.Ia()||(t=fr(t),e.j.dispatchEvent(t))}));for(var r in gr)e.m.D(e.h,gr[r],(function(t){e.g.Ia()||e.o.dispatchEvent(t)}));for(var i in e.l={},t={},e.i)t.sc=i,Object.defineProperty(e.l,t.sc,{configurable:!1,enumerable:!0,get:function(t){return function(){return Bc(e,t.sc)}}(t),set:function(t){return function(n){var r=t.sc;e.g.Ia()?e.g.set("video",r,n):e.i[r]=n}}(t)}),t={sc:t.sc};e.s={},Oc(e,(function(t){Object.defineProperty(e.s,t,{configurable:!1,enumerable:!0,get:function(){return function(e,t){if(e.u.has(t)&&(t=e.u.get(t)),"addEventListener"==t)return function(t,n,r){return e.o.addEventListener(t,n,r)};if("removeEventListener"==t)return function(t,n,r){return e.o.removeEventListener(t,n,r)};if("getMediaElement"==t)return function(){return e.l};if("getSharedConfiguration"==t)return e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return function(){return e.h.Mb()};if("getDrmEngine"==t)return function(){return e.h.o};if("getAdManager"==t)return function(){return e.h.Hf()};if("setVideoContainer"==t)return function(t){return e.h.lg(t)};if(e.g.Ia()){if("getManifest"==t||"drmInfo"==t)return function(){return W(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return W(t+"() does not work while casting!"),Promise.resolve()}}return e.g.Ia()&&0==Object.keys(e.g.g.video).length&&(pc[t]||hc[t])||!e.g.Ia()?e.h[t].bind(e.h):e.g.get("player",t)}(e,t)}})})),function(e){var t=new Map;Oc(e,(function(n,r){t.has(r)?(r=t.get(r),n.length<r.length?e.u.set(n,r):e.u.set(r,n)):t.set(r,n)}))}(e),e.j=new yr,e.j.wd=e.l,e.o=new yr,e.o.wd=e.s}(this)}function Oc(e,t){function n(e){return"constructor"!=e&&"function"==typeof i[e]&&!a.has(e)}var r,i=e.h,a=new Set;for(r in i)n(r)&&(a.add(r),t(r,i[r]));for(e=Object.getPrototypeOf(i),r=Object.getPrototypeOf({});e&&e!=r;){for(var o=u(Object.getOwnPropertyNames(e)),s=o.next();!s.done;s=o.next())n(s=s.value)&&(a.add(s),t(s,i[s]));e=Object.getPrototypeOf(e)}}function Mc(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.h.Ae(),startTime:null};e.i.pause();for(var n=u(cc),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.i[r];for(e.i.ended||(t.startTime=e.i.currentTime),r=(n=u(gc)).next();!r.done;r=n.next()){var i=r.value;r=i[1],i=e.h[i[0]](),t.player[r]=i}for(r=(n=u(yc)).next();!r.done;r=n.next())r=(i=r.value)[1],i=e.h[i[0]](),t.playerAfterLoad[r]=i;return t}function Nc(e){var t=new hr("caststatuschanged");e.dispatchEvent(t)}function Uc(e){var t=new hr(e.l.paused?"pause":"play");e.j.dispatchEvent(t)}function Fc(e){for(var t=u(gc),n=t.next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.h[n](r)}var i=e.g.get("player","getAssetUri")();n=e.g.get("video","ended"),t=Promise.resolve();var a=e.i.autoplay;r=null,n||(r=e.g.get("video","currentTime")),i&&(e.i.autoplay=!1,t=e.h.load(i,r));var o={};for(r=(n=u(cc)).next();!r.done;r=n.next())r=r.value,o[r]=e.g.get("video",r);t.then((function(){if(e.i){for(var t=u(cc),n=t.next();!n.done;n=t.next())n=n.value,e.i[n]=o[n];for(n=(t=u(yc)).next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.h[n](r)}e.i.autoplay=a,i&&e.i.play()}}),(function(t){t=new hr("error",t=(new Map).set("detail",t)),e.h.dispatchEvent(t)}))}function Bc(e,t){if("addEventListener"==t)return function(t,n,r){return e.j.addEventListener(t,n,r)};if("removeEventListener"==t)return function(t,n,r){return e.j.removeEventListener(t,n,r)};if(e.g.Ia()&&0==Object.keys(e.g.g.video).length){var n=e.i[t];if("function"!=typeof n)return n}return e.g.Ia()?e.g.get("video",t):("function"==typeof(t=e.i[t])&&(t=t.bind(e.i)),t)}function jc(e,t,n){e.g.Ia()&&("video"==t?e.j.dispatchEvent(n):"player"==t&&e.o.dispatchEvent(n))}function Hc(e,t,n,r){yr.call(this);var i=this;this.g=e,this.h=t,this.j=new Pr,this.H={video:e,player:t},this.C=n||function(){},this.I=r||function(e){return e},this.i=null,this.F=!1,this.o=!0,this.m=0,this.A=!1,this.u=!0,this.s=this.l=null,this.G=new Qt((function(){zc(i)})),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return Vc(e)},t.onSenderDisconnected=function(){return Vc(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&Xc(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),Xc(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.s=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.s.onMessage=function(t){return function(e,t){var n=sc(t.data);switch(n.type){case"PLAY":e.g.play(),Qc(e);break;case"PAUSE":e.g.pause(),Qc(e);break;case"SEEK":t=n.currentTime;var r=n.resumeState;null!=t&&(e.g.currentTime=Number(t)),r&&"PLAYBACK_START"==r?(e.g.play(),Qc(e)):r&&"PLAYBACK_PAUSE"==r&&(e.g.pause(),Qc(e));break;case"STOP":e.h.mc().then((function(){e.h&&Qc(e)}));break;case"GET_STATUS":Yc(e,Number(n.requestId));break;case"VOLUME":r=n.volume,t=r.level,r=r.muted;var i=e.g.volume,a=e.g.muted;null!=t&&(e.g.volume=Number(t)),null!=r&&(e.g.muted=r),i==e.g.volume&&a==e.g.muted||Qc(e);break;case"LOAD":e.m=0,e.A=!1,e.u=!1,t=n.media,r=n.currentTime,i=e.I(t.contentId),a=n.autoplay||!0,e.C(t.customData),a&&(e.g.autoplay=!0),e.h.load(i,r).then((function(){e.h&&Yc(e)})).catch((function(t){var r="LOAD_FAILED";7==t.category&&7e3==t.code&&(r="LOAD_CANCELLED"),Xc(e,{requestId:Number(n.requestId),type:r},e.s)}));break;default:Xc(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.s)}}(e,t)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n=sc(t.data);switch(n.type){case"init":e.m=0,e.A=!1,e.u=!0,function(e,t,n){var r,i,a,o,s,l,u,c,d,p;R((function(h){switch(h.g){case 1:for(r in t.player)i=t.player[r],e.h[r](i);return e.C(n),a=e.g.autoplay,t.manifest?(e.g.autoplay=!1,k(h,5),_(h,e.h.load(t.manifest,t.startTime),7)):_(h,Promise.resolve(),3);case 7:A(h,3);break;case 5:return o=w(h),s=(new Map).set("detail",o),l=new hr("error",s),e.h&&e.h.dispatchEvent(l),h.return();case 3:if(!e.h)return h.return();for(u in t.video)c=t.video[u],e.g[u]=c;for(d in t.playerAfterLoad)p=t.playerAfterLoad[d],e.h[d](p);e.g.autoplay=a,t.manifest&&(e.g.play(),Qc(e)),E(h)}}))}(e,n.initState,n.appData),zc(e);break;case"appData":e.C(n.appData);break;case"set":var r=n.targetName,i=n.property;if(n=n.value,"video"==r){if(t=cast.receiver.CastReceiverManager.getInstance(),"volume"==i){t.setSystemVolumeLevel(n);break}if("muted"==i){t.setSystemVolumeMuted(n);break}}e.H[r][i]=n;break;case"call":(r=e.H[n.targetName])[n.methodName].apply(r,n.args);break;case"asyncCall":r=n.targetName,i=n.methodName,"player"==r&&"load"==i&&(e.m=0,e.A=!1);var a=n.id,o=t.senderId;t=e.H[r],n=t[i].apply(t,n.args),"player"==r&&"load"==i&&(n=n.then((function(){e.u=!0}))),n.then((function(){return qc(e,o,a,null)}),(function(t){return qc(e,o,a,t)}))}}(e,t)},t.start();for(var n=(t=u(lc)).next();!n.done;n=t.next())e.j.D(e.g,n.value,(function(t){return Kc(e,"video",t)}));for(var r in gr)e.j.D(e.h,gr[r],(function(t){return Kc(e,"player",t)}));cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.h.hf(3840,2160):e.h.hf(1920,1080),e.j.D(e.g,"loadeddata",(function(){e.A=!0})),e.j.D(e.h,"loading",(function(){e.o=!1,Gc(e)})),e.j.D(e.g,"playing",(function(){e.o=!1,Gc(e)})),e.j.D(e.g,"pause",(function(){Gc(e)})),e.j.D(e.h,"unloading",(function(){e.o=!0,Gc(e)})),e.j.D(e.g,"ended",(function(){new Qt((function(){e.g&&e.g.ended&&(e.o=!0,Gc(e))})).U(Jc)}))}(this)}function Vc(e){e.m=0,e.u=!0,e.F=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Gc(e)}function Gc(e){var t;R((function(n){return 1==n.g?_(n,Promise.resolve(),2):e.h?(t=new hr("caststatuschanged"),e.dispatchEvent(t),Wc(e)||Qc(e),void E(n)):n.return()}))}function Kc(e,t,n){e.h&&(zc(e),Xc(e,{type:"event",targetName:t,event:n},e.l))}function zc(e){e.G.U($c);for(var t={video:{},player:{}},n=u(uc),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.g[r];if(e.h.S())for(var i in fc)0==e.m%fc[i]&&(t.player[i]=e.h[i]());for(var a in pc)0==e.m%pc[a]&&(t.player[a]=e.h[a]());for(var o in(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),Xc(e,{type:"update",update:t},e.l),hc)0==e.m%hc[o]&&((t={player:{}}).player[o]=e.h[o](),Xc(e,{type:"update",update:t},e.l));e.A&&(e.m+=1),Wc(e)}function Wc(e){return!(!e.u||!e.g.duration&&!e.h.S())&&(Yc(e),e.u=!1,!0)}function Yc(e,t){var n={contentId:e.h.Ae(),streamType:e.h.S()?"LIVE":"BUFFERED",contentType:""};e.h.S()||(n.duration=e.g.duration),e.i&&(n.metadata=e.i),Qc(e,void 0===t?0:t,n)}function qc(e,t,n,r){e.h&&Xc(e,{type:"asyncComplete",id:n,error:r},e.l,t)}function Xc(e,t,n,r){e.F&&(e=oc(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function Qc(e,t,n){n=void 0===n?null:n;var r={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.o?Zc:e.h.Ee()?td:e.g.paused?nd:ed,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(r.media=n),Xc(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[r]},e.s)}y(Lc,yr),(r=Lc.prototype).destroy=function(e){return e&&this.g.ac(),this.m&&(this.m.release(),this.m=null),e=[],this.h&&(e.push(this.h.destroy()),this.h=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.s=this.l=this.i=null,yr.prototype.release.call(this),Promise.all(e)},r.fh=function(){return this.l},r.Ug=function(){return this.s},r.xg=function(){return this.g.m&&xc},r.Ia=function(){return this.g.Ia()},r.$e=function(){return this.g.$e()},r.cast=function(){var e,t=this;return R((function(n){return 1==n.g?(e=Mc(t),_(n,t.g.cast(e),2)):t.h?_(n,t.h.mc(),0):n.return()}))},r.ff=function(e){this.g.ff(e)},r.Rh=function(){!function(e){if(e.h){var t=e.I();chrome.cast.requestSession((function(n){return _c(e,t,n)}),(function(t){return Ec(e,t)}))}}(this.g)},r.ac=function(){this.g.ac()},r.yg=function(e,t){t=void 0!==t&&t;var n=this;return R((function(r){if(1==r.g)return e==n.C&&t==n.A?r.return():(n.C=e,n.A=t,n.g.ac(),_(r,n.g.destroy(),2));n.g=null,n.g=new bc(e,(function(){return Nc(n)}),(function(){return Uc(n)}),(function(e,t){return jc(n,e,t)}),(function(){return Fc(n)}),(function(){return Mc(n)}),t),n.g.init(),E(r)}))},j("shaka.cast.CastProxy",Lc),Lc.prototype.changeReceiverId=Lc.prototype.yg,Lc.prototype.forceDisconnect=Lc.prototype.ac,Lc.prototype.suggestDisconnect=Lc.prototype.Rh,Lc.prototype.setAppData=Lc.prototype.ff,Lc.prototype.cast=Lc.prototype.cast,Lc.prototype.receiverName=Lc.prototype.$e,Lc.prototype.isCasting=Lc.prototype.Ia,Lc.prototype.canCast=Lc.prototype.xg,Lc.prototype.getPlayer=Lc.prototype.Ug,Lc.prototype.getVideo=Lc.prototype.fh,Lc.prototype.destroy=Lc.prototype.destroy,y(Hc,yr),(r=Hc.prototype).isConnected=function(){return this.F},r.lh=function(){return this.o},r.Oh=function(e){this.i=e},r.Bg=function(){this.i=null},r.Ph=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.title=e},r.Nh=function(e){this.i||(this.i={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.i.images=[{url:e}]},r.Mh=function(e){this.i||(this.i={}),this.i.artist=e,this.i.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},r.destroy=function(){var e,t=this;return R((function(n){if(1==n.g)return t.j&&(t.j.release(),t.j=null),e=[],t.h&&(e.push(t.h.destroy()),t.h=null),t.G&&(t.G.stop(),t.G=null),t.g=null,t.H=null,t.C=null,t.F=!1,t.o=!0,t.l=null,t.s=null,yr.prototype.release.call(t),_(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),E(n)}))},j("shaka.cast.CastReceiver",Hc),Hc.prototype.destroy=Hc.prototype.destroy,Hc.prototype.setContentArtist=Hc.prototype.Mh,Hc.prototype.setContentImage=Hc.prototype.Nh,Hc.prototype.setContentTitle=Hc.prototype.Ph,Hc.prototype.clearContentMetadata=Hc.prototype.Bg,Hc.prototype.setContentMetadata=Hc.prototype.Oh,Hc.prototype.isIdle=Hc.prototype.lh,Hc.prototype.isConnected=Hc.prototype.isConnected;var $c=.5,Jc=5,Zc="IDLE",ed="PLAYING",td="BUFFERING",nd="PAUSED";function rd(e,t,n,r,i){if(r>=i)return null;for(var a=-1,o=-1,s=0;s<n.length;s++)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){a=s;break}for(s=n.length-1;0<=s;s--)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){o=s;break}if(-1===a||-1===o)return null;for(var l=s=!1,u="white",c="black",d=id(r,i,s,l,u,c);a<=o;a++){for(var p=n[a],h=-1,f=-1,g=0;g<p.length;g++)if(null!=p[g]&&""!==p[g].g.trim()){h=g;break}for(g=p.length-1;0<=g;g--)if(null!=p[g]&&""!==p[g].g.trim()){f=g;break}if(-1===h||-1===f)p=ad(r,i),e.nestedCues.push(p);else{for(;h<=f;h++)if(g=p[h]){var y=g.l,v=g.i,m=g.j,b=g.h;y==s&&v==l&&m==u&&b==c||(d.payload&&e.nestedCues.push(d),d=id(r,i,y,v,m,b),s=y,l=v,u=m,c=b),d.payload+=g.g}else d.payload+=" ";d.payload&&e.nestedCues.push(d),a!==o&&(d=ad(r,i),e.nestedCues.push(d)),d=id(r,i,s,l,u,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function id(e,t,n,r,i,a){return e=new ve(e,t,""),n&&e.textDecoration.push("underline"),r&&(e.fontStyle="italic"),e.color=i,e.backgroundColor=a,e}function ad(e,t){return(e=new ve(e,t,"")).lineBreak=!0,e}function od(e,t,n,r,i){this.g=e,this.l=t,this.i=n,this.h=r,this.j=i}function sd(e,t){this.i=[],this.g=1,this.h=0,this.u=e,this.s=t,this.j=this.m=!1,this.l="white",this.o="black",ud(this)}function ld(e,t,n){var r="CC"+(e.u<<1|e.s+1),i=new ve(t,n,"");i.lineInterpretation=1;var a=Ed.get(e.g);return a&&(i.line=a),rd(i,r,e.i,t,n)}function ud(e){pd(e,0,15),e.g=1}function cd(e,t,n){if(!(32>n||127<n)){var r="";switch(t){case hd:r=vd.has(n)?vd.get(n):String.fromCharCode(n);break;case fd:r=md.get(n);break;case gd:e.i[e.g].pop(),r=bd.get(n);break;case yd:e.i[e.g].pop(),r=_d.get(n)}r&&e.i[e.g].push(new od(r,e.m,e.j,e.o,e.l))}}function dd(e,t,n,r){if(!(0>n||0>t))if(t>=n)for(--r;0<=r;r--)e.i[t+r]=e.i[n+r].map((function(e){return e}));else for(var i=0;i<r;i++)e.i[t+i]=e.i[n+i].map((function(e){return e}))}function pd(e,t,n){for(var r=0;r<=n;r++)e.i[t+r]=[]}var hd=0,fd=1,gd=2,yd=3,vd=new Map([[39,"’"],[42,"á"],[92,"é"],[92,"é"],[94,"í"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ñ"],[126,"ñ"],[127,"█"]]),md=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"™"],[53,"¢"],[54,"£"],[55,"♪"],[56,"à"],[57,"⠀"],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),bd=new Map([[32,"Á"],[33,"É"],[34,"Ó"],[35,"Ú"],[36,"Ü"],[37,"ü"],[38,"‘"],[39,"¡"],[40,"*"],[41,"'"],[42,"─"],[43,"©"],[44,"℠"],[45,"·"],[46,"“"],[47,"”"],[48,"À"],[49,"Â"],[50,"Ç"],[51,"È"],[52,"Ê"],[53,"Ë"],[54,"ë"],[55,"Î"],[56,"Ï"],[57,"ï"],[58,"Ô"],[59,"Ù"],[60,"ù"],[61,"Û"],[62,"«"],[63,"»"]]),_d=new Map([[32,"Ã"],[33,"ã"],[34,"Í"],[35,"Ì"],[36,"ì"],[37,"Ò"],[38,"ò"],[39,"Õ"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ä"],[49,"ä"],[50,"Ö"],[51,"ö"],[52,"ß"],[53,"¥"],[54,"¤"],[55,"│"],[56,"Å"],[57,"å"],[58,"Ø"],[59,"ø"],[60,"┌"],[61,"┐"],[62,"└"],[63,"┘"]]),Ed=new Map([[1,10],[2,15.33],[3,20.66],[4,26],[5,31.33],[6,36.66],[7,42],[8,47.33],[9,52.66],[10,58],[11,63.33],[12,68.66],[13,74],[14,79.33],[15,84.66]]);function kd(e,t){this.h=Sd,this.o=new sd(e,t),this.i=new sd(e,t),this.g=this.j=new sd(e,t),this.l=0,this.m=null}function Td(e,t,n){e.g=e.i;var r=e.g,i=null;return e.h!==xd&&e.h!==Id&&(i=ld(r,e.l,n),(n=e.i).g=0<n.h?n.h:0,pd(n,0,15),(n=e.j).g=0<n.h?n.h:0,pd(n,0,15),r.g=15),e.h=xd,r.h=t,i}function Ad(e){e.h=Cd,e.g=e.j,e.g.h=0}function wd(e){Y("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.o,e.h=Id}var Sd=0,Cd=1,xd=3,Id=4,Pd="black green blue cyan red yellow magenta black".split(" "),Dd="white green blue cyan red yellow magenta white_italics".split(" ");function Rd(e,t){this.I=t,this.N=e,this.J=this.l=!1,this.m=this.o=this.G=this.K=this.H=0,this.F=jd,this.i=[],this.g=this.h=this.j=0,this.C=this.u=!1,this.A="white",this.s="black",Ld(this)}function Ld(e){e.i=[];for(var t=0;16>t;t++)e.i.push(Od())}function Od(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function Md(e,t){Nd(e)&&(e.i[e.h][e.g]=new od(t,e.C,e.u,e.s,e.A),e.g++)}function Nd(e){var t=e.g<e.m&&0<=e.g;return e.h<e.o&&0<=e.h&&t}function Ud(e,t,n){var r=new ve(e.j,t,"");r.textAlign=e.F===Fd?"left":e.F===Bd?"right":Ee;var i=r.region;switch(e.I&&(i.id+="svc"+e.I),i.id+="win"+e.N,i.height=e.o,i.width=e.m,i.heightUnits=2,i.widthUnits=2,i.viewportAnchorX=e.H,i.viewportAnchorY=e.K,i.viewportAnchorUnits=e.J?Ne:2,e.G){case Hd:i.regionAnchorX=0,i.regionAnchorY=0;break;case Vd:i.regionAnchorX=50,i.regionAnchorY=0;break;case Gd:i.regionAnchorX=100,i.regionAnchorY=0;break;case Kd:i.regionAnchorX=0,i.regionAnchorY=50;break;case zd:i.regionAnchorX=50,i.regionAnchorY=50;break;case Wd:i.regionAnchorX=100,i.regionAnchorY=50;break;case Yd:i.regionAnchorX=0,i.regionAnchorY=100;break;case qd:i.regionAnchorX=50,i.regionAnchorY=100;break;case Xd:i.regionAnchorX=100,i.regionAnchorY=100}return(n=rd(r,"svc"+n,e.i,e.j,t))&&(e.j=t),n}Rd.prototype.isVisible=function(){return this.l};var Fd=0,Bd=1,jd=2,Hd=0,Vd=1,Gd=2,Kd=3,zd=4,Wd=5,Yd=6,qd=7,Xd=8;function Qd(){this.i=[],this.h=null,this.g=0}function $d(e,t){3===t.type?(e.g=2*(63&t.value)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),0===e.g&&(e.i.push(new Jd(e.h)),e.h=null,e.g=0))}function Jd(e){this.g=0,this.h=e}function Zd(e){if(!e.ja())throw new ut(2,2,3e3);return e.h[e.g++]}function ep(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function tp(e,t,n,r){if(128<=n&&135>=n)r=7&n,e.h[r]&&(e.g=e.h[r]);else{if(136===n){n=Zd(t).value,t=null;for(var i=(n=u(np(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=Ud(i,r,e.i)),Ld(i);return t}if(137===n)for(n=(t=u(np(e,t=Zd(t).value))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=r),n.l=!0;else{if(138===n){for(n=Zd(t).value,t=null,i=(n=u(np(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=Ud(i,r,e.i)),i.l=!1;return t}if(139===n){for(n=Zd(t).value,t=null,i=(n=u(np(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()?t=Ud(i,r,e.i):i.j=r,i.l=!i.l;return t}if(140===n)return rp(e,t=Zd(t).value,r);if(143===n)return r=rp(e,255,r),ip(e),r;if(144===n)t.skip(1),r=Zd(t).value,e.g&&(e.g.u=0<(128&r),e.g.C=0<(64&r));else if(145===n)r=Zd(t).value,n=Zd(t).value,t.skip(1),e.g&&(t=ap((48&n)>>4,(12&n)>>2,3&n),e.g.A=ap((48&r)>>4,(12&r)>>2,3&r),e.g.s=t);else if(146===n)r=Zd(t).value,t=Zd(t).value,e.g&&((e=e.g).h=15&r,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),r=Zd(t).value,t.skip(1),e.g&&(e.g.F=3&r);else if(152<=n&&159>=n){if(n=(15&n)-8,!(i=null!==e.h[n])){var a=new Rd(n,e.i);a.j=r,e.h[n]=a}r=Zd(t).value,a=Zd(t).value;var o=Zd(t).value,s=Zd(t).value,l=Zd(t).value;t=Zd(t).value,i&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.C=!1,t.u=!1,t.A="white",t.s="black"),(t=e.h[n]).l=0<(32&r),t.K=127&a,t.H=o,t.G=(240&s)>>4,t.J=0<(128&a),t.o=1+(15&s),t.m=1+(63&l),e.g=e.h[n]}}}return null}function np(e,t){for(var n=[],r=0;8>r;r++)1==(1&t)&&e.h[r]&&n.push(r),t>>=1;return n}function rp(e,t,n){for(var r=null,i=(t=u(np(e,t))).next();!i.done;i=t.next()){i=i.value;var a=e.h[i];a.isVisible()&&(r=Ud(a,n,e.i)),e.h[i]=null}return r}function ip(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function ap(e,t,n){var r={0:0,1:0,2:1,3:1};return sp[(e=r[e])<<2|(t=r[t])<<1|(n=r[n])]}Jd.prototype.ja=function(){return this.g<this.h.length},Jd.prototype.qa=function(){return this.g},Jd.prototype.skip=function(e){if(this.g+e>this.h.length)throw new ut(2,2,3e3);this.g+=e};var op=new Map([[32," "],[33," "],[37,"…"],[42,"Š"],[44,"Œ"],[48,"█"],[49,"‘"],[50,"’"],[51,"“"],[52,"”"],[53,"•"],[57,"™"],[58,"š"],[60,"œ"],[61,"℠"],[63,"Ÿ"],[118,"⅛"],[119,"⅜"],[120,"⅝"],[121,"⅞"],[122,"│"],[123,"┐"],[124,"└"],[125,"─"],[126,"┘"],[127,"┌"]]),sp="black blue green cyan red magenta yellow white".split(" ");function lp(){this.h=[],this.g=[],this.i=new Qd,this.l=0,this.m=new Map([["CC1",new kd(0,0)],["CC2",new kd(0,1)],["CC3",new kd(1,0)],["CC4",new kd(1,1)]]),this.s=this.o=0,this.j=new Map,this.A=!0,this.u=new Set,up(this)}function up(e){e.o=0,e.s=0;for(var t=u(e.m.values()),n=t.next();!n.done;n=t.next())(n=n.value).h=Sd,n.g=n.j,n.m=null,ud(n.i),ud(n.j),ud(n.o);e.A=!0}function cp(e,t){var n=t.type;if(16==(112&t.Pa)){var r=t.Pa>>3&1;0===n?e.o=r:e.s=r}if(r="CC"+(n<<1|(n?e.s:e.o)+1),n=e.m.get(r),255===t.Pa&&255===t.ib||!t.Pa&&!t.ib||!pp(t.Pa)||!pp(t.ib))return 45<=++e.l&&up(e),null;if(e.l=0,t.Pa&=127,t.ib&=127,!t.Pa&&!t.ib)return null;if(e.u.add(r),e=null,16==(112&t.Pa))e:{if(r=t.Pa,e=t.ib,n.m===(r<<8|e))n.m=null;else if(n.m=r<<8|e,16==(240&r)&&64==(192&e)){t=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&r)<<1|e>>5&1];var i=(30&e)>>1;r="white";var a=!1;7>i?r=Dd[i]:7===i&&(a=!0),e=1==(1&e),n.h!==Id&&(i=n.g,n.h===xd&&t!==i.g&&(dd(i,n=1+t-i.h,1+i.g-i.h,i.h),pd(i,0,n-1),pd(i,t+1,15-t)),i.g=t,i.m=e,i.j=a,i.l=r,i.o="black")}else if(17==(247&r)&&32==(240&e))n.g.m=!1,n.g.j=!1,n.g.l="white",cd(n.g,hd,32),r=!1,"white_italics"===(t=Dd[(14&e)>>1])&&(t="white",r=!0),n.g.m=1==(1&e),n.g.j=r,n.g.l=t;else if(16==(247&r)&&32==(240&e)||23==(247&r)&&45==(255&e))t="black",0==(7&r)&&(t=Pd[(14&e)>>1]),n.g.o=t;else if(17==(247&r)&&48==(240&e))cd(n.g,fd,e);else if(18==(246&r)&&32==(224&e))cd(n.g,1&r?yd:gd,e);else if(20==(246&r)&&32==(240&e)){switch(e=t.pts,r=null,t.ib){case 32:Ad(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:r=Td(n,2,e);break;case 38:r=Td(n,3,e);break;case 39:r=Td(n,4,e);break;case 40:cd(n.g,hd,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.l=e;break;case 42:ud(n.o),wd(n);break;case 43:wd(n);break;case 44:t=n.i,r=null,n.h!==Id&&(r=ld(t,n.l,e)),pd(t,0,15);break;case 45:t=n.g,n.h!==xd?r=null:(r=ld(t,n.l,e),dd(t,(a=t.g-t.h+1)-1,a,t.h),pd(t,0,a-1),pd(t,t.g,15-t.g),n.l=e);break;case 46:pd(n.j,0,15);break;case 47:t=null,n.h!==Id&&(t=ld(n.i,n.l,e)),r=n.j,n.j=n.i,n.i=r,Ad(n),n.l=e,r=t}e=r;break e}e=null}else r=t.ib,cd(n.g,hd,t.Pa),cd(n.g,hd,r);return e}function dp(e,t){var n=[];try{for(;t.ja();){var r=Zd(t).value,i=(224&r)>>5,a=31&r;if(7===i&&0!=a&&(i=63&Zd(t).value),0!=i){e.u.add("svc"+i),e.j.has(i)||e.j.set(i,new ep(i));for(var o=e.j.get(i),s=t.qa();t.qa()-s<a;){var l=Zd(i=t),u=l.value,c=l.pts;if(16===u)u=u<<16|Zd(i).value;if(0<=u&&31>=u){var d=c;if(o.g){var p=o.g;switch(i=null,u){case 8:!Nd(p)||0>=p.g&&0>=p.h||(0>=p.g?(p.g=p.m-1,p.h--):p.g--,p.i[p.h][p.g]=null);break;case 13:if(p.isVisible()&&(i=Ud(p,d,o.i)),p.h+1>=p.o){d=p;for(var h=0,f=1;16>f;f++,h++)d.i[h]=d.i[f];for(f=0;1>f;f++,h++)d.i[h]=Od()}else p.h++;p.g=0;break;case 14:p.isVisible()&&(i=Ud(p,d,o.i)),p.i[p.h]=Od(),p.g=0;break;case 12:p.isVisible()&&(i=Ud(p,d,o.i)),Ld(p),(d=p).h=0,d.g=0}var g=i}else g=null}else if(128<=u&&159>=u)g=tp(o,i,u,c);else{if(4096<=u&&4127>=u)8<=(d=255&u)&&15>=d?i.skip(1):16<=d&&23>=d?i.skip(2):24<=d&&31>=d&&i.skip(3);else if(4224<=u&&4255>=u)128<=(d=255&u)&&135>=d?i.skip(4):136<=d&&143>=d&&i.skip(5);else if(32<=u&&127>=u)i=u,o.g&&Md(o.g,127===i?"♪":String.fromCharCode(i));else if(160<=u&&255>=u)o.g&&Md(o.g,String.fromCharCode(u));else if(4128<=u&&4223>=u){if(i=255&u,o.g)if(op.has(i)){var y=op.get(i);Md(o.g,y)}else Md(o.g,"_")}else 4256<=u&&4351>=u&&o.g&&Md(o.g,160!=(255&u)?"_":"[CC]");g=null}(i=g)&&n.push(i)}}}}catch(e){if(!(e instanceof ut&&3e3===e.code))throw e;Y("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function pp(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function hp(e){for(var t=[],n=e,r=e=0;r<n.length;)2==e&&3==n[r]?(e=0,(n=[].concat(c(n))).splice(r,1),n=new Uint8Array(n)):0==n[r]?e++:e=0,r++;for(e=n,r=0;r<e.length;){for(n=0;255==e[r];)n+=255,r++;n+=e[r++];for(var i=0;255==e[r];)i+=255,r++;i+=e[r++],4==n&&t.push(e.subarray(r,r+i)),r+=i}return t}function fp(){this.j=new Map,this.i=this.h=0,this.g=gp}lp.prototype.clear=function(){this.l=0,this.h=[],this.g=[];var e=this.i;e.i=[],e.h=[],e.g=0,up(this);for(var t=(e=u(this.j.values())).next();!t.done;t=e.next())ip(t.value)},lp.prototype.extract=function(e,t){if(this.A){for(var n=u(this.m.values()),r=n.next();!r.done;r=n.next())r.value.l=t;this.A=!1}if(!(8>(e=new zr(e,0)).getLength())&&181===e.ea()&&49===e.Ba()&&1195456820===e.L()&&3===e.ea()&&0!=(64&(n=e.ea())))for(n&=31,e.skip(1),r=0;r<n;r++){var i=e.ea(),a=(4&i)>>2,o=e.ea(),s=e.ea();a&&(0===(i&=3)||1===i?this.h.push({pts:t,type:i,Pa:o,ib:s,order:this.h.length}):(this.g.push({pts:t,type:i,value:o,order:this.g.length}),this.g.push({pts:t,type:2,value:s,order:this.g.length})))}},lp.prototype.decode=function(){function e(e,t){return e.pts-t.pts||e.order-t.order}var t=[];this.h.sort(e),this.g.sort(e);for(var n=u(this.h),r=n.next();!r.done;r=n.next())(r=cp(this,r.value))&&t.push(r);for(r=(n=u(this.g)).next();!r.done;r=n.next())$d(this.i,r.value);for(r=(n=u(this.i.i)).next();!r.done;r=n.next())r=dp(this,r.value),t.push.apply(t,c(r));return this.i.i=[],this.h=[],this.g=[],t},lp.prototype.getStreams=function(){return Array.from(this.u)},j("shaka.cea.CeaDecoder",lp),pe=function(){return new lp},fp.prototype.init=function(e){function t(e){(e=e.name)in mp&&(n.g=mp[e])}var n=this,r=[],i=[];if((new qr).box("moov",Xr).box("mvex",Xr).P("trex",(function(e){var t=e.reader;t.skip(4),t.skip(4),e=t.L(),t=t.L(),n.h=e,n.i=t})).box("trak",Xr).P("tkhd",(function(e){e=Ra(e.reader,e.version),r.push(e.trackId)})).box("mdia",Xr).P("mdhd",(function(e){e=Pa(e.reader,e.version),i.push(e.timescale)})).box("minf",Xr).box("stbl",Xr).P("stsd",Qr).box("avc1",t).box("avc3",t).box("hev1",t).box("hvc1",t).box("dvh1",t).box("dvhe",t).box("encv",$r).box("sinf",Xr).box("frma",(function(e){(e=Oa(e.reader).ia)in mp&&(n.g=mp[e])})).parse(e,!0),!r.length||!i.length||r.length!=i.length)throw new ut(2,2,2010);this.g==gp&&W("Unable to determine bitstream format for CEA parsing!"),r.forEach((function(e,t){n.j.set(e,i[t])}))},fp.prototype.parse=function(e){var t=this;if(this.g==gp)return[];var n=[],r=this.h,i=this.i,a=0,o=[],s=null,l=9e4;return(new qr).box("moof",(function(e){a=e.start,o=[],Xr(e)})).box("traf",Xr).P("trun",(function(e){e=Da(e.reader,e.version,e.flags),o.push(e)})).P("tfhd",(function(e){e=xa(e.reader,e.flags),r=e.Df||t.h,i=e.Eg||t.i,e=e.trackId,t.j.has(e)&&(l=t.j.get(e))})).P("tfdt",(function(e){s=Ia(e.reader,e.version).baseMediaDecodeTime})).box("mdat",(function(e){if(null===s)throw W("Unable to find base media decode time for CEA captions!"),new ut(2,2,2010);!function(e,t,n,r,i,a,o,s,l){var d=0,p=a,h=s.map((function(e){return e.bg}));for((h=[].concat.apply([],c(h))).length&&(p=h[0].sampleSize||a),t.skip(o+s[0].Dg);t.ja();){o=t.L();var f=t.ea(),g=null;switch(g=!1,s=1,e.g){case yp:g=6==(g=31&f);break;case vp:s=2,t.skip(1),g=39==(g=f>>1&63)||40==g;break;default:return}if(g)for(f=0,d<h.length&&(f=h[d].Rd||0),f=(n+f)/r,s=u(hp(t.pb(o-s))),g=s.next();!g.done;g=s.next())l.push({packet:g.value,pts:f});else try{t.skip(o-s)}catch(e){break}0==(p-=o+4)&&(n=d<h.length?n+(h[d].cf||i):n+i,d++,p=d<h.length&&h[d].sampleSize||a)}}(t,e.reader,s,l,r,i,a-e.start-8,o,n)})).parse(e,!1),n},j("shaka.cea.Mp4CeaParser",fp);var gp=0,yp=1,vp=2,mp={avc1:yp,avc3:yp,hev1:vp,hvc1:vp,dvh1:vp,dvhe:vp};function bp(){}function _p(t,n,r){var i=function(e){for(var t=[],n=(e=u(e)).next();!n.done;n=e.next())(n=kp(n.value))&&t.push(n);return t}(t),a=null;t=[];var o=[],s=null,l=new Set(i.map((function(e){return e.keyId})));if(l.delete(null),1<l.size)throw new ut(2,4,4010);if(!n){if(1<(o=i.filter((function(e){return"urn:mpeg:dash:sea:2012"==e.ad}))).length)throw new ut(2,4,4050);o.length&&(s=function(t){if(!e.crypto||!e.crypto.subtle)throw W("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new ut(2,4,4042);var n=fi(t.node,"urn:mpeg:dash:schema:sea:2012","SegmentEncryption");if(!n)throw new ut(2,4,4051);if("urn:mpeg:dash:sea:aes128-cbc:2013"!=n.getAttribute("schemeIdUri"))throw new ut(2,4,4051);if(!(n=fi(t.node,"urn:mpeg:dash:schema:sea:2012","CryptoPeriod")))throw new ut(2,4,4051);if(t=n.getAttribute("IV"),n=n.getAttribute("keyUriTemplate"),!t||!n)throw new ut(2,4,4051);if(16!=(t=li(t.substr(2))).byteLength)throw new ut(2,4,4048);return{qh:n,iv:t}}(o[0])),(o=i.filter((function(e){return"urn:mpeg:dash:mp4protection:2011"==e.ad?(a=e.init||a,!1):"urn:mpeg:dash:sea:2012"!=e.ad}))).length&&(0==(t=function(e,t,n,r){for(var i=[],a=(t=u(t)).next();!a.done;a=t.next()){a=a.value;var o=n[a.ad];if(o){var s;if(s=fi(a.node,"urn:microsoft:playready","pro")){s=si(s.textContent);var l=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);s=[{initData:pi(s,l,new Set,0),initDataType:"cenc",keyId:a.keyId}]}else s=null;if(l=null,"urn:uuid:e2719d58-a985-b3c9-781a-b030af78d30e"===a.ad)if(0==(l=r).size)l=null;else{var c=new Uint8Array([16,119,239,236,192,178,77,2,172,227,60,30,82,226,251,75]),d=new Uint8Array([]);l=[{initData:pi(d,c,l,1),initDataType:"cenc",keyId:a.keyId}]}s=pt(o,a.init||e||s||l),(o=Ap.get(o))&&(s.licenseServerUri=o(a)),i.push(s)}}return i}(a,o,r,l)).length&&(t=[pt("",a)]))}if(i.length&&!s&&(n||!o.length))for(t=[],r=(n=u(Object.values(r))).next();!r.done;r=n.next())"org.w3.clearkey"!=(r=r.value)&&t.push(pt(r,a));if(l=Array.from(l)[0]||null)for(r=(n=u(t)).next();!r.done;r=n.next())for(i=(r=u(r.value.initData)).next();!i.done;i=r.next())i.value.keyId=l;return{Cf:l,Ri:a,drmInfos:t,ee:s,Gf:!0}}function Ep(e){var t=fi(e.node,"https://dashif.org/CPS","Laurl");return t&&t.textContent?t.textContent:(e=fi(e.node,"urn:microsoft:playready","pro"))&&(e=function(e){var t=0,n=se(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,0!=(1&i)||i+e>n.byteLength){n=[];break e}var a=ae(n,e,i);t.push({type:r,value:a}),e+=i}n=t}return n}(e=si(e.textContent)).filter((function(e){return e.type===Tp}))[0])&&(e=Di(e=jr(e.value,!0),"WRMHEADER"))?function(e){for(var t=(e=u(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())for(var n=(t=u(t.value.childNodes)).next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent;return""}(e):""}function kp(e){var t=e.getAttribute("schemeIdUri"),n=vi(e,"urn:mpeg:cenc:2013","default_KID"),r=yi(e,"urn:mpeg:cenc:2013","pssh").map(bi);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new ut(2,4,4009);var i=[];try{i=r.map((function(e){return{initDataType:"cenc",initData:si(e),keyId:null}}))}catch(e){throw new ut(2,4,4007)}return{node:e,ad:t,keyId:n,init:0<i.length?i:null}}de["video/mp4"]=function(){return new fp},bp.prototype.init=function(){},bp.prototype.parse=function(e){var t=[];if(!Xa(e=ae(e)))return t;var n=(e=(new Ya).parse(e)).Lc(),r=e.Dd();switch(e=[],n.video){case"avc":e.push(6);break;case"hvc":e.push(39),e.push(40)}if(!e.length)return t;for(r=(n=u(r)).next();!r.done;r=n.next())if(r=r.value,e.includes(r.type)&&null!=r.time)for(var i=u(hp(r.data)),a=i.next();!a.done;a=i.next())t.push({packet:a.value,pts:r.time});return t},j("shaka.cea.TsCeaParser",bp),de["video/mp2t"]=function(){return new bp};var Tp=1,Ap=(new Map).set("com.widevine.alpha",(function(e){var t=fi(e.node,"https://dashif.org/CPS","Laurl");return t&&t.textContent?t.textContent:(e=fi(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",Ep).set("com.microsoft.playready.recommendation",Ep).set("com.microsoft.playready.software",Ep).set("com.microsoft.playready.hardware",Ep).set("org.w3.clearkey",(function(e){var t=fi(e.node,"https://dashif.org/CPS","Laurl");return t&&t.textContent?t.textContent:(e=fi(e.node,"http://dashif.org/guidelines/clearKey","Laurl"))&&"EME-1.0"===e.getAttribute("Lic_type")&&e.textContent?e.textContent:""}));function wp(t,n,r,i,a,o){var s={RepresentationID:n,Number:r,SubNumber:i,Bandwidth:a,Time:o};return t.replace(/\$(RepresentationID|Number|SubNumber|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,n,r,i){if("$$"==t)return"$";var a=s[n];if(null==a)return t;switch("RepresentationID"==n&&r&&(r=void 0),"Time"==n&&"bigint"!=typeof a&&(.2<=Math.abs(a-Math.round(a))&&W("Calculated $Time$ values must be close to integers"),a=Math.round(a)),i){case void 0:case"d":case"i":case"u":t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase();break;default:t=a.toString()}return r=e.parseInt(r,10)||1,Array(Math.max(0,r-t.length)+1).join("0")+t}))}function Sp(e,t){var n=xp(e,t,"timescale"),r=1;n&&(r=Si(n)||1);var i=xp(e,t,"duration");n=Si(i||""),"image"==e.M.contentType&&(n=xi(i||"")),n&&(n/=r);var a=xp(e,t,"startNumber");i=Number(xp(e,t,"presentationTimeOffset"))||0;var o=Ci(a||"");null!=a&&null!=o||(o=1);var s=Ip(e,t,"SegmentTimeline");if(t=null,s){t=r,e=e.ba.duration||1/0,a=o,s=gi(s,"S");for(var l=[],u=-i,c=0;c<s.length;++c){var d=s[c],p=s[c+1],h=Ei(d,"t",Ci),f=Ei(d,"d",Ci),g=Ei(d,"r",wi);if(d=Ei(d,"k",wi)||0,null!=h&&(h-=i),!f)break;if(h=null!=h?h:u,0>(g=g||0))if(p){if(null==(p=Ei(p,"t",Ci)))break;if(h>=p)break;g=Math.ceil((p-h)/f)-1}else{if(1/0==e)break;if(h/t>=e)break;g=Math.ceil((e*t-h)/f)-1}for(0<l.length&&h!=u&&(l[l.length-1].end=h/t),p=0;p<=g;++p)u=h+f,l.push({start:h/t,end:u/t,rf:h,$a:d,Kh:l.length+a}),h=u}t=l}return{timescale:r,va:n,ed:o,qb:i/r||0,qf:i,timeline:t}}function Cp(e,t){return[t(e.M),t(e.oa),t(e.sa)].filter(Mt)}function xp(e,t,n){t=Cp(e,t),e=null;for(var r=(t=u(t)).next();!r.done&&!(e=r.value.getAttribute(n));r=t.next());return e}function Ip(e,t,n){t=Cp(e,t),e=null;for(var r=(t=u(t)).next();!r.done&&!(e=hi(r.value,n));r=t.next());return e}function Pp(e,t,n,r,i,a){if(a=void 0===a?0:a,vi(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,r,i,a){for(var o=vi(e,"http://www.w3.org/1999/xlink","href"),s=vi(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=u(Array.from(e.attributes)),c=l.next();!c.done;c=l.next())"http://www.w3.org/1999/xlink"==(c=c.value).namespaceURI&&e.removeAttributeNS(c.namespaceURI,c.localName);if(5<=a)return lr(new ut(2,4,4028));if("onLoad"!=s)return lr(new ut(2,4,4027));var d=dt([r],[o]);return i.request(0,Er(d,t)).pa((function(r){if(!(r=Ri(r.data,e.tagName)))return lr(new ut(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;r.childNodes.length;){var s=r.childNodes[0];r.removeChild(s),e.appendChild(s)}for(s=(r=u(Array.from(r.attributes))).next();!s.done;s=r.next())e.setAttributeNode(s.value.cloneNode(!1));return Pp(e,t,n,d[0],i,a+1)}))}(e,t,n,r,i,a);return n&&(o=o.pa(void 0,(function(){return Pp(e,t,n,r,i,a)}))),o}o=[];for(var s=u(Array.from(e.childNodes)),l=s.next();!l.done;l=s.next())(l=l.value)instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==vi(l,"http://www.w3.org/1999/xlink","href")?e.removeChild(l):"SegmentTimeline"!=l.tagName&&o.push(Pp(l,t,n,r,i,a)));return pr(o).pa((function(){return e}))}function Dp(e,t,n,r,i,a,o){var s,l=(new qr).P("sidx",(function(e){s=function(e,t,n,r,i,a,o){var s=[];o.reader.skip(4);var l=o.reader.L();if(0==l)throw new ut(2,3,3005);if(0==o.version)var u=o.reader.L(),c=o.reader.L();else u=o.reader.jc(),c=o.reader.jc();o.reader.skip(2);var d=o.reader.Ba();for(e=e+o.size+c,c=0;c<d;c++){var p=o.reader.L(),h=(2147483648&p)>>>31;p&=2147483647;var f=o.reader.L();if(o.reader.skip(4),1==h)throw new ut(2,3,3006);s.push(new fa(u/l+n,(u+f)/l+n,(function(){return a}),e,e+p-1,t,n,r,i)),u+=f,e+=p}return o.parser.stop(),s}(t,r,i,a,o,n,e)}));if(e&&l.parse(e),s)return s;throw new ut(2,3,3004)}function Rp(e){this.h=se(e),this.g=new zr(this.h,0)}function Lp(e){var t=Op(e);if(7<t.length)throw new ut(2,3,3002);for(var n=0,r=(t=u(t)).next();!r.done;r=t.next())n=256*n+r.value;t=Op(e);e:{for(var i=(r=u(Mp)).next();!i.done;i=r.next())if(ne(t,new Uint8Array(i.value))){r=!0;break e}r=!1}if(r)t=e.h.byteLength-e.g.qa();else{if(8==t.length&&224&t[1])throw new ut(2,3,3001);for(i=r=0;i<t.length;i++){var a=t[i];r=0==i?a&(1<<8-t.length)-1:256*r+a}t=r}return t=e.g.qa()+t<=e.h.byteLength?t:e.h.byteLength-e.g.qa(),r=se(e.h,e.g.qa(),t),e.g.skip(t),new Np(n,r)}function Op(e){var t=e.g.qa(),n=e.g.ea();if(0==n)throw new ut(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),ae(e.h,t,n)}Rp.prototype.ja=function(){return this.g.ja()};var Mp=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Np(e,t){this.id=e,this.g=t}function Up(e){if(8<e.g.byteLength)throw new ut(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new ut(2,3,3001);for(var t=0,n=0;n<e.g.byteLength;n++){t=256*t+e.g.getUint8(n)}return t}function Fp(e){var t=new Rp(e.g);if(179!=(e=Lp(t)).id)throw new ut(2,3,3013);if(e=Up(e),183!=(t=Lp(t)).id)throw new ut(2,3,3012);t=new Rp(t.g);for(var n=0;t.ja();){var r=Lp(t);if(241==r.id){n=Up(r);break}}return{Uh:e,Ch:n}}function Bp(e,t,n){if(!(t=Ip(e,t,"Initialization")))return null;var r=e.M.Za(),i=t.getAttribute("sourceURL");i&&(r=dt(r,[i])),i=0;var a=null;return(t=Ei(t,"range",Ai))&&(i=t.start,a=t.end),new pa((function(){return r}),i,a,zp(e),null,null,n)}function jp(e,t,n){var r=Number(xp(e,Vp,"presentationTimeOffset"))||0,i=xp(e,Vp,"timescale"),a=1;i&&(a=Si(i)||1);var o=r/a||0,s=Bp(e,Vp,n);!function(e,t){if(Kp(e,t),!Gp(e))throw new ut(2,4,4002)}(e,s);var l=qt(e);return{bc:function(){var e=Ip(l,Vp,"RepresentationIndex"),n=l.M.Za();return e&&(e=e.getAttribute("sourceURL"))&&(n=dt(n,[e])),e=Gp(l),Hp(l,t,s,n,e.start,e.end,o)}}}function Hp(e,t,n,r,i,a,o){var s,l,u,c,d,p,h,f,g,y,v,m,b,E,k;return R((function(T){if(1==T.g)return s=e.presentationTimeline,l=!e.vb||!e.ba.Fe,u=e.ba.start,c=e.ba.duration,d=e.M.mimeType.split("/")[1],h=null,f=[(p=t)(r,i,a,!1),"webm"==d?p(n.Y(),n.Na,n.ta,!0):null],p=null,_(T,Promise.all(f),2);if(g=T.h,y=g[0],v=g[1]||null,null,b=u-o,E=u,k=c?u+c:1/0,"mp4"==d)var A=Dp(y,i,r,n,b,E,k);else{if(440786851!=Lp(A=new Rp(v)).id)throw new ut(2,3,3008);var w=Lp(A);if(408125543!=w.id)throw new ut(2,3,3009);A=w.g.byteOffset,w=new Rp(w.g);for(var S=null;w.ja();){var C=Lp(w);if(357149030==C.id){S=C;break}}if(!S)throw new ut(2,3,3010);for(S=new Rp(S.g),C=1e6,w=null;S.ja();){var x=Lp(S);if(2807729==x.id)C=Up(x);else if(17545==x.id)if(4==x.g.byteLength)w=x.g.getFloat32(0);else{if(8!=x.g.byteLength)throw new ut(2,3,3003);w=x.g.getFloat64(0)}}if(null==w)throw new ut(2,3,3011);if(w*=S=C/1e9,475249515!=(C=Lp(new Rp(y))).id)throw new ut(2,3,3007);A=function(e,t,n,r,i,a,o,s,l){function u(){return i}var c=[];e=new Rp(e.g);for(var d=null,p=null;e.ja();){var h=Lp(e);if(187==h.id){var f=Fp(h);f&&(h=n*f.Uh,f=t+f.Ch,null!=d&&c.push(new fa(d+o,h+o,u,p,f-1,a,o,s,l)),d=h,p=f)}}return null!=d&&c.push(new fa(d+o,r+o,u,p,null,a,o,s,l)),c}(C,A,S,w,r,n,b,E,k)}return m=A,s.Wc(m),h=new Qo(m),l&&h.$b(E,k,!0),T.return(h)}))}function Vp(e){return e.cd}function Gp(e){var t=Ip(e,Vp,"RepresentationIndex");return e=Ai((e=xp(e,Vp,"indexRange"))||""),t&&(e=Ei(t,"range",Ai,e)),e}function Kp(e,t){var n=e.M.mimeType.split("/")[1];if(e.M.contentType!=gt&&"mp4"!=n&&"webm"!=n)throw new ut(2,4,4006);if("webm"==n&&!t)throw new ut(2,4,4005)}function zp(e){var t=e.M;return{bandwidth:e.bandwidth,audioSamplingRate:t.audioSamplingRate,codecs:t.codecs,contentType:t.contentType,frameRate:t.frameRate||null,height:t.height||null,mimeType:t.mimeType,channelsCount:t.Od,pixelAspectRatio:t.pixelAspectRatio||null,width:t.width||null}}function Wp(e,t,n){var r=Bp(e,Yp,n),i=function(e){var t=function(e){return[e.M.Db,e.oa.Db,e.sa.Db].filter(Mt).map((function(e){return gi(e,"SegmentURL")})).reduce((function(e,t){return 0<e.length?e:t})).map((function(t){return t.getAttribute("indexRange")&&!e.Of&&(e.Of=!0),{uh:t.getAttribute("media"),start:(t=Ei(t,"mediaRange",Ai,{start:0,end:null})).start,end:t.end}}))}(e),n=(e=Sp(e,Yp)).ed;0==n&&(n=1);var r=0;return e.va?r=e.va*(n-1):e.timeline&&0<e.timeline.length&&(r=e.timeline[0].start),{va:e.va,startTime:r,ed:n,qb:e.qb,timeline:e.timeline,fc:t}}(e);if(!i.va&&!i.timeline&&1<i.fc.length)throw new ut(2,4,4002);if(!i.va&&!e.ba.duration&&!i.timeline&&1==i.fc.length)throw new ut(2,4,4002);if(i.timeline&&0==i.timeline.length)throw new ut(2,4,4002);var a=null,o=null;e.sa.id&&e.M.id&&(o=t[e.sa.id+","+e.M.id])&&(a=o.segmentIndex);var s=function(e,t,n,r,i,a){var o=r.fc.length;r.timeline&&r.timeline.length!=r.fc.length&&(o=Math.min(r.timeline.length,r.fc.length));for(var s=e-r.qb,l=t?e+t:1/0,u=[],c=r.startTime,d={},p=0;p<o;d={zc:d.zc,wc:d.wc},p++){d.wc=r.fc[p];var h;h=null!=r.va?c+r.va:r.timeline?r.timeline[p].end:c+t,d.zc=null,u.push(new fa(e+c,e+h,function(e){return function(){return null==e.zc&&(e.zc=dt(n(),[e.wc.uh])),e.zc}}(d),d.wc.start,d.wc.end,i,s,e,l,[],"",null,null,ga,a)),c=h}return u}(e.ba.start,e.ba.duration,e.M.Za,i,r,n);return t=!a,a?a.Vc(s,e.presentationTimeline.mb()):a=new Qo(s),e.presentationTimeline.Wc(s),e.vb&&e.ba.Fe||a.$b(e.ba.start,e.ba.duration?e.ba.start+e.ba.duration:1/0,t),o&&(o.segmentIndex=a),{bc:function(){return a&&0!=a.Nb()||a.Ld(s),Promise.resolve(a)}}}function Yp(e){return e.Db}function qp(t,n,r,i,a,o,s){var l=function(e,t){var n=xp(e,Xp,"initialization");if(!n)return null;var r=e.M.id,i=e.bandwidth||null,a=e.M.Za;return new pa((function(){var e=wp(n,r,null,null,i,null);return dt(a(),[e])}),0,null,zp(e),null,null,t)}(t,s),c=function(e){var t=Sp(e,Xp),n=xp(e,Xp,"media");return e=xp(e,Xp,"index"),{va:t.va,timescale:t.timescale,ed:t.ed,qb:t.qb,qf:t.qf,timeline:t.timeline,hc:n,Tc:e}}(t);!function(e){var t=e.Tc?1:0;if(t+=e.timeline?1:0,0==(t+=e.va?1:0))throw new ut(2,4,4002);if(1!=t&&(e.Tc&&(e.timeline=null),e.va=null),!e.Tc&&!e.hc)throw new ut(2,4,4002)}(c);var d=qt(t);if(c.Tc)return Kp(t,l),{bc:function(){var e=wp(c.Tc,d.M.id,null,null,d.bandwidth||null,null);return e=dt(d.M.Za(),[e]),Hp(d,n,l,e,0,null,c.qb)}};if(c.va)return i||"image"===t.oa.contentType||(t.presentationTimeline.Te(c.va),t.presentationTimeline.Nd(t.ba.start)),{bc:function(){return function(t,n,r,i,a,o){function s(t){var r=(t-y)*g,a=r+n.qb,s=r+p;return r=s+g,(s=new fa(s,Math.min(r,c()),(function(){var n=a*v;return"BigInt"in e&&n>Number.MAX_SAFE_INTEGER&&(n=BigInt(a)*BigInt(v)),n=wp(m,_,t,null,b,n),dt(E(),[n])}),0,null,i,k,p,c(),[],"",null,null,ga,o)).i=r,s}function l(){var e=[Math.max(d.mb(),p),Math.min(d.wb(),c())].map((function(e){return e-p}));return[Math.ceil(e[0]/g),Math.ceil(e[1]/g)-1].map((function(e){return e+y}))}function c(){var e=null!=h&&a[h]||f;return e?p+e:1/0}var d=t.presentationTimeline,p=t.ba.start,h=t.sa.id,f=t.ba.duration,g=n.va,y=n.ed,v=n.timescale,m=n.hc,b=t.bandwidth||null,_=t.M.id,E=t.M.Za,k=p-n.qb,T=l();t=t.vb?Math.max(T[0],T[1]-r+1):T[0],T=T[1],r=[];for(var A=t;A<=T;++A){var w=s(A);r.push(w)}var S=new Qo(r);if(r=d.wb()<c(),A=d.S(),r||A){var C=Math.max(t,T+1);S.Td(g,(function(){var e=d.mb();S.Ya(e);var t=u(l());t.next(),t=t.next().value;for(var n=[];C<=t;){var r=s(C);n.push(r),C++}return e>c()&&!n.length?null:n}))}return Promise.resolve(S)}(d,c,a,l,o,s)}};var p=null;i=i=null,t.sa.id&&t.M.id&&(i=r[i=t.sa.id+","+t.M.id])&&(p=i.segmentIndex);var h=t.ba.start,f=t.ba.duration?h+t.ba.duration:1/0,g=!(t.vb&&t.ba.Fe);return p?($p(r=p,c,h,f,g,l),r.Ya(t.presentationTimeline.mb())):p=new Qp(c,t.M.id,t.bandwidth,t.M.Za,h,f,l,g,s,t.M.df),c.timeline&&"image"!==t.oa.contentType&&t.presentationTimeline.Xf(c.timeline,h),i&&t.vb&&(i.segmentIndex=p),{bc:function(){return p instanceof Qp&&0==p.Nb()&&$p(p,c,h,f,g,l),Promise.resolve(p)}}}function Xp(e){return e.dd}function Qp(e,t,n,r,i,a,o,s,l,u){Qo.call(this,[]),this.h=e,this.F=t,this.A=n,this.C=r,this.i=i,this.m=a,this.s=o,this.u=l,this.G=u,s&&Jp(this)}function $p(e,t,n,r,i,a){if(e.s=a,e.h){n=e.h.timeline,e.h.hc=t.hc;var o=n[n.length-1];0<(t=t.timeline.filter((function(e){return e.start>=o.end}))).length&&e.h.timeline.push.apply(e.h.timeline,c(t)),e.m!==r&&(e.m=r)}else e.h=t,e.i=n,e.m=r;i&&Jp(e)}function Jp(e){if(!e.o){for(var t=e.h.timeline;t.length&&t[t.length-1].start>=e.m;)t.pop();e.Ya(e.i),0!==t.length&&1/0!==e.m&&(t[t.length-1].end=e.m-e.i)}}function Zp(e,t,n,r,i,a,o){return e=wp(e,t,n,a,r||null,i),dt(o(),[e]).map((function(e){return e.toString()}))}function eh(e){this.o=null,this.u=e,this.G=new vr,this.j=[],this.h=null,this.m=[],this.A=null,this.F=[],this.C=300,this.l=new Map,this.i=new Map,this.g=null,this.s="UNKNOWN"}function th(e,t){var n,r,i,a,o,s,l;return R((function(u){return 1==u.g?(n=dt(e.j,[nh(e,t)]),r=Er(n,e.o.retryParameters),i=e.u.networkingEngine.request(8,r),mr(e.G,i),k(u,2),_(u,i.promise,4)):2!=u.g?(a=u.h,o=Br(a.data),1==(s=JSON.parse(o)).VERSION&&function(e,t,n){null!=e.g&&(e.g.stop(),e.g=null);var r=t["RELOAD-URI"]||n;e.g=new Qt((function(){th(e,r)})),(n=t.TTL)&&(e.C=n);e.g.U(e.C),e.m=t["PATHWAY-PRIORITY"]||[],e.F=t["PATHWAY-CLONES"]||[]}(e,s,a.uri),A(u,0)):(l=w(u))&&7001==l.code?u.return():(null!=e.g&&(e.g.stop(),e.g=null),e.g=new Qt((function(){th(e,t)})),e.g.U(e.C),void E(u))}))}function nh(e,t){if(!e.m.length)return t;t=new Ye(t);var n=e.A||e.m[0],r=Math.round(e.u.getBandwidthEstimate()),i=t.g;return"DASH"==e.s?(i.add("_DASH_pathway",n),i.add("_DASH_throughput",String(r))):"HLS"==e.s&&(i.add("_HLS_pathway",n),i.add("_HLS_throughput",String(r))),lt(i)&&$e(t,i),t.toString()}function rh(e,t,n,r){var i=e.l.get(t);i||(i=new Map),i.set(n,r),e.l.set(t,i)}function ih(e,t,n){n=void 0!==n&&n,t=e.l.get(t)||new Map;for(var r=[],i={},a=u(e.m),o=a.next();!o.done;i={Gb:i.Gb},o=a.next())if(i.Gb=o.value,o=t.get(i.Gb))r.push({Ze:i.Gb,location:o});else if(o=e.F.find(function(e){return function(t){return t.ki==e.Gb}}(i))){var s=t.get(o["BASE-ID"]);s&&(o["URI-REPLACEMENT"].pg?(Xe(s=new Ye(s),o["URI-REPLACEMENT"].pg),r.push({Ze:i.Gb,location:s.toString()})):r.push({Ze:i.Gb,location:s}))}for(i=Date.now(),o=(a=u(e.i.keys())).next();!o.done;o=a.next())o=o.value,i>(s=e.i.get(o))&&e.i.delete(o);if((r=r.filter((function(t){for(var n=u(e.i.keys()),r=n.next();!r.done;r=n.next())if(r.value.includes(new Ye(t.location).jb))return!1;return!0}))).length&&(e.A=r[0].Ze),!(r=r.map((function(e){return e.location}))).length&&e.h)for(o=(i=u(e.h.split(","))).next();!o.done;o=i.next())(a=t.get(o.value))&&(e.A=e.h,r.push(a));if(!r.length)for(i=(t=u(t.values())).next();!i.done;i=t.next())r.push(i.value);return n?r:dt(e.j,r)}function ah(){this.j=[],this.h=[],this.g=[],this.l=[],this.i=[],this.m=!1,this.o=new Set}function oh(e,t){for(var n=[],r={},i=(e=u(e)).next();!i.done;r={md:r.md},i=e.next())r.md=i.value,n.some(function(e){return function(n){return t(e.md,n)}}(r))||n.push(r.md);return n}function sh(e){var t,n,r,i,a,o,s,l,c,d,p,h,f,g,y,v,m,b,E,k,T,A,w,S,C;return R((function(x){switch(x.g){case 1:if(t=yt,1==e.length)return x.return(e[0]);for(n=e.map((function(e){return e.filter((function(e){return e.type==t.O}))})),r=e.map((function(e){return e.filter((function(e){return e.type==t.$}))})),i=e.map((function(e){return e.filter((function(e){return e.type==t.ha}))})),a=e.map((function(e){return e.filter((function(e){return e.type==t.Cc}))})),o=u(i),s=o.next();!s.done;s=o.next())s.value.push(Sh(t.ha));for(l=u(a),c=l.next();!c.done;c=l.next())c.value.push(Sh(t.Cc));return _(x,lh(d=new ah,[],n,0,hh,gh),2);case 2:return p=x.h,_(x,lh(d,[],r,0,hh,gh),3);case 3:return h=x.h,_(x,lh(d,[],i,0,hh,gh),4);case 4:return f=x.h,_(x,lh(d,[],a,0,hh,gh),5);case 5:if(g=x.h,y=0,h.length&&p.length)for(E=u(p),k=E.next();!k.done;k=E.next())for(T=k.value,A=u(h),w=A.next();!w.done;w=A.next())S=w.value,C=y++,S.variantIds.push(C),T.variantIds.push(C);else for(v=h.concat(p),m=u(v),b=m.next();!b.done;b=m.next())b.value.variantIds=[y++];return x.return(h.concat(p).concat(f).concat(g))}}))}function lh(e,t,n,r,i,a){var o,s,l,c,d,p,h,f,g,y,v,m,b,E,k,T,A,w,S;return R((function(C){switch(C.g){case 1:for(o=yt,s=[],l=0;l<n.length;l++)l>=r?s.push(new Set(n[l])):s.push(new Set);c=u(t),d=c.next();case 2:if(d.done){C.B(4);break}return p=d.value,_(C,function(e,t,n,r,i,a){return R((function(o){return 1==o.g?(yh(e,n,t),t.matchedStreams?t.segmentIndex?_(o,uh(t,r),2):o.B(2):o.return(!1)):(dh(t,r,i,a),o.return(!0))}))}(e,p,n,r,a,s),5);case 5:if(!C.h)throw new ut(2,4,4037);d=c.next(),C.B(2);break;case 4:for(h=u(s),f=h.next();!f.done;f=h.next())for(g=f.value,y=u(g),v=y.next();!v.done;v=y.next())m=v.value,(b=ch(e,m,n,i,a,s))&&t.push(b);for(E=u(s),f=E.next();!f.done;f=E.next())for(k=f.value,T={},A=u(k),v=A.next();!v.done;T={Hb:T.Hb},v=A.next())if(T.Hb=v.value,w=T.Hb.type==o.ha&&!T.Hb.language,S=T.Hb.type==o.Cc&&!T.Hb.tilesLayout,!w&&!S&&t.some(function(t){return function(n){return bh(e,t.Hb,n)}}(T)))throw new ut(2,4,4037);return C.return(t)}}))}function uh(e,t){var n,r,i,a,o,s,l;return R((function(c){if(1==c.g){for(n=[],r=e.matchedStreams,i=u(r),a=i.next();!a.done;a=i.next())o=a.value,n.push(o.createSegmentIndex()),o.trickModeVideo&&!o.trickModeVideo.segmentIndex&&n.push(o.trickModeVideo.createSegmentIndex());return _(c,Promise.all(n),2)}if(e.segmentIndex instanceof es)for(s={},l=t;l<r.length;s={eb:s.eb},l++)s.eb=r[l],s.eb.segmentIndex&&($o(s.eb.segmentIndex,function(e){return function(t){t.codecs=e.eb.codecs,t.mimeType=e.eb.mimeType,t.aa&&(t.aa.codecs=e.eb.codecs,t.aa.mimeType=e.eb.mimeType)}}(s)),e.segmentIndex.h.push(s.eb.segmentIndex));E(c)}))}function ch(e,t,n,r,i,a){var o=r(t);return yh(e,n,o),o.createSegmentIndex&&(o.createSegmentIndex=function(){return R((function(e){return o.segmentIndex?e.B(0):(o.segmentIndex=new es,_(e,uh(o,0),0))}))}),o.matchedStreams&&o.matchedStreams.length?(dh(o,0,i,a),o):null}function dh(e,t,n,r){for(var i=e.matchedStreams;t<i.length;t++){var a=i[t];n(e,a);var o=!0;if("audio"==e.type&&0==Ht(e.language,a.language)&&(o=!1),o){r[t].delete(a),o=new Set(e.codecs.split(","));for(var s=(a=u(a.codecs.split(","))).next();!s.done;s=a.next())o.add(s.value);e.codecs=Array.from(o).join(",")}}}function ph(e){var t=Object.assign({},e);return t.originalId=null,t.createSegmentIndex=function(){return Promise.resolve()},t.closeSegmentIndex=function(){if(t.segmentIndex&&(t.segmentIndex.release(),t.segmentIndex=null),t.matchedStreams)for(var e=u(t.matchedStreams),n=e.next();!n.done;n=e.next())(n=n.value).segmentIndex&&(n.segmentIndex.release(),n.segmentIndex=null)},t.segmentIndex=null,t.emsgSchemeIdUris=[],t.keyIds=new Set,t.closedCaptions=null,t.trickModeVideo=null,t}function hh(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function fh(e,t){var n,r;e.roles=Array.from(new Set(e.roles.concat(t.roles))),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=Array.from(new Set(e.emsgSchemeIdUris.concat(t.emsgSchemeIdUris)))),e.keyIds=(n=e.keyIds,r=t.keyIds,new Set([].concat(c(n),c(r)))),null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||"");var i=$i(e.drmInfos,t.drmInfos);if(t.drmInfos.length&&e.drmInfos.length&&!i.length)throw new ut(2,4,4038);if(e.drmInfos=i,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var a=(i=u(t.closedCaptions)).next();!a.done;a=i.next()){var o=u(a.value);a=o.next().value,o=o.next().value,e.closedCaptions.set(a,o)}}t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=ph(t.trickModeVideo),e.trickModeVideo.createSegmentIndex=function(){return e.trickModeVideo.segmentIndex=e.segmentIndex.clone(),Promise.resolve()}),fh(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&fh(e.trickModeVideo,t)}function gh(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles)));var n=t.keyIds;if(n=new Set([].concat(c(e.keyIds),c(n))),e.keyIds=n,e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,c(t.segments)),t.closedCaptions)for(e.closedCaptions||(e.closedCaptions=new Map),n=(t=u(t.closedCaptions)).next();!n.done;n=t.next()){var r=u(n.value);n=r.next().value,r=r.next().value,e.closedCaptions.set(n,r)}}function yh(e,t,n){for(var r=[],i=(t=u(t)).next();!i.done;i=t.next()){if(!(i=vh(e,i.value,n)))return;r.push(i)}n.matchedStreams=r}function vh(e,t,n){for(var r={audio:function(t,n){return bh(e,t,n)},video:function(t,n){return bh(e,t,n)},text:_h,image:Eh}[n.type],i={audio:kh,video:Th,text:Ah,image:wh}[n.type],a=null,o=(t=u(t)).next();!o.done;o=t.next())!r(n,o=o.value)||a&&!i(n,a,o)||(a=o);return a}function mh(e,t){function n(e){if(!Lh.has(e)){var t=kt(e);Lh.set(e,t)}return Lh.get(e)}return e.mimeType==t.mimeType&&n(e.codecs)==n(t.codecs)}function bh(e,t,n){return!(!mh(t,n)&&!e.m||t.drmInfos&&!Qi(t.drmInfos,n.drmInfos))}function _h(e,t){return!!e.language&&(!t.language||0!=Ht(e.language,t.language)&&t.kind==e.kind)}function Eh(e){return!!e.tilesLayout}function kh(e,t,n){if(e.id==n.id)return!0;var r=mh(e,t),i=mh(e,n);return!(r&&!i)&&(!(r||!i)||(r=Ht(e.language,t.language),(i=Ht(e.language,n.language))>r||!(i<r)&&(e.roles.length?(r=t.roles.filter((function(t){return e.roles.includes(t)})),(i=n.roles.filter((function(t){return e.roles.includes(t)}))).length>r.length||!(i.length<r.length)&&n.roles.length<t.roles.length):!(n.roles.length||!t.roles.length)||!(n.roles.length&&!t.roles.length)&&(!(t.primary||!n.primary)||!(t.primary&&!n.primary)&&((r=xh(e.channelsCount,t.channelsCount,n.channelsCount))==Ph||r!=Rh&&((r=xh(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==Ph||r!=Rh&&!(!e.bandwidth||Ih(e.bandwidth,t.bandwidth,n.bandwidth)!=Ph)))))))}function Th(e,t,n){if(e.id==n.id)return!0;var r=mh(e,t),i=mh(e,n);if(r&&!i)return!1;if(!r&&i)return!0;if((r=xh(e.width*e.height,t.width*t.height,n.width*n.height))==Ph)return!0;if(r==Rh)return!1;if(e.frameRate){if((r=xh(e.frameRate,t.frameRate,n.frameRate))==Ph)return!0;if(r==Rh)return!1}return!(!e.bandwidth||Ih(e.bandwidth,t.bandwidth,n.bandwidth)!=Ph)}function Ah(e,t,n){if(e.id==n.id)return!0;var r=Ht(e.language,t.language),i=Ht(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(e.roles.length){if(r=t.roles.filter((function(t){return e.roles.includes(t)})),(i=n.roles.filter((function(t){return e.roles.includes(t)}))).length>r.length)return!0;if(i.length<r.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return n.mimeType==e.mimeType&&n.codecs==e.codecs&&(t.mimeType!=e.mimeType||t.codecs!=e.codecs)}function wh(e,t,n){return e.id==n.id||xh(e.width*e.height,t.width*t.height,n.width*n.height)==Ph}function Sh(e){return{id:0,originalId:"",groupId:null,primary:!1,type:e,mimeType:"",codecs:"",language:"",originalLanguage:null,label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,external:!1,fastSwitching:!1}}function Ch(e){return{id:0,originalId:"",groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Qo([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",originalLanguage:null,label:null,type:e,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!1,fastSwitching:!1}}function xh(e,t,n){if(t==e&&e!=n)return Rh;if(n==e&&e!=t)return Ph;if(t>e){if(n<=e||n-e<t-e)return Ph;if(n-e>t-e)return Rh}else{if(n>e)return Rh;if(e-n<e-t)return Ph;if(e-n>e-t)return Rh}return Dh}function Ih(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?Ph:t<e?Rh:Dh}y(Qp,Qo),(r=Qp.prototype).Nb=function(){return this.h?this.h.timeline.length:0},r.release=function(){Qo.prototype.release.call(this),this.h=null},r.Ya=function(e){if(this.h){for(var t=0,n=this.h.timeline,r=0;r<n.length&&n[r].end+this.i<=e;r+=1)t+=1;0<t&&(this.h.timeline=n.slice(t),this.g.length>=t&&(this.g=this.g.slice(t)),this.j+=t,0===this.Nb()&&this.release())}},r.find=function(e){if(this.h&&this.h.timeline&&this.h.timeline.length&&e<this.h.timeline[0].start+this.i)return this.j;if(!this.h)return null;var t=this.h.timeline;if(e<this.i||e>this.m)return null;for(var n=t.length-1,r=0;r<t.length;r++){var i=t[r],a=i.start+this.i;if(i=i.end+this.i,r<n&&(i=t[r+1].start+this.i),e>=a&&e<i)return r+this.j}return null},r.get=function(e){var t=this;if(0>(e-=this.j)||e>=this.Nb()||!this.h)return null;var n=this.g[e];if(!n){var r=this.h.hc,i=this.h.timeline[e],a=i.Kh,o=this.h.qf+i.rf;n=this.i-this.h.qb;for(var s=[],l=(i.end-i.start)/i.$a,u={},c=0;c<i.$a;u={Ac:u.Ac,ae:u.ae},c++){var d=i.start+l*c,p=d+l;u.ae=c+1,u.Ac=null,d=new fa(this.i+d,this.i+p,function(e){return function(){return t.h?(null==e.Ac&&(e.Ac=Zp(t.h.hc,t.F,a,t.A,o,e.ae,t.C)),e.Ac):[]}}(u),0,null,this.s,n,this.i,this.m,[],"",null,null,ga,this.u),0==this.G?0<c&&d.Jd():0!=c%this.G&&d.Jd(),s.push(d)}n=new fa(this.i+i.start,this.i+i.end,(function(){return 0<i.$a?[]:Zp(r,t.F,a,t.A,o,null,t.C)}),0,null,this.s,n,this.i,this.m,s,"",null,null,ga,this.u,0<i.$a),this.g[e]=n}return n},eh.prototype.configure=function(e){this.o=e},eh.prototype.destroy=function(){return this.u=this.o=null,this.j=[],this.h=null,this.m=[],this.F=[],this.l.clear(),null!=this.g&&(this.g.stop(),this.g=null),this.G.destroy()},eh.prototype.setManifestType=function(e){this.s=e},(r=ah.prototype).release=function(){for(var e=u(this.h.concat(this.g,this.l,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.h=[],this.g=[],this.l=[],this.i=[],this.j=[]},r.eh=function(){return this.j},r.Ce=function(){return this.l.slice()},r.Ng=function(){return this.i},r.zf=function(e,t){var n,r,i,a,o,s,l,c,d,p,h,f,g,y,v,m,b,k,T,A,w,S,C,x,I,P,D,L,O=this;return R((function(R){if(1==R.g){if(n=yt,function(e){for(var t=(e=u(e)).next();!t.done;t=e.next())(t=t.value).videoStreams=oh(t.videoStreams,(function(e,t){return e.id!==t.id&&e.fastSwitching==t.fastSwitching&&e.width===t.width&&e.frameRate===t.frameRate&&e.codecs===t.codecs&&e.mimeType===t.mimeType&&e.label===t.label&&ge(e.roles,t.roles)&&Ur(e.closedCaptions,t.closedCaptions)&&e.bandwidth===t.bandwidth})),t.audioStreams=oh(t.audioStreams,(function(e,t){return e.id!==t.id&&e.fastSwitching==t.fastSwitching&&e.channelsCount===t.channelsCount&&e.language===t.language&&e.bandwidth===t.bandwidth&&e.label===t.label&&e.codecs===t.codecs&&e.mimeType===t.mimeType&&ge(e.roles,t.roles)&&e.audioSamplingRate===t.audioSamplingRate&&e.primary===t.primary})),t.textStreams=oh(t.textStreams,(function(e,t){return e.id!==t.id&&e.language===t.language&&e.label===t.label&&e.codecs===t.codecs&&e.mimeType===t.mimeType&&e.bandwidth===t.bandwidth&&ge(e.roles,t.roles)})),t.imageStreams=oh(t.imageStreams,(function(e,t){return e.id!==t.id&&e.width===t.width&&e.codecs===t.codecs&&e.mimeType===t.mimeType}))}(e),!t&&1==e.length)return r=e[0],O.h=r.audioStreams,O.g=r.videoStreams,O.l=r.textStreams,O.i=r.imageStreams,R.B(2);for(i=-1,a=0;a<e.length;a++)o=e[a],O.o.has(o.id)||(O.o.add(o.id),-1==i&&(i=a));if(-1==i)return R.return();for(var M=[],N=[],U=[],F=[],B=u(e),j=B.next();!j.done;j=B.next())j=j.value,M.push(j.audioStreams),N.push(j.videoStreams),U.push(j.textStreams),F.push(j.imageStreams);for(s=M,l=N,d=F,p=u(c=U),h=p.next();!h.done;h=p.next())h.value.push(Ch(n.ha));for(f=u(d),g=f.next();!g.done;g=f.next())g.value.push(Ch(n.Cc));return _(R,Promise.all([lh(O,O.h,s,i,ph,fh),lh(O,O.g,l,i,ph,fh),lh(O,O.l,c,i,ph,fh),lh(O,O.i,d,i,ph,fh)]),2)}if(y=0,v=[],O.g.length&&O.h.length)for(w=u(O.h),S=w.next();!S.done;S=w.next())for(C=S.value,x=u(O.g),I=x.next();!I.done;I=x.next())P=I.value,D=$i(C.drmInfos,P.drmInfos),C.drmInfos.length&&P.drmInfos.length&&!D.length||(L=y++,v.push({id:L,language:C.language,disabledUntilTime:0,primary:C.primary,audio:C,video:P,bandwidth:(C.bandwidth||0)+(P.bandwidth||0),drmInfos:D,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(m=O.g.length?O.g:O.h,b=u(m),k=b.next();!k.done;k=b.next())T=k.value,A=y++,v.push({id:A,language:T.language,disabledUntilTime:0,primary:T.primary,audio:T.type==n.O?T:null,video:T.type==n.$?T:null,bandwidth:T.bandwidth||0,drmInfos:T.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});O.j=v,E(R)}))},j("shaka.util.PeriodCombiner",ah),ah.prototype.combinePeriods=ah.prototype.zf,ah.prototype.getImageStreams=ah.prototype.Ng,ah.prototype.getTextStreams=ah.prototype.Ce,ah.prototype.getVariants=ah.prototype.eh;var Ph=1,Dh=0,Rh=-1,Lh=new Map;function Oh(){var e=this;this.i=this.h=null,this.o=[],this.j=null,this.I=1,this.m={},this.K={},this.l=new ah,this.F=0,this.H=new H(5),this.G=new Qt((function(){!function(e){var t,n;R((function(r){switch(r.g){case 1:return t=0,k(r,2),_(r,Mh(e),4);case 4:t=r.h,A(r,3);break;case 2:if(n=w(r),e.i){if(e.h.raiseFatalErrorOnManifestUpdateRequestFailure)return e.i.onError(n),r.return();n.severity=1,e.i.onError(n)}case 3:if(!e.i)return r.return();e.i.onManifestUpdated(),jh(e,t),E(r)}}))}(e)})),this.C=new vr,this.u=null,this.J=[],this.A=1/0,this.s=!1,this.g=null}function Mh(e){var t,n,r,i,a,o,s;return R((function(l){return 1==l.g?(t=e.o,1<e.o.length&&e.g&&((n=ih(e.g,"Location",!0)).length&&(t=n)),r=Er(t,e.h.retryParameters),i=Date.now(),_(l,zh(e,r,0,{type:4}),2)):3!=l.g?(a=l.h,e.i?(a.uri&&a.uri!=a.originalUri&&!e.o.includes(a.uri)&&e.o.unshift(a.uri),_(l,function(e,t,n){var r,i,a,o;return R((function(s){if(1==s.g){if(!(r=Ri(t,"MPD")))throw new ut(2,4,4001,n);return e.h.dash.disableXlinkProcessing?s.return(Nh(e,r,n)):(i=e.h.dash.xlinkFailGracefully,a=Pp(r,e.h.retryParameters,i,n,e.i.networkingEngine),mr(e.C,a),_(s,a.promise,2))}return o=s.h,s.return(Nh(e,o,n))}))}(e,a.data,a.uri),3)):l.return(0)):(o=Date.now(),s=(o-i)/1e3,e.H.sample(1,s),l.return(s))}))}function Nh(e,t,n){var r,i,a,o,s,l,c,d,p,h,f,g,y,v,m,b,T,S,C,x,I,P,D,L,O,M,N,U,F,B,j,H,V,G,K,z,Y,q,X,Q,$,J,Z,ee,te,ne,re,ie,ae,oe,se,le,ue;return R((function(ce){switch(ce.g){case 1:for((r=e.h.dash.manifestPreprocessor)&&r(t),e.g&&e.g.l.clear(),i=[n],a=[],o=new Map,s=gi(t,"Location"),l=u(s),c=l.next();!c.done;c=l.next())d=c.value,p=d.getAttribute("serviceLocation"),(h=bi(d))&&(f=dt(i,[h])[0],p&&(e.g?rh(e.g,"Location",p,f):o.set(p,f)),a.push(f));if(e.g?0<(g=ih(e.g,"Location",!0)).length&&(i=e.o=g):a.length&&(i=e.o=a),y=Promise.resolve(),(v=hi(t,"ContentSteering"))&&e.i)for(m=v.getAttribute("defaultServiceLocation"),e.g?(e.g.j=i,e.g.h=m):(e.g=new eh(e.i),e.g.configure(e.h),e.g.setManifestType("DASH"),e.g.j=i,e.g.h=m,(b=bi(v))&&(Ei(v,"queryBeforeStart",Ii,!1)?y=th(e.g,b):th(e.g,b))),T=u(o.keys()),S=T.next();!S.done;S=T.next())C=S.value,x=o.get(C),rh(e.g,"Location",C,x);if(I=gi(t,"BaseURL"),D=!1,e.g)for(L=u(I),O=L.next();!O.done;O=L.next())M=O.value,N=M.getAttribute("serviceLocation"),U=bi(M),N&&U&&(rh(e.g,"BaseURL",N,U),D=!0);if(D&&e.g||(F=I.map(bi),P=dt(i,F)),B=function(){return e.g&&D?ih(e.g,"BaseURL"):P||[]},j=0,I&&I.length&&(j=Ei(I[0],"availabilityTimeOffset",xi)||0),H=e.h.dash.ignoreMinBufferTime,V=0,H||(V=Ei(t,"minBufferTime",Ti)||0),e.F=Ei(t,"minimumUpdatePeriod",Ti,-1),G=Ei(t,"availabilityStartTime",ki),K=Ei(t,"timeShiftBufferDepth",Ti),z=e.h.dash.ignoreSuggestedPresentationDelay,Y=null,z||(Y=Ei(t,"suggestedPresentationDelay",Ti)),q=e.h.dash.ignoreMaxSegmentDuration,X=null,q||(X=Ei(t,"maxSegmentDuration",Ti)),Q=t.getAttribute("type")||"static",e.j)for($=e.j.presentationTimeline,J=u(Object.values(e.m)),Z=J.next();!Z.done;Z=J.next())(ee=Z.value).segmentIndex&&ee.segmentIndex.Ya($.mb());else te=e.h.defaultPresentationDelay||1.5*V,$=new Po(G,null!=Y?Y:te,e.h.dash.autoCorrectDrift);return $.kc("static"==Q),$.S()&&!isNaN(e.h.availabilityWindowOverride)&&(K=e.h.availabilityWindowOverride),null==K&&(K=1/0),$.Sd(K),ne=t.getAttribute("profiles")||"",re={vb:"static"!=Q,presentationTimeline:$,sa:null,ba:null,oa:null,M:null,bandwidth:0,Of:!1,Zb:j,profiles:ne.split(",")},ie=function(e,t,n,r){var i=Ei(r,"mediaPresentationDuration",Ti),a=[],o=0;r=gi(r,"Period");for(var s=0;s<r.length;s++){var l=r[s],u=r[s+1],c=Ei(l,"start",Ti,o),d=l.id,p=Ei(l,"duration",Ti),h=null;if(u){var f=Ei(u,"start",Ti);null!=f&&(h=f-c)}else null!=i&&(h=i-c);if(null==h&&(h=p),!(null!==e.u&&null!==d&&null!==c&&c<e.u)||e.J.includes(d)||s+1==r.length){if(null!==c&&(null===e.u||c>e.u)&&(e.u=c),o=Fh(e,t,n,{start:c,duration:h,node:l,Fe:null==h||!u}),a.push(o),t.sa.id&&h&&(e.K[t.sa.id]=h),null==h){o=null;break}o=c+h}}return e.J=a.map((function(e){return e.id})),null!=i?{periods:a,duration:i,Ef:!1}:{periods:a,duration:o,Ef:!0}}(e,re,B,t),ae=ie.duration,oe=ie.periods,"static"!=Q&&ie.Ef||$.Ma(ae||1/0),e.A&&!e.s&&e.i.isAutoLowLatencyMode()&&(e.i.enableLowLatencyMode(),e.s=e.i.isLowLatencyMode()),e.s?$.fg(e.A):e.A&&W("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),$.Te(X||1),_(ce,e.l.zf(oe,re.vb),2);case 2:return _(ce,y,3);case 3:if(e.s&&(V=0),e.j){e.j.variants=e.l.j,0<(se=e.l.Ce()).length&&(e.j.textStreams=se),e.j.imageStreams=e.l.i,e.i.filter(e.j),ce.B(4);break}if(e.j={presentationTimeline:$,variants:e.l.j,textStreams:e.l.Ce(),imageStreams:e.l.i,offlineSessionIds:[],minBufferTime:V||0,sequenceMode:e.h.dash.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"DASH",serviceDescription:Uh(t)},!$.ng()){ce.B(5);break}return le=gi(t,"UTCTiming"),_(ce,function(e,t,n){var r,i,a,o,s,l,c,d;return R((function(p){switch(p.g){case 1:r=n.map((function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}})),i=e.h.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),a=u(r),o=a.next();case 2:if(o.done){p.B(4);break}switch(s=o.value,k(p,5),l=s.scheme,c=s.value,l){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return p.B(7);case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":return p.B(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return d=Date.parse(c),p.return(isNaN(d)?0:d-Date.now());case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":W("NTP UTCTiming scheme is not supported");break;default:W("Unrecognized scheme in UTCTiming element",l)}p.B(9);break;case 7:return _(p,Vh(e,t,c,"HEAD"),10);case 10:return p.return(p.h);case 8:return _(p,Vh(e,t,c,"GET"),11);case 11:return p.return(p.h);case 9:A(p,3);break;case 5:w(p);case 3:o=a.next(),p.B(2);break;case 4:return W("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),p.return(0)}}))}(e,B,le),6);case 6:if(ue=ce.h,!e.i)return ce.return();$.gg(ue);case 5:$.Id();case 4:e.i.makeTextStreamsForClosedCaptions(e.j),E(ce)}}))}function Uh(e){if(!(e=hi(e,"ServiceDescription")))return null;var t=hi(e,"Latency"),n=hi(e,"PlaybackRate");return t&&t.getAttribute("max")||n?{maxLatency:e=t&&t.getAttribute("max")?parseInt(t.getAttribute("max"),10)/1e3:null,maxPlaybackRate:n?parseFloat(n.getAttribute("max")):null,minLatency:t=t&&t.getAttribute("min")?parseInt(t.getAttribute("min"),10)/1e3:null,minPlaybackRate:n=n?parseFloat(n.getAttribute("min")):null}:null}function Fh(t,n,r,i){n.sa=Hh(t,i.node,null,r),n.ba=i,n.sa.Zb=n.Zb,n.sa.id||(n.sa.id="__shaka_period_"+i.start);var a=gi(i.node,"EventStream");r=n.presentationTimeline.mb();for(var o=(a=u(a)).next();!o.done;o=a.next())Gh(t,i.start,i.duration,o.value,r);if(r=gi(i.node,"AdaptationSet").map((function(r){return function(t,n,r){function i(e){switch(e){case 1:case 6:case 13:case 14:case 15:return"SDR";case 16:return"PQ";case 18:return"HLG"}}n.oa=Hh(t,r,n.sa,null);var a,o=!1,s=gi(r,"Role"),l=s.map((function(e){return e.getAttribute("value")})).filter(Mt),d=void 0,p=n.oa.contentType==gt;p&&(d="subtitle");for(var h=(s=u(s)).next();!h.done;h=s.next()){var f=(h=h.value).getAttribute("schemeIdUri");if(null==f||"urn:mpeg:dash:role:2011"==f)switch(h=h.getAttribute("value"),h){case"main":o=!0;break;case"caption":case"subtitle":d=h}}f=gi(r,"EssentialProperty"),s=null;var g=!1;h=!1;for(var y=(f=u(f)).next();!y.done;y=f.next()){var v=(y=y.value).getAttribute("schemeIdUri");"http://dashif.org/guidelines/trickmode"==v?s=y.getAttribute("value"):"urn:mpeg:mpegB:cicp:TransferCharacteristics"==v?a=i(parseInt(y.getAttribute("value"),10)):"urn:mpeg:mpegB:cicp:ColourPrimaries"!=v&&"urn:mpeg:mpegB:cicp:MatrixCoefficients"!=v&&("urn:mpeg:dash:ssr:2023"==v?g=!0:h=!0)}for(f=u(f=gi(r,"SupplementalProperty")),y=f.next();!y.done;y=f.next())"urn:mpeg:mpegB:cicp:TransferCharacteristics"==(y=y.value).getAttribute("schemeIdUri")&&(a=i(parseInt(y.getAttribute("value"),10)));f=gi(r,"Accessibility");var m,b=new Map;for(f=u(f),y=f.next();!y.done;y=f.next())if(v=y.value,y=v.getAttribute("schemeIdUri"),v=v.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==y)if(y=1,null!=v)for(var k=u(v=v.split(";")),T=k.next();!T.done;T=k.next()){var A=T.value,w=T=void 0;A.includes("=")?(A=A.split("="),T=A[0].startsWith("CC")?A[0]:"CC"+A[0],w=A[1]||"und"):(T="CC"+y,2==v.length?y+=2:y++,w=A),b.set(T,jt(w))}else b.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==y)if(y=1,null!=v)for(v=u(v.split(";")),T=v.next();!T.done;T=v.next())T=T.value,A=k=void 0,T.includes("=")?(T=T.split("="),k="svc"+T[0],A=T[1].split(",")[0].split(":").pop()):(k="svc"+y,y++,A=T),b.set(k,jt(A));else b.set("svc1","und");else"urn:mpeg:dash:role:2011"==y?null!=v&&(l.push(v),"captions"==v&&(d="caption")):"urn:tva:metadata:cs:AudioPurposeCS:2007"==y&&("1"==v?m="visually impaired":"2"==v&&(m="hard of hearing"));if(h)return null;var S=_p(h=gi(r,"ContentProtection"),t.h.dash.ignoreDrmInfo,t.h.dash.keySystemsByURI),C=jt(n.oa.language||"und"),x=r.getAttribute("label");if((h=gi(r,"Label"))&&h.length&&((h=h[0]).textContent&&(x=h.textContent)),h=gi(r,"Representation"),0==(r=h.map((function(r){return(r=function(t,n,r,i,a,o,s,l,u,c,d){if(n.M=Hh(t,c,n.oa,null),t.A=Math.min(t.A,n.M.Zb),!function(e){var t=e.cd?1:0;return t+=e.Db?1:0,0==(t+=e.dd?1:0)?e.contentType==gt||"application"==e.contentType:(1!=t&&(e.cd&&(e.Db=null),e.dd=null),!0)}(n.M))return null;var p=n.ba.start;n.bandwidth=Ei(c,"bandwidth",Si)||0;var h=n.M.contentType,f=h==gt||"application"==h;h="image"==h;try{var g=void 0;if(r.ee){var y=n.M.Za,v=dt(y(),[r.ee.qh]),m=Er(v,t.h.retryParameters);g={method:"AES-128",iv:r.ee.iv,firstMediaSequenceNumber:0,fetchKey:function(){var n,r,i;return R((function(a){if(1==a.g)return _(a,zh(t,m,6),2);if(3!=a.g){if(!(n=a.h).data||16!=n.data.byteLength)throw new ut(2,4,4049);return r={name:"AES-CBC"},i=g,_(a,e.crypto.subtle.importKey("raw",n.data,r,!0,["decrypt"]),3)}i.cryptoKey=a.h,g.fetchKey=void 0,E(a)}))}}}if(y=function(e,n,r,i){return function(e,t,n,r,i){var a,o,s,l;return R((function(u){return 1==u.g?(a=wr,o=i?0:1,s=vs(t,n,r,e.h.retryParameters),_(u,zh(e,s,a,{type:o}),2)):(l=u.h,u.return(l.data))}))}(t,e,n,r,i)},n.M.cd)var b=jp(n,y,g);else if(n.M.Db)b=Wp(n,t.m,g);else if(n.M.dd)b=qp(n,y,t.m,!!t.j,t.h.dash.initialSegmentLimit,t.K,g);else{var k=n.ba.duration||0,T=n.M.Za;b={bc:function(){return Promise.resolve(Jo(p,k,T()))}}}}catch(e){if((f||h)&&4002==e.code)return null;throw e}y=function(e,t,n,r){var i=_p(e,n,r);if(t.Gf)e=1==t.drmInfos.length&&!t.drmInfos[0].keySystem,n=0==i.drmInfos.length,(0==t.drmInfos.length||e&&!n)&&(t.drmInfos=i.drmInfos),t.Gf=!1;else if(0<i.drmInfos.length&&(t.drmInfos=t.drmInfos.filter((function(e){return i.drmInfos.some((function(t){return t.keySystem==e.keySystem}))})),0==t.drmInfos.length))throw new ut(2,4,4008);return i.Cf||t.Cf}(y=gi(c,"ContentProtection"),r,t.h.dash.ignoreDrmInfo,t.h.dash.keySystemsByURI),y=new Set(y?[y]:[]),v=!1,gi(c,"SupplementalProperty").some((function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.getAttribute("schemeIdUri")&&"JOC"==e.getAttribute("value")}))&&(v=!0);var A,w,S=!1;if(f&&(S=l.includes("forced_subtitle")||l.includes("forced-subtitle")),h&&((c=gi(c,"EssentialProperty").find((function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.getAttribute("schemeIdUri"))})))&&(A=c.getAttribute("value")),!A))return null;c=n.M.codecs,n.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(c.includes("hvc1.2.4.L153.B0")||c.includes("hev1.2.4.L153.B0"))&&(w="PQ");var C=(c=n.M.id?n.sa.id+","+n.M.id:"")&&t.m[c]?t.m[c]:{id:t.I++,originalId:n.M.id,groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){C.segmentIndex&&(C.segmentIndex.release(),C.segmentIndex=null)},segmentIndex:null,mimeType:n.M.mimeType,codecs:n.M.codecs,frameRate:n.M.frameRate,pixelAspectRatio:n.M.pixelAspectRatio,bandwidth:n.bandwidth,width:n.M.width,height:n.M.height,kind:i,encrypted:0<r.drmInfos.length,drmInfos:r.drmInfos,keyIds:y,language:a,originalLanguage:n.oa.language,label:o,type:n.oa.contentType,primary:s,trickModeVideo:null,emsgSchemeIdUris:n.M.emsgSchemeIdUris,roles:l,forced:S,channelsCount:n.M.Od,audioSamplingRate:n.M.audioSamplingRate,spatialAudio:v,closedCaptions:u,hdr:w,videoLayout:void 0,tilesLayout:A,matchedStreams:[],accessibilityPurpose:d,external:!1,fastSwitching:!1};return C.createSegmentIndex=function(){var e;return R((function(t){if(1==t.g)return C.segmentIndex?t.B(0):(e=C,_(t,b.bc(),3));e.segmentIndex=t.h,E(t)}))},c&&n.vb&&!t.m[c]&&(t.m[c]=C),C}(t,n,S,d,C,x,o,l,b,r,m))&&(r.hdr=r.hdr||a,r.fastSwitching=g),r})).filter((function(e){return!!e}))).length){if(s="image"==n.oa.contentType,t.h.dash.ignoreEmptyAdaptationSet||p||s)return null;throw new ut(2,4,4003)}if(!n.oa.contentType||"application"==n.oa.contentType)for(n.oa.contentType=Kh(r[0].mimeType,r[0].codecs),p=u(r),y=p.next();!y.done;y=p.next())y.value.type=n.oa.contentType;for(p=n.oa.id||"__fake__"+t.I++,f=u(r),y=f.next();!y.done;y=f.next()){for(y=y.value,v=u(S.drmInfos),k=v.next();!k.done;k=v.next())(k=k.value).keyIds=k.keyIds&&y.keyIds?new Set([].concat(c(k.keyIds),c(y.keyIds))):k.keyIds||y.keyIds;t.h.dash.enableAudioGroups&&(y.groupId=p)}return h=h.map((function(e){return e.getAttribute("id")})).filter(Mt),{id:p,contentType:n.oa.contentType,language:C,Si:o,streams:r,drmInfos:S.drmInfos,nf:s,Gh:h}}(t,n,r)})).filter(Mt),n.vb){for(i=[],o=(a=u(r)).next();!o.done;o=a.next())for(var s=(o=u(o.value.Gh)).next();!s.done;s=o.next())i.push(s.value);if(i.length!=new Set(i).size)throw new ut(2,4,4018)}for(i=r.filter((function(e){return!e.nf})),a=(r=u(r=r.filter((function(e){return e.nf})))).next();!a.done;a=r.next()){o=(a=a.value).nf.split(" ");for(var l=(s=u(i)).next();!l.done;l=s.next()){var d=l.value;if(o.includes(d.id)){l={};for(var p=(d=u(d.streams)).next();!p.done;l={nd:l.nd},p=d.next())l.nd=p.value,l.nd.trickModeVideo=a.streams.find(function(e){return function(t){return kt(e.nd.codecs)==kt(t.codecs)}}(l))}}}if(r=Bh(t.h.disableAudio,i,"audio"),a=Bh(t.h.disableVideo,i,"video"),o=Bh(t.h.disableText,i,gt),i=Bh(t.h.disableThumbnails,i,"image"),0===a.length&&0===r.length)throw new ut(2,4,4004);return{id:n.sa.id,audioStreams:r,videoStreams:a,textStreams:o,imageStreams:i}}function Bh(e,t,n){return e||!t.length?[]:t.reduce((function(e,t){return t.contentType!=n||e.push.apply(e,c(t.streams)),e}),[])}function jh(e,t){0>=e.F||e.G.U(Math.max(e.F-t,V(e.H)))}function Hh(e,t,n,r){n=n||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Od:null,audioSamplingRate:null,Zb:0,df:0},r=r||n.Za;var i,a=t.getAttribute("id"),o=gi(t,"BaseURL"),s=!1;if(e.g)for(var l=u(o),c=l.next();!c.done;c=l.next()){var d=c.value;c=d.getAttribute("serviceLocation"),d=bi(d),c&&d&&(rh(e.g,a,c,d),s=!0)}s&&e.g||(i=o.map(bi)),l=t.getAttribute("contentType")||n.contentType,c=t.getAttribute("mimeType")||n.mimeType,d=t.getAttribute("codecs")||n.codecs;var p=Ei(t,"frameRate",Pi)||n.frameRate,h=t.getAttribute("sar")||n.pixelAspectRatio,f=function(e,t){t=t.slice();for(var n=(e=u(e)).next();!n.done;n=e.next())n=n.value.getAttribute("schemeIdUri"),t.includes(n)||t.push(n);return t}(gi(t,"InbandEventStream"),n.emsgSchemeIdUris),g=gi(t,"AudioChannelConfiguration");g=function(e){for(var t=(e=u(e)).next();!t.done;t=e.next()){var n=t.value;if((t=n.getAttribute("schemeIdUri"))&&(n=n.getAttribute("value")))switch(t){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(n,10)))continue;return t;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(t=parseInt(n,16)))continue;for(e=0;t;)1&t&&++e,t>>=1;return e;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(t=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0<n&&n<t.length)return t[n]}}return null}(g)||n.Od;var y=Ei(t,"audioSamplingRate",Ci)||n.audioSamplingRate;l||(l=Kh(c,d));var v=hi(t,"SegmentBase"),m=hi(t,"SegmentTemplate"),b=v&&Ei(v,"availabilityTimeOffset",xi)||0,_=m&&Ei(m,"availabilityTimeOffset",xi)||0,E=o&&o.length&&Ei(o[0],"availabilityTimeOffset",xi)||0;return b=n.Zb+E+b+_,_=null,(E=hi(t,"SegmentSequenceProperties"))&&(E=hi(E,"SAP"))&&(_=Ei(E,"cadence",wi)),{Za:function(){return dt(r(),o.length?e.g&&s?ih(e.g,a):i||[]:[])},cd:v||n.cd,Db:hi(t,"SegmentList")||n.Db,dd:m||n.dd,width:Ei(t,"width",Ci)||n.width,height:Ei(t,"height",Ci)||n.height,contentType:l,mimeType:c,codecs:d,frameRate:p,pixelAspectRatio:h,emsgSchemeIdUris:f,id:a,language:t.getAttribute("lang"),Od:g,audioSamplingRate:y,Zb:b,df:_||n.df}}function Vh(e,t,n,r){var i,a,o,s,l,u;return R((function(c){if(1==c.g)return i=dt(t(),[n]),(a=Er(i,e.h.retryParameters)).method=r,o=e.i.networkingEngine.request(4,a),mr(e.C,o),_(c,o.promise,2);if(s=c.h,"HEAD"==r){if(!s.headers||!s.headers.date)return c.return(0);l=s.headers.date}else l=Br(s.data);return u=Date.parse(l),isNaN(u)?c.return(0):c.return(u-Date.now())}))}function Gh(e,t,n,r,i){for(var a=r.getAttribute("schemeIdUri")||"",o=r.getAttribute("value")||"",s=Ei(r,"timescale",Ci)||1,l=(r=u(gi(r,"Event"))).next();!l.done;l=r.next()){var c=Ei(l=l.value,"presentationTime",Ci)||0,d=Ei(l,"duration",Ci)||0;d=(c=c/s+t)+d/s,null!=n&&(c=Math.min(c,t+n),d=Math.min(d,t+n)),d<i||(l={schemeIdUri:a,value:o,startTime:c,endTime:d,id:l.getAttribute("id")||"",eventElement:l},e.i.onTimelineRegionAdded(l))}}function Kh(e,t){return It(t=bt(e,t))?gt:e.split("/")[0]}function zh(e,t,n,r){return t=e.i.networkingEngine.request(n,t,r),mr(e.C,t),t.promise}function Wh(){}(r=Oh.prototype).configure=function(e){this.h=e,this.g&&this.g.configure(this.h),this.l.m=this.h.dash.multiTypeVariantsAllowed&&$()},r.start=function(e,t){var n,r=this;return R((function(i){if(1==i.g)return r.s=t.isLowLatencyMode(),r.o=[e],r.i=t,_(i,Mh(r),2);if(n=i.h,r.i&&jh(r,n),!r.i)throw new ut(2,7,7001);return i.return(r.j)}))},r.stop=function(){for(var e=u(Object.values(this.m)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();return this.l&&this.l.release(),this.h=this.i=null,this.o=[],this.j=null,this.m={},this.l=null,null!=this.G&&(this.G.stop(),this.G=null),this.g&&this.g.destroy(),this.C.destroy()},r.update=function(){var e,t=this;return R((function(n){return 1==n.g?(k(n,2),_(n,Mh(t),4)):2!=n.g?A(n,0):(e=w(n),t.i&&e?(t.i.onError(e),void E(n)):n.return())}))},r.onExpirationUpdated=function(){},r.onInitialVariantChosen=function(e){if(this.j&&this.j.presentationTimeline.S()){var t=e.video||e.audio;if(t&&t.segmentIndex){e=this.j.presentationTimeline.wb();var n=t.segmentIndex.find(e);null!=n&&(t=t.segmentIndex.get(n))&&(this.F=t.endTime-e,jh(this,0))}}},r.banLocation=function(e){this.g&&this.g.i.set(e,Date.now()+6e4)},j("shaka.dash.DashParser",Oh),la["application/dash+xml"]=function(){return new Oh},la["video/vnd.mpeg.dash.mpd"]=function(){return new Oh},j("shaka.dependencies",Wh),Wh.has=function(e){return Xh.has(e)},Wh.add=function(e,t){if(!qh[e])throw Error(e+" is not supported");e==Yh?Kn("mux.js","mux.js is no longer used in Shaka Player."):Xh.set(e,(function(){return t}))};var Yh="muxjs",qh={Ti:Yh,ISOBoxer:"ISOBoxer"};Wh.Allowed=qh;var Xh=new Map([["ISOBoxer",function(){return e.ISOBoxer}]]);function Qh(e,t,n){this.type=e,this.g=t,this.segments=n||null}function $h(e,t,n,r){this.id=e,this.name=t,this.g=n,this.value=void 0===r?null:r}function Jh(e){var t=(new Set).add("AUDIO").add("VIDEO").add("SUBTITLES").add("PATHWAY-ID").add("GROUP-ID").add("URI");return e.toString(t)}function Zh(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function ef(e,t){if(!(e=e.getAttribute(t)))throw new ut(2,4,4023,t);return e.value}function tf(e,t,n){n=void 0===n?[]:n,this.g=t,this.h=e,this.$a=n}function nf(e,t){this.name=e,this.value=t}function rf(e,t){return e.filter((function(e){return e.name==t}))}function af(e,t){return e.filter((function(e){return ef(e,"TYPE")==t}))}function of(e,t){return(e=rf(e,t)).length?e[0]:null}function sf(e,t,n){return n=void 0===n?0:n,(e=of(e,t))?Number(e.value):n}function lf(e,t,n){return t?uf(e,[t],n):[]}function uf(e,t,n){if(!t.length)return[];t=dt(e,t),e=[];for(var r=(t=u(t)).next();!r.done;r=t.next()){var i=e,a=i.push,o=r.value;if((r=n)&&r.size){var s=(o=String(o).replace(/%7B/g,"{").replace(/%7D/g,"}")).match(/{\$\w*}/g);if(s)for(var l=(s=u(s)).next();!l.done;l=s.next()){var c=(l=l.value).slice(2,l.length-1),d=r.get(c);if(!d)throw new ut(2,4,4039,c);o=o.replace(l,d)}r=o}else r=o;a.call(i,r)}return e}function cf(e){this.h=e||"",this.g=0}function df(e){pf(e,/[ \t]+/gm)}function pf(e,t){return t.lastIndex=e.g,t=null==(t=t.exec(e.h))?null:{position:t.index,length:t[0].length,results:t},e.g==e.h.length||null==t||t.position!=e.g?null:(e.g+=t.length,t.results)}function hf(e){return e.g==e.h.length?null:(e=pf(e,/[^ \t\n]*/gm))?e[0]:null}function ff(){this.g=0}function gf(e,t){var n=(t=(t=Br(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(n[0]))throw new ut(2,4,4015);t=0;for(var r=!0,i=u(n),a=i.next();!a.done;a=i.next())if(a=a.value,/^#(?!EXT)/m.test(a)||r)r=!1;else{if(a=yf(e,a),--e.g,vf.includes(a.name)){t=1;break}"EXT-X-STREAM-INF"==a.name&&(r=!0)}for(i=[],r=!0,a=0;a<n.length;a++){var o=n[a],s=n[a+1];if(/^#(?!EXT)/m.test(o)||r)r=!1;else{if(o=yf(e,o),mf.includes(o.name)){if(1!=t)throw new ut(2,4,4017);o=n.splice(a,n.length-a),n=[],r=[],a=[],s=null;for(var l=(o=u(o)).next();!l.done;l=o.next())l=l.value,/^(#EXT)/.test(l)?(l=yf(e,l),vf.includes(l.name)?i.push(l):"EXT-X-MAP"==l.name?s=l:"EXT-X-PART"==l.name?a.push(l):"EXT-X-PRELOAD-HINT"==l.name?"PART"==Zh(l,"TYPE")?a.push(l):"MAP"==Zh(l,"TYPE")&&(l.name="EXT-X-MAP",s=l):r.push(l)):/^#(?!EXT)/m.test(l)||(l=l.trim(),s&&r.push(s),n.push(new tf(l,r,a)),r=[],a=[]);return a.length&&(s&&r.push(s),n.push(new tf("",r,a))),new Qh(t,i,n)}i.push(o),"EXT-X-STREAM-INF"==o.name&&(o.g.push(new nf("URI",s)),r=!0)}}return new Qh(t,i)}function yf(e,t){e=e.g++;var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new ut(2,4,4016,t);t=n[1];var r,i=n[2];if(n=[],i){var a;(a=pf(i=new cf(i),/^([^,=]+)(?:,|$)/g))&&(r=a[1]);for(var o=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;a=pf(i,o);)n.push(new nf(a[1],a[2]||a[3])),df(i)}return new $h(e,t,n,r)}$h.prototype.toString=function(e){var t="#"+this.name,n=this.g?this.g.filter((function(t){return!e||!e.has(t.name)})).map((function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&n.unshift(this.value),0<n.length&&(t+=":"+n.join(",")),t},$h.prototype.getAttribute=function(e){var t=this.g.filter((function(t){return t.name==e}));return t.length?t[0]:null};var vf="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF".split(" "),mf="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function bf(){}function _f(e){try{var t=Ef(e);return cr({uri:e,originalUri:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return lr(e)}}function Ef(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new ut(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new ut(2,1,1004,t);var r=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),n=r.split(";"),r=n[0];var i=!1;return 1<n.length&&"base64"==n[n.length-1]&&(i=!0,n.pop()),{data:i?si(t):Vr(t),contentType:r}}function kf(e){var t=At(e);return{type:t.split("/")[0],mimeType:t,codecs:e=wt(e),language:null,height:null,width:null,channelCount:null,sampleRate:null,closedCaptions:new Map}}function Tf(e){for(var t=new Set,n=[],r=(e=u(e)).next();!r.done;r=e.next()){var i=Tt(r=r.value);t.has(i)||(n.push(r),t.add(i))}return n}function Af(){var e=this;this.g=this.h=null,this.u=1,this.o=new Map,this.H=new Map,this.J=new Map,this.J.set("video",new Map),this.J.set("audio",new Map),this.J.set(gt,new Map),this.J.set("image",new Map),this.Da=new Set,this.i=new Map,this.l=null,this.W="",this.la=new ff,this.I=-1,this.V=1/0,this.Z=this.hb=!1,this.s=new Qt((function(){!function(e){var t,n,r,i,a,o;R((function(s){switch(s.g){case 1:return e.h?(k(s,2),t=Date.now(),_(s,e.update(),4)):s.return();case 4:n=Date.now(),rg(e)&&(r=(n-t)/1e3,e.fb.sample(1,r),i=e.m,a=Math.max(0,i-V(e.fb)),e.s.U(a)),A(s,3);break;case 2:if(o=w(s),!e.h)return s.return();if(e.g.raiseFatalErrorOnManifestUpdateRequestFailure)return e.h.onError(o),s.return();o.severity=1,e.h.onError(o),e.s.U(.1);case 3:if(!e.h)return s.return();e.h.onManifestUpdated(),E(s)}}))}(e)})),this.xa=ug,this.C=null,this.wa=0,this.m=1/0,this.ga=this.fa=this.K=0,this.N=new vr,this.F=new Map,this.G=new Map,this.na=new Map,this.gb=this.A=!1,this.fb=new H(5),this.j=null}function wf(e,t){return rg(e)?e.J.get(t.type):t.Kd}function Sf(e,t){var n,r,i,a,o,s,l,d,p,h,f,g,y,v,m,b,k,T,A,w,S,C,x,I,P,D,L,O;return R((function(R){if(1==R.g){for(n=[],r=u(t.Y()),i=r.next();!i.done;i=r.next())a=i.value,o=new Ye(a),s=o.g,t.qd&&(0<=t.Ua&&s.add("_HLS_msn",String(t.Ua)),0<=t.Va&&s.add("_HLS_part",String(t.Va))),t.rd&&s.add("_HLS_skip","YES"),lt(s)&&$e(o,s),n.push(o.toString());return _(R,ng(e,n,!0),2)}if(l=R.h,!t.stream.segmentIndex)return R.return();if(1!=(d=gf(e.la,l.data)).type)throw new ut(2,4,4017);(p=l.uri)==l.originalUri||t.Y().includes(p)||t.$f.push(p),h=rf(d.g,"EXT-X-DEFINE"),f=Pf(e,h,p),g=t.stream,y=wf(e,t),v=zf(d,g.mimeType),m=v.keyIds,b=v.drmInfos,function(e,t){return e.size===t.size&&[].concat(c(e)).every((function(e){return t.has(e)}))}(g.keyIds,m)||(g.keyIds=m,g.drmInfos=b,e.h.newDrmInfo(g)),k=Jf(e,d,g,y,f,t.Y),T=k.segments,A=k.bandwidth,g.bandwidth=A,g.segmentIndex.Vc(T,e.l.mb()),T.length&&(w=sf(d.g,"EXT-X-MEDIA-SEQUENCE",0),C=(S=of(d.g,"EXT-X-SKIP"))?Number(Zh(S,"SKIPPED-SEGMENTS")):0,x=Gf(w,T),I=x.Ua,P=x.Va,t.Ua=I+C,t.Va=P,D=y.get(w),g.segmentIndex.Ya(D)),L=T[0],t.Rb=L.startTime,O=T[T.length-1],t.nb=O.endTime,of(d.g,"EXT-X-ENDLIST")&&(t.Rc=!0),Yf(e,d),E(R)}))}function Cf(e,t,n){t.Rb+=n,t.nb+=n;for(var r=u(e=wf(e,t)),i=r.next();!i.done;i=r.next()){var a=u(i.value);i=a.next().value,a=a.next().value,e.set(i,a+n)}t.Y()}function xf(e,t,n){var r,i,a,o,s,l,c,d,p,h,f,g,y,v,m,b,E,k;return R((function(T){switch(T.g){case 1:if(r=kf(e.g.hls.mediaPlaylistFullMimeType),!t.segments.length)return T.return(r);if(i=Math.trunc((t.segments.length-1)/2),a=t.segments[i],o=lf(n(),t.segments[0].h),s=o[0],l=new Ye(s),c=l.Ea.split(".").pop(),d=og[c])return T.return(kf(d));if(p=wr,h=null,!(f=Xf(e,t,a.g,n))){T.B(2);break}return g=Er(f.Y(),e.g.retryParameters),_(T,ag(e,g,p,{type:0}),3);case 3:y=T.h,h=y.data;case 2:return v=Er(o,e.g.retryParameters),_(T,ag(e,v,p,{type:1}),4);case 4:if(m=T.h,(b=m.headers["content-type"])&&(b=b.split(";")[0].toLowerCase()),"ts"==c||"video/mp2t"==b){var A=m.data,w=ae(A),S=(w=(new Ya).parse(w)).Lc();w=w.De();var C=[],x=!1,I=!1;switch(S.audio){case"aac":C.push("mp4a.40.2"),x=!0;break;case"mp3":C.push("mp4a.40.34"),x=!0;break;case"ac3":C.push("ac-3"),x=!0;break;case"ec3":C.push("ec-3"),x=!0}switch(S.video){case"avc":w.ia?C.push(w.ia):C.push("avc1.42E01E"),I=!0;break;case"hvc":w.ia?C.push(w.ia):C.push("hvc1.1.6.L93.90"),I=!0}if(C.length){if(S=x&&!I,x=new Map,I){(I=new ce("video/mp2t")).i(A);for(var P=(A=u(I.j())).next();!P.done;P=A.next())P=P.value,x.set(P,P);I.h()}w={type:S?"audio":"video",mimeType:"video/mp2t",codecs:C.join(", "),language:null,height:w.height,width:w.width,channelCount:null,sampleRate:null,closedCaptions:x}}else w=null;if(E=w)return T.return(E)}else if(("mp4"==c||"cmfv"==c||"m4s"==c||"video/mp4"==b||"audio/mp4"==b||"video/iso.segment"==b)&&(k=function(e,t){function n(e){return r(e.name)}function r(e){switch(e=e.toLowerCase()){case"avc1":case"avc3":i.push(e+".42E01E"),o=!0;break;case"hev1":case"hvc1":i.push(e+".1.6.L93.90"),o=!0;break;case"dvh1":case"dvhe":i.push(e+".05.04"),o=!0;break;case"vp09":i.push(e+".00.10.08"),o=!0;break;case"av01":i.push(e+".0.01M.08"),o=!0;break;case"mp4a":i.push("mp4a.40.2"),a=!0;break;case"ac-3":case"ec-3":case"opus":case"flac":i.push(e),a=!0}}var i=[],a=!1,o=!1,s=null,l=null,c=null,d=null,p=null;if((new qr).box("moov",Xr).box("trak",Xr).P("tkhd",(function(e){e=Ra(e.reader,e.version),l=String(e.height),c=String(e.width)})).box("mdia",Xr).P("mdhd",(function(e){s=Pa(e.reader,e.version).language})).box("minf",Xr).box("stbl",Xr).P("stsd",Qr).box("mp4a",(function(e){var t=e.reader;t.skip(6),t.skip(2),t.skip(8);var r=t.Ba();t.skip(2),t.skip(2),t.skip(2),t=t.Ba()+t.Ba()/65536,d=r,p=t,e.reader.ja()?Xr(e):n(e)})).box("esds",(function(e){e=function(e){for(var t,n,r="mp4a";e.ja();){t=e.ea();for(var i=e.ea();128&i;)i=e.ea();if(3==t)e.Ba(),128&(i=e.ea())&&e.Ba(),64&i&&e.skip(e.ea()),32&i&&e.Ba();else if(4==t)n=e.ea(),e.skip(12);else if(5==t)break}return n&&(r+="."+this.g(n),5==t&&e.ja()&&(31===(n=(248&(t=e.ea()))>>3)&&e.ja()&&(n=32+((7&t)<<3)+((224&e.ea())>>5)),r+="."+n)),{ia:r}}(e.reader),i.push(e.ia),a=!0})).box("ac-3",n).box("ec-3",n).box("opus",n).box("Opus",n).box("fLaC",n).box("avc1",(function(e){e=La(e.reader,e.name),i.push(e.ia),o=!0})).box("avc3",(function(e){e=La(e.reader,e.name),i.push(e.ia),o=!0})).box("hev1",n).box("hvc1",n).box("dvh1",n).box("dvhe",n).box("vp09",n).box("av01",n).box("enca",$r).box("encv",$r).box("sinf",Xr).box("frma",(function(e){r(e=Oa(e.reader).ia)})).parse(e||t,!0),!i.length)return null;var h=a&&!o,f=new Map;if(o){var g=new ce("video/mp4");for(e&&g.init(e),g.i(t),t=(e=u(g.j())).next();!t.done;t=e.next())t=t.value,f.set(t,t);g.h()}return{type:h?"audio":"video",mimeType:h?"audio/mp4":"video/mp4",codecs:Tf(i).join(", "),language:s,height:l,width:c,channelCount:d,sampleRate:p,closedCaptions:f}}(h,m.data)))return T.return(k);return T.return(r)}}))}function If(e){if(rg(e)){if(e.xa==dg){for(var t,n=t=1/0,r=u(e.i.values()),i=r.next();!i.done;i=r.next())(i=i.value).stream.segmentIndex&&"text"!=i.stream.type&&(t=Math.min(t,i.nb),n=Math.min(n,i.Rb));t-=n,e.g.hls.useSafariBehaviorForLive&&(t=e.l.m),isNaN(e.g.availabilityWindowOverride)||(t=e.g.availabilityWindowOverride),e.l.Sd(t)}}else e.l.Ma(Bf(e));e.l.Id()}function Pf(e,t,n){n=new Ye(n).g;for(var r=new Map,i=(t=u(t)).next();!i.done;i=t.next()){var a=i.value,o=Zh(a,"NAME"),s=Zh(a,"VALUE");i=Zh(a,"QUERYPARAM"),a=Zh(a,"IMPORT"),o&&s&&(r.has(o)||r.set(o,s)),i&&(o=n.get(i)[0])&&!r.has(o)&&r.set(i,o),a&&(i=e.o.get(a))&&r.set(a,i)}return r}function Df(e,t,n){for(var r={audio:[],video:[]},i=new Map,a=[],o=!1,s=!1,l=u(t),d=l.next();!d.done;d=l.next()){var p=d.value;d=Zh(p,"AUDIO");var h=Zh(p,"VIDEO"),f=d||h;f&&(a.includes(f)||a.push(f),(p=Zh(p,"PATHWAY-ID"))&&i.set(f,p),d?o=!0:h&&(s=!0))}a.length&&n.length&&function(e,t,n){for(var r={},i=(t=u(t=t.filter((function(e){var t=Zh(e,"URI")||"";return"SUBTITLES"!=Zh(e,"TYPE")&&""!=t})))).next();!i.done;i=t.next()){var a=Jh(i=i.value);r[a]?r[a].push(i):r[a]=[i]}for(var o in r)Uf(e,r[o],n)}(e,l=n.filter((function(e){return a.includes(ef(e,"GROUP-ID"))})),i),l=(i=a.sort().join(","))&&e.H.has(i)?e.H.get(i):[],o?r.audio.push.apply(r.audio,c(l)):s&&r.video.push.apply(r.video,c(l)),d=!1;var g=t.map((function(e){return ef(e,"URI")}));if(s=r.audio.find((function(e){return e&&e.Y().find((function(e){return g.includes(e)}))})),h=ft("video",o=Rf(e,t[0])),(f=ft("audio",o))&&!h?(s="audio",d=0<r.audio.length):!r.audio.length&&!r.video.length&&f&&h?(s="video",o=[[h,f].join()]):r.audio.length&&s?(s="audio",d=!0):s=r.video.length&&!r.audio.length?"audio":"video",!d){var y=p=f=h=d=null;!l.length&&(n=n.find((function(e){var t=Zh(e,"URI")||"",n=Zh(e,"TYPE");return e=ef(e,"GROUP-ID"),"SUBTITLES"!=n&&""==t&&a.includes(e)})))&&(d=Zh(n,"LANGUAGE"),h=Zh(n,"NAME"),f=Lf(n),Mf(n),p=Zh(n,"CHARACTERISTICS"),y=Of(n)),e=function(e,t,n,r,i,a,o,s,l){for(var c=e.u++,d=[],p=u(t),h=p.next();!h.done;h=p.next()){var f=h.value;h=ef(f,"URI"),f=Zh(f,"PATHWAY-ID"),e.j&&f&&rh(e.j,c,f,h),d.push(h)}if(p=d.sort().join(","),e.i.has(p))return e.i.get(p);e:{if(t=Zh(t[0],"CLOSED-CAPTIONS"),"video"==r){if(t&&"NONE"!=t){t=e.F.get(t);break e}if(!t&&e.F.size)for(t=u(e.F.keys()).next();!t.done;){t=e.F.get(t.value);break e}}t=null}return n=ht(r,n),r=Ff(e,c,d,n,r,i,!1,a,o,t,s,!1,l,!1),e.i.set(p,r),r}(e,t,o,s,d,h,f,p,y),i&&(e.stream.groupId=i),r[e.stream.type]=[e]}return r}function Rf(e,t){var n=Zh(t,"CODECS")||"";e.Z=0<n.length,e.Z||e.g.hls.disableCodecGuessing||(t=[],e.g.disableVideo||t.push(e.g.hls.defaultVideoCodec),e.g.disableAudio||t.push(e.g.hls.defaultAudioCodec),n=t.join(",")),e=new Set,t=[];for(var r=(n=u(n.split(/\s*,\s*/))).next();!r.done;r=n.next()){var i=Tt(r=r.value);e.has(i)||(t.push(r),e.add(i))}return t}function Lf(e){return(e=Zh(e,"CHANNELS"))?parseInt(e.split("/")[0],10):null}function Of(e){return(e=Zh(e,"SAMPLE-RATE"))?parseInt(e,10):null}function Mf(e){return!!(e=Zh(e,"CHANNELS"))&&e.includes("/JOC")}function Nf(e,t,n,r,i,a,o,s,l,c,d){for(var p=u(n),h=p.next();!h.done;h=p.next())tg(h.value.stream,i,a,o,s,l);for(i=e.g.disableAudio,t.length&&!i||(t=[null]),i=e.g.disableVideo,n.length&&!i||(n=[null]),i=[],a=(t=u(t)).next();!a.done;a=t.next())for(a=a.value,s=(o=u(n)).next();!s.done;s=o.next()){var f=s.value;(s=a?a.stream:null)&&(s.drmInfos=c,s.keyIds=d),(l=f?f.stream:null)&&(l.drmInfos=c,l.keyIds=d),p=a?a.stream.drmInfos:null,h=f?f.stream.drmInfos:null,f=(f=f?f.Y().sort().join(","):"")+" - "+(a?a.Y().sort().join(","):""),s&&l&&!Qi(p,h)||e.Da.has(f)||(s={id:e.u++,language:s?s.language:"und",disabledUntilTime:0,primary:!!s&&s.primary||!!l&&l.primary,audio:s,video:l,bandwidth:r,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},i.push(s),e.Da.add(f))}return i}function Uf(e,t,n){for(var r=[],i=[],a=new Map,o=u(t),s=o.next();!s.done;s=o.next()){var l=s.value;s=ef(l,"URI"),l=ef(l,"GROUP-ID"),r.push(s),i.push(l),a.set(l,s)}if(o=i.sort().join(","),s=t[0],t="","subtitles"==(l=ef(s,"TYPE").toLowerCase())&&(l=gt),l==gt)t=Zh(s,"CODECS")||"";else for(var c=(i=u(i)).next();!c.done;c=i.next())if(c=c.value,e.G.has(c)){t=e.G.get(c);break}if(i=r.sort().join(","),e.i.has(i))return e.i.get(i);if(c=e.u++,e.j)for(var d=(a=u(a)).next();!d.done;d=a.next()){var p=u(d.value);d=p.next().value,p=p.next().value,(d=n.get(d))&&rh(e.j,c,d,p)}n=Zh(s,"LANGUAGE"),a=Zh(s,"NAME"),d="YES"==Zh(s,"DEFAULT"),p="audio"==l?Lf(s):null;var h="audio"==l&&Mf(s);return(r=Ff(e,c,r,t,l,n,d,a,p,null,Zh(s,"CHARACTERISTICS"),"YES"==Zh(s,"FORCED"),s="audio"==l?Of(s):null,h)).stream&&(r.stream.groupId=o),e.H.has(o)?e.H.get(o).push(r):e.H.set(o,[r]),e.i.set(i,r),r}function Ff(e,t,n,r,i,a,o,s,l,c,d,p,h,f){function g(t){var n,g,k,T,A,w,S,C,x,I,P,D,L,O,M,N,U;return R((function(R){switch(R.g){case 1:return n=b.Y(),_(R,ng(e,b.Y(),!0),2);case 2:if(g=R.h,t.aborted)return R.return();if((k=g.uri)==g.originalUri||n.includes(k)||m.push(k),T=gf(e.la,g.data),A=void 0,e.Z||!e.g.hls.disableCodecGuessing){R.B(3);break}return _(R,xf(e,T,y),4);case 4:w=R.h,A=w.mimeType,r=w.codecs;case 3:return S=rg(e),_(R,Vf(e,0,T,y,k,r,i,a,o,s,l,c,d,p,h,f,A),5);case 5:if(C=R.h,t.aborted)return R.return();if(x=C.stream,rg(e)&&!S&&qf(e,T),b.Rb=C.Rb,b.nb=C.nb,b.rd=C.rd,b.qd=C.qd,b.Rc=C.Rc,b.Kd=C.Kd,b.Ua=C.Ua,b.Va=C.Va,b.Oe=!0,v.segmentIndex=x.segmentIndex,v.encrypted=x.encrypted,v.drmInfos=x.drmInfos,v.keyIds=x.keyIds,v.mimeType=x.mimeType,v.bandwidth=x.bandwidth,v.codecs=x.codecs||v.codecs,v.drmInfos.length&&e.h.newDrmInfo(v),i==(I=yt).$||i==I.O)for(P=u(e.i.values()),D=P.next();!D.done;D=P.next())(L=D.value).Oe||L.type!=i||(L.stream.mimeType=x.mimeType);i==I.ha&&(O=x.segmentIndex.get(0))&&O.aa&&(v.mimeType="application/mp4"),function(e){if(!e.C)return!1;for(var t=[],n=[],r=(e=u(e.C.variants)).next();!r.done;r=e.next())(r=r.value).video&&t.push(r.video),r.audio&&n.push(r.audio);return!(0<t.length&&!t.some((function(e){return e.segmentIndex}))||0<n.length&&!n.some((function(e){return e.segmentIndex})))}(e)&&(e.hb?Hf(e,[b]):(e.hb=!0,M=Array.from(e.i.values()),N=M.filter((function(e){return e.stream.segmentIndex})),Hf(e,N),If(e),0<(U=e.m)&&e.s.U(U))),E(R)}}))}function y(){return e.j&&1<n.length?ih(e.j,t):m.concat(uf([e.W],n,e.o))}var v=Kf(e,r,i,a,o,s,l,c,d,p,h,f),m=[],b={stream:v,type:i,$f:m,Y:y,Rb:0,nb:0,Kd:new Map,rd:!1,qd:!1,Rc:!1,ke:-1,Ua:-1,Va:-1,Oe:!1},k=null,T=new AbortController;return v.createSegmentIndex=function(){return k||(T=new AbortController,k=new Promise((function(e){e(g(T.signal))})))},v.closeSegmentIndex=function(){k&&!v.segmentIndex&&T.abort(),v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null),k=null},b}function Bf(e){for(var t=1/0,n=(e=u(e.i.values())).next();!n.done;n=e.next())(n=n.value).stream.segmentIndex&&"text"!=n.stream.type&&(t=Math.min(t,n.nb));return t}function jf(e,t){for(var n=[],r=(t=u(t)).next();!r.done;r=t.next())(r=r.value).segmentIndex&&$o(r.segmentIndex,(function(e){n.push(e)}));e.l.Wc(n)}function Hf(e,t){if(!rg(e))for(var n=Bf(e),r=u(t),i=r.next();!i.done;i=r.next())i.value.stream.segmentIndex.$b(0,n);jf(e,t.map((function(e){return e.stream}))),e.g.hls.ignoreManifestProgramDateTime?function(e,t){for(var n=-1==e.I,r=u(t),i=r.next();!i.done;i=r.next()){var a=(i=i.value).stream.segmentIndex,o=wf(e,i);if(a=a.g[0]||null)for(var s=(o=u(o)).next();!s.done;s=o.next()){var l=(s=u(s.value)).next().value;if(s.next().value==a.startTime){n&&(e.I=Math.max(e.I,l)),i.ke=l;break}}}if(!(0>e.I))for(i=(t=u(t)).next();!i.done;i=t.next())(r=(n=i.value).stream.segmentIndex)&&(r.g.splice(0,e.I-n.ke),(r=r.g[0]||null)&&(r=-r.startTime,n.stream.segmentIndex.offset(r),Cf(e,n,r)))}(e,t):function(e,t){if(1/0==e.V)for(var n=(t=u(t)).next();!n.done;n=t.next()){var r=n.value.stream.segmentIndex.g[0]||null;null!=r&&null!=r.h&&(e.V=Math.min(e.V,r.h))}if(1/0!=(t=e.V))for(n=(r=u(e.i.values())).next();!n.done;n=r.next()){var i=(n=n.value).stream.segmentIndex;if(null!=i){var a=i.g[0]||null;if(null==a.h)z("Missing EXT-X-PROGRAM-DATE-TIME for stream",n.Y(),"Expect AV sync issues!");else for(Cf(e,n,a.h-t-a.startTime),i=(n=u(i)).next();!i.done;i=n.next())i.value.kf(t)}}}(e,t)}function Vf(e,t,n,r,i,a,o,s,l,u,c,d,p,h,f,g,y){var v,m,b,E,T,S,C,x,I,P,D,L,O,M,N,U,F,B,j,H,V,G,K;return R((function(t){if(1==t.g){if(1!=n.type)throw new ut(2,4,4017);v=rf(n.g,"EXT-X-DEFINE"),m=Pf(e,v,i);var z=of(n.g,"EXT-X-PLAYLIST-TYPE"),W=of(n.g,"EXT-X-ENDLIST");return W=z&&"VOD"==z.value||W,z=z&&"EVENT"==z.value&&!W,z=!W&&!z,ig(e,W?ug:z?dg:cg),rg(e)&&Yf(e,n),y?t.B(2):_(t,function(e,t,n,r,i,a){var o,s,l,u,c,d,p,h,f,g,y,v,m;return R((function(b){switch(b.g){case 1:return o=wr,s=Math.trunc((r.segments.length-1)/2),l=lf(a(),r.segments[s].h,i),u=new Ye(l[0]),c=u.Ea.split(".").pop(),d=sg[t],(p=d[c])||(p=og[c])||(p=Zf(t,n))?b.return(p):(f=1,g=Er(l,e.g.retryParameters),k(b,2),g.method="HEAD",_(b,ag(e,g,o,{type:f}),4));case 4:y=b.h,h=y.headers["content-type"],A(b,3);break;case 2:if(!(v=w(b))||1002!=v.code){b.B(3);break}return g.method="GET",_(b,ag(e,g,o,{type:f}),6);case 6:m=b.h,h=m.headers["content-type"];case 3:return h?b.return(h.split(";")[0]):b.return(eg(t))}}))}(e,o,a,n,m,r),3)}if(2!=t.g&&(y=t.h),b=zf(n,y),E=b.drmInfos,T=b.keyIds,S=b.encrypted,C=b.vg,S&&!E.length&&!C)throw new ut(2,4,4026);return(x=Kf(e,a,o,s,l,u,c,d,p,h,f,g)).encrypted=S,x.drmInfos=E,x.keyIds=T,x.mimeType=y,I=rg(e)?e.J.get(o):new Map,P=Jf(e,n,x,I,m,r),D=P.segments,L=P.bandwidth,x.bandwidth=L,rg(e)&&Yf(e,n),O=D[0].startTime,M=D[D.length-1],N=M.endTime,U=new Qo(D),x.segmentIndex=U,B=!!(F=of(n.g,"EXT-X-SERVER-CONTROL"))&&null!=F.getAttribute("CAN-SKIP-UNTIL"),j=!!F&&null!=F.getAttribute("CAN-BLOCK-RELOAD"),H=sf(n.g,"EXT-X-MEDIA-SEQUENCE",0),V=Gf(H,D),G=V.Ua,K=V.Va,t.return({stream:x,type:o,$f:[],Y:r,Rb:O,nb:N,rd:B,qd:j,Rc:!1,ke:-1,Ua:G,Va:K,Kd:I,Oe:!1})}))}function Gf(e,t){e=e+t.length-1;var n=-1;if(!t.length)return{Ua:++e,Va:n};var r=(t=t[t.length-1]).g;return t.g.length?(n=r.length-1,r[r.length-1].m||(e++,n=0),{Ua:e,Va:n}):(e++,t.o&&(n=0),{Ua:e,Va:n})}function Kf(e,t,n,r,i,a,o,s,l,c,d,p){var h=Zf(n,t)||eg(n),f=[];if(l)for(var g=(l=u(l.split(","))).next();!g.done;g=l.next())f.push(g.value);return l=void 0,g=null,n==gt?l=f.includes("public.accessibility.transcribes-spoken-dialog")&&f.includes("public.accessibility.describes-music-and-sound")?"caption":"subtitle":f.includes("public.accessibility.describes-video")&&(g="visually impaired"),f.length||"subtitle"!==l||f.push("subtitle"),{id:e.u++,originalId:a,groupId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:h,codecs:t,kind:n==gt?"subtitle":void 0,encrypted:!1,drmInfos:[],keyIds:new Set,language:jt(r||"und"),originalLanguage:r,label:a,type:n,primary:i,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:f,forced:c,channelsCount:o,audioSamplingRate:d,spatialAudio:p,closedCaptions:s,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,accessibilityPurpose:g,external:!1,fastSwitching:!1}}function zf(e,t){var n=[];if(e.segments)for(var r=(e=u(e.segments)).next();!r.done;r=e.next())r=rf(r.value.g,"EXT-X-KEY"),n.push.apply(n,c(r));r=e=!1;for(var i=[],a=new Set,o=(n=u(n)).next();!o.done;o=n.next()){var s=ef(o=o.value,"METHOD");if("NONE"!=s)if(e=!0,"AES-128"==s)r=!0;else if(s=Zh(o,"KEYFORMAT")||"identity",o=(s=lg[s])?s(o,t):null){if(o.keyIds)for(var l=(s=u(o.keyIds)).next();!l.done;l=s.next())a.add(l.value);i.push(o)}}return{drmInfos:i,keyIds:a,encrypted:e,vg:r}}function Wf(t,n,r,i,a){if(!e.crypto||!e.crypto.subtle)throw W("Web Crypto API is not available to decrypt AES-128. (Web Crypto only exists in secure origins like https)"),new ut(2,4,4042);var o=0,s=Zh(n,"IV","");if(s){var l=li(s.substr(2));if(16!=l.byteLength)throw new ut(2,4,4048)}else o=sf(r.g,"EXT-X-MEDIA-SEQUENCE",0);var u={method:"AES-128",iv:l,firstMediaSequenceNumber:o,fetchKey:function(){var r,o,s,l,c;return R((function(d){if(1==d.g)return r=lf(i(),ef(n,"URI"),a),o=Er([r],t.g.retryParameters),_(d,ag(t,o,6),2);if(3!=d.g){if(!(s=d.h).data||16!=s.data.byteLength)throw new ut(2,4,4049);return l={name:"AES-CBC"},c=u,_(d,e.crypto.subtle.importKey("raw",s.data,l,!0,["decrypt"]),3)}c.cryptoKey=d.h,u.fetchKey=void 0,E(d)}))}};return u}function Yf(e,t){var n=1/0,r=t.segments;if(r.length)for(var i=r.length-1;0<=i;){var a=of(r[i].g,"EXTINF");if(a){n=Number(a.value.split(",")[0]);break}i--}if(!(r=of(t.g,"EXT-X-TARGETDURATION")))throw new ut(2,4,4024,"EXT-X-TARGETDURATION");r=Number(r.value),(i=of(t.g,"EXT-X-PART-INF"))&&(e.K=Number(ef(i,"PART-TARGET"))),t=of(t.g,"EXT-X-SERVER-CONTROL"),e.A&&e.K?(e.m=e.gb?5*e.K<=n?Math.min(e.K,e.m):Math.min(n,e.m):Math.min(e.K,e.m),e.ga=t?Number(ef(t,"PART-HOLD-BACK")):0):(e.m=Math.min(n,e.m),n=t?t.getAttribute("HOLD-BACK"):null,e.fa=n?Number(n.value):0),e.wa=Math.max(r,e.wa)}function qf(e,t){if(e.g.defaultPresentationDelay)t=e.g.defaultPresentationDelay;else if(e.ga)t=e.ga;else if(e.fa)t=e.fa;else{t=t.segments.length;var n=e.g.hls.liveSegmentsDelay;n>t-2&&(n=Math.max(1,t-2)),t=e.wa*n}e.l.ig(0),e.l.hg(t),e.l.kc(!1)}function Xf(e,t,n,r,i){var a=of(n,"EXT-X-MAP");if(!a)return null;var o=ef(a,"URI"),s=lf(r(),o,i);if(o=[s.toString(),Zh(a,"BYTERANGE","")].join("-"),!e.na.has(o)){for(var l=void 0,c=null,d=(n=u(n)).next();!d.done;d=n.next())"EXT-X-KEY"==(d=d.value).name?"AES-128"==ef(d,"METHOD")&&d.id<a.id&&(l=Wf(e,d,t,r,i)):"EXT-X-BYTERANGE"==d.name&&d.id<a.id&&(c=d);t=function(e,t,n,r){var i=0,a=null;return!(t=Zh(t,"BYTERANGE"))&&n&&(t=n.value),t&&(i=t.split("@"),a=Number(i[0]),i=Number(i[1]),a=i+a-1,r&&((n=a+1-i)%16&&(a+=16-n%16))),new pa((function(){return e}),i,a,null,null,null,r)}(s,a,c,l),e.na.set(o,t)}return e.na.get(o)}function Qf(t,n,r,i,a,o,s,l,c){var d=i.g,p=of(d,"EXTINF"),h=0,f=0,g=null;i.$a.length&&!t.A&&W("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details.");var y=null;if(!t.g.hls.ignoreManifestProgramDateTime){var v=of(d,"EXT-X-PROGRAM-DATE-TIME");v&&v.value&&(y=ki(v.value))}var m=ga;if(of(d,"EXT-X-GAP")&&(m=2),!p){if(0==i.$a.length)throw new ut(2,4,4024,"EXTINF");if(!t.A)return null}var b=[];v=!1;var _=null,E=!1,k=!1;if(t.A&&i.$a.length){h=("video/mp4"==s.mimeType||"audio/mp4"==s.mimeType)&&e.ReadableStream&&t.g.hls.allowLowLatencyByteRangeOptimization;for(var T=y,A={},w=0;w<i.$a.length;A={yc:A.yc,kd:A.kd},w++){var S=i.$a[w],C=0==w?r:b[b.length-1],x=0==w?a:C.endTime,I=Number(Zh(S,"DURATION"))||t.K;if(I){var P=x+I,D=0,R=null;if("EXT-X-PRELOAD-HINT"==S.name?(D=(D=Zh(S,"BYTERANGE-START"))?Number(D):0,(C=Zh(S,"BYTERANGE-LENGTH"))?R=D+Number(C)-1:D&&(R=Number.MAX_SAFE_INTEGER)):(D=(R=u($f(C,D=Zh(S,"BYTERANGE")))).next().value,R=R.next().value),A.kd=Zh(S,"URI"),A.kd){C=ga,"YES"==Zh(S,"GAP")&&(C=2,E=!0),A.yc=null;var L=function(e){return function(){return null==e.yc&&(e.yc=lf(l(),e.kd,o)),e.yc}}(A);h&&0<=D&&null!=R&&(_=L,v=!0),x=new fa(x,P,L,D,R,n,0,0,1/0,[],"",null,T,C,c),"EXT-X-PRELOAD-HINT"==S.name&&(x.Qe(),k=!0),"YES"!=Zh(S,"INDEPENDENT")&&0<w&&x.Jd(),b.push(x),T&&(T+=I)}}}}if(p){if(0==(p=Number(p.value.split(",")[0])))return null;h=a+p}else{if(!b.length)return null;h=b[b.length-1].endTime}v&&(E||0!=b[0].Na?(v=!1,_=null):b=[]),(p=of(d,"EXT-X-BYTERANGE"))?(f=(g=u($f(r,p.value))).next().value,g=g.next().value):b.length&&(f=b[0].Na,g=b[b.length-1].ta),r="",p=null,"image"==s.type&&(r="1x1",s=of(d,"EXT-X-TILES"))&&(r=ef(s,"LAYOUT"),(s=Zh(s,"DURATION"))&&(p=Number(s)));var O=null;return n=new fa(a,h,(function(){return _?_():(null==O&&(O=lf(l(),i.h,o)),O||[])}),f,g,n,0,0,1/0,b,r,p,y,m,c,0<b.length&&!!i.h),v&&(t.gb=!0,n.Rf(),k&&n.Qe()),n}function $f(e,t){var n=0,r=null;return t&&(n=t.split("@"),t=Number(n[0]),r=(n=n[1]?Number(n[1]):e.ta+1)+t-1),[n,r]}function Jf(e,t,n,r,i,a){var o=t.segments,s=void 0,l=sf(t.g,"EXT-X-DISCONTINUITY-SEQUENCE",0),c=sf(t.g,"EXT-X-MEDIA-SEQUENCE",0),d=of(t.g,"EXT-X-SKIP"),p=d?Number(Zh(d,"SKIPPED-SEGMENTS")):0,h=c+p,f=0;rg(e)&&r.has(h)&&(f=r.get(h));var g=[],y=null;d=[];for(var v=0;v<o.length;v++){var m=o[v],b=0==v?f:y.endTime;h=c+p+v,of(m.g,"EXT-X-DISCONTINUITY")&&l++;for(var _=u(m.g),E=_.next();!E.done;E=_.next())"EXT-X-KEY"==(E=E.value).name&&(s="AES-128"==ef(E,"METHOD")?Wf(e,E,t,a,i):void 0);r.set(h,b),_=Xf(e,t,m.g,a,i),!e.A&&e.h.isAutoLowLatencyMode()&&(e.h.enableLowLatencyMode(),e.A=e.h.isLowLatencyMode()),(b=Qf(e,_,y,m,b,i,n,a,s))&&((y=sf(m.g,"EXT-X-BITRATE"))?d.push({bitrate:y,duration:b.endTime-b.startTime}):d.length&&((y=d.pop()).duration+=b.endTime-b.startTime,d.push(y)),y=b,b.j=l,e.g.hls.ignoreManifestProgramDateTime&&null!=e.I&&h<e.I||g.push(b))}if(t=void 0,d.length&&(t=d.reduce((function(e,t){return e+t.duration}),0),t=Math.round(d.reduce((function(e,t){return e+t.bitrate*t.duration}),0)/t*1e3)),d=g.some((function(e){return null!=e.h})))for(n={},r=0;r<g.length;n={qc:n.qc,pc:n.pc,fd:n.fd,sb:n.sb,oc:n.oc},r++)if(n.sb=g[r],null==n.sb.h)for(n.pc=0,n.qc=r,i=function(e){return function(){var t=g[e.qc];if(t){if(null!=t.h)return t.h+e.pc;e.pc-=t.endTime-t.startTime,e.qc+=1}return null}}(n),n.oc=0,n.fd=r,a=function(e){return function(){var t=g[e.fd];if(t){if(t!=e.sb&&(e.oc+=t.endTime-t.startTime),null!=t.h)return t.h+e.oc;--e.fd}return null}}(n);null==n.sb.h;)n.sb.h=a(),null==n.sb.h&&(n.sb.h=i());if(d)for(r=(n=u(g)).next();!r.done;r=n.next())for(r=(i=r.value).h,a=(i=u(i.g)).next();!a.done;a=i.next())(a=a.value).h=r,r+=a.endTime-a.startTime;if(e=e.V,d&&1/0!=e)for(r=(d=u(g)).next();!r.done;r=d.next())r.value.kf(e);return{segments:g,bandwidth:t}}function Zf(e,t){if(e==gt){if("vtt"==t||"wvtt"==t)return"text/vtt";if(t&&""!==t)return"application/mp4"}return"image"!=e||t&&"jpeg"!=t?"audio"==e&&"mp4a.40.34"==t?"audio/mpeg":"mjpg"==t?"application/mp4":null:"image/jpeg"}function eg(e){return e==gt?"text/vtt":sg[e].mp4}function tg(e,t,n,r,i,a){e&&(e.width=Number(t)||void 0,e.height=Number(n)||void 0,e.frameRate=Number(r)||void 0,e.hdr=i||void 0,e.videoLayout=a||void 0)}function ng(e,t,n){return ag(e,Er(t,e.g.retryParameters),0,{type:n?2:3})}function rg(e){return e.xa!=ug}function ig(e,t){e.xa=t,e.l&&e.l.kc(!rg(e)),rg(e)||e.s.stop()}function ag(e,t,n,r){if(!e.N)throw new ut(2,7,7001);return t=e.h.networkingEngine.request(n,t,r),mr(e.N,t),t.promise}j("shaka.net.DataUriPlugin",bf),bf.parse=_f,_r("data",_f),(r=Af.prototype).configure=function(e){this.g=e,this.j&&this.j.configure(this.g)},r.start=function(e,t){var n,r=this;return R((function(i){return 1==i.g?(r.h=t,r.A=t.isLowLatencyMode(),_(i,ng(r,[e]),2)):3!=i.g?(n=i.h,r.W=n.uri,_(i,function(e,t,n){var r,i,a,o,s,l,d,p,h,f,g,y,v,m,b,T,A,S,C,x,I,P,D,L,O,M,N,U,F,B;return R((function(j){switch(j.g){case 1:return r=gf(e.la,t),i=rf(r.g,"EXT-X-DEFINE"),a=[],o=[],s=[],1==r.type?_(j,xf(e,r,v=function(){return[n]}),6):(function(e,t){for(var n=new Ye(e.W).g,r=(t=u(t)).next();!r.done;r=t.next()){var i=r.value;r=Zh(i,"NAME");var a=Zh(i,"VALUE");i=Zh(i,"QUERYPARAM"),r&&a&&(e.o.has(r)||e.o.set(r,a)),i&&(r=n.get(i)[0])&&!e.o.has(r)&&e.o.set(i,r)}}(e,i),l=rf(r.g,"EXT-X-MEDIA"),d=rf(r.g,"EXT-X-STREAM-INF"),p=rf(r.g,"EXT-X-IMAGE-STREAM-INF"),h=rf(r.g,"EXT-X-I-FRAME-STREAM-INF"),f=rf(r.g,"EXT-X-SESSION-KEY"),g=rf(r.g,"EXT-X-SESSION-DATA"),y=rf(r.g,"EXT-X-CONTENT-STEERING"),function(e,t){for(var n=(t=u(t)).next();!n.done;n=t.next()){var r=n.value,i=Zh(r,"DATA-ID");n=Zh(r,"URI");var a=Zh(r,"LANGUAGE");r=Zh(r,"VALUE"),i=(new Map).set("id",i),n&&i.set("uri",lf([e.W],n,e.o)[0]),a&&i.set("language",a),r&&i.set("value",r),n=new hr("sessiondata",i),e.h&&e.h.onEvent(n)}}(e,g),_(j,function(e,t){var n,r,i,a,o,s;return R((function(l){if(!e.h||!e.g)return l.return();for(r=u(t),i=r.next();!i.done;i=r.next())if(a=i.value,o=Zh(a,"PATHWAY-ID"),s=Zh(a,"SERVER-URI"),o&&s){e.j=new eh(e.h),e.j.configure(e.g),e.j.j=[e.W],e.j.setManifestType("HLS"),e.j.h=o,n=th(e.j,s);break}return _(l,n,0)}))}(e,y),4));case 4:return function(e,t){for(var n=(t=u(t)).next();!n.done;n=t.next()){var r=n.value,i=Zh(r,"AUDIO");n=Zh(r,"VIDEO");var a=Zh(r,"SUBTITLES");if(r=Rf(e,r),a){var o=ft(gt,r);e.G.set(a,o),fe(r,o)}i&&((a=ft("audio",r))||(a=e.g.hls.defaultAudioCodec),e.G.set(i,a)),n&&((i=ft("video",r))||(i=e.g.hls.defaultVideoCodec),e.G.set(n,i))}}(e,d),function(e,t){for(var n=(t=u(t=af(t,"CLOSED-CAPTIONS"))).next();!n.done;n=t.next()){var r=n.value,i=Zh(r,"LANGUAGE");n=jt(i||"und"),i||(i=Zh(r,"NAME"))&&(n=i),i=ef(r,"GROUP-ID"),r=ef(r,"INSTREAM-ID").replace("SERVICE","svc"),e.F.get(i)||e.F.set(i,new Map),e.F.get(i).set(r,n)}}(e,l),a=function(e,t,n,r){var i=[],a=new Set;if(0<n.length)for(var o=(n=u(n)).next();!o.done;o=n.next()){var s=ef(o=o.value,"METHOD");if("NONE"!=s&&"AES-128"!=s&&(s=Zh(o,"KEYFORMAT")||"identity",o=(s=lg[s])?s(o,""):null)){if(o.keyIds)for(var l=(s=u(o.keyIds)).next();!l.done;l=s.next())a.add(l.value);i.push(o)}}for(n={},t=u(t),o=t.next();!o.done;o=t.next())o=o.value,s=Jh(o),n[s]?n[s].push(o):n[s]=[o];for(var d in t=[],n){var p=(l=n[d])[0];o=Zh(p,"FRAME-RATE"),s=Number(Zh(p,"AVERAGE-BANDWIDTH"))||Number(ef(p,"BANDWIDTH"));var h=Zh(p,"RESOLUTION"),f=u(h?h.split("x"):[null,null]);h=f.next().value,f=f.next().value;var g=Zh(p,"VIDEO-RANGE");(p=Zh(p,"REQ-VIDEO-LAYOUT"))&&p.includes(",")&&(p=p.split(",").filter((function(e){return"CH-STEREO"==e||"CH-MONO"==e}))[0]),p=p||"CH-MONO",l=Df(e,l,r),t.push.apply(t,c(Nf(e,l.audio,l.video,s,h,f,o,g,p,i,a)))}return t.filter((function(e){return null!=e}))}(e,d,f,l),o=function(e,t){var n=af(t,"SUBTITLES");t=n.map((function(t){if(e.g.disableText)return null;try{return Uf(e,[t],new Map).stream}catch(t){if(e.g.hls.ignoreTextStreamFailures)return null;throw t}}));for(var r=(n=u(n)).next();!r.done;r=n.next()){var i=ef(r.value,"GROUP-ID");if((r=e.G.get(i))&&(i=e.H.get(i)))for(var a=(i=u(i)).next();!a.done;a=i.next())(a=a.value).stream.codecs=r,a.stream.mimeType=Zf(gt,r)||eg(gt)}return t.filter((function(e){return e}))}(e,l),_(j,function(e,t,n){var r,i;return R((function(a){return 1==a.g?(r=t.map((function(t){var n,r;return R((function(i){if(1==i.g)return e.g.disableThumbnails?i.return(null):(k(i,2),_(i,function(e,t){var n,r,i,a,o,s,l,u,c,d;return R((function(p){return 1==p.g?(n=ef(t,"URI"),r=Zh(t,"CODECS","jpeg")||"",e.i.has(n)?p.return(e.i.get(n)):(i=Zh(t,"LANGUAGE"),a=Zh(t,"NAME"),o=Zh(t,"CHARACTERISTICS"),s=Ff(e,e.u++,[n],r,"image",i,!1,a,null,null,o,!1,null,!1),(l=Zh(t,"RESOLUTION"))?_(p,s.stream.createSegmentIndex(),3):p.B(2))):(2!=p.g&&(u=s.stream.segmentIndex.get(0),c=u.tilesLayout)&&(s.stream.width=Number(l.split("x")[0])*Number(c.split("x")[0]),s.stream.height=Number(l.split("x")[1])*Number(c.split("x")[1])),(d=Zh(t,"BANDWIDTH"))&&(s.stream.bandwidth=Number(d)),e.i.set(n,s),p.return(s))}))}(e,t),4));if(2!=i.g)return n=i.h,i.return(n.stream);if(r=w(i),e.g.hls.ignoreImageStreamFailures)return i.return(null);throw r}))})).concat(n.map((function(t){if(e.g.disableThumbnails)return null;try{var n=ef(t,"URI"),r=Zh(t,"CODECS")||"";if(e.i.has(n))var i=e.i.get(n);else{var a=Zh(t,"LANGUAGE"),o=Zh(t,"NAME"),s=Zh(t,"CHARACTERISTICS"),l=Ff(e,e.u++,[n],r,"image",a,!1,o,null,null,s,!1,null,!1),c=Zh(t,"RESOLUTION"),d=u(c?c.split("x"):[null,null]),p=d.next().value,h=d.next().value;l.stream.width=Number(p)||void 0,l.stream.height=Number(h)||void 0;var f=Zh(t,"BANDWIDTH");f&&(l.stream.bandwidth=Number(f)),e.i.set(n,l),i=l}return"mjpg"!==(t=i).stream.codecs?null:t.stream}catch(t){if(e.g.hls.ignoreImageStreamFailures)return null;throw t}}))),_(a,Promise.all(r),2)):(i=a.h,a.return(i.filter((function(e){return e}))))}))}(e,p,h),5);case 5:s=j.h,j.B(3);break;case 6:return m=j.h,b=m.type,T=m.mimeType,A=m.codecs,S=m.language,C=m.height,x=m.width,I=m.channelCount,P=m.sampleRate,D=m.closedCaptions,_(j,Vf(e,e.u++,r,v,n,A,b,S,!0,"Media Playlist",I,D,null,!1,P,!1,T),7);case 7:L=j.h,e.i.set(n,L),"video"==b&&tg(L.stream,x,C,null,null,null),a.push({id:0,language:jt(S||"und"),disabledUntilTime:0,primary:!0,audio:"audio"==b?L.stream:null,video:"video"==b?L.stream:null,bandwidth:L.stream.bandwidth||0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});case 3:if(!e.h)throw new ut(2,7,7001);if(e.l=new Po(null,0),e.l.kc(!0),1==r.type&&(rg(e)&&(qf(e,r),O=e.m,e.s.U(O)),M=Array.from(e.i.values()),Hf(e,M),If(e)),e.C={presentationTimeline:e.l,variants:a,textStreams:o,imageStreams:s,offlineSessionIds:[],minBufferTime:0,sequenceMode:e.g.hls.sequenceMode,ignoreManifestTimestampsInSegmentsMode:e.g.hls.ignoreManifestTimestampsInSegmentsMode,type:"HLS",serviceDescription:null},e.Z||!e.g.hls.disableCodecGuessing){j.B(8);break}for(N=[],U=u(e.C.variants),F=U.next();!F.done;F=U.next())(B=F.value).audio&&""===B.audio.codecs&&N.push(B.audio.createSegmentIndex()),B.video&&""===B.video.codecs&&N.push(B.video.createSegmentIndex());return _(j,Promise.all(N),8);case 8:e.h.makeTextStreamsForClosedCaptions(e.C),E(j)}}))}(r,n.data,e),3)):i.return(r.C)}))},r.stop=function(){this.s&&(this.s.stop(),this.s=null);var e=[];return this.N&&(e.push(this.N.destroy()),this.N=null),this.g=this.h=null,this.Da.clear(),this.C=null,this.i.clear(),this.H.clear(),this.G.clear(),this.o.clear(),this.j&&this.j.destroy(),Promise.all(e)},r.update=function(){var e,t,n,r,i,a,o,s,l=this;return R((function(d){if(1==d.g){if(!rg(l))return d.return();for(e=[],t=Array.from(l.i.values()),l.m=1/0,n=t.filter((function(e){return e.stream.segmentIndex})),r=u(n),i=r.next();!i.done;i=r.next())a=i.value,e.push(Sf(l,a));return _(d,Promise.all(e),2)}jf(l,n.map((function(e){return e.stream}))),o=n.some((function(e){return 0==e.Rc})),n.length&&!o&&(ig(l,pg.rg),s=n.map((function(e){return e.nb})),l.l.Ma(Math.min.apply(Math,c(s))),l.h.updateDuration()),o&&If(l),E(d)}))},r.onExpirationUpdated=function(){},r.onInitialVariantChosen=function(){},r.banLocation=function(e){this.j&&this.j.i.set(e,Date.now()+6e4)},j("shaka.hls.HlsParser",Af);var og={aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},sg={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",tsa:"video/mp2t"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t",tsv:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},lg={"com.apple.streamingkeydelivery":function(t,n){if("video/mp2t"==n)throw new ut(2,4,4040);if(e.shakaMediaKeysPolyfill)throw new ut(2,4,4041);return pt("com.apple.fps",[{initDataType:"sinf",initData:new Uint8Array(0),keyId:null}])},"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=ef(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?(t=pt("com.widevine.alpha",[{initDataType:"cenc",initData:t=ae((t=Ef(t=ef(e,"URI"))).data)}]),(e=Zh(e,"KEYID"))&&(t.keyIds=new Set([e.toLowerCase().substr(2)])),t):null},"com.microsoft.playready":function(e){var t=ef(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?pt("com.microsoft.playready",[{initDataType:"cenc",initData:e=pi(e=ae((e=Ef(e=ef(e,"URI"))).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]),new Set,0)}]):null},identity:function(e){return e=ef(e,"METHOD"),["SAMPLE-AES","SAMPLE-AES-CTR"].includes(e)?pt("org.w3.clearkey",null):null}},ug="VOD",cg="EVENT",dg="LIVE",pg={rg:ug,ei:cg,mi:dg};function hg(e){if(e=fg(e))e:{for(var t=(e=u(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())if(t=hi(t.value,"LA_URL")){e=t.textContent;break e}e=""}else e="";return e}function fg(e){return(e=function(e){var t=0,n=se(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,0!=(1&i)||i+e>n.byteLength){n=[];break e}var a=ae(n,e,i);t.push({type:r,value:a}),e+=i}n=t}return n}(e=si(e.textContent)).filter((function(e){return e.type===gg}))[0])&&(e=Di(e=jr(e.value,!0),"WRMHEADER"))?e:null}la["application/x-mpegurl"]=function(){return new Af},la["application/vnd.apple.mpegurl"]=function(){return new Af};var gg=1,yg=(new Map).set("com.microsoft.playready",hg).set("com.microsoft.playready.recommendation",hg).set("com.microsoft.playready.software",hg).set("com.microsoft.playready.hardware",hg);function vg(e){if(!Cg){Cg=!0;var t=new Uint8Array([105,115,111,109]),n=new Uint8Array([97,118,99,49]),r=new Uint8Array([0,0,0,1]);Bg=Sg("ftyp",t,r,t,n),t=Sg("dref",jg),Hg=Sg("dinf",t)}this.g=e}function mg(e){for(var t=new Uint8Array([]),n=u(e.g),r=n.next();!r.done;r=n.next()){var i=t;t=r.value,r=Sg;var a=t.id+1,o=t.stream.width||0,s=t.stream.height||0;"audio"==t.type&&(s=o=0);var l=t.duration*t.timescale,d=Math.floor(l/(xg+1));switch(l=Math.floor(l%(xg+1)),a=Sg("tkhd",a=new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(c(Ag(a,4)),[0,0,0,0],c(Ag(d,4)),c(Ag(l,4)),[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],c(Ag(o,2)),[0,0],c(Ag(s,2)),[0,0]))),o=Sg,d=t.duration*t.timescale,s=Math.floor(d/(xg+1)),d=Math.floor(d%(xg+1)),l=(l=t.stream.language).charCodeAt(0)-96<<10|l.charCodeAt(1)-96<<5|l.charCodeAt(2)-96,s=Sg("mdhd",s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(c(Ag(t.timescale,4)),c(Ag(s,4)),c(Ag(d,4)),c(Ag(l,2)),[0,0]))),d=t,l=new Uint8Array([]),d.type){case"video":l=Pg;break;case"audio":l=Dg}d=Sg("hdlr",l);e:{switch(t.type){case"video":t=Sg("minf",Sg("vmhd",Ng),Hg,bg(t));break e;case"audio":t=Sg("minf",Sg("smhd",Ug),Hg,bg(t));break e}t=new Uint8Array([])}t=ci(i,r=r("trak",a,t=o("mdia",s,d,t)))}for(n=Sg,a=(r=e.g[0]).duration*r.timescale,i=Math.floor(a/(xg+1)),a=Math.floor(a%(xg+1)),i=Sg("mvhd",i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3].concat(c(Ag(r.timescale,4)),c(Ag(i,4)),c(Ag(a,4)),[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]))),a=new Uint8Array([]),o=(e=u(e.g)).next();!o.done;o=e.next())a=ci(a,o=Sg("trex",o=new Uint8Array([0,0,0,0].concat(c(Ag(o.value.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))));if(e=Sg("mvex",a),a=new Uint8Array([]),r.encrypted)for(o=(r=u(r.stream.drmInfos)).next();!o.done;o=r.next())if((o=o.value).initData)for(s=(o=u(o.initData)).next();!s.done;s=o.next())a=ci(a,s.value.initData);return e=n("moov",i,t,e,a),(n=new Uint8Array(Bg.byteLength+e.byteLength)).set(Bg),n.set(e,Bg.byteLength),n}function bg(e){var t=Sg,n=new Uint8Array([]);switch(e.type){case"video":if(e.codecs.includes("avc1")){n=e.stream.width||0;var r=e.stream.height||0;if(0<e.ma.byteLength)var i=Sg("avcC",e.ma);else{i=Sg;for(var a=7,o=[],s=[],l=0,u=0,d=0,p=0;p<e.Oa.length;p++){var h=wg(e.Oa[p]);switch(31&h[0]){case 7:o.push(h),a+=h.length+2;break;case 8:s.push(h),a+=h.length+2}}for(0<o.length&&(l=o[0][1],d=o[0][2],u=o[0][3]),p=0,(a=new Uint8Array(a))[p++]=1,a[p++]=l,a[p++]=d,a[p++]=u,a[p++]=255,a[p++]=224|o.length,l=0;l<o.length;l++)a[p++]=(65280&o[l].length)>>8,a[p++]=255&o[l].length,a.set(o[l],p),p+=o[l].length;for(a[p++]=s.length,o=0;o<s.length;o++)a[p++]=(65280&s[o].length)>>8,a[p++]=255&s[o].length,a.set(s[o],p),p+=s[o].length;i=i("avcC",a)}n=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].concat(c(Ag(n,2)),c(Ag(r,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),r="avc1",s=new Uint8Array([]),e.encrypted&&(s=Eg(e),r="encv"),n=Sg(r,n,i,s)}else e.codecs.includes("hvc1")&&(r=e.stream.width||0,i=e.stream.height||0,n=new Uint8Array([]),0<e.ma.byteLength&&(n=Sg("hvcC",e.ma)),r=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].concat(c(Ag(r,2)),c(Ag(i,2)),[0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17])),i="hvc1",s=new Uint8Array([]),e.encrypted&&(s=Eg(e),i="encv"),n=Sg(i,r,n,s));break;case"audio":e.codecs.includes("mp3")?e=Sg(".mp3",_g(e)):e.codecs.includes("ac-3")?(n=Sg("dac3",e.ca),r="ac-3",i=new Uint8Array([]),e.encrypted&&(i=Eg(e),r="enca"),e=Sg(r,_g(e),n,i)):e.codecs.includes("ec-3")?(n=Sg("dec3",e.ca),r="ec-3",i=new Uint8Array([]),e.encrypted&&(i=Eg(e),r="enca"),e=Sg(r,_g(e),n,i)):(0<e.ca.byteLength?n=Sg("esds",e.ca):(n=Sg,r=e.id+1,i=e.stream.channelsCount||2,o=e.stream.audioSamplingRate||44100,l=ht("audio",e.codecs.split(",")),s=(u={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12})[o],"mp4a.40.5"!==l&&"mp4a.40.29"!==l||(s=u[2*o]),o=parseInt(l.split(".").pop(),10),n=n("esds",r=new Uint8Array([0,0,0,0,3,25].concat(c(Ag(r,2)),[0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,o<<3|s>>>1,s<<7|i<<3,6,1,2])))),r="mp4a",i=new Uint8Array([]),e.encrypted&&(i=Eg(e),r="enca"),e=Sg(r,_g(e),n,i)),n=e}return t("stbl",e=Sg("stsd",Fg,n),Sg("stts",Rg),Sg("stsc",Lg),Sg("stsz",Mg),Sg("stco",Og))}function _g(e){return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.stream.channelsCount||2,0,16,0,0,0,0].concat(c(Ag(e.stream.audioSamplingRate||44100,2)),[0,0]))}function Eg(e){for(var t=Sg,n=e.codecs.substring(0,e.codecs.indexOf(".")),r=0,i=0;i<n.length;i+=1)r|=n.charCodeAt(i)<<8*(n.length-i-1);n=Sg("frma",n=new Uint8Array([].concat(c(Ag(r,4))))),r=Sg("schm",r=new Uint8Array([0,0,0,0,99,101,110,99,0,1,0,0])),i=Sg;for(var a=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),o=(e=u(e.stream.drmInfos)).next();!o.done;o=e.next())if((o=o.value)&&o.keyIds&&o.keyIds.size)for(var s=(o=u(o.keyIds)).next();!s.done;s=o.next())a=wg(s.value);return t("sinf",n,r,i("schi",a=Sg("tenc",e=new Uint8Array([0,0,0,0,0,0,1,8]),a)))}function kg(e){for(var t=new Uint8Array([]),n=(e=u(e.g)).next();!n.done;n=e.next()){n=n.value;var r,i=Sg,a=new Uint8Array([0,0,0,0].concat(c(Ag(n.data?n.data.ab:0,4))));a=Sg("mfhd",a);var o=n.data?n.data.La:[],s=new Uint8Array(4+o.length);for(r=0;r<o.length;r++){var l=o[r].flags;s[r+4]=l.Ga<<4|l.Ja<<2|l.Ha}var d=(o=Sg("sdtp",s)).length+92;s=Sg,r=Sg("tfhd",r=new Uint8Array([0,0,0,58].concat(c(Ag(n.id+1,4)),[0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]))),l=n.data?n.data.baseMediaDecodeTime:0;var p=Math.floor(l%(xg+1));l=Sg("tfdt",l=new Uint8Array([1,0,0,0].concat(c(Ag(Math.floor(l/(xg+1)),4)),c(Ag(p,4)))));var h=d,f=12+16*(p=(d=n.data?n.data.La:[]).length),g=new Uint8Array(f);for(h+=8+f,g.set(["video"===n.type?1:0,0,15,1].concat(c(Ag(p,4)),c(Ag(h,4))),0),h=0;h<p;h++){var y=d[h];f=Ag(y.duration,4);var v=Ag(y.size,4),m=y.flags;y=Ag(y.Qa,4),g.set([].concat(c(f),c(v),[m.Ra<<2|m.Ga,m.Ja<<6|m.Ha<<4|m.Sa,61440&m.Fa,15&m.Fa],c(y)),12+16*h)}t=ci(t,i=i("moof",a,o=s("traf",r,l,d=Sg("trun",g),o)),Tg(n))}return t}function Tg(e){return e=(e.data?e.data.La:[]).map((function(e){return e.data})),Sg("mdat",e=ci.apply(ii,c(e)))}function Ag(e,t){var n=[];for(--t;0<=t;t--)n.push(e>>8*t&255);return n}function wg(e){for(var t=new Uint8Array(e.length/2),n=0;n<e.length/2;n+=1)t[n]=parseInt(String(e[2*n]+e[2*n+1]),16);return t}function Sg(e){var t=L.apply(1,arguments),n=Ig[e];n||(n=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)],Ig[e]=n);for(var r=8,i=t.length-1;0<=i;i--)r+=t[i].byteLength;for((i=new Uint8Array(r))[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=255&r,i.set(n,4),n=0,r=8;n<t.length;n++)i.set(t[n],r),r+=t[n].byteLength;return i}var Cg=!1,xg=Math.pow(2,32)-1,Ig={},Pg=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]),Dg=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]),Rg=new Uint8Array([0,0,0,0,0,0,0,0]),Lg=new Uint8Array([0,0,0,0,0,0,0,0]),Og=new Uint8Array([0,0,0,0,0,0,0,0]),Mg=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ng=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),Ug=new Uint8Array([0,0,0,0,0,0,0,0]),Fg=new Uint8Array([0,0,0,0,0,0,0,1]),Bg=new Uint8Array([]),jg=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Hg=new Uint8Array([]);function Vg(){var e=this;this.h=this.g=null,this.l=[],this.j=null,this.s=1,this.i=null,this.A=new H(5),this.o=new Qt((function(){!function(e){var t;R((function(n){switch(n.g){case 1:return k(n,2),_(n,Gg(e),4);case 4:A(n,3);break;case 2:t=w(n),e.h&&(t.severity=1,e.h.onError(t));case 3:if(!e.h)return n.return();E(n)}}))}(e)})),this.u=new vr,this.m=new Map}function Gg(e){var t,n,r,i,a,o,s;return R((function(l){if(1==l.g)return t=Er(e.l,e.g.retryParameters),n=e.h.networkingEngine,r=Date.now(),i=n.request(0,t,{type:5}),mr(e.u,i),_(l,i.promise,2);if(a=l.h,!e.h)return l.return();a.uri&&!e.l.includes(a.uri)&&e.l.unshift(a.uri);var d=a.uri,p=Ri(a.data,"SmoothStreamingMedia");if(!p)throw new ut(2,4,4046,d);if((d=e.g.mss.manifestPreprocessor)&&d(p),e.i||(e.i=new Po(null,0)),d=Ei(p,"IsLive",Ii,!1))throw new ut(2,4,4047);e.i.kc(!d);var h=Ei(p,"TimeScale",Ci,1e7),f=Ei(p,"DVRWindowLength",Ci);d&&(0===f||isNaN(f))&&(f=1/0);var g,y=Ei(p,"CanSeek",Ii,!1);for(0===f&&y&&(f=1/0),y=null,f&&0<f&&(y=f/h),d&&!isNaN(e.g.availabilityWindowOverride)&&(y=e.g.availabilityWindowOverride),null==y&&(y=1/0),e.i.Sd(y),f=Ei(p,"Duration",Ci,1/0),d||e.i.Ma(f/h),d={variants:[],textStreams:[],timescale:h,duration:f/h},y=gi(p,"Protection"),h=e.g.mss.keySystemsBySystemId,f=[],g=(y=u(y)).next();!g.done;g=y.next())f=f.concat(gi(g.value,"ProtectionHeader"));if(f.length){for(y=[],g=0;g<f.length;g++){var v=f[g],m=v.getAttribute("SystemID").toLowerCase(),b=h[m];if(b){var k=fg(v);if(k)e:{for(var T=(k=u(k.getElementsByTagName("DATA"))).next();!T.done;T=k.next())if(T=hi(T.value,"KID")){k=si(T.textContent),k=ui(k=new Uint8Array([k[3],k[2],k[1],k[0],k[5],k[4],k[7],k[6]].concat(c(k.slice(8)))));break e}k=null}else k=null;m=pt(b,m=[{initData:pi(T=si(v.textContent),m=li(m.replace(/-/g,"")),new Set,0),initDataType:"cenc",keyId:k}]),k&&m.keyIds.add(k),(b=yg.get(b))&&(m.licenseServerUri=b(v)),y.push(m)}}h=y}else h=[];for(g=h,y=[],h=[],f=[],v=(p=u(p=gi(p,"StreamIndex"))).next();!v.done;v=p.next()){b=gi(v=v.value,"QualityLevel"),m=d.timescale,k=d.duration,T=gi(v,"c");for(var A=[],w=0,S=0;S<T.length;++S){var C=T[S],x=T[S+1],I=Ei(C,"t",Ci),P=Ei(C,"d",Ci);if(C=Ei(C,"r",wi),!P)break;if(I=null!=I?I:w,0>(C=C||0))if(x){if(null==(x=Ei(x,"t",Ci)))break;if(I>=x)break;C=Math.ceil((x-I)/P)-1}else{if(1/0==k)break;if(I/m>=k)break;C=Math.ceil((k*m-I)/P)-1}for(x=0;x<=C;++x)w=I+P,A.push({start:I/m,end:w/m,rf:I}),I=w}for(m=A,k=(b=u(b)).next();!k.done;k=b.next())(k=Kg(e,v,k.value,m,g,d))&&("audio"!=k.type||e.g.disableAudio?"video"!=k.type||e.g.disableVideo?k.type!=gt||e.g.disableText||f.push(k):h.push(k):y.push(k))}for(p=[],g=(y=u(0<y.length?y:[null])).next();!g.done;g=y.next())for(g=g.value,k=(v=u(0<h.length?h:[null])).next();!k.done;k=v.next())m=(b=p).push,k=k.value,T=0,g&&g.bandwidth&&0<g.bandwidth&&(T+=g.bandwidth),k&&k.bandwidth&&0<k.bandwidth&&(T+=k.bandwidth),k={id:e.s++,language:g?g.language:"und",disabledUntilTime:0,primary:!!g&&g.primary||!!k&&k.primary,audio:g,video:k,bandwidth:T,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},m.call(b,k);d.variants=p,d.textStreams=f,e.j?(e.j.variants=d.variants,e.j.textStreams=d.textStreams,e.h.filter(e.j)):(e.j={presentationTimeline:e.i,variants:d.variants,textStreams:d.textStreams,imageStreams:[],offlineSessionIds:[],minBufferTime:0,sequenceMode:e.g.mss.sequenceMode,ignoreManifestTimestampsInSegmentsMode:!1,type:"MSS",serviceDescription:null},e.i.Id()),Promise.resolve(),o=Date.now(),s=(o-r)/1e3,e.A.sample(1,s),E(l)}))}function Kg(e,t,n,r,i,a){var o=t.getAttribute("Type");if("audio"!==o&&"video"!==o&&"text"!==o)return W("Ignoring unrecognized type:",o),null;var s=t.getAttribute("Language"),l=e.s++,c=Ei(n,"Bitrate",Si),d=Ei(n,"MaxWidth",Si),p=Ei(n,"MaxHeight",Si),h=Ei(n,"Channels",Si),f=Ei(n,"SamplingRate",Si),g=a.duration;r.length&&(g=r[r.length-1].end-r[0].start);var y=e.i.getDuration();e.i.Ma(Math.min(g,y));var v={id:l,originalId:t.getAttribute("Name")||String(l),groupId:null,createSegmentIndex:function(){return Promise.resolve()},closeSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:"",codecs:"",frameRate:void 0,pixelAspectRatio:void 0,bandwidth:c||0,width:d||void 0,height:p||void 0,kind:"",encrypted:0<i.length,drmInfos:i,keyIds:new Set,language:jt(s||"und"),originalLanguage:s,label:"",type:"",primary:!1,trickModeVideo:null,emsgSchemeIdUris:[],roles:[],forced:!1,channelsCount:h,audioSamplingRate:f,spatialAudio:!1,closedCaptions:null,hdr:void 0,videoLayout:void 0,tilesLayout:void 0,matchedStreams:[],mssPrivateData:{duration:g,timescale:a.timescale,codecPrivateData:null},accessibilityPurpose:null,external:!1,fastSwitching:!1};if((i=t.getAttribute("Subtype"))&&((i=Wg[i])&&v.roles.push(i),"main"===i&&(v.primary=!0)),null!==(i=n.getAttribute("FourCC"))&&""!==i||(i=t.getAttribute("FourCC")),!i)if("audio"===o)i="AAC";else if("video"===o)return W('FourCC is not defined whereas it is required for a QualityLevel element for a StreamIndex of type "video"'),null;if(!zg.includes(i.toUpperCase()))return W("Codec not supported:",i),null;switch(n=function(e,t,n,r){if(e=e.getAttribute("CodecPrivateData"))return e;if("audio"!==t)return null;t=r.channelsCount||2,e=r.audioSamplingRate||44100;var i={96e3:0,88200:1,64e3:2,48e3:3,44100:4,32e3:5,24e3:6,22050:7,16e3:8,12e3:9,11025:10,8e3:11,7350:12};return r=i[e],"AACH"===n?(n=new Uint8Array(4),e=i[2*e],n[0]=40|r>>1,n[1]=r<<7|t<<3|e>>1,n[2]=e<<7|8,n[3]=0,(t=new Uint16Array(2))[0]=(n[0]<<8)+n[1],t[1]=(n[2]<<8)+n[3],t[0].toString(16)+t[1].toString(16)):((n=new Uint8Array(2))[0]=16|r>>1,n[1]=r<<7|t<<3,(t=new Uint16Array(1))[0]=(n[0]<<8)+n[1],t[0].toString(16))}(n,o,i,v),v.mssPrivateData.codecPrivateData=n,o){case"audio":if(!n)return W("Quality unsupported without CodecPrivateData",o),null;v.type="audio",v.mimeType="mss/audio/mp4",v.codecs=function(e,t){var n=0;return"AACH"===e&&(n=5),t?0===n&&(n=(248&parseInt(t.substr(0,2),16))>>3):(n=2,"AACH"===e&&(n=5)),"mp4a.40."+n}(i,n);break;case"video":if(!n)return W("Quality unsupported without CodecPrivateData",o),null;v.type="video",v.mimeType="mss/video/mp4",v.codecs=function(e){var t=/00000001[0-9]7/.exec(e);return t.length&&e?"avc1."+e.substr(e.indexOf(t[0])+10,6):""}(n);break;case"text":v.type=gt,v.mimeType="application/mp4",("TTML"===i||"DFXP"===i)&&(v.codecs="stpp")}return v.createSegmentIndex=function(){if(v.segmentIndex)return Promise.resolve();if(e.m.has(v.id))var n=e.m.get(v.id);else n=[],"video"==v.type&&(n=v.mssPrivateData.codecPrivateData.split("00000001").slice(1)),n=mg(new vg([n={id:v.id,type:v.type,codecs:v.codecs,encrypted:v.encrypted,timescale:v.mssPrivateData.timescale,duration:v.mssPrivateData.duration,Oa:n,ca:new Uint8Array([]),ma:new Uint8Array([]),data:null,stream:v}])),e.m.set(v.id,n);return n=function(e,t,n,r,i){var a=r.getAttribute("Url").replace("{bitrate}",String(n.bandwidth));r=[];for(var o={},s=(i=u(i)).next();!s.done;o={xc:o.xc},s=i.next())o.xc=s.value,r.push(new fa(o.xc.start,o.xc.end,function(t){return function(){return dt(e.l,[a.replace("{start time}",String(t.xc.rf))])}}(o),0,null,t,0,0,n.mssPrivateData.duration));return r}(e,new pa((function(){return[]}),0,null,null,void 0,n),v,t,r),v.segmentIndex=new Qo(n),Promise.resolve()},v.closeSegmentIndex=function(){v.segmentIndex&&(v.segmentIndex.release(),v.segmentIndex=null)},v}(r=Vg.prototype).configure=function(e){this.g=e},r.start=function(e,t){var n=this;return R((function(r){if(1==r.g)return n.l=[e],n.h=t,_(r,Gg(n),2);if(!n.h)throw new ut(2,7,7001);return r.return(n.j)}))},r.stop=function(){return this.g=this.h=null,this.l=[],this.j=null,null!=this.o&&(this.o.stop(),this.o=null),this.m.clear(),this.u.destroy()},r.update=function(){var e,t=this;return R((function(n){return 1==n.g?(k(n,2),_(n,Gg(t),4)):2!=n.g?A(n,0):(e=w(n),t.h&&e?(t.h.onError(e),void E(n)):n.return())}))},r.onExpirationUpdated=function(){},r.onInitialVariantChosen=function(){},r.banLocation=function(){},j("shaka.mss.MssParser",Vg);var zg="AAC AACL AACH AACP AVC1 H264 TTML DFXP".split(" "),Wg={CAPT:"main",SUBT:"alternate",DESC:"main"};function Yg(e,t,n,r,i,a){if(200<=n&&299>=n&&202!=n)return{uri:i||r,originalUri:r,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=Hr(t)}catch(e){}throw new ut(401==n||403==n?2:1,1,1001,r,n,i,e,a)}function qg(){}function Xg(e,t,n,r,i){var a=new ty;Mr(t.headers).forEach((function(e,t){a.append(t,e)}));var o=new Zg,s={yf:!1,mg:!1};if(e=new sr(e=function(e,t,n,r,i,a,o){var s,l,u,c,d,p,h,f,g,y,v,m;return R((function(b){switch(b.g){case 1:return s=Jg,l=ey,p=d=0,h=Date.now(),k(b,2),_(b,s(e,n),4);case 4:if(u=b.h,a(Qg(u.headers)),"HEAD"==n.method){b.B(5);break}return f=u.clone().body.getReader(),y=(g=u.headers.get("Content-Length"))?parseInt(g,10):0,new l({start:function(e){!function t(){var n,r;return R((function(a){switch(a.g){case 1:return k(a,2),_(a,f.read(),4);case 4:n=a.h,A(a,3);break;case 2:return w(a),a.return();case 3:if(n.done){a.B(5);break}if(d+=n.value.byteLength,!o){a.B(5);break}return _(a,o(n.value),5);case 5:(100<(r=Date.now())-h||n.done)&&(i(r-h,d-p,y-d),p=d,h=r),n.done?e.close():(e.enqueue(n.value),t()),E(a)}}))}()}}),_(b,u.arrayBuffer(),6);case 6:c=b.h;case 5:A(b,3);break;case 2:if(v=w(b),r.yf)throw new ut(1,1,7001,e,t);if(r.mg)throw new ut(1,1,1003,e,t);throw new ut(1,1,1002,e,v,t);case 3:return m=Qg(u.headers),b.return(Yg(m,c,u.status,e,u.url,t))}}))}(e,n,{body:t.body||void 0,headers:a,method:t.method,signal:o.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},s,r,i,t.streamDataCallback),(function(){return s.yf=!0,o.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var l=new Qt((function(){s.mg=!0,o.abort()}));l.U(t/1e3),e.finally((function(){l.stop()}))}return e}function Qg(e){var t={};return e.forEach((function(e,n){t[n.trim()]=e})),t}function $g(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!!e.Response&&(!!new Response("").body&&!(!e.fetch||!e.AbortController))}la["application/vnd.ms-sstr+xml"]=function(){return new Vg},j("shaka.net.HttpFetchPlugin",qg),qg.isSupported=$g,qg.parse=Xg;var Jg=e.fetch,Zg=e.AbortController,ey=e.ReadableStream,ty=e.Headers;function ny(){}function ry(e,t,n,r,i){var a=new ay,o=Date.now(),s=0;return new sr(new Promise((function(l,u){a.open(t.method,e,!0),a.responseType="arraybuffer",a.timeout=t.retryParameters.timeout,a.withCredentials=t.allowCrossSiteCredentials,a.onabort=function(){u(new ut(1,1,7001,e,n))};var c=!1;for(var d in a.onreadystatechange=function(){if(2==a.readyState&&!c){var e=iy(a);i(e),c=!0}},a.onload=function(){var t=iy(a),r=a.response;try{var i=Yg(t,r,a.status,e,a.responseURL,n);l(i)}catch(e){u(e)}},a.onerror=function(t){u(new ut(1,1,1002,e,t,n))},a.ontimeout=function(){u(new ut(1,1,1003,e,n))},a.onprogress=function(e){var t=Date.now();(100<t-o||e.lengthComputable&&e.loaded==e.total)&&(r(t-o,e.loaded-s,e.total-e.loaded),s=e.loaded,o=t)},t.headers)a.setRequestHeader(d.toLowerCase(),t.headers[d]);a.send(t.body)})),(function(){return a.abort(),Promise.resolve()}))}function iy(e){var t=e.getAllResponseHeaders().trim().split("\r\n");e={};for(var n=(t=u(t)).next();!n.done;n=t.next())e[(n=n.value.split(": "))[0].toLowerCase()]=n.slice(1).join(": ");return e}$g()&&(_r("http",Xg,2,!0),_r("https",Xg,2,!0),_r("blob",Xg,2,!0)),j("shaka.net.HttpXHRPlugin",ny),ny.parse=ry;var ay=e.XMLHttpRequest;function oy(e,t,n,r){this.g=e,this.i=t,this.groupId=n,this.h=r}function sy(e){return e.Y().map((function(e){return"{"+encodeURI(e)+"}"})).join("")+":"+e.Na+":"+e.ta}function ly(e,t){return vs(e.g.Y(),e.g.Na,e.g.ta,t.streaming.retryParameters)}function uy(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function cy(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}function dy(e){var t=this;this.o=e,this.j=new Map,this.i=new xr((function(){return py(t).catch((function(){}))})),this.h=[],this.m=function(){},this.l=function(){},this.g=new uy}function py(e){var t=e.h.map((function(e){return e()}));return e.h=[],Promise.all(t)}function hy(e,t,n,r,i,a){Ir(e.i);var o=(e.j.get(t)||Promise.resolve()).then((function(){var t,o,s,l,u,c,d;return R((function(p){if(1==p.g)return _(p,function(e,t){var n,r,i,a;return R((function(o){return 1==o.g?(n=wr,r=e.o.request(n,t),i=function(){return r.abort()},e.h.push(i),_(o,r.promise,2)):(a=o.h,fe(e.h,i),o.return(a.data))}))}(e,n),2);if(t=p.h,e.i.g)throw new ut(2,9,7001);if(i)for(l in o=ae(t),(s=new di(o)).data)u=Number(l),c=s.data[u],d=s.g[u],e.l(c,d);e.g.close(r,t.byteLength);var h=e.g;return e.m(0==h.i?0:h.j/h.i,e.g.h),p.return(a(t))}))}));e.j.set(t,o)}function fy(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new or,e.onabort=function(e){e.preventDefault(),n.g.reject()},e.onerror=function(e){e.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function gy(e,t){return new Promise((function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(){var e;return R((function(r){if(1==r.g)return null==i.result?(n(),r.return()):(e=i.result,_(r,t(e.key,e.value,e),2));e.continue(),E(r)}))}}))}function yy(e){this.h=e,this.g=[]}function vy(e,t){return my(e,t,"readwrite")}function my(e,t,n){var r=new fy(n=e.h.transaction([t],n),t);return e.g.push(r),r.promise().then((function(){fe(e.g,r)}),(function(){fe(e.g,r)})),r}function by(e,t,n){this.h=new yy(e),this.i=t,this.g=n}function _y(e){return Promise.reject(new ut(2,9,9011,"Cannot add new value to "+e))}function Ey(e,t,n,r){t=(e=vy(e.h,t)).store();for(var i={},a=(n=u(n)).next();!a.done;i={jd:i.jd},a=n.next())i.jd=a.value,t.delete(i.jd).onsuccess=function(e){return function(){return r(e.jd)}}(i);return e.promise()}function ky(e,t,n){var r,i,a,o,s,l,c;return R((function(d){if(1==d.g){for(r=my(e.h,t,"readonly"),i=r.store(),a={},o=[],s={},l=u(n),c=l.next();!c.done;s={vc:s.vc,tc:s.tc},c=l.next())s.tc=c.value,s.vc=i.get(s.tc),s.vc.onsuccess=function(e){return function(){null==e.vc.result&&o.push(e.tc),a[e.tc]=e.vc.result}}(s);return _(d,r.promise(),2)}if(o.length)throw new ut(2,9,9012,"Could not find values for "+o);return d.return(n.map((function(e){return a[e]})))}))}function Ty(e){this.g=new yy(e)}function Ay(){this.g=new Map}function wy(e){var t=null;if(e.g.forEach((function(e,n){e.getCells().forEach((function(e,r){e.hasFixedKeySpace()||t||(t={path:{Ta:n,ya:r},ya:e})}))})),t)return t;throw new ut(2,9,9013,"Could not find a cell that supports add-operations")}function Sy(e,t,n){if(!(e=e.g.get(t)))throw new ut(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new ut(2,9,9013,"Could not find cell with name "+n);return t}function Cy(e,t){xy.set(e,t)}_r("http",ry,1,!0),_r("https",ry,1,!0),_r("blob",ry,1,!0),uy.prototype.close=function(e,t){if(this.g.has(e)){var n=this.g.get(e);this.g.delete(e),this.j+=n,this.h+=t}},dy.prototype.destroy=function(){return this.i.destroy()},fy.prototype.abort=function(){var e=this;return R((function(t){if(1==t.g){try{e.i.abort()}catch(e){}return k(t,2),_(t,e.g,4)}if(2!=t.g)return A(t,0);w(t),E(t)}))},fy.prototype.store=function(){return this.h},fy.prototype.promise=function(){return this.g},yy.prototype.destroy=function(){return Promise.all(this.g.map((function(e){return e.abort()})))},(r=by.prototype).destroy=function(){return this.h.destroy()},r.hasFixedKeySpace=function(){return!0},r.addSegments=function(){return _y(this.i)},r.removeSegments=function(e,t){return Ey(this,this.i,e,t)},r.getSegments=function(e){var t,n=this;return R((function(r){return 1==r.g?_(r,ky(n,n.i,e),2):(t=r.h,r.return(t.map((function(e){return n.Af(e)}))))}))},r.addManifests=function(){return _y(this.g)},r.updateManifest=function(){return Promise.reject(new ut(2,9,9016,"Cannot modify values in "+this.g))},r.updateManifestExpiration=function(e,t){var n=vy(this.h,this.g),r=n.store();return r.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,r.put(n,e))},n.promise()},r.removeManifests=function(e,t){return Ey(this,this.g,e,t)},r.getManifests=function(e){var t,n=this;return R((function(r){return 1==r.g?_(r,ky(n,n.g,e),2):(t=r.h,r.return(Promise.all(t.map((function(e){return n.Jc(e)})))))}))},r.getAllManifests=function(){var e,t,n=this;return R((function(r){return 1==r.g?(e=my(n.h,n.g,"readonly"),t=new Map,_(r,gy(e,(function(e,r){var i;return R((function(a){if(1==a.g)return _(a,n.Jc(r),2);i=a.h,t.set(e,i),E(a)}))})),2)):3!=r.g?_(r,e.promise(),3):r.return(t)}))},r.Af=function(e){return e},r.Jc=function(e){return Promise.resolve(e)},r.add=function(e,t){var n,r,i,a,o,s,l,c=this;return R((function(d){if(1==d.g){for(n=vy(c.h,e),r=n.store(),i=[],a={},o=u(t),s=o.next();!s.done;a={ld:a.ld},s=o.next())l=s.value,a.ld=r.add(l),a.ld.onsuccess=function(e){return function(){i.push(e.ld.result)}}(a);return _(d,n.promise(),2)}return d.return(i)}))},Ty.prototype.destroy=function(){return this.g.destroy()},Ty.prototype.getAll=function(){var e,t,n=this;return R((function(r){return 1==r.g?(e=my(n.g,"session-ids","readonly"),t=[],_(r,gy(e,(function(e,n){t.push(n)})),2)):3!=r.g?_(r,e.promise(),3):r.return(t)}))},Ty.prototype.add=function(e){for(var t=vy(this.g,"session-ids"),n=t.store(),r=(e=u(e)).next();!r.done;r=e.next())n.add(r.value);return t.promise()},Ty.prototype.remove=function(e){var t,n=this;return R((function(r){return 1==r.g?_(r,gy(t=vy(n.g,"session-ids"),(function(t,n,r){e.includes(n.sessionId)&&r.delete()})),2):_(r,t.promise(),0)}))},Ay.prototype.destroy=function(){for(var e=[],t=u(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},Ay.prototype.init=function(){var e=this;xy.forEach((function(t,n){(t=t())&&e.g.set(n,t)}));for(var t=[],n=u(this.g.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)},j("shaka.offline.StorageMuxer",Ay),Ay.unregister=function(e){xy.delete(e)},Ay.register=Cy,Ay.prototype.destroy=Ay.prototype.destroy;var xy=new Map;function Iy(){by.apply(this,arguments)}function Py(e,t){!function(e){var t=e.streams.filter((function(e){return"audio"==e.contentType}));if(e=e.streams.filter((function(e){return"video"==e.contentType})),!t.every((function(e){return e.variantIds}))||!e.every((function(e){return e.variantIds}))){for(var n=u(t),r=n.next();!r.done;r=n.next())r.value.variantIds=[];for(n=u(e),r=n.next();!r.done;r=n.next())r.value.variantIds=[];if(n=0,e.length&&!t.length){var i=n++,a=u(e);for(r=a.next();!r.done;r=a.next())r.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,a=u(t),r=a.next();!r.done;r=a.next())r.value.variantIds.push(i);if(e.length&&t.length)for(t=u(t),r=t.next();!r.done;r=t.next())for(r=r.value,i=u(e),a=i.next();!a.done;a=i.next()){a=a.value;var o=n++;r.variantIds.push(o),a.variantIds.push(o)}}}(e);for(var n=u(e.streams),r=n.next();!r.done;r=n.next());return e.streams.map((function(n){return function(e,t,n){var r=e.initSegmentUri?Dy(e.initSegmentUri):null,i=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,initSegmentKey:r,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map((function(e){var n=Dy(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:r,appendWindowStart:t,appendWindowEnd:a,timestampOffset:i,tilesLayout:""}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}(n,e.startTime,t)}))}function Dy(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new ut(2,9,9004,"Could not parse uri "+e)}function Ry(){by.apply(this,arguments)}function Ly(e,t,n){return{id:e.id,originalId:e.originalId,groupId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,videoLayout:void 0,kind:e.kind,language:e.language,originalLanguage:e.language||null,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map((function(r){return{startTime:t+r.startTime,endTime:t+r.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:r.dataKey,tilesLayout:""}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0,external:!1,fastSwitching:!1}}function Oy(){by.apply(this,arguments)}function My(){this.m=this.j=this.i=this.h=this.g=this.l=null}function Ny(e,t,n,r){this.g=e,this.i=t,this.h=n,this.l=r,this.j=["offline:",e,"/",t,"/",n,"/",r].join("")}function Uy(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var r=e[3];return r&&null!=t?new Ny(t,n,r,Number(e[4])):null}function Fy(e,t){this.h=e,this.g=t}function By(e,t){var n=new Po(null,0);n.Ma(t.duration);var r=t.streams.filter((function(e){return"audio"==e.type})),i=t.streams.filter((function(e){return"video"==e.type}));r=function(e,t,n,r){for(var i=new Set,a=u(t),o=a.next();!o.done;o=a.next()){var s=u(o.value.variantIds);for(o=s.next();!o.done;o=s.next())i.add(o.value)}for(a=u(n),o=a.next();!o.done;o=a.next())for(s=u(o.value.variantIds),o=s.next();!o.done;o=s.next())i.add(o.value);for(a=new Map,i=u(i),o=i.next();!o.done;o=i.next())o=o.value,a.set(o,{id:o,language:"",disabledUntilTime:0,primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=u(t),i=t.next();!i.done;i=t.next())for(i=i.value,o=jy(e,i,r),s=u(i.variantIds),i=s.next();!i.done;i=s.next())(i=a.get(i.value)).language=o.language,i.primary=i.primary||o.primary,i.audio=o;for(n=u(n),t=n.next();!t.done;t=n.next())for(i=t.value,t=jy(e,i,r),o=u(i.variantIds),i=o.next();!i.done;i=o.next())(i=a.get(i.value)).primary=i.primary||t.primary,i.video=t;return a}(e,r,i,n),i=t.streams.filter((function(e){return e.type==gt})).map((function(t){return jy(e,t,n)}));var a=t.streams.filter((function(e){return"image"==e.type})).map((function(t){return jy(e,t,n)})),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=u(r.values()),l=s.next();!l.done;l=s.next())(l=l.value).audio&&l.audio.encrypted&&(l.audio.drmInfos=o),l.video&&l.video.encrypted&&(l.video.drmInfos=o);return{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,variants:Array.from(r.values()),textStreams:i,imageStreams:a,sequenceMode:t.sequenceMode||!1,ignoreManifestTimestampsInSegmentsMode:!1,type:t.type||"UNKNOWN",serviceDescription:null}}function jy(e,t,n){var r=t.segments.map((function(t){return function(e,t){var n=new Ny("segment",e.h,e.g,t.dataKey);return new fa(t.startTime,t.endTime,(function(){return[n.toString()]}),0,null,null!=t.initSegmentKey?function(e,t){var n=new Ny("segment",e.h,e.g,t);return new pa((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||"")}(e,t)}));return n.Wc(r),{id:t.id,originalId:t.originalId,groupId:t.groupId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new Qo(r),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,videoLayout:t.videoLayout,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,originalLanguage:t.originalLanguage||null,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout,accessibilityPurpose:null,external:t.external,fastSwitching:t.fastSwitching}}function Hy(){this.g=null}function Vy(){}function Gy(e){var t=Uy(e);return t&&"manifest"==t.g?e=cr(e={uri:e,originalUri:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):e=t&&"segment"==t.g?function(e,t){var n=new Ay;return cr(void 0).pa((function(){return n.init()})).pa((function(){return Sy(n,t.Ta(),t.ya())})).pa((function(e){return e.getSegments([t.key()])})).pa((function(e){return{uri:t,data:e[0].data,headers:{}}})).finally((function(){return n.destroy()}))}(t.key(),t):lr(new ut(2,1,9004,e)),e}function Ky(e,t,n){var r,i,a,o,s,l;return R((function(c){switch(c.g){case 1:r=[];for(var d=[],p=u(n),h=p.next();!h.done;h=p.next()){h=h.value;for(var f=!1,g=u(d),y=g.next();!y.done;y=g.next())if(zy((y=y.value).info,h)){y.sessionIds.push(h.sessionId),f=!0;break}f||d.push({info:h,sessionIds:[h.sessionId]})}i=u(d),a=i.next();case 2:if(a.done){c.B(4);break}return o=a.value,s=function(e,t,n){var r,i;return R((function(a){switch(a.g){case 1:return r=new Oi({Sb:t,onError:function(){},Pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),k(a,2),r.configure(e),_(a,function(e,t,n,r,i,a){var o=new Map;return(i={audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t}).drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],o.set(t,i),Gi(e,o,[])}(r,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:A(a,3);break;case 2:return w(a),_(a,r.destroy(),5);case 5:return a.return([]);case 3:return k(a,6),_(a,Fi(r),8);case 8:A(a,7);break;case 6:return w(a),_(a,r.destroy(),9);case 9:return a.return([]);case 7:return i=[],_(a,Promise.all(n.sessionIds.map((function(e){return R((function(t){return 1==t.g?(k(t,2),_(t,function(e,t){var n,r,i;return R((function(a){return 1==a.g?_(a,Wi(e,t,{initData:null,initDataType:null}),2):3!=a.g?(n=a.h)?(r=[],(i=e.i.get(n))&&(i.bb=new or,r.push(i.bb)),r.push(n.remove()),_(a,Promise.all(r),3)):a.return():(e.i.delete(n),void E(a))}))}(r,e),4)):2!=t.g?(i.push(e),A(t,0)):(w(t),void E(t))}))}))),10);case 10:return _(a,r.destroy(),11);case 11:return a.return(i)}}))}(e,t,o),_(c,s,5);case 5:l=c.h,r=r.concat(l),a=i.next(),c.B(2);break;case 4:return c.return(r)}}))}function zy(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&ge(e.audioCapabilities,t.audioCapabilities,n)&&ge(e.videoCapabilities,t.videoCapabilities,n)}function Wy(e,t){var n=By(new Fy(e.Ta(),e.ya()),t),r=t.appMetadata||{};return n=Yy(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r,isIncomplete:t.isIncomplete||!1}}function Yy(e){for(var t=[],n=Dn(e.variants),r=(n=u(n)).next();!r.done;r=n.next())t.push(Tn(r.value));for(n=(e=u(e.textStreams)).next();!n.done;n=e.next())t.push(An(n.value));return t}function qy(){this.g={}}function Xy(e,t){var n=t.audio,r=t.video;if(n&&!r&&(e.g[n.id]=n.bandwidth||t.bandwidth),!n&&r&&(e.g[r.id]=r.bandwidth||t.bandwidth),n&&r){var i=n.bandwidth||393216,a=r.bandwidth||t.bandwidth-i;0>=a&&(a=t.bandwidth),e.g[n.id]=i,e.g[r.id]=a}}function Qy(e,t){e.g[t.id]=t.bandwidth||2048}function $y(e,t){return null==(e=e.g[t])&&(e=0),e}function Jy(e){var t=this;if(e&&e.constructor!=Nl)throw new ut(2,9,9008);this.g=this.h=null,e?(this.h=e.h,this.g=e.Mb()):(this.h=Il(),this.g=new br),this.i=[],this.j=[];var n=!e;this.l=new xr((function(){var e,r,i,a,o;return R((function(s){switch(s.g){case 1:return _(s,Promise.all(t.j.map((function(e){return py(e)}))),2);case 2:for(e=function(){},r=[],i=u(t.i),a=i.next();!a.done;a=i.next())o=a.value,r.push(o.then(e,e));return _(s,Promise.all(r),3);case 3:if(!n){s.B(4);break}return _(s,t.g.destroy(),4);case 4:t.h=null,t.g=null,E(s)}}))}))}function Zy(){if($t())e:{for(var e=u(xy.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function ev(e){var t,n,r;return R((function(i){switch(i.g){case 1:return _(i,(t=new Ay).init(),2);case 2:return _(i,wy(t),3);case 3:return n=i.h,r=new Ny("manifest",n.path.Ta,n.path.ya,e),_(i,t.destroy(),4);case 4:return _(i,(new Jy).remove(r.toString()),0)}}))}function tv(e,t,n,r,i,a){var o,s,l,c,d,p,h,f,g,y,v;return R((function(m){switch(m.g){case 1:for(o=!1,k(m,2),s=!0,l=u(n.streams),c=l.next();!c.done;c=l.next())for(d=c.value,p=u(d.segments),h=p.next();!h.done;h=p.next())f=h.value,null!=(g=f.pendingSegmentRefId?r[f.pendingSegmentRefId]:null)&&(f.dataKey=g,f.pendingSegmentRefId=void 0),null!=(g=f.pendingInitSegmentRefId?r[f.pendingInitSegmentRefId]:null)&&(f.initSegmentKey=g,f.pendingInitSegmentRefId=void 0),f.pendingSegmentRefId&&(s=!1),f.pendingInitSegmentRefId&&(s=!1);return n.size+=i,s&&(n.isIncomplete=!1),_(m,e.updateManifest(t,n),4);case 4:o=!0,a(),A(m,0);break;case 2:return y=w(m),_(m,ev(t),5);case 5:if(o){m.B(6);break}return v=Object.values(r),_(m,e.removeSegments(v,(function(){})),6);case 6:throw y}}))}function nv(e){return e.variants.some((function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t}))}function rv(e){return e.variants.some((function(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]).some((function(e){return e.initData&&e.initData.length}))}))}function iv(e,t){for(var n=[],r=u(e.streams),i=r.next();!i.done;i=r.next())i=i.value,t&&"video"==i.type?n.push({contentType:bt(i.mimeType,i.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=i.type||n.push({contentType:bt(i.mimeType,i.codecs),robustness:e.drmInfo.audioRobustness});return n}function av(e,t,n){return R((function(r){return _(r,function(e,t,n,r){var i,a,o;return R((function(s){return 1==s.g?r.drmInfo?(i=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new ut(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(n),a=r.sessionIds.map((function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:iv(r,!1),videoCapabilities:iv(r,!0)}})),_(s,Ky(t,e,a),2)):s.return():3!=s.g?(o=s.h,_(s,i.remove(o),3)):_(s,i.add(a.filter((function(e){return!o.includes(e.sessionId)}))),0)}))}(e.g,e.h.drm,n,t),0)}))}function ov(e,t,n){function r(){}var i=function(e){for(var t=new Set,n=(e=u(e.streams)).next();!n.done;n=e.next())for(var r=(n=u(n.value.segments)).next();!r.done;r=n.next())null!=(r=r.value).initSegmentKey&&t.add(r.initSegmentKey),t.add(r.dataKey);return Array.from(t)}(n);return Wy(t,n),Promise.all([e.removeSegments(i,r),e.removeManifests([t.key()],r)])}function sv(e,t,n,r,i,a){var o={id:r.id,originalId:r.originalId,groupId:r.groupId,primary:r.primary,type:r.type,mimeType:r.mimeType,codecs:r.codecs,frameRate:r.frameRate,pixelAspectRatio:r.pixelAspectRatio,hdr:r.hdr,videoLayout:r.videoLayout,kind:r.kind,language:r.language,originalLanguage:r.originalLanguage,label:r.label,width:r.width||null,height:r.height||null,encrypted:r.encrypted,keyIds:r.keyIds,segments:[],variantIds:[],roles:r.roles,forced:r.forced,channelsCount:r.channelsCount,audioSamplingRate:r.audioSamplingRate,spatialAudio:r.spatialAudio,closedCaptions:r.closedCaptions,tilesLayout:r.tilesLayout,external:r.external,fastSwitching:r.fastSwitching},s=i.offline.numberOfParallelDownloads,l=0;return function(e,t,n){if(null!=(t=e.segmentIndex.find(t)))for(var r=e.segmentIndex.get(t);r;)n(r),r=e.segmentIndex.get(++t)}(r,n.presentationTimeline.mb(),(function(n){var i=sy(n),u=void 0;if(!a.has(i)){var c=n.endTime-n.startTime;c=$y(t,r.id)*c,c=cy(e.g,c),a.set(i,new oy(n,c,l,!1))}n.aa&&(u=sy(n.aa),a.has(u)||(c=.5*$y(t,r.id),c=cy(e.g,c),a.set(u,new oy(n.aa,c,l,!0)))),o.segments.push({pendingInitSegmentRefId:u,initSegmentKey:u?0:null,startTime:n.startTime,endTime:n.endTime,appendWindowStart:n.appendWindowStart,appendWindowEnd:n.appendWindowEnd,timestampOffset:n.timestampOffset,tilesLayout:n.tilesLayout,pendingSegmentRefId:i,dataKey:0}),l=(l+1)%s})),o}function lv(e){if(e.l.g)throw new ut(2,9,7001)}function uv(){if(!Zy())throw new ut(2,9,9e3)}function cv(e,t){return R((function(n){return 1==n.g?(e.i.push(t),T(n,2),_(n,t,4)):2!=n.g?n.return(n.h):(S(n),fe(e.i,t),C(n,0))}))}function dv(e){for(var t=new Set,n=u(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(r=(n=u(e.imageStreams)).next();!r.done;r=n.next())t.add(r.value);for(n=(e=u(e.variants)).next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}y(Iy,by),Iy.prototype.updateManifestExpiration=function(e,t){var n,r,i,a=this;return R((function(o){return n=vy(a.h,a.g),r=n.store(),i=new or,r.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,r.put(n),i.resolve()):i.reject(new ut(2,9,9012,"Could not find values for "+e))},_(o,Promise.all([n.promise(),i]),0)}))},Iy.prototype.Jc=function(e){var t,n,r,i,a,o;return R((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n)r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime,a=Py(e.periods[n],i),t.push(a);return _(s,sh(t),2)}return o=s.h,s.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:o,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata,sequenceMode:!1})}))},Iy.prototype.Af=function(e){return{data:e.data}},y(Ry,by),Ry.prototype.Jc=function(e){var t,n,r,i,a,o;return R((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n){r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime;for(var l=e.periods[n],c=[],d=u(l.streams),p=d.next();!p.done;p=d.next())0!=(p=p.value).variantIds.length&&c.push(Ly(p,l.startTime,l.startTime+i));a=c,t.push(a)}return _(s,sh(t),2)}return o=s.h,s.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:null==e.expiration?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:o,sequenceMode:!1})}))},y(Oy,by),(r=Oy.prototype).hasFixedKeySpace=function(){return!1},r.addSegments=function(e){return this.add(this.i,e)},r.addManifests=function(e){return this.add(this.g,e)},r.updateManifest=function(e,t){return function(e,t,n){var r=(e=vy(e.h,e.g)).store();return r.get(t).onsuccess=function(){r.put(n,t)},e.promise()}(this,e,t)},r.Jc=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(r=My.prototype).init=function(){var t=this,n=new or,r=!1,i=new Qt((function(){r=!0,n.reject(new ut(2,9,9017))}));i.U(5);var a=e.indexedDB.open("shaka_offline_db",5);return a.onsuccess=function(){if(!r){var e=a.result;t.l=e;var o=e.objectStoreNames;o=o.contains("manifest")&&o.contains("segment")?new Iy(e,"segment","manifest"):null,t.g=o,o=(o=e.objectStoreNames).contains("manifest-v2")&&o.contains("segment-v2")?new Ry(e,"segment-v2","manifest-v2"):null,t.h=o,o=(o=e.objectStoreNames).contains("manifest-v3")&&o.contains("segment-v3")?new Ry(e,"segment-v3","manifest-v3"):null,t.i=o,o=(o=e.objectStoreNames).contains("manifest-v5")&&o.contains("segment-v5")?new Oy(e,"segment-v5","manifest-v5"):null,t.j=o,e=e.objectStoreNames.contains("session-ids")?new Ty(e):null,t.m=e,i.stop(),n.resolve()}},a.onupgradeneeded=function(){for(var e=a.result,t=u(["segment-v5","manifest-v5","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},a.onerror=function(e){r||(n.reject(new ut(2,9,9001,a.error)),i.stop(),e.preventDefault())},n},r.destroy=function(){var e=this;return R((function(t){switch(t.g){case 1:if(!e.g){t.B(2);break}return _(t,e.g.destroy(),2);case 2:if(!e.h){t.B(4);break}return _(t,e.h.destroy(),4);case 4:if(!e.i){t.B(6);break}return _(t,e.i.destroy(),6);case 6:if(!e.j){t.B(8);break}return _(t,e.j.destroy(),8);case 8:if(!e.m){t.B(10);break}return _(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),E(t)}}))},r.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},r.getEmeSessionCell=function(){return this.m},r.erase=function(){var t=this;return R((function(n){switch(n.g){case 1:if(!t.g){n.B(2);break}return _(n,t.g.destroy(),2);case 2:if(!t.h){n.B(4);break}return _(n,t.h.destroy(),4);case 4:if(!t.i){n.B(6);break}return _(n,t.i.destroy(),6);case 6:if(!t.j){n.B(8);break}return _(n,t.j.destroy(),8);case 8:return t.l&&t.l.close(),_(n,function(){var t=new or,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new ut(2,9,9001,n.error)),e.preventDefault()},t}(),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,_(n,t.init(),0)}}))},Cy("idb",(function(){return un("CrKey")||en()||!e.indexedDB?null:new My})),Ny.prototype.Ta=function(){return this.i},Ny.prototype.ya=function(){return this.h},Ny.prototype.key=function(){return this.l},Ny.prototype.toString=function(){return this.j},(r=Hy.prototype).configure=function(){},r.start=function(e,t){var n,r,i,a,o,s,l=this;return R((function(u){switch(u.g){case 1:if(n=Uy(e),l.g=n,null==n||"manifest"!=n.g)throw new ut(2,1,9004,e);return r=new Ay,T(u,2),_(u,r.init(),4);case 4:return _(u,Sy(r,n.Ta(),n.ya()),5);case 5:return _(u,u.h.getManifests([n.key()]),6);case 6:return i=u.h,a=i[0],o=new Fy(n.Ta(),n.ya()),s=By(o,a),t.makeTextStreamsForClosedCaptions(s),u.return(s);case 2:return S(u),_(u,r.destroy(),7);case 7:C(u,0)}}))},r.stop=function(){return Promise.resolve()},r.update=function(){},r.onExpirationUpdated=function(e,t){var n,r,i,a,o,s,l,u=this;return R((function(c){switch(c.g){case 1:return n=u.g,r=new Ay,k(c,2,3),_(c,r.init(),5);case 5:return _(c,Sy(r,n.Ta(),n.ya()),6);case 6:return _(c,(i=c.h).getManifests([n.key()]),7);case 7:if(a=c.h,o=a[0],s=o.sessionIds.includes(e),l=null==o.expiration||o.expiration>t,!s||!l){c.B(3);break}return _(c,i.updateManifestExpiration(n.key(),t),3);case 3:return S(c),_(c,r.destroy(),10);case 10:C(c,0);break;case 2:w(c),c.B(3)}}))},r.onInitialVariantChosen=function(){},r.banLocation=function(){},la["application/x-offline-manifest"]=function(){return new Hy},j("shaka.offline.OfflineScheme",Vy),Vy.plugin=Gy,_r("offline",Gy),(r=Jy.prototype).destroy=function(){return this.l.destroy()},r.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=bl(e,t)),Pl(this.h,e)},r.getConfiguration=function(){var e=Il();return Pl(e,this.h,Il()),e},r.Mb=function(){return this.g},r.store=function(e,t,n){var r=this,i=this.getConfiguration(),a=new dy(this.g);return this.j.push(a),(t=new sr(t=function(e,t,n,r,i,a){var o,s,l,c,d,p,h,f,g,y,v,m,b;return R((function(T){switch(T.g){case 1:return uv(),s=o=null,l=new Ay,p=d=c=null,k(T,2,3),_(T,r(),5);case 5:return o=T.h,_(T,function(e,t,n,r){var i,a,o,s,l;return R((function(u){if(1==u.g)return i=null,a=e.g,o={networkingEngine:a,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){},updateDuration:function(){},newDrmInfo:function(){},onManifestUpdated:function(){},getBandwidthEstimate:function(){return r.abr.defaultBandwidthEstimate}},n.configure(r.manifest),lv(e),_(u,n.start(t,o),2);if(3!=u.g)return s=u.h,lv(e),l=dv(s),_(u,Promise.all(Lr(l,(function(e){return e.createSegmentIndex()}))),3);if(lv(e),i)throw i;return u.return(s)}))}(e,t,o,i),6);case 6:if(h=T.h,lv(e),!(!h.presentationTimeline.S()&&!h.presentationTimeline.Qb()))throw new ut(2,9,9005,t);return _(T,function(e,t,n,r){var i;return R((function(a){return 1==a.g?((i=new Oi({Sb:e.g,onError:n,Pd:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(r.drm),_(a,function(e,t,n){return e.na=!0,e.u=new Map,e.K=n,Ni(e,t)}(i,t.variants,r.offline.usePersistentLicense),2)):3!=a.g?_(a,Bi(i),3):a.return(i)}))}(e,h,(function(e){p=p||e}),i),7);case 7:if(s=T.h,lv(e),p)throw p;return _(T,function(e,t,n){var r,i,a,o,s,l,c,d,p,h,f,g,y,v,m,b,T,S,C,x,I,P,D,L,O,M,N;return R((function(R){switch(R.g){case 1:return r={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter((function(e){return gn(e,t,n)}))}(e,n.restrictions,r),_(R,vn(t,e,n.offline.usePersistentLicense),2);case 2:for(i=[],a=n.preferredDecodingAttributes,o=n.preferredVideoCodecs,s=n.preferredAudioCodecs,fn(e,o,s,a),l=u(e.variants),c=l.next();!c.done;c=l.next())d=c.value,i.push(Tn(d));for(p=u(e.textStreams),h=p.next();!h.done;h=p.next())f=h.value,i.push(An(f));for(g=u(e.imageStreams),y=g.next();!y.done;y=g.next())v=y.value,i.push(wn(v));return _(R,n.offline.trackSelectionCallback(i),3);case 3:for(m=R.h,b=e.presentationTimeline.getDuration(),T=0,S=u(m),C=S.next();!C.done;C=S.next())x=C.value,I=x.bandwidth*b/8,T+=I;return k(R,4),_(R,n.offline.downloadSizeCallback(T),6);case 6:if(!R.h)throw new ut(2,9,9014);A(R,5);break;case 4:if((P=w(R))instanceof ut)throw P;throw new ut(2,9,9015);case 5:for(D=new Set,L=new Set,O=new Set,M=u(m),C=M.next();!C.done;C=M.next())"variant"==(N=C.value).type&&D.add(N.id),"text"==N.type&&L.add(N.id),"image"==N.type&&O.add(N.id);e.variants=e.variants.filter((function(e){return D.has(e.id)})),e.textStreams=e.textStreams.filter((function(e){return L.has(e.id)})),e.imageStreams=e.imageStreams.filter((function(e){return O.has(e.id)})),function(e){e.variants.map((function(e){return e.video}));var t=new Set(e.variants.map((function(e){return e.audio})));e=e.textStreams;for(var n=u(t),r=n.next();!r.done;r=n.next())for(var i=(r=u(t)).next();!i.done;i=r.next());for(t=u(e),n=t.next();!n.done;n=t.next())for(n=u(e),r=n.next();!r.done;r=n.next());}(e),E(R)}}))}(h,s,i),8);case 8:return _(T,l.init(),9);case 9:return lv(e),_(T,wy(l),10);case 10:return c=T.h,lv(e),f=function(e,t,n,r,i,a){var o=function(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=Yy(t),appMetadata:n,isIncomplete:!1}}(n,t,r),s=i.offline.progressCallback;!function(e,t,n){e.m=t,e.l=n}(a,(function(e,t){o.size=t,s(o,e)}),(function(t,n){l&&i.offline.usePersistentLicense&&c==n&&ji(e,"cenc",t)}));var l=nv(t)&&!rv(t),c=null;l&&(c=pv.get(e.g.keySystem));for(var d=new qy,p=u(t.textStreams),h=p.next();!h.done;h=p.next())d.g[h.value.id]=52;for(p=u(t.imageStreams),h=p.next();!h.done;h=p.next())Qy(d,h.value);for(h=u(t.variants),p=h.next();!p.done;p=h.next())Xy(d,p.value);return d=function(e,t,n,r){for(var i=new Map,a=dv(n),o=new Map,s=(a=u(a)).next();!s.done;s=a.next()){s=s.value;var l=sv(e,t,n,s,r,i);o.set(s.id,l)}for(e=u(n.variants),t=e.next();!t.done;t=e.next())(t=t.value).audio&&o.get(t.audio.id).variantIds.push(t.id),t.video&&o.get(t.video.id).variantIds.push(t.id);return{streams:Array.from(o.values()),mf:Array.from(i.values())}}(a,d,t,i),a=d.streams,d=d.mf,h=e.g,p=i.offline.usePersistentLicense,h&&p&&(h.initData=[]),{rh:{creationTime:Date.now(),originalManifestUri:n,duration:t.presentationTimeline.getDuration(),size:0,expiration:e.Oc(),streams:a,sessionIds:p?Vi(e):[],drmInfo:h,appMetadata:r,isIncomplete:!0,sequenceMode:t.sequenceMode,type:t.type},mf:d}}(s,h,t,n,i,a),g=f.rh,y=f.mf,_(T,c.ya.addManifests([g]),11);case 11:if(v=T.h,lv(e),d=v[0],lv(e),p)throw p;return _(T,function(e,t,n,r,i,a,o,s,l){var c,d,p,h,f,g,y,v,m,b;return R((function(T){switch(T.g){case 1:if(c={},d=0,p=function(t,p){var h,f,g,y,v,m,b;return R((function(k){if(1==k.g){for(h={},f=u(t),g=f.next();!g.done;h={Fb:h.Fb},g=f.next())h.Fb=g.value,y=ly(h.Fb,a),v=h.Fb.i,m=h.Fb.h,b=function(t){return function(n){var r,i,a;return R((function(s){if(1==s.g)return _(s,o.addSegments([{data:n}]),2);r=s.h,lv(e),i=t.Fb.g,a=sy(i),c[a]=r[0],d+=n.byteLength,E(s)}))}}(h),hy(i,h.Fb.groupId,y,v,m,b);return _(k,function(e){return R((function(t){return 1==t.g?_(t,Promise.all(e.j.values()),2):t.return(e.g.h)}))}(i),2)}return p?(lv(e),function(e,t,n,r){if(t.expiration=n.Oc(),n=Vi(n),t.sessionIds=r.offline.usePersistentLicense?n:[],nv(e)&&r.offline.usePersistentLicense&&!n.length)throw new ut(2,9,9007)}(s,r,l,a),_(k,o.updateManifest(n,r),0)):k.B(0)}))},h=!1,k(T,2),!nv(s)||!h||rv(s)){T.B(4);break}return _(T,p(t.filter((function(e){return e.h})),!0),5);case 5:return lv(e),t=t.filter((function(e){return!e.h})),f=c,g=d,c={},d=0,_(T,tv(o,n,r,f,g,(function(){return lv(e)})),6);case 6:lv(e);case 4:if(h){T.B(7);break}return _(T,p(t,!1),8);case 8:return lv(e),y=c,v=d,c={},d=0,_(T,tv(o,n,r,y,v,(function(){return lv(e)})),9);case 9:lv(e);case 7:A(T,0);break;case 2:return m=w(T),b=Object.values(c),_(T,o.removeSegments(b,(function(){})),10);case 10:throw m}}))}(e,y,d,g,a,i,c.ya,h,s),12);case 12:return lv(e),m=new Ny("manifest",c.path.Ta,c.path.ya,d),T.return(Wy(m,g));case 3:return S(T),_(T,l.destroy(),13);case 13:if(!o){T.B(14);break}return _(T,o.stop(),14);case 14:if(!s){T.B(16);break}return _(T,s.destroy(),16);case 16:C(T,0);break;case 2:if(b=w(T),null==d){T.B(18);break}return _(T,ev(d),18);case 18:throw p||b}}))}(this,e,t||{},(function(){var t;return R((function(a){return 1==a.g?n?a.B(2):_(a,Ns(e,r.g,i.manifest.retryParameters),3):(2!=a.g&&(n=a.h),t=sa(e,n||null),a.return(t()))}))}),i,a),(function(){return py(a)}))).finally((function(){fe(r.j,a)})),function(e,t){var n=t.promise;return e.i.push(n),t.finally((function(){fe(e.i,n)}))}(this,t)},r.remove=function(e){return cv(this,function(e,t){var n,r,i,a,o,s;return R((function(l){switch(l.g){case 1:if(uv(),null==(n=Uy(t))||"manifest"!=n.g)throw new ut(2,9,9004,t);return r=n,i=new Ay,T(l,2),_(l,i.init(),4);case 4:return _(l,Sy(i,r.Ta(),r.ya()),5);case 5:return _(l,(a=l.h).getManifests([r.key()]),6);case 6:return o=l.h,s=o[0],_(l,Promise.all([av(e,s,i),ov(a,r,s)]),2);case 2:return S(l),_(l,i.destroy(),8);case 8:C(l,0)}}))}(this,e))},r.Fh=function(){return cv(this,function(e){var t,n,r,i,a,o,s,l,c,d;return R((function(p){switch(p.g){case 1:return uv(),t=e.g,n=e.h.drm,r=new Ay,i=!1,T(p,2),_(p,r.init(),4);case 4:a=[],function(e,t){e.g.forEach((function(e){t(e.getEmeSessionCell())}))}(r,(function(e){return a.push(e)})),o=u(a),s=o.next();case 5:if(s.done){p.B(2);break}return _(p,(l=s.value).getAll(),8);case 8:return c=p.h,_(p,Ky(n,t,c),9);case 9:return d=p.h,_(p,l.remove(d),10);case 10:d.length!=c.length&&(i=!0),s=o.next(),p.B(5);break;case 2:return S(p),_(p,r.destroy(),11);case 11:C(p,3);break;case 3:return p.return(!i)}}))}(this))},r.list=function(){return cv(this,R((function(r){switch(r.g){case 1:return uv(),e=[],t=new Ay,T(r,2),_(r,t.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.g.forEach((function(e,n){e.getCells().forEach((function(e,r){t({Ta:n,ya:r},e)}))}))}(t,(function(t,r){n=n.then((function(){return R((function(n){if(1==n.g)return _(n,r.getAllManifests(),2);n.h.forEach((function(n,r){n=Wy(new Ny("manifest",t.Ta,t.ya,r),n),e.push(n)})),E(n)}))}))})),_(r,n,2);case 2:return S(r),_(r,t.destroy(),6);case 6:C(r,3);break;case 3:return r.return(e)}})));var e,t,n},j("shaka.offline.Storage",Jy),Jy.deleteAll=function(){var e;return R((function(t){return 1==t.g?(e=new Ay,T(t,2),_(t,function(e){var t,n;return R((function(r){return 1==r.g?(t=Array.from(e.g.values()),(n=0<t.length)||xy.forEach((function(e){(e=e())&&t.push(e)})),_(r,Promise.all(t.map((function(e){return e.erase()}))),2)):n?r.B(0):_(r,Promise.all(t.map((function(e){return e.destroy()}))),0)}))}(e),2)):5!=t.g?(S(t),_(t,e.destroy(),5)):C(t,0)}))},Jy.prototype.list=Jy.prototype.list,Jy.prototype.removeEmeSessions=Jy.prototype.Fh,Jy.prototype.remove=Jy.prototype.remove,Jy.prototype.store=Jy.prototype.store,Jy.prototype.getNetworkingEngine=Jy.prototype.Mb,Jy.prototype.getConfiguration=Jy.prototype.getConfiguration,Jy.prototype.configure=Jy.prototype.configure,Jy.prototype.destroy=Jy.prototype.destroy,Jy.support=Zy;var pv=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");function hv(){}function fv(e,t){for(e={priority:t||0,callback:e},t=0;t<gv.length;t++)if(gv[t].priority<e.priority)return void gv.splice(t,0,e);gv.push(e)}Fu.offline=Zy,j("shaka.polyfill",hv),hv.register=fv,hv.installAll=function(){for(var e=u(gv),t=e.next();!t.done;t=e.next()){t=t.value;try{t.callback()}catch(e){W("Error installing polyfill!",e)}}};var gv=[];function yv(){this.g=new mv}function vv(){e.AbortController||(e.AbortController=yv,e.AbortSignal=mv)}function mv(){yr.call(this),this.h=!1,this.g=void 0,this.onabort=null}function bv(){}function _v(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=u(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())Ev(t.value)}function Ev(e){var t="aria-"+e.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(e){null==e||null==e?this.removeAttribute(t):this.setAttribute(t,e)}})}function kv(){}function Tv(){L_()}function Av(){}function wv(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Sv),document.addEventListener("webkitfullscreenerror",Sv),document.addEventListener("mozfullscreenchange",Sv),document.addEventListener("mozfullscreenerror",Sv),document.addEventListener("MSFullscreenChange",Sv),document.addEventListener("MSFullscreenError",Sv)}}function Sv(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}function Cv(){}function xv(){var e=!0;(on()||un("PlayStation 5")||sn()||un("Web0S")||tn()||un("CrKey")||un("PC=EOS")||un("Hisense")||un("VIDAA"))&&(e=!1),e&&navigator.mediaCapabilities||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),Pv=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=Iv)}function Iv(t){var n,r,i,a,o,s,l,u,c,d,p,h,f,g,y,v;return R((function(m){switch(m.g){case 1:if(n={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:t},!t)return m.return(n);if(r=t.video,i=t.audio,"media-source"==t.type){if(!$t())return m.return(n);if(r){if(un("CrKey"))if(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType){var b=r.contentType;r.width&&r.height&&(b+="; width="+r.width+"; height="+r.height),r.framerate&&(b+="; framerate="+r.framerate),"pq"===r.transferFunction&&(b+="; eotf=smpte2084"),a=cast.__platform__.canDisplayType(b)}else a=Q(r.contentType);else tn()?(o=r.contentType,r.width&&r.height&&(o+="; width="+r.width,o+="; height="+r.height),r.framerate&&(o+="; framerate="+r.framerate),r.bitrate&&(o+="; bitrate="+r.bitrate),a=Q(o)):a=Q(r.contentType);if(!a)return m.return(n)}if(i&&(s=i.contentType,!Q(s)))return m.return(n)}else{if("file"!=t.type)return m.return(n);if(r&&(l=r.contentType,!Jt(l))||i&&(u=i.contentType,!Jt(u)))return m.return(n)}if(!t.keySystemConfiguration)return n.supported=!0,m.return(Promise.resolve(n));if(c=t.keySystemConfiguration,d=[],p=[],c.audio&&(h={robustness:c.audio.robustness||"",contentType:t.audio.contentType},d.push(h)),c.video&&(f={robustness:c.video.robustness||"",contentType:t.video.contentType},p.push(f)),g={initDataTypes:[c.initDataType],distinctiveIdentifier:c.distinctiveIdentifier,persistentState:c.persistentState,sessionTypes:c.sessionTypes},d.length&&(g.audioCapabilities=d),p.length&&(g.videoCapabilities=p),y=(t.video?t.video.contentType:"")+"#"+(t.audio?t.audio.contentType:"")+"#"+t.keySystemConfiguration.keySystem,k(m,3),y in Uv){v=Uv[y],m.B(5);break}return _(m,navigator.requestMediaKeySystemAccess(c.keySystem,[g]),6);case 6:v=m.h,Uv[y]=v;case 5:A(m,4);break;case 3:w(m);case 4:v&&(n.supported=!0,n.keySystemAccess=v);case 2:return m.return(n)}}))}yv.prototype.abort=function(e){var t=this.g;t.h||(t.h=!0,t.g=e,void 0===t.g&&(t.g=new DOMException("signal is aborted without reason","AbortError")),e=new hr("abort"),t.onabort&&t.onabort(e),t.dispatchEvent(e))},o.Object.defineProperties(yv.prototype,{signal:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),hv.AbortController=yv,yv.install=vv,y(mv,yr),o.Object.defineProperties(mv.prototype,{aborted:{configurable:!0,enumerable:!0,get:function(){return this.h}},reason:{configurable:!0,enumerable:!0,get:function(){return this.g}}}),fv(vv),hv.Aria=bv,bv.install=_v,fv(_v),hv.EncryptionScheme=kv,kv.install=Tv,fv(Tv,-2),hv.Fullscreen=Av,Av.install=wv,fv(wv),hv.MediaCapabilities=Cv,Cv.install=xv;var Pv=null;Cv.originalMcap=Pv;var Dv,Rv,Lv,Ov,Mv,Nv,Uv={};function Fv(){}function Bv(){var t=ln();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */);return n.shift(),n.some((function(e){return e.startsWith("codecs=")}))?cast.__platform__.canDisplayType(t):e(t)}}():t?10>=t?e.MediaSource=null:12>=t?(jv(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):15>=t&&jv():Zt()?function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(";")[0].split("/")[1]&&e(t)}}():(rn()||nn()||un("Tizen 4"))&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=Tt(t)&&e(t)}}()),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&function(){var e=MediaSource.isTypeSupported;un("Web0S")||(MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),r=n.findIndex((function(e){return e.startsWith("codecs=")}));if(0>r)return e(t);var i=n[r].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=i.findIndex((function(e){return e.startsWith("vp09")}));return 0<=a&&(i[a]="vp9",n[r]='codecs="'+i.join(",")+'"',t=n.join("; ")),e(t)})}()}function jv(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var t=e.apply(this,L.apply(0,arguments));return t.abort=function(){},t}}function Hv(){}function Vv(){screen.orientation&&screen.orientation.unlock||(null!=screen.orientation?(void 0===screen.orientation.lock&&(screen.orientation.lock=function(){return Promise.resolve()}),void 0===screen.orientation.unlock&&(screen.orientation.unlock=function(){})):null!=e.orientation&&function(){function t(){switch(e.orientation){case-90:n.type="landscape-secondary",n.angle=270;break;case 0:n.type="portrait-primary",n.angle=0;break;case 90:n.type="landscape-primary",n.angle=90;break;case 180:n.type="portrait-secondary",n.angle=180}}var n=new Gv;screen.orientation=n,t(),e.addEventListener("orientationchange",(function(){t();var e=new hr("change");n.dispatchEvent(e)}))}())}function Gv(){yr.call(this),this.type="",this.angle=0}function Kv(){}function zv(e,t){try{var n=new qv(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Wv(e){var t=this.mediaKeys;return t&&t!=e&&Qv(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Qv(e,this):Promise.resolve()}function Yv(e){if(se(e=ae(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=Vr(e=jr(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=ie(e),this.dispatchEvent(t)}function qv(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(t=(e=u(t)).next();!t.done;t=e.next()){var n=t.value;if("required"==n.persistentState)t=null;else{t={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:n.initDataTypes,sessionTypes:["temporary"],label:n.label};var r=!1,i=!1;if(n.audioCapabilities)for(var a=u(n.audioCapabilities),o=a.next();!o.done;o=a.next())(o=o.value).contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,o.contentType.split(";")[0])&&(t.audioCapabilities.push(o),i=!0));if(n.videoCapabilities)for(o=(n=u(n.videoCapabilities)).next();!o.done;o=n.next())(a=o.value).contentType&&(r=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,a.contentType.split(";")[0])&&(t.videoCapabilities.push(a),i=!0));r||(i=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),t=i?t:null}if(t)return void(this.g=t)}throw(e=Error("Unsupported keySystem")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function Xv(e){this.h=new WebKitMediaKeys(e),this.g=new Pr}function Qv(e,t){if(e.g.Bb(),!t)return Promise.resolve();e.g.D(t,"webkitneedkey",Yv);try{return No(t,HTMLMediaElement.HAVE_METADATA,e.g,(function(){t.webkitSetMediaKeys(e.h)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function $v(e){yr.call(this),this.i=null,this.l=e,this.g=this.h=null,this.j=new Pr,this.sessionId="",this.expiration=NaN,this.closed=new or,this.keyStatuses=new Zv}function Jv(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new hr("keystatuseschange"),e.dispatchEvent(t)}function Zv(){this.size=0,this.g=void 0}function em(){}function tm(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=nm,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rm,e.MediaKeys=im,e.MediaKeySystemAccess=am,e.shakaMediaKeysPolyfill=!0)}function nm(){return Promise.reject(Error("The key system specified is not supported."))}function rm(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function im(){throw new TypeError("Illegal constructor.")}function am(){throw this.keySystem="",new TypeError("Illegal constructor.")}function om(){}function sm(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)bm="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=um,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=cm,e.MediaKeys=pm,e.MediaKeySystemAccess=dm,e.shakaMediaKeysPolyfill=!0}}function lm(e){return bm?bm+e.charAt(0).toUpperCase()+e.slice(1):e}function um(e,t){try{var n=new dm(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function cm(e){var t=this.mediaKeys;return t&&t!=e&&hm(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&hm(e,this),Promise.resolve()}function dm(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var a=(t=u(t)).next();!a.done;a=t.next()){var o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(a=a.value).initDataTypes,sessionTypes:["temporary"],label:a.label},s=!1;if(a.audioCapabilities)for(var l=u(a.audioCapabilities),c=l.next();!c.done;c=l.next())(c=c.value).contentType&&(s=!0,i.canPlayType(c.contentType.split(";")[0],this.g)&&(o.audioCapabilities.push(c),r=!0));if(a.videoCapabilities)for(c=(l=u(a.videoCapabilities)).next();!c.done;c=l.next())(c=c.value).contentType&&(s=!0,i.canPlayType(c.contentType,this.g)&&(o.videoCapabilities.push(c),r=!0));if(s||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),"required"==a.persistentState&&(n?(o.persistentState="required",o.sessionTypes=["persistent-license"]):r=!1),r)return void(this.h=o)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(e=Error(n)).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,e}function pm(e){this.l=e,this.h=null,this.g=new Pr,this.i=[],this.j=new Map}function hm(e,t){e.h=t,e.g.Bb();var n=bm;t&&(e.g.D(t,n+"needkey",(function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=ie(t.initData),e.h.dispatchEvent(n)})),e.g.D(t,n+"keymessage",(function(t){var n=fm(e,t.sessionId);n&&(t=new hr("message",t=(new Map).set("messageType",null==n.keyStatuses.Ob()?"licenserequest":"licenserenewal").set("message",t.message)),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))})),e.g.D(t,n+"keyadded",(function(t){(t=fm(e,t.sessionId))&&(vm(t,"usable"),t.g&&t.g.resolve(),t.g=null)})),e.g.D(t,n+"keyerror",(function(t){var n=fm(e,t.sessionId);if(n){var r=Error("EME v0.1b key error"),i=t.errorCode;i.systemCode=t.systemCode,r.errorCode=i,!t.sessionId&&n.h?(45==t.systemCode&&(r.message="Unsupported session type."),n.h.reject(r),n.h=null):t.sessionId&&n.g?(n.g.reject(r),n.g=null):(r=t.systemCode,t.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?vm(n,"output-restricted"):vm(n,1==r?"expired":"internal-error"))}})))}function fm(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function gm(e,t,n){yr.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new or,this.keyStatuses=new mm}function ym(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var r=ae(Vr("LOAD_SESSION|"+n));else{var i=Vr("PERSISTENT|");r=ci(i,t)}else r=ae(t)}catch(e){return Promise.reject(e)}e.h=new or;var a=lm("generateKeyRequest");try{e.j[a](e.i,r)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new Qt((function(){try{e.j[a](e.i,r)}catch(t){e.h.reject(t),e.h=null}})).U(.01)}return e.h}function vm(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,t=new hr("keystatuseschange"),e.dispatchEvent(t)}function mm(){this.size=0,this.g=void 0}Cv.memoizedMediaKeySystemAccessRequests_=Uv,fv(xv,-1),hv.MediaSource=Fv,Fv.install=Bv,fv(Bv),hv.Orientation=Hv,Hv.install=Vv,y(Gv,yr),Gv.prototype.lock=function(e){function t(e){return screen.lockOrientation?screen.lockOrientation(e):screen.mozLockOrientation?screen.mozLockOrientation(e):!!screen.msLockOrientation&&screen.msLockOrientation(e)}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():((e=Error("screen.orientation.lock() is not available on this device")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},Gv.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},fv(Vv),hv.PatchedMediaKeysApple=Kv,Kv.uninstall=function(){Dv&&(Dv=!1,Object.defineProperty(HTMLMediaElement.prototype,"mediaKeys",Rv),HTMLMediaElement.prototype.setMediaKeys=Lv,e.MediaKeys=Ov,e.MediaKeySystemAccess=Mv,navigator.requestMediaKeySystemAccess=Nv,Rv=Nv=Lv=Mv=Ov=null,e.shakaMediaKeysPolyfill=!1)},Kv.install=function(t){e.HTMLVideoElement&&e.WebKitMediaKeys&&(void 0!==t&&t&&(Dv=!0,Rv=Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype,"mediaKeys"),Lv=HTMLMediaElement.prototype.setMediaKeys,Ov=e.MediaKeys,Mv=e.MediaKeySystemAccess,Nv=navigator.requestMediaKeySystemAccess),delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Wv,e.MediaKeys=Xv,e.MediaKeySystemAccess=qv,navigator.requestMediaKeySystemAccess=zv,e.shakaMediaKeysPolyfill=!0)},qv.prototype.createMediaKeys=function(){var e=new Xv(this.keySystem);return Promise.resolve(e)},qv.prototype.getConfiguration=function(){return this.g},Xv.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new $v(this.h,e)},Xv.prototype.setServerCertificate=function(){return Promise.resolve(!1)},Xv.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},y($v,yr),(r=$v.prototype).generateRequest=function(e,t){var n=this;this.h=new or;try{var r=this.l.createSession("video/mp4",ae(t));this.i=r,this.sessionId=r.sessionId||"",this.j.D(this.i,"webkitkeymessage",(function(e){n.h&&(n.h.resolve(),n.h=null),e=new hr("message",e=(new Map).set("messageType",null==n.keyStatuses.Ob()?"license-request":"license-renewal").set("message",ie(e.message))),n.dispatchEvent(e)})),this.j.D(r,"webkitkeyadded",(function(){n.g&&(Jv(n,"usable"),n.g.resolve(),n.g=null)})),this.j.D(r,"webkitkeyerror",(function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=n.i.error,null!=n.h)n.h.reject(e),n.h=null;else if(null!=n.g)n.g.reject(e),n.g=null;else switch(n.i.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Jv(n,"output-not-allowed");break;default:Jv(n,"internal-error")}})),Jv(this,"status-pending")}catch(e){this.h.reject(e)}return this.h},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(e){this.g=new or;try{this.i.update(ae(e))}catch(e){this.g.reject(e)}return this.g},r.close=function(){try{this.i.close(),this.closed.resolve(),this.j.Bb()}catch(e){this.closed.reject(e)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(r=Zv.prototype).Ob=function(){return this.g},r.forEach=function(e){this.g&&e(this.g,aa.value())},r.get=function(e){if(this.has(e))return this.g},r.has=function(e){var t=aa.value();return!(!this.g||!ne(e,t))},r.entries=function(){},r.keys=function(){},r.values=function(){},hv.PatchedMediaKeysNop=em,em.install=tm,im.prototype.createSession=function(){},im.prototype.setServerCertificate=function(){},im.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},am.prototype.getConfiguration=function(){},am.prototype.createMediaKeys=function(){},fv(tm,-10),hv.PatchedMediaKeysWebkit=om,om.install=sm,dm.prototype.createMediaKeys=function(){var e=new pm(this.g);return Promise.resolve(e)},dm.prototype.getConfiguration=function(){return this.h},pm.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.h||document.createElement("video");return t.src||(t.src="about:blank"),e=new gm(t,this.l,e),this.i.push(e),e},pm.prototype.setServerCertificate=function(){return Promise.resolve(!1)},pm.prototype.getStatusForPolicy=function(){return Promise.resolve("usable")},y(gm,yr),(r=gm.prototype).generateRequest=function(e,t){return ym(this,t,null)},r.load=function(e){return"persistent-license"==this.l?ym(this,null,e):Promise.reject(Error("Not a persistent session."))},r.update=function(e){var t=new or;return function e(t,n,r){if(t.g)t.g.then((function(){return e(t,n,r)})).catch((function(){return e(t,n,r)}));else{if(t.g=n,"webkit-org.w3.clearkey"==t.i){var i=Br(r),a=JSON.parse(i);"oct"!=a.keys[0].kty&&(t.g.reject(Error("Response is not a valid JSON Web Key Set.")),t.g=null),i=si(a.keys[0].k),a=si(a.keys[0].kid)}else i=ae(r),a=null;var o=lm("addKey");try{t.j[o](t.i,i,a,t.sessionId)}catch(e){t.g.reject(e),t.g=null}}}(this,t,e),t},r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=lm("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(r=mm.prototype).Ob=function(){return this.g},r.forEach=function(e){this.g&&e(this.g,aa.value())},r.get=function(e){if(this.has(e))return this.g},r.has=function(e){var t=aa.value();return!(!this.g||!ne(e,t))},r.entries=function(){},r.keys=function(){},r.values=function(){};var bm="";function _m(){}function Em(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=Tm,Object.defineProperty(t,"disablePictureInPicture",{get:wm,set:Sm,enumerable:!0,configurable:!0}),document.exitPictureInPicture=Am,document.addEventListener("webkitpresentationmodechanged",km,!0))}}function km(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function Tm(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function Am(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function wm(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function Sm(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function Cm(){}function xm(){e.crypto&&("randomUUID"in e.crypto||(e.crypto.randomUUID=Im))}function Im(){var e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.substr(t.lastIndexOf("/")+1)}function Pm(){}function Dm(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=Rm)}function Rm(){return new Promise((function(e,t){navigator.webkitTemporaryStorage.queryUsageAndQuota((function(t,n){e({usage:t,quota:n})}),t)}))}function Lm(){}function Om(){var e=Symbol.prototype;"description"in e||Object.defineProperty(e,"description",{get:Mm})}function Mm(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}function Nm(){}function Um(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}}function Fm(){}function Bm(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&("webkitDroppedFrameCount"in t||an())&&(t.getVideoPlaybackQuality=jm)}}function jm(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function Hm(){}function Vm(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=Gm;else if(6==n)t=Km;else{try{var r=!!Gm(1,2,"")}catch(e){r=!1}r&&(t=Gm)}t&&(e.VTTCue=function(e,n,r){return t(e,n,r)})}}function Gm(t,n,r){return new e.TextTrackCue(t,n,r)}function Km(t,n,r){return new e.TextTrackCue(t+"-"+n+"-"+r,t,n,r)}function zm(){}fv(sm),hv.PiPWebkit=_m,_m.install=Em,fv(Em),hv.RandomUUID=Cm,Cm.install=xm,fv(xm),hv.StorageEstimate=Pm,Pm.install=Dm,fv(Dm),hv.Symbol=Lm,Lm.install=Om,fv(Om),hv.VideoPlayPromise=Nm,Nm.install=Um,fv(Um),hv.VideoPlaybackQuality=Fm,Fm.install=Bm,fv(Bm),hv.VTTCue=Hm,Hm.install=Vm,fv(Vm),zm.prototype.parseInit=function(){},zm.prototype.setSequenceMode=function(){},zm.prototype.setManifestType=function(){},zm.prototype.parseMedia=function(e,t){for(var n=null,r=[],i=(e=u(e=Br(e).split(/\r?\n/))).next();!i.done;i=e.next())if((i=i.value)&&!/^\s+$/.test(i)&&(i=Wm.exec(i))){var a=Ym.exec(i[1]);i=new ve(a=60*parseInt(a[1],10)+parseFloat(a[2].replace(",",".")),t.segmentEnd?t.segmentEnd:a+2,i[2]),n&&(n.endTime=a,r.push(n)),n=i}return n&&r.push(n),r},j("shaka.text.LrcTextParser",zm),zm.prototype.parseMedia=zm.prototype.parseMedia,zm.prototype.setManifestType=zm.prototype.setManifestType,zm.prototype.setSequenceMode=zm.prototype.setSequenceMode,zm.prototype.parseInit=zm.prototype.parseInit;var Wm=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Ym=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function qm(){}function Xm(e,t){for(var n=(t=u(t.split(" "))).next();!n.done;n=t.next())switch(n.value){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&&fe(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&fe(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&fe(e.textDecoration,"overline")}}function Qm(e,t,n,r,i){return i=void 0===i||i,(e=Jm(e,n,r))?e:i?$m(t,n,r):null}function $m(e,t,n){if(!e)return null;var r=mi(e,bb,n);return r||Zm(e,t,n)}function Jm(e,t,n){var r=mi(e,bb,n);return r||Zm(e,t,n)}function Zm(e,t,n){e=eb(e,"style",t,"");for(var r=null,i=0;i<e.length;i++){var a=vi(e[i],"urn:ebu:tt:style",n);a||(a=mi(e[i],bb,n)),a||(a=Jm(e[i],t,n)),a&&(r=a)}return r}function eb(e,t,n,r,i){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;o&&!(e=i?vi(o,i,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(i=(t=u(t.split(" "))).next();!i.done;i=t.next())for(i=i.value,o=(e=u(n)).next();!o.done;o=e.next())if(r+(o=o.value).getAttribute("xml:id")==i){a.push(o);break}return a}function tb(e,t,n,r){return e=nb(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==r?r=e.end:null!=e.start&&(r+=e.start),{start:n,end:r}}function nb(e,t){var n=rb(e.getAttribute("begin"),t),r=rb(e.getAttribute("end"),t);return e=rb(e.getAttribute("dur"),t),null==r&&null!=e&&(r=n+e),{start:n,end:r}}function rb(e,t){var n=null;if(cb.test(e)){e=cb.exec(e),n=Number(e[1]);var r=Number(e[2]),i=Number(e[3]),a=Number(e[4]);n=(i+=(a+=(Number(e[5])||0)/t.h)/t.frameRate)+60*r+3600*n}else if(db.test(e))n=ib(db,e);else if(pb.test(e))n=ib(pb,e);else if(hb.test(e))e=hb.exec(e),n=Number(e[1])/t.frameRate;else if(fb.test(e))e=fb.exec(e),n=Number(e[1])/t.g;else if(gb.test(e))n=ib(gb,e);else if(e)throw new ut(2,2,2001,"Could not parse cue time range in TTML");return n}function ib(e,t){return null==(e=e.exec(t))||""==e[0]?null:(Number(e[4])||0)/1e3+(Number(e[3])||0)+60*(Number(e[2])||0)+3600*(Number(e[1])||0)}function ab(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}Rt["application/x-subtitle-lrc"]=function(){return new zm},qm.prototype.parseInit=function(){},qm.prototype.setSequenceMode=function(){},qm.prototype.setManifestType=function(){},qm.prototype.parseMedia=function(e,t,n){var r=Br(e);if(e=[],""==r)return e;var i=Di(r,"tt");if(!i)throw new ut(2,2,2005,"Failed to parse TTML.");if(!(r=i.getElementsByTagName("body")[0]))return[];var a=mi(i,mb,"frameRate"),o=mi(i,mb,"subFrameRate"),s=mi(i,mb,"frameRateMultiplier"),l=mi(i,mb,"tickRate"),c=mi(i,mb,"cellResolution"),d=i.getAttribute("xml:space")||"default",p=mi(i,bb,"extent");if("default"!=d&&"preserve"!=d)throw new ut(2,2,2005,"Invalid xml:space value: "+d);d="default"==d,a=new ab(a,o,s,l),c=c&&(c=/^(\d+) (\d+)$/.exec(c))?{Ib:parseInt(c[1],10),rows:parseInt(c[2],10)}:null,o=(o=i.getElementsByTagName("metadata")[0])?function(e){return Array.from(e.childNodes).filter((function(e){return e instanceof Element}))}(o):[],s=Array.from(i.getElementsByTagName("style")),l=[];for(var h=u(i=Array.from(i.getElementsByTagName("region"))),f=h.next();!f.done;f=h.next()){var g=f.value;f=new Me;var y=g.getAttribute("xml:id");if(y){f.id=y;var v,m,b=null;p&&(b=ob.exec(p)||ub.exec(p)),y=b?Number(b[1]):null,b=b?Number(b[2]):null,(v=$m(g,s,"extent"))&&(null!=(v=(m=ob.exec(v))||ub.exec(v))&&(f.width=Number(v[1]),f.height=Number(v[2]),m||(null!=y&&(f.width=100*f.width/y),null!=b&&(f.height=100*f.height/b)),f.widthUnits=m||null!=y?Ne:0,f.heightUnits=m||null!=b?Ne:0)),(g=$m(g,s,"origin"))&&(null!=(v=(m=ob.exec(g))||ub.exec(g))&&(f.viewportAnchorX=Number(v[1]),f.viewportAnchorY=Number(v[2]),m||(null!=b&&(f.viewportAnchorY=100*f.viewportAnchorY/b),null!=y&&(f.viewportAnchorX=100*f.viewportAnchorX/y)),f.viewportAnchorUnits=m||null!=y?Ne:0))}else f=null;f&&l.push(f)}if(gi(r,"p").length)throw new ut(2,2,2001,"<p> can only be inside <div> in TTML");for(h=(p=u(gi(r,"div"))).next();!h.done;h=p.next())if(gi(h.value,"span").length)throw new ut(2,2,2001,"<span> can only be inside <p> in TTML");return(t=function e(t,n,r,i,a,o,s,l,c,d,p,h){var f=t.parentNode;if(t.nodeType==Node.COMMENT_NODE)return null;if(t.nodeType==Node.TEXT_NODE){if(!p)return null;var g=document.createElement("span");g.textContent=t.textContent}else g=t;for(var y=null,v=u(_b),m=v.next();!m.done&&!(y=eb(g,"backgroundImage",i,"#",m.value)[0]);m=v.next());v=null;var b=mi(g,_b,"backgroundImage");h&&b&&!b.startsWith("#")&&(m=new Ye(h),b=new Ye(b),(m=m.resolve(b).toString())&&(v=m)),("p"==t.nodeName||y||v)&&(p=!0);if(t=p,m="default"==(g.getAttribute("xml:space")||(l?"default":"preserve")),b=Array.from(g.childNodes).every((function(e){return e.nodeType==Node.TEXT_NODE})),l=[],!b)for(var _=u(g.childNodes),E=_.next();!E.done;E=_.next())(E=e(E.value,n,r,i,a,o,s,m,c,g,p,h))&&l.push(E);if(i=null!=d,h=/\S/.test(g.textContent),!((E=g.hasAttribute("begin")||g.hasAttribute("end")||g.hasAttribute("dur"))||h||"br"==g.tagName||0!=l.length||i&&!m))return null;for(_=nb(g,r),h=_.start,_=_.end;f&&f.nodeType==Node.ELEMENT_NODE&&"tt"!=f.tagName;)_=tb(f,r,h,_),h=_.start,_=_.end,f=f.parentNode;if(null==h&&(h=0),h+=n.periodStart,_=null==_?1/0:_+n.periodStart,h=Math.max(h,n.segmentStart),_=Math.min(_,n.segmentEnd),!E&&0<l.length)for(h=1/0,_=0,n=u(l),r=n.next();!r.done;r=n.next())r=r.value,h=Math.min(h,r.startTime),_=Math.max(_,r.endTime);if("br"==g.tagName)return(a=new ve(h,_,"")).lineBreak=!0,a;if(n="",b&&(n=g.textContent,m&&(n=(n=n.trim()).replace(/\s+/g," "))),(n=new ve(h,_,n)).nestedCues=l,p||(n.isContainer=!0),c&&(n.cellResolution=c),c=eb(g,"region",o,"")[0],g.hasAttribute("region")&&c&&c.getAttribute("xml:id")){var k=c.getAttribute("xml:id");n.region=s.filter((function(e){return e.id==k}))[0]}return s=c,d&&i&&!g.getAttribute("region")&&!g.getAttribute("style")&&(s=eb(d,"region",o,"")[0]),function(e,t,n,r,i,a,o,s){"rtl"==Qm(t,n,a,"direction",o=o||s)&&(e.direction="rtl"),"tb"==(s=Qm(t,n,a,"writingMode",o))||"tblr"==s?e.writingMode="vertical-lr":"tbrl"==s?e.writingMode="vertical-rl":"rltb"==s||"rl"==s?e.direction="rtl":s&&(e.direction=we),(s=Qm(t,n,a,"textAlign",!0))?(e.positionAlign=vb[s],e.lineAlign=yb[s],e.textAlign=ke[s.toUpperCase()]):e.textAlign=Ee,(s=Qm(t,n,a,"displayAlign",!0))&&(e.displayAlign=Ae[s.toUpperCase()]);(s=Qm(t,n,a,"color",o))&&(e.color=s);(s=Qm(t,n,a,"backgroundColor",o))&&(e.backgroundColor=s);(s=Qm(t,n,a,"border",o))&&(e.border=s);if(s=Qm(t,n,a,"fontFamily",o))switch(s){case"monospaceSerif":e.fontFamily="Courier New,Liberation Mono,Courier,monospace";break;case"proportionalSansSerif":e.fontFamily="Arial,Helvetica,Liberation Sans,sans-serif";break;case"sansSerif":e.fontFamily="sans-serif";break;case"monospaceSansSerif":e.fontFamily="Consolas,monospace";break;case"proportionalSerif":e.fontFamily="serif";break;default:e.fontFamily=s}(s=Qm(t,n,a,"fontWeight",o))&&"bold"==s&&(e.fontWeight=700),s=Qm(t,n,a,"wrapOption",o),e.wrapLine=!s||"noWrap"!=s,(s=Qm(t,n,a,"lineHeight",o))&&s.match(lb)&&(e.lineHeight=s),(s=Qm(t,n,a,"fontSize",o))&&(s.match(lb)||s.match(sb))&&(e.fontSize=s),(s=Qm(t,n,a,"fontStyle",o))&&(e.fontStyle=Oe[s.toUpperCase()]);r?(i=r.getAttribute("imageType")||r.getAttribute("imagetype"),s=r.getAttribute("encoding"),r=r.textContent.trim(),"PNG"==i&&"Base64"==s&&r&&(e.backgroundImage="data:image/png;base64,"+r)):i&&(e.backgroundImage=i),(r=Qm(t,n,a,"textOutline",o))&&((r=r.split(" "))[0].match(lb)?e.textStrokeColor=e.color:(e.textStrokeColor=r[0],r.shift()),r[0]&&r[0].match(lb)?e.textStrokeWidth=r[0]:e.textStrokeColor="");(r=Qm(t,n,a,"letterSpacing",o))&&r.match(lb)&&(e.letterSpacing=r),(r=Qm(t,n,a,"linePadding",o))&&r.match(lb)&&(e.linePadding=r),(r=Qm(t,n,a,"opacity",o))&&(e.opacity=parseFloat(r));(r=$m(n,a,"textDecoration"))&&Xm(e,r),(r=Jm(t,a,"textDecoration"))&&Xm(e,r),(r=Qm(t,n,a,"textCombine",o))&&(e.textCombineUpright=r);switch(Qm(t,n,a,"ruby",o)){case"container":e.rubyTag="ruby";break;case"text":e.rubyTag="rt"}}(n,g,s,y,v,a,t,0==l.length),n}(r,t,a,o,s,i,l,d,c,null,!1,n))&&(t.backgroundColor||(t.backgroundColor="transparent"),e.push(t)),e},j("shaka.text.TtmlTextParser",qm),qm.prototype.parseMedia=qm.prototype.parseMedia,qm.prototype.setManifestType=qm.prototype.setManifestType,qm.prototype.setSequenceMode=qm.prototype.setSequenceMode,qm.prototype.parseInit=qm.prototype.parseInit;var ob=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,sb=/^(\d{1,2}(?:\.\d+)?|100)%$/,lb=/^(\d+px|\d+em|\d*\.?\d+c)$/,ub=/^(\d+)px (\d+)px$/,cb=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,db=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,pb=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,hb=/^(\d*(?:\.\d*)?)f$/,fb=/^(\d*(?:\.\d*)?)t$/,gb=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$"),yb={left:xe,center:"center",right:"end",start:xe,end:"end"},vb={left:"line-left",center:"center",right:"line-right"},mb=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"],bb=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"],_b=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Eb(){this.g=new qm}function kb(){this.h=!1,this.g="UNKNOWN"}function Tb(e){for(var t=u(Object.entries(Pe)),n=t.next();!n.done;n=t.next()){var r=u(n.value);n=r.next().value,r=r.next().value;var i=new ve(0,0,"");i.color=r,e.set("."+n,i)}for(n=(t=u(Object.entries(De))).next();!n.done;n=t.next())n=(r=u(n.value)).next().value,r=r.next().value,(i=new ve(0,0,"")).backgroundColor=r,e.set("."+n,i)}function Ab(e,t,n){0===n.size&&Tb(n);e:{for(var r=[],i=-1,a="",o=0;o<e.length;o++)if("/"===e[o]&&0<o&&"<"===e[o-1]){var s=e.indexOf(">",o);if(s<=o)break e;if((s=e.substring(o+1,s))&&"c"===s){var l=r.pop();l?l===s?(a+="/"+s+">",o+=s.length+1):l.startsWith("c.")?(o+=s.length+1,a+="/"+l+">"):a+=e[o]:a+=e[o]}else a+=e[o]}else"<"===e[o]?"c"!=e[i=o+1]&&(i=-1):">"===e[o]&&0<i&&(r.push(e.substr(i,o-i)),i=-1),a+=e[o];e=a}for(r=e,e=[],a=-1,i=0;i<r.length;i++)"<"===r[i]?a=i+1:">"===r[i]&&0<a&&((a=r.substr(a,i-a)).match(Pb)&&e.push(a),a=-1);for(i=(e=u(e)).next();!i.done;i=e.next())i=i.value,r=r.replace("<"+i+">",'<div time="'+i+'">'),r+="</div>";e:{for(i=e=r,a=[],o=-1,e="",r=!1,s=0;s<i.length;s++)if("/"===i[s]){if(-1===(l=i.indexOf(">",s))){e=i;break e}if((l=i.substring(s+1,l))&&"v"==l){r=!0;var c=null;if(a.length&&(c=a[a.length-1]),c){if(c===l)e+="/"+l+">";else{if(!c.startsWith("v")){e+=i[s];continue}e+="/"+c+">"}s+=l.length+1}else e+=i[s]}else e+=i[s]}else"<"===i[s]?"v"!=i[o=s+1]&&(o=-1):">"===i[s]&&0<o&&(a.push(i.substr(o,s-o)),o=-1),e+=i[s];for(a=(i=u(a)).next();!a.done;a=i.next())o=(a=a.value).replace(" ",".voice-"),e=(e=e.replace("<"+a+">","<"+o+">")).replace("</"+a+">","</"+o+">"),r||(e+="</"+o+">")}if(r=Di("<span>"+e+"</span>","span")){if(1==(r=r.childNodes).length&&((i=r[0]).nodeType==Node.TEXT_NODE||i.nodeType==Node.CDATA_SECTION_NODE))return void(t.payload=Ib(e));for(r=(e=u(r)).next();!r.done;r=e.next())Sb(r.value,t,n)}else t.payload=Ib(e)}function wb(e,t){return e&&0<e.length?e:t}function Sb(e,t,n){var r=t.clone();if(r.nestedCues=[],r.payload="",r.rubyTag="",r.line=null,r.region=new Me,r.position=null,r.size=0,e.nodeType===Node.ELEMENT_NODE&&e.nodeName)for(var i=u(e.nodeName.split(/(?=[ .])+/g)),a=i.next();!a.done;a=i.next()){var o=a=a.value;if(o.startsWith(".voice-")){var s=o.split("-").pop();o='v[voice="'+s+'"]',n.has(o)||(o="v[voice="+s+"]")}switch(n.has(o)&&(o=n.get(o))&&(r.backgroundColor=wb(o.backgroundColor,r.backgroundColor),r.color=wb(o.color,r.color),r.fontFamily=wb(o.fontFamily,r.fontFamily),r.fontSize=wb(o.fontSize,r.fontSize),r.fontWeight=o.fontWeight,r.fontStyle=o.fontStyle,r.opacity=o.opacity,r.rubyTag=o.rubyTag,r.textCombineUpright=o.textCombineUpright,r.textShadow=o.textShadow,r.wrapLine=o.wrapLine),a){case"br":return r=me(r.startTime,r.endTime),void t.nestedCues.push(r);case"b":r.fontWeight=700;break;case"i":r.fontStyle="italic";break;case"u":r.textDecoration.push("underline");break;case"font":(a=e.getAttribute("color"))&&(r.color=a);break;case"div":if(!(a=e.getAttribute("time")))break;(a=xb(new cf(a)))&&(r.startTime=a);break;case"ruby":case"rp":case"rt":r.rubyTag=a}}if(i=e.childNodes,_i(e)||1==i.length&&_i(i[0]))for(i=!0,n=u(e.textContent.split("\n")),e=n.next();!e.done;e=n.next())e=e.value,i||(i=me(r.startTime,r.endTime),t.nestedCues.push(i)),0<e.length&&((i=r.clone()).payload=Ib(e),t.nestedCues.push(i)),i=!1;else for(t.nestedCues.push(r),e=(t=u(i)).next();!e.done;e=t.next())Sb(e.value,r,n)}function Cb(e,t,n){var r;(r=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=r[1],e.textAlign="middle"==t?Ee:ke[t.toUpperCase()]):(r=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==r[1]?"vertical-lr":"vertical-rl":(r=/^size:([\d.]+)%$/.exec(t))?e.size=Number(r[1]):(r=/^position:([\d.]+)%(?:,(line-left|line-right|middle|center|start|end|auto))?$/.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center"==t||"middle"==t?"center":_e)):(r=/^region:(.*)$/.exec(t))?(t=function(e,t){return(e=e.filter((function(e){return e.id==t}))).length?e[0]:null}(n,r[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=Ie[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=Ce,e.line=Number(n[1]),n[2]&&(e.lineAlign=Ie[n[2].toUpperCase()]))}function xb(e){if(null==(e=pf(e,Pb)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function Ib(e){var t={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&nbsp;":" ","&lrm;":"‎","&rlm;":"‏"},n=/&(?:amp|lt|gt|quot|#(0+)?39|nbsp|lrm|rlm);/g,r=RegExp(n.source);return e&&r.test(e)?e.replace(n,(function(e){return t[e]||"'"})):e||""}Rt["application/ttml+xml"]=function(){return new qm},Eb.prototype.parseInit=function(e){var t=!1;if((new qr).box("moov",Xr).box("trak",Xr).box("mdia",Xr).box("minf",Xr).box("stbl",Xr).P("stsd",Qr).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new ut(2,2,2007)},Eb.prototype.setSequenceMode=function(){},Eb.prototype.setManifestType=function(){},Eb.prototype.parseMedia=function(e,t,n){var r=this,i=!1,a=[];if((new qr).box("mdat",Jr((function(e){i=!0,a=a.concat(r.g.parseMedia(e,t,n))}))).parse(e,!1),!i)throw new ut(2,2,2007);return a},j("shaka.text.Mp4TtmlParser",Eb),Eb.prototype.parseMedia=Eb.prototype.parseMedia,Eb.prototype.setManifestType=Eb.prototype.setManifestType,Eb.prototype.setSequenceMode=Eb.prototype.setSequenceMode,Eb.prototype.parseInit=Eb.prototype.parseInit,Rt['application/mp4; codecs="stpp"']=function(){return new Eb},Rt['application/mp4; codecs="stpp.ttml"']=function(){return new Eb},Rt['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Eb},Rt['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Eb},kb.prototype.parseInit=function(){},kb.prototype.setSequenceMode=function(e){this.h=e},kb.prototype.setManifestType=function(e){this.g=e},kb.prototype.parseMedia=function(e,t){var n=(e=(e=Br(e)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(n[0]))throw new ut(2,2,2e3);if(e=t.vttOffset,n[0].includes("X-TIMESTAMP-MAP")&&this.h){var r=n[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),i=n[0].match(/MPEGTS:(\d+)/m);if(r&&i){if(null==(e=xb(new cf(r[1]))))throw new ut(2,2,2e3);for(i=Number(i[1]),r=t.segmentStart-t.periodStart;95443.7176888889<=r;)r-=95443.7176888889,i+=8589934592;e=t.periodStart+i/9e4-e}}else n[0].includes("X-TIMESTAMP-MAP")&&"HLS"==this.g&&(e=t.segmentStart);for(t=[],r=(i=u(n[0].split("\n"))).next();!r.done;r=i.next())if(r=r.value,/^Region:/.test(r)){r=new cf(r);var a=new Me;hf(r),df(r);for(var o=hf(r);o;){var s=a,l=o;(o=/^id=(.*)$/.exec(l))?s.id=o[1]:(o=/^width=(\d{1,2}|100)%$/.exec(l))?s.width=Number(o[1]):(o=/^lines=(\d+)$/.exec(l))?(s.height=Number(o[1]),s.heightUnits=2):(o=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))?(s.regionAnchorX=Number(o[1]),s.regionAnchorY=Number(o[2])):(o=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(l))?(s.viewportAnchorX=Number(o[1]),s.viewportAnchorY=Number(o[2])):/^scroll=up$/.exec(l)&&(s.scroll="up"),df(r),o=hf(r)}t.push(a)}for(Tb(i=new Map),r=[],a=(n=u(n.slice(1))).next();!a.done;a=n.next()){if((1!=(a=a.value.split("\n")).length||a[0])&&!/^NOTE($|[ \t])/.test(a[0])&&"STYLE"==a[0]){for(s=[],o=-1,l=1;l<a.length;l++)a[l].includes("::cue")&&(s.push([]),o=s.length-1),-1!=o&&(s[o].push(a[l]),a[l].includes("}")&&(o=-1));for(o=(s=u(s)).next();!o.done;o=s.next()){var c=o.value;o="global",(l=c[0].match(/\((.*)\)/))&&(o=l.pop()),l=c.slice(1,-1),c[0].includes("}")&&(c=/\{(.*?)\}/.exec(c[0]))&&(l=c[1].split(";")),(c=i.get(o))||(c=new ve(0,0,""));for(var d=!1,p=0;p<l.length;p++){var h=/^\s*([^:]+):\s*(.*)/.exec(l[p]);if(h){var f=h[2].trim().replace(";","");switch(h[1].trim()){case"background-color":case"background":d=!0,c.backgroundColor=f;break;case"color":d=!0,c.color=f;break;case"font-family":d=!0,c.fontFamily=f;break;case"font-size":d=!0,c.fontSize=f;break;case"font-weight":(700<=parseInt(f,10)||"bold"==f)&&(d=!0,c.fontWeight=700);break;case"font-style":switch(f){case"normal":d=!0,c.fontStyle=Le;break;case"italic":d=!0,c.fontStyle="italic";break;case"oblique":d=!0,c.fontStyle="oblique"}break;case"opacity":d=!0,c.opacity=parseFloat(f);break;case"text-combine-upright":d=!0,c.textCombineUpright=f;break;case"text-shadow":d=!0,c.textShadow=f;break;case"white-space":d=!0,c.wrapLine="noWrap"!=f}}}d&&i.set(o,c)}}if(d=e,1==a.length&&!a[0]||/^NOTE($|[ \t])/.test(a[0])||"STYLE"==a[0]||"REGION"==a[0])a=null;else if(s=null,a[0].includes("--\x3e")||(s=a[0],a.splice(0,1)),l=xb(o=new cf(a[0])),p=pf(o,/[ \t]+--\x3e[ \t]+/g),c=xb(o),null==l||null==p||null==c)W("Failed to parse VTT time code. Cue skipped:",s,a),a=null;else{for(l+=d,c+=d,a=a.slice(1).join("\n").trim(),i.has("global")?((d=i.get("global").clone()).startTime=l,d.endTime=c,d.payload=""):d=new ve(l,c,""),df(o),l=hf(o);l;)Cb(d,l,t),df(o),l=hf(o);Ab(a,d,i),null!=s&&(d.id=s),a=d}a&&r.push(a)}return r},j("shaka.text.VttTextParser",kb),kb.prototype.parseMedia=kb.prototype.parseMedia,kb.prototype.setManifestType=kb.prototype.setManifestType,kb.prototype.setSequenceMode=kb.prototype.setSequenceMode,kb.prototype.parseInit=kb.prototype.parseInit;var Pb=/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g;function Db(){this.g=null}function Rb(e,t,n){var r,i,a;return(new qr).box("payl",Jr((function(e){r=Br(e)}))).box("iden",Jr((function(e){i=Br(e)}))).box("sttg",Jr((function(e){a=Br(e)}))).parse(e),r?function(e,t,n,r,i){if(r=new ve(r,i,""),Ab(e,r,new Map),t&&(r.id=t),n)for(e=new cf(n),t=hf(e);t;)Cb(r,t,[]),df(e),t=hf(e);return r}(r,i,a,t,n):null}function Lb(){}function Ob(e){if(null==(e=pf(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function Mb(){this.g=new kb}function Nb(e){var t="WEBVTT\n\n";if(""==e)return t;for(var n=(e=u((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"))).next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join("\n").replace(/{b}/g,"<b>").replace(/{\/b}/g,"</b>").replace(/{i}/g,"<i>").replace(/{\/i}/g,"</i>").replace(/{u}/g,"<u>").replace(/{\/u}/g,"</u>")+"\n\n";return t}function Ub(){}function Fb(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=Bb(n))&&(e.color=n),(n=t.BackColour)&&(n=Bb(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=700),t.Italic&&(e.fontStyle="italic"),t.Underline&&e.textDecoration.push("underline"),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=Te,e.textAlign="start";break;case 2:e.displayAlign=Te,e.textAlign=Ee;break;case 3:e.displayAlign=Te,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=Ee;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=Ee;break;case 11:e.displayAlign="center",e.textAlign="end"}(t=t.AlphaLevel)&&(e.opacity=parseFloat(t))}function Bb(e){return 0<=(e=parseInt(e.replace("&H",""),16))?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function jb(e){return 3600*((e=Kb.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Rt["text/vtt"]=function(){return new kb},Rt['text/vtt; codecs="vtt"']=function(){return new kb},Rt['text/vtt; codecs="wvtt"']=function(){return new kb},Db.prototype.parseInit=function(e){var t=this,n=!1;if((new qr).box("moov",Xr).box("trak",Xr).box("mdia",Xr).P("mdhd",(function(e){e=Pa(e.reader,e.version),t.g=e.timescale})).box("minf",Xr).box("stbl",Xr).P("stsd",Qr).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new ut(2,2,2008);if(!n)throw new ut(2,2,2008)},Db.prototype.setSequenceMode=function(){},Db.prototype.setManifestType=function(){},Db.prototype.parseMedia=function(e,t){if(!e.length)return[];if(!this.g)throw new ut(2,2,2008);var n,r=0,i=[],a=[],o=!1,s=!1,l=!1,c=null;if((new qr).box("moof",Xr).box("traf",Xr).P("tfdt",(function(e){o=!0,r=Ia(e.reader,e.version).baseMediaDecodeTime})).P("tfhd",(function(e){c=xa(e.reader,e.flags).Df})).P("trun",(function(e){s=!0,i=Da(e.reader,e.version,e.flags).bg})).box("mdat",Jr((function(e){l=!0,n=e}))).parse(e,!1),!l&&!o&&!s)throw new ut(2,2,2008);e=r;for(var d=new zr(n,0),p=u(i),h=p.next();!h.done;h=p.next()){var f=(h=h.value).cf||c,g=h.Rd?r+h.Rd:e;e=g+(f||0);var y=0;do{var v=d.L();y+=v;var m=null;"vttc"==ei(d.L())?8<v&&(m=d.pb(v-8)):d.skip(v-8),f&&m&&(v=Rb(m,t.periodStart+g/this.g,t.periodStart+e/this.g),a.push(v))}while(h.sampleSize&&y<h.sampleSize)}return a.filter(Mt)},j("shaka.text.Mp4VttParser",Db),Db.prototype.parseMedia=Db.prototype.parseMedia,Db.prototype.setManifestType=Db.prototype.setManifestType,Db.prototype.setSequenceMode=Db.prototype.setSequenceMode,Db.prototype.parseInit=Db.prototype.parseInit,Rt['application/mp4; codecs="wvtt"']=function(){return new Db},Lb.prototype.parseInit=function(){},Lb.prototype.setSequenceMode=function(){},Lb.prototype.setManifestType=function(){},Lb.prototype.parseMedia=function(e){var t=Br(e).replace(/\r+/g,"");if(e=[],""==(t=t.trim()))return e;for(var n=(t=u(t.split("\n\n"))).next();!n.done;n=t.next()){var r=new cf((n=n.value.split("\n"))[0]),i=Ob(r),a=pf(r,/,/g);if(r=Ob(r),null==i||null==a||null==r)throw new ut(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new ve(i,r,n.slice(1).join("\n").trim()))}return e},j("shaka.text.SbvTextParser",Lb),Lb.prototype.parseMedia=Lb.prototype.parseMedia,Lb.prototype.setManifestType=Lb.prototype.setManifestType,Lb.prototype.setSequenceMode=Lb.prototype.setSequenceMode,Lb.prototype.parseInit=Lb.prototype.parseInit,Rt["text/x-subviewer"]=function(){return new Lb},Mb.prototype.parseInit=function(){},Mb.prototype.setSequenceMode=function(){},Mb.prototype.setManifestType=function(){},Mb.prototype.parseMedia=function(e,t,n){return e=ae(Vr(e=Nb(e=Br(e)))),this.g.parseMedia(e,t,n)},j("shaka.text.SrtTextParser",Mb),Mb.srt2webvtt=Nb,Mb.prototype.parseMedia=Mb.prototype.parseMedia,Mb.prototype.setManifestType=Mb.prototype.setManifestType,Mb.prototype.setSequenceMode=Mb.prototype.setSequenceMode,Mb.prototype.parseInit=Mb.prototype.parseInit,Rt["text/srt"]=function(){return new Mb},Ub.prototype.parseInit=function(){},Ub.prototype.setSequenceMode=function(){},Ub.prototype.setManifestType=function(){},Ub.prototype.parseMedia=function(e){for(var t="",n="",r=(e=u(e=Br(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var i=Hb.exec(r.value);i&&(r=i[1],i=i[2],"V4 Styles"==r||"V4+ Styles"==r?t=i:"Events"==r&&(n=i))}e=[],r=null;for(var a=(t=u(t.split(/\r?\n/))).next();!a.done;a=t.next())if(i=a.value,!/^\s*;/.test(i)&&(a=Vb.exec(i)))if(i=a[1].trim(),a=a[2].trim(),"Format"==i)r=a.split(Gb);else if("Style"==i){i=a.split(Gb),a={};for(var o=0;o<r.length&&o<i.length;o++)a[r[o]]=i[o];e.push(a)}for(r=[],t=null,i={},a=(n=u(n.split(/\r?\n/))).next();!a.done;i={$d:i.$d},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=Vb.exec(a)))if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(Gb);else if("Dialogue"==a){o=o.split(Gb),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new ve(s=jb(a.Start),jb(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),i.$d=a.Style,(a=e.find(function(e){return function(t){return t.Name==e.$d}}(i)))&&Fb(o,a),r.push(o)}return r},j("shaka.text.SsaTextParser",Ub),Ub.prototype.parseMedia=Ub.prototype.parseMedia,Ub.prototype.setManifestType=Ub.prototype.setManifestType,Ub.prototype.setSequenceMode=Ub.prototype.setSequenceMode,Ub.prototype.parseInit=Ub.prototype.parseInit;var Hb=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,Vb=/^\s*([^:]+):\s*(.*)/,Gb=/\s*,\s*/,Kb=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/;function zb(e,t){var n=1&e[t+1]?7:9;return t+n<=e.length&&0<(e=((3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5)-n)?{Fd:n,R:e}:null}function Wb(e,t){var n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],r=(60&e[t+2])>>>2;if(r>n.length-1)return null;var i=1+((192&e[t+2])>>>6),a=(1&e[t+2])<<2;return a|=(192&e[t+3])>>>6,{sampleRate:n[r],channelCount:a,ia:"mp4a.40."+i}}function Yb(e,t){if(t+1<e.length&&255===e[t]&&240==(246&e[t+1])){var n=1&e[t+1]?7:9;if(t+n>=e.length)return!1;var r=(3&e[t+3])<<11|e[t+4]<<3|(224&e[t+5])>>>5;return!(r<=n)&&((t+=r)===e.length||t+1<e.length&&255===e[t]&&240==(246&e[t+1]))}return!1}function qb(e){this.i=e,this.h=0,this.g=new Map}function Xb(e,t){if(t+8>e.length||11!==e[t]||119!==e[t+1])return null;var n=e[t+4]>>6;if(3<=n)return null;var r=63&e[t+4],i=2*[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][3*r+n];if(t+i>e.length)return null;var a=e[t+6]>>5,o=0;2===a?o+=2:(1&a&&1!==a&&(o+=2),4&a&&(o+=2)),o=(e[t+6]<<8|e[t+7])>>12-o&1;var s=7&e[t+5];return e=new Uint8Array([n<<6|e[t+5]>>3<<1|s>>2,(3&s)<<6|a<<3|o<<2|r>>4,r<<4&224]),{sampleRate:[48e3,44100,32e3][n],channelCount:[2,1,2,3,3,4,4,5][a]+o,ca:e,R:i}}function Qb(e,t){if(11===e[t]&&119===e[t+1]){var n,r,i=0,a=5;for(t+=a;0<a;){r=e[t];var o=Math.min(a,8),s=8-o;n=(r&(n=4278190080>>>24+s<<s))>>s,i=i?i<<o|n:n,t+=1,a-=o}if(16>i)return!0}return!1}function $b(e){this.i=e,this.h=0,this.g=new Map}function Jb(e,t){if(t+8>e.length||2935!=(e[t]<<8|e[t+1]<<0))return null;var n=new Ma(e.subarray(t+2));Ua(n,2),Ua(n,3);var r=Fa(n,11)+1<<1,i=Fa(n,2);if(3==i){i=[24e3,22060,16e3][i=Fa(n,2)];var a=3}else i=[48e3,44100,32e3][i],a=Fa(n,2);var o=Fa(n,3),s=Fa(n,1);return n=Fa(n,5),t+r>e.byteLength?null:(e=Math.floor(r*i/(16*[1,2,3,6][a])),e=new Uint8Array([(8160&e)>>5,(31&e)<<3,i<<6|n<<1|0,0|o<<1|s<<0,0]),{sampleRate:i,channelCount:[2,1,2,3,3,4,4,5][o]+s,ca:e,R:r})}function Zb(e){this.i=e,this.h=0,this.g=new Map}function e_(e){for(var t=!1,n=[],r=e.find((function(e){return 7==e.type})),i=!1,a=(e=u(e)).next();!a.done;a=e.next()){var o=!1;switch((a=a.value).type){case 1:o=i=!0;var s=a.data;r&&4<s.length&&(2===(s=Wa(new Ma(s)))||4===s||7===s||9===s)&&(t=!0);break;case 5:t=o=i=!0;break;case 6:case 7:case 8:o=!0;break;case 9:i=o=!0;break;case 12:o=!0;break;default:o=!1}i&&o&&(o=a.da.byteLength,(s=new Uint8Array(4))[0]=o>>24&255,s[1]=o>>16&255,s[2]=o>>8&255,s[3]=255&o,n.push(ci(s,a.da)))}return n.length?{data:ci.apply(ii,c(n)),Uc:t}:null}Rt["text/x-ssa"]=function(){return new Ub},(r=qb.prototype).destroy=function(){this.g.clear()},r.isSupported=function(e){return"audio/aac"==e.toLowerCase().split(";")[0]&&Q(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"audio/aac"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="'+(wt(t)||"mp4a.40.2")+'"':t},r.getOriginalMimeType=function(){return this.i},r.transmux=function(e,t,n,r){for(var i=ae(e),a=Ca(i),o=a.length;o<i.length&&!Yb(i,o);o++);if(e=1e3*n.endTime,(a=Sa(a)).length&&n&&(n=a.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&(e=n.data),!(n=Wb(i,o)))return Promise.reject(new ut(2,3,3018));for(t.audioSamplingRate=n.sampleRate,t.channelsCount=n.channelCount,a=[];o<i.length;){var s=zb(i,o);if(!s)return Promise.reject(new ut(2,3,3018));var l=s.Fd+s.R;o+l<=i.length&&a.push({data:i.subarray(o+s.Fd,o+l),size:s.R,duration:1024,Qa:0,flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:2,Sa:0}}),o+=l}return i=n.sampleRate,e=Math.floor(e*i/1e3),e=new vg([r={id:t.id,type:"audio",codecs:n.ia,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:i,duration:r,Oa:[],ca:new Uint8Array([]),ma:new Uint8Array([]),data:{ab:this.h,baseMediaDecodeTime:e,La:a},stream:t}]),this.g.has(t.id)?r=this.g.get(t.id):(r=mg(e),this.g.set(t.id,r)),t=kg(e),this.h++,t=ci(r,t),Promise.resolve(t)},j("shaka.transmuxer.AacTransmuxer",qb),qb.prototype.transmux=qb.prototype.transmux,qb.prototype.getOriginalMimeType=qb.prototype.getOriginalMimeType,qb.prototype.convertCodecs=qb.prototype.convertCodecs,qb.prototype.isSupported=qb.prototype.isSupported,qb.prototype.destroy=qb.prototype.destroy,Be("audio/aac",(function(){return new qb("audio/aac")}),Ve),(r=$b.prototype).destroy=function(){this.g.clear()},r.isSupported=function(e){return"audio/ac3"==e.toLowerCase().split(";")[0]&&Q(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"audio/ac3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ac-3"':t},r.getOriginalMimeType=function(){return this.i},r.transmux=function(e,t,n,r){for(var i=Ca(e=ae(e)),a=i.length;a<e.length&&!Qb(e,a);a++);var o=1e3*n.endTime;(i=Sa(i)).length&&n&&(n=i.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&(o=n.data),n=0,i=new Uint8Array([]);for(var s=[];a<e.length;){var l=Xb(e,a);if(!l)return Promise.reject(new ut(2,3,3018));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,n=l.sampleRate,i=l.ca,s.push({data:e.subarray(a,a+l.R),size:l.R,duration:1536,Qa:0,flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:2,Sa:0}}),a+=l.R}return e=Math.floor(o*n/1e3),e=new vg([r={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:n,duration:r,Oa:[],ca:i,ma:new Uint8Array([]),data:{ab:this.h,baseMediaDecodeTime:e,La:s},stream:t}]),this.g.has(t.id)?r=this.g.get(t.id):(r=mg(e),this.g.set(t.id,r)),t=kg(e),this.h++,t=ci(r,t),Promise.resolve(t)},j("shaka.transmuxer.Ac3Transmuxer",$b),$b.prototype.transmux=$b.prototype.transmux,$b.prototype.getOriginalMimeType=$b.prototype.getOriginalMimeType,$b.prototype.convertCodecs=$b.prototype.convertCodecs,$b.prototype.isSupported=$b.prototype.isSupported,$b.prototype.destroy=$b.prototype.destroy,Be("audio/ac3",(function(){return new $b("audio/ac3")}),Ve),(r=Zb.prototype).destroy=function(){this.g.clear()},r.isSupported=function(e){return"audio/ec3"==e.toLowerCase().split(";")[0]&&Q(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"audio/ec3"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="ec-3"':t},r.getOriginalMimeType=function(){return this.i},r.transmux=function(e,t,n,r){for(var i=Ca(e=ae(e)),a=i.length;a<e.length&&2935!=(e[a]<<8|e[a+1]<<0);a++);var o=1e3*n.endTime;(i=Sa(i)).length&&n&&(n=i.find((function(e){return"com.apple.streaming.transportStreamTimestamp"===e.description})))&&(o=n.data),n=0,i=new Uint8Array([]);for(var s=[];a<e.length;){var l=Jb(e,a);if(!l)return Promise.reject(new ut(2,3,3018));t.audioSamplingRate=l.sampleRate,t.channelsCount=l.channelCount,n=l.sampleRate,i=l.ca,s.push({data:e.subarray(a,a+l.R),size:l.R,duration:1536,Qa:0,flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:2,Sa:0}}),a+=l.R}return e=Math.floor(o*n/1e3),e=new vg([r={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:n,duration:r,Oa:[],ca:i,ma:new Uint8Array([]),data:{ab:this.h,baseMediaDecodeTime:e,La:s},stream:t}]),this.g.has(t.id)?r=this.g.get(t.id):(r=mg(e),this.g.set(t.id,r)),t=kg(e),this.h++,t=ci(r,t),Promise.resolve(t)},j("shaka.transmuxer.Ec3Transmuxer",Zb),Zb.prototype.transmux=Zb.prototype.transmux,Zb.prototype.getOriginalMimeType=Zb.prototype.getOriginalMimeType,Zb.prototype.convertCodecs=Zb.prototype.convertCodecs,Zb.prototype.isSupported=Zb.prototype.isSupported,Zb.prototype.destroy=Zb.prototype.destroy,Be("audio/ec3",(function(){return new Zb("audio/ec3")}),Ve);var t_=[100,110,122,244,44,83,86,118,128,138,139,134];function n_(e){if(!e.length)return null;var t=e.find((function(e){return 32==e.type})),n=e.find((function(e){return 33==e.type})),r=e.find((function(e){return 34==e.type}));if(!t||!n||!r)return null;var i=function(e){var t=new Ma(e,!0);return Ka(t),Ka(t),Fa(t,4),Fa(t,2),Fa(t,6),e=Fa(t,3),t=Ga(t),{Ue:e+1,lf:t}}(t.da);e=function(e){Ka(e=new Ma(e,!0)),Ka(e);var t=0,n=0,r=0,i=0;Fa(e,4);var a=Fa(e,3);Ga(e);for(var o=Fa(e,2),s=Fa(e,1),l=Fa(e,5),u=Ka(e),c=Ka(e),d=Ka(e),p=Ka(e),h=Ka(e),f=Ka(e),g=Ka(e),y=Ka(e),v=Ka(e),m=Ka(e),b=Ka(e),_=[],E=[],k=0;k<a;k++)_.push(Ga(e)),E.push(Ga(e));if(0<a)for(k=a;8>k;k++)Fa(e,2);for(k=0;k<a;k++)_[k]&&Fa(e,88),E[k]&&Ka(e);Ha(e),3==(_=Ha(e))&&Fa(e,1),E=Ha(e),k=Ha(e),Ga(e)&&(t+=Ha(e),n+=Ha(e),r+=Ha(e),i+=Ha(e));var T=Ha(e),A=Ha(e),w=Ha(e);if(Ga(e))for(var S=0;S<=a;S++)Ha(e),Ha(e),Ha(e);else Ha(e),Ha(e),Ha(e);if(Ha(e),Ha(e),Ha(e),Ha(e),Ha(e),Ha(e),Ga(e)&&Ga(e))for(S=0;4>S;S++)for(var C=0;C<(3===S?2:6);C++)if(Ga(e)){var x=Math.min(64,1<<4+(S<<1));1<S&&Va(e);for(var I=0;I<x;I++)Va(e)}else Ha(e);for(Ga(e),Ga(e),Ga(e)&&(Ka(e),Ha(e),Ha(e),Ga(e)),S=Ha(e),x=C=0;x<S;x++)if(I=!1,0!==x&&(I=Ga(e)),I){x===S&&Ha(e),Ga(e),Ha(e);for(var P=I=0;P<=C;P++){var D=Ga(e),R=!1;D||(R=Ga(e)),(D||R)&&I++}C=I}else{for(P=Ha(e),I=Ha(e),C=P+I,D=0;D<P;D++)Ha(e),Ga(e);for(P=0;P<I;P++)Ha(e),Ga(e)}if(Ga(e))for(S=Ha(e),C=0;C<S;C++){for(x=0;x<w+4;x++)Fa(e,1);Fa(e,1)}if(w=0,Ga(e),Ga(e),Ga(e)){if(Ga(e)&&255===Ka(e)&&(Fa(e,16),Fa(e,16)),Ga(e)&&Ga(e),Ga(e)&&(Fa(e,3),Ga(e),Ga(e)&&(Ka(e),Ka(e),Ka(e))),Ga(e)&&(Ha(e),Ha(e)),Ga(e),Ga(e),Ga(e),(S=Ga(e))&&(Ha(e),Ha(e),Ha(e),Ha(e)),Ga(e)&&(Fa(e,32),Fa(e,32),Ga(e)&&Ha(e),Ga(e)))for(x=!1,S=Ga(e),C=Ga(e),(S||C)&&((x=Ga(e))&&(Ka(e),Fa(e,5),Ga(e),Fa(e,5)),Fa(e,4),Fa(e,4),x&&Fa(e,4),Fa(e,5),Fa(e,5),Fa(e,5)),I=0;I<=a;I++){if(D=!0,P=1,Ga(e)||(D=Ga(e)),R=!1,D?Ha(e):R=Ga(e),R||(P=Ha(e)+1),S){for(D=0;D<P;D++)Ha(e),Ha(e),x&&(Ha(e),Ha(e));Ga(e)}if(C){for(D=0;D<P;D++)Ha(e),Ha(e),x&&(Ha(e),Ha(e));Ga(e)}}Ga(e)&&(Ga(e),Ga(e),Ga(e),w=Ha(e),Ha(e),Ha(e),Ha(e),Ha(e))}return{re:b,xe:o,ye:s,we:l,se:u,te:c,ue:d,ve:p,le:h,me:f,ne:g,oe:y,pe:v,qe:m,Md:w,ie:0,he:_,ge:T,fe:A,width:E-(t+n)*(1===_||2===_?2:1),height:k-(r+i)*(1===_?2:1)}}(n.da);var a=function(e){var t=new Ma(e,!0);Ka(t),Ka(t),Ha(t),Ha(t),Ga(t),Ga(t),Fa(t,3),Ga(t),Ga(t),Ha(t),Ha(t),Va(t),Ga(t),Ga(t),Ga(t)&&Ha(t),Va(t),Va(t),Ga(t),Ga(t),Ga(t),Ga(t),e=Ga(t),t=Ga(t);var n=1;return t&&e?n=0:t?n=3:e&&(n=2),{Xe:n}}(r.da);return t=function(e,t,n,r){var i=new Uint8Array(23+(5+e.byteLength)+(5+t.byteLength)+(5+n.byteLength));return i[0]=1,i[1]=(3&r.xe)<<6|(r.ye?1:0)<<5|31&r.we,i[2]=r.se,i[3]=r.te,i[4]=r.ue,i[5]=r.ve,i[6]=r.le,i[7]=r.me,i[8]=r.ne,i[9]=r.oe,i[10]=r.pe,i[11]=r.qe,i[12]=r.re,i[13]=240|(3840&r.Md)>>8,i[14]=255&r.Md,i[15]=252|3&r.Xe,i[16]=252|3&r.he,i[17]=248|7&r.ge,i[18]=248|7&r.fe,i[19]=0,i[20]=0,i[21]=(3&r.ie)<<6|(7&r.Ue)<<3|(r.lf?1:0)<<2|3,i[22]=3,i[23]=160,i[24]=0,i[25]=1,i[26]=(65280&e.byteLength)>>8,i[27]=(255&e.byteLength)>>0,i.set(e,28),i[23+(5+e.byteLength)]=161,i[e.byteLength+29]=0,i[e.byteLength+30]=1,i[e.byteLength+31]=(65280&t.byteLength)>>8,i[e.byteLength+32]=(255&t.byteLength)>>0,i.set(t,e.byteLength+33),i[23+(e.byteLength+10+t.byteLength)]=162,i[e.byteLength+10+t.byteLength+24]=0,i[e.byteLength+10+t.byteLength+25]=1,i[e.byteLength+10+t.byteLength+26]=(65280&n.byteLength)>>8,i[e.byteLength+10+t.byteLength+27]=(255&n.byteLength)>>0,i.set(n,e.byteLength+10+t.byteLength+28),i}(t.da,n.da,r.da,{Ue:i.Ue,lf:i.lf,xe:e.xe,ye:e.ye,re:e.re,we:e.we,se:e.se,te:e.te,ue:e.ue,ve:e.ve,le:e.le,me:e.me,ne:e.ne,oe:e.oe,pe:e.pe,qe:e.qe,ie:e.ie,Md:e.Md,he:e.he,ge:e.ge,fe:e.fe,Xe:a.Xe}),{height:e.height,width:e.width,ma:t}}function r_(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+3]>>6;i=1e3*a_[14*(3===n?3-r:3===r?3:4)+i-1],a=o_[3*(3===n?0:2===n?1:2)+a],n=s_[n][r];var s=l_[r],l=Math.floor(n*i/a+(e[t+2]>>1&1))*s,u=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);return(u=u?parseInt(u[1],10):0)&&87>=u&&2===r&&224e3<=i&&0===o&&(e[t+3]|=128),{sampleRate:a,channelCount:3===o?1:2,R:l,Jh:8*n*s}}return null}function i_(e,t){return 255===e[t]&&224==(224&e[t+1])&&0!=(6&e[t+1])}var a_=[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],o_=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],s_=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],l_=[0,1,1,4];function u_(e){this.i=e,this.h=0,this.g=new Map}function c_(e){this.h=e,this.g=null}
/*
 @license
 MSS Transmuxer
 Copyright 2015 Dash Industry Forum
 SPDX-License-Identifier: BSD-3-Clause
*/
function d_(e){this.h=e,(this.g=Xh.get("ISOBoxer")())&&function(e){function t(){this._procFullBox(),1&this.flags&&(this._procField("AlgorithmID","uint",24),this._procField("IV_size","uint",8),this._procFieldArray("KID",16,"uint",8)),this._procField("sample_count","uint",32),this._procEntries("entry",this.sample_count,(function(e){this._procEntryField(e,"InitializationVector","data",8),2&this.flags&&(this._procEntryField(e,"NumberOfEntries","uint",16),this._procSubEntries(e,"clearAndCryptedData",e.NumberOfEntries,(function(e){this._procEntryField(e,"BytesOfClearData","uint",16),this._procEntryField(e,"BytesOfEncryptedData","uint",32)})))}))}e.g.addBoxProcessor("saio",(function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("entry_count","uint",32),this._procFieldArray("offset",this.entry_count,"uint",1===this.version?64:32)})),e.g.addBoxProcessor("saiz",(function(){this._procFullBox(),1&this.flags&&(this._procField("aux_info_type","uint",32),this._procField("aux_info_type_parameter","uint",32)),this._procField("default_sample_info_size","uint",8),this._procField("sample_count","uint",32),0===this.default_sample_info_size&&this._procFieldArray("sample_info_size",this.sample_count,"uint",8)})),e.g.addBoxProcessor("senc",t),e.g.addBoxProcessor("uuid",(function(){for(var e=!0,n=0;16>n;n++)this.usertype[n]!==h_[n]&&(e=!1);e&&(this._parsing&&(this.type="sepiff"),t.call(this))}))}(this)}function p_(e,t){for(var n=8,r=0;r<e.boxes.length&&e.boxes[r].type!==t;r++)n+=e.boxes[r].size;return n}(r=u_.prototype).destroy=function(){this.g.clear()},r.isSupported=function(e){return"audio/mpeg"==e.toLowerCase().split(";")[0]&&Q(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"audio/mpeg"==t.toLowerCase().split(";")[0]?'audio/mp4; codecs="mp3"':t},r.getOriginalMimeType=function(){return this.i},r.transmux=function(e,t,n,r){for(n=Ca(e=ae(e)).length;n<e.length;n++){var i=n;if(i+1<e.length&&i_(e,i)){var a=r_(e,i),o=4;a&&a.R&&(o=a.R),i=(i+=o)===e.length||i+1<e.length&&i_(e,i)}else i=!1;if(i)break}var s;for(i=[];n<e.length;){if(!(a=r_(e,n)))return Promise.reject(new ut(2,3,3018));s||(s=a),n+a.R<=e.length&&i.push({data:e.subarray(n,n+a.R),size:a.R,duration:1152,Qa:0,flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:2,Sa:0}}),n+=a.R}return s?(e=9e4*s.Jh/s.sampleRate*this.h,s=new vg([r={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:s.sampleRate,duration:r,Oa:[],ca:new Uint8Array([]),ma:new Uint8Array([]),data:{ab:this.h,baseMediaDecodeTime:e,La:i},stream:t}]),this.g.has(t.id)?r=this.g.get(t.id):(r=mg(s),this.g.set(t.id,r)),t=kg(s),this.h++,t=ci(r,t),Promise.resolve(t)):Promise.reject(new ut(2,3,3018))},j("shaka.transmuxer.Mp3Transmuxer",u_),u_.prototype.transmux=u_.prototype.transmux,u_.prototype.getOriginalMimeType=u_.prototype.getOriginalMimeType,u_.prototype.convertCodecs=u_.prototype.convertCodecs,u_.prototype.isSupported=u_.prototype.isSupported,u_.prototype.destroy=u_.prototype.destroy,Be("audio/mpeg",(function(){return new u_("audio/mpeg")}),Ve),(r=c_.prototype).destroy=function(){},r.isSupported=function(e){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var t=wt(e).split(","),n=ft("audio",t);return t=ft("video",t),!(!n||t||"mp3"!=kt(n))&&Q(this.convertCodecs("audio",e))},r.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?"audio/mpeg":t},r.getOriginalMimeType=function(){return this.h},r.transmux=function(e,t,n,r,i){if(this.g?this.g.clearData():this.g=new Ya,e=ae(e),"mp3"!=(e=this.g.parse(e)).Lc().audio||"audio"!=i)return Promise.reject(new ut(2,3,3018));for(i=new Uint8Array([]),t=(e=u(e.Kb())).next();!t.done;t=e.next())if(t=t.value.data)for(n=0;n<t.length;)(r=r_(t,n))?(n+r.R<=t.length&&(i=ci(i,t.subarray(n,n+r.R))),n+=r.R):n++;return Promise.resolve(i)},j("shaka.transmuxer.MpegTsTransmuxer",c_),c_.prototype.transmux=c_.prototype.transmux,c_.prototype.getOriginalMimeType=c_.prototype.getOriginalMimeType,c_.prototype.convertCodecs=c_.prototype.convertCodecs,c_.prototype.isSupported=c_.prototype.isSupported,c_.prototype.destroy=c_.prototype.destroy,Be("video/mp2t",(function(){return new c_("video/mp2t")}),Ge),(r=d_.prototype).destroy=function(){},r.isSupported=function(e,t){var n=e.startsWith("mss/");return!(!this.g||!n)&&(t?Q(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Q(t)||Q(e)))},r.convertCodecs=function(e,t){return t.replace("mss/","")},r.getOriginalMimeType=function(){return this.h},r.transmux=function(e,t,n){if(!n)return Promise.resolve(ae(e));if(!t.mssPrivateData)return Promise.reject(new ut(2,3,3020));try{var r,i=this.g.parseBuffer(e),a=i.fetch("tfhd");a.track_ID=t.id+1;var o=i.fetch("tfdt"),s=i.fetch("traf");null===o&&((o=this.g.createFullBox("tfdt",s,a)).version=1,o.flags=0,o.baseMediaDecodeTime=Math.floor(n.startTime*t.mssPrivateData.timescale));var l=i.fetch("trun"),u=i.fetch("tfxd");u&&u._parent.boxes.splice(u._parent.boxes.indexOf(u),1);var c=i.fetch("tfrf");c&&c._parent.boxes.splice(c._parent.boxes.indexOf(c),1);var d=i.fetch("sepiff");if(null!==d){d.type="senc",d.usertype=void 0;var p=i.fetch("saio");if(null===p){(p=this.g.createFullBox("saio",s)).version=0,p.flags=0,p.entry_count=1,p.offset=[0];var h=this.g.createFullBox("saiz",s);if(h.version=0,h.flags=0,h.sample_count=d.sample_count,h.default_sample_info_size=0,h.sample_info_size=[],2&d.flags)for(r=0;r<d.sample_count;r+=1)h.sample_info_size[r]=10+6*d.entry[r].NumberOfEntries;else h.default_sample_info_size=8}}a.flags&=16777214,a.flags|=131072,l.flags|=1;var f=i.fetch("moof");l.data_offset=f.getLength()+8;var g=i.fetch("saio");null!==g&&(g.offset[0]=p_(f,"traf")+p_(s,"senc")+16);var y=ae(i.write());return Promise.resolve(y)}catch(e){return e instanceof ut?Promise.reject(e):Promise.reject(new ut(2,3,3022))}},j("shaka.transmuxer.MssTransmuxer",d_),d_.prototype.transmux=d_.prototype.transmux,d_.prototype.getOriginalMimeType=d_.prototype.getOriginalMimeType,d_.prototype.convertCodecs=d_.prototype.convertCodecs,d_.prototype.isSupported=d_.prototype.isSupported,d_.prototype.destroy=d_.prototype.destroy;var h_=new Uint8Array([162,57,79,82,90,155,79,20,162,68,108,66,124,100,141,244]);function f_(e){this.j=e,this.g=0,this.h=new Map,this.i=null}Be("mss/audio/mp4",(function(){return new d_("mss/audio/mp4")}),Ve),Be("mss/video/mp4",(function(){return new d_("mss/video/mp4")}),Ve),(r=f_.prototype).destroy=function(){this.h.clear()},r.isSupported=function(e,t){if("video/mp2t"!=e.toLowerCase().split(";")[0])return!1;var n=e;t&&(n=this.convertCodecs(t,e));var r=wt(n).split(",");return n=ft("audio",r),r=ft("video",r),!(n&&(n=kt(n),!v_.includes(n))||r&&(n=kt(r),!m_.includes(n)))&&(t?Q(this.convertCodecs(t,e)):(t=this.convertCodecs("audio",e),e=this.convertCodecs("video",e),Q(t)||Q(e)))},r.convertCodecs=function(e,t){return"video/mp2t"==t.toLowerCase().split(";")[0]?(t=wt(t).replace("mp4a.40.34","mp3").split(",").map(this.Kg).join(","),"audio"==e?'audio/mp4; codecs="'+t+'"':'video/mp4; codecs="'+t+'"'):t},r.Kg=function(e){if(e.includes("avc1")){var t=e.split(".");if(3==t.length)return e=t.shift()+".",(e+=parseInt(t.shift(),10).toString(16))+("000"+parseInt(t.shift(),10).toString(16)).slice(-4)}return e},r.getOriginalMimeType=function(){return this.j},r.transmux=function(e,t,n,r,i){this.i?this.i.clearData():this.i=new Ya,e=ae(e);var a=this.i.parse(e);e=[];var o=a.Lc();try{var s=null;if("video"==i){switch(o.video){case"avc":var l=[],d=null,p=[],h=a.ec();if(!h.length)throw new ut(2,3,3023);for(var f=0;f<h.length;f++){var g=h[f],y=g.zb;p=p.concat(y);var v=e_(y);if(v){null==d&&(d=g.dts);var m=void 0;m=f+1<h.length?(h[f+1].dts||0)-(g.dts||0):1<h.length?(g.dts||0)-(h[f-1].dts||0):9e4*(n.endTime-n.startTime),l.push({data:v.data,size:v.data.byteLength,duration:m,Qa:Math.round((g.pts||0)-(g.dts||0)),flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:v.Uc?2:1,Sa:v.Uc?0:1}})}}var b=function(e){if(!e.length)return null;var t=e.find((function(e){return 7==e.type}));if(e=e.find((function(e){return 8==e.type})),!t||!e)return null;var n=new Ma(t.data),r=Ka(n);if(Ka(n),Ka(n),ja(n),t_.includes(r)&&(3===(r=Ha(n))&&Ua(n,1),ja(n),ja(n),Ua(n,1),Ga(n))){r=3!==r?8:12;for(var i=0;i<r;i++)Ga(n)&&za(n,6>i?16:64)}if(ja(n),0===(r=Ha(n)))Ha(n);else if(1===r)for(Ua(n,1),ja(n),ja(n),r=Ha(n),i=0;i<r;i++)ja(n);ja(n),Ua(n,1),r=Ha(n);var a=Ha(n),o=Fa(n,1);0===o&&Ua(n,1),Ua(n,1);var s=i=0,l=0,u=0;return Ga(n)&&(i=Ha(n),s=Ha(n),l=Ha(n),u=Ha(n)),n=(2-o)*(a+1)*16-2*l-2*u,r=16*(r+1)-2*i-2*s,i=[],t=t.da,i.push(t.byteLength>>>8&255),i.push(255&t.byteLength),i=i.concat.apply(i,c(t)),t=[],e=e.da,t.push(e.byteLength>>>8&255),t.push(255&e.byteLength),t=t.concat.apply(t,c(e)),{height:n,width:r,ma:e=new Uint8Array([1,i[3],i[4],i[5],255,225].concat(i,[1],t))}}(p);if(!b||null==d)throw new ut(2,3,3018);t.height=b.height,t.width=b.width,s={id:t.id,type:"video",codecs:"avc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:r,Oa:[],ca:new Uint8Array([]),ma:b.ma,data:{ab:this.g,baseMediaDecodeTime:d,La:l},stream:t};break;case"hvc":if(h=[],g=null,y=[],!(l=a.ec()).length)throw new ut(2,3,3023);for(v=0;v<l.length;v++){p=(d=l[v]).zb,y=y.concat(p),b=!1;var _=[],E=!1;for(m=(f=u(p)).next();!m.done;m=f.next()){var k=m.value;switch(k.type){case 1:case 0:var T=E=!0;break;case 19:case 20:case 21:b=T=E=!0;break;case 32:case 33:case 34:T=!0;break;case 35:E=T=!0;break;case 39:case 40:T=!0;break;default:T=!1}if(E&&T){var A=k.da.byteLength,w=new Uint8Array(4);w[0]=A>>24&255,w[1]=A>>16&255,w[2]=A>>8&255,w[3]=255&A,_.push(ci(w,k.da))}}var S=_.length?{data:ci.apply(ii,c(_)),Uc:b}:null;S&&(null==g&&null!=d.dts&&(g=d.dts),b=void 0,b=v+1<l.length?(l[v+1].dts||0)-(d.dts||0):1<l.length?(d.dts||0)-(l[v-1].dts||0):9e4*(n.endTime-n.startTime),h.push({data:S.data,size:S.data.byteLength,duration:b,Qa:Math.round((d.pts||0)-(d.dts||0)),flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:S.Uc?2:1,Sa:S.Uc?0:1}}))}var C=n_(y);if(!C||null==g)throw new ut(2,3,3018);t.height=C.height,t.width=C.width,s={id:t.id,type:"video",codecs:"hvc1",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:9e4,duration:r,Oa:[],ca:new Uint8Array([]),ma:C.ma,data:{ab:this.g,baseMediaDecodeTime:g,La:h},stream:t}}s&&(e.push(s),s=null)}if("audio"==i){switch(o.audio){case"aac":for(var x,I=[],P=null,D=u(a.Kb()),R=D.next();!R.done;R=D.next()){var L=R.value,O=L.data;if(O){var M=0;if(!(x=Wb(O,M)))throw new ut(2,3,3018);for(t.audioSamplingRate=x.sampleRate,t.channelsCount=x.channelCount,null==P&&null!==L.pts&&(P=L.pts);M<O.length;){var N=zb(O,M);if(N){var U=N.Fd+N.R;M+U<=O.length&&I.push({data:O.subarray(M+N.Fd,M+U),size:N.R,duration:1024,Qa:0,flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:2,Sa:0}}),M+=U}else M++}}}if(!x||null==P){if(!a.ec().length)throw new ut(2,3,3018);P=9e4*n.startTime;var F=ft("audio",t.codecs.split(","));if(!F||!t.channelsCount||!t.audioSamplingRate)throw new ut(2,3,3018);x={sampleRate:t.audioSamplingRate,channelCount:t.channelsCount,ia:F};var B=function(e,t){switch(e){case"mp4a.40.2":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]);break;default: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||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])}return null}(F,t.channelsCount);if(!B)throw new ut(2,3,3018);var j=P+9e4*(n.endTime-n.startTime);for(a=P;a<j;)I.push({data:B,size:B.byteLength,duration:1024,Qa:0,flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:2,Sa:0}}),a+=1024/x.sampleRate*9e4}var H=x.sampleRate;a=P/9e4*H,s={id:t.id,type:"audio",codecs:x.ia,encrypted:t.encrypted&&0<t.drmInfos.length,timescale:H,duration:r,Oa:[],ca:new Uint8Array([]),ma:new Uint8Array([]),data:{ab:this.g,baseMediaDecodeTime:a,La:I},stream:t};break;case"ac3":x=[],H=0,I=new Uint8Array([]),P=null;for(var V=(M=u(a.Kb())).next();!V.done;V=M.next()){var G=V.value,K=G.data;for(null==P&&null!==G.pts&&(P=G.pts),a=0;a<K.length;){var z=Xb(K,a);z?(t.audioSamplingRate=z.sampleRate,t.channelsCount=z.channelCount,H=z.sampleRate,I=z.ca,x.push({data:K.subarray(a,a+z.R),size:z.R,duration:1536,Qa:0,flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:2,Sa:0}}),a+=z.R):a++}}if(0==H||0==I.byteLength||null==P)throw new ut(2,3,3018);a=P/9e4*H,s={id:t.id,type:"audio",codecs:"ac-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:H,duration:r,Oa:[],ca:I,ma:new Uint8Array([]),data:{ab:this.g,baseMediaDecodeTime:a,La:x},stream:t};break;case"ec3":x=[],H=0,P=new Uint8Array([]),I=null;for(var W=u(a.Kb()),Y=W.next();!Y.done;Y=W.next()){var q=Y.value,X=q.data;for(null==I&&null!==q.pts&&(I=q.pts),a=0;a<X.length;){var Q=Jb(X,a);Q?(t.audioSamplingRate=Q.sampleRate,t.channelsCount=Q.channelCount,H=Q.sampleRate,P=Q.ca,x.push({data:X.subarray(a,a+Q.R),size:Q.R,duration:1536,Qa:0,flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:2,Sa:0}}),a+=Q.R):a++}}if(0==H||0==P.byteLength||null==I)throw new ut(2,3,3018);a=I/9e4*H,s={id:t.id,type:"audio",codecs:"ec-3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:H,duration:r,Oa:[],ca:P,ma:new Uint8Array([]),data:{ab:this.g,baseMediaDecodeTime:a,La:x},stream:t};break;case"mp3":var $;x=[],H=null;for(var J=u(a.Kb()),Z=J.next();!Z.done;Z=J.next()){var ee=Z.value,te=ee.data;if(te)for(null==H&&null!==ee.pts&&(H=ee.pts),a=0;a<te.length;){var ne=r_(te,a);ne?($||($=ne),a+ne.R<=te.length&&x.push({data:te.subarray(a,a+ne.R),size:ne.R,duration:1152,Qa:0,flags:{Ra:0,Ja:0,Ha:0,Fa:0,Ga:2,Sa:0}}),a+=ne.R):a++}}if(!$||null==H)throw new ut(2,3,3018);var re=$.sampleRate;a=H/9e4*re,s={id:t.id,type:"audio",codecs:"mp3",encrypted:t.encrypted&&0<t.drmInfos.length,timescale:re,duration:r,Oa:[],ca:new Uint8Array([]),ma:new Uint8Array([]),data:{ab:this.g,baseMediaDecodeTime:a,La:x},stream:t}}s&&e.push(s)}}catch(e){return e&&3023==e.code?Promise.resolve(new Uint8Array([])):Promise.reject(e)}return e.length?(e=new vg(e),this.h.has(t.id)?r=this.h.get(t.id):(r=mg(e),this.h.set(t.id,r)),t=kg(e),this.g++,t=ci(r,t),Promise.resolve(t)):Promise.reject(new ut(2,3,3018))},j("shaka.transmuxer.TsTransmuxer",f_),f_.prototype.transmux=f_.prototype.transmux,f_.prototype.getOriginalMimeType=f_.prototype.getOriginalMimeType,f_.prototype.convertCodecs=f_.prototype.convertCodecs,f_.prototype.isSupported=f_.prototype.isSupported,f_.prototype.destroy=f_.prototype.destroy;var g_,y_,v_=["aac","ac-3","ec-3","mp3"],m_=["avc","hevc"];
/*
 @license
 EME Encryption Scheme Polyfill
 Copyright 2019 Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
function b_(){}function __(){g_?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(g_=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=E_):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function E_(e,t){var n,r=this;return R((function(i){return 1==i.g?(console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),_(i,g_.call(r,e,t),2)):D_(n=i.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=g_,i.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=k_,i.return(k_.call(r,e,t)))}))}function k_(e,t){var n,r,i,a,o,s,l,c,d,p,h=this;return R((function(f){if(1==f.g){for(console.assert(h==navigator,'bad "this" for requestMediaKeySystemAccess'),n=P_(e),r=[],i=u(t),a=i.next();!a.done;a=i.next())o=a.value,s=T_(o.videoCapabilities,n),l=T_(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(d=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",d.code=DOMException.NOT_SUPPORTED_ERR,d;return _(f,g_.call(h,e,r),2)}return p=f.h,f.return(new I_(p,n))}))}function T_(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function A_(){}function w_(){y_?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(y_=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=S_):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function S_(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,y_.call(i,e),2);case 2:if(t=a.h,!e.keySystemConfiguration)return a.return(t);if((n=t.keySystemAccess)&&D_(n))return console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=y_,a.return(t);if(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=C_,n){a.B(3);break}return r=t,_(a,x_(e),4);case 4:return r.keySystemAccess=a.h,a.return(t);case 3:return a.return(C_.call(i,e))}}))}function C_(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=P_(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},i&&i!=t||a&&a!=t)?c.return(o):_(c,y_.call(u,e),2);case 2:if((s=c.h).keySystemAccess){s.keySystemAccess=new I_(s.keySystemAccess,t),c.B(3);break}if(!e.keySystemConfiguration){c.B(3);break}return l=s,_(c,x_(e),5);case 5:l.keySystemAccess=c.h;case 3:return c.return(s)}}))}function x_(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 I_(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function P_(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 D_(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function R_(){}function L_(){__(),w_()}Be("video/mp2t",(function(){return new f_("video/mp2t")}),Ke),j("EmeEncryptionSchemePolyfill",b_),b_.install=__,j("McEncryptionSchemePolyfill",A_),A_.install=w_,I_.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},I_.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},j("EncryptionSchemePolyfills",R_),R_.install=L_,void 0!==n&&n.exports&&(n.exports=R_)}.call(r,n,n,void 0),r.shaka)t[i]=r.shaka[i]}()}).call(this,n(8))},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){!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?d(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),d=null;this._rootContainsTarget(i)?n&&!this.root||(d=t):d={top:0,bottom:0,left:0,right:0,width:0,height:0};var p=r.entry=new a({time:window.performance&&performance.now&&performance.now(),target:i,boundingClientRect:o,rootBounds:d,intersectionRect:c});l?e&&s?this._hasCrossedThreshold(l,p)&&this._queuedEntries.push(p):l&&l.isIntersecting&&this._queuedEntries.push(p):this._queuedEntries.push(p)}),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,p,f,g,y,v=i,m=h(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=h(m),T=k&&u(k),A=k&&this._computeTargetAndRootIntersection(k,T,a);T&&A?(m=k,_=d(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,p=void 0,f=void 0,g=void 0,y=void 0,l=Math.max(o.top,s.top),c=Math.min(o.bottom,s.bottom),p=Math.max(o.left,s.left),f=Math.min(o.right,s.right),y=c-l,v=(g=f-p)>=0&&y>=0&&{top:l,bottom:c,left:p,right:f,width:g,height:y}||null),!v)break;m=m&&h(m)}return v}},o.prototype._getRootRect=function(){var t;if(this.root&&!f(this.root))t=u(this.root);else{var n=f(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||p(e,this.root)},o.prototype._rootContainsTarget=function(t){var n=this.root&&(this.root.ownerDocument||this.root)||e;return p(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 d(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 p(e,t){for(var n=t;n;){if(n==e)return!0;n=h(n)}return!1}function h(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 f(e){return e&&9===e.nodeType}}()},function(e,t,n){var r=n(11),i=n(12);"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 d=s(c),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==d?(o[d].references++,o[d].updater(p)):o.push({identifier:c,updater:y(p,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,d=(c=[],function(e,t){return c[e]=t,c.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=d(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 h(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,g=0;function y(e,t){var n,r,i;if(t.singleton){var a=g++;n=f||(f=u(t)),r=p.bind(null,n,a,!1),i=p.bind(null,n,a,!0)}else n=u(t),r=h.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(13)(!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 vn})),n.d(t,"getPlayer",(function(){return mn})),n.d(t,"core",(function(){return r})),n.d(t,"ui",(function(){return i})),n.d(t,"providers",(function(){return a})),n.d(t,"setup",(function(){return En})),n.d(t,"cast",(function(){return In})),n.d(t,"playlist",(function(){return Pn})),n.d(t,"Ad",(function(){return wt})),n.d(t,"AdBreak",(function(){return kt})),n.d(t,"BasePlugin",(function(){return Z})),n.d(t,"registerPlugin",(function(){return ne})),n.d(t,"PLAYER_TYPE",(function(){return Rn})),n.d(t,"VERSION",(function(){return Ln})),n.d(t,"PLAYER_NAME",(function(){return Dn})),n.d(t,"KALTURA_PLAYER_START_TIME_QS",(function(){return j}));n(3);var r=n(0),i=n(1),a=n(2);n(4),n(6);function o(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 s(e,t){void 0===t&&(t={});var n={};if(t.sources&&t.sources.type===r.MediaType.LIVE&&("IE"===r.Env.browser.name||"Chromecast"===r.Env.device.model)){var i=r.Utils.Object.getPropertyPath(e,"sources.options.forceRedirectExternalStreams"),a=r.Utils.Object.getPropertyPath(t,"sources.options.forceRedirectExternalStreams");"boolean"!=typeof i&&"boolean"!=typeof a&&r.Utils.Object.mergeDeep(n,{sources:{options:{forceRedirectExternalStreams:!0}}})}return r.Utils.Object.mergeDeep(n,function(e,t){void 0===t&&(t={});var n={},i=r.Utils.Object.getPropertyPath(e,"sources.options.redirectExternalStreamsHandler"),a=r.Utils.Object.getPropertyPath(t,"sources.options.redirectExternalStreamsHandler");return"function"!=typeof i&&"function"!=typeof a&&r.Utils.Object.mergeDeep(n,{sources:{options:{redirectExternalStreamsHandler:o}}}),n}(e,t))}var l="Must provide initial providers config",u="Must provide target id",c="Must provide DOM element with id of: ",d="The target id provided is already in use. Id: ";var p,h,f,g="@playkit-js/kaltura-player-js_",y=function(){function e(){}return e.isStorageAvailable=function(e){if("undefined"==typeof Storage)return!1;try{return e.setItem("test","test"),e.removeItem("test"),!0}catch(e){return!1}},e.getStorageSize=function(e){return Object.keys(e).filter((function(e){return e.startsWith(g)})).length},e.setItem=function(t,n,r){e._validateKey(t);try{e._logger.debug("Sets item for key: "+t,n),r.setItem(g+t,n)}catch(t){e._isQuotaExceeded(t)?e._logger.error("Quota exceeded: "+t.message):e._logger.error(t.message)}},e.getItem=function(t,n){e._validateKey(t);var r=null;try{return"string"==typeof(r=n.getItem(g+t))?JSON.parse(r):null}catch(e){return r}},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")},e}();p=y,h="_logger",f=Object(r.getLogger)("StorageWrapper"),(h=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)}(h))in p?Object.defineProperty(p,h,{value:f,enumerable:!0,configurable:!0,writable:!0}):p[h]=f;var v=function(){function e(){this.storageManagers=[]}return e.prototype.addManager=function(e){this.storageManagers.push(e)},e.getInstance=function(){return null===this.instance&&(this.instance=new e),this.instance},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}(v,"instance",null);var m=function(){function e(){}return e.init=function(e){this._logger=Object(r.getLogger)(e),v.getInstance().addManager(this)},e.attachAll=function(e){v.getInstance().storageManagers.forEach((function(t){t.isStorageAvailable()&&t.attach(e)}))},e.setStorageConfig=function(e){v.getInstance().storageManagers.forEach((function(t){t.isStorageAvailable()&&t.hasStorage()&&r.Utils.Object.mergeDeep(e,t.getStorageConfig())}))},e.isStorageAvailable=function(){return y.isStorageAvailable(this.getStorageObject())},e.hasStorage=function(){var e=this.getStorageSize(),t=0!==e;return t?this._logger.debug("Storage found with size of ",e):this._logger.debug("No storage found"),t},e.setItem=function(e,t){y.setItem(e,t,this.getStorageObject())},e.getItem=function(e){y.getItem(e,this.getStorageObject())},e.getStorageSize=function(){return y.getStorageSize(this.getStorageObject())},e.getStorageConfig=function(){var e=this._getExistingValues(),t=this._buildStorageConfig(e);return this._logger.debug("Gets storage config",t),t},e._getExistingValues=function(){var e=this,t={};return Object.keys(this.StorageKeys).forEach((function(n){var r=e.StorageKeys[n],i=y.getItem(r,e.getStorageObject());null!=i&&(t[r]=i)})),t},e._buildStorageConfig=function(e){var t=r.Utils.Object.mergeDeep({},e);return delete t.textStyle,{playback:t}},e.getStorageObject=function(){throw new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"getStorageObject()")},e.attach=function(){throw new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"attach()")},e.initialize=function(){throw new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"initialize()")},e}();function b(e,t){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var _=function(e){var t,n;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,b(t,n),i.initialize=function(){this.init(this.name)},i.getStorageObject=function(){return localStorage},i.attach=function(e){var t=this;this._logger.debug("Attach local storage");var n=new r.EventManager;n.listen(e,e.Event.UI.USER_CLICKED_MUTE,(function(){e.isCasting()||t.setItem(t.StorageKeys.MUTED,e.muted)})),n.listen(e,e.Event.UI.USER_CLICKED_UNMUTE,(function(){e.isCasting()||t.setItem(t.StorageKeys.MUTED,e.muted)})),n.listen(e,e.Event.UI.USER_CHANGED_VOLUME,(function(){e.isCasting()||(t.setItem(t.StorageKeys.MUTED,!e.volume),t.setItem(t.StorageKeys.VOLUME,e.volume))})),n.listen(e,e.Event.UI.USER_SELECTED_AUDIO_TRACK,(function(e){var n=e.payload.audioTrack;t.setItem(t.StorageKeys.AUDIO_LANG,n.language)})),n.listen(e,e.Event.UI.USER_SELECTED_CAPTION_TRACK,(function(e){var n=e.payload.captionTrack;"off"!==n.language?(t.setItem(t.StorageKeys.TEXT_LANG,n.language),t.setItem(t.StorageKeys.CAPTIONS_DISPLAY,!0)):t.setItem(t.StorageKeys.CAPTIONS_DISPLAY,!1)}));var i=function(){n.listenOnce(e,e.Event.TEXT_TRACK_CHANGED,(function(e){var n=e.payload.selectedTextTrack;"off"!==n.language?(t.setItem(t.StorageKeys.TEXT_LANG,n.language),t.setItem(t.StorageKeys.CAPTIONS_DISPLAY,!0)):t.setItem(t.StorageKeys.CAPTIONS_DISPLAY,!1)}))};n.listen(e,e.Event.UI.USER_SHOWED_CAPTIONS,i),n.listen(e,e.Event.UI.USER_HID_CAPTIONS,i),n.listen(e,e.Event.UI.USER_SELECTED_CAPTIONS_STYLE,(function(e){try{var n=JSON.stringify(e.payload.captionsStyle);t.setItem(t.StorageKeys.TEXT_STYLE,n)}catch(e){t._logger.error(e.message)}})),n.listen(e,e.Event.PLAYER_DESTROY,(function(){return n.destroy()}))},i.getPlayerTextStyle=function(){return this.getItem(this.StorageKeys.TEXT_STYLE)},i}(m);!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}(_,"StorageKeys",{MUTED:"muted",VOLUME:"volume",AUDIO_LANG:"audioLanguage",TEXT_LANG:"textLanguage",CAPTIONS_DISPLAY:"captionsDisplay",TEXT_STYLE:"textStyle"});var E="kaltura.com",k="custom_data=",T="signature=";function A(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]&&w(t,e.config.session.id.replace(n[1],r.Utils.Generator.guid()))}(e,t):function(e){var t=r.Utils.Generator.guid(),n=r.Utils.Generator.guid();w(e,t+":"+n)}(t)}function w(e,t){e.session=e.session||{},e.session.id=t}function S(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+=I(e)+n+t}return e}function C(){var e;try{e=window.parent.document.URL}catch(t){e=document.referrer}return e}function x(e){if(-1===e.indexOf("referrer=")){var t=btoa(C().substr(0,1e3));e+=I(e)+"referrer="+t}return e}function I(e){return-1===e.indexOf("?")?"?":"&"}function P(e,t){return-1===e.indexOf("clientTag=html5:v")&&(e+=I(e)+"clientTag=html5:v"+(t||"3.17.4")),e}function D(e,t){var n;A(e,t);var i=t.sources,a=t.session&&t.session.id,o=null==(n=K())?void 0:n.productVersion;Object.values(r.StreamType).forEach((function(e){i[e]&&i[e].forEach((function(e){"string"==typeof e.url&&e.url.toLowerCase().indexOf("playmanifest/")>-1&&!e.localSource&&(e.url=S(e.url,a),e.url=x(e.url),e.url=P(e.url,o),e.url=function(e,t){var n=r.Utils.Object.getPropertyPath(t,"seekFrom"),i=r.Utils.Object.getPropertyPath(t,"clipTo");return n&&"number"==typeof n&&-1===e.indexOf("seekFrom=")&&(e+=I(e)+"seekFrom="+1e3*n),i&&"number"==typeof i&&-1===e.indexOf("clipTo=")&&(e+=I(e)+"clipTo="+1e3*i),e}(e.url,i)),e.drmData&&e.drmData.length&&e.drmData.forEach((function(e){"string"==typeof e.licenseUrl&&[E,k,T].every((function(t){return e.licenseUrl.includes(t)}))&&(e.licenseUrl=S(e.licenseUrl,a,"sessionId="),e.licenseUrl=P(e.licenseUrl,o),e.licenseUrl=x(e.licenseUrl),e.licenseUrl=function(e,t){var n=r.Utils.Object.getPropertyPath(t,"provider.uiConfId");return-1===e.indexOf("uiConfId=")&&"number"==typeof n&&(e+=I(e)+"uiConfId="+n),e}(e.licenseUrl,t))}))}))}))}n(9);var R=function(){function e(e){void 0===e&&(e={}),e.observedThresholds=e.observedThresholds||M,e.playerThreshold="number"==typeof e.playerThreshold?e.playerThreshold:N,this._config=e,this._eventManager=new r.EventManager,this._targetsObserved=new r.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,L.VIEWPORT))}))}))},t._handleTabVisibilityChange=function(){var e=this;this._isTabVisible=!document[this._visibilityTabHiddenAttr],this._targetsObserved.getAll().forEach((function(t){t.lastVisible&&t.listener(e._isTabVisible,L.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 O(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,L.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}(),L={VIEWPORT:"viewport",TAB:"tab"},O=function(e,t){this.threshold=e,this.listener=t},M=[0,10,20,30,40,50,60,70,80,90,100],N=50;function U(e,t){return(U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var F=function(e){var t,n;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,U(t,n),i.initialize=function(){this.init(this.name)},i.getStorageObject=function(){return sessionStorage},i.attach=function(e){var t=this;this._logger.debug("Attach session storage"),(new r.EventManager).listen(e,e.Event.UI.USER_SELECTED_SPEED,(function(){e.isCasting()||t.setItem(t.StorageKeys.PLAYBACK_RATE,e.playbackRate)}))},i}(m);!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}(F,"StorageKeys",{PLAYBACK_RATE:"playbackRate"});var B=[],j="kalturaStartTime";function H(e){if(!e)throw new Error(l);!function(e){if(!e)throw new Error(u);var t=document.getElementById(e);if(!t)throw new Error(c+e);if(t.getElementsByClassName("kaltura-player-container").length>0)throw new Error(d+e)}(e.targetId)}function V(e){r.Utils.Object.getPropertyPath(e,"ui.log")||r.Utils.Object.createPropertyPath(e,"ui.log",{}),r.Utils.Object.getPropertyPath(e,"provider.log")||r.Utils.Object.createPropertyPath(e,"provider.log",{}),r.Utils.Object.getPropertyPath(e,"log")||r.Utils.Object.createPropertyPath(e,"log",{}),e.log&&"function"==typeof e.log.handler&&(Object(r.setLogHandler)(e.log.handler),e.ui.log.handler=e.provider.log.handler=e.log.handler);var t=r.LogLevel.ERROR;!e.log||!0!==window.DEBUG_KALTURA_PLAYER&&""!==G("debugKalturaPlayer")?e.log&&e.log.level&&r.LogLevel[e.log.level]&&(t=r.LogLevel[e.log.level]):(t=r.LogLevel.DEBUG,e.log.level=r.LogLevel.DEBUG.name),e.ui.log.level=e.provider.log.level=t.name,Object(r.setLogLevel)(t)}function G(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 z(e){var t=function(e){var t=document.createElement("div");t.id=r.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:M,playerThreshold:N}};if(r.Utils.Object.mergeDeep(n,e),!e.provider.ignoreServerConfig){var i=r.Utils.Object.copyDeep(K());delete i.productVersion,n=r.Utils.Object.mergeDeep({},W(i),n)}return function(e){if(r.Env.isMacOS&&r.Env.isSafari||r.Env.isIOS){"boolean"!=typeof r.Utils.Object.getPropertyPath(e,"playback.preferNative.hls")&&r.Utils.Object.mergeDeep(e,{playback:{preferNative:{hls:!0}}})}}(n),function(e){if(r.Env.isMacOS&&r.Env.isSafari||r.Env.isIOS){"boolean"!=typeof r.Utils.Object.getPropertyPath(e,"text.useNativeTextTrack")&&r.Utils.Object.mergeDeep(e,{text:{useNativeTextTrack:!0}})}}(n),function(e){var t=r.Utils.Object.getPropertyPath(e,"plugins.kava");t||(t=r.Utils.Object.mergeDeep(e,{plugins:{kava:{}}}))}(n),function(e){if(r.Env.isSmartTV){if(Object(r.setCapabilities)(r.EngineType.HTML5,{autoplay:!0}),function(e){"boolean"!=typeof r.Utils.Object.getPropertyPath(e,"playback.playAdsWithMSE")&&(e=r.Utils.Object.createPropertyPath(e,"playback.playAdsWithMSE",!0));var t=r.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload"),n=r.Utils.Object.getPropertyPath(e,"plugins.bumper.disableMediaPreload");e.plugins&&e.plugins.ima&&"boolean"!=typeof t&&(e=r.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0));e.plugins&&e.plugins.bumper&&"boolean"!=typeof n&&(e=r.Utils.Object.createPropertyPath(e,"plugins.bumper.disableMediaPreload",!0))}(e),function(e){"boolean"!=typeof r.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount")&&r.Env.isSafari&&(e=r.Utils.Object.createPropertyPath(e,"playback.options.html5.hls.liveSyncDurationCount",2))}(e),e.plugins&&e.plugins.ima){var t=r.Utils.Object.getPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds"),n=r.Utils.Object.getPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected");"boolean"!=typeof t&&(e=r.Utils.Object.createPropertyPath(e,"plugins.ima.forceReloadMediaAfterAds",!0)),"boolean"!=typeof n&&(e=r.Utils.Object.createPropertyPath(e,"plugins.ima.delayInitUntilSourceSelected",!0))}if(e.plugins&&e.plugins.youbora)"number"!=typeof r.Utils.Object.getPropertyPath(e,"plugins.youbora.playheadMonitorInterval")&&(e=r.Utils.Object.createPropertyPath(e,"plugins.youbora.playheadMonitorInterval",2e3));"boolean"!=typeof r.Utils.Object.getPropertyPath(e,"streaming.lowLatencyMode")&&(e=r.Utils.Object.createPropertyPath(e,"streaming.lowLatencyMode",!1))}}(n),function(e){if("Edge"===r.Env.browser.name){r.Utils.Object.getPropertyPath(e,"drm.keySystem")||(e="Windows"===r.Env.os.name?r.Utils.Object.createPropertyPath(e,"drm.keySystem",r.DrmScheme.PLAYREADY):r.Utils.Object.createPropertyPath(e,"drm.keySystem",r.DrmScheme.WIDEVINE))}}(n),function(e){if(r.Env.isIOS&&e.plugins&&e.plugins.ima&&!e.plugins.ima.disable){var t=r.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=r.Utils.Object.getPropertyPath(e,"plugins.ima.disableMediaPreload");!1===t&&"boolean"!=typeof n&&r.Utils.Object.createPropertyPath(e,"plugins.ima.disableMediaPreload",!0)}}(n),function(e){if(e.plugins&&e.plugins.imadai&&!e.plugins.imadai.disable){"boolean"!=typeof r.Utils.Object.getPropertyPath(e,"playback.options.html5.hls.autoStartLoad")&&r.Utils.Object.mergeDeep(e,{playback:{options:{html5:{hls:{autoStartLoad:!1}}}}})}}(n),function(e){var t=r.Utils.Object.getPropertyPath(e,"plugins.bumper"),n=r.Utils.Object.getPropertyPath(e,"plugins.imadai");if(t){var i={};"boolean"!=typeof t.playOnMainVideoTag&&(r.Env.isSmartTV||r.Env.isIOS&&e.playback&&!1===e.playback.playsinline)&&(i.playOnMainVideoTag=!0),n&&!n.disable&&(Array.isArray(t.position)||(i.position=[0]),"boolean"!=typeof t.disableMediaPreload&&(i.disableMediaPreload=!0)),r.Utils.Object.mergeDeep(e,{plugins:{bumper:i}})}}(n),function(e){var t=r.Utils.Object.getPropertyPath(e,"plugins.vr");if(t&&!t.disable){"boolean"!=typeof r.Utils.Object.getPropertyPath(e,"playback.inBrowserFullscreen")&&r.Utils.Object.mergeDeep(e,{playback:{inBrowserFullscreen:!0}})}}(n),function(e){if(r.Env.isIOS){var t=r.Utils.Object.getPropertyPath(e,"playback.playsinline"),n=r.Utils.Object.hasPropertyPath(e,"plugins.airplay"),i=!1!==t;n?Object(r.setCapabilities)(r.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:i}):"iPhone"!==r.Env.device.model||i||Object(r.setCapabilities)(r.EngineType.HTML5,{autoplay:!1,mutedAutoPlay:!1})}}(n),n}function W(e){return function(){if(e.player){B.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=r.Utils.Object.copyDeep(e.player);delete e.player,r.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(r.Utils.Object.hasPropertyPath(e,t))if(B.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"}),r.Utils.Object.hasPropertyPath(e,n))r.Utils.Object.deletePropertyPath(e,t);else{var i=r.Utils.Object.getPropertyPath(e,t),a=r.Utils.Object.createPropertyPath({},n,i);r.Utils.Object.mergeDeep(e,a),r.Utils.Object.deletePropertyPath(e,t)}}(t[0],t[1])})),e}function Y(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 q(e){var t=e&&e.progressive;return!(!t||!t[0]||"video/youtube"!==t[0].mimetype)}function X(e){var t=e&&e.image;return!(!t||!t[0])}function Q(e,t){var n={},i={};return r.Utils.Object.isObject(e)&&Object.entries(e).forEach((function(e){var a=e[0],o=e[1];n[a]={},i[a]={},Object.entries(o).forEach((function(e){var o=e[0],s=e[1],l=r.Utils.Object.getPropertyPath(t[a],o);n[a][o]=l||s,i[a][o]=l}))})),[n,i]}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,J(r.key),r)}}function J(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 r.EventManager,this.logger=Object(r.getLogger)(r.Utils.String.capitlize(this.name)),this.config={},r.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 r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,"isValid()")};var t,n,i,a=e.prototype;return a.getConfig=function(e){return e?r.Utils.Object.copyDeep(this.config[e]):r.Utils.Object.copyDeep(this.config)},a.updateConfig=function(e){r.Utils.Object.mergeDeep(this.config,e)},a.loadMedia=function(){},a.destroy=function(){this.eventManager.destroy()},a.reset=function(){},a.getName=function(){return this.name},a.dispatchEvent=function(e,t){this.logger.debug("Fire event: "+e,t),this.player.dispatchEvent(new r.FakeEvent(e,t))},t=e,(n=[{key:"ready",get:function(){return Promise.resolve()}}])&&$(t.prototype,n),i&&$(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ee(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=J(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Z,"defaultConfig",{});var te=function(){function e(){ee(this,"_plugins",{}),ee(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,i){if(void 0===i&&(i={}),!e._registry.has(t))throw e._logger.warn("Plugin <"+t+"> loading failed, plugin is not registered"),new r.Error(r.Error.Severity.RECOVERABLE,r.Error.Category.PLAYER,r.Error.Code.RUNTIME_ERROR_NOT_REGISTERED_PLUGIN,t);var a=e._registry.get(t);"boolean"==typeof i.disable&&this._isDisabledPluginMap.set(t,i.disable);var o=!!this._isDisabledPluginMap.get(t),s=!!a&&a.isValid();if(a&&s&&!o){try{this._plugins[t]=a.createPlugin(t,n,i)}catch(e){throw new r.Error(r.Error.Severity.RECOVERABLE,r.Error.Category.PLAYER,r.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()="+s.toString()+", disabled="+o.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}();ee(te,"_logger",Object(r.getLogger)("PluginManager")),ee(te,"_registry",new Map);var ne=te.register,re={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}}"}},ie=new RegExp("{{.*}}");function ae(e,t){return(ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(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 se=function(e){var t,n;function i(){var t;return oe(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=r.Utils.Object.mergeDeep({},t._basePluginsConfig,t._ovpPluginsConfig),t}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,ae(t,n),i}(function(){function e(){this._basePluginsConfig=r.Utils.Object.copyDeep(re)}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 i=n[0],a=n[1];return r.Utils.Object.isObject(a)?t[i]=e(a):"string"==typeof a&&ie.test(a)?t[i]=a:t[i]=void 0,t}),{})}(e);this._config=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var i=n[0],a=n[1];return r.Utils.Object.isObject(a)?t[i]=e(a):a&&(t[i]=a),t}),{})}(r.Utils.Object.mergeDeep(this._config,t))}},t.reset=function(){this._config=r.Utils.Object.copyDeep(re)},e}());var le=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""}},ue=Object(r.getLogger)("PluginsConfig"),ce=function(e){return("number"==typeof e||"function"==typeof e||"string"==typeof e||"boolean"==typeof e||r.Utils.Object.isClassInstance(e))&&!ie.test(e.toString())},de=function(e){return r.Utils.Object.isObject(e)&&"function"!=typeof e&&!r.Utils.Object.isClassInstance(e)},pe=function(e){return e.map((function(e){if(de(e)){var t=he(e);return r.Utils.Object.isEmptyObject(t)?null:t}return ce(e)?e:null})).filter((function(e){return null!==e}))},he=function e(t){return void 0===t&&(t={}),Object.entries(t).reduce((function(t,n){var r=n[0],i=n[1];return de(i)?t[r]=e(i):Array.isArray(i)?t[r]=pe(i):ce(i)&&(t[r]=i),t}),{})};var fe=function(){function e(){this._pluginConfigStore=new se}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.17.4",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 i=r.Utils.Object.getPropertyPath(e,"provider.env.analyticsServiceUrl");i&&(n.analyticsServiceUrl=i+"/api_v3/index.php"),n.serviceUrl&&(n.embedBaseUrl=n.serviceUrl.replace("api_v3",""))}var a,o={referrer:C(),encodedReferrer:(a=C(),encodeURIComponent(a))};return e.provider&&r.Utils.Object.mergeDeep(o,{ks:e.provider.ks,uiConfId:e.provider.uiConfId,partnerId:e.provider.partnerId}),e.session&&r.Utils.Object.mergeDeep(o,{sessionId:e.session.id,ks:e.session.ks,isAnonymous:e.session.isAnonymous,uiConfId:e.session.uiConfId,partnerId:e.session.partnerId}),e.sources&&r.Utils.Object.mergeDeep(o,{entryId:e.sources.id,entryName:e.sources.metadata&&e.sources.metadata.name,entryType:e.sources.type}),e.playlist&&r.Utils.Object.mergeDeep(o,{playlistId:e.playlist.id}),Object.keys(o).forEach((function(e){void 0===o[e]&&delete o[e]})),r.Utils.Object.mergeDeep(n,o),n}(t),i=r.Utils.Object.mergeDeep({},this._pluginConfigStore.get(),e);!function(e,t){var n=he(t),i=he(e);i&&n&&Object.keys(e).forEach((function(t){e&&e[t]&&(e[t]=r.Utils.Object.mergeDeep({},n[t],i[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){ue.error("An error occurred while formatting config string.",e),t={}}return t}(le(JSON.stringify(i),n)))}},e}();function ge(){return(ge=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 ye(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 ve={thumbsWidth:164,thumbsHeight:92,thumbsSlices:100},me=/.*\/p\/\d+\/(?:[a-zA-Z]+\/\d+\/)*thumbnail\/entry_id\/\w+\/.*\d+/,be=function(){function e(e,t,n){var i=this;if(ye(this,"_isUsingKalturaThumbnail",(function(){return!(!i._thumbnailConfig||!i._thumbnailConfig.thumbsSprite)})),ye(this,"_convertKalturaThumbnailToThumbnailInfo",(function(e){if(i._thumbnailConfig){var t=i._thumbnailConfig,n=t.thumbsSprite,a=t.thumbsWidth,o=t.thumbsSlices,s=i._player.duration/o,l={x:Math.floor(e/s)*a,y:0,url:n,height:i._thumbsHeight,width:a};return new r.ThumbnailInfo(l)}})),ye(this,"_buildKalturaThumbnailConfig",(function(e,t){var n,a=r.Utils.Object.getPropertyPath(e,"components.seekbar"),o=t.sources&&t.sources.poster,s=t.sources&&t.sources.type===r.MediaType.VOD,l=i._player.shouldAddKs(t)?null==(n=t.session)?void 0:n.ks:"",u=r.Utils.Object.mergeDeep(ve,a);return ge({thumbsSprite:s?i._getThumbSlicesUrl(o,l,u):""},u)})),ye(this,"_maybeCutThumbnail",(function(e){var t=r.Utils.Object.getPropertyPath(i._player.config.sources,"seekFrom"),n=r.Utils.Object.getPropertyPath(i._player.config.sources,"clipTo"),a=e;return t&&"number"==typeof t&&(a+="/start_sec/"+t),n&&"number"==typeof n&&(a+="/end_sec/"+n),a})),ye(this,"_getThumbSlicesUrl",(function(e,t,n){if("string"==typeof e&&me.test(e))try{var r=ge({thumbnailUrl:e},n),a=le("{{thumbnailUrl}}/width/{{thumbsWidth}}/vid_slices/{{thumbsSlices}}",r),o=i._maybeCutThumbnail(a);return t?o+"/ks/"+t:o}catch(e){return""}return""})),this._player=e,this._thumbnailConfig=this._buildKalturaThumbnailConfig(t,n),this._eventManager=new r.EventManager,this._isUsingKalturaThumbnail()){var a,o=new Image;this._eventManager.listenOnce(o,"load",(function(){i._thumbsHeight=o.naturalHeight})),o.src=(null==(a=this._thumbnailConfig)?void 0:a.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(10);function _e(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,ke(r.key),r)}}function Ee(e,t,n){return(t=ke(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ke(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 Te=function(){function e(e,t){var n=this;Ee(this,"_disabled",!1),this._player=e;var r=t.ui;if(r.disable){this._disabled=!0;var a=document.getElementById(r.targetId);a&&a.appendChild(e.getView())}else this._uiManager=new i.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,a,o=e.prototype;return o.destroy=function(){this._uiManager.destroy()},o.reset=function(){this._resetErrorState()},o.setConfig=function(e,t){this._uiManager.setConfig(e,t)},o.addComponent=function(e){return this._uiManager.addComponent(e)},o.removeComponent=function(e){var t={label:"Remove_"+e.removeComponent,get:i.Components.Remove,presets:e.presets,area:e.area||e.container,replaceComponent:e.removeComponent};return this._uiManager.addComponent(t)},o.registerManager=function(e,t){this._player.registerService(e,t)},o.getManager=function(e){return this._player.getService(e)},o.hasManager=function(e){return this._player.hasService(e)},o.setLoadingSpinnerState=function(e){this.setConfig({show:e},"loading")},o._resetErrorState=function(){this.setConfig({hasError:!1},"engine")},o._handleExternalCSS=function(t){t.css&&r.Utils.Dom.loadStyleSheetAsync(t.css).then((function(){e._logger.debug("external css was loaded successfully")}),(function(){e._logger.error("external css failed to load")}))},o._handleVr=function(e){void 0===e&&(e={}),e.vr&&!e.vr.disable&&this._setStereoConfig(e.vr)},o._setStereoConfig=function(e){(e.toggleStereo||(r.Env.isMobile||r.Env.isTablet)&&!1!==e.toggleStereo)&&this.setConfig(r.Utils.Object.mergeDeep({},{vrStereoMode:!!e.startInStereo}),"vrStereo")},t=e,(n=[{key:"store",get:function(){return this._uiManager.store}}])&&_e(t.prototype,n),a&&_e(t,a),Object.defineProperty(t,"prototype",{writable:!1}),e}();Ee(Te,"_logger",Object(r.getLogger)("UIWrapper"));var Ae={PLAYLIST_LOADED:"kaltura-player-playlistloaded",PLAYLIST_ITEM_CHANGED:"kaltura-player-playlistitemchanged",PLAYLIST_ENDED:"kaltura-player-playlistended"};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,Se(r.key),r)}}function Se(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 Ce=["hls","dash","progressive","image"],xe=function(){function e(e,t,n){this._sources=e,this._config=t,this._index=n}var t,n,i,a=e.prototype;return a.updateSources=function(e){this._sources=r.Utils.Object.mergeDeep({},e)},a.updatePlugins=function(e){this._plugins=r.Utils.Object.copyDeep(e)},a.isPlayable=function(){var e=this;return!!Ce.find((function(t){return e._sources&&e._sources[t]&&e._sources[t].length}))},t=e,(n=[{key:"sources",get:function(){var e=this;return Ce.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}}])&&we(t.prototype,n),i&&we(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();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,Pe(r.key),r)}}function Pe(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 De=function(){function e(){this._id="",this._metadata={name:"",description:""},this._poster="",this._items=[],this._activeItemIndex=-1}var t,n,i,a=e.prototype;return a.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,i){if(e.sources){var a=r.Utils.Object.mergeDeep({},t),o=e.sources.options||{};e.sources.options=r.Utils.Object.mergeDeep(a,o)}n._items.push(new xe(e.sources,e.config,i))})))},a.updateItemSources=function(e,t){this._items[e].updateSources(t)},a.updateItemPlugins=function(e,t){this._items[e].updatePlugins(t)},a.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}}])&&Ie(t.prototype,n),i&&Ie(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Re(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,Le(r.key),r)}}function Le(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 r.EventManager,this._playlist=new De,this._options={autoContinue:!0,loop:!1,imageDuration:5},this._countdown={duration:10,showing:!0},this._mediaInfoList=[],this._playerOptions=t,this._appPluginConfig={}}var t,n,i,a=e.prototype;return a.configure=function(e,t){e&&(this._playlist.configure(e,r.Utils.Object.getPropertyPath(this._player.sources,"options")),r.Utils.Object.mergeDeep(this._options,e.options),r.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 r.FakeEvent(Ae.PLAYLIST_LOADED,{playlist:this})),this._addBindings(),this.playNext()))},a.load=function(e,t,n){var r=this._getMergedPlaylistData(e,t);this.configure(r,n)},a.reset=function(){this._eventManager.removeAll(),this._playlist=new De,this._mediaInfoList=[]},a.playNext=function(){e._logger.debug("playNext");var t=this._playlist.getNext(!0);t&&this._setItem(t)},a.playPrev=function(){e._logger.debug("playPrev");var t=this._playlist.prev;t&&this._setItem(t)},a.playItem=function(t){e._logger.debug("playItem("+t+")");var n=this._playlist.items[t];n&&this._setItem(n)},a._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,i){var a=r.Utils.Object.copyDeep(e);return["sources.dvr","sources.type"].forEach((function(e){r.Utils.Object.deletePropertyPath(a,e)})),r.Utils.Object.mergeDeep(a.sources,t&&t.items&&t.items[i]&&t.items[i].sources),Array.isArray(a.sources.poster)&&n._player.updateKalturaPoster(a.sources,e.sources,n._player.dimensions),{sources:a.sources,config:t&&t.items&&t.items[i]&&t.items[i].config}}))}},a._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()}))},a._onPlaybackEnded=function(){var e=this._playlist.getNext(!1);e||this._player.dispatchEvent(new r.FakeEvent(Ae.PLAYLIST_ENDED)),!this._playerOptions.ui.disable&&this.countdown.showing||(e&&this._options.autoContinue||this._options.loop)&&this.playNext()},a._onChangeSourceStarted=function(){this._player.isImage()&&this._player.configure({sources:{duration:this._options.imageDuration}})},a._setItem=function(t){var n=this,i=t.index;e._logger.debug("Playing item number "+i,t);var a,o={loop:!1};this._playlist.current&&(this._player._playbackStart?o.autoplay=!0:o.autoplay=!(null==(a=this._playerOptions.playback)||!a.autoplay));if(this._player.configure({playback:o}),this._playlist.activeItemIndex=i,t.isPlayable()){var s,l;this._resetProviderPluginsConfig();var u=Q(t.plugins,this._player.config.plugins),c=u[0];this._appPluginConfig=u[1];var d={session:this._player.config.session,plugins:c,sources:t.sources};return this._player.setMedia(d),this._player.dispatchEvent(new r.FakeEvent(Ae.PLAYLIST_ITEM_CHANGED,{index:i,activeItem:t,entryId:(null==(s=this._mediaInfoList[i])?void 0:s.entryId)||(null==(l=t.sources)?void 0:l.id)})),Promise.resolve()}if(this._mediaInfoList[i]){this._resetProviderPluginsConfig();var p={sources:t.sources};return this._player.setMedia(p),this._player.loadMedia(this._mediaInfoList[i]).then((function(e){n._playlist.updateItemSources(i,e.sources),n._playlist.updateItemPlugins(i,e.plugins),n._player.dispatchEvent(new r.FakeEvent(Ae.PLAYLIST_ITEM_CHANGED,{index:i,activeItem:t,entryId:n._mediaInfoList[i].entryId}))}))}return Promise.reject()},a._resetProviderPluginsConfig=function(){this._player.configure({plugins:this._appPluginConfig}),this._appPluginConfig={}},a.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 r.Utils.Object.mergeDeep(e,this._countdown,this._playlist.current.config.countdown),e}return this._countdown}},{key:"options",get:function(){return this._options}}])&&Re(t.prototype,n),i&&Re(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();!function(e,t,n){(t=Le(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(Oe,"_logger",Object(r.getLogger)("PlaylistManager"));var Me={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"},Ne=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=r.Utils.Object.mergeDeep({},e.config,{sources:{startTime:Ue(e)},playback:{autoplay:0===e.currentTime||!e.paused,audioLanguage:Fe(r.TrackType.AUDIO,e),textLanguage:Fe(r.TrackType.TEXT,e)}})};function Ue(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 Fe(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 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,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 He=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}}])&&Be(t.prototype,n),r&&Be(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,ze(r.key),r)}}function Ge(e,t){return(Ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ke(e,t,n){return(t=ze(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ze(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 We=function(e){var t,n;function i(t,n,a){var o;return Ke(function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(o=e.call(this)||this),"_isCastInitiator",!1),o._playerConfig={},i._logger=Object(r.getLogger)(t),o._remoteControl=a,o._castConfig=r.Utils.Object.mergeDeep({},o.constructor.defaultConfig,n),o._eventManager=new r.EventManager,i._logger.debug("Initialized"),o}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,Ge(t,n),i.isSupported=function(){return!0};var a,o,s,l=i.prototype;return l.loadMedia=function(e){return Promise.resolve()},l.setMedia=function(e){},l.getMediaInfo=function(){},l.getMediaConfig=function(){},l.configure=function(e){void 0===e&&(e={})},l.ready=function(){return Promise.resolve()},l.load=function(){},l.play=function(){},l.pause=function(){},l.reset=function(){},l.destroy=function(){},l.isLive=function(){return!1},l.isDvr=function(){return!1},l.seekToLiveEdge=function(){},l.getStartTimeOfDvrWindow=function(){return 0},l.getTracks=function(e){return[]},l.getActiveTracks=function(){return{audio:void 0,video:void 0,text:void 0}},l.selectTrack=function(e){},l.hideTextTrack=function(){},l.enableAdaptiveBitrate=function(){},l.isAdaptiveBitrateEnabled=function(){return!0},l.setTextDisplaySettings=function(e){},l.startCasting=function(){},l.stopCasting=function(){},l.isCasting=function(){return!0},l.isCastAvailable=function(){return!0},l.getCastSession=function(){return new He("","")},l.isVr=function(){return!1},l.toggleVrStereoMode=function(){},l.isInVrStereoMode=function(){return!1},a=i,(o=[{key:"ads",get:function(){return null}},{key:"textStyle",get:function(){return new r.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 i.Type}},{key:"config",get:function(){return this._playerConfig}},{key:"isCastInitiator",get:function(){return this._isCastInitiator},set:function(e){this._isCastInitiator=e}}])&&Ve(a.prototype,o),s&&Ve(a,s),Object.defineProperty(a,"prototype",{writable:!1}),i}(r.FakeEventTarget);function Ye(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,qe(r.key),r)}}function qe(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(We,"defaultConfig",{}),Ke(We,"Type","BaseRemotePlayer");var Xe=function(){function e(){var e=this;!function(e,t,n){(t=qe(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,a=e.prototype;return a.playbackUI=function(e){return i.Presets.playbackUI(e)},a.idleUI=function(e){return i.Presets.idleUI(e)},a.adsUI=function(e){return i.Presets.adsUI(e)},a.liveUI=function(e){return i.Presets.liveUI(e)},a.errorUI=function(e){return i.Presets.errorUI(e)},t=e,(n=[{key:"uis",get:function(){return this._uis}}])&&Ye(t.prototype,n),r&&Ye(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Qe(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 Je(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,et(r.key),r)}}function Ze(e,t,n){return t&&Je(e.prototype,t),n&&Je(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function et(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 tt=function(){function e(e){this._player=e}return Ze(e,[{key:"player",get:function(){return this._player}}]),e}(),nt=function(e){function t(t,n,r){var i;return(i=e.call(this,t)||this)._session=n,r&&(i._ui=r),i}return Qe(t,e),Ze(t,[{key:"ui",get:function(){return this._ui}},{key:"session",get:function(){return this._session}}]),t}(tt),rt=function(e){function t(t,n){var r;return(r=e.call(this,t)||this)._snapshot=n,r}return Qe(t,e),Ze(t,[{key:"snapshot",get:function(){return this._snapshot}}]),t}(tt),it=function(e){function t(t,n){var r;return(r=e.call(this,t)||this)._available=n,r}return Qe(t,e),Ze(t,[{key:"available",get:function(){return this._available}}]),t}(tt);var at=function(e){this.getPlayerSnapshot=pt.bind(e),this.getUIWrapper=ht.bind(e),this.onRemoteDeviceAvailable=ct.bind(e),this.onRemoteDeviceConnected=st.bind(e),this.onRemoteDeviceDisconnected=ut.bind(e),this.onRemoteDeviceConnecting=ot.bind(e),this.onRemoteDeviceDisconnecting=lt.bind(e),this.onRemoteDeviceConnectFailed=dt.bind(e)};function ot(){at._logger.debug("onRemoteDeviceConnecting"),this.dispatchEvent(new r.FakeEvent(Me.CAST_SESSION_STARTING))}function st(e){var t=this;at._logger.debug("onRemoteDeviceConnected",e);var n=e.player,i=e.ui,a=e.session;this._eventManager.removeAll(),Object.values(r.EventType).forEach((function(e){return t._eventManager.listen(n,e,(function(e){return t.dispatchEvent(e)}))}));var o=this.config;i&&r.Utils.Object.mergeDeep(o,{ui:{customPreset:i.uis}}),this.configure({playback:{muted:this.muted,volume:this.volume}}),this._localPlayer.reset(),this._uiWrapper.destroy(),this._remotePlayer=n,this._uiWrapper=new Te(this,o),this.dispatchEvent(new r.FakeEvent(Me.CAST_SESSION_STARTED,{session:a}))}function lt(){at._logger.debug("onRemoteDeviceDisconnecting"),this.dispatchEvent(new r.FakeEvent(Me.CAST_SESSION_ENDING))}function ut(e){var t=this;at._logger.debug("onRemoteDeviceDisconnected",e);var n=e.player,i=e.snapshot;if(this._remotePlayer&&this._remotePlayer===n&&(this._eventManager.removeAll(),ft.call(this,i),i)){this.dispatchEvent(new r.FakeEvent(Me.CAST_SESSION_ENDED));var a,o=this.config,s=!i.config.playback.autoplay,l=i.mediaInfo,u=i.mediaConfig;i.config.playback.autoplay=!0,gt.call(this,i.config),this._eventManager.listenOnce(this,this.Event.Core.CHANGE_SOURCE_ENDED,(function(){yt.call(t,i.config.sources)})),l?a=this.loadMedia(l):u&&(a=Promise.resolve(),this.setMedia(u)),a&&a.then((function(){t._eventManager.listenOnce(t,t.Event.Core.FIRST_PLAYING,(function(){t.textStyle=i.textStyle,gt.call(t,o),vt.call(t,i.config.playback),s&&t.pause()}))}))}}function ct(e){at._logger.debug("onRemoteDeviceAvailable",e);var t=e.player,n=e.available;this.dispatchEvent(new r.FakeEvent(Me.CAST_AVAILABLE,{type:t.type,available:n}))}function dt(){at._logger.debug("onRemoteDeviceConnectFailed"),this.dispatchEvent(new r.FakeEvent(Me.CAST_SESSION_START_FAILED))}function pt(){var e=new Ne(this);return at._logger.debug("getPlayerSnapshot",e),e}function ht(){return at._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 i={};if(n.cast.advertising&&n.cast.advertising.vast){if(e.config.sources.startTime>0){var a=n.plugins.ima.adTagUrl;i={adTagUrl:""},this._eventManager.listen(this,r.EventType.FIRST_PLAYING,(function(){return t.configure({plugins:{ima:{adTagUrl:a}}})}))}}else i={delayInitUntilSourceSelected:!0};r.Utils.Object.mergeDeep(n,{plugins:{ima:i}}),this._localPlayer.destroy(),this._remotePlayer=null,this._localPlayer=Object(r.loadPlayer)(n)}else this._remotePlayer=null;Object.values(r.EventType).forEach((function(e){return t._eventManager.listen(t._localPlayer,e,(function(e){return t.dispatchEvent(e)}))})),this._uiWrapper=new Te(this,this.config),this._uiWrapper.setConfig({isCastAvailable:this.isCastAvailable()},"engine")}function gt(e){var t=e.sources.startTime,n=e.playback.autoplay;this.configure({sources:{startTime:t},playback:{autoplay:n}})}function yt(e){if(e.captions.length){var t=e.captions;this.configure({sources:{captions:t}})}}function vt(e){if(e.audioLanguage){var t=this.getTracks(r.TrackType.AUDIO).find((function(t){return t.language===e.audioLanguage}));this.selectTrack(t)}if(e.textLanguage){var n=this.getTracks(r.TrackType.TEXT).find((function(t){return t.language===e.textLanguage}));this.selectTrack(n)}}function mt(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}(at,"_logger",Object(r.getLogger)("RemoteControl"));var bt=function(){function e(){mt(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 at(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 _t(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,Et(r.key),r)}}function Et(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)}mt(bt,"_registry",new Map),mt(bt,"_logger",Object(r.getLogger)("RemotePlayerManager"));var kt=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}}])&&_t(t.prototype,n),r&&_t(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Tt(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,At(r.key),r)}}function At(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 wt=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}}])&&Tt(t.prototype,n),r&&Tt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function St(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 Ct=function(){function e(t){var n=this;St(this,"_prebid",null),this._loadPromise=r.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():r.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 xt(e,t){return(xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function It(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}St(Ct,"_logger",Object(r.getLogger)("PrebidManager"));var Pt=function(e){var t,n;function r(t){var n;return It(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,xt(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}(r.BaseMiddleware);function Dt(){return(Dt=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 Rt(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 Lt(e,t){return(Lt=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 Mt=function(e){var t,n;function i(t,n){var i;return(i=e.call(this)||this)._player=t,i._eventManager=new r.EventManager,i._liveEventManager=new r.EventManager,i._adsPluginControllers=n,i._prebidManager=new Ct(i._player.config.advertising&&i._player.config.advertising.prebid),i._init(),i}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,Lt(t,n);var a,o,s,l=i.prototype;return l.isAdPlaying=function(){return this.isAdBreak()&&this._isAdPlaying},l.isAdBreak=function(){return!!this._adBreak},l.getAdBreaksLayout=function(){return this._adBreaksLayout},l.getAdBreak=function(){return this._adBreak},l.getAd=function(){return this._ad},l.skipAd=function(){var e=this._adsPluginControllers.find((function(e){return e.active}));e&&e.skipAd()},l.playAdNow=function(e){var t=this;if(this.isAdBreak())i._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})}},l.getMiddleware=function(){return this._middleware?this._middleware:this._middleware=new Pt(this)},l._init=function(){this._initMembers(),this._addBindings()},l._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},l._addBindings=function(){var e=this;this._eventManager.listen(this._player,r.CustomEventType.SOURCE_SELECTED,(function(){return e._handleConfiguredAdBreaks()})),this._eventManager.listen(this._player,r.AdEventType.AD_MANIFEST_LOADED,(function(t){return e._onAdManifestLoaded(t)})),this._eventManager.listen(this._player,r.AdEventType.AD_BREAK_START,(function(t){return e._onAdBreakStart(t)})),this._eventManager.listen(this._player,r.AdEventType.AD_LOADED,(function(){return e._onAdLoaded()})),this._eventManager.listen(this._player,r.AdEventType.AD_STARTED,(function(t){return e._onAdStarted(t)})),this._eventManager.listen(this._player,r.AdEventType.AD_COMPLETED,(function(){return e._isAdPlaying=!1})),this._eventManager.listen(this._player,r.AdEventType.AD_BREAK_END,(function(){return e._onAdBreakEnd()})),this._eventManager.listen(this._player,r.AdEventType.ADS_COMPLETED,(function(){return e._onAdsCompleted()})),this._eventManager.listen(this._player,r.AdEventType.AD_ERROR,(function(t){return e._onAdError(t)})),this._eventManager.listen(this._player,r.CustomEventType.PLAYER_RESET,(function(){return e._reset()})),this._eventManager.listen(this._player,r.CustomEventType.PLAYER_DESTROY,(function(){return e._destroy()})),this._eventManager.listenOnce(this._player,r.Html5EventType.ENDED,(function(){return e._onEnded()})),this._eventManager.listenOnce(this._player,r.CustomEventType.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this._player,r.AdEventType.AD_RESUMED,(function(){return e._isAdPlaying=!0})),this._eventManager.listen(this._player,r.AdEventType.AD_PAUSED,(function(){return e._isAdPlaying=!1}))},l._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,r.Html5EventType.DURATION_CHANGE,(function(){e._player.isLive()?e._eventManager.listenOnce(e._player,r.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()},l._validateOneTimeConfig=function(e){"number"==typeof e.position&&("number"==typeof e.percentage&&(i._logger.warn("Validate ad break - ignore percentage "+e.percentage+" as position "+e.position+" configured"),delete e.percentage),"number"==typeof e.every&&(i._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&&(i._logger.warn("Validate ad break - ignore every "+e.every+" as percentage "+e.percentage+" configured"),delete e.every)},l._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}))));i._logger.debug(r.AdEventType.AD_MANIFEST_LOADED,t),this._player.dispatchEvent(new r.FakeEvent(r.AdEventType.AD_MANIFEST_LOADED,{adBreaksPosition:t})),this._player.hasService("timeline")&&this._player.config.advertising.showAdBreakCuePoint&&t.forEach((function(t){e._player.getService("timeline").addCuePoint(Dt({time:-1!==t?t:1/0},e._player.config.advertising.adBreakCuePointStyle))}))},l._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}))}))},l._getPrebidAds=function(e){var t=this;return new Promise((function(n){if(e.prebid&&t._prebidManager){var i=r.Utils.Object.mergeDeep({},e.prebid,t._player.config.advertising.prebid);t._prebidManager.load(i).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)}))},l._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)},l._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))}))},l._attachLiveSeekedHandler=function(){var e=this;this._eventManager.listenOnce(this._player,r.CustomEventType.FIRST_PLAYING,(function(){e._eventManager.listen(e._player,r.Html5EventType.SEEKING,(function(){e._liveSeeking=!0})),e._eventManager.listen(e._player,r.Html5EventType.SEEKED,(function(){e._liveSeeking=!1,e._pushNextAdsForLive(e._configAdBreaks,(function(t){return e._player.currentTime+t.every}))}))}))},l._pushNextAdsForLive=function(e,t){this._liveEventManager.removeAll();var n=[];e.forEach((function(e){if(![-1,0].includes(e.position)){var r=e.every,a=e.ads,o={every:r,position:t(e),ads:a,played:!1,loadedPromise:Promise.resolve()};i._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}))))},l._handleConfiguredMidrolls=function(){var e=this;this._eventManager.listen(this._player,r.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,a=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(a):e._pushNextAdsForLive(a,(function(t){return(e._player.isOnLiveEdge()?e._player.currentTime:t.position)+t.every}));else e._snapback=n,i._logger.debug("Set snapback value "+e._snapback),e._eventManager.listen(e._player,r.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,i._logger.debug("Reset snapback value"))}));var o=e._mergeAdBreaks(a);o&&e._playAdBreak(o)}}}))},l._handleReturnToLive=function(e){var t=this;this._liveEventManager.listenOnce(this._player,r.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,r.AdEventType.AD_BREAK_END,(function(){t._player.seekToLiveEdge()}))},l._playAdBreak=function(e){var t=this._adsPluginControllers.find((function(e){return"function"==typeof e.playAdNow}));t?(e.played=!0,this._adIsLoading=!0,i._logger.debug("Playing ad break positioned in "+e.position),e.loadedPromise.then((function(){return t.playAdNow(e.ads)}))):i._logger.warn("No ads plugin registered")},l._onAdManifestLoaded=function(e){this._adBreaksLayout=Array.from(new Set(this._adBreaksLayout.concat(e.payload.adBreaksPosition))).sort(),this._allAdsCompleted=!1},l._onAdBreakStart=function(e){this._adBreak=e.payload.adBreak},l._onAdLoaded=function(){this._adIsLoading=!1},l._onAdStarted=function(e){this._ad=e.payload.ad,this._adPlayed=!0,this._isAdPlaying=!0},l._onAdBreakEnd=function(){this._adBreak=null,this._ad=null},l._onAdsCompleted=function(){this._adsPluginControllers.every((function(e){return e.done}))&&this._configAdBreaks.every((function(e){return e.played}))&&(this._allAdsCompleted=!0,i._logger.debug(r.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new r.FakeEvent(r.AdEventType.ALL_ADS_COMPLETED)))},l._onAdError=function(e){this._adIsLoading=!1,e.payload.severity===r.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&&(i._logger.debug(r.AdEventType.ALL_ADS_COMPLETED),this.dispatchEvent(new r.FakeEvent(r.AdEventType.ALL_ADS_COMPLETED)))))},l._isBumper=function(e){return"bumper"===e.name},l._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()}))}))}},l._onPlaybackEnded=function(){this._configAdBreaks.forEach((function(e){return e.played=!0}))},l._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}))},l._reset=function(){this._eventManager.removeAll(),this._liveEventManager.removeAll(),this._init()},l._destroy=function(){this._adsPluginControllers=[],this._eventManager.destroy(),this._liveEventManager.destroy()},l._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})))}},a=i,(o=[{key:"allAdsCompleted",get:function(){return this._allAdsCompleted}}])&&Rt(a.prototype,o),s&&Rt(a,s),Object.defineProperty(a,"prototype",{writable:!1}),i}(r.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}(Mt,"_logger",Object(r.getLogger)("AdsController"));var Nt=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 Ut(e,t){return(Ut=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ft(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 Bt=function(e){var t,n;function r(t){var n;return Ft(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,Ut(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}(r.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}Ft(Bt,"_logger",Object(r.getLogger)("PluginReadinessMiddleware"));var Ht=function(){function e(e){jt(this,"_textTrack",null),this._player=e}var t=e.prototype;return t._addTextTrack=function(){this._textTrack=this._player.addTextTrack(r.TextTrack.KIND.METADATA,"CuePoints")},t._getMetadataTracks=function(){return this._player.getNativeTextTracks().filter((function(e){return e.kind===r.TextTrack.KIND.METADATA&&e.cues}))},t._createTextTrackCue=function(e){var t=e.startTime,n=e.endTime,i=e.id,a=e.metadata;return Object(r.createTextTrackCue)({startTime:t,endTime:n,id:i,type:r.TimedMetadata.TYPE.CUE_POINT,metadata:a})},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(r.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(r.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 i,a=t._createTextTrackCue(e),o=t._getTextTrackCueById(e.id);o&&t._removeTextTrackCue(o),null==(i=t._textTrack)||i.addCue(a),n.push(Object(r.createTimedMetadata)(a))})),t._player.dispatchEvent(new r.FakeEvent(r.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 Gt=function(){function e(t){var n=this;Vt(this,"_servicesRegistry",new Map),e._logger=Object(r.getLogger)("ServiceProvider"),this._eventManager=new r.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 zt(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 zt(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 zt(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 Wt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Wt=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),s=new I(r||[]);return i(o,"_invoke",{value:w(e,n,s)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var p="suspendedStart",h="executing",f="completed",g={};function y(){}function v(){}function m(){}var b={};u(b,o,(function(){return this}));var _=Object.getPrototypeOf,E=_&&_(_(P([])));E&&E!==n&&r.call(E,o)&&(b=E);var k=m.prototype=y.prototype=Object.create(b);function T(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(i,a,o,s){var l=d(e[i],e,a);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function w(t,n,r){var i=p;return function(a,o){if(i===h)throw new Error("Generator is already running");if(i===f){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var l=S(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?f:"suspendedYield",u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=f,r.method="throw",r.arg=u.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=m,i(k,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:v,configurable:!0}),v.displayName=u(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},T(A.prototype),u(A.prototype,s,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new A(c(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},T(k),u(k,l,"Generator"),u(k,o,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.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}},t.values=P,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.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,g):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),g},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),x(n),g}},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;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function Yt(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 qt(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function o(e){Yt(a,r,i,o,s,"next",e)}function s(e){Yt(a,r,i,o,s,"throw",e)}o(void 0)}))}}var Xt=[["widevine","com.widevine.alpha"],["playready","com.microsoft.playready"],["fairplay","com.apple.fps"]],Qt=Object(r.getLogger)("MediaCapabilities"),$t=1,Jt=0,Zt=-1;function en(){return(en=qt(Wt().mark((function e(t){var n,r,i;return Wt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Qt.debug("Starting to get media capabilities..."),e.next=4,rn(t);case 4:return r=e.sent,e.next=7,tn();case 7:return i=e.sent,n=Object.assign({},r,i),Qt.debug("Finished getting media capabilities ",{mediaCapabilities:n}),e.abrupt("return",n);case 13:return e.prev=13,e.t0=e.catch(0),Qt.debug("There was a problem with getting the media capabilities, ",e.t0.message),n={isHEVCSupported:Jt,isPowerEfficient:Jt,isDRMSupported:Jt,supportedDRMs:[]},Qt.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 tn(){return nn.apply(this,arguments)}function nn(){return(nn=qt(Wt().mark((function e(){var t,n,r,i,a,o,s,l;return Wt().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(Xt),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),Qt.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:Jt,e.abrupt("return",t);case 21:case"end":return e.stop()}}),e,null,[[8,14]])})))).apply(this,arguments)}function rn(e){return an.apply(this,arguments)}function an(){return(an=qt(Wt().mark((function e(t){var n,r,i;return Wt().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:Jt,n.isPowerEfficient=i.powerEfficient?$t:Jt,e.next=17;break;case 12:e.prev=12,e.t0=e.catch(4),Qt.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 on=function(e){return en.apply(this,arguments)};function sn(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */sn=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",l=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var a=t&&t.prototype instanceof y?t:y,o=Object.create(a.prototype),s=new I(r||[]);return i(o,"_invoke",{value:w(e,n,s)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=c;var p="suspendedStart",h="executing",f="completed",g={};function y(){}function v(){}function m(){}var b={};u(b,o,(function(){return this}));var _=Object.getPrototypeOf,E=_&&_(_(P([])));E&&E!==n&&r.call(E,o)&&(b=E);var k=m.prototype=y.prototype=Object.create(b);function T(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){function n(i,a,o,s){var l=d(e[i],e,a);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,s)}))}s(l.arg)}var a;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}})}function w(t,n,r){var i=p;return function(a,o){if(i===h)throw new Error("Generator is already running");if(i===f){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var l=S(s,r);if(l){if(l===g)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var u=d(t,n,r);if("normal"===u.type){if(i=r.done?f:"suspendedYield",u.arg===g)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=f,r.method="throw",r.arg=u.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=d(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,g;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(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 x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return v.prototype=m,i(k,"constructor",{value:m,configurable:!0}),i(m,"constructor",{value:v,configurable:!0}),v.displayName=u(m,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===v||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,l,"GeneratorFunction")),e.prototype=Object.create(k),e},t.awrap=function(e){return{__await:e}},T(A.prototype),u(A.prototype,s,(function(){return this})),t.AsyncIterator=A,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new A(c(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},T(k),u(k,l,"Generator"),u(k,o,(function(){return this})),u(k,"toString",(function(){return"[object Generator]"})),t.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}},t.values=P,I.prototype={constructor:I,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(x),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var l=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(l&&u){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.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,g):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),g},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),x(n),g}},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;x(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},t}function ln(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 un(){return(un=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 cn(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 dn(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 hn(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 gn=function(e){var t,n;function o(t){var n;hn(dn(n=e.call(this)||this),"_eventManager",new r.EventManager),hn(dn(n),"_mediaInfo",null),hn(dn(n),"_remotePlayer",null),hn(dn(n),"_pluginManager",new te),hn(dn(n),"_pluginsConfig",{}),hn(dn(n),"_reset",!0),hn(dn(n),"_firstPlay",!0),hn(dn(n),"_sourceSelected",null),hn(dn(n),"_appPluginConfig",{}),hn(dn(n),"_thumbnailManager",null),hn(dn(n),"_isVisible",!1),hn(dn(n),"_autoPaused",!1);var i=t.sources,o=t.plugins;n._configEvaluator=new fe,n._configEvaluator.evaluatePluginsConfig(o,t),n._playbackStart=!1;var s=r.Utils.Object.mergeDeep({},t);delete s.plugins,delete s.sources,n._localPlayer=Object(r.loadPlayer)(s),n._controllerProvider=new Nt(n._pluginManager),n._viewabilityManager=new R(n.config.viewability),n._uiWrapper=new Te(dn(n),r.Utils.Object.mergeDeep(t,{ui:{logger:{getLogger:r.getLogger,LogLevel:r.LogLevel}}})),n._serviceProvider=new Gt(dn(n)),n._cuepointManager=new Ht(dn(n)),n._provider=new a.Provider(r.Utils.Object.mergeDeep(t.provider,{logger:{getLogger:r.getLogger,LogLevel:r.LogLevel}}),"3.17.4"),n._playlistManager=new Oe(dn(n),t),Object.values(r.EventType).forEach((function(e){return n._eventManager.listen(n._localPlayer,e,(function(e){return n.dispatchEvent(e)}))})),n._addBindings();var l=r.Utils.Object.mergeDeep({},t.playlist,{items:null});return n._playlistManager.configure(l),n.configure({plugins:o}),n._playlistManager.configure({items:t.playlist&&t.playlist.items||[]}),n._localPlayer.setSources(i||{}),n._remotePlayerManager=new bt,n}n=e,(t=o).prototype=Object.create(n.prototype),t.prototype.constructor=t,pn(t,n);var l,u,c,d=o.prototype;return d.loadMedia=function(e,t){var n=this;return o._logger.debug("loadMedia",e),this._mediaInfo=e,this.reset(),this._localPlayer.loadingMedia=!0,this._uiWrapper.setLoadingSpinnerState(!0),new Promise((function(i,a){n._provider.getMediaConfig(e).then((function(e){var a=r.Utils.Object.copyDeep(e);t&&(a.sources=a.sources||{},a.sources=r.Utils.Object.mergeDeep(a.sources,t));var o=Q(a.plugins,n.config.plugins);a.plugins=o[0],n._appPluginConfig=o[1],n.configure(s({sources:n.sources},a)),n.setMedia(a),i(a)}),(function(e){var t=new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.LOAD_FAILED,e);n._localPlayer.dispatchEvent(new r.FakeEvent(r.EventType.ERROR,t)),a(e)}))}))},d.setMedia=function(e){o._logger.debug("setMedia",e),this.reset(!0);var t=r.Utils.Object.copyDeep(e),n=r.Utils.Object.mergeDeep({},t.sources,this._localPlayer.sources);delete t.sources,r.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}),q(n)||X(n)?this._thumbnailManager=null:this._thumbnailManager=new be(this,this.config.ui,e),this.updateKalturaPoster(n,e.sources,this._localPlayer.dimensions),D(this,un({},t,{sources:n}));var i=function(e,t){return t&&q(t)?Y(e,"youtube","progressive"):t&&X(t)?Y(e,"image","image"):null}(this,n);i&&(t.playback=i),this.configure(un({},t,{sources:n}))},d.updateKalturaPoster=function(e,t,n){var r;!function(e,t,n,r){var i=e.poster,a=t.poster,o=n.width,s=n.height;"string"==typeof i&&me.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==(r=r.session)?void 0:r.ks:"")},d.shouldAddKs=function(e){var t;return!(!this.config.provider.loadThumbnailWithKs||!1!==(null==(t=e||this.config)||null==(t=t.session)?void 0:t.isAnonymous))},d.loadPlaylist=function(e,t){var n=this;return o._logger.debug("loadPlaylist",e),this._uiWrapper.setLoadingSpinnerState(!0),new Promise((function(i,a){n._provider.getPlaylistConfig(e).then((function(e){n.setPlaylist(e,t),i(e)}),(function(e){var t=new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.LOAD_FAILED,e);n._localPlayer.dispatchEvent(new r.FakeEvent(r.EventType.ERROR,t)),a(e)}))}))},d.loadPlaylistByEntryList=function(e,t){var n=this;return o._logger.debug("loadPlaylistByEntryList",e),this._uiWrapper.setLoadingSpinnerState(!0),new Promise((function(i,a){n._provider.getEntryListConfig(e).then((function(r){n.setPlaylist(r,t,e),i(r)}),(function(e){var t=new r.Error(r.Error.Severity.CRITICAL,r.Error.Category.PLAYER,r.Error.Code.LOAD_FAILED,e);n._localPlayer.dispatchEvent(new r.FakeEvent(r.EventType.ERROR,t)),a(e)}))}))},d.setPlaylist=function(e,t,n){o._logger.debug("setPlaylist",e);var r={playlist:e,plugins:{}};Object.keys(this._pluginsConfig).forEach((function(e){r.plugins[e]={}})),this._configEvaluator.evaluatePluginsConfig(r.plugins,r),this._configureOrLoadPlugins(r.plugins),this._playlistManager.load(e,t,n)},d.getMediaInfo=function(){return r.Utils.Object.copyDeep(this._mediaInfo)},d.getDrmInfo=function(){return this._localPlayer.getDrmInfo()},d.getMediaConfig=function(){var e={sources:this._localPlayer.sources,plugins:this._pluginsConfig};return r.Utils.Object.copyDeep(e)},d.setSourcesMetadata=function(e){this._localPlayer.setSourcesMetadata(e)},d.configure=function(e){void 0===e&&(e={}),e=W(e);var t=r.Utils.Object.mergeDeep({},this.config,e);this._configEvaluator.evaluatePluginsConfig(e.plugins,t),this._configureOrLoadPlugins(e.plugins);var n=r.Utils.Object.mergeDeep({},e);if(delete n.plugins,n.sources){var i=n.sources;delete n.sources,this._localPlayer.configure(n),this._localPlayer.setSources(i||{})}else this._localPlayer.configure(n);e.ui&&this._uiWrapper.setConfig(t.ui),e.playlist&&this._playlistManager.configure(e.playlist)},d.ready=function(){return this._localPlayer.ready()},d.load=function(){this._localPlayer.load()},d.play=function(){this._localPlayer.play()},d.pause=function(){this._localPlayer.pause()},d.getView=function(){return this._localPlayer.getView()},d.getVideoElement=function(){return this._localPlayer.getVideoElement()},d.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())},d.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&&r.Utils.Dom.removeChild(n.parentNode,n)},d.isLive=function(){return this._localPlayer.isLive()},d.isOnLiveEdge=function(){return this._localPlayer.isOnLiveEdge()},d.isDvr=function(){return this._localPlayer.isDvr()},d.isUntimedImg=function(){return X(this.sources)&&!("number"==typeof this.config.sources.duration&&this.config.sources.duration>0)},d.isImage=function(){return X(this.sources)},d.isAudio=function(){return this._localPlayer.isAudio()},d.seekToLiveEdge=function(){this._localPlayer.seekToLiveEdge()},d.getStartTimeOfDvrWindow=function(){return this._localPlayer.getStartTimeOfDvrWindow()},d.getTracks=function(e){return this._localPlayer.getTracks(e)},d.getActiveTracks=function(){return this._localPlayer.getActiveTracks()},d.selectTrack=function(e){this._localPlayer.selectTrack(e)},d.hideTextTrack=function(){this._localPlayer.hideTextTrack()},d.showTextTrack=function(){this._localPlayer.showTextTrack()},d.enableAdaptiveBitrate=function(){this._localPlayer.enableAdaptiveBitrate()},d.isAdaptiveBitrateEnabled=function(){return this._localPlayer.isAdaptiveBitrateEnabled()},d.setTextDisplaySettings=function(e){this._localPlayer.setTextDisplaySettings(e)},d.isFullscreen=function(){return this._localPlayer.isFullscreen()},d.notifyEnterFullscreen=function(){this._localPlayer.notifyEnterFullscreen()},d.notifyExitFullscreen=function(){this._localPlayer.notifyExitFullscreen()},d.enterFullscreen=function(e){var t=e||this.config.ui.targetId;this._localPlayer.enterFullscreen(t)},d.exitFullscreen=function(){this._localPlayer.exitFullscreen()},d.enterPictureInPicture=function(){this._localPlayer.enterPictureInPicture()},d.exitPictureInPicture=function(){this._localPlayer.exitPictureInPicture()},d.isInPictureInPicture=function(){return this._localPlayer.isInPictureInPicture()},d.isPictureInPictureSupported=function(){return this._localPlayer.isPictureInPictureSupported()},d.getLogLevel=function(e){return this._localPlayer.getLogLevel(e)},d.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()}))}))},d.setIsCastInitiator=function(e,t){this._remotePlayerManager.setIsCastInitiator(e,t)},d.isCastAvailable=function(e){return this._remotePlayerManager.isCastAvailable(e)},d.getCastSession=function(){return null},d.stopCasting=function(){},d.isCasting=function(){return!1},d.isVr=function(){return this._localPlayer.isVr()},d.toggleVrStereoMode=function(){var e=this._pluginManager.get("vr");e&&"function"==typeof e.toggleVrStereoMode&&e.toggleVrStereoMode()},d.isInVrStereoMode=function(){var e=this._pluginManager.get("vr");return!(!e||"function"!=typeof e.isInStereoMode)&&e.isInStereoMode()},d.setLogLevel=function(e,t){this._localPlayer.setLogLevel(e,t)},d.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)},d._addBindings=function(){var e=this;this._eventManager.listen(this,r.EventType.CHANGE_SOURCE_STARTED,(function(){return e._onChangeSourceStarted()})),this._eventManager.listen(this,r.EventType.CHANGE_SOURCE_ENDED,(function(){return e._onChangeSourceEnded()})),this._eventManager.listen(this,r.EventType.PLAYER_RESET,(function(){return e._onPlayerReset()})),this._eventManager.listen(this,r.EventType.ENDED,(function(){return e._onEnded()})),this._eventManager.listen(this,r.EventType.FIRST_PLAY,(function(){return e._firstPlay=!1})),this._eventManager.listen(this,r.EventType.SOURCE_SELECTED,(function(t){return e._sourceSelected=t.payload.selectedSource[0]})),this._eventManager.listen(this,r.EventType.PLAYBACK_ENDED,(function(){return e._onPlaybackEnded()})),this._eventManager.listen(this,r.EventType.PLAYBACK_START,(function(){e._playbackStart=!0})),this._eventManager.listen(this,r.AdEventType.AD_AUTOPLAY_FAILED,(function(t){return e._onAdAutoplayFailed(t)})),this._eventManager.listen(this,r.AdEventType.AD_STARTED,(function(){return e._onAdStarted()})),this.config.playback.playAdsWithMSE&&(this._attachEventManager=new r.EventManager,this._eventManager.listen(this,r.AdEventType.AD_LOADED,(function(t){var n=t.payload.ad;n&&n.linear&&1===n.position&&!n.inStream&&e.src?(e._attachEventManager.listenOnce(e,r.AdEventType.AD_BREAK_START,(function(){return e.detachMediaSource()})),e._attachEventManager.listenOnce(e,r.AdEventType.AD_BREAK_END,(function(){return e.attachMediaSource()})),e._attachEventManager.listenOnce(e,r.AdEventType.AD_ERROR,(function(){return e.attachMediaSource()}))):e._attachEventManager.removeAll()}))),this._eventManager.listen(this,r.EventType.ERROR,(function(t){t.payload.severity===r.Error.Severity.CRITICAL&&(e._reset=!1)}))},d._onChangeSourceEnded=function(){r.Utils.Object.getPropertyPath(this.config,"ui.targetId")?this._viewabilityManager.observe(r.Utils.Dom.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this)):o._logger.warn("Cannot observe visibility change without config.ui.targetId")},d._onPlayerReset=function(){this._playbackStart=!1,r.Utils.Object.getPropertyPath(this.config,"ui.targetId")&&this._viewabilityManager.unObserve(r.Utils.Dom.getElementById(this.config.ui.targetId),this._handleVisibilityChange.bind(this))},d._onChangeSourceStarted=function(){this._configureOrLoadPlugins(this._pluginsConfig),this.reset(),this._pluginManager.loadMedia(),this._reset=!1},d._onEnded=function(){var e=this;setTimeout((function(){e._adsController&&!e._adsController.allAdsCompleted?e._eventManager.listenOnce(e._adsController,r.AdEventType.ALL_ADS_COMPLETED,(function(){e.dispatchEvent(new r.FakeEvent(r.EventType.PLAYBACK_ENDED))})):e.dispatchEvent(new r.FakeEvent(r.EventType.PLAYBACK_ENDED))}))},d._onPlaybackEnded=function(){this.config.playback.loop&&(this.currentTime=0,this.play())},d._onAdStarted=function(){this._firstPlay&&(this._localPlayer.posterManager.hide(),this._localPlayer.hideBlackCover())},d._onAdAutoplayFailed=function(e){this._firstPlay&&this.config.playback.autoplay&&(this._localPlayer.posterManager.show(),this.dispatchEvent(new r.FakeEvent(r.EventType.AUTOPLAY_FAILED,e.payload)))},d._configureOrLoadPlugins=function(e){var t=this;void 0===e&&(e={});var n=[],i=[],a=[];Object.keys(e).forEach((function(o){var s=t._pluginManager.get(o);if(s)s.updateConfig(e[o]),e[o]=s.getConfig();else if(t._sourceSelected)delete e[o];else{try{t._pluginManager.load(o,t,e[o])}catch(e){t.dispatchEvent(new r.FakeEvent(r.Error.Code.ERROR,e))}var l=t._pluginManager.get(o);l&&(a.push(l),e[o]=l.getConfig(),"function"==typeof l.getMiddlewareImpl&&("bumper"===l.name?n.push(l.getMiddlewareImpl()):n.unshift(l.getMiddlewareImpl())),"function"==typeof l.getUIComponents&&i.push.apply(i,l.getUIComponents()||[]),"function"==typeof l.getEngineDecorator&&t._localPlayer.registerEngineDecoratorProvider(new r.EngineDecoratorProvider(l)))}})),i.forEach((function(e){return t._uiWrapper.addComponent(e)})),this._pluginReadinessMiddleware||(this._pluginReadinessMiddleware=new Bt(a),this._localPlayer.playbackMiddleware.use(this._pluginReadinessMiddleware)),this._maybeCreateAdsController(),n.forEach((function(e){return t._localPlayer.playbackMiddleware.use(e)})),r.Utils.Object.mergeDeep(this._pluginsConfig,e)},d._maybeCreateAdsController=function(){var e=this;if(!this._adsController){var t=this._controllerProvider.getAdsControllers();t.length&&(this._adsController=new Mt(this,t),this._localPlayer.playbackMiddleware.use(this._adsController.getMiddleware()),this._eventManager.listen(this._adsController,r.AdEventType.ALL_ADS_COMPLETED,(function(t){e.dispatchEvent(t)})))}},d.attachMediaSource=function(){this._localPlayer.attachMediaSource()},d.detachMediaSource=function(){this._localPlayer.detachMediaSource()},d._resetProviderPluginsConfig=function(){this.configure({plugins:this._appPluginConfig}),this._appPluginConfig={}},d._handleVisibilityChange=function(e){this._isVisible=e,this.dispatchEvent(new r.FakeEvent("visibilitychange",{visible:this._isVisible})),this.config.playback.autoplay===r.AutoPlayType.IN_VIEW&&this._isVisible&&!this._playbackStart&&this._localPlayer.play({programmatic:!0}),!0===this.config.playback.autopause&&this._handleAutoPause(e)},d._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)},d.getService=function(e){return this._serviceProvider.get(e)},d.hasService=function(e){return this._serviceProvider.has(e)},d.registerService=function(e,t){this._serviceProvider.register(e,t)},d.addTextTrack=function(e,t){return this._localPlayer.addTextTrack(e,t)},d.getNativeTextTracks=function(){return this._localPlayer.getNativeTextTracks()},d.getMediaCapabilities=function(){var e,t=(e=sn().mark((function e(t){return sn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",on(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){ln(a,r,i,o,s,"next",e)}function s(e){ln(a,r,i,o,s,"throw",e)}o(void 0)}))});return function(e){return t.apply(this,arguments)}}(),l=o,(u=[{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 un({},this._localPlayer.sources)}},{key:"config",get:function(){return un({},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 un({Cast:Me,Core:r.EventType,Playlist:Ae,UI:i.EventType},r.EventType,{VISIBILITY_CHANGE:"visibilitychange"})}},{key:"TextStyle",get:function(){return this._localPlayer.TextStyle}},{key:"ViewabilityType",get:function(){return L}},{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}}])&&cn(l.prototype,u),c&&cn(l,c),Object.defineProperty(l,"prototype",{writable:!1}),o}(r.FakeEventTarget);hn(gn,"_logger",Object(r.getLogger)("KalturaPlayer"+r.Utils.Generator.uniqueId(5)));var yn={};function vn(){return yn}function mn(e){return yn[e]?yn[e]:null}var bn=["_remotePlayer","_listeners","_uiWrapper"],_n={get:function(e,t){if("destroy"===t){var n=e.config.targetId;delete yn[n]}return t in r.FakeEventTarget.prototype||bn.includes(t)?e[t]:e._remotePlayer&&t in e._remotePlayer?e._remotePlayer[t]:e[t]},set:function(e,t,n){return e._remotePlayer&&!bn.includes(t)?t in e._remotePlayer&&(e._remotePlayer[t]=n):e[t]=n,!0}};function En(e){!function(e){!1!==r.Utils.Object.getPropertyPath(e,"log.playerVersion")&&(Object(r.setLogLevel)(r.LogLevel.INFO),Object(r.getLogger)().log("%c @playkit-js/kaltura-player-js 3.17.4","color: #ff98f9;  font-size: large"),Object(r.getLogger)().log("%c For more details see https://github.com/kaltura/kaltura-player-js","color: #ff98f9;"))}(e),H(e=W(e));var t=z(e);!function(e){var t,n=e.provider,i=null==(t=K())?void 0:t.productVersion;if(!n.partnerId||2504201===n.partnerId){var a={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:""};a.url=function(e,t){return t&&(e+="&clientVer="+t),e}(a.url,i),a.url=x(a.url),a.url=P(a.url,i),a.url=S(a.url,r.Utils.Generator.guid()+":"+r.Utils.Generator.guid()),navigator.sendBeacon&&navigator.sendBeacon(a.url)}}(t),V(t),function(e){var t=parseFloat(G(j));isNaN(t)||r.Utils.Object.createPropertyPath(e,"sources.startTime",t)}(t),function(e){var t=parseFloat(G("kalturaSeekFrom"));isNaN(t)||r.Utils.Object.createPropertyPath(e,"sources.seekFrom",t);var n=parseFloat(G("kalturaClipTo"));isNaN(n)||r.Utils.Object.createPropertyPath(e,"sources.clipTo",n)}(t),B.forEach((function(e){return Object(r.getLogger)("KalturaPlayer:Setup")[e.level](e.msg)})),_.initialize(),F.initialize(),function(e){e.disableUserCache||m.setStorageConfig(e)}(t);var n=function(e){var t=new gn(e),n=new Proxy(t,_n);return yn[e.targetId]=n,n}(t);return function(e){if(!e.config.disableUserCache&&_.isStorageAvailable()){var t=_.getPlayerTextStyle();t&&(e.textStyle=r.Utils.Object.mergeDeep(new r.TextStyle,t))}}(n),function(e){m.attachAll(e)}(n),function(e,t){e.cast&&t.remotePlayerManager.load(e.cast,t)}(t,n),function(e){if(r.Env.isIOS||r.Env.isIPadOS){var t=function t(){e.removeEventListener(e.Event.UI.UI_CLICKED,t),Object(r.setCapabilities)(r.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 kn=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 r.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 Tn(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,An(e,t)}function An(e,t){return(An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var wn={ACTION:"action",EVENT:"event"},Sn=function(e){this.type=e},Cn=function(e){function t(t,n){var r;return(r=e.call(this,wn.EVENT)||this).event=t,r.payload=n,r}return Tn(t,e),t}(Sn),xn=function(e){function t(t,n){var r;return(r=e.call(this,wn.ACTION)||this).action=t,r.args=n,r}return Tn(t,e),t}(Sn),In={registerRemotePlayer:bt.register,PlayerSnapshot:Ne,RemoteControl:at,RemoteSession:He,BaseRemotePlayer:We,RemoteConnectedPayload:nt,RemoteDisconnectedPayload:rt,RemoteAvailablePayload:it,RemotePlayerUI:Xe,CastEventType:Me,RemotePlayerType:{CHROMECAST:"chromecast"},TextStyleConverter:kn,CustomEventMessage:Cn,CustomActionMessage:xn,CustomMessageType:wn,CustomActionType:{SKIP_AD:"skipAd"},CustomMessage:Sn},Pn={PlaylistEventType:Ae},Dn="@playkit-js/kaltura-player-js",Rn="ovp",Ln="3.17.4";r.Ad=wt,r.AdBreak=kt,r.BasePlugin=Z,r.registerPlugin=ne}]);

/*! For license information please see playkit-downloads.js.LICENSE.txt */
var KalturaPlayer;(()=>{var e={1972:function(e,t,n){"use strict";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.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Button=t.ButtonType=t.ButtonSize=void 0;var a,s,l=n(4522),c=n(42),u=n(6978),d=n(979),p=n(4820),_=n(5768),h=u.ui.Components.Tooltip;!function(e){e.small="small",e.medium="medium",e.large="large"}(a=t.ButtonSize||(t.ButtonSize={})),function(e){e.primary="primary",e.danger="danger",e.translucent="translucent",e.borderless="borderless"}(s=t.ButtonType||(t.ButtonType={}));var A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buttonRef=(0,l.createRef)(),t.renderButton=function(){var e,n=t.props,o=c(_.button,_[n.size],_[n.type],n.className,((e={})[_.disabled]=n.disabled,e[_.withIcon]=n.children&&n.icon,e[_.iconOnly]=!n.children&&n.icon,e)),r=i(i(i(i({ref:t.buttonRef,disabled:n.disabled,"aria-disabled":n.disabled,tabIndex:n.tabIndex,className:o},n.ariaLabel?{"aria-label":n.ariaLabel}:{}),n.testId?{"data-testid":n.testId}:{}),n.onFocus?{onFocus:n.onFocus}:{}),n.onBlur?{onBlur:n.onBlur}:{}),a=(0,l.h)("button",i({},r),(0,l.h)(l.Fragment,null,n.icon&&(0,l.h)(p.Icon,{name:n.icon,size:p.IconSize[n.size]}),n.children&&(0,l.h)("span",null,n.children)));return n.onClick?(0,l.h)(d.A11yWrapper,{onClick:n.onClick},a):a},t}return r(t,e),t.prototype.componentDidMount=function(){var e;this.props.setRef&&this.props.setRef(this.buttonRef.current),this.props.focusOnMount&&(null===(e=this.buttonRef.current)||void 0===e||e.focus())},t.prototype.render=function(e){if(e.tooltip){var t=i(i({label:e.tooltip.label},e.tooltip.type?{type:e.tooltip.type}:{}),e.tooltip.className?{classNames:e.tooltip.className}:{});return(0,l.h)(h,i({},t),this.renderButton())}return this.renderButton()},t}(l.Component);t.Button=A,A.defaultProps={disabled:!1,focusOnMount:!1,tabIndex:0,children:null,size:a.medium,icon:null,type:s.primary}},5454:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1972),t),r(n(178),t)},178:function(e,t,n){"use strict";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.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InputField=void 0;var a=n(4522),s=n(979),l=n(3665),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={active:!1},n._inputRef=null,n.setFocus=function(e){var t;null===(t=n._inputRef)||void 0===t||t.focus(e)},n._handleOnChange=function(e){n.props.onChange(e.target.value)},n._onClear=function(){var e;null===(e=n._inputRef)||void 0===e||e.focus(),n.props.onChange("")},n._onFocus=function(){n.setState({active:!0})},n._onBlur=function(){n.setState({active:!1})},n._goToNextSearchResult=function(){var e=n.props.searchResults,t=e.activeSearchIndex,o=e.totalSearchResults,r=e.onSearchIndexChange;0!==o&&r(t!==o?t+1:1)},n._goToPrevSearchResult=function(){var e=n.props.searchResults,t=e.activeSearchIndex,o=e.totalSearchResults;(0,e.onSearchIndexChange)(1!==t?t-1:o)},n._renderSearchResults=function(){return(0,a.h)(a.Fragment,null,(0,a.h)("div",{className:l.searchResults,"aria-live":"polite","aria-label":n.props.searchResults.searchResultsLabel},"".concat(n.props.searchResults.totalSearchResults>0?"".concat(n.props.searchResults.activeSearchIndex,"/").concat(n.props.searchResults.totalSearchResults):"0/0")),(0,a.h)("div",{className:l.prevNextWrapper},n.props.value&&(0,a.h)(s.A11yWrapper,{onClick:n._goToPrevSearchResult},(0,a.h)("button",{tabIndex:0,className:"".concat(l.prevNextButton," ").concat(0===n.props.searchResults.totalSearchResults?l.disabled:""),"aria-label":n.props.searchResults.prevMatchLabel},(0,a.h)("svg",{width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.h)("path",{d:"M0.292893 4.70711C0.653377 5.06759 1.22061 5.09532 1.6129 4.7903L1.70711 4.70711L4 2.415L6.29289 4.70711C6.65338 5.06759 7.22061 5.09532 7.6129 4.7903L7.70711 4.70711C8.06759 4.34662 8.09532 3.77939 7.7903 3.3871L7.70711 3.29289L4.70711 0.292893C4.34662 -0.0675907 3.77939 -0.0953203 3.3871 0.209705L3.29289 0.292893L0.292893 3.29289C-0.0976311 3.68342 -0.0976311 4.31658 0.292893 4.70711Z",fill:"white","fill-opacity":"0.7"})))),n.props.value&&(0,a.h)(s.A11yWrapper,{onClick:n._goToNextSearchResult},(0,a.h)("button",{tabIndex:0,className:"".concat(l.prevNextButton," ").concat(0===n.props.searchResults.totalSearchResults?l.disabled:""),"aria-label":n.props.searchResults.nextMatchLabel},(0,a.h)("svg",{width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L4 2.58579L6.29289 0.292893C6.68342 -0.0976311 7.31658 -0.0976311 7.70711 0.292893C8.09763 0.683417 8.09763 1.31658 7.70711 1.70711L4.70711 4.70711C4.31658 5.09763 3.68342 5.09763 3.29289 4.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683417 0.292893 0.292893Z",fill:"white","fill-opacity":"0.7"}))))))},n._renderClearSearch=function(){return(0,a.h)(s.A11yWrapper,{onClick:n._onClear},(0,a.h)("button",{className:l.clearIcon,tabIndex:0,"aria-label":n.props.clearSearchLabel},(0,a.h)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM3.38951 2.3502L3.46013 2.41264L5.99548 4.9504L8.53067 2.41264L8.60129 2.3502C8.89537 2.12125 9.32081 2.1418 9.59133 2.41199C9.8844 2.70471 9.88469 3.17958 9.59197 3.47265L7.05523 6.01165L9.59197 8.55189C9.88469 8.84496 9.8844 9.31983 9.59133 9.61255C9.32081 9.88275 8.89537 9.90329 8.60129 9.67434L8.53067 9.61191L5.99548 7.0729L3.46013 9.61191L3.38951 9.67434C3.09543 9.90329 2.66999 9.88275 2.39947 9.61255C2.1064 9.31983 2.10611 8.84496 2.39883 8.55189L4.93498 6.01165L2.39883 3.47265C2.10611 3.17958 2.1064 2.70471 2.39947 2.41199C2.66999 2.1418 3.09543 2.12125 3.38951 2.3502Z",fill:"white","fill-opacity":"0.7"}))))},n.state={active:!1},n}return r(t,e),t.prototype.render=function(){var e=this,t={className:l.inputElement,value:this.props.value,onInput:this._handleOnChange,onFocus:this._onFocus,onBlur:this._onBlur,tabIndex:0,ref:function(t){e._inputRef=t}};return this.props.placeholder&&(t["aria-label"]=this.props.placeholder,t.placeholder=this.props.placeholder),(0,a.h)("div",{className:[l.inputFieldWrapper,this.props.value||this.state.active?l.active:""].join(" ")},(0,a.h)("input",i({},t)),this.props.value&&this.props.clearSearchLabel&&this._renderClearSearch(),this.props.value&&this.props.searchResults&&this._renderSearchResults())},t}(a.Component);t.InputField=c},979:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.A11yWrapper=t.isKeyboardEvent=void 0;var o=n(4522),r=n(6978).ui.utils.KeyMap,i=r.ENTER,a=r.SPACE,s=r.UP,l=r.DOWN,c=r.LEFT,u=r.RIGHT,d=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,p=e.onUpKeyPressed,_=e.onDownKeyPressed,h=e.onLeftKeyPressed,A=e.onRightKeyPressed,f=e.role,C=e.type,v={onKeyDown:function(e){e.keyCode===a||e.keyCode===i?(d(e),r(e,!0)):e.keyCode===s&&p?(d(e),p(e)):e.keyCode===l&&_?(d(e),_(e)):e.keyCode===c&&h?(d(e),h(e)):e.keyCode===u&&A&&(d(e),A(e))},onClick:function(e){r(e,(0,t.isKeyboardEvent)(e))},role:f};return"button"===(null==n?void 0:n.type)&&(v.type=C||"button"),(0,o.cloneElement)(n,v)},t.A11yWrapper.defaultProps={role:"button"}},172:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(979),t),r(n(8579),t),r(n(3425),t)},8579:function(e,t,n){"use strict";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.OverlayPortal=void 0;var a=n(4522),s=KalturaPlayer.ui,l=s.redux.connect,c=s.reducers.shell,u=KalturaPlayer.ui.createPortal,d=".overlay-portal",p=function(e){return{targetId:e.config.targetId}},_=function(e){return{addPlayerClass:function(){return e(c.actions.addPlayerClass("playkit-overlay-active"))}}},h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.playerContainer=document.getElementById(t.props.targetId)||document,t}return r(t,e),t.prototype.componentWillUnmount=function(){var e=this;this.playerContainer.querySelector(d).children.length>1&&setTimeout((function(){e.props.addPlayerClass()}),0)},t.prototype.render=function(){return u(this.props.children,this.playerContainer.querySelector(d))},i([l(p,_)],t)}(a.Component);t.OverlayPortal=h},3425:function(e,t,n){"use strict";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.ScreenReaderProvider=t.ScreenReaderContext=void 0;var i=n(4522),a=n(7458);t.ScreenReaderContext=(0,i.createContext)((function(e,t){}));var s=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={textToRead:""},t._setTextToRead=function(e,n){void 0===n&&(n=500),setTimeout((function(){t.setState({textToRead:e})}),n)},t}return r(n,e),n.prototype.render=function(){return(0,i.h)(t.ScreenReaderContext.Provider,{value:this._setTextToRead},this.props.children,(0,i.h)("div",{style:a.srWrapper,"aria-live":"polite","data-testid":"screenReaderWrapper"},(0,i.h)("span",{id:"sr-only","aria-label":this.state.textToRead},this.state.textToRead)))},n}(i.Component);t.ScreenReaderProvider=s},4959:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIconByFileExt=t.IconType=void 0;var o=n(4522),r=n(4820);t.IconType={PDF:"pdf",PPT:"ppt",PPTX:"pptx",DOC:"doc",DOCX:"docx",TXT:"txt",RTF:"rtf",ODP:"odp",JPEG:"jpeg",JPG:"jpg",PNG:"png",SVG:"svg",ZIP:"zip",XLS:"xls",XLSX:"xlsx",CSV:"csv",ODS:"ods"},t.getIconByFileExt=function(e){switch(e){case t.IconType.PDF:return(0,o.h)(r.Icon,{name:"pdf"});case t.IconType.PPT:case t.IconType.PPTX:return(0,o.h)(r.Icon,{name:"presentation"});case t.IconType.DOC:case t.IconType.DOCX:case t.IconType.TXT:case t.IconType.RTF:case t.IconType.ODP:return(0,o.h)(r.Icon,{name:"document"});case t.IconType.JPEG:case t.IconType.JPG:case t.IconType.PNG:case t.IconType.SVG:return(0,o.h)(r.Icon,{name:"image"});case t.IconType.ZIP:return(0,o.h)(r.Icon,{name:"zip"});case t.IconType.XLS:case t.IconType.XLSX:case t.IconType.CSV:case t.IconType.ODS:return(0,o.h)(r.Icon,{name:"excel"});default:return(0,o.h)(r.Icon,{name:"genericFile"})}}},9695:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Add=void 0;var o=n(4522);t.Add=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M21.8083 4C22.4665 4 23 4.55964 23 5.25V18.75C23 19.4404 22.4665 20 21.8083 20H2.19167C1.53353 20 1 19.4404 1 18.75V5.25C1 4.55964 1.53353 4 2.19167 4H21.8083ZM15 6H3V18H15V6ZM12.999 8.967L13 9L12.998 8.94L12.999 8.967L13 9V15C13 15.5523 12.5523 16 12 16C11.4872 16 11.0645 15.614 11.0067 15.1166L11 15V11.414L6.70711 15.7071C6.34662 16.0676 5.77939 16.0953 5.3871 15.7903L5.29289 15.7071C4.93241 15.3466 4.90468 14.7794 5.2097 14.3871L5.29289 14.2929L9.584 10H6C5.48716 10 5.06449 9.61396 5.00673 9.11662L5 9C5 8.44772 5.44772 8 6 8L12.0193 8.00018C12.0427 8.00063 12.066 8.00189 12.0893 8.00397C12.1097 8.00575 12.1294 8.0081 12.149 8.01102C12.1659 8.01363 12.1834 8.0167 12.2007 8.02024C12.2227 8.02464 12.2444 8.02983 12.2658 8.03572C12.2815 8.0401 12.2969 8.04473 12.3121 8.04974C12.3318 8.05612 12.3516 8.06332 12.3711 8.0711L12.4232 8.09367C12.4439 8.10338 12.4643 8.11379 12.4843 8.12488C12.4964 8.1315 12.5086 8.13861 12.5207 8.146C12.5463 8.16172 12.5711 8.17849 12.5952 8.19631L12.6525 8.24221L12.6167 8.21279C12.6802 8.26255 12.7374 8.31982 12.7872 8.38325C12.7927 8.39016 12.7982 8.3974 12.8037 8.40469C12.8215 8.42887 12.8383 8.45372 12.8539 8.47934L12.8753 8.51594C12.8862 8.53571 12.8966 8.55611 12.9063 8.5769L12.9288 8.62866C12.9367 8.64842 12.9439 8.6682 12.9505 8.68826C12.9553 8.70315 12.9599 8.71854 12.9642 8.73401C12.9702 8.75556 12.9754 8.77725 12.9798 8.79921C12.9833 8.81662 12.9864 8.83405 12.989 8.85153L12.9972 8.92482L12.998 8.94L12.999 8.967Z",fill:"white"}))}},3697:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnswerOnAir=void 0;var o=n(4522);t.AnswerOnAir=function(){return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99999 10C7.72605 10 11.1196 10.84 11.3237 12.5079L11.3333 12.6667V13.3333C11.3333 13.6667 11.0854 13.9449 10.7648 13.9927L10.6667 14H1.33332C0.99999 14 0.721753 13.7521 0.673919 13.4315L0.666656 13.3333V12.6667C0.666656 10.8933 4.21999 10 5.99999 10ZM13.9533 1.99333C15.7933 4.42667 15.7867 7.64667 13.9533 10.0067C13.6967 10.3428 13.2103 10.3932 12.8794 10.1476L12.7933 10.0733L12.7733 10.0533C12.5133 9.79333 12.4667 9.38 12.68 9.08C14.0067 7.18667 14.0133 4.74 12.7 2.91333C12.48 2.60667 12.52 2.19333 12.7867 1.92667C13.1133 1.6 13.6733 1.62667 13.9533 1.99333ZM5.99999 3.33333C7.47275 3.33333 8.66666 4.52724 8.66666 6C8.66666 7.47276 7.47275 8.66667 5.99999 8.66667C4.52723 8.66667 3.33332 7.47276 3.33332 6C3.33332 4.52724 4.52723 3.33333 5.99999 3.33333ZM11.7867 4.46C12.3067 5.46667 12.3067 6.6 11.8 7.56667C11.5635 8.02089 10.9728 8.12086 10.5808 7.8178L10.5 7.74667L10.48 7.72667C10.24 7.48667 10.1867 7.13333 10.3133 6.82C10.5267 6.29333 10.5267 5.70667 10.3133 5.18C10.2025 4.90583 10.2295 4.59594 10.3898 4.36643L10.4667 4.27333L10.4733 4.26667C10.8667 3.87333 11.5333 3.96667 11.7867 4.46Z",fill:"white"}))}},6389:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowClose=void 0;var o=n(4522);t.ArrowClose=function(){return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.5 21C5.01472 21 3 18.9853 3 16.5L3 7.5C3 5.01472 5.01472 3 7.5 3L16.5 3C18.9853 3 21 5.01472 21 7.5V16.5C21 18.9853 18.9853 21 16.5 21H7.5ZM8.625 17.625L14.25 17.625L14.3812 17.6174C14.9407 17.5524 15.375 17.0769 15.375 16.5C15.375 15.8787 14.8713 15.375 14.25 15.375L10.218 15.375L17.2955 8.2955L17.3891 8.18951C17.7322 7.74819 17.701 7.11005 17.2955 6.70451C16.8562 6.26517 16.1438 6.26517 15.7045 6.70451L8.625 13.7843L8.625 9.75L8.61743 9.6188C8.55245 9.0593 8.07694 8.625 7.5 8.625C6.87868 8.625 6.375 9.12868 6.375 9.75L6.375 15.375L6.38117 15.5429C6.46706 16.7071 7.43884 17.625 8.625 17.625Z",fill:"white"}))}},3029:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowOpen=void 0;var o=n(4522);t.ArrowOpen=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.5 3C18.9853 3 21 5.01472 21 7.5V16.5C21 18.9853 18.9853 21 16.5 21H7.5C5.01472 21 3 18.9853 3 16.5V7.5C3 5.01472 5.01472 3 7.5 3H16.5ZM15.375 6.375H9.75L9.6188 6.38257C9.0593 6.44755 8.625 6.92306 8.625 7.5C8.625 8.12132 9.12868 8.625 9.75 8.625H13.782L6.7045 15.7045L6.61092 15.8105C6.26776 16.2518 6.29896 16.89 6.7045 17.2955C7.14384 17.7348 7.85616 17.7348 8.2955 17.2955L15.375 10.2158V14.25L15.3826 14.3812C15.4476 14.9407 15.9231 15.375 16.5 15.375C17.1213 15.375 17.625 14.8713 17.625 14.25V8.625L17.6188 8.45708C17.5329 7.29286 16.5612 6.375 15.375 6.375Z",fill:"white"}))}},960:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoScroll=void 0;var o=n(4522);t.AutoScroll=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,o.h)("path",{d:"M6.29289 15.2929C6.65338 14.9324 7.22061 14.9047 7.6129 15.2097L7.70711 15.2929L12 19.585L16.2929 15.2929C16.6534 14.9324 17.2206 14.9047 17.6129 15.2097L17.7071 15.2929C18.0676 15.6534 18.0953 16.2206 17.7903 16.6129L17.7071 16.7071L12.7071 21.7071C12.3466 22.0676 11.7794 22.0953 11.3871 21.7903L11.2929 21.7071L6.29289 16.7071C5.90237 16.3166 5.90237 15.6834 6.29289 15.2929Z",fill:"white"}),(0,o.h)("path",{d:"M17.7071 8.70711C17.3466 9.06759 16.7794 9.09532 16.3871 8.7903L16.2929 8.70711L12 4.415L7.70711 8.70711C7.34662 9.06759 6.77939 9.09532 6.3871 8.79029L6.29289 8.70711C5.93241 8.34662 5.90468 7.77939 6.2097 7.3871L6.29289 7.29289L11.2929 2.29289C11.6534 1.93241 12.2206 1.90468 12.6129 2.2097L12.7071 2.29289L17.7071 7.29289C18.0976 7.68342 18.0976 8.31658 17.7071 8.70711Z",fill:"white"}),(0,o.h)("rect",{x:"10",y:"10",width:"4",height:"4",rx:"2",fill:"white"}))}},4953:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Chapter=void 0;var o=n(4522);t.Chapter=function(){return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 4C4 3.44772 4.44772 3 5 3H11C11.5523 3 12 3.44772 12 4V13C12 13.824 11.0592 14.2944 10.4 13.8L8.6 12.45C8.24444 12.1833 7.75556 12.1833 7.4 12.45L5.6 13.8C4.94076 14.2944 4 13.824 4 13V4Z",fill:"white"}))}},5254:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Close=void 0;var o=n(4522);t.Close=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M11.6592 10.245L6.70483 5.29061C6.31701 4.9028 5.68581 4.90476 5.29528 5.29528C4.90204 5.68853 4.90267 6.31688 5.29061 6.70483L10.245 11.6592L5.29061 16.6137C4.9028 17.0015 4.90476 17.6327 5.29528 18.0232C5.68853 18.4165 6.31688 18.4158 6.70483 18.0279L11.6592 13.0735L16.6137 18.0279C17.0015 18.4157 17.6327 18.4137 18.0232 18.0232C18.4165 17.63 18.4158 17.0016 18.0279 16.6137L13.0735 11.6592L18.0279 6.70483C18.4157 6.31701 18.4137 5.68581 18.0232 5.29528C17.63 4.90204 17.0016 4.90267 16.6137 5.29061L11.6592 10.245Z",fill:"white"}))}},6432:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClosedCaptions=void 0;var o=n(4522);t.ClosedCaptions=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.53616 4C2.68845 4 2 4.68038 2 5.51967V18.4803C2 19.3125 2.68776 20 3.53616 20H20.4638C21.3116 20 22 19.3196 22 18.4803V5.51967C22 4.6875 21.3122 4 20.4638 4H3.53616ZM11.4852 13.4164C11.4852 13.6096 11.4297 13.8161 11.3186 14.0358C11.2074 14.2555 11.0381 14.4648 10.8104 14.6637C10.5827 14.8626 10.2958 15.0227 9.94978 15.1439C9.60371 15.2652 9.21394 15.3258 8.78045 15.3258C7.85882 15.3258 7.13938 15.0464 6.6221 14.4876C6.10483 13.9288 5.84619 13.1796 5.84619 12.2401C5.84619 11.6036 5.96458 11.041 6.20136 10.5523C6.43814 10.0636 6.78056 9.68567 7.22863 9.41858C7.67669 9.15149 8.21217 9.01794 8.83509 9.01794C9.22123 9.01794 9.57548 9.07667 9.89787 9.19411C10.2203 9.31155 10.4935 9.46309 10.7175 9.64873C10.9415 9.83436 11.1127 10.0323 11.2311 10.2426C11.3495 10.4528 11.4087 10.6489 11.4087 10.8307C11.4087 11.0164 11.3422 11.1736 11.2093 11.3024C11.0763 11.4312 10.9151 11.4956 10.7257 11.4956C10.6018 11.4956 10.4989 11.4625 10.417 11.3962C10.335 11.3299 10.243 11.2228 10.141 11.0751C9.95889 10.7872 9.76855 10.5712 9.57002 10.4273C9.37149 10.2833 9.11923 10.2113 8.81323 10.2113C8.37246 10.2113 8.01729 10.3903 7.74772 10.7483C7.47815 11.1064 7.34337 11.596 7.34337 12.2173C7.34337 12.509 7.37798 12.7771 7.44719 13.0214C7.51641 13.2658 7.61658 13.4742 7.74772 13.6465C7.87886 13.8189 8.03732 13.9496 8.2231 14.0386C8.40889 14.1277 8.61288 14.1722 8.83509 14.1722C9.1338 14.1722 9.3897 14.1002 9.60281 13.9562C9.81591 13.8123 10.0044 13.5925 10.1683 13.297C10.2594 13.1228 10.3578 12.9864 10.4634 12.8879C10.5691 12.7894 10.6984 12.7401 10.8514 12.7401C11.0335 12.7401 11.1847 12.8121 11.3049 12.9561C11.4251 13.1 11.4852 13.2535 11.4852 13.4164ZM18.1351 13.4164C18.1351 13.6096 18.0796 13.8161 17.9684 14.0358C17.8573 14.2555 17.688 14.4648 17.4603 14.6637C17.2326 14.8626 16.9457 15.0227 16.5997 15.1439C16.2536 15.2652 15.8638 15.3258 15.4303 15.3258C14.5087 15.3258 13.7893 15.0464 13.272 14.4876C12.7547 13.9288 12.4961 13.1796 12.4961 12.2401C12.4961 11.6036 12.6145 11.041 12.8513 10.5523C13.088 10.0636 13.4305 9.68567 13.8785 9.41858C14.3266 9.15149 14.8621 9.01794 15.485 9.01794C15.8711 9.01794 16.2254 9.07667 16.5478 9.19411C16.8702 9.31155 17.1434 9.46309 17.3674 9.64873C17.5914 9.83436 17.7626 10.0323 17.881 10.2426C17.9994 10.4528 18.0586 10.6489 18.0586 10.8307C18.0586 11.0164 17.9921 11.1736 17.8592 11.3024C17.7262 11.4312 17.565 11.4956 17.3756 11.4956C17.2517 11.4956 17.1488 11.4625 17.0669 11.3962C16.9849 11.3299 16.8929 11.2228 16.7909 11.0751C16.6088 10.7872 16.4184 10.5712 16.2199 10.4273C16.0214 10.2833 15.7691 10.2113 15.4631 10.2113C15.0223 10.2113 14.6672 10.3903 14.3976 10.7483C14.128 11.1064 13.9933 11.596 13.9933 12.2173C13.9933 12.509 14.0279 12.7771 14.0971 13.0214C14.1663 13.2658 14.2665 13.4742 14.3976 13.6465C14.5288 13.8189 14.6872 13.9496 14.873 14.0386C15.0588 14.1277 15.2628 14.1722 15.485 14.1722C15.7837 14.1722 16.0396 14.1002 16.2527 13.9562C16.4658 13.8123 16.6543 13.5925 16.8182 13.297C16.9093 13.1228 17.0077 12.9864 17.1133 12.8879C17.2189 12.7894 17.3483 12.7401 17.5013 12.7401C17.6834 12.7401 17.8346 12.8121 17.9548 12.9561C18.075 13.1 18.1351 13.2535 18.1351 13.4164Z",fill:"white"}))}},9398:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Document=void 0;var o=n(4522);t.Document=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 2H9.82843H14.1716H18C19.1046 2 20 2.89543 20 4V7.82843V20C20 21.1046 19.1046 22 18 22H6C4.89543 22 4 21.1046 4 20V7.82843V4C4 2.89543 4.89543 2 6 2ZM13 16C13 15.4477 12.5523 15 12 15H8C7.44772 15 7 15.4477 7 16C7 16.5523 7.44772 17 8 17H12C12.5523 17 13 16.5523 13 16ZM17 12C17 11.4477 16.5523 11 16 11H8C7.44772 11 7 11.4477 7 12C7 12.5523 7.44772 13 8 13H16C16.5523 13 17 12.5523 17 12ZM17 8C17 7.44772 16.5523 7 16 7H8C7.44772 7 7 7.44772 7 8C7 8.55228 7.44772 9 8 9H16C16.5523 9 17 8.55228 17 8Z",fill:"white"}))}},1577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Download=void 0;var o=n(4522);t.Download=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M17.5 6C17.5 5.44772 17.0523 5 16.5 5L16.3834 5.00673C15.886 5.06449 15.5 5.48716 15.5 6L15.4997 17.693L9.71029 12.2702C9.30721 11.8926 8.67439 11.9133 8.29683 12.3164C7.91928 12.7195 7.93998 13.3523 8.34306 13.7298L15.8164 20.7298C15.8212 20.7343 15.826 20.7387 15.8308 20.7431L15.8164 20.7298L15.9035 20.8027C15.9034 20.8026 15.9037 20.8028 15.9035 20.8027C15.9135 20.8101 15.9231 20.817 15.9333 20.824C15.956 20.8397 15.9793 20.8544 16.0038 20.8684C16.0148 20.8747 16.0259 20.8808 16.0366 20.8864C16.0596 20.8984 16.0832 20.9096 16.1077 20.9201C16.1223 20.9263 16.1371 20.9322 16.1515 20.9376C16.1769 20.947 16.2028 20.9555 16.2299 20.963C16.2399 20.9658 16.25 20.9684 16.2595 20.9709C16.3365 20.9899 16.4171 21 16.5 21C16.5804 21 16.6585 20.9905 16.7336 20.9725C16.7521 20.968 16.7706 20.963 16.7889 20.9576C16.8097 20.9514 16.8303 20.9444 16.8507 20.9367C16.8632 20.932 16.8756 20.9271 16.8878 20.922C16.9121 20.9118 16.936 20.9006 16.9596 20.8883C16.9735 20.8812 16.9872 20.8736 17.0007 20.8658C17.0223 20.8533 17.0434 20.84 17.0636 20.8262C17.0764 20.8174 17.0891 20.8083 17.1021 20.7985C17.1224 20.7831 17.1422 20.767 17.161 20.7504C17.1685 20.7437 17.176 20.737 17.1834 20.7301L24.6619 13.7301C25.0651 13.3527 25.086 12.7198 24.7086 12.3166L24.6172 12.2304C24.2352 11.9126 23.6674 11.9215 23.2952 12.2699L17.4997 17.694L17.5 6Z",fill:"white"}),(0,o.h)("path",{d:"M27 26C27 26.5523 26.5523 27 26 27H7C6.44772 27 6 26.5523 6 26C6 25.4477 6.44772 25 7 25H26C26.5523 25 27 25.4477 27 26Z",fill:"white"}))}},4263:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Excel=void 0;var o=n(4522);t.Excel=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M22 6C22 4.89543 21.1046 4 20 4H4C2.89543 4 2 4.89543 2 6V18C2 19.1046 2.89543 20 4 20H20C21.1046 20 22 19.1046 22 18V6ZM8 16C8 15.4477 7.55228 15 7 15H5C4.44772 15 4 15.4477 4 16C4 16.5523 4.44772 17 5 17H7C7.55228 17 8 16.5523 8 16ZM14 16C14 15.4477 13.5523 15 13 15H11C10.4477 15 10 15.4477 10 16C10 16.5523 10.4477 17 11 17H13C13.5523 17 14 16.5523 14 16ZM8 12C8 11.4477 7.55228 11 7 11H5C4.44772 11 4 11.4477 4 12C4 12.5523 4.44772 13 5 13H7C7.55228 13 8 12.5523 8 12ZM14 12C14 11.4477 13.5523 11 13 11H11C10.4477 11 10 11.4477 10 12C10 12.5523 10.4477 13 11 13H13C13.5523 13 14 12.5523 14 12ZM8 8C8 7.44772 7.55228 7 7 7H5C4.44772 7 4 7.44772 4 8C4 8.55228 4.44772 9 5 9H7C7.55228 9 8 8.55228 8 8ZM14 8C14 7.44772 13.5523 7 13 7H11C10.4477 7 10 7.44772 10 8C10 8.55228 10.4477 9 11 9H13C13.5523 9 14 8.55228 14 8ZM19 17H17C16.4477 17 16 16.5523 16 16C16 15.4477 16.4477 15 17 15H19C19.5523 15 20 15.4477 20 16C20 16.5523 19.5523 17 19 17ZM17 13H19C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11H17C16.4477 11 16 11.4477 16 12C16 12.5523 16.4477 13 17 13ZM19 9H17C16.4477 9 16 8.55228 16 8C16 7.44772 16.4477 7 17 7H19C19.5523 7 20 7.44772 20 8C20 8.55228 19.5523 9 19 9Z",fill:"white"}))}},2942:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Expand=void 0;var o=n(4522);t.Expand=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M20.997 3.924L20.998 3.945L20.999 3.98L21 4V10C21 10.5523 20.5523 11 20 11C19.4872 11 19.0645 10.614 19.0067 10.1166L19 10V6.416L14.7071 10.7071C14.3466 11.0676 13.7794 11.0953 13.3871 10.7903L13.2929 10.7071C12.9324 10.3466 12.9047 9.77939 13.2097 9.3871L13.2929 9.29289L17.586 5H14C13.4872 5 13.0645 4.61396 13.0067 4.11662L13 4C13 3.48716 13.386 3.06449 13.8834 3.00673L14 3L20.0332 3.00054C20.0503 3.00109 20.0683 3.00216 20.0862 3.0037C20.1079 3.00553 20.1285 3.00797 20.149 3.01102C20.166 3.01363 20.1834 3.0167 20.2007 3.02024C20.2227 3.02464 20.2444 3.02983 20.2658 3.03572C20.2815 3.0401 20.2969 3.04473 20.3121 3.04974C20.3318 3.05612 20.3516 3.06332 20.3711 3.0711L20.4232 3.09367C20.4439 3.10338 20.4643 3.11379 20.4843 3.12488C20.4964 3.1315 20.5086 3.13861 20.5207 3.146C20.5463 3.16172 20.5711 3.17849 20.5952 3.19631L20.6525 3.24221L20.6168 3.21279C20.6802 3.26255 20.7374 3.31982 20.7872 3.38325C20.7927 3.39016 20.7982 3.3974 20.8037 3.40469C20.8215 3.42887 20.8383 3.45373 20.8539 3.47934L20.8753 3.51594C20.8862 3.53571 20.8966 3.55611 20.9063 3.5769L20.9288 3.62866C20.9367 3.64842 20.9439 3.6682 20.9505 3.68826C20.9553 3.70315 20.9599 3.71854 20.9642 3.73401C20.9702 3.75556 20.9754 3.77725 20.9798 3.79921C20.9833 3.81662 20.9864 3.83405 20.989 3.85153L20.996 3.91075L20.996 3.919L20.997 3.921V3.924ZM3.002 20.059V20.071L3.00175 20.0593C3.00122 20.0503 3.00081 20.0413 3.00052 20.0323L3 14C3 13.4477 3.44772 13 4 13C4.51284 13 4.93551 13.386 4.99327 13.8834L5 14V17.586L9.29289 13.2929C9.65338 12.9324 10.2206 12.9047 10.6129 13.2097L10.7071 13.2929C11.0676 13.6534 11.0953 14.2206 10.7903 14.6129L10.7071 14.7071L6.416 19H10C10.5128 19 10.9355 19.386 10.9933 19.8834L11 20C11 20.5128 10.614 20.9355 10.1166 20.9933L10 21H4C3.99354 21 3.98709 20.9999 3.98066 20.9998C3.95732 20.9994 3.93401 20.9981 3.91075 20.996C3.89031 20.9943 3.87058 20.9919 3.85104 20.989C3.83405 20.9864 3.81662 20.9833 3.79927 20.9798C3.77725 20.9754 3.75556 20.9702 3.73416 20.9643C3.71854 20.9599 3.70315 20.9553 3.68786 20.9503C3.6682 20.9439 3.64842 20.9367 3.62894 20.9289L3.57678 20.9063C3.55611 20.8966 3.53571 20.8862 3.51572 20.8751C3.50361 20.8685 3.49139 20.8614 3.47929 20.854C3.45373 20.8383 3.42887 20.8215 3.40484 20.8037L3.34745 20.7578L3.38325 20.7872C3.31982 20.7374 3.26255 20.6802 3.21279 20.6168C3.20728 20.6098 3.20175 20.6026 3.19633 20.5953C3.17849 20.5711 3.16172 20.5463 3.14607 20.5207L3.12467 20.4841C3.11379 20.4643 3.10338 20.4439 3.09365 20.4231L3.07123 20.3713C3.06332 20.3516 3.05612 20.3318 3.04955 20.3117C3.04473 20.2969 3.0401 20.2815 3.03585 20.266C3.02983 20.2444 3.02464 20.2227 3.02017 20.2008C3.0167 20.1834 3.01363 20.1659 3.01102 20.1485L3.0037 20.0862L3.002 20.059Z",fill:"white"}))}},8358:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericFile=void 0;var o=n(4522);t.GenericFile=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 2C4.89543 2 4 2.89543 4 4V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V7.82843C20 7.29799 19.7893 6.78929 19.4142 6.41421L15.5858 2.58579C15.2107 2.21071 14.702 2 14.1716 2H6ZM14.3657 4.36569C13.8617 3.86171 13 4.21865 13 4.93137V8.2C13 8.64183 13.3582 9 13.8 9H17.0686C17.7814 9 18.1383 8.13829 17.6343 7.63431L14.3657 4.36569Z",fill:"white"}))}},3057:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hotspot=void 0;var o=n(4522);t.Hotspot=function(){return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 2C6.11537 2 5.79837 2.28953 5.75505 2.66253L5.75 2.75V3.5C5.75 3.91421 6.08579 4.25 6.5 4.25C6.88463 4.25 7.20163 3.96047 7.24495 3.58747L7.25 3.5V2.75C7.25 2.33579 6.91421 2 6.5 2ZM11.7955 3.8295C11.5235 3.55753 11.0946 3.53811 10.8003 3.77123L10.7348 3.8295L10.2045 4.35984C9.91161 4.65273 9.91161 5.1276 10.2045 5.4205C10.4765 5.69247 10.9054 5.71189 11.1997 5.47878L11.2652 5.4205L11.7955 4.89016C12.0884 4.59727 12.0884 4.1224 11.7955 3.8295ZM3.4545 12.1705C3.72648 12.4425 4.15536 12.4619 4.44975 12.2288L4.51516 12.1705L5.0455 11.6402C5.33839 11.3473 5.33839 10.8724 5.0455 10.5795C4.77352 10.3075 4.34464 10.2881 4.05025 10.5212L3.98484 10.5795L3.4545 11.1098C3.16161 11.4027 3.16161 11.8776 3.4545 12.1705ZM6.53592 6.98358C6.65797 6.61718 7.05316 6.41577 7.4186 6.53371L13.5234 8.50394C13.6272 8.53745 13.7214 8.59497 13.7983 8.67186C14.0693 8.94255 14.0669 9.38382 13.793 9.65748L12.8998 10.5499C12.7787 10.6708 12.7713 10.8642 12.8828 10.9915L13.6084 11.8185C14.0177 12.3362 13.9793 13.0939 13.4958 13.5769L13.4659 13.6069C12.9452 14.127 12.1056 14.1316 11.5906 13.6171L10.9802 12.9207C10.8554 12.7952 10.6516 12.7959 10.525 12.9224L9.66058 13.786C9.58277 13.8638 9.48795 13.9223 9.38376 13.957C9.01702 14.0789 8.624 13.8818 8.50593 13.5167L6.53356 7.41792C6.48802 7.27709 6.48885 7.12492 6.53592 6.98358ZM3.5 5.75C3.91421 5.75 4.25 6.08579 4.25 6.5C4.25 6.91421 3.91421 7.25 3.5 7.25H2.75C2.33579 7.25 2 6.91421 2 6.5C2 6.08579 2.33579 5.75 2.75 5.75H3.5Z",fill:"white"}))}},8934:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Image=void 0;var o=n(4522);t.Image=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 4C21.1046 4 22 4.89543 22 6V18C22 19.1046 21.1046 20 20 20H4C2.89543 20 2 19.1046 2 18V6C2 4.89543 2.89543 4 4 4H20ZM13.4658 9.8483C13.739 9.41452 14.1763 9.3854 14.4736 9.76788L14.5351 9.85614L18.2077 15.7324C18.6176 16.3882 18.3599 16.9391 17.6281 16.9953L17.5018 17H6.49825C5.71856 17 5.40843 16.498 5.77171 15.8584L5.83853 15.7506L8.44382 11.8687C8.72793 11.4454 9.26701 11.3331 9.6897 11.5934L9.785 11.6602L10.696 12.3798C11.1046 12.7026 11.6375 12.6332 11.9477 12.2465L12.0152 12.1517L13.4658 9.8483ZM9 8.5C9 7.672 8.328 7 7.5 7C6.672 7 6 7.672 6 8.5C6 9.329 6.672 10 7.5 10C8.328 10 9 9.329 9 8.5Z",fill:"white"}))}},1861:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icons=void 0;var o=n(5254),r=n(9919),i=n(1577),a=n(7024),s=n(8835),l=n(1223),c=n(7858),u=n(6563),d=n(2489),p=n(9695),_=n(756),h=n(4726),A=n(2942),f=n(3029),C=n(6389),v=n(4953),y=n(3057),g=n(3697),m=n(9209),b=n(960),w=n(8255),x=n(6432),P=n(8358),L=n(6150),O=n(8934),k=n(9398),E=n(4263),B=n(6044),j=n(3319);t.Icons={close:o.Close,print:r.Print,download:i.Download,related:a.Related,message:s.Message,share:l.Share,more:c.More,quiz:u.QuizIcon,switch:d.Switch,add:p.Add,minimizedVideo:_.MinimizedVideo,pictureInPicture:h.PictureInPicture,expand:A.Expand,arrowOpen:f.ArrowOpen,arrowClose:C.ArrowClose,chapter:v.Chapter,hotspot:y.Hotspot,answerOnAir:g.AnswerOnAir,screenRotation:m.ScreenRotation,autoScroll:b.AutoScroll,replay:w.ReplayIcon,closedCaptions:x.ClosedCaptions,genericFile:P.GenericFile,presentation:L.Presentation,image:O.Image,document:k.Document,excel:E.Excel,pdf:B.PDF,zip:j.Zip}},8835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var o=n(4522);t.Message=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M25 5C27.2091 5 29 6.75035 29 8.90952V18.6833C29 20.8425 27.2091 22.5928 25 22.5928H14.985L10.7019 26.7188C10.546 26.8689 10.3449 26.9641 10.1302 26.9917L10 27C9.44772 27 9 26.5624 9 26.0226V22.5928H7C4.79086 22.5928 3 20.8425 3 18.6833V8.90952C3 6.75035 4.79086 5 7 5H25ZM25 6.95476H7C5.89543 6.95476 5 7.82994 5 8.90952V18.6833C5 19.7629 5.89543 20.6381 7 20.6381H11V23.687L14.1651 20.6381H25C26.1046 20.6381 27 19.7629 27 18.6833V8.90952C27 7.82994 26.1046 6.95476 25 6.95476ZM19 14.7738C19.5523 14.7738 20 15.2114 20 15.7512C20 16.291 19.5523 16.7286 19 16.7286H10C9.44772 16.7286 9 16.291 9 15.7512C9 15.2114 9.44772 14.7738 10 14.7738H19ZM23 10.8643C23.5523 10.8643 24 11.3019 24 11.8417C24 12.3815 23.5523 12.819 23 12.819H10C9.44772 12.819 9 12.3815 9 11.8417C9 11.3019 9.44772 10.8643 10 10.8643H23Z",fill:"white"}))}},756:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinimizedVideo=void 0;var o=n(4522);t.MinimizedVideo=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.25 4.5H18.75C19.9926 4.5 21 5.50736 21 6.75V17.25C21 18.4926 19.9926 19.5 18.75 19.5H5.25C4.00736 19.5 3 18.4926 3 17.25V6.75C3 5.50736 4.00736 4.5 5.25 4.5ZM5.25 6C4.83579 6 4.5 6.33579 4.5 6.75V17.25C4.5 17.6642 4.83579 18 5.25 18H18.75C19.1642 18 19.5 17.6642 19.5 17.25V6.75C19.5 6.33579 19.1642 6 18.75 6H5.25ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},7858:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.More=void 0;var o=n(4522);t.More=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},(0,o.h)("path",{d:"M8 12C8 13.1046 7.10457 14 6 14C4.89543 14 4 13.1046 4 12C4 10.8954 4.89543 10 6 10C7.10457 10 8 10.8954 8 12ZM14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12ZM20 12C20 13.1046 19.1046 14 18 14C16.8954 14 16 13.1046 16 12C16 10.8954 16.8954 10 18 10C19.1046 10 20 10.8954 20 12Z",fill:"white"}))}},6044:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDF=void 0;var o=n(4522);t.PDF=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M16.2428 13.7325C17.4357 13.7542 18.6185 13.8543 19.7692 14.1927C20.2755 14.3415 20.7634 14.5301 21.1919 14.8459C22.0863 15.5045 22.2575 16.5466 21.6176 17.4515C20.9502 18.3952 19.8553 18.72 18.699 18.3321C17.8678 18.0533 17.1473 17.5995 16.5083 17.0166C15.915 16.4753 15.3392 15.9159 14.7469 15.3728C14.6746 15.3069 14.5482 15.2591 14.4503 15.2645C13.1247 15.3448 11.8091 15.509 10.5119 15.7995C10.0065 15.9123 9.50577 16.0458 9.00867 16.1884C8.9162 16.2146 8.82374 16.3138 8.77522 16.4031C8.07579 17.6978 7.33425 18.9672 6.42427 20.1329C5.98118 20.7004 5.49231 21.2273 4.87985 21.6261C3.70346 22.3912 2.4932 21.9482 2.10595 20.6075C1.88074 19.828 2.01715 19.1098 2.49045 18.4458C3.25945 17.3658 4.29212 16.5917 5.46301 15.998C6.15878 15.6453 6.89849 15.3755 7.61256 15.0561C7.72516 15.0056 7.84509 14.9081 7.89911 14.8017C8.68916 13.2489 9.37486 11.6511 9.98182 10.0199C10.0386 9.86741 10.023 9.75825 9.93879 9.62562C9.17254 8.42205 8.68001 7.12375 8.59212 5.69644C8.52987 4.68865 8.64431 3.71155 9.23845 2.84631C9.8207 1.99822 10.8058 1.74831 11.6059 2.27611C12.2705 2.71459 12.6788 3.33712 12.7594 4.13649C12.8656 5.19209 12.6788 6.22063 12.4216 7.23743C12.2357 7.97275 12.0087 8.69813 11.7899 9.42532C11.7487 9.56246 11.7643 9.659 11.8494 9.77629C12.8399 11.1441 13.9632 12.4018 15.147 13.608C15.2156 13.6784 15.341 13.7217 15.4427 13.7289C15.7081 13.7434 15.9755 13.7325 16.2428 13.7325ZM9.79415 14.3894C10.9486 14.1981 12.0792 14.0104 13.2171 13.8219C12.5168 13.0017 11.8155 12.1798 11.1069 11.3507C10.6648 12.3738 10.2327 13.3735 9.79415 14.3894ZM10.7133 7.76704C10.7591 7.60103 10.8058 7.43592 10.8497 7.26901C11.0777 6.4101 11.3029 5.54937 11.2855 4.65347C11.2809 4.40716 11.2141 4.14551 11.1079 3.92176C11.0319 3.76207 10.8424 3.65471 10.7041 3.52388C10.5833 3.67095 10.4267 3.80267 10.3471 3.96868C10.1137 4.45588 10.0834 4.98458 10.1127 5.51329C10.1576 6.29912 10.3379 7.05428 10.7133 7.76704ZM6.60279 17.0942C5.92899 17.4163 5.3083 17.7592 4.77915 18.2283C4.40197 18.563 4.06233 18.942 3.73642 19.3272C3.48832 19.6204 3.46452 19.9696 3.62931 20.3242C3.70438 20.4866 3.80233 20.5461 3.96071 20.427C4.11817 20.3088 4.28662 20.2015 4.42852 20.068C5.31471 19.2334 5.95097 18.2148 6.58356 17.1944C6.59546 17.1763 6.59272 17.152 6.60279 17.0942ZM16.8937 15.2762C17.54 15.9394 18.2166 16.5529 19.1055 16.8678C19.3087 16.9399 19.5358 16.9715 19.7518 16.9724C20.0594 16.9742 20.4055 16.6792 20.4503 16.3842C20.497 16.0792 20.2233 15.9998 20.0237 15.9033C19.0396 15.426 17.9685 15.3484 16.8937 15.2762Z",fill:"white"}))}},4726:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PictureInPicture=void 0;var o=n(4522);t.PictureInPicture=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.75 4.5H5.25C4.00736 4.5 3 5.50736 3 6.75V17.25C3 18.4926 4.00736 19.5 5.25 19.5H18.75C19.9926 19.5 21 18.4926 21 17.25V6.75C21 5.50736 19.9926 4.5 18.75 4.5ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},6150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Presentation=void 0;var o=n(4522);t.Presentation=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 4C4.34315 4 3 5.34315 3 7V17C3 18.6569 4.34315 20 6 20H18C19.6569 20 21 18.6569 21 17V7C21 5.34315 19.6569 4 18 4H6ZM18 8H6V16H18V8Z",fill:"white"}))}},9919:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Print=void 0;var o=n(4522);t.Print=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23 23H26C27.1046 23 28 22.1046 28 21V11C28 9.89543 27.1046 9 26 9H23V5C23 3.89543 22.1046 3 21 3H11C9.89543 3 9 3.89543 9 5V9H6C4.89543 9 4 9.89543 4 11V21C4 22.1046 4.89543 23 6 23H9V28C9 29.1046 9.89543 30 11 30H21C22.1046 30 23 29.1046 23 28V23ZM6 11V21H9V19C8.44772 19 8 18.5523 8 18C8 17.4477 8.44772 17 9 17H23C23.5523 17 24 17.4477 24 18C24 18.5523 23.5523 19 23 19V21H26V11H6ZM21 9V5H11V9H21ZM11 19V28H21V19H11Z",fill:"white"}))}},6563:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuizIcon=void 0;var o=n(4522);t.QuizIcon=function(){return(0,o.h)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.49857 2.11499L12.7442 4.2052C12.9162 4.28987 12.9812 4.48721 12.8895 4.64597C12.8594 4.69807 12.8145 4.74163 12.7597 4.77201L8.54484 7.10634C8.20953 7.29205 7.79063 7.29205 7.45532 7.10634L3.2405 4.77202C3.07335 4.67945 3.01915 4.47933 3.11944 4.32505C3.15235 4.27441 3.19956 4.23299 3.256 4.2052L7.50203 2.11498C7.81345 1.96167 8.18715 1.96168 8.49857 2.11499ZM14 6.02878V10.7642C14 11.1075 13.8049 11.4256 13.486 11.6022L9.24043 13.9536C9.07328 14.0461 8.85649 13.9961 8.7562 13.8418C8.72329 13.7912 8.7059 13.7333 8.7059 13.6742V8.93882C8.7059 8.59551 8.90104 8.27738 9.21997 8.10075L13.4655 5.74942C13.6326 5.65685 13.8494 5.70688 13.9497 5.86116C13.9826 5.91179 14 5.96973 14 6.02878ZM6.5145 8.31192L2.50483 6.04476C2.45303 6.01547 2.39375 6 2.33333 6C2.14924 6 2 6.14064 2 6.31412V10.88C2 11.211 2.1843 11.5178 2.4855 11.6881L6.49517 13.9552C6.54697 13.9845 6.60625 14 6.66667 14C6.85076 14 7 13.8594 7 13.6859V9.12C7 8.78898 6.8157 8.48223 6.5145 8.31192Z",fill:"white"}))}},7024:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Related=void 0;var o=n(4522);t.Related=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 7H12C13.1046 7 14 7.89543 14 9V13C14 14.1046 13.1046 15 12 15H8C6.89543 15 6 14.1046 6 13V9C6 7.89543 6.89543 7 8 7ZM8 13H12V9H8V13Z",fill:"white"}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 18H12C13.1046 18 14 18.8954 14 20V24C14 25.1046 13.1046 26 12 26H8C6.89543 26 6 25.1046 6 24V20C6 18.8954 6.89543 18 8 18ZM8 24H12V20H8V24Z",fill:"white"}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 7H20C18.8954 7 18 7.89543 18 9V13C18 14.1046 18.8954 15 20 15H24C25.1046 15 26 14.1046 26 13V9C26 7.89543 25.1046 7 24 7ZM24 13H20V9H24V13Z",fill:"white"}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 18H24C25.1046 18 26 18.8954 26 20V24C26 25.1046 25.1046 26 24 26H20C18.8954 26 18 25.1046 18 24V20C18 18.8954 18.8954 18 20 18ZM20 24H24V20H20V24Z",fill:"white"}))}},8255:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReplayIcon=void 0;var o=n(4522);t.ReplayIcon=function(){return(0,o.h)("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("g",{opacity:"0.8"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.5 7.50049C8.73858 7.50049 6.5 9.73906 6.5 12.5005V16.5005C6.5 19.2619 8.73858 21.5005 11.5 21.5005H13.0858L11.7929 22.7934C11.4024 23.1839 11.4024 23.8171 11.7929 24.2076C12.1834 24.5981 12.8166 24.5981 13.2071 24.2076L16.2071 21.2076C16.5976 20.8171 16.5976 20.1839 16.2071 19.7934L13.2071 16.7934C12.8166 16.4029 12.1834 16.4029 11.7929 16.7934C11.4024 17.1839 11.4024 17.8171 11.7929 18.2076L13.0858 19.5005H11.5C9.84315 19.5005 8.5 18.1573 8.5 16.5005V12.5005C8.5 10.8436 9.84315 9.50049 11.5 9.50049H21.5C23.1569 9.50049 24.5 10.8436 24.5 12.5005V16.5005C24.5 18.1573 23.1569 19.5005 21.5 19.5005H20C19.4477 19.5005 19 19.9482 19 20.5005C19 21.0528 19.4477 21.5005 20 21.5005H21.5C24.2614 21.5005 26.5 19.2619 26.5 16.5005V12.5005C26.5 9.73906 24.2614 7.50049 21.5 7.50049H11.5Z",fill:"white"})))}},9209:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenRotation=void 0;var o=n(4522);t.ScreenRotation=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 3C12 2.44772 12.4477 2 13 2C17.9706 2 22 6.02944 22 11C22 11.5523 21.5523 12 21 12C20.4477 12 20 11.5523 20 11C20 7.13401 16.866 4 13 4C12.4477 4 12 3.55228 12 3ZM10.6569 7.82843L7.82843 10.6569L13.4853 16.3137L16.3137 13.4853L10.6569 7.82843ZM12.0711 6.41421C11.29 5.63317 10.0237 5.63317 9.24265 6.41421L6.41422 9.24264C5.63317 10.0237 5.63317 11.29 6.41422 12.0711L12.0711 17.7279C12.8521 18.509 14.1185 18.509 14.8995 17.7279L17.7279 14.8995C18.509 14.1184 18.509 12.8521 17.7279 12.0711L12.0711 6.41421ZM11 22C11.5523 22 12 21.5523 12 21C12 20.4477 11.5523 20 11 20C7.13401 20 4 16.866 4 13C4 12.4477 3.55228 12 3 12C2.44771 12 2 12.4477 2 13C2 17.9706 6.02944 22 11 22Z",fill:"white"}))}},1223:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Share=void 0;var o=n(4522);t.Share=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M22.6667 12.6667C24.5076 12.6667 26 11.1743 26 9.33333C26 7.49238 24.5076 6 22.6667 6C20.8257 6 19.3333 7.49238 19.3333 9.33333C19.3333 9.38882 19.3347 9.44399 19.3374 9.49881L11.9575 13.9443C11.3473 13.1665 10.3987 12.6667 9.33333 12.6667C7.49238 12.6667 6 14.1591 6 16C6 17.8409 7.49238 19.3333 9.33333 19.3333C10.3981 19.3333 11.3462 18.8341 11.9564 18.057L19.3374 22.5013C19.3347 22.5561 19.3333 22.6112 19.3333 22.6667C19.3333 24.5076 20.8257 26 22.6667 26C24.5076 26 26 24.5076 26 22.6667C26 20.8257 24.5076 19.3333 22.6667 19.3333C21.6074 19.3333 20.6636 19.8274 20.053 20.5976L12.864 16.2689L12.8651 15.7324L20.0531 11.4025C20.6637 12.1727 21.6075 12.6667 22.6667 12.6667ZM22.6667 10.6667C21.9303 10.6667 21.3333 10.0697 21.3333 9.33333C21.3333 8.59695 21.9303 8 22.6667 8C23.403 8 24 8.59695 24 9.33333C24 10.0697 23.403 10.6667 22.6667 10.6667ZM9.33333 17.3333C8.59695 17.3333 8 16.7364 8 16C8 15.2636 8.59695 14.6667 9.33333 14.6667C10.0697 14.6667 10.6667 15.2636 10.6667 16C10.6667 16.7364 10.0697 17.3333 9.33333 17.3333ZM21.3333 22.6667C21.3333 23.403 21.9303 24 22.6667 24C23.403 24 24 23.403 24 22.6667C24 21.9303 23.403 21.3333 22.6667 21.3333C21.9303 21.3333 21.3333 21.9303 21.3333 22.6667Z",fill:"white"}))}},2489:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Switch=void 0;var o=n(4522);t.Switch=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M17.6744 9.27934L21.7563 13.3632L21.8282 13.4537L21.887 13.5492L21.9333 13.6489L21.9684 13.7556L21.9824 13.8172L21.9974 13.929L22 14L21.9897 14.1405L21.9824 14.1828L21.9535 14.2949L21.9231 14.3759L21.887 14.4508L21.8281 14.5463L21.7763 14.6137L21.7207 14.6744L17.6744 18.7207C17.3019 19.0931 16.6981 19.0931 16.3256 18.7207C15.9818 18.3769 15.9554 17.8359 16.2463 17.4617L16.3256 17.3719L18.7439 14.9536L12.9537 14.9537C12.4675 14.9537 12.0663 14.5899 12.0074 14.1196L12 14C12 13.5109 12.3682 13.1078 12.8425 13.0527L12.9537 13.0463L18.7426 13.0451L16.3256 10.6281C15.9798 10.2823 15.9551 9.73687 16.2515 9.36252L16.3256 9.27934C16.6981 8.90689 17.3019 8.90689 17.6744 9.27934ZM6.32562 5.27934C6.69807 4.90689 7.30193 4.90689 7.67438 5.27934L7.74849 5.36252C8.04493 5.73687 8.02023 6.28225 7.67438 6.6281L5.2574 9.04508L11.0463 9.04628L11.1575 9.0527C11.6318 9.10779 12 9.5109 12 10L11.9926 10.1196C11.9337 10.5899 11.5325 10.9537 11.0463 10.9537L5.25605 10.9536L7.67438 13.3719L7.75372 13.4617C8.04463 13.8359 8.01818 14.3769 7.67438 14.7207C7.30193 15.0931 6.69807 15.0931 6.32562 14.7207L2.25793 10.6523L2.18664 10.5668L2.12413 10.4708L2.07695 10.3759L2.03697 10.2639L2.01028 10.1405L2 10C2 9.95226 2.00351 9.90534 2.01036 9.85937L2.01758 9.81716L2.04651 9.70514L2.08932 9.59642L2.12415 9.52899L2.18631 9.43351L2.24369 9.36325L6.32562 5.27934Z",fill:"white"}))}},3319:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Zip=void 0;var o=n(4522);t.Zip=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 2C4.89543 2 4 2.89543 4 4V20C4 21.1046 4.89543 22 6 22H18C19.1046 22 20 21.1046 20 20V7.82843C20 7.29799 19.7893 6.78929 19.4142 6.41421L15.5858 2.58579C15.2107 2.21071 14.702 2 14.1716 2H6ZM14.3657 4.36569C13.8617 3.86171 13 4.21865 13 4.93137V8.2C13 8.64183 13.3582 9 13.8 9H17.0686C17.7814 9 18.1383 8.13829 17.6343 7.63431L14.3657 4.36569ZM7 5H9V7H7V5ZM9 9H7V11H9V9ZM7 13H9V15H7V13ZM10 17H6V19H10V17Z",fill:"white"}))}},4820:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t.IconSize=void 0;var o,r=n(4522),i=n(42),a=n(1861),s=n(927);!function(e){e.small="small",e.medium="medium",e.large="large"}(o=t.IconSize||(t.IconSize={})),t.Icon=function(e){var t=a.Icons[e.name];return t?(0,r.h)("div",{className:i(s.iconWrapper,s[e.size])},(0,r.h)(t,null)):null},t.Icon.defaultProps={size:o.medium}},573:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(197),t),r(n(6265),t),r(n(1644),t),r(n(5454),t),r(n(172),t)},2980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1644:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(2980),t)},1365:function(e,t,n){"use strict";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.BannerContainer=void 0;var i=n(4522),a=n(6550),s=n(8482),l=n(334),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(e){var t=this.props.theme,n=t.backgroundColor,o=t.blur;return(0,i.h)("div",{className:a.bannerContainerRoot,"aria-live":"polite"},(0,i.h)("div",{style:"\n                background-color:".concat(n,"; \n                backdrop-filter: blur(").concat(o,");\n             "),className:a.bannerContainer},(0,i.h)("button",{className:a.closeButton,onClick:e.onClose},(0,i.h)(s.CloseSmall,{className:a.small}),(0,i.h)(l.CloseLarge,{className:a.large})),this.props.children))},t}(i.Component);t.BannerContainer=c},334:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CloseLarge=void 0;var r=n(4522);t.CloseLarge=function(e){return(0,r.h)("svg",o({width:"32px",height:"32px",viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),(0,r.h)("g",{id:"Icons/32x32/Menu-Player-Close",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,r.h)("path",{d:"M17.4142136,16 L22.363961,20.9497475 C22.7544853,21.3402718 22.7544853,21.9734367 22.363961,22.363961 C21.9734367,22.7544853 21.3402718,22.7544853 20.9497475,22.363961 L16,17.4142136 L11.0502525,22.363961 C10.6597282,22.7544853 10.0265633,22.7544853 9.63603897,22.363961 C9.24551468,21.9734367 9.24551468,21.3402718 9.63603897,20.9497475 L14.5857864,16 L9.63603897,11.0502525 C9.24551468,10.6597282 9.24551468,10.0265633 9.63603897,9.63603897 C10.0265633,9.24551468 10.6597282,9.24551468 11.0502525,9.63603897 L16,14.5857864 L20.9497475,9.63603897 C21.3402718,9.24551468 21.9734367,9.24551468 22.363961,9.63603897 C22.7544853,10.0265633 22.7544853,10.6597282 22.363961,11.0502525 L17.4142136,16 Z",id:"Path",fill:"#FFFFFF"})))}},8482:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CloseSmall=void 0;var r=n(4522);t.CloseSmall=function(e){return(0,r.h)("svg",o({xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 10 10"},e),(0,r.h)("path",{fill:"#FFF","fill-rule":"evenodd",d:"M5.956 5l3.348-3.348A.674.674 0 0 0 9.3.7a.672.672 0 0 0-.952-.004L5 4.044 1.652.696A.674.674 0 0 0 .7.7a.672.672 0 0 0-.004.952L4.044 5 .696 8.348A.674.674 0 0 0 .7 9.3c.265.266.69.266.952.004L5 5.956l3.348 3.348c.262.262.689.26.952-.004a.672.672 0 0 0 .004-.952L5.956 5z",opacity:".9"}))}},5827:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BannerContainer=void 0;var o=n(1365);Object.defineProperty(t,"BannerContainer",{enumerable:!0,get:function(){return o.BannerContainer}})},9673:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BannerManager=t.VisibilityMode=void 0;var o,r=n(7720),i=n(4522),a=n(4570),s=n(5827),l=n(7863),c=n(8853);!function(e){e.VISIBLE="VISIBLE",e.HIDDEN="HIDDEN"}(o=t.VisibilityMode||(t.VisibilityMode={}));var u={theme:{backgroundColor:"rgba(0, 0, 0, .7)",blur:"10px"}},d=function(){function e(e){this.options=e,this._floatingItem=null,this._timerSubscription=void 0,this._options=e,this._bannerConfig=(0,c.getContribConfig)(this._options.kalturaPlayer,"ui.banner",u)}return e.prototype.add=function(e){return this._floatingItem&&this.remove(),this._floatingItem=this._options.floatingManager.add({label:"Banner",mode:r.FloatingUIModes.Immediate,position:r.FloatingPositions.InteractiveArea,renderContent:this._createRenderBanner(e,{onClose:this._handleCloseEvent.bind(this),theme:this._bannerConfig.theme})}),e.autoClose&&this._startDurationTimer(e.duration),this._getState()},e.prototype.remove=function(){this._floatingItem&&(this._timerSubscription&&clearTimeout(this._timerSubscription),this._options.floatingManager.remove(this._floatingItem),this._floatingItem=null)},e.prototype.reset=function(){this.remove()},e.prototype._createRenderBanner=function(e,t){var n=e.content,o=e.renderContent,r=t.onClose,l=t.theme;return function(e){return(0,i.h)(s.BannerContainer,{onClose:r,theme:l},o?o(n,e):(0,i.h)(a.Banner,{content:n}))}},e.prototype._handleCloseEvent=function(){this.remove()},e.prototype._startDurationTimer=function(e){void 0===e&&(e=6e4),this._timerSubscription=setTimeout(this.remove.bind(this),Math.max(5e3,e))},e.prototype._getState=function(){var e=(0,l.getPlayerSize)(this._options.kalturaPlayer);return{visibilityMode:!e||e.width<480?o.HIDDEN:o.VISIBLE}},e}();t.BannerManager=d},6797:function(e,t,n){"use strict";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.Banner=void 0;var i=n(4522),a=n(5111),s=n(5316),l=n(6339),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(e){var t=e.content,n=t.text,o=t.title,r=void 0===o?"Audience asks:":o,s=t.icon,l=void 0===s?this._defaultIcon():s;return(0,i.h)("div",{className:a.defaultBannerRoot+" "+a.bannerWrapper},(0,i.h)("div",{className:a.iconContainer},(0,i.h)("div",{className:a.iconWrapper},l)),(0,i.h)("div",{className:a.bannerBody},(0,i.h)("div",{className:a.title},r),(0,i.h)("div",{className:a.text},n)))},t.prototype._defaultIcon=function(){return(0,i.h)("div",{className:a.iconImage},(0,i.h)(s.SomeoneAsksLarge,{className:a.large}),(0,i.h)(l.SomeoneAsksSmall,{className:a.small}))},t}(i.Component);t.Banner=c},4570:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Banner=void 0;var o=n(6797);Object.defineProperty(t,"Banner",{enumerable:!0,get:function(){return o.Banner}})},5316:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SomeoneAsksLarge=void 0;var r=n(4522);t.SomeoneAsksLarge=function(e){return(0,r.h)("svg",o({width:"32px",height:"32px",viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),(0,r.h)("g",{id:"Icons/32/Someone-asks",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,r.h)("g",{id:"Group",transform:"translate(4.000000, 5.000000)",fill:"#B2D238"},(0,r.h)("ellipse",{id:"Oval",cx:"12",cy:"5.5",rx:"6",ry:"5.5"}),(0,r.h)("path",{d:"M12,13 C7.995,13 0,15.01 0,19 L0,20.5 C0,21.325 0.675,22 1.5,22 L22.5,22 C23.325,22 24,21.325 24,20.5 L24,19 C24,15.01 16.005,13 12,13 Z",id:"Path"}))))}},6339:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SomeoneAsksSmall=void 0;var r=n(4522);t.SomeoneAsksSmall=function(e){return(0,r.h)("svg",o({width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),(0,r.h)("g",{id:"Icons/20/Someone-asks",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,r.h)("g",{id:"Group",transform:"translate(2.000000, 2.000000)",fill:"#B2D238"},(0,r.h)("circle",{id:"Oval",cx:"8",cy:"4",r:"4"}),(0,r.h)("path",{d:"M8,9 C5.33,9 0,10.5633333 0,13.6666667 L0,14.8333333 C0,15.475 0.45,16 1,16 L15,16 C15.55,16 16,15.475 16,14.8333333 L16,13.6666667 C16,10.5633333 10.67,9 8,9 Z",id:"Path"}))))}},6908:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContribServices=t.getPlayerContribRegistry=void 0;var o=n(8717),r=n(3199),i=n(5753),a=n(8529),s=n(9673);function l(e){return o.PlayerContribRegistry.get(e)}t.getPlayerContribRegistry=l;var c=function(){function e(e,t){var n=this;this._playerContribRegistry=e,this._options=t,this._registered=!1,this._addListeners=function(){var e=n._options.kalturaPlayer;e.addEventListener(e.Event.PLAYER_RESET,n.reset),e.addEventListener(e.Event.PLAYER_DESTROY,n._removeListeners)},this._removeListeners=function(){var e=n._options.kalturaPlayer;e.removeEventListener(e.Event.PLAYER_RESET,n.reset),e.removeEventListener(e.Event.PLAYER_DESTROY,n._removeListeners)},this.register=function(){return n._registered?[]:(n._registered=!0,n._presetManager.registerComponents())},this.reset=function(){n._toastManager.reset(),n._floatingManager.reset(),n._bannerManager.reset()},this.destroy=function(){n._registered=!1};var o=this._options.kalturaPlayer,l=new r.PresetManager({kalturaPlayer:o}),c=new a.FloatingManager({kalturaPlayer:o,presetManager:l}),u=new i.ToastManager({floatingManager:c}),d=new s.BannerManager({kalturaPlayer:o,floatingManager:c});this._toastManager=u,this._floatingManager=c,this._presetManager=l,this._bannerManager=d,this._addListeners()}return e.get=function(t){var n=l(t.kalturaPlayer);return n.register("ContribServices",(function(){return new e(n,t)}))},Object.defineProperty(e.prototype,"presetManager",{get:function(){return this._presetManager},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"floatingManager",{get:function(){return this._floatingManager},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toastManager",{get:function(){return this._toastManager},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bannerManager",{get:function(){return this._bannerManager},enumerable:!1,configurable:!0}),e}();t.ContribServices=c},8853:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContribConfig=void 0;var o=n(5816);t.getContribConfig=function(e,t,n,r){return o.KalturaPlayerUtils.getPlayerConfig(e,"contrib.".concat(t),n,r)}},5092:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4522);t.default=function(e,t,n){return(0,o.h)("a",{href:e,key:n,target:"_blank",rel:"noopener noreferrer"},t)}},8842:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventsManager=void 0;var n=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=n},7720:(e,t)=>{"use strict";var n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.FloatingPositions=t.FloatingUIModes=void 0,(o=t.FloatingUIModes||(t.FloatingUIModes={})).MediaLoaded="MediaLoaded",o.OnDemand="OnDemand",o.Immediate="Immediate",o.FirstPlay="FirstPlay",(n=t.FloatingPositions||(t.FloatingPositions={})).VideoArea="VideoArea",n.PresetArea="PresetArea",n.InteractiveArea="InteractiveArea"},5921:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FloatingItem=void 0;var o=n(4522),r=n(7720),i=n(9017),a=function(){function e(e){var t=this;this._destroyed=!1,this._isShown=!1,this._componentRef=null,this.remove=function(){t._isShown=!1,t._componentRef&&t._componentRef.update()},this.add=function(){t._isShown=!0,t._componentRef&&t._componentRef.update()},this._handleMediaLoaded=function(){var e=t._options.kalturaPlayer;e.removeEventListener(e.Event.MEDIA_LOADED,t._handleMediaLoaded),t.add()},this._handleFirstPlay=function(){var e=t._options.kalturaPlayer;e.removeEventListener(e.Event.FIRST_PLAY,t._handleFirstPlay),t.add()},this._options=e,this._addPlayerBindings()}return Object.defineProperty(e.prototype,"data",{get:function(){return this._options.data},enumerable:!1,configurable:!0}),e.prototype.update=function(){this._componentRef&&this._componentRef.update()},e.prototype.destroy=function(){this._destroyed=!0,this.remove()},e.prototype.renderFloatingChild=function(e){var t=this,n=this._options.data.label;return(0,o.h)(i.ManagedComponent,{label:n,renderChildren:function(){return t._options.data.renderContent(e)},isShown:function(){return t._isShown},ref:function(e){return t._componentRef=e}})},e.prototype._addPlayerBindings=function(){var e=this._options,t=e.kalturaPlayer,n=e.data;n.mode===r.FloatingUIModes.MediaLoaded&&t.addEventListener(t.Event.MEDIA_LOADED,this._handleMediaLoaded),n.mode===r.FloatingUIModes.FirstPlay&&t.addEventListener(t.Event.FIRST_PLAY,this._handleFirstPlay),n.mode===r.FloatingUIModes.Immediate&&this.add()},e}();t.FloatingItem=a},8529:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.FloatingManager=void 0;var i=n(5921),a=n(7720),s=n(3199),l=n(4522),c=n(7863),u=n(9017),d=n(7417),p=n(8853),_={presetAreasMapping:{Playback:{VideoArea:"VideoArea",PresetArea:"PresetArea",InteractiveArea:"InteractiveArea"},Live:{VideoArea:"VideoArea",PresetArea:"PresetArea",InteractiveArea:"InteractiveArea"}}},h=["VideoArea","PresetArea","InteractiveArea"],A=function(){function e(e){var t,n,o=this;this._options=e,this._items=((t={})[a.FloatingPositions.VideoArea]=[],t[a.FloatingPositions.InteractiveArea]=[],t[a.FloatingPositions.PresetArea]=[],t),this._componentRef=((n={})[a.FloatingPositions.InteractiveArea]=null,n[a.FloatingPositions.VideoArea]=null,n[a.FloatingPositions.PresetArea]=null,n),this._cache={canvas:{playerSize:{width:0,height:0},videoSize:{width:0,height:0}}},this._renderItems=function(e){var t=o._getRendererProps({});return o._items[e].map((function(e){return e.renderFloatingChild(t)}))},this._renderChild=function(e){return(0,l.h)(u.ManagedComponent,{label:"floating-manager",renderChildren:function(){return o._renderItems(e)},isShown:function(){return!0},ref:function(t){return o._componentRef[e]=t}})},this._floatingConfig=(0,p.getContribConfig)(this._options.kalturaPlayer,"ui.floating",_,{explicitMerge:["presetAreasMapping"]});var r=d.PresetsUtils.groupPresetAreasByType({presetAreasMapping:this._floatingConfig.presetAreasMapping,acceptableTypes:h});Object.keys(r).forEach((function(e){o._options.presetManager.add({label:"floating-manager",presetAreas:r[e],renderChild:function(){return o._renderChild(a.FloatingPositions[e])}})})),this._addPlayerBindings(),this._updateCachedCanvas()}return e.prototype.add=function(e){var t=this._options.presetManager,n=o(o({presetManager:t},this._options),{data:e}),r=new i.FloatingItem(n);return this._items[e.position].push(r),r},e.prototype.remove=function(e){var t=this._items[e.data.position],n=t.indexOf(e);n>-1?(t[n].destroy(),t.splice(n,1)):console.warn("couldn't remove ".concat(e," since it wasn't found"))},e.prototype.reset=function(){r(r(r([],this._items.VideoArea,!0),this._items.InteractiveArea,!0),this._items.PresetArea,!0).forEach((function(e){try{e.destroy()}catch(e){console.warn(e)}})),this._items.VideoArea=[],this._items.PresetArea=[],this._items.InteractiveArea=[]},e.prototype._getRendererProps=function(e){var t=this._options.kalturaPlayer;return{currentTime:void 0!==e.currentTime?e.currentTime:1e3*t.currentTime,canvas:this._cache.canvas}},e.prototype._updateCachedCanvas=function(){this._cache.canvas={playerSize:(0,c.getPlayerSize)(this._options.kalturaPlayer),videoSize:(0,c.getVideoSize)(this._options.kalturaPlayer)}},e.prototype._updateComponents=function(){this._componentRef.InteractiveArea&&this._componentRef.InteractiveArea.update(),this._componentRef.PresetArea&&this._componentRef.PresetArea.update(),this._componentRef.VideoArea&&this._componentRef.VideoArea.update()},e.prototype._addPlayerBindings=function(){var e=this,t=this._options.kalturaPlayer;t.addEventListener(t.Event.TIME_UPDATE,(function(){e._updateComponents()})),t.addEventListener(t.Event.MEDIA_LOADED,(function(){e._updateCachedCanvas(),e._updateComponents()})),t.addEventListener(t.Event.LOADED_DATA,(function(){e._updateCachedCanvas(),e._updateComponents()})),this._options.presetManager.on(s.PresetManagerEventTypes.VideoResizeEvent,(function(){e._updateCachedCanvas(),e._updateComponents()})),this._options.presetManager.on(s.PresetManagerEventTypes.PresetResizeEvent,(function(){e._updateCachedCanvas(),e._updateComponents()}))},e}();t.FloatingManager=A},197:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkifyString=t.VisibilityMode=t.BannerManager=t.FloatingUIModes=t.FloatingPositions=t.FloatingItem=t.ToastSeverity=t.ContribServices=void 0;var o=n(6908);Object.defineProperty(t,"ContribServices",{enumerable:!0,get:function(){return o.ContribServices}});var r=n(5753);Object.defineProperty(t,"ToastSeverity",{enumerable:!0,get:function(){return r.ToastSeverity}});var i=n(5921);Object.defineProperty(t,"FloatingItem",{enumerable:!0,get:function(){return i.FloatingItem}});var a=n(7720);Object.defineProperty(t,"FloatingPositions",{enumerable:!0,get:function(){return a.FloatingPositions}}),Object.defineProperty(t,"FloatingUIModes",{enumerable:!0,get:function(){return a.FloatingUIModes}});var s=n(9673);Object.defineProperty(t,"BannerManager",{enumerable:!0,get:function(){return s.BannerManager}}),Object.defineProperty(t,"VisibilityMode",{enumerable:!0,get:function(){return s.VisibilityMode}});var l=n(8849);Object.defineProperty(t,"LinkifyString",{enumerable:!0,get:function(){return l.LinkifyString}})},5161:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InjectedComponent=void 0;var o=n(413);Object.defineProperty(t,"InjectedComponent",{enumerable:!0,get:function(){return o.InjectedComponent}})},413:function(e,t,n){"use strict";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.InjectedComponent=void 0;var i=n(4522),a=n(7982),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._root=null,t}return r(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.componentDidMount=function(){var e=this.props,t=e.onCreate;if(e.label,t){var n=this._root;n&&t({parent:n})}},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.onDestroy,n=(e.label,this._root);n&&t&&t({parent:n})},t.prototype.render=function(){var e=this,t=this.props,n=t.label,o=t.fillContainer?a.fillContainer:"";return(0,i.h)("div",{"data-contrib-injected":n,className:o,ref:function(t){return e._root=t}})},t}(i.Component);t.InjectedComponent=s},5816:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaPlayerUtils=void 0;var o=n(9442),r=function(){function e(){}return e.getPlayerConfig=function(e,t,n,r){var i=o.ObjectUtils.get(e.config,t,{});return o.ObjectUtils.mergeDefaults(i,n,r)},e}();t.KalturaPlayerUtils=r},8849:function(e,t,n){"use strict";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.LinkifyString=void 0;var i=n(4522),a=n(3708),s=n(5092),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._linkify=new a,t}return r(t,e),t.prototype._parseString=function(e){var t=this;if(0===(e||"").trim().length)return"";var n=this._linkify.match(e);if(!n)return e;var o=[],r=0;return n.forEach((function(n,i){n.index>r&&o.push(e.substring(r,n.index));var a=n.url,s=n.text,l=t.props.componentRenderer(a,s,i);o.push(l),r=n.lastIndex})),e.length>r&&o.push(e.substring(r)),1===o.length?o[0]:o},t.prototype.render=function(){return(0,i.h)("span",null,this._parseString(this.props.text))},t.defaultProps={componentRenderer:s.default},t}(i.Component);t.LinkifyString=l},9017:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(3692),t)},3692:function(e,t,n){"use strict";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.ManagedComponent=void 0;var a=n(4522),s=n(8598),l=KalturaPlayer.ui.redux.connect,c=function(e){return{playerSize:e.shell.playerSize}},u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.update=function(){this.setState((function(e){return{toggler:!e.toggler}}))},t.prototype.shouldComponentUpdate=function(e){var t=this.props,n=t.updateOnPlayerSizeChanged,o=t.playerSize;return n&&e.playerSize!==o||e.playerSize===o},t.prototype.componentDidMount=function(){this.setState({toggler:!1})},t.prototype.render=function(){var e=this.props,t=e.fillContainer,n=e.isShown,o=e.playerSize;return n()?(0,a.h)("div",{"data-contrib-item":this.props.label,className:"".concat(t?s.fillContainer:"")},this.props.renderChildren(o)):null},t.defaultProps={fillContainer:!1},i([l(c,null,null,{forwardRef:!0})],t)}(a.Component);t.ManagedComponent=u},9442:function(e,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;var o=function(){function e(){}return e.copyDeep=function(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,o){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[o]=e.copyDeep(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.copyDeep(n[t]))}))):n=t,n},e.isObject=function(e){return e&&"object"==typeof e&&!Array.isArray(e)},e.mergeDeep=function(t,n,o){var r,i;if(!n.length)return t;var a=(o?o.explicitMerge:null)||[],s=n.shift();if(e.isObject(t)&&e.isObject(s))for(var l in s)e.isObject(s[l])?(t[l]||Object.assign(t,((r={})[l]={},r)),-1!==a.indexOf(l)?t[l]=e.explicitFlatMerge(t[l],s[l]):e.mergeDeep(t[l],[s[l]],o)):Object.assign(t,((i={})[l]=s[l],i));return e.mergeDeep(t,n,o)},e.mergeDefaults=function(t,n,o){return e.mergeDeep({},[n,t],o)},e.explicitFlatMerge=function(e,t){var o=n({},e);return Object.keys(t).forEach((function(e){null===t[e]||0===Object.keys(t[e]).length?delete o[e]:o[e]=t[e]})),o},e.get=function(e,t,n){for(var o=function(e){var t=[];return e.split(".").forEach((function(e){e.split(/\[([^}]+)\]/g).forEach((function(e){e.length>0&&t.push(e)}))})),t}(t),r=e,i=0;i<o.length;i++){if(!r[o[i]])return n;r=r[o[i]]}return r},e}();t.ObjectUtils=o},8717:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerContribRegistry=void 0;var n=function(){function e(){this._cache={}}return e.get=function(t){return t.__contrib__=t.__contrib__||{},t.__contrib__.services=t.__contrib__.services||new e,t.__contrib__.services},e.prototype.get=function(e){var t=this._cache[e];if(!t)throw new Error("cannot find resource with token ".concat(e));return t},e.prototype.register=function(e,t){var n=this._cache[e];return n||(n=this._cache[e]={instance:t()}),n.instance},e}();t.PlayerContribRegistry=n},7863:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVideoSize=t.getPlayerSize=void 0,t.getPlayerSize=function(e){return e?e.dimensions:{width:0,height:0}},t.getVideoSize=function(e){if(!e)return{width:0,height:0};var t=e.getActiveTracks().video;return t&&void 0!==t.width&&void 0!==t.height?{width:t.width,height:t.height}:e.getVideoElement()?{width:e.getVideoElement().videoWidth,height:e.getVideoElement().videoHeight}:{width:0,height:0}}},6109:(e,t)=>{"use strict";var n,o,r;Object.defineProperty(t,"__esModule",{value:!0}),t.RelativeToTypes=t.ReservedPresetAreas=t.ReservedPresetNames=void 0,(r=t.ReservedPresetNames||(t.ReservedPresetNames={})).Playback="Playback",r.Live="Live",(o=t.ReservedPresetAreas||(t.ReservedPresetAreas={})).PresetFloating="PresetFloating",o.BottomBarLeftControls="BottomBarLeftControls",o.BottomBarRightControls="BottomBarRightControls",o.TopBarLeftControls="TopBarLeftControls",o.TopBarRightControls="TopBarRightControls",o.SidePanelTop="SidePanelTop",o.SidePanelLeft="SidePanelLeft",o.SidePanelRight="SidePanelRight",o.SidePanelBottom="SidePanelBottom",o.PresetArea="PresetArea",o.InteractiveArea="InteractiveArea",o.PlayerArea="PlayerArea",o.VideoArea="VideoArea",(n=t.RelativeToTypes||(t.RelativeToTypes={})).Before="Before",n.After="After",n.Replace="Replace"},6513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PresetItem=void 0;var o=n(4522),r=n(6109),i=n(5161),a=function(){function e(e){var t=this;this._render=function(){if(t._options.data.isolateComponent){var e=t._options.data,n=e.label,r=e.fillContainer;return(0,o.h)(i.InjectedComponent,{label:n,fillContainer:r||!1,onCreate:t._onCreate,onDestroy:t._onDestroy})}return t._options.data.renderChild()},this._onDestroy=function(e){e.parent&&(0,o.render)(null,e.parent)},this._onCreate=function(e){try{if(!e.parent)return;var n=t._options.data.renderChild();if(!n)return;(0,o.render)(n,e.parent)}catch(e){}},this._options=e}return Object.defineProperty(e.prototype,"playerConfig",{get:function(){var e=[];for(var t in this._options.data.presetAreas){var n=this._options.data.presetAreas[t],o=this._options.data.relativeTo;if(n){var i={label:this._options.data.label,presets:[t],container:n,get:this._render};if(o)switch(o.type){case r.RelativeToTypes.After:i.afterComponent=o.name;break;case r.RelativeToTypes.Before:i.beforeComponent=o.name;break;case r.RelativeToTypes.Replace:i.replaceComponent=o.name}e.push(i)}}return e},enumerable:!1,configurable:!0}),e}();t.PresetItem=a},3199:function(e,t,n){"use strict";var o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.PresetManager=t.PresetManagerEventTypes=void 0;var r,i=n(4522),a=n(6513),s=n(8842),l=n(6227),c=n(7417),u=n(8853);!function(e){e.PresetResizeEvent="PresetResizeEvent",e.VideoResizeEvent="VideoResizeEvent"}(r=t.PresetManagerEventTypes||(t.PresetManagerEventTypes={}));var d=["PlayerArea"],p={presetAreasMapping:{Playback:{PlayerArea:"PlayerArea"},Live:{PlayerArea:"PlayerArea"}}},_=function(){function e(e){var t=this;this._events=new s.EventsManager,this._isLocked=!1,this._items=[],this._pendingItems=[],this._registerToPlayer=function(e){e.addEventListener(KalturaPlayer.ui.EventType.UI_PRESET_RESIZE,t._notifyUIPresetResize),e.addEventListener(KalturaPlayer.ui.EventType.VIDEO_RESIZE,t._notifyVideoResize)},this._notifyVideoResize=function(){t._events.emit({type:r.VideoResizeEvent})},this._notifyUIPresetResize=function(){t._events.emit({type:r.PresetResizeEvent})},this._unregisterToPlayer=function(e){e.removeEventListener(KalturaPlayer.ui.EventType.UI_PRESET_RESIZE,t._notifyUIPresetResize),e.removeEventListener(KalturaPlayer.ui.EventType.VIDEO_RESIZE,t._notifyVideoResize)},this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events),this._options=e,this._presetConfig=(0,u.getContribConfig)(this._options.kalturaPlayer,"ui.preset",p,{explicitMerge:["presetAreasMapping"]});var n=c.PresetsUtils.groupPresetAreasByType({presetAreasMapping:this._presetConfig.presetAreasMapping,acceptableTypes:d});this.add({label:"preset-manager",presetAreas:n.PlayerArea,renderChild:function(){return(0,i.h)(l.UIPlayerAdapter,{onMount:t._registerToPlayer,onUnmount:t._unregisterToPlayer})}})}return e.prototype.add=function(e){if(this._isLocked)return console.warn("cannot add new preset items once player completed its' setup phase"),null;var t=new a.PresetItem({kalturaPlayer:this._options.kalturaPlayer,data:e});this._pendingItems.push(t)},e.prototype.lockManager=function(){this._isLocked=!0},e.prototype.registerComponents=function(){var e=[];return this._pendingItems.forEach((function(t){e=o(o([],e,!0),t.playerConfig,!0)})),this._items=o(o([],this._items,!0),this._pendingItems,!0),this._pendingItems=[],e.filter(Boolean)},e}();t.PresetManager=_},7417:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PresetsUtils=void 0;var n=function(){function e(){}return e.groupPresetAreasByType=function(e){var t=e.presetAreasMapping,n=e.acceptableTypes,o={};return n.forEach((function(e){return o[e]={}})),Object.keys(t).forEach((function(e){Object.keys(t[e]).forEach((function(r){-1===n.indexOf(r)||(o[r][e]=t[e][r])}))})),o},e}();t.PresetsUtils=n},5753:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)},r=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ToastManager=t.ToastSeverity=void 0;var i,a=n(4144),s=n(7720),l=n(4617),c=n(4522);(i=t.ToastSeverity||(t.ToastSeverity={})).Info="Info",i.Success="Success",i.Warn="Warn",i.Error="Error";var u=function(){function e(e){var t=this;this.options=e,this._toasts=[],this._floatingItem=null,this._remove=function(e){var n=t._findToastIndexById(e);-1!==n&&(clearTimeout(t._toasts[n].timerSubscription),t._toasts.splice(n,1),t._updateToastsUI(),0===t._toasts.length&&t._removeToastsContainer())},this._options=e}return e.prototype.add=function(e){var t=e.duration,n=r(e,["duration"]);this._floatingItem||this._addToastsContainer();var i={toastProps:o(o({},n),{id:a.UUID.uuidV1(),onClose:this._remove}),duration:t,timerSubscription:null};this._toasts.push(i),this._updateToastsUI(),this._startDurationTimer(i)},e.prototype.reset=function(){var e=this;this._toasts.forEach((function(t){e._remove(t.toastProps.id)}))},e.prototype._startDurationTimer=function(e){var t=this;e.timerSubscription=setTimeout((function(){t._remove(e.toastProps.id)}),e.duration)},e.prototype._addToastsContainer=function(){var e=this;this._floatingItem=this._options.floatingManager.add({label:"Toasts",mode:s.FloatingUIModes.Immediate,position:s.FloatingPositions.InteractiveArea,renderContent:function(){return(0,c.h)(l.ToastsContainer,{toasts:e._toasts.map((function(e){return e.toastProps}))})}})},e.prototype._removeToastsContainer=function(){this._floatingItem&&(this._options.floatingManager.remove(this._floatingItem),this._floatingItem=null)},e.prototype._updateToastsUI=function(){this._floatingItem&&this._floatingItem.update()},e.prototype._findToastIndexById=function(e){for(var t=0;t<this._toasts.length;){if(this._toasts[t].toastProps.id===e)return t;t++}return-1},e}();t.ToastManager=u},1569:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloseIcon=void 0;var o=n(4522);t.CloseIcon=function(){return(0,o.h)("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},(0,o.h)("g",{id:"Icons/16/Close",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,o.h)("path",{d:"M8.8497789,8 L11.824005,10.9742261 C12.058665,11.2088861 12.058665,11.5893451 11.824005,11.824005 C11.5893451,12.058665 11.2088861,12.058665 10.9742261,11.824005 L8,8.8497789 L5.02577387,11.824005 C4.7911139,12.058665 4.41065493,12.058665 4.17599497,11.824005 C3.94133501,11.5893451 3.94133501,11.2088861 4.17599497,10.9742261 L7.1502211,8 L4.17599497,5.02577387 C3.94133501,4.7911139 3.94133501,4.41065493 4.17599497,4.17599497 C4.41065493,3.94133501 4.7911139,3.94133501 5.02577387,4.17599497 L8,7.1502211 L10.9742261,4.17599497 C11.2088861,3.94133501 11.5893451,3.94133501 11.824005,4.17599497 C12.058665,4.41065493 12.058665,4.7911139 11.824005,5.02577387 L8.8497789,8 Z",id:"Path",fill:"#cccccc"})))}},3810:function(e,t,n){"use strict";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.Toast=void 0;var i=n(4522),a=n(8200),s=n(5753),l=n(1569),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isShown:!0},t._onClick=function(e){t.props.onClick(),t._onClose(e)},t._onClose=function(e){e.stopPropagation(),t.setState({isShown:!1}),t.props.onClose(t.props.id)},t}return r(t,e),t.prototype._getToastSeverityClass=function(){switch(this.props.severity){case s.ToastSeverity.Success:return a.successToast;case s.ToastSeverity.Warn:return a.warnToast;case s.ToastSeverity.Error:return a.errorToast;default:return a.infoToast}},t.prototype.render=function(){var e=this.props,t=e.text,n=e.title,o=e.icon;return(0,i.h)("div",{className:a.toastWrapper+" "+this._getToastSeverityClass(),onClick:this._onClick},(0,i.h)("button",{className:a.closeButton,onClick:this._onClose},(0,i.h)(l.CloseIcon,null)),(0,i.h)("div",{className:a.title},n),(0,i.h)("div",{className:a.toastBody},(0,i.h)("div",{className:a.iconContainer},(0,i.h)("div",{className:a.iconWrapper},o)),(0,i.h)("div",{className:a.text},t)))},t}(i.Component);t.Toast=c},4617:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToastsContainer=void 0;var o=n(7371);Object.defineProperty(t,"ToastsContainer",{enumerable:!0,get:function(){return o.ToastsContainer}})},7371:function(e,t,n){"use strict";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.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ToastsContainer=void 0;var a=n(4522),s=n(3810),l=n(5207),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return(0,a.h)("div",{className:l.toastsContainer,"aria-live":"polite"},this.props.toasts.map((function(e){return(0,a.h)("div",{className:l.toastRow,key:e.id},(0,a.h)(s.Toast,i({},e)))})))},t}(a.Component);t.ToastsContainer=c},6227:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(9873),t)},9873:function(e,t,n){"use strict";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.UIPlayerAdapter=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.componentDidMount=function(){this.props.onMount(this.props.player)},t.prototype.componentWillUnmount=function(){this.props.onUnmount(this.props.player)},t.prototype.render=function(e){return null},t.defaultProps={player:null},i([KalturaPlayer.ui.components.withPlayer],t)}(n(4522).Component);t.UIPlayerAdapter=a},4144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UUID=void 0;var n=function(){function e(){}return e.uuidV1=function(){return"".concat(Date.now(),"-").concat(Math.random())},e}();t.UUID=n},1123:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventsManager=void 0;var n=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=n},6265:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1123),t),r(n(4300),t)},4300:(e,t)=>{"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)};var n=function(){for(var e=(0,t.generateId)(),n="",o=0;o<e.length;o++){var r=e.charAt(o);n+=Number.isNaN(+r)?r.charCodeAt(0):r}return n};function o(){return"undefined"==typeof Storage?r():((e=localStorage.getItem("anonymousUserId"))||(e=r(),localStorage.setItem("anonymousUserId",e)),e);var e}function r(){return"##".concat("Guest").concat("HashSeparator").concat(n(),"##")}t.getUserId=o,t.getQnaUserId=function(e){var t,n,r,i,a=e,s=a.config,l=a.plugins,c=(null==s?void 0:s.session)||{},u=(null===(n=null===(t=null==l?void 0:l.qna)||void 0===t?void 0:t.config)||void 0===n?void 0:n.userRole)||c.userRole;return u&&"anonymousRole"!==u?(null===(i=null===(r=null==l?void 0:l.qna)||void 0===r?void 0:r.config)||void 0===i?void 0:i.userId)||c.userId:o()},t.debounce=function(e,t,n){var o;return void 0===t&&(t=50),void 0===n&&(n={isImmediate:!1}),function(){for(var r=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout((function(){o=void 0,n.isImmediate||e.apply(r,i)}),t),s&&e.apply(this,i)}}},42:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},5630:(e,t,n)=>{"use strict";n.d(t,{H1:()=>h,IV:()=>f,JU:()=>c,LI:()=>s,T$:()=>l,Ts:()=>A,ZP:()=>v,bH:()=>C,h:()=>u,oB:()=>p,oL:()=>d,yG:()=>_});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".Button__button___NM3Vl{display:flex;justify-content:center;align-items:center;flex-wrap:nowrap;font-weight:700;border:1px solid rgba(0,0,0,0);border-radius:4px;cursor:pointer}.Button__button___NM3Vl.Button__primary___vkWyL{background-color:var(--playkit-primary-color);color:var(--playkit-primary-text-contrast-color)}.Button__button___NM3Vl.Button__primary___vkWyL:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-primary-darker-color)}.Button__button___NM3Vl.Button__primary___vkWyL:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-primary-brighter-color)}.Button__button___NM3Vl.Button__danger___lCKPq{background-color:var(--playkit-danger-color);color:var(--playkit-danger-text-contrast-color)}.Button__button___NM3Vl.Button__danger___lCKPq:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-danger-darker-color)}.Button__button___NM3Vl.Button__danger___lCKPq:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-danger-brighter-color)}.Button__button___NM3Vl.Button__translucent___nSc5h{background-color:rgba(0,0,0,.6);color:var(--playkit-primary-text-contrast-color)}.Button__button___NM3Vl.Button__borderless___sov7o{background-color:rgba(0,0,0,0);color:var(--playkit-tone-1-color)}.Button__button___NM3Vl.Button__borderless___sov7o:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-tone-4-color)}.Button__button___NM3Vl.Button__borderless___sov7o:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-tone-6-color)}.Button__button___NM3Vl.Button__small____SSTu{height:24px;font-size:13px;line-height:16px;padding:0 4px}.Button__button___NM3Vl.Button__small____SSTu.Button__withIcon___c3vxV{padding-right:8px}.Button__button___NM3Vl.Button__small____SSTu.Button__withIcon___c3vxV>span{margin-left:2px}.Button__button___NM3Vl.Button__small____SSTu.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__medium___psqY1{height:32px;font-size:14px;line-height:17px;padding:0 8px}.Button__button___NM3Vl.Button__medium___psqY1.Button__withIcon___c3vxV{padding-right:12px}.Button__button___NM3Vl.Button__medium___psqY1.Button__withIcon___c3vxV>span{margin-left:4px}.Button__button___NM3Vl.Button__medium___psqY1.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__large___ftsNW{height:40px;font-size:16px;line-height:19px;padding:0 16px}.Button__button___NM3Vl.Button__large___ftsNW.Button__withIcon___c3vxV{padding-left:12px}.Button__button___NM3Vl.Button__large___ftsNW.Button__withIcon___c3vxV>span{margin-left:4px}.Button__button___NM3Vl.Button__large___ftsNW.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__disabled___j4KjS{background-color:rgba(0,0,0,0);color:var(--playkit-tone-4-color);border-color:var(--playkit-tone-4-color);cursor:default}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/components/button/Button.scss","webpack://./../node_modules/@playkit-js/common/dist/components/variables.scss","webpack://./../node_modules/@playkit-js/common/node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAGA,wBACE,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,8BAAA,CACA,iBCPY,CDQZ,cAAA,CACA,gDACE,6CEVY,CFWZ,gDER0B,CFUxB,qFACE,oDEbe,CFejB,qFACE,sDEfiB,CFmBvB,+CACE,4CENW,CFOX,+CEJyB,CFMvB,oFACE,mDETc,CFWhB,oFACE,qDEXgB,CFetB,oDACE,+BAAA,CACA,gDEhC0B,CFkC5B,mDACE,8BAAA,CACA,iCEZW,CFcT,wFACE,4CEZO,CFcT,wFACE,4CEbO,CFiBb,8CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,uEACE,iBAAA,CACA,4EACE,eAAA,CAGJ,uEACE,aAAA,CAGJ,+CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,wEACE,kBAAA,CACA,6EACE,eAAA,CAGJ,wEACE,aAAA,CAGJ,8CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,cAAA,CACA,uEACE,iBAAA,CACA,4EACE,eAAA,CAGJ,uEACE,aAAA,CAGJ,iDACE,8BAAA,CACA,iCElEW,CFmEX,wCEnEW,CFoEX,cAAA",sourcesContent:["@import '../variables.scss';\n\n// https://www.figma.com/file/GYMv1jsthckOnKmCrdQJY3/%E2%8F%AF-Player-v7-(Guidelines)?node-id=21%3A1943&t=ywdMo875C6kzd7pN-0\n.button {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-wrap: nowrap;\n  font-weight: 700;\n  border: 1px solid transparent;\n  border-radius: $roundness-1;\n  cursor: pointer;\n  &.primary {\n    background-color: $primary-color;\n    color: $primary-text-contrast-color;\n    &:not(.disabled) {\n      &:hover {\n        background-color: $primary-darker-color;\n      }\n      &:focus {\n        background-color: $primary-brighter-color;\n      }\n    }\n  }\n  &.danger {\n    background-color: $danger-color;\n    color: $danger-text-contrast-color;\n    &:not(.disabled) {\n      &:hover {\n        background-color: $danger-darker-color;\n      }\n      &:focus {\n        background-color: $danger-brighter-color;\n      }\n    }\n  }\n  &.translucent {\n    background-color: rgba(0, 0, 0, 0.6);\n    color: $primary-text-contrast-color;\n  }\n  &.borderless {\n    background-color: transparent;\n    color: $tone-1-color;\n    &:not(.disabled) {\n      &:hover {\n        background-color: $tone-4-color;\n      }\n      &:focus {\n        background-color: $tone-6-color;\n      }\n    }\n  }\n  &.small {\n    height: 24px;\n    font-size: 13px;\n    line-height: 16px;\n    padding: 0 4px;\n    &.withIcon {\n      padding-right: 8px;\n      > span {\n        margin-left: 2px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.medium {\n    height: 32px;\n    font-size: 14px;\n    line-height: 17px;\n    padding: 0 8px;\n    &.withIcon {\n      padding-right: 12px;\n      > span {\n        margin-left: 4px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.large {\n    height: 40px;\n    font-size: 16px;\n    line-height: 19px;\n    padding: 0 16px;\n    &.withIcon {\n      padding-left: 12px;\n      > span {\n        margin-left: 4px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.disabled {\n    background-color: transparent;\n    color: $tone-4-color;\n    border-color: $tone-4-color;\n    cursor: default;\n  }\n}\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n// colors\n$white: #ffffff;\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]);var s="Button__button___NM3Vl",l="Button__primary___vkWyL",c="Button__disabled___j4KjS",u="Button__danger___lCKPq",d="Button__translucent___nSc5h",p="Button__borderless___sov7o",_="Button__small____SSTu",h="Button__withIcon___c3vxV",A="Button__iconOnly___dISNi",f="Button__medium___psqY1",C="Button__large___ftsNW";const v=a},703:(e,t,n)=>{"use strict";n.d(t,{JU:()=>d,Xh:()=>u,ZP:()=>A,bB:()=>h,eX:()=>c,kz:()=>_,uN:()=>l,wc:()=>s,zF:()=>p});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".InputField__input-field-wrapper___K1QeS{display:flex;align-items:center;flex-grow:1;width:100%;max-width:599px;padding-right:8px;height:32px;border:solid 1px rgba(255,255,255,.4);border-radius:4px}.InputField__input-field-wrapper___K1QeS ::-moz-placeholder{opacity:1}.InputField__input-field-wrapper___K1QeS .InputField__search-results___PBRGr{display:flex;justify-content:flex-end;align-items:center;flex-shrink:0;margin:0 8px 0 6px;font-size:12px;text-overflow:ellipsis}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA{display:flex;flex-direction:column;justify-content:space-around;max-height:100%;height:100%;width:8px;flex:0 0 8px}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA .InputField__prev-next-button___HP7Me{display:flex;align-items:center;height:50%;padding:0;background-color:rgba(0,0,0,0);border:none;cursor:pointer}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA .InputField__prev-next-button___HP7Me.InputField__disabled___GVLcH{opacity:.4;cursor:default}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE{width:100%;flex-grow:1;flex-shrink:1;font-size:15px;padding:0 6px 1px 6px;color:var(--playkit-tone-1-color);background:rgba(0,0,0,0);border:none;overflow:hidden;text-overflow:ellipsis}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE::placeholder{color:var(--playkit-tone-2-color)}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE::selection{background-color:var(--playkit-primary-brighter-color)}.InputField__input-field-wrapper___K1QeS .InputField__clear-icon___eTi3X{padding:0;flex:0 0 12px;max-width:12px;max-height:12px;background-color:rgba(0,0,0,0);width:12px;height:12px;outline-offset:4px;border:none;cursor:pointer}.InputField__input-field-wrapper___K1QeS:hover{border-color:#fff}.InputField__input-field-wrapper___K1QeS.InputField__active____D1qS{color:var(--playkit-tone-2-color);background:var(--playkit-tone-8-color);border-color:#fff}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/components/input-field/InputField.scss","webpack://./../node_modules/@playkit-js/common/dist/components/variables.scss","webpack://./../node_modules/@playkit-js/common/node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,yCAKE,YAAA,CACA,kBAAA,CACA,WAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,WAAA,CACA,qCAAA,CACA,iBCZY,CAAA,4DDCV,SAAA,CAYF,6EACE,YAAA,CACA,wBAAA,CACA,kBAAA,CACA,aAAA,CACA,kBAAA,CACA,cAAA,CACA,sBAAA,CAEF,gFACE,YAAA,CACA,qBAAA,CACA,4BAAA,CACA,eAAA,CACA,WAAA,CACA,SAAA,CACA,YAAA,CACA,sHACE,YAAA,CACA,kBAAA,CACA,UAAA,CACA,SAAA,CACA,8BAAA,CACA,WAAA,CACA,cAAA,CACA,mJACE,UAAA,CACA,cAAA,CAIN,4EACE,UAAA,CACA,WAAA,CACA,aAAA,CACA,cAAA,CACA,qBAAA,CACA,iCEvBW,CFwBX,wBAAA,CACA,WAAA,CACA,eAAA,CACA,sBAAA,CACA,yFACE,iCE5BS,CF8BX,uFACE,sDEzDmB,CF4DvB,yEACE,SAAA,CACA,aAAA,CACA,cAAA,CACA,eAAA,CACA,8BAAA,CACA,UAAA,CACA,WAAA,CACA,kBAAA,CACA,WAAA,CACA,cAAA,CAEF,+CACE,iBCvEI,CDyEN,oEACE,iCElDW,CFmDX,sCE7CW,CF8CX,iBC5EI",sourcesContent:["@import '../variables.scss';\n\n.input-field-wrapper {\n  ::-moz-placeholder {\n    opacity: 1;\n  }\n\n  display: flex;\n  align-items: center;\n  flex-grow: 1;\n  width: 100%;\n  max-width: 599px;\n  padding-right: 8px;\n  height: 32px;\n  border: solid 1px rgba(255, 255, 255, 0.4);\n  border-radius: $roundness-1;\n  .search-results {\n    display: flex;\n    justify-content: flex-end;\n    align-items: center;\n    flex-shrink: 0;\n    margin: 0 8px 0 6px;\n    font-size: 12px;\n    text-overflow: ellipsis;\n  }\n  .prev-next-wrapper {\n    display: flex;\n    flex-direction: column;\n    justify-content: space-around;\n    max-height: 100%;\n    height: 100%;\n    width: 8px;\n    flex: 0 0 8px;\n    .prev-next-button {\n      display: flex;\n      align-items: center;\n      height: 50%;\n      padding: 0;\n      background-color: transparent;\n      border: none;\n      cursor: pointer;\n      &.disabled {\n        opacity: 0.4;\n        cursor: default;\n      }\n    }\n  }\n  .input-element {\n    width: 100%;\n    flex-grow: 1;\n    flex-shrink: 1;\n    font-size: 15px;\n    padding: 0 6px 1px 6px;\n    color: $tone-1-color;\n    background: transparent;\n    border: none;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    &::placeholder {\n      color: $tone-2-color;\n    }\n    &::selection {\n      background-color: $primary-brighter-color;\n    }\n  }\n  .clear-icon {\n    padding: 0;\n    flex: 0 0 12px;\n    max-width: 12px;\n    max-height: 12px;\n    background-color: transparent;\n    width: 12px;\n    height: 12px;\n    outline-offset: 4px;\n    border: none;\n    cursor: pointer;\n  }\n  &:hover {\n    border-color: $white;\n  }\n  &.active {\n    color: $tone-2-color;\n    background: $tone-8-color;\n    border-color: $white;\n  }\n}\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n// colors\n$white: #ffffff;\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]);var s="InputField__input-field-wrapper___K1QeS",l="InputField__search-results___PBRGr",c="InputField__prev-next-wrapper___zAxBA",u="InputField__prev-next-button___HP7Me",d="InputField__disabled___GVLcH",p="InputField__input-element___BAphE",_="InputField__clear-icon___eTi3X",h="InputField__active____D1qS";const A=a},273:(e,t,n)=>{"use strict";n.d(t,{P:()=>s,Z:()=>l});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".sr-wrapper__sr-wrapper___GwVLr{position:absolute;height:1px;width:1px;overflow:hidden;padding:0;margin:-1px;border:0}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/hoc/sr-wrapper/sr-wrapper.scss"],names:[],mappings:"AAAA,gCACE,iBAAA,CACA,UAAA,CACA,SAAA,CACA,eAAA,CACA,SAAA,CACA,WAAA,CACA,QAAA",sourcesContent:[".sr-wrapper {\n  position: absolute;\n  height: 1px;\n  width: 1px;\n  overflow: hidden;\n  padding: 0;\n  margin: -1px;\n  border: 0;\n}"],sourceRoot:""}]);var s="sr-wrapper__sr-wrapper___GwVLr";const l=a},7001:(e,t,n)=>{"use strict";n.d(t,{IV:()=>c,ZP:()=>d,aW:()=>s,bH:()=>u,yG:()=>l});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".icon__iconWrapper___O5uqn.icon__small___IddLg{width:16px;height:16px}.icon__iconWrapper___O5uqn.icon__medium___llFxB{width:24px;height:24px}.icon__iconWrapper___O5uqn.icon__large___Q96VN{width:32px;height:32px}.icon__iconWrapper___O5uqn>svg{width:100%;height:100%}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/icon/icon.scss"],names:[],mappings:"AACE,+CACE,UAAA,CACA,WAAA,CAEF,gDACE,UAAA,CACA,WAAA,CAEF,+CACE,UAAA,CACA,WAAA,CAEF,+BACE,UAAA,CACA,WAAA",sourcesContent:[".iconWrapper {\n  &.small {\n    width: 16px;\n    height: 16px;\n  }\n  &.medium {\n    width: 24px;\n    height: 24px;\n  }\n  &.large {\n    width: 32px;\n    height: 32px;\n  }\n  > svg {\n    width: 100%;\n    height: 100%;\n  }\n}\n"],sourceRoot:""}]);var s="icon__iconWrapper___O5uqn",l="icon__small___IddLg",c="icon__medium___llFxB",u="icon__large___Q96VN";const d=a},1006:(e,t,n)=>{"use strict";n.d(t,{Ah:()=>c,Cg:()=>l,ZP:()=>p,bH:()=>d,ce:()=>s,yG:()=>u});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._banner-container__bannerContainerRoot___xakgR{position:absolute;max-width:100%;min-width:270px;padding:0 16px 8px;height:88px;bottom:0;left:0;transition:all .5s ease}._banner-container__bannerContainer___Qm02i{position:relative;width:100%;height:100%;border-radius:4px;transition:all .5s ease}._banner-container__closeButton___WVWto{position:absolute;background-color:rgba(0,0,0,0);padding:0;border:none;top:0;right:0;width:32px;height:32px;padding:0}._banner-container__closeButton___WVWto ._banner-container__small___Tgp11{display:none}._banner-container__closeButton___WVWto:hover,._banner-container__closeButton___WVWto:active{cursor:pointer}.playkit-size-md ._banner-container__bannerContainerRoot___xakgR{height:68px;min-width:230px}.playkit-size-md ._banner-container__closeButton___WVWto{top:8px;right:8px;width:10px;height:10px}.playkit-size-md ._banner-container__closeButton___WVWto ._banner-container__large___aw4QR{display:none}.playkit-size-md ._banner-container__closeButton___WVWto ._banner-container__small___Tgp11{display:block}.playkit-size-sm ._banner-container__bannerContainerRoot___xakgR,.playkit-size-xs ._banner-container__bannerContainerRoot___xakgR,.playkit-size-ty ._banner-container__bannerContainerRoot___xakgR{display:none;width:0;height:0}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/banner-container/_banner-container.scss"],names:[],mappings:"AAAA,gDACE,iBAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,WAAA,CACA,QAAA,CACA,MAAA,CACA,uBAAA,CAGF,4CACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,uBAAA,CAGF,wCACE,iBAAA,CACA,8BAAA,CACA,SAAA,CACA,WAAA,CACA,KAAA,CACA,OAAA,CACA,UAAA,CACA,WAAA,CACA,SAAA,CACA,0EACE,YAAA,CAIJ,6FAEE,cAAA,CAMI,iEACE,WAAA,CACA,eAAA,CAEF,yDACE,OAAA,CACA,SAAA,CACA,UAAA,CACA,WAAA,CACA,2FACE,YAAA,CAEF,2FACE,aAAA,CAWN,mMACE,YAAA,CACA,OAAA,CACA,QAAA",sourcesContent:[".bannerContainerRoot {\n  position: absolute;\n  max-width: 100%;\n  min-width: 270px;\n  padding: 0 16px 8px;\n  height: 88px;\n  bottom: 0;\n  left: 0;\n  transition: all 0.5s ease;\n}\n\n.bannerContainer {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  border-radius: 4px;\n  transition: all 0.5s ease;\n}\n\n.closeButton {\n  position: absolute;\n  background-color: transparent;\n  padding: 0;\n  border: none;\n  top: 0;\n  right: 0;\n  width: 32px;\n  height: 32px;\n  padding: 0;\n  .small {\n    display: none;\n  }\n}\n\n.closeButton:hover,\n.closeButton:active {\n  cursor: pointer;\n}\n\n:global {\n  .playkit-size-md {\n    :local {\n      .bannerContainerRoot {\n        height: 68px;\n        min-width: 230px;\n      }\n      .closeButton {\n        top: 8px;\n        right: 8px;\n        width: 10px;\n        height: 10px;\n        .large {\n          display: none;\n        }\n        .small {\n          display: block;\n        }\n      }\n    }\n  }\n}\n\n:global {\n  .playkit-size-sm,\n  .playkit-size-xs,\n  .playkit-size-ty {\n    :local .bannerContainerRoot {\n      display: none;\n      width: 0;\n      height: 0;\n    }\n  }\n}\n"],sourceRoot:""}]);var s="_banner-container__bannerContainerRoot___xakgR",l="_banner-container__bannerContainer___Qm02i",c="_banner-container__closeButton___WVWto",u="_banner-container__small___Tgp11",d="_banner-container__large___aw4QR";const p=a},3297:(e,t,n)=>{"use strict";n.d(t,{Fu:()=>c,TN:()=>h,Wd:()=>l,ZP:()=>C,aW:()=>u,bH:()=>f,cy:()=>d,d7:()=>_,fL:()=>A,m0:()=>s,yG:()=>p});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._banner__defaultBannerRoot___NepFO{display:flex;max-width:100%;height:100%;transition:all .5s ease;text-align:left}._banner__bannerWrapper___Rs8hK{padding:18px 17px 17px 16px}._banner__iconContainer___wyKRN{height:100%;width:64px}._banner__iconWrapper___duGbT{position:relative;height:48px;width:48px;background-color:rgba(255,255,255,.14);border-radius:50%;transition:all .5s ease}._banner__iconImage___I0LAA{position:absolute;width:32px;height:32px;left:calc(50% - 16px);top:calc(50% - 16px);transition:all .5s ease;padding:0}._banner__iconImage___I0LAA ._banner__small___mrxMV{display:none}._banner__bannerBody___ISEP1{height:100%;flex:1 1 auto;overflow:hidden}._banner__title___LCkfF{opacity:.9;font-size:14px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1;letter-spacing:normal;color:#ebebeb}._banner__text___UyS4n{opacity:.9;font-size:24px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.21;letter-spacing:normal;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .5s ease}.playkit-size-md ._banner__bannerWrapper___Rs8hK{padding:14px 16px 14px}.playkit-size-md ._banner__iconContainer___wyKRN{width:44px}.playkit-size-md ._banner__iconWrapper___duGbT{height:32px;width:32px}.playkit-size-md ._banner__iconImage___I0LAA{width:20px;height:20px;left:calc(50% - 10px);top:calc(50% - 10px)}.playkit-size-md ._banner__iconImage___I0LAA ._banner__small___mrxMV{display:block}.playkit-size-md ._banner__iconImage___I0LAA ._banner__large___q5r6u{display:none}.playkit-size-md ._banner__bannerBody___ISEP1{flex:1 1 auto}.playkit-size-md ._banner__title___LCkfF{font-size:12px;font-weight:bold;line-height:1.17}.playkit-size-md ._banner__text___UyS4n{font-size:15px;line-height:1.27}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/banner/_banner.scss"],names:[],mappings:"AAAA,oCACE,YAAA,CACA,cAAA,CACA,WAAA,CACA,uBAAA,CACA,eAAA,CAGF,gCACE,2BAAA,CAGF,gCACE,WAAA,CACA,UAAA,CAGF,8BACE,iBAAA,CACA,WAAA,CACA,UAAA,CACA,sCAAA,CACA,iBAAA,CACA,uBAAA,CAGF,4BACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CACA,oBAAA,CACA,uBAAA,CACA,SAAA,CACA,oDACE,YAAA,CAIJ,6BACE,WAAA,CACA,aAAA,CACA,eAAA,CAGF,wBACE,UAAA,CACA,cAAA,CACA,kBAAA,CACA,iBAAA,CACA,mBAAA,CACA,aAAA,CACA,qBAAA,CACA,aAAA,CAGF,uBACE,UAAA,CACA,cAAA,CACA,kBAAA,CACA,iBAAA,CACA,mBAAA,CACA,gBAAA,CACA,qBAAA,CACA,UAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,uBAAA,CAMI,iDACE,sBAAA,CAEF,iDACE,UAAA,CAEF,+CACE,WAAA,CACA,UAAA,CAEF,6CACE,UAAA,CACA,WAAA,CACA,qBAAA,CACA,oBAAA,CACA,qEACE,aAAA,CAEF,qEACE,YAAA,CAGJ,8CACE,aAAA,CAEF,yCACE,cAAA,CACA,gBAAA,CACA,gBAAA,CAEF,wCACE,cAAA,CACA,gBAAA",sourcesContent:[".defaultBannerRoot {\n  display: flex;\n  max-width: 100%;\n  height: 100%;\n  transition: all 0.5s ease;\n  text-align: left;\n}\n\n.bannerWrapper {\n  padding: 18px 17px 17px 16px;\n}\n\n.iconContainer {\n  height: 100%;\n  width: 64px;\n}\n\n.iconWrapper {\n  position: relative;\n  height: 48px;\n  width: 48px;\n  background-color: rgba(255, 255, 255, 0.14);\n  border-radius: 50%;\n  transition: all 0.5s ease;\n}\n\n.iconImage {\n  position: absolute;\n  width: 32px;\n  height: 32px;\n  left: calc(50% - 16px);\n  top: calc(50% - 16px);\n  transition: all 0.5s ease;\n  padding: 0;\n  .small {\n    display: none;\n  }\n}\n\n.bannerBody {\n  height: 100%;\n  flex: 1 1 auto;\n  overflow: hidden;\n}\n\n.title {\n  opacity: 0.9;\n  font-size: 14px;\n  font-weight: normal;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: 1;\n  letter-spacing: normal;\n  color: #ebebeb;\n}\n\n.text {\n  opacity: 0.9;\n  font-size: 24px;\n  font-weight: normal;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: 1.21;\n  letter-spacing: normal;\n  color: #ffffff;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  transition: all 0.5s ease;\n}\n\n:global {\n  .playkit-size-md {\n    :local {\n      .bannerWrapper {\n        padding: 14px 16px 14px;\n      }\n      .iconContainer {\n        width: 44px;\n      }\n      .iconWrapper {\n        height: 32px;\n        width: 32px;\n      }\n      .iconImage {\n        width: 20px;\n        height: 20px;\n        left: calc(50% - 10px);\n        top: calc(50% - 10px);\n        .small {\n          display: block;\n        }\n        .large {\n          display: none;\n        }\n      }\n      .bannerBody {\n        flex: 1 1 auto;\n      }\n      .title {\n        font-size: 12px;\n        font-weight: bold;\n        line-height: 1.17;\n      }\n      .text {\n        font-size: 15px;\n        line-height: 1.27;\n      }\n    }\n  }\n}\n"],sourceRoot:""}]);var s="_banner__defaultBannerRoot___NepFO",l="_banner__bannerWrapper___Rs8hK",c="_banner__iconContainer___wyKRN",u="_banner__iconWrapper___duGbT",d="_banner__iconImage___I0LAA",p="_banner__small___mrxMV",_="_banner__bannerBody___ISEP1",h="_banner__title___LCkfF",A="_banner__text___UyS4n",f="_banner__large___q5r6u";const C=a},8215:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,Z:()=>l});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".injected-component__fill-container___mNczr{width:100%;height:100%;overflow:hidden}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/injected-component/injected-component.scss"],names:[],mappings:"AAAA,4CACE,UAAA,CACA,WAAA,CACA,eAAA",sourcesContent:[".fill-container {\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n}\n"],sourceRoot:""}]);var s="injected-component__fill-container___mNczr";const l=a},200:(e,t,n)=>{"use strict";n.d(t,{V:()=>s,Z:()=>l});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._managed-component__fill-container___BZ9jB{width:100%;height:100%}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/managed-component/_managed-component.scss"],names:[],mappings:"AAAA,4CACE,UAAA,CACA,WAAA",sourcesContent:[".fill-container {\n  width: 100%;\n  height: 100%;\n}\n"],sourceRoot:""}]);var s="_managed-component__fill-container___BZ9jB";const l=a},6398:(e,t,n)=>{"use strict";n.d(t,{Ah:()=>p,Fu:()=>A,GK:()=>s,Jc:()=>d,Qm:()=>c,Rr:()=>l,TN:()=>_,X$:()=>h,ZP:()=>v,aW:()=>f,fL:()=>C,x_:()=>u});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._toast__toastWrapper___WvdiK{position:relative;min-width:120px;max-width:310px;height:100%;border-radius:4px;background-color:#222;border-left-style:solid;border-left-width:4px;text-align:left}._toast__infoToast___GSdk1{border-left-color:#01accd}._toast__successToast___dyb3J{border-left-color:#009e48}._toast__warnToast___vCnBw{border-left-color:#f9a71b}._toast__errorToast___GAr1R{border-left-color:#e7585d}._toast__closeButton___kXqZM{position:absolute;background-color:rgba(0,0,0,0);top:0;right:0;width:16px;height:16px;object-fit:contain;background-repeat:no-repeat;border:none;padding:0}._toast__closeButton___kXqZM:hover{cursor:pointer}._toast__title___aQCgz{font-size:12px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.17;letter-spacing:normal;color:#ccc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:4px;padding-right:16px;padding-left:12px}._toast__toastBody___aP3ij{position:relative;width:100%;padding:2px 16px 5px 12px}._toast__iconContainer___S5hMD{position:relative;height:16px;width:16px;float:left;margin-right:7px}._toast__iconWrapper___kqam1{height:16px;width:16px}._toast__text___EdqX7{font-size:14px;font-weight:bold;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#ccc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/toast/_toast.scss"],names:[],mappings:"AAAA,8BACE,iBAAA,CACA,eAAA,CACA,eAAA,CACA,WAAA,CACA,iBAAA,CACA,qBAAA,CACA,uBAAA,CACA,qBAAA,CACA,eAAA,CAGF,2BACE,yBAAA,CAGF,8BACE,yBAAA,CAGF,2BACE,yBAAA,CAGF,4BACE,yBAAA,CAGF,6BACE,iBAAA,CACA,8BAAA,CACA,KAAA,CACA,OAAA,CACA,UAAA,CACA,WAAA,CACA,kBAAA,CACA,2BAAA,CACA,WAAA,CACA,SAAA,CAEA,mCACE,cAAA,CAIJ,uBACE,cAAA,CACA,kBAAA,CACA,iBAAA,CACA,mBAAA,CACA,gBAAA,CACA,qBAAA,CACA,UAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,eAAA,CACA,kBAAA,CACA,iBAAA,CAGF,2BACE,iBAAA,CACA,UAAA,CACA,yBAAA,CAGF,+BACE,iBAAA,CACA,WAAA,CACA,UAAA,CACA,UAAA,CACA,gBAAA,CAGF,6BACE,WAAA,CACA,UAAA,CAGF,sBACE,cAAA,CACA,gBAAA,CACA,iBAAA,CACA,mBAAA,CACA,kBAAA,CACA,qBAAA,CACA,UAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA",sourcesContent:[".toastWrapper {\n  position: relative;\n  min-width: 120px;\n  max-width: 310px;\n  height: 100%;\n  border-radius: 4px;\n  background-color: #222222;\n  border-left-style: solid;\n  border-left-width: 4px;\n  text-align: left;\n}\n\n.infoToast {\n  border-left-color: #01ACCD;\n}\n\n.successToast {\n  border-left-color: #009E48;\n}\n\n.warnToast {\n  border-left-color: #F9A71B;\n}\n\n.errorToast {\n  border-left-color: #E7585D;\n}\n\n.closeButton {\n  position: absolute;\n  background-color: transparent;\n  top: 0;\n  right: 0;\n  width: 16px;\n  height: 16px;\n  object-fit: contain;\n  background-repeat: no-repeat;\n  border: none;\n  padding: 0;\n\n  &:hover {\n    cursor: pointer;\n  }\n}\n\n.title {\n  font-size: 12px;\n  font-weight: normal;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: 1.17;\n  letter-spacing: normal;\n  color: #cccccc;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding-top: 4px;\n  padding-right: 16px;\n  padding-left: 12px;\n}\n\n.toastBody {\n  position: relative;\n  width: 100%;\n  padding: 2px 16px 5px 12px;\n}\n\n.iconContainer {\n  position: relative;\n  height: 16px;\n  width: 16px;\n  float: left;\n  margin-right: 7px;\n}\n\n.iconWrapper {\n  height: 16px;\n  width: 16px;\n}\n\n.text {\n  font-size: 14px;\n  font-weight: bold;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: normal;\n  letter-spacing: normal;\n  color: #cccccc;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n\n"],sourceRoot:""}]);var s="_toast__toastWrapper___WvdiK",l="_toast__infoToast___GSdk1",c="_toast__successToast___dyb3J",u="_toast__warnToast___vCnBw",d="_toast__errorToast___GAr1R",p="_toast__closeButton___kXqZM",_="_toast__title___aQCgz",h="_toast__toastBody___aP3ij",A="_toast__iconContainer___S5hMD",f="_toast__iconWrapper___kqam1",C="_toast__text___EdqX7";const v=a},696:(e,t,n)=>{"use strict";n.d(t,{Q$:()=>s,YY:()=>l,ZP:()=>c});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._toasts-container__toastsContainer___ep0ad{position:absolute;right:0;top:0;padding:8px 16px 0;min-width:120px;max-width:310px;display:flex;flex-direction:column}._toasts-container__toastRow___J1NQa{height:42px;min-width:120px;max-width:310px;margin-bottom:8px;overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis;align-self:flex-end}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/toasts-container/_toasts-container.scss"],names:[],mappings:"AAAA,4CACE,iBAAA,CACA,OAAA,CACA,KAAA,CACA,kBAAA,CACA,eAAA,CACA,eAAA,CACA,YAAA,CACA,qBAAA,CAGF,qCACE,WAAA,CACA,eAAA,CACA,eAAA,CACA,iBAAA,CACA,eAAA,CACA,wBAAA,CACA,sBAAA,CACA,mBAAA",sourcesContent:[".toastsContainer {\n  position: absolute;\n  right: 0;\n  top: 0;\n  padding: 8px 16px 0;\n  min-width: 120px;\n  max-width: 310px;\n  display: flex;\n  flex-direction: column;\n}\n\n.toastRow {\n  height: 42px;\n  min-width: 120px;\n  max-width: 310px;\n  margin-bottom: 8px;\n  overflow: hidden;\n  overflow-wrap: break-word;\n  text-overflow: ellipsis;\n  align-self: flex-end;\n}\n"],sourceRoot:""}]);var s="_toasts-container__toastsContainer___ep0ad",l="_toasts-container__toastRow___J1NQa";const c=a},8453:(e,t,n)=>{"use strict";n.d(t,{O2:()=>s,ZP:()=>c,uU:()=>l});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".attachments-list__attachments-container___mar6d{width:100%;overflow:hidden;padding:4px}.attachments-list__attachments-container___mar6d .attachments-list__attachments-label___zhjD3{display:inline-block;font-size:16px;color:#fff;font-weight:700;line-height:21px;width:fit-content;margin-bottom:8px}","",{version:3,sources:["webpack://./components/attachments-list/attachments-list.scss"],names:[],mappings:"AAAA,iDACE,UAAA,CACA,eAAA,CACA,WAAA,CAEA,8FACE,oBAAA,CACA,cAAA,CACA,UAAA,CACA,eAAA,CACA,gBAAA,CACA,iBAAA,CACA,iBAAA",sourcesContent:[".attachments-container {\n  width: 100%;\n  overflow: hidden;\n  padding: 4px;\n\n  .attachments-label {\n    display: inline-block;\n    font-size: 16px;\n    color: white;\n    font-weight: 700;\n    line-height: 21px;\n    width: fit-content;\n    margin-bottom: 8px;\n  }\n}"],sourceRoot:""}]);var s="attachments-list__attachments-container___mar6d",l="attachments-list__attachments-label___zhjD3";const c=a},534:(e,t,n)=>{"use strict";n.d(t,{Z:()=>l,x:()=>s});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".captions-list__captions-container___oQ3JI{width:100%;overflow:hidden;padding:4px}","",{version:3,sources:["webpack://./components/captions-list/captions-list.scss"],names:[],mappings:"AAAA,2CACE,UAAA,CACA,eAAA,CACA,WAAA",sourcesContent:[".captions-container {\n  width: 100%;\n  overflow: hidden;\n  padding: 4px;\n}"],sourceRoot:""}]);var s="captions-list__captions-container___oQ3JI";const l=a},3478:(e,t,n)=>{"use strict";n.d(t,{E9:()=>s,Fu:()=>l,Rb:()=>c,WC:()=>_,ZP:()=>h,aL:()=>u,gE:()=>d,j:()=>p});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".download-item__file-info___hm56H{background-color:rgba(255,255,255,.12);border-radius:4px;display:flex;font-size:14px;margin:auto;position:relative;width:100%;cursor:pointer;margin-bottom:16px}.download-item__file-info___hm56H .download-item__icon-container___ClrQi{display:flex;flex-direction:column;justify-content:center}.download-item__file-info___hm56H .download-item__icon-container___ClrQi.download-item__file-icon___YNiVk{background-color:#444;border-radius:4px 0 0 4px;padding:12px}.download-item__file-info___hm56H .download-item__icon-container___ClrQi.download-item__file-icon___YNiVk i{height:24px;width:24px}.download-item__file-info___hm56H .download-item__icon-container___ClrQi.download-item__download-icon___h9D1D{margin-right:16px;margin-left:auto}.download-item__file-info___hm56H .download-item__file-info-text-container___ULENC{display:flex;flex-direction:column;justify-content:center;max-width:calc(100% - 110px);margin-left:16px;font-size:14px}.download-item__file-info___hm56H .download-item__file-info-text-container___ULENC .download-item__file-info-text___Do93g{-webkit-line-clamp:1;margin-bottom:4px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--playkit-tone-1-color);font-weight:700}.download-item__file-info___hm56H .download-item__file-info-text-container___ULENC .download-item__file-description-text___ESLOY{color:var(--playkit-tone-2-color);font-weight:400}","",{version:3,sources:["webpack://./components/download-item/download-item.scss","webpack://./theme.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,kCACE,sCAAA,CACA,iBCDY,CDEZ,YAAA,CACA,cAAA,CACA,WAAA,CACA,iBAAA,CACA,UAAA,CACA,cAAA,CACA,kBAAA,CAEA,yEACE,YAAA,CACA,qBAAA,CACA,sBAAA,CAEA,0GACE,qBAAA,CACA,yBAAA,CACA,YAAA,CAEA,4GACE,WAAA,CACA,UAAA,CAIJ,8GACE,iBAAA,CACA,gBAAA,CAIJ,mFACE,YAAA,CACA,qBAAA,CACA,sBAAA,CACA,4BAAA,CACA,gBAAA,CACA,cAAA,CAEA,0HACE,oBAAA,CACA,iBAAA,CACA,cAAA,CACA,eAAA,CACA,sBAAA,CACA,kBAAA,CACA,iCEpBS,CFqBT,eAAA,CAGF,iIACE,iCExBS,CFyBT,eAAA",sourcesContent:["@import '../../theme.scss';\n\n.file-info {\n  background-color: rgba(255, 255, 255, 0.12);\n  border-radius: $roundness-1;\n  display: flex;\n  font-size: 14px;\n  margin: auto;\n  position: relative;\n  width: 100%;\n  cursor: pointer;\n  margin-bottom: 16px;\n\n  .icon-container {\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n\n    &.file-icon {\n      background-color: #444;\n      border-radius: 4px 0 0 4px;\n      padding: 12px;\n\n      i {\n        height: 24px;\n        width: 24px;\n      }\n    }\n\n    &.download-icon {\n      margin-right: 16px;\n      margin-left: auto;\n    }\n  }\n\n  .file-info-text-container {\n    display: flex;\n    flex-direction: column;\n    justify-content: center;\n    max-width: calc(100% - 110px);\n    margin-left: 16px;\n    font-size: 14px;\n\n    .file-info-text {\n      -webkit-line-clamp: 1;\n      margin-bottom: 4px;\n      max-width: 100%;\n      overflow: hidden;\n      text-overflow: ellipsis;\n      white-space: nowrap;\n      color: $tone-1-color;\n      font-weight: 700;\n    }\n\n    .file-description-text {\n      color: $tone-2-color;\n      font-weight: 400;\n    }\n  }\n}","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n@mixin download-scrollbar {\n  &::-webkit-scrollbar {\n    width: 11px;\n    visibility: hidden;\n  }\n  &::-webkit-scrollbar-thumb {\n    border-radius: $roundness-2;\n    background-color: rgba(255, 255, 255, 0.3);\n    border: 4px solid rgba(0, 0, 0, 0);\n    background-clip: padding-box;\n    visibility: hidden;\n  }\n}","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]);var s="download-item__file-info___hm56H",l="download-item__icon-container___ClrQi",c="download-item__file-icon___YNiVk",u="download-item__download-icon___h9D1D",d="download-item__file-info-text-container___ULENC",p="download-item__file-info-text___Do93g",_="download-item__file-description-text___ESLOY";const h=a},8437:(e,t,n)=>{"use strict";n.d(t,{Fs:()=>l,IV:()=>_,Y1:()=>h,ZP:()=>A,bH:()=>p,mn:()=>s,qh:()=>d,xY:()=>u,yG:()=>c});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".download-overlay__download-overlay___IThlq{-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background-color:rgba(0,0,0,.7);color:#fff;height:100%;position:absolute;width:100%;z-index:2;display:flex;flex-direction:column}.download-overlay__download-overlay___IThlq .download-overlay__header___Z6u7x{font-size:32px;font-weight:700;margin-top:48px;text-align:center}.download-overlay__download-overlay___IThlq .download-overlay__header___Z6u7x.download-overlay__small___GW05I{font-size:18px}.download-overlay__download-overlay___IThlq .download-overlay__file-info-list___riTfL{margin:auto;margin-top:25px;overflow:auto;height:100%;width:100%}.download-overlay__download-overlay___IThlq .download-overlay__file-info-list___riTfL .download-overlay__sources-captions-container___67jDe{margin-bottom:24px}.download-overlay__download-overlay___IThlq .download-overlay__file-info-list___riTfL::-webkit-scrollbar{width:11px;visibility:hidden}.download-overlay__download-overlay___IThlq .download-overlay__file-info-list___riTfL::-webkit-scrollbar-thumb{border-radius:8px;background-color:rgba(255,255,255,.3);border:4px solid rgba(0,0,0,0);background-clip:padding-box;visibility:hidden}.download-overlay__download-overlay___IThlq .download-overlay__file-info-list___riTfL:hover::-webkit-scrollbar-track,.download-overlay__download-overlay___IThlq .download-overlay__file-info-list___riTfL:hover::-webkit-scrollbar-thumb{visibility:visible}.download-overlay__download-overlay___IThlq .download-overlay__file-info-list___riTfL.download-overlay__large___DWfTB{max-width:600px}.download-overlay__download-overlay___IThlq .download-overlay__file-info-list___riTfL.download-overlay__medium___P4lmJ{max-width:calc(100% - 48px)}.download-overlay__download-overlay___IThlq .download-overlay__file-info-list___riTfL.download-overlay__small___GW05I{max-width:calc(100% - 16px)}.download-overlay__download-overlay___IThlq .download-overlay__close-button-container___nLul9{position:absolute;top:36px;right:36px}","",{version:3,sources:["webpack://./components/download-overlay/download-overlay.scss","webpack://./theme.scss"],names:[],mappings:"AAEA,4CACI,kCAAA,CACA,0BAAA,CACA,+BAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,UAAA,CACA,SAAA,CACA,YAAA,CACA,qBAAA,CAEA,8EACI,cAAA,CACA,eAAA,CACA,eAAA,CACA,iBAAA,CAEA,8GACI,cAAA,CAIR,sFACI,WAAA,CACA,eAAA,CACA,aAAA,CACA,WAAA,CACA,UAAA,CAEA,4IACI,kBAAA,CC1BV,yGACE,UAAA,CACA,iBAAA,CAEF,+GACE,iBARU,CASV,qCAAA,CACA,8BAAA,CACA,2BAAA,CACA,iBAAA,CDqBI,0OAEI,kBAAA,CAGJ,sHACI,eAAA,CAGJ,uHACI,2BAAA,CAGJ,sHACI,2BAAA,CAIR,8FACI,iBAAA,CACA,QAAA,CACA,UAAA",sourcesContent:["@import '../../theme.scss';\n\n.download-overlay {\n    -webkit-backdrop-filter: blur(16px);\n    backdrop-filter: blur(16px);\n    background-color: rgba(0, 0, 0, .7);\n    color: #fff;\n    height: 100%;\n    position: absolute;\n    width: 100%;\n    z-index: 2;\n    display: flex;\n    flex-direction: column;\n\n    .header {\n        font-size: 32px;\n        font-weight: 700;\n        margin-top: 48px;\n        text-align: center;\n\n        &.small {\n            font-size: 18px;\n        }\n    }\n\n    .file-info-list {\n        margin: auto;\n        margin-top: 25px;\n        overflow: auto;\n        height: 100%;\n        width: 100%;\n\n        .sources-captions-container {\n            margin-bottom: 24px;\n        }\n\n        @include download-scrollbar();\n        &:hover::-webkit-scrollbar-track,\n        &:hover::-webkit-scrollbar-thumb, {\n            visibility: visible;\n        }\n\n        &.large {\n            max-width: 600px;\n        }\n\n        &.medium {\n            max-width: calc(100% - 48px);\n        }\n\n        &.small {\n            max-width: calc(100% - 16px);\n        }\n    }\n\n    .close-button-container {\n        position: absolute;\n        top: 36px;\n        right: 36px;\n    }\n}","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n@mixin download-scrollbar {\n  &::-webkit-scrollbar {\n    width: 11px;\n    visibility: hidden;\n  }\n  &::-webkit-scrollbar-thumb {\n    border-radius: $roundness-2;\n    background-color: rgba(255, 255, 255, 0.3);\n    border: 4px solid rgba(0, 0, 0, 0);\n    background-clip: padding-box;\n    visibility: hidden;\n  }\n}"],sourceRoot:""}]);var s="download-overlay__download-overlay___IThlq",l="download-overlay__header___Z6u7x",c="download-overlay__small___GW05I",u="download-overlay__file-info-list___riTfL",d="download-overlay__sources-captions-container___67jDe",p="download-overlay__large___DWfTB",_="download-overlay__medium___P4lmJ",h="download-overlay__close-button-container___nLul9";const A=a},9570:(e,t,n)=>{"use strict";n.d(t,{U:()=>s,Z:()=>l});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".expandable-container__expandable-label___wzDbd{display:inline-block;font-size:14px;color:#fff;font-weight:700;cursor:pointer;width:fit-content}","",{version:3,sources:["webpack://./components/expandable-container/expandable-container.scss"],names:[],mappings:"AAAA,gDACE,oBAAA,CACA,cAAA,CACA,UAAA,CACA,eAAA,CACA,cAAA,CACA,iBAAA",sourcesContent:[".expandable-label {\n  display: inline-block;\n  font-size: 14px;\n  color: white;\n  font-weight: 700;\n  cursor: pointer;\n  width: fit-content;\n}"],sourceRoot:""}]);var s="expandable-container__expandable-label___wzDbd";const l=a},169:(e,t,n)=>{"use strict";n.d(t,{Q:()=>s,Z:()=>l});var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".sources-list__sources-container___T6dwZ{width:100%;overflow:hidden;margin-bottom:16px;padding:4px}","",{version:3,sources:["webpack://./components/sources-list/sources-list.scss"],names:[],mappings:"AAAA,yCACE,UAAA,CACA,eAAA,CACA,kBAAA,CACA,WAAA",sourcesContent:[".sources-container {\n  width: 100%;\n  overflow: hidden;\n  margin-bottom: 16px;\n  padding: 4px;\n}"],sourceRoot:""}]);var s="sources-list__sources-container___T6dwZ";const l=a},3476:e=>{"use strict";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 l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);o&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},559:e=>{"use strict";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")}},3708:(e,t,n)=>{"use strict";function o(e){return Array.prototype.slice.call(arguments,1).forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function r(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===r(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},l={"http:":{validate:function(e,t,n){var o=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},c="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",u="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function d(e){var t=e.re=n(2596)(e.__opts__),o=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||o.push(c),o.push(t.src_xn),t.src_tlds=o.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function u(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var o={validate:null,link:null};if(e.__compiled__[t]=o,"[object Object]"===r(n))return"[object RegExp]"!==r(n.validate)?i(n.validate)?o.validate=n.validate:u(t,n):o.validate=function(e){return function(t,n){var o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}(n.validate),void(i(n.normalize)?o.normalize=n.normalize:n.normalize?u(t,n):o.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===r(e)}(n)?u(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var d=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><｜]|"+t.src_ZPCc+"))("+d+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><｜]|"+t.src_ZPCc+"))("+d+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function _(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function h(e,t){if(!(this instanceof h))return new h(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=o({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},l,e),this.__compiled__={},this.__tlds__=u,this.__tlds_replaced__=!1,this.re={},d(this)}h.prototype.add=function(e,t){return this.__schemas__[e]=t,d(this),this},h.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},h.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,r,i,a,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(r=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(o=e.match(this.re.email_fuzzy))&&(i=o.index+o[1].length,a=o.index+o[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),this.__index__>=0},h.prototype.pretest=function(e){return this.re.pretest.test(e)},h.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},h.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(_(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(_(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},h.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var t=this.re.schema_at_start.exec(e);if(!t)return null;var n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,_(this,0)):null},h.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),d(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,d(this),this)},h.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},h.prototype.onCompile=function(){},e.exports=h},2596:(e,t,n)=>{"use strict";e.exports=function(e){var t={};e=e||{},t.src_Any=n(8287).source,t.src_Cc=n(699).source,t.src_Z=n(9338).source,t.src_P=n(6924).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|");return t.src_pseudo_letter="(?:(?![><｜]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><｜]|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><｜]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><｜]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|"+t.src_ZPCc+"))((?![$+<=>^`|｜])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|"+t.src_ZPCc+"))((?![$+<=>^`|｜])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},1432:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Fragment:()=>o.Fragment,jsx:()=>i,jsxDEV:()=>i,jsxs:()=>i});var o=n(4522),r=0;function i(e,t,n,i,a,s){var l,c,u={};for(c in t)"ref"==c?l=t[c]:u[c]=t[c];var d={type:e,props:u,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--r,__source:a,__self:s};if("function"==typeof e&&(l=e.defaultProps))for(c in l)void 0===u[c]&&(u[c]=l[c]);return o.options.vnode&&o.options.vnode(d),d}},5768:(e,t,n)=>{"use strict";n.r(t),n.d(t,{borderless:()=>A.oB,button:()=>A.LI,danger:()=>A.h,default:()=>C,disabled:()=>A.JU,iconOnly:()=>A.Ts,large:()=>A.bH,medium:()=>A.IV,primary:()=>A.T$,small:()=>A.yG,translucent:()=>A.oL,withIcon:()=>A.H1});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(5630),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},3665:(e,t,n)=>{"use strict";n.r(t),n.d(t,{active:()=>A.bB,clearIcon:()=>A.kz,default:()=>C,disabled:()=>A.JU,inputElement:()=>A.zF,inputFieldWrapper:()=>A.wc,prevNextButton:()=>A.Xh,prevNextWrapper:()=>A.eX,searchResults:()=>A.uN});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(703),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},7458:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C,srWrapper:()=>A.P});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(273),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.Z,f);const C=A.Z&&A.Z.locals?A.Z.locals:void 0},927:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C,iconWrapper:()=>A.aW,large:()=>A.bH,medium:()=>A.IV,small:()=>A.yG});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(7001),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},6550:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bannerContainer:()=>A.Cg,bannerContainerRoot:()=>A.ce,closeButton:()=>A.Ah,default:()=>C,large:()=>A.bH,small:()=>A.yG});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(1006),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},5111:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bannerBody:()=>A.d7,bannerWrapper:()=>A.Wd,default:()=>C,defaultBannerRoot:()=>A.m0,iconContainer:()=>A.Fu,iconImage:()=>A.cy,iconWrapper:()=>A.aW,large:()=>A.bH,small:()=>A.yG,text:()=>A.fL,title:()=>A.TN});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(3297),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},7982:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C,fillContainer:()=>A.V});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(8215),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.Z,f);const C=A.Z&&A.Z.locals?A.Z.locals:void 0},8598:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C,fillContainer:()=>A.V});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(200),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.Z,f);const C=A.Z&&A.Z.locals?A.Z.locals:void 0},8200:(e,t,n)=>{"use strict";n.r(t),n.d(t,{closeButton:()=>A.Ah,default:()=>C,errorToast:()=>A.Jc,iconContainer:()=>A.Fu,iconWrapper:()=>A.aW,infoToast:()=>A.Rr,successToast:()=>A.Qm,text:()=>A.fL,title:()=>A.TN,toastBody:()=>A.X$,toastWrapper:()=>A.GK,warnToast:()=>A.x_});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(6398),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},5207:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C,toastRow:()=>A.YY,toastsContainer:()=>A.Q$});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(696),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},2135:(e,t,n)=>{"use strict";n.r(t),n.d(t,{attachmentsContainer:()=>A.O2,attachmentsLabel:()=>A.uU,default:()=>C});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(8453),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},8179:(e,t,n)=>{"use strict";n.r(t),n.d(t,{captionsContainer:()=>A.x,default:()=>C});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(534),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.Z,f);const C=A.Z&&A.Z.locals?A.Z.locals:void 0},8826:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C,downloadIcon:()=>A.aL,fileDescriptionText:()=>A.WC,fileIcon:()=>A.Rb,fileInfo:()=>A.E9,fileInfoText:()=>A.j,fileInfoTextContainer:()=>A.gE,iconContainer:()=>A.Fu});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(3478),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},7435:(e,t,n)=>{"use strict";n.r(t),n.d(t,{closeButtonContainer:()=>A.Y1,default:()=>C,downloadOverlay:()=>A.mn,fileInfoList:()=>A.xY,header:()=>A.Fs,large:()=>A.bH,medium:()=>A.IV,small:()=>A.yG,sourcesCaptionsContainer:()=>A.qh});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(8437),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.ZP,f);const C=A.ZP&&A.ZP.locals?A.ZP.locals:void 0},6982:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C,expandableLabel:()=>A.U});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(9570),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.Z,f);const C=A.Z&&A.Z.locals?A.Z.locals:void 0},6154:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>C,sourcesContainer:()=>A.Q});var o=n(1892),r=n.n(o),i=n(5760),a=n.n(i),s=n(8311),l=n.n(s),c=n(8192),u=n.n(c),d=n(8060),p=n.n(d),_=n(4865),h=n.n(_),A=n(169),f={};f.styleTagTransform=h(),f.setAttributes=u(),f.insert=l().bind(null,"head"),f.domAPI=a(),f.insertStyleElement=p(),r()(A.Z,f);const C=A.Z&&A.Z.locals?A.Z.locals:void 0},1892:e=>{"use strict";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 l=e[s],c=o.base?l[0]+o.base:l[0],u=i[c]||0,d="".concat(c," ").concat(u);i[c]=u+1;var p=n(d),_={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==p)t[p].references++,t[p].updater(_);else{var h=r(_,o);o.byIndex=s,t.splice(s,0,{identifier:d,updater:h,references:1})}a.push(d)}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 l=o(e,r),c=0;c<i.length;c++){var u=n(i[c]);0===t[u].references&&(t[u].updater(),t.splice(u,1))}i=l}}},8311:e=>{"use strict";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)}},8060:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},8192:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},5760:e=>{"use strict";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)}}}},4865:e=>{"use strict";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))}}},7026:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentsList=void 0;var r=n(1432),i=n(2952),a=n(2135),s=n(4959),l=KalturaPlayer.ui.preacti18n.withText;t.AttachmentsList=l({attachmentsLabel:"download.attachments_label"})((function(e){var t=e.attachments,n=e.downloadPluginManager,l=e.attachmentsLabel;return(0,r.jsxs)("div",o({className:a.attachmentsContainer,"data-testid":"download-overlay-attachments-container"},{children:[(0,r.jsx)("div",o({className:a.attachmentsLabel},{children:l})),function(e){return e.map((function(e){return t=e.id,o=function(e){return e.title||e.fileName}(e),a=e.downloadUrl,l=(0,s.getIconByFileExt)(e.fileExt),(0,r.jsx)(i.DownloadItem,{downloadPluginManager:n,fileName:o,downloadUrl:a,iconFileType:l},t);var t,o,a,l}))}(t)]}))}))},5714:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentsList=void 0;var o=n(7026);Object.defineProperty(t,"AttachmentsList",{enumerable:!0,get:function(){return o.AttachmentsList}})},1753:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionsList=void 0;var r=n(1432),i=n(2952),a=n(8179),s=n(3624),l=n(4820),c=KalturaPlayer.ui.preacti18n.withText;t.CaptionsList=c({moreCaptionsLabel:"download.more_captions_label",lessCaptionsLabel:"download.less_captions_label"})((function(e){var t,n=e.captions,c=e.downloadPluginManager,u=e.fileName,d=e.moreCaptionsLabel,p=e.lessCaptionsLabel;n.length>0&&((t=n.find((function(e){return e.isDefault})))||(t=n[0]));var _=function(e){return function(e,t,n,o){return(0,r.jsx)(i.DownloadItem,{downloadPluginManager:c,fileName:t,description:n,downloadUrl:o,iconFileType:(0,r.jsx)(l.Icon,{name:"closedCaptions"})},e)}(e.id,function(e){return"".concat(u,".").concat(e.fileExt)}(e),e.label,e.downloadUrl)};return(0,r.jsx)("div",o({className:a.captionsContainer,"data-testid":"download-overlay-captions-container"},{children:n.length>1?(0,r.jsx)(s.ExpandableContainer,{defaultItem:_(t),restOfItems:function(e){return e.map((function(e){if(!e.isDefault||e.id!==(null==t?void 0:t.id))return _(e)}))}(n),showMoreLabel:d,showLessLabel:p}):_(t)}))}))},8508:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionsList=void 0;var o=n(1753);Object.defineProperty(t,"CaptionsList",{enumerable:!0,get:function(){return o.CaptionsList}})},7594:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadItem=void 0;var r=n(1432),i=n(573),a=n(8826),s=n(4820),l=n(8750),c=KalturaPlayer.ui.Event.withEventManager,u=KalturaPlayer.ui.preacti18n.withText;t.DownloadItem=u({downloadLabel:"download.download",downloadStartedLabel:"download.download_has_started",downloadFailedLabel:"download.download_has_failed",downloadButtonLabel:"download.download_button_label"})(c((function(e){var t=e.key,n=e.downloadLabel,c=e.downloadStartedLabel,u=e.downloadFailedLabel,d=e.downloadPluginManager,p=e.downloadButtonLabel,_=e.fileName,h=e.description,A=e.downloadUrl,f=e.iconFileType,C=e.isDefault,v=(0,l.useRef)(null);return(0,l.useEffect)((function(){var e;C&&(null===(e=v.current)||void 0===e||e.focus())}),[]),(0,r.jsx)(i.A11yWrapper,o({onClick:function(){A?(d.downloadFile(A,_),d.notifyDownloadStarted(n,c)):d.notifyDownloadFailed(n,u)}},{children:(0,r.jsxs)("div",o({"data-testid":"download-item-download-button",className:a.fileInfo,tabIndex:0,"aria-label":p,ref:v},{children:[(0,r.jsx)("div",o({className:"".concat(a.iconContainer," ").concat(a.fileIcon)},{children:f})),(0,r.jsxs)("div",o({className:a.fileInfoTextContainer},{children:[(0,r.jsx)("div",o({className:a.fileInfoText},{children:_})),h&&(0,r.jsx)("div",o({className:a.fileDescriptionText},{children:h}))]})),(0,r.jsx)("div",o({className:"".concat(a.iconContainer," ").concat(a.downloadIcon)},{children:(0,r.jsx)(s.Icon,{name:"download"})}))]}),t)}))})))},2952:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadItem=void 0;var o=n(7594);Object.defineProperty(t,"DownloadItem",{enumerable:!0,get:function(){return o.DownloadItem}})},4891:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadOverlayButton=void 0;var r=n(1432),i=n(8686),a=KalturaPlayer.ui.preacti18n.withText,s=KalturaPlayer.ui.components,l=s.Icon,c=s.Tooltip,u=a({downloadLabel:"download.download"})((function(e){var t=e.downloadLabel,n=e.setRef;return(0,r.jsx)("div",o({"data-testid":"download-overlay-button"},{children:(0,r.jsx)(c,o({label:t},{children:(0,r.jsx)("button",o({type:"button","aria-label":t,tabIndex:0,className:"".concat(KalturaPlayer.ui.style.upperBarIcon),ref:n},{children:(0,r.jsx)(l,{id:"download-overlay-icon",path:i.DOWNLOAD,viewBox:"0 0 32 32"})}))}))}))}));t.DownloadOverlayButton=u},2483:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadOverlayButton=void 0;var o=n(4891);Object.defineProperty(t,"DownloadOverlayButton",{enumerable:!0,get:function(){return o.DownloadOverlayButton}})},9266:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadOverlay=void 0;var r=n(1432),i=n(573),a=n(4522),s=n(8750),l=n(2085),c=KalturaPlayer.ui.Event.withEventManager,u=KalturaPlayer.ui.components.PLAYER_SIZE,d=KalturaPlayer.ui.redux.connect,p=KalturaPlayer.ui.preacti18n.withText,_=n(7435),h=n(1150),A=n(8508),f=n(5714),C=p({downloadsLabel:"download.downloads",closeLabel:"overlay.close"})(d((function(e){var t="";switch(e.shell.playerSize){case u.EXTRA_LARGE:case u.LARGE:t=_.large;break;case u.MEDIUM:t=_.medium;break;case u.SMALL:case u.EXTRA_SMALL:t=_.small}return{sizeClass:t}}))(c((function(e){var t=e.downloadPluginManager,n=e.eventManager,c=e.sizeClass,u=e.downloadsLabel,d=e.closeLabel,p=e.setFocus,C=e.downloadMetadata,v=(0,s.useState)(!1),y=v[0],g=v[1],m=(0,a.createRef)(),b=t.downloadPlugin.config;return(0,s.useEffect)((function(){null==n||n.listen(t,l.EventType.SHOW_OVERLAY,(function(){g(!0)})),null==n||n.listen(t,l.EventType.HIDE_OVERLAY,(function(){g(!1)}))}),[]),y?(0,r.jsxs)("div",o({"data-testid":"download-overlay",className:_.downloadOverlay},{children:[(0,r.jsx)("div",o({className:"".concat(_.header," ").concat(c)},{children:u})),(0,r.jsxs)("div",o({className:"".concat(_.fileInfoList," ").concat(c)},{children:[(0,r.jsxs)("div",o({className:_.sourcesCaptionsContainer},{children:[(0,r.jsx)(h.SourcesList,{flavors:C.flavors,imageUrl:C.imageDownloadUrl,downloadPluginManager:t,downloadConfig:b,fileName:C.fileName,displayFlavors:b.displayFlavors}),b.displayCaptions&&C.captions.length>0&&(0,r.jsx)(A.CaptionsList,{captions:C.captions,downloadPluginManager:t,fileName:C.fileName})]})),b.displayAttachments&&C.attachments.length>0&&(0,r.jsx)(f.AttachmentsList,{attachments:C.attachments,downloadPluginManager:t})]})),(0,r.jsx)("div",{children:(0,r.jsx)("div",o({"data-testid":"download-overlay-close-button",className:_.closeButtonContainer},{children:(0,r.jsx)(i.A11yWrapper,o({onClick:function(e,n){t.showOverlay=!1,n&&p()}},{children:(0,r.jsx)(i.Button,{type:i.ButtonType.borderless,size:i.ButtonSize.medium,tooltip:{label:d},ariaLabel:d,icon:"close",setRef:function(e){m.current=e}})}))}))})]})):(0,r.jsx)("div",{})}))));t.DownloadOverlay=C},1887:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadOverlay=void 0;var o=n(9266);Object.defineProperty(t,"DownloadOverlay",{enumerable:!0,get:function(){return o.DownloadOverlay}})},8950:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandableContainer=void 0;var r=n(1432),i=n(4522),a=n(8750),s=n(6982),l=n(573);t.ExpandableContainer=function(e){var t=(0,a.useState)(!1),n=t[0],c=t[1];return(0,r.jsxs)(i.Fragment,{children:[e.defaultItem,n&&e.restOfItems,(0,r.jsx)(l.A11yWrapper,o({onClick:function(){c(!n)}},{children:(0,r.jsx)("div",o({className:s.expandableLabel,tabIndex:0},{children:n?e.showLessLabel:e.showMoreLabel}))}))]})}},3624:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExpandableContainer=void 0;var o=n(8950);Object.defineProperty(t,"ExpandableContainer",{enumerable:!0,get:function(){return o.ExpandableContainer}})},7875:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadOverlayButton=void 0;var o=n(2483);Object.defineProperty(t,"DownloadOverlayButton",{enumerable:!0,get:function(){return o.DownloadOverlayButton}})},1150:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SourcesList=void 0;var o=n(4883);Object.defineProperty(t,"SourcesList",{enumerable:!0,get:function(){return o.SourcesList}})},4883:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SourcesList=void 0;var r=n(1432),i=n(2952),a=n(6154),s=n(3624),l=n(4820),c=KalturaPlayer.ui.components,u=c.Icon,d=c.IconType,p=KalturaPlayer.ui.preacti18n.withText;t.SourcesList=p({moreFlavorsLabel:"download.more_flavors_label",lessFlavorsLabel:"download.less_flavors_label",sourceLabel:"download.source_label"})((function(e){var t,n=e.flavors,c=e.imageUrl,p=e.downloadPluginManager,_=e.downloadConfig,h=e.fileName,A=e.displayFlavors,f=e.moreFlavorsLabel,C=e.lessFlavorsLabel,v=e.sourceLabel;!function(){if(n.length>0){var e=_.flavorId,o=_.flavorParamId;(t=n.find((function(t){return t.id===e||t.flavorParamsId.toString()===o})))||n.find((function(e){return e.isOriginal||0===e.flavorParamsId})),t||(t=n[0])}}();var y=function(e,t,n,o,a,s){return void 0===s&&(s=!1),(0,r.jsx)(i.DownloadItem,{downloadPluginManager:p,fileName:t,description:n,downloadUrl:o,iconFileType:a,isDefault:s},e)},g=function(e,t){return void 0===t&&(t=!1),y(e.id,"".concat(h,".").concat(e.fileExt),function(e){var t="".concat(e.height,"p");return e.height>=2160?t+=" ".concat("4K"):e.height>=1080&&(t+=" ".concat("HD")),e.isOriginal||0===e.flavorParamsId?"".concat(v," (").concat(t,")"):t}(e),e.downloadUrl,(0,r.jsx)(u,{id:"download-file-play",type:d.Play,viewBox:"0 0 32 32"}),t)};return(0,r.jsx)("div",o({className:a.sourcesContainer,"data-testid":"download-overlay-sources-container"},{children:c?y("1",h,"",c,(0,r.jsx)(l.Icon,{name:"image"}),!0):n.length>0?n.length>1&&A?(0,r.jsx)(s.ExpandableContainer,{defaultItem:g(t,!0),restOfItems:function(e){return e.map((function(e){if(e.id!==(null==t?void 0:t.id))return g(e)}))}(n),showMoreLabel:f,showLessLabel:C}):g(t):void 0}))}))},2725:function(e,t,n){"use strict";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.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadPluginManager=void 0;var s=n(1432),l=KalturaPlayer.ui.components.Icon,c=n(573),u=n(8686),d=n(4983),p=n(2085),_=function(e){function t(t){var n=e.call(this)||this;return n.downloadPlugin=t,n._showOverlay=!1,n.downloadMetadata=null,n.playOnClose=!1,n.downloadService=new d.DownloadService(t.player,t.logger),n}return r(t,e),t.prototype.getDownloadMetadata=function(e){return void 0===e&&(e=!1),i(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return this.downloadMetadata&&!e?[3,2]:(t=this,[4,this.downloadService.getDownloadMetadata(this.downloadPlugin.config)]);case 1:t.downloadMetadata=n.sent(),this.downloadMetadata||this.downloadPlugin.logger.debug("Failed to get download url headers"),n.label=2;case 2:return[2,this.downloadMetadata]}}))}))},t.prototype.downloadFile=function(e,t){try{var n=this.downloadPlugin.config.preDownloadHook;"function"==typeof n&&n()}catch(e){this.downloadPlugin.logger.debug("Exception in pre-download hook")}this.downloadService.downloadFile(e,t)},t.prototype.notifyDownloadStarted=function(e,t){this.downloadPlugin.addToast({title:e,text:t,icon:(0,s.jsx)(l,{id:"download-started-toast-icon",path:u.DOWNLOAD,viewBox:"0 0 32 32"}),severity:c.ToastSeverity.Success})},t.prototype.notifyDownloadFailed=function(e,t){this.downloadPlugin.addToast({title:e,text:t,icon:(0,s.jsx)(l,{id:"download-failed-toast-icon",path:u.ERROR,viewBox:"0 0 16 16"}),severity:c.ToastSeverity.Error})},Object.defineProperty(t.prototype,"showOverlay",{get:function(){return this._showOverlay},set:function(e){this._showOverlay=e,this._showOverlay?(this.downloadPlugin.player.paused||(this.downloadPlugin.player.pause(),this.playOnClose=!0),this.dispatchEvent(new KalturaPlayer.core.FakeEvent(p.EventType.SHOW_OVERLAY,{byKeyboard:this.downloadPlugin.triggeredByKeyboard}))):(this.playOnClose&&(this.downloadPlugin.player.play(),this.playOnClose=!1),this.dispatchEvent(new KalturaPlayer.core.FakeEvent(p.EventType.HIDE_OVERLAY)))},enumerable:!1,configurable:!0}),t}(KalturaPlayer.core.FakeEventTarget);t.DownloadPluginManager=_},4071:function(e,t,n){"use strict";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.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)},a=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.Download=void 0;var l=n(1432),c=n(7875),u=n(8686),d=n(1887),p=n(2725),_=n(6908),h=n(6978),A=h.ui.preacti18n.Text,f=h.ui.ReservedPresetNames,C=[f.Playback,f.Img],v=function(e){function t(t,n,o){var r=e.call(this,t,n,o)||this;return r.iconId=-1,r.defaultToastDuration=5e3,r.componentDisposers=[],r._pluginButtonRef=null,r.triggeredByKeyboard=!1,r._setPluginButtonRef=function(e){r._pluginButtonRef=e},r._handleClick=function(e,t){r.triggeredByKeyboard=t,r.downloadPluginManager.showOverlay=!r.downloadPluginManager.showOverlay},r._focusPluginButton=function(){setTimeout((function(){var e;null===(e=r._pluginButtonRef)||void 0===e||e.focus()}))},r.downloadPluginManager=new p.DownloadPluginManager(r),r.contribServices=_.ContribServices.get({kalturaPlayer:n}),r}return r(t,e),t.isValid=function(){return!0},Object.defineProperty(t.prototype,"upperBarManager",{get:function(){return this.player.getService("upperBarManager")||{}},enumerable:!1,configurable:!0}),t.prototype.addToast=function(e){var t,n,o=e.title,r=e.text,i=e.icon,a=e.severity;null===(n=null===(t=this.contribServices)||void 0===t?void 0:t.toastManager)||void 0===n||n.add({title:o,text:r,icon:i,severity:a,duration:this.defaultToastDuration,onClick:function(){return null}})},t.prototype.getUIComponents=function(){return this.contribServices.register()},t.prototype.injectOverlayComponents=function(e){var t=this;this.iconId>0||(this.iconId=this.upperBarManager.add({label:(0,l.jsx)(A,i({id:"download.download"},{children:"Download"})),svgIcon:{viewBox:"0 0 32 32",path:u.DOWNLOAD},onClick:this._handleClick,component:function(){return(0,l.jsx)(c.DownloadOverlayButton,{setRef:t._setPluginButtonRef})},presets:C}),this.componentDisposers.push(this.player.ui.addComponent({label:"kaltura-download-overlay",presets:C,area:"GuiArea",get:function(){return(0,l.jsx)(d.DownloadOverlay,{downloadPluginManager:t.downloadPluginManager,setFocus:t._focusPluginButton,downloadMetadata:e})}})))},t.prototype.shouldInjectUI=function(e){if(!e)return!1;var t=e.flavors,n=e.captions,o=e.attachments,r=e.imageDownloadUrl,i=this.downloadPluginManager.downloadPlugin.config,a=i.displayCaptions,s=i.displayAttachments;return t.length||r||n.length&&a||o.length&&s},t.prototype.loadMedia=function(){return a(this,void 0,void 0,(function(){var e;return s(this,(function(t){switch(t.label){case 0:return[4,this.ready];case 1:return t.sent(),this.downloadPluginManager.showOverlay=!1,[4,this.downloadPluginManager.getDownloadMetadata(!0)];case 2:return e=t.sent(),this.shouldInjectUI(e)&&(this.logger.debug("Download is supported for current entry"),this.injectOverlayComponents(e)),[2]}}))}))},t.prototype.reset=function(){var e;null===(e=this.upperBarManager)||void 0===e||e.remove(this.iconId),this.iconId=-1,this._pluginButtonRef=null,this.triggeredByKeyboard=!1;for(var t=0,n=this.componentDisposers;t<n.length;t++)(0,n[t])();this.componentDisposers=[]},t.defaultConfig={flavorId:null,flavorParamId:"0",preDownloadHook:null,displayAttachments:!0,displayFlavors:!0,displayCaptions:!0},t}(KalturaPlayer.core.BasePlugin);t.Download=v},7765:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR=t.DOWNLOAD=void 0,t.DOWNLOAD="M26,25 C26.5522847,25 27,25.4477153 27,26 C27,26.5522847 26.5522847,27 26,27 L26,27 L7,27 C6.44771525,27 6,26.5522847 6,26 C6,25.4477153 6.44771525,25 7,25 L7,25 Z M15.897,20.797 L15.817,20.73 L15.8163834,20.7298413 L8.34305882,13.7298413 C7.93997861,13.3522902 7.91928313,12.7194636 8.29683417,12.3163834 C8.67438521,11.9133032 9.30721188,11.8926077 9.71029209,12.2701587 L15.4996721,17.693 L15.5,6 C15.5,5.48716416 15.8860402,5.06449284 16.3833789,5.00672773 L16.5,5 C17.0522847,5 17.5,5.44771525 17.5,6 L17.4996721,17.694 L23.2951711,12.2699211 C23.6673663,11.9215418 24.2352038,11.9125649 24.6172049,12.230382 L24.7086128,12.3166371 C25.0860237,12.7198486 25.0651082,13.352668 24.6618968,13.7300789 L17.1833629,20.7300789 L17.1610165,20.7503813 L17.1610165,20.7503813 C17.1421868,20.7669999 17.1224361,20.7831339 17.102079,20.7985075 C17.0891381,20.8082894 17.0764369,20.8174134 17.0635772,20.826204 C17.0434306,20.8399634 17.0223437,20.8532674 17.0007451,20.8657864 C16.9872099,20.8736423 16.9734873,20.8811624 16.959633,20.8883367 L16.8877511,20.9220455 L16.8877511,20.9220455 C16.8756318,20.927087 16.8632234,20.9320132 16.8507409,20.9366814 C16.83028,20.9444208 16.8097352,20.9513578 16.7889039,20.9576336 C16.7705976,20.9630349 16.752126,20.968019 16.7335525,20.9724647 C16.6585039,20.9905214 16.5803589,21 16.5,21 C16.4170842,21 16.3365254,20.9899086 16.2594848,20.9708871 C16.2500284,20.9684434 16.2399293,20.9657886 16.2298654,20.9629733 C16.2028024,20.9554899 16.1769173,20.947049 16.1515197,20.9376057 C16.1370523,20.9321598 16.1223107,20.9262914 16.1076867,20.9200585 C16.0832011,20.9096448 16.0596143,20.8984375 16.036557,20.886357 C16.025923,20.8807972 16.0148138,20.8747205 16.0037984,20.8684173 C15.9792921,20.8543502 15.955966,20.8396537 15.9333153,20.8240474 L15.898,20.798 L15.897,20.797 Z M15.867,20.774 L15.888,20.79 L15.8735171,20.7794831 L15.8735171,20.7794831 L15.867,20.774 Z M15.817,20.73 L15.9035191,20.8027045 C15.8784859,20.7840722 15.8543541,20.7642966 15.831201,20.7434548 L15.817,20.73 Z",t.ERROR="M8 2C11.3137 2 14 4.68629 14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2ZM8 10C7.44772 10 7 10.4477 7 11C7 11.5523 7.44772 12 8 12C8.55228 12 9 11.5523 9 11C9 10.4477 8.55228 10 8 10ZM8 4C7.44772 4 7 4.44372 7 4.99981V8.00019C7 8.51293 7.38272 8.93552 7.88267 8.99327L8 9C8.55228 9 9 8.55628 9 8.00019V4.99981C9 4.48707 8.61728 4.06448 8.11733 4.00673L8 4Z"},8686:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR=t.DOWNLOAD=void 0;var o=n(7765);Object.defineProperty(t,"DOWNLOAD",{enumerable:!0,get:function(){return o.DOWNLOAD}}),Object.defineProperty(t,"ERROR",{enumerable:!0,get:function(){return o.ERROR}})},7128:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentsLoader=void 0;var o=n(937),r=KalturaPlayer.providers.RequestBuilder,i=function(){function e(e){var t=e.entryId;this._requests=[],this._response={attachments:[]},this._entryId=t;var n=new Map,o=new r(n);o.service="attachment_attachmentAsset",o.action="list",o.params={filter:{entryIdEqual:this._entryId,objectType:"KalturaAttachmentAssetFilter"}},this.requests.push(o)}return Object.defineProperty(e,"id",{get:function(){return"attachments"},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 o.KalturaAttachmentAssetListResponse(null===(t=e[0])||void 0===t?void 0:t.data);n.totalCount&&(this._response.attachments=null==n?void 0:n.data)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return Boolean(this._entryId)},e}();t.AttachmentsLoader=i},5996:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionsLoader=void 0;var o=n(937),r=KalturaPlayer.providers.RequestBuilder,i=function(){function e(e){var t=e.entryId;this._requests=[],this._response={captions:[]},this._entryId=t;var n=new Map,o=new r(n);o.service="caption_captionAsset",o.action="list",o.params={filter:{entryIdEqual:this._entryId,objectType:"KalturaCaptionAssetFilter"}},this.requests.push(o)}return Object.defineProperty(e,"id",{get:function(){return"captions"},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 o.KalturaCaptionAssetListResponse(null===(t=e[0])||void 0===t?void 0:t.data);n.totalCount&&(this._response.captions=null==n?void 0:n.data)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return Boolean(this._entryId)},e}();t.CaptionsLoader=i},7204:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FlavorsLoader=void 0;var o=n(937),r=KalturaPlayer.providers.RequestBuilder,i=function(){function e(e){var t=e.entryId;this._requests=[],this._response={flavors:[]},this._entryId=t;var n=new Map,o=new r(n);o.service="flavorasset",o.action="list",o.params={filter:{entryIdEqual:this._entryId,objectType:"KalturaFlavorAssetFilter"}},this.requests.push(o)}return Object.defineProperty(e,"id",{get:function(){return"flavors"},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 o.KalturaFlavorAssetListResponse(null===(t=e[0])||void 0===t?void 0:t.data);n.totalCount&&(this._response.flavors=null==n?void 0:n.data)},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return Boolean(this._entryId)},e}();t.FlavorsLoader=i},949:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadUrlLoader=void 0;var n=KalturaPlayer.providers.RequestBuilder,o=function(){function e(e){var t=e.flavors,n=e.captions,o=e.attachments;this._requests=[],this._response={urls:new Map},this._flavors=t,this._captions=n,this._attachments=o,this.addRequest(n,"caption_captionAsset","getUrl"),this.addRequest(t,"flavorasset","getUrl"),this.addRequest(o,"attachment_attachmentAsset","getUrl")}return Object.defineProperty(e,"id",{get:function(){return"downloadUrls"},enumerable:!1,configurable:!0}),e.prototype.addRequest=function(e,t,o){var r=this,i=new Map;e.forEach((function(e){var a=new n(i);a.service=t,a.action=o,a.params={id:e.id},r.requests.push(a)}))},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){for(var t=new Map,n=0;n<this._requests.length;n++)t.set(this._requests[n].params.id,e[n].data);this._response.urls=t},enumerable:!1,configurable:!0}),e.prototype.isValid=function(){return!0},e}();t.DownloadUrlLoader=o},5294:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(5996),t),r(n(937),t),r(n(7204),t),r(n(949),t),r(n(7128),t)},937:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(8174),t),r(n(3063),t),r(n(3890),t),r(n(4495),t),r(n(2593),t),r(n(9210),t)},9210:function(e,t,n){"use strict";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.KalturaAttachmentAssetListResponse=void 0;var i=n(2593),a=function(e){function t(t){var n=e.call(this,t)||this;return n.data=[],n.hasError||(n.totalCount=t.totalCount,n.totalCount>0&&(n.data=[],t.objects.map((function(e){return n.data.push(new i.KalturaAttachmentAsset(e))})))),n}return r(t,e),t}(KalturaPlayer.providers.ResponseTypes.BaseServiceResult);t.KalturaAttachmentAssetListResponse=a},2593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaAttachmentAsset=void 0;t.KalturaAttachmentAsset=function(e){this.id=e.id,this.fileName=e.filename,this.fileExt=e.fileExt,this.downloadUrl="",this.title=e.title}},3063:function(e,t,n){"use strict";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.KalturaCaptionAssetListResponse=void 0;var i=n(8174),a=function(e){function t(t){var n=e.call(this,t)||this;return n.data=[],n.hasError||(n.totalCount=t.totalCount,n.totalCount>0&&(n.data=[],t.objects.map((function(e){return n.data.push(new i.KalturaCaptionAsset(e))})))),n}return r(t,e),t}(KalturaPlayer.providers.ResponseTypes.BaseServiceResult);t.KalturaCaptionAssetListResponse=a},8174:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaCaptionAsset=void 0;t.KalturaCaptionAsset=function(e){this.id=e.id,this.language=e.language,this.languageCode=e.languageCode,this.isDefault=e.isDefault,this.label=e.label,this.fileExt=e.fileExt,this.downloadUrl=""}},4495:function(e,t,n){"use strict";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.KalturaFlavorAssetListResponse=void 0;var i=n(3890),a=function(e){function t(t){var n=e.call(this,t)||this;return n.data=[],n.hasError||(n.totalCount=t.totalCount,n.totalCount>0&&(n.data=n.setDataWithoutDuplicates(t.objects))),n}return r(t,e),t.prototype.setDataWithoutDuplicates=function(e){var t=[],n=e.sort((function(e,t){return e.height<t.height?1:-1})).filter((function(e){return e.height>0}));t.push(new i.KalturaFlavorAsset(n[0]));for(var o=t[0],r=1;r<n.length;r++){var a=n[r];o.height!==a.height&&t.push(new i.KalturaFlavorAsset(a)),o=a}return t},t}(KalturaPlayer.providers.ResponseTypes.BaseServiceResult);t.KalturaFlavorAssetListResponse=a},3890:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaFlavorAsset=void 0;t.KalturaFlavorAsset=function(e){this.id=e.id,this.fileExt=e.fileExt,this.flavorParamsId=e.flavorParamsId,this.isOriginal=e.isOriginal,this.downloadUrl="",this.height=e.height}},8566:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)},r=this&&this.__awaiter||function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&s[0]?o.return:s[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,s[1])).done)return r;switch(o=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,o=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],o=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadService=void 0;var a=n(5294),s=function(){function e(e,t){this.player=e,this.logger=t}return e.prototype.isPlatformSupported=function(){var e=navigator.userAgent||"";return!(e.includes("Tizen")||e.includes("Web0S"))},e.prototype.isEntrySupported=function(){return!(this.player.isLive()||this.player.getVideoElement().mediaKeys)},e.prototype.getFilename=function(e){var t,n;if(null===(t=this.player.sources.metadata)||void 0===t?void 0:t.name)return null===(n=this.player.sources.metadata)||void 0===n?void 0:n.name;if(this.player.isImage())return"image";var o=e.flavors[0].downloadUrl.split("/");return o[o.indexOf("fileName")+1]},e.prototype.getDownloadMetadata=function(){return r(this,void 0,void 0,(function(){var e,t,n,o;return i(this,(function(r){switch(r.label){case 0:return this.isPlatformSupported()&&this.isEntrySupported()?(e={fileName:"",captions:[],flavors:[],attachments:[],imageDownloadUrl:""},[4,this.getKalturaAssets()]):[2,null];case 1:return t=r.sent(),Object.assign(e,t),n=e,[4,this.handleImageDownload()];case 2:return n.imageDownloadUrl=r.sent(),(null==e?void 0:e.flavors.length)||(null==e?void 0:e.captions.length)||(null==e?void 0:e.attachments.length)?[4,this.getDownloadUrls(e)]:[3,4];case 3:o=r.sent(),e.flavors=this.setDownloadUrls(null==e?void 0:e.flavors,o),e.captions=this.setDownloadUrls(null==e?void 0:e.captions,o),e.attachments=this.setDownloadUrls(null==e?void 0:e.attachments,o),r.label=4;case 4:return e.fileName=this.getFilename(e),[2,e]}}))}))},e.prototype.setDownloadUrls=function(e,t){return e.map((function(e){return o(o({},e),{downloadUrl:t.get(e.id)})}))},e.prototype.getDownloadUrls=function(e){var t,n;return r(this,void 0,void 0,(function(){var o,r,s,l;return i(this,(function(i){switch(i.label){case 0:return o=(null===(t=this.player.config.session)||void 0===t?void 0:t.ks)||"",r=new Map,[4,this.player.provider.doRequest([{loader:a.DownloadUrlLoader,params:{flavors:null==e?void 0:e.flavors,captions:null==e?void 0:e.captions,attachments:null==e?void 0:e.attachments}}],o)];case 1:return(s=i.sent())&&s.has(a.DownloadUrlLoader.id)&&(l=s.get(a.DownloadUrlLoader.id),r=null===(n=null==l?void 0:l.response)||void 0===n?void 0:n.urls),[2,r]}}))}))},e.prototype.handleImageDownload=function(){var e;return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(o){switch(o.label){case 0:return this.player.isImage()?(t=this.player.sources.downloadUrl)?[3,2]:[4,this.getImageDownloadMetadata()]:[2,""];case 1:return[2,o.sent()];case 2:t.includes("/ks/")||(n=null===(e=this.player.config.session)||void 0===e?void 0:e.ks,t=n?"".concat(t,"/ks/").concat(n):t),o.label=3;case 3:return o.trys.push([3,5,,7]),[4,fetch(t,{method:"HEAD"})];case 4:return[2,o.sent().url];case 5:return o.sent(),this.logger.warn("Failed to get image file from url: ",t),[4,this.getImageDownloadMetadata()];case 6:return[2,o.sent()];case 7:return[2]}}))}))},e.prototype.getKalturaAssets=function(){var e;return r(this,void 0,void 0,(function(){var t,n,o;return i(this,(function(r){switch(r.label){case 0:return t=this.player.config.sources.id,n=(null===(e=this.player.config.session)||void 0===e?void 0:e.ks)||"",[4,this.player.provider.doRequest([{loader:a.CaptionsLoader,params:{entryId:t}},{loader:a.FlavorsLoader,params:{entryId:t}},{loader:a.AttachmentsLoader,params:{entryId:t}}],n)];case 1:return o=r.sent(),[2,this.parseDataFromResponse(o)]}}))}))},e.prototype.parseDataFromResponse=function(e){var t,n,o,r={captions:[],flavors:[],attachments:[]};if(e){if(e.has(a.CaptionsLoader.id)){var i=e.get(a.CaptionsLoader.id);r.captions=null===(t=null==i?void 0:i.response)||void 0===t?void 0:t.captions}if(e.has(a.FlavorsLoader.id)){var s=e.get(a.FlavorsLoader.id);r.flavors=null===(n=null==s?void 0:s.response)||void 0===n?void 0:n.flavors}if(e.has(a.AttachmentsLoader.id)){var l=e.get(a.AttachmentsLoader.id);r.attachments=null===(o=null==l?void 0:l.response)||void 0===o?void 0:o.attachments}}return r},e.prototype.getImageDownloadMetadata=function(){return r(this,void 0,void 0,(function(){var e,t,n,o;return i(this,(function(r){switch(r.label){case 0:if(e=this.player.config.sources.image,!(t=e&&e.length>0?e[0].url:""))return[2,""];t.includes("/ks/")||(n=this.player.config.session.ks,t=n?"".concat(t,"/ks/").concat(n):t),r.label=1;case 1:return r.trys.push([1,4,,5]),[4,fetch(t)];case 2:return[4,r.sent().blob()];case 3:return o=r.sent(),[2,URL.createObjectURL(o)];case 4:return r.sent(),this.logger.warn("Failed to get image from url: ",t),[3,5];case 5:return[2,""]}}))}))},e.prototype._getDownloadUrl=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(!e.includes("caption_captionAsset"))return[3,5];n.label=1;case 1:return n.trys.push([1,4,,5]),[4,fetch(e)];case 2:return[4,n.sent().blob()];case 3:return t=n.sent(),[2,URL.createObjectURL(t)];case 4:return n.sent(),this.logger.warn("Failed to get captions from url while trying to download captions: ",e),[3,5];case 5:return[2,e]}}))}))},e.prototype.downloadFile=function(e,t){return r(this,void 0,void 0,(function(){var n,o;return i(this,(function(r){switch(r.label){case 0:return n=document.createElement("a"),o=n,[4,this._getDownloadUrl(e)];case 1:return o.href=r.sent(),n.hidden=!0,n.download=t,n.rel="noopener noreferrer",n.click(),[2]}}))}))},e}();t.DownloadService=s},4983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadService=void 0;var o=n(8566);Object.defineProperty(t,"DownloadService",{enumerable:!0,get:function(){return o.DownloadService}})},7010:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.EventType=void 0,(n=t.EventType||(t.EventType={})).SHOW_OVERLAY="show_overlay",n.HIDE_OVERLAY="hide_overlay"},2085:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventType=void 0;var o=n(7010);Object.defineProperty(t,"EventType",{enumerable:!0,get:function(){return o.EventType}})},699:e=>{e.exports=/[\0-\x1F\x7F-\x9F]/},6924:e=>{e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},9338:e=>{e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},8287:e=>{e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},4522:e=>{"use strict";e.exports=KalturaPlayer.ui.preact},8750:e=>{"use strict";e.exports=KalturaPlayer.ui.preactHooks},6978:e=>{"use strict";e.exports=KalturaPlayer}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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.nc=void 0;var o={};(()=>{"use strict";var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.NAME=e.VERSION=e.Plugin=void 0;var t=n(4071);Object.defineProperty(e,"Plugin",{enumerable:!0,get:function(){return t.Download}}),e.VERSION="1.0.15",e.NAME="@playkit-js/playkit-js-downloads",KalturaPlayer.core.registerPlugin("download",t.Download)})(),((KalturaPlayer=void 0===KalturaPlayer?{}:KalturaPlayer).plugins=KalturaPlayer.plugins||{}).download=o})();

var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.googleAnalytics=function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e){t.exports=KalturaPlayer},function(t,e,n){"use strict";n.r(e),n.d(e,"VERSION",(function(){return g})),n.d(e,"NAME",(function(){return f}));var r=n(0),i=r.core.Error,a={category:"Kaltura Video Events",label:function(){return this.config.partnerId+" | "+(this.config.uiConfId?this.config.uiConfId+" | ":"")+this.config.entryId+" | '"+this.config.entryName+"'"},events:{MEDIA_LOADED:{action:"media ready"},FIRST_PLAY:{action:"first play"},PLAY:{action:"play",value:1},PAUSE:{action:"pause",value:1},SEEKED:{action:"seek",value:function(){return this.player.currentTime}},ENDED:{action:"ended"},CHANGE_SOURCE_ENDED:{action:"change media",value:1,condition:function(){return!this._firstEntry}},ENTER_FULLSCREEN:{action:"enter full screen",value:1},EXIT_FULLSCREEN:{action:"exit full screen",value:1},ERROR:{action:"error",category:"Kaltura Video Error",label:function(t){return Object.entries(i.Code).find((function(e){e[0];return e[1]===t.payload.code}))[0]},condition:function(t){return t.payload.severity===i.Severity.CRITICAL}}}};function o(){return(o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function c(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=r.core.Utils,s=function(t){var e,n;function r(e,n,r){var i;return l(c(i=t.call(this,e,n,r)||this),"_timePercentEvent",{PLAY_REACHED_25:!1,PLAY_REACHED_50:!1,PLAY_REACHED_75:!1,PLAY_REACHED_100:!1}),l(c(i),"_firstEntry",!0),i.config.trackingId||i.config.trackingGA4Id?(i._init(),i._addBindings(),i._sendEvent({action:"widget loaded",category:i._getValue(i.config.tracking.category)})):i.logger.warn("No Google Analytics tracking ID provided. Tracking aborted"),i}n=t,(e=r).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,r.isValid=function(){return!0};var i=r.prototype;return i._gtag=function(){window.dataLayer.push(arguments)},i._init=function(){var t=this;window.google_tag_manager||u.Dom.loadScriptAsync(r.GTAG_LIB_URL+"?id="+(this.config.trackingId||this.config.trackingGA4Id)).then((function(){t.logger.debug("Google gtag library has loaded successfully")})),window.dataLayer=window.dataLayer||[],this._gtag("js",new Date),this.config.trackingId&&this._gtag("config",this.config.trackingId),this.config.trackingGA4Id&&this._gtag("config",this.config.trackingGA4Id)},i._getValue=function(t,e){try{return"function"==typeof t?t.call(this,e):t}catch(t){return this.logger.error(t),null}},i._addBindings=function(){var t=this;Object.entries(this.config.tracking.events).forEach((function(e){var n=e[0],r=e[1];t.eventManager.listen(t.player,t.player.Event[n],(function(e){if(r&&"object"==typeof r&&function(n){return n.action&&("function"!=typeof n.condition||n.condition.call(t,e))}(r)){var n=t._getValue(r.category,e),i=t._getValue(r.label,e),a=t._getValue(r.value,e),o={action:t._getValue(r.action,e),category:"string"==typeof n?n:t._getValue(t.config.tracking.category,e),label:"string"==typeof i?i:t._getValue(t.config.tracking.label,e),value:"number"==typeof a?a:t._getValue(t.config.tracking.value,e)};t._sendEvent(o)}}))})),this.eventManager.listen(this.player,this.player.Event.TIME_UPDATE,this._sendTimePercentAnalytic.bind(this)),this.eventManager.listenOnce(this.player,this.player.Event.CHANGE_SOURCE_ENDED,(function(){return t._firstEntry=!1}))},i._sendTimePercentAnalytic=function(t){var e=this,n=function(){return{category:e._getValue(e.config.tracking.category,t),label:e._getValue(e.config.tracking.label,t),value:e.player.currentTime}};if(this.player.config.sources.type!==this.player.MediaType.LIVE){var r=this.player.currentTime/this.player.duration;!this._timePercentEvent.PLAY_REACHED_25&&r>=.25&&(this._timePercentEvent.PLAY_REACHED_25=!0,this._sendEvent(o({action:"25% watched"},n()))),!this._timePercentEvent.PLAY_REACHED_50&&r>=.5&&(this._timePercentEvent.PLAY_REACHED_50=!0,this._sendEvent(o({action:"50% watched"},n()))),!this._timePercentEvent.PLAY_REACHED_75&&r>=.75&&(this._timePercentEvent.PLAY_REACHED_75=!0,this._sendEvent(o({action:"75% watched"},n()))),!this._timePercentEvent.PLAY_REACHED_100&&r>=1&&(this._timePercentEvent.PLAY_REACHED_100=!0,this._sendEvent(o({action:"100% watched"},n())))}},i._sendEvent=function(t){if(t.action){var e={};e.event_category=t.category,t.label&&(e.event_label=t.label),"number"==typeof t.value&&(e.value=Math.round(t.value)),this.logger.debug(t.action+" event sent",e),this._gtag("event",t.action,e)}},i.destroy=function(){this.eventManager.destroy()},i.reset=function(){this._timePercentEvent={PLAY_REACHED_25:!1,PLAY_REACHED_50:!1,PLAY_REACHED_75:!1,PLAY_REACHED_100:!1}},r}(r.BasePlugin);l(s,"defaultConfig",{tracking:a}),l(s,"GTAG_LIB_URL","//www.googletagmanager.com/gtag/js");var g="1.1.2",f="@playkit-js/playkit-js-google-analytics";e.default=s;Object(r.registerPlugin)("googleAnalytics",s)}]);

(()=>{"use strict";var e,t,n={912:function(e,t,n){var r,a=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)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(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}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 a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},o.apply(this,arguments)},i=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.GoogleTagManager=t.eventTypesMap=t.pluginName=void 0;var l=n(52),c=n(263);t.pluginName="googleTagManager",t.eventTypesMap={coreEvents:"Core",UIEvents:"UI",playlistEvents:"Playlist",castEvents:"Cast"};var p=function(e){function n(t,n,r){var a=e.call(this,t,n,r)||this;return a.config.containerId.match(/^GTM-[A-Z1-9]{2,}$/)?(a.loadTag(),a.aggregatePlayerEvents(),a.initCustomEventsListeners()):a.logger.error("Invalid container ID provided. Tracking aborted"),a}return a(n,e),n.prototype.loadTag=function(){if(document.getElementById("kaltura-".concat(this.config.containerId)))this.logger.warn("GTM Tag was already loaded");else{var e=document.createElement("script"),t=document.createTextNode(c.HEAD_TAG.replace("GTM-XXXXXX",this.config.containerId));e.appendChild(t),e.id="kaltura-".concat(this.config.containerId),document.head.prepend(e);var n=document.createElement("script"),r=document.createTextNode("window.dataLayer = window.dataLayer || [];");n.appendChild(r),document.head.prepend(n);var a=document.createElement("template");a.innerHTML=c.BODY_TAG.replace("GTM-XXXXXX",this.config.containerId),document.body.prepend(a.content)}},n.prototype.initCustomEventsListeners=function(){var e,n,r=this,a=new Set(this.config.customEventsTracking.custom);try{for(var o=i(Object.entries(this.config.customEventsTracking.preset)),l=o.next();!l.done;l=o.next()){var c=s(l.value,2),p=c[0];if(c[1]){var u=t.eventTypesMap[p];Object.values(this.player.Event[u]).forEach((function(e){r.isNotHighFrequencyEvent(e)&&a.add(e)}))}}}catch(t){e={error:t}}finally{try{l&&!l.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}a.forEach((function(e){return r.trackCustomEvent(e)}))},n.prototype.trackCustomEvent=function(e){var t=this;this.allPlayerEvents.has(e)?this.eventManager.listen(this.player,e,(function(e){var n,r=void 0!==e.payload?e.payload:{};"string"==typeof t.player.sources.metadata.name&&(r.entry_name=t.player.sources.metadata.name),"string"==typeof t.player.sources.metadata.entryId&&(r.entry_id=t.player.sources.metadata.entryId);var a=((n={})["".concat(e.type,"-payload")]=r,n);window.dataLayer.push(o({event:e.type},a))})):this.logger.warn("'".concat(e,"' is an invalid player event"))},n.prototype.aggregatePlayerEvents=function(){var e=o(o(o(o({},this.player.Event.Core),this.player.Event.UI),this.player.Event.Playlist),this.player.Event.Cast);this.allPlayerEvents=new Set(Object.values(e))},n.prototype.isNotHighFrequencyEvent=function(e){return![this.player.Event.Core.TIME_UPDATE,this.player.Event.Core.PROGRESS,this.player.Event.Core.FPS_DROP,this.player.Event.Core.FRAG_LOADED,this.player.Event.Core.AD_PROGRESS,this.player.Event.Core.TEXT_CUE_CHANGED].includes(e)},n.isValid=function(){return!0},n.defaultConfig={customEventsTracking:{custom:[],preset:{coreEvents:!1,UIEvents:!1,playlistEvents:!1,castEvents:!1}}},n}(l.BasePlugin);t.GoogleTagManager=p},263:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BODY_TAG=t.HEAD_TAG=void 0,t.HEAD_TAG="\n(function(w, d, s, l, i) {\n    w[l] = w[l] || [];\n    w[l].push({\n        'gtm.start': new Date().getTime(),\n        event: 'gtm.js'\n    });\n    var f = d.getElementsByTagName(s)[0],\n        j = d.createElement(s),\n        dl = l != 'dataLayer' ? '&l=' + l : '';\n    j.async = true;\n    j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n    f.parentNode.insertBefore(j, f);\n})(window, document, 'script', 'dataLayer', 'GTM-XXXXXX');\n",t.BODY_TAG='\n     <noscript>\n      <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXX"\n              height="0"\n              width="0"\n              style="display:none;\n              visibility:hidden">\n      </iframe>\n    </noscript>\n '},52:e=>{e.exports=KalturaPlayer}},r={};function a(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e].call(o.exports,o,o.exports,a),o.exports}e=a(52),t=a(912),(0,e.registerPlugin)(t.pluginName,t.GoogleTagManager)})();

/*! For license information please see playkit-hotspots.js.LICENSE.txt */
var KalturaPlayer;!function(){var e={1972:function(e,t,n){"use strict";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.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Button=t.ButtonType=t.ButtonSize=void 0;var a,s,l=n(4522),c=n(42),u=n(2052),p=n(979),_=n(4820),d=n(7538),h=u.ui.Components.Tooltip;!function(e){e.small="small",e.medium="medium",e.large="large"}(a=t.ButtonSize||(t.ButtonSize={})),function(e){e.primary="primary",e.danger="danger",e.translucent="translucent",e.borderless="borderless"}(s=t.ButtonType||(t.ButtonType={}));var A=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buttonRef=(0,l.createRef)(),t.renderButton=function(){var e,n=t.props,o=c(d.button,d[n.size],d[n.type],n.className,((e={})[d.disabled]=n.disabled,e[d.withIcon]=n.children&&n.icon,e[d.iconOnly]=!n.children&&n.icon,e)),r=i(i({ref:t.buttonRef,disabled:n.disabled,"aria-disabled":n.disabled,tabIndex:n.tabIndex,className:o},n.ariaLabel?{"aria-label":n.ariaLabel}:{}),n.testId?{"data-testid":n.testId}:{}),a=(0,l.h)("button",i({},r),(0,l.h)(l.Fragment,null,n.icon&&(0,l.h)(_.Icon,{name:n.icon,size:_.IconSize[n.size]}),n.children&&(0,l.h)("span",null,n.children)));return n.onClick?(0,l.h)(p.A11yWrapper,{onClick:n.onClick},a):a},t}return r(t,e),t.prototype.componentDidMount=function(){var e;this.props.focusOnMount&&(null===(e=this.buttonRef.current)||void 0===e||e.focus())},t.prototype.render=function(e){if(e.tooltip){var t=i(i({label:e.tooltip.label},e.tooltip.type?{type:e.tooltip.type}:{}),e.tooltip.className?{classNames:e.tooltip.className}:{});return(0,l.h)(h,i({},t),this.renderButton())}return this.renderButton()},t}(l.Component);t.Button=A,A.defaultProps={disabled:!1,focusOnMount:!1,tabIndex:0,children:null,size:a.medium,icon:null,type:s.primary}},5454:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1972),t),r(n(178),t)},178:function(e,t,n){"use strict";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.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InputField=void 0;var a=n(4522),s=n(979),l=n(7998),c=function(e){function t(t){var n=e.call(this,t)||this;return n.state={active:!1},n._inputRef=null,n.setFocus=function(e){var t;null===(t=n._inputRef)||void 0===t||t.focus(e)},n._handleOnChange=function(e){n.props.onChange(e.target.value)},n._onClear=function(){var e;null===(e=n._inputRef)||void 0===e||e.focus(),n.props.onChange("")},n._onFocus=function(){n.setState({active:!0})},n._onBlur=function(){n.setState({active:!1})},n._goToNextSearchResult=function(){var e=n.props.searchResults,t=e.activeSearchIndex,o=e.totalSearchResults,r=e.onSearchIndexChange;0!==o&&r(t!==o?t+1:1)},n._goToPrevSearchResult=function(){var e=n.props.searchResults,t=e.activeSearchIndex,o=e.totalSearchResults;(0,e.onSearchIndexChange)(1!==t?t-1:o)},n._renderSearchResults=function(){return(0,a.h)(a.Fragment,null,(0,a.h)("div",{className:l.searchResults,"aria-live":"polite","aria-label":n.props.searchResults.searchResultsLabel},"".concat(n.props.searchResults.totalSearchResults>0?"".concat(n.props.searchResults.activeSearchIndex,"/").concat(n.props.searchResults.totalSearchResults):"0/0")),(0,a.h)("div",{className:l.prevNextWrapper},n.props.value&&(0,a.h)(s.A11yWrapper,{onClick:n._goToPrevSearchResult},(0,a.h)("button",{tabIndex:0,className:"".concat(l.prevNextButton," ").concat(0===n.props.searchResults.totalSearchResults?l.disabled:""),"aria-label":n.props.searchResults.prevMatchLabel},(0,a.h)("svg",{width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{d:"M0.292893 4.70711C0.653377 5.06759 1.22061 5.09532 1.6129 4.7903L1.70711 4.70711L4 2.415L6.29289 4.70711C6.65338 5.06759 7.22061 5.09532 7.6129 4.7903L7.70711 4.70711C8.06759 4.34662 8.09532 3.77939 7.7903 3.3871L7.70711 3.29289L4.70711 0.292893C4.34662 -0.0675907 3.77939 -0.0953203 3.3871 0.209705L3.29289 0.292893L0.292893 3.29289C-0.0976311 3.68342 -0.0976311 4.31658 0.292893 4.70711Z",fill:"white","fill-opacity":"0.7"})))),n.props.value&&(0,a.h)(s.A11yWrapper,{onClick:n._goToNextSearchResult},(0,a.h)("button",{tabIndex:0,className:"".concat(l.prevNextButton," ").concat(0===n.props.searchResults.totalSearchResults?l.disabled:""),"aria-label":n.props.searchResults.nextMatchLabel},(0,a.h)("svg",{width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L4 2.58579L6.29289 0.292893C6.68342 -0.0976311 7.31658 -0.0976311 7.70711 0.292893C8.09763 0.683417 8.09763 1.31658 7.70711 1.70711L4.70711 4.70711C4.31658 5.09763 3.68342 5.09763 3.29289 4.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683417 0.292893 0.292893Z",fill:"white","fill-opacity":"0.7"}))))))},n._renderClearSearch=function(){return(0,a.h)(s.A11yWrapper,{onClick:n._onClear},(0,a.h)("button",{className:l.clearIcon,tabIndex:0,"aria-label":n.props.clearSearchLabel},(0,a.h)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM3.38951 2.3502L3.46013 2.41264L5.99548 4.9504L8.53067 2.41264L8.60129 2.3502C8.89537 2.12125 9.32081 2.1418 9.59133 2.41199C9.8844 2.70471 9.88469 3.17958 9.59197 3.47265L7.05523 6.01165L9.59197 8.55189C9.88469 8.84496 9.8844 9.31983 9.59133 9.61255C9.32081 9.88275 8.89537 9.90329 8.60129 9.67434L8.53067 9.61191L5.99548 7.0729L3.46013 9.61191L3.38951 9.67434C3.09543 9.90329 2.66999 9.88275 2.39947 9.61255C2.1064 9.31983 2.10611 8.84496 2.39883 8.55189L4.93498 6.01165L2.39883 3.47265C2.10611 3.17958 2.1064 2.70471 2.39947 2.41199C2.66999 2.1418 3.09543 2.12125 3.38951 2.3502Z",fill:"white","fill-opacity":"0.7"}))))},n.state={active:!1},n}return r(t,e),t.prototype.render=function(){var e=this,t={className:l.inputElement,value:this.props.value,onInput:this._handleOnChange,onFocus:this._onFocus,onBlur:this._onBlur,tabIndex:0,ref:function(t){e._inputRef=t}};return this.props.placeholder&&(t["aria-label"]=this.props.placeholder,t.placeholder=this.props.placeholder),(0,a.h)("div",{className:[l.inputFieldWrapper,this.props.value||this.state.active?l.active:""].join(" ")},(0,a.h)("input",i({},t)),this.props.value&&this.props.clearSearchLabel&&this._renderClearSearch(),this.props.value&&this.props.searchResults&&this._renderSearchResults())},t}(a.Component);t.InputField=c},979:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.A11yWrapper=t.isKeyboardEvent=void 0;var o=n(4522),r=n(2052).ui.utils.KeyMap,i=r.ENTER,a=r.SPACE,s=r.UP,l=r.DOWN,c=r.LEFT,u=r.RIGHT,p=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,_=e.onUpKeyPressed,d=e.onDownKeyPressed,h=e.onLeftKeyPressed,A=e.onRightKeyPressed,f=e.role,C=e.type,v={onKeyDown:function(e){e.keyCode===a||e.keyCode===i?(p(e),r(e,!0)):e.keyCode===s&&_?(p(e),_(e)):e.keyCode===l&&d?(p(e),d(e)):e.keyCode===c&&h?(p(e),h(e)):e.keyCode===u&&A&&(p(e),A(e))},onClick:function(e){e.stopPropagation(),r(e,(0,t.isKeyboardEvent)(e))},role:f};return"button"===n.type&&(v.type=C||"button"),(0,o.cloneElement)(n,v)},t.A11yWrapper.defaultProps={role:"button"}},172:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(979),t),r(n(8579),t),r(n(3425),t)},8579:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverlayPortal=void 0;var n=KalturaPlayer.ui.redux.useSelector,o=KalturaPlayer.ui.createPortal;t.OverlayPortal=function(e){var t=e.children,r=n((function(e){return e.config.targetId})),i=document.getElementById(r)||document;return o(t,i.querySelector(".overlay-portal"))}},3425:function(e,t,n){"use strict";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.ScreenReaderProvider=t.ScreenReaderContext=void 0;var i=n(4522),a=n(73);t.ScreenReaderContext=(0,i.createContext)((function(e,t){}));var s=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={textToRead:""},t._setTextToRead=function(e,n){void 0===n&&(n=500),setTimeout((function(){t.setState({textToRead:e})}),n)},t}return r(n,e),n.prototype.render=function(){return(0,i.h)(t.ScreenReaderContext.Provider,{value:this._setTextToRead},this.props.children,(0,i.h)("div",{style:a.srWrapper,"aria-live":"polite","data-testid":"screenReaderWrapper"},(0,i.h)("span",{id:"sr-only","aria-label":this.state.textToRead},this.state.textToRead)))},n}(i.Component);t.ScreenReaderProvider=s},9695:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Add=void 0;var o=n(4522);t.Add=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M21.8083 4C22.4665 4 23 4.55964 23 5.25V18.75C23 19.4404 22.4665 20 21.8083 20H2.19167C1.53353 20 1 19.4404 1 18.75V5.25C1 4.55964 1.53353 4 2.19167 4H21.8083ZM15 6H3V18H15V6ZM12.999 8.967L13 9L12.998 8.94L12.999 8.967L13 9V15C13 15.5523 12.5523 16 12 16C11.4872 16 11.0645 15.614 11.0067 15.1166L11 15V11.414L6.70711 15.7071C6.34662 16.0676 5.77939 16.0953 5.3871 15.7903L5.29289 15.7071C4.93241 15.3466 4.90468 14.7794 5.2097 14.3871L5.29289 14.2929L9.584 10H6C5.48716 10 5.06449 9.61396 5.00673 9.11662L5 9C5 8.44772 5.44772 8 6 8L12.0193 8.00018C12.0427 8.00063 12.066 8.00189 12.0893 8.00397C12.1097 8.00575 12.1294 8.0081 12.149 8.01102C12.1659 8.01363 12.1834 8.0167 12.2007 8.02024C12.2227 8.02464 12.2444 8.02983 12.2658 8.03572C12.2815 8.0401 12.2969 8.04473 12.3121 8.04974C12.3318 8.05612 12.3516 8.06332 12.3711 8.0711L12.4232 8.09367C12.4439 8.10338 12.4643 8.11379 12.4843 8.12488C12.4964 8.1315 12.5086 8.13861 12.5207 8.146C12.5463 8.16172 12.5711 8.17849 12.5952 8.19631L12.6525 8.24221L12.6167 8.21279C12.6802 8.26255 12.7374 8.31982 12.7872 8.38325C12.7927 8.39016 12.7982 8.3974 12.8037 8.40469C12.8215 8.42887 12.8383 8.45372 12.8539 8.47934L12.8753 8.51594C12.8862 8.53571 12.8966 8.55611 12.9063 8.5769L12.9288 8.62866C12.9367 8.64842 12.9439 8.6682 12.9505 8.68826C12.9553 8.70315 12.9599 8.71854 12.9642 8.73401C12.9702 8.75556 12.9754 8.77725 12.9798 8.79921C12.9833 8.81662 12.9864 8.83405 12.989 8.85153L12.9972 8.92482L12.998 8.94L12.999 8.967Z",fill:"white"}))}},5254:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Close=void 0;var o=n(4522);t.Close=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M11.6592 10.245L6.70483 5.29061C6.31701 4.9028 5.68581 4.90476 5.29528 5.29528C4.90204 5.68853 4.90267 6.31688 5.29061 6.70483L10.245 11.6592L5.29061 16.6137C4.9028 17.0015 4.90476 17.6327 5.29528 18.0232C5.68853 18.4165 6.31688 18.4158 6.70483 18.0279L11.6592 13.0735L16.6137 18.0279C17.0015 18.4157 17.6327 18.4137 18.0232 18.0232C18.4165 17.63 18.4158 17.0016 18.0279 16.6137L13.0735 11.6592L18.0279 6.70483C18.4157 6.31701 18.4137 5.68581 18.0232 5.29528C17.63 4.90204 17.0016 4.90267 16.6137 5.29061L11.6592 10.245Z",fill:"white"}))}},1577:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Download=void 0;var o=n(4522);t.Download=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M17.5 6C17.5 5.44772 17.0523 5 16.5 5L16.3834 5.00673C15.886 5.06449 15.5 5.48716 15.5 6L15.4997 17.693L9.71029 12.2702C9.30721 11.8926 8.67439 11.9133 8.29683 12.3164C7.91928 12.7195 7.93998 13.3523 8.34306 13.7298L15.8164 20.7298C15.8212 20.7343 15.826 20.7387 15.8308 20.7431L15.8164 20.7298L15.9035 20.8027C15.9034 20.8026 15.9037 20.8028 15.9035 20.8027C15.9135 20.8101 15.9231 20.817 15.9333 20.824C15.956 20.8397 15.9793 20.8544 16.0038 20.8684C16.0148 20.8747 16.0259 20.8808 16.0366 20.8864C16.0596 20.8984 16.0832 20.9096 16.1077 20.9201C16.1223 20.9263 16.1371 20.9322 16.1515 20.9376C16.1769 20.947 16.2028 20.9555 16.2299 20.963C16.2399 20.9658 16.25 20.9684 16.2595 20.9709C16.3365 20.9899 16.4171 21 16.5 21C16.5804 21 16.6585 20.9905 16.7336 20.9725C16.7521 20.968 16.7706 20.963 16.7889 20.9576C16.8097 20.9514 16.8303 20.9444 16.8507 20.9367C16.8632 20.932 16.8756 20.9271 16.8878 20.922C16.9121 20.9118 16.936 20.9006 16.9596 20.8883C16.9735 20.8812 16.9872 20.8736 17.0007 20.8658C17.0223 20.8533 17.0434 20.84 17.0636 20.8262C17.0764 20.8174 17.0891 20.8083 17.1021 20.7985C17.1224 20.7831 17.1422 20.767 17.161 20.7504C17.1685 20.7437 17.176 20.737 17.1834 20.7301L24.6619 13.7301C25.0651 13.3527 25.086 12.7198 24.7086 12.3166L24.6172 12.2304C24.2352 11.9126 23.6674 11.9215 23.2952 12.2699L17.4997 17.694L17.5 6Z",fill:"white"}),(0,o.h)("path",{d:"M27 26C27 26.5523 26.5523 27 26 27H7C6.44772 27 6 26.5523 6 26C6 25.4477 6.44772 25 7 25H26C26.5523 25 27 25.4477 27 26Z",fill:"white"}))}},2942:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Expand=void 0;var o=n(4522);t.Expand=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M20.997 3.924L20.998 3.945L20.999 3.98L21 4V10C21 10.5523 20.5523 11 20 11C19.4872 11 19.0645 10.614 19.0067 10.1166L19 10V6.416L14.7071 10.7071C14.3466 11.0676 13.7794 11.0953 13.3871 10.7903L13.2929 10.7071C12.9324 10.3466 12.9047 9.77939 13.2097 9.3871L13.2929 9.29289L17.586 5H14C13.4872 5 13.0645 4.61396 13.0067 4.11662L13 4C13 3.48716 13.386 3.06449 13.8834 3.00673L14 3L20.0332 3.00054C20.0503 3.00109 20.0683 3.00216 20.0862 3.0037C20.1079 3.00553 20.1285 3.00797 20.149 3.01102C20.166 3.01363 20.1834 3.0167 20.2007 3.02024C20.2227 3.02464 20.2444 3.02983 20.2658 3.03572C20.2815 3.0401 20.2969 3.04473 20.3121 3.04974C20.3318 3.05612 20.3516 3.06332 20.3711 3.0711L20.4232 3.09367C20.4439 3.10338 20.4643 3.11379 20.4843 3.12488C20.4964 3.1315 20.5086 3.13861 20.5207 3.146C20.5463 3.16172 20.5711 3.17849 20.5952 3.19631L20.6525 3.24221L20.6168 3.21279C20.6802 3.26255 20.7374 3.31982 20.7872 3.38325C20.7927 3.39016 20.7982 3.3974 20.8037 3.40469C20.8215 3.42887 20.8383 3.45373 20.8539 3.47934L20.8753 3.51594C20.8862 3.53571 20.8966 3.55611 20.9063 3.5769L20.9288 3.62866C20.9367 3.64842 20.9439 3.6682 20.9505 3.68826C20.9553 3.70315 20.9599 3.71854 20.9642 3.73401C20.9702 3.75556 20.9754 3.77725 20.9798 3.79921C20.9833 3.81662 20.9864 3.83405 20.989 3.85153L20.996 3.91075L20.996 3.919L20.997 3.921V3.924ZM3.002 20.059V20.071L3.00175 20.0593C3.00122 20.0503 3.00081 20.0413 3.00052 20.0323L3 14C3 13.4477 3.44772 13 4 13C4.51284 13 4.93551 13.386 4.99327 13.8834L5 14V17.586L9.29289 13.2929C9.65338 12.9324 10.2206 12.9047 10.6129 13.2097L10.7071 13.2929C11.0676 13.6534 11.0953 14.2206 10.7903 14.6129L10.7071 14.7071L6.416 19H10C10.5128 19 10.9355 19.386 10.9933 19.8834L11 20C11 20.5128 10.614 20.9355 10.1166 20.9933L10 21H4C3.99354 21 3.98709 20.9999 3.98066 20.9998C3.95732 20.9994 3.93401 20.9981 3.91075 20.996C3.89031 20.9943 3.87058 20.9919 3.85104 20.989C3.83405 20.9864 3.81662 20.9833 3.79927 20.9798C3.77725 20.9754 3.75556 20.9702 3.73416 20.9643C3.71854 20.9599 3.70315 20.9553 3.68786 20.9503C3.6682 20.9439 3.64842 20.9367 3.62894 20.9289L3.57678 20.9063C3.55611 20.8966 3.53571 20.8862 3.51572 20.8751C3.50361 20.8685 3.49139 20.8614 3.47929 20.854C3.45373 20.8383 3.42887 20.8215 3.40484 20.8037L3.34745 20.7578L3.38325 20.7872C3.31982 20.7374 3.26255 20.6802 3.21279 20.6168C3.20728 20.6098 3.20175 20.6026 3.19633 20.5953C3.17849 20.5711 3.16172 20.5463 3.14607 20.5207L3.12467 20.4841C3.11379 20.4643 3.10338 20.4439 3.09365 20.4231L3.07123 20.3713C3.06332 20.3516 3.05612 20.3318 3.04955 20.3117C3.04473 20.2969 3.0401 20.2815 3.03585 20.266C3.02983 20.2444 3.02464 20.2227 3.02017 20.2008C3.0167 20.1834 3.01363 20.1659 3.01102 20.1485L3.0037 20.0862L3.002 20.059Z",fill:"white"}))}},1861:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icons=void 0;var o=n(5254),r=n(9919),i=n(1577),a=n(7024),s=n(8835),l=n(1223),c=n(7858),u=n(6563),p=n(2489),_=n(9695),d=n(756),h=n(4726),A=n(2942);t.Icons={close:o.Close,print:r.Print,download:i.Download,related:a.Related,message:s.Message,share:l.Share,more:c.More,quiz:u.QuizIcon,switch:p.Switch,add:_.Add,minimizedVideo:d.MinimizedVideo,pictureInPicture:h.PictureInPicture,expand:A.Expand}},8835:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var o=n(4522);t.Message=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M25 5C27.2091 5 29 6.75035 29 8.90952V18.6833C29 20.8425 27.2091 22.5928 25 22.5928H14.985L10.7019 26.7188C10.546 26.8689 10.3449 26.9641 10.1302 26.9917L10 27C9.44772 27 9 26.5624 9 26.0226V22.5928H7C4.79086 22.5928 3 20.8425 3 18.6833V8.90952C3 6.75035 4.79086 5 7 5H25ZM25 6.95476H7C5.89543 6.95476 5 7.82994 5 8.90952V18.6833C5 19.7629 5.89543 20.6381 7 20.6381H11V23.687L14.1651 20.6381H25C26.1046 20.6381 27 19.7629 27 18.6833V8.90952C27 7.82994 26.1046 6.95476 25 6.95476ZM19 14.7738C19.5523 14.7738 20 15.2114 20 15.7512C20 16.291 19.5523 16.7286 19 16.7286H10C9.44772 16.7286 9 16.291 9 15.7512C9 15.2114 9.44772 14.7738 10 14.7738H19ZM23 10.8643C23.5523 10.8643 24 11.3019 24 11.8417C24 12.3815 23.5523 12.819 23 12.819H10C9.44772 12.819 9 12.3815 9 11.8417C9 11.3019 9.44772 10.8643 10 10.8643H23Z",fill:"white"}))}},756:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinimizedVideo=void 0;var o=n(4522);t.MinimizedVideo=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.25 4.5H18.75C19.9926 4.5 21 5.50736 21 6.75V17.25C21 18.4926 19.9926 19.5 18.75 19.5H5.25C4.00736 19.5 3 18.4926 3 17.25V6.75C3 5.50736 4.00736 4.5 5.25 4.5ZM5.25 6C4.83579 6 4.5 6.33579 4.5 6.75V17.25C4.5 17.6642 4.83579 18 5.25 18H18.75C19.1642 18 19.5 17.6642 19.5 17.25V6.75C19.5 6.33579 19.1642 6 18.75 6H5.25ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},7858:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.More=void 0;var o=n(4522);t.More=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M8 12C8 13.1046 7.10457 14 6 14C4.89543 14 4 13.1046 4 12C4 10.8954 4.89543 10 6 10C7.10457 10 8 10.8954 8 12ZM14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12ZM20 12C20 13.1046 19.1046 14 18 14C16.8954 14 16 13.1046 16 12C16 10.8954 16.8954 10 18 10C19.1046 10 20 10.8954 20 12Z",fill:"white"}))}},4726:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PictureInPicture=void 0;var o=n(4522);t.PictureInPicture=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.75 4.5H5.25C4.00736 4.5 3 5.50736 3 6.75V17.25C3 18.4926 4.00736 19.5 5.25 19.5H18.75C19.9926 19.5 21 18.4926 21 17.25V6.75C21 5.50736 19.9926 4.5 18.75 4.5ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},9919:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Print=void 0;var o=n(4522);t.Print=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23 23H26C27.1046 23 28 22.1046 28 21V11C28 9.89543 27.1046 9 26 9H23V5C23 3.89543 22.1046 3 21 3H11C9.89543 3 9 3.89543 9 5V9H6C4.89543 9 4 9.89543 4 11V21C4 22.1046 4.89543 23 6 23H9V28C9 29.1046 9.89543 30 11 30H21C22.1046 30 23 29.1046 23 28V23ZM6 11V21H9V19C8.44772 19 8 18.5523 8 18C8 17.4477 8.44772 17 9 17H23C23.5523 17 24 17.4477 24 18C24 18.5523 23.5523 19 23 19V21H26V11H6ZM21 9V5H11V9H21ZM11 19V28H21V19H11Z",fill:"white"}))}},6563:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuizIcon=void 0;var o=n(4522);t.QuizIcon=function(){return(0,o.h)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.49857 2.11499L12.7442 4.2052C12.9162 4.28987 12.9812 4.48721 12.8895 4.64597C12.8594 4.69807 12.8145 4.74163 12.7597 4.77201L8.54484 7.10634C8.20953 7.29205 7.79063 7.29205 7.45532 7.10634L3.2405 4.77202C3.07335 4.67945 3.01915 4.47933 3.11944 4.32505C3.15235 4.27441 3.19956 4.23299 3.256 4.2052L7.50203 2.11498C7.81345 1.96167 8.18715 1.96168 8.49857 2.11499ZM14 6.02878V10.7642C14 11.1075 13.8049 11.4256 13.486 11.6022L9.24043 13.9536C9.07328 14.0461 8.85649 13.9961 8.7562 13.8418C8.72329 13.7912 8.7059 13.7333 8.7059 13.6742V8.93882C8.7059 8.59551 8.90104 8.27738 9.21997 8.10075L13.4655 5.74942C13.6326 5.65685 13.8494 5.70688 13.9497 5.86116C13.9826 5.91179 14 5.96973 14 6.02878ZM6.5145 8.31192L2.50483 6.04476C2.45303 6.01547 2.39375 6 2.33333 6C2.14924 6 2 6.14064 2 6.31412V10.88C2 11.211 2.1843 11.5178 2.4855 11.6881L6.49517 13.9552C6.54697 13.9845 6.60625 14 6.66667 14C6.85076 14 7 13.8594 7 13.6859V9.12C7 8.78898 6.8157 8.48223 6.5145 8.31192Z",fill:"white"}))}},7024:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Related=void 0;var o=n(4522);t.Related=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 7H12C13.1046 7 14 7.89543 14 9V13C14 14.1046 13.1046 15 12 15H8C6.89543 15 6 14.1046 6 13V9C6 7.89543 6.89543 7 8 7ZM8 13H12V9H8V13Z",fill:"white"}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 18H12C13.1046 18 14 18.8954 14 20V24C14 25.1046 13.1046 26 12 26H8C6.89543 26 6 25.1046 6 24V20C6 18.8954 6.89543 18 8 18ZM8 24H12V20H8V24Z",fill:"white"}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 7H20C18.8954 7 18 7.89543 18 9V13C18 14.1046 18.8954 15 20 15H24C25.1046 15 26 14.1046 26 13V9C26 7.89543 25.1046 7 24 7ZM24 13H20V9H24V13Z",fill:"white"}),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 18H24C25.1046 18 26 18.8954 26 20V24C26 25.1046 25.1046 26 24 26H20C18.8954 26 18 25.1046 18 24V20C18 18.8954 18.8954 18 20 18ZM20 24H24V20H20V24Z",fill:"white"}))}},1223:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Share=void 0;var o=n(4522);t.Share=function(){return(0,o.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M22.6667 12.6667C24.5076 12.6667 26 11.1743 26 9.33333C26 7.49238 24.5076 6 22.6667 6C20.8257 6 19.3333 7.49238 19.3333 9.33333C19.3333 9.38882 19.3347 9.44399 19.3374 9.49881L11.9575 13.9443C11.3473 13.1665 10.3987 12.6667 9.33333 12.6667C7.49238 12.6667 6 14.1591 6 16C6 17.8409 7.49238 19.3333 9.33333 19.3333C10.3981 19.3333 11.3462 18.8341 11.9564 18.057L19.3374 22.5013C19.3347 22.5561 19.3333 22.6112 19.3333 22.6667C19.3333 24.5076 20.8257 26 22.6667 26C24.5076 26 26 24.5076 26 22.6667C26 20.8257 24.5076 19.3333 22.6667 19.3333C21.6074 19.3333 20.6636 19.8274 20.053 20.5976L12.864 16.2689L12.8651 15.7324L20.0531 11.4025C20.6637 12.1727 21.6075 12.6667 22.6667 12.6667ZM22.6667 10.6667C21.9303 10.6667 21.3333 10.0697 21.3333 9.33333C21.3333 8.59695 21.9303 8 22.6667 8C23.403 8 24 8.59695 24 9.33333C24 10.0697 23.403 10.6667 22.6667 10.6667ZM9.33333 17.3333C8.59695 17.3333 8 16.7364 8 16C8 15.2636 8.59695 14.6667 9.33333 14.6667C10.0697 14.6667 10.6667 15.2636 10.6667 16C10.6667 16.7364 10.0697 17.3333 9.33333 17.3333ZM21.3333 22.6667C21.3333 23.403 21.9303 24 22.6667 24C23.403 24 24 23.403 24 22.6667C24 21.9303 23.403 21.3333 22.6667 21.3333C21.9303 21.3333 21.3333 21.9303 21.3333 22.6667Z",fill:"white"}))}},2489:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Switch=void 0;var o=n(4522);t.Switch=function(){return(0,o.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M17.6744 9.27934L21.7563 13.3632L21.8282 13.4537L21.887 13.5492L21.9333 13.6489L21.9684 13.7556L21.9824 13.8172L21.9974 13.929L22 14L21.9897 14.1405L21.9824 14.1828L21.9535 14.2949L21.9231 14.3759L21.887 14.4508L21.8281 14.5463L21.7763 14.6137L21.7207 14.6744L17.6744 18.7207C17.3019 19.0931 16.6981 19.0931 16.3256 18.7207C15.9818 18.3769 15.9554 17.8359 16.2463 17.4617L16.3256 17.3719L18.7439 14.9536L12.9537 14.9537C12.4675 14.9537 12.0663 14.5899 12.0074 14.1196L12 14C12 13.5109 12.3682 13.1078 12.8425 13.0527L12.9537 13.0463L18.7426 13.0451L16.3256 10.6281C15.9798 10.2823 15.9551 9.73687 16.2515 9.36252L16.3256 9.27934C16.6981 8.90689 17.3019 8.90689 17.6744 9.27934ZM6.32562 5.27934C6.69807 4.90689 7.30193 4.90689 7.67438 5.27934L7.74849 5.36252C8.04493 5.73687 8.02023 6.28225 7.67438 6.6281L5.2574 9.04508L11.0463 9.04628L11.1575 9.0527C11.6318 9.10779 12 9.5109 12 10L11.9926 10.1196C11.9337 10.5899 11.5325 10.9537 11.0463 10.9537L5.25605 10.9536L7.67438 13.3719L7.75372 13.4617C8.04463 13.8359 8.01818 14.3769 7.67438 14.7207C7.30193 15.0931 6.69807 15.0931 6.32562 14.7207L2.25793 10.6523L2.18664 10.5668L2.12413 10.4708L2.07695 10.3759L2.03697 10.2639L2.01028 10.1405L2 10C2 9.95226 2.00351 9.90534 2.01036 9.85937L2.01758 9.81716L2.04651 9.70514L2.08932 9.59642L2.12415 9.52899L2.18631 9.43351L2.24369 9.36325L6.32562 5.27934Z",fill:"white"}))}},4820:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t.IconSize=void 0;var o,r=n(4522),i=n(42),a=n(1861),s=n(3278);!function(e){e.small="small",e.medium="medium",e.large="large"}(o=t.IconSize||(t.IconSize={})),t.Icon=function(e){var t=a.Icons[e.name];return t?(0,r.h)("div",{className:i(s.iconWrapper,s[e.size])},(0,r.h)(t,null)):null},t.Icon.defaultProps={size:o.medium}},573:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(197),t),r(n(6265),t),r(n(1644),t),r(n(5454),t),r(n(172),t)},2980:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1644:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(2980),t)},1365:function(e,t,n){"use strict";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.BannerContainer=void 0;var i=n(4522),a=n(6502),s=n(8482),l=n(334),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(e){var t=this.props.theme,n=t.backgroundColor,o=t.blur;return(0,i.h)("div",{className:a.bannerContainerRoot,"aria-live":"polite"},(0,i.h)("div",{style:"\n                background-color:".concat(n,"; \n                backdrop-filter: blur(").concat(o,");\n             "),className:a.bannerContainer},(0,i.h)("button",{className:a.closeButton,onClick:e.onClose},(0,i.h)(s.CloseSmall,{className:a.small}),(0,i.h)(l.CloseLarge,{className:a.large})),this.props.children))},t}(i.Component);t.BannerContainer=c},334:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CloseLarge=void 0;var r=n(4522);t.CloseLarge=function(e){return(0,r.h)("svg",o({width:"32px",height:"32px",viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),(0,r.h)("g",{id:"Icons/32x32/Menu-Player-Close",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,r.h)("path",{d:"M17.4142136,16 L22.363961,20.9497475 C22.7544853,21.3402718 22.7544853,21.9734367 22.363961,22.363961 C21.9734367,22.7544853 21.3402718,22.7544853 20.9497475,22.363961 L16,17.4142136 L11.0502525,22.363961 C10.6597282,22.7544853 10.0265633,22.7544853 9.63603897,22.363961 C9.24551468,21.9734367 9.24551468,21.3402718 9.63603897,20.9497475 L14.5857864,16 L9.63603897,11.0502525 C9.24551468,10.6597282 9.24551468,10.0265633 9.63603897,9.63603897 C10.0265633,9.24551468 10.6597282,9.24551468 11.0502525,9.63603897 L16,14.5857864 L20.9497475,9.63603897 C21.3402718,9.24551468 21.9734367,9.24551468 22.363961,9.63603897 C22.7544853,10.0265633 22.7544853,10.6597282 22.363961,11.0502525 L17.4142136,16 Z",id:"Path",fill:"#FFFFFF"})))}},8482:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CloseSmall=void 0;var r=n(4522);t.CloseSmall=function(e){return(0,r.h)("svg",o({xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10",viewBox:"0 0 10 10"},e),(0,r.h)("path",{fill:"#FFF","fill-rule":"evenodd",d:"M5.956 5l3.348-3.348A.674.674 0 0 0 9.3.7a.672.672 0 0 0-.952-.004L5 4.044 1.652.696A.674.674 0 0 0 .7.7a.672.672 0 0 0-.004.952L4.044 5 .696 8.348A.674.674 0 0 0 .7 9.3c.265.266.69.266.952.004L5 5.956l3.348 3.348c.262.262.689.26.952-.004a.672.672 0 0 0 .004-.952L5.956 5z",opacity:".9"}))}},5827:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BannerContainer=void 0;var o=n(1365);Object.defineProperty(t,"BannerContainer",{enumerable:!0,get:function(){return o.BannerContainer}})},9673:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BannerManager=t.VisibilityMode=void 0;var o,r=n(7720),i=n(4522),a=n(4570),s=n(5827),l=n(7863),c=n(8853);!function(e){e.VISIBLE="VISIBLE",e.HIDDEN="HIDDEN"}(o=t.VisibilityMode||(t.VisibilityMode={}));var u={theme:{backgroundColor:"rgba(0, 0, 0, .7)",blur:"10px"}},p=function(){function e(e){this.options=e,this._floatingItem=null,this._timerSubscription=void 0,this._options=e,this._bannerConfig=(0,c.getContribConfig)(this._options.kalturaPlayer,"ui.banner",u)}return e.prototype.add=function(e){return this._floatingItem&&this.remove(),this._floatingItem=this._options.floatingManager.add({label:"Banner",mode:r.FloatingUIModes.Immediate,position:r.FloatingPositions.InteractiveArea,renderContent:this._createRenderBanner(e,{onClose:this._handleCloseEvent.bind(this),theme:this._bannerConfig.theme})}),e.autoClose&&this._startDurationTimer(e.duration),this._getState()},e.prototype.remove=function(){this._floatingItem&&(this._timerSubscription&&clearTimeout(this._timerSubscription),this._options.floatingManager.remove(this._floatingItem),this._floatingItem=null)},e.prototype.reset=function(){this.remove()},e.prototype._createRenderBanner=function(e,t){var n=e.content,o=e.renderContent,r=t.onClose,l=t.theme;return function(e){return(0,i.h)(s.BannerContainer,{onClose:r,theme:l},o?o(n,e):(0,i.h)(a.Banner,{content:n}))}},e.prototype._handleCloseEvent=function(){this.remove()},e.prototype._startDurationTimer=function(e){void 0===e&&(e=6e4),this._timerSubscription=setTimeout(this.remove.bind(this),Math.max(5e3,e))},e.prototype._getState=function(){var e=(0,l.getPlayerSize)(this._options.kalturaPlayer);return{visibilityMode:!e||e.width<480?o.HIDDEN:o.VISIBLE}},e}();t.BannerManager=p},6797:function(e,t,n){"use strict";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.Banner=void 0;var i=n(4522),a=n(9480),s=n(5316),l=n(6339),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(e){var t=e.content,n=t.text,o=t.title,r=void 0===o?"Audience asks:":o,s=t.icon,l=void 0===s?this._defaultIcon():s;return(0,i.h)("div",{className:a.defaultBannerRoot+" "+a.bannerWrapper},(0,i.h)("div",{className:a.iconContainer},(0,i.h)("div",{className:a.iconWrapper},l)),(0,i.h)("div",{className:a.bannerBody},(0,i.h)("div",{className:a.title},r),(0,i.h)("div",{className:a.text},n)))},t.prototype._defaultIcon=function(){return(0,i.h)("div",{className:a.iconImage},(0,i.h)(s.SomeoneAsksLarge,{className:a.large}),(0,i.h)(l.SomeoneAsksSmall,{className:a.small}))},t}(i.Component);t.Banner=c},4570:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Banner=void 0;var o=n(6797);Object.defineProperty(t,"Banner",{enumerable:!0,get:function(){return o.Banner}})},5316:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SomeoneAsksLarge=void 0;var r=n(4522);t.SomeoneAsksLarge=function(e){return(0,r.h)("svg",o({width:"32px",height:"32px",viewBox:"0 0 32 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),(0,r.h)("g",{id:"Icons/32/Someone-asks",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,r.h)("g",{id:"Group",transform:"translate(4.000000, 5.000000)",fill:"#B2D238"},(0,r.h)("ellipse",{id:"Oval",cx:"12",cy:"5.5",rx:"6",ry:"5.5"}),(0,r.h)("path",{d:"M12,13 C7.995,13 0,15.01 0,19 L0,20.5 C0,21.325 0.675,22 1.5,22 L22.5,22 C23.325,22 24,21.325 24,20.5 L24,19 C24,15.01 16.005,13 12,13 Z",id:"Path"}))))}},6339:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.SomeoneAsksSmall=void 0;var r=n(4522);t.SomeoneAsksSmall=function(e){return(0,r.h)("svg",o({width:"20px",height:"20px",viewBox:"0 0 20 20",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e),(0,r.h)("g",{id:"Icons/20/Someone-asks",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,r.h)("g",{id:"Group",transform:"translate(2.000000, 2.000000)",fill:"#B2D238"},(0,r.h)("circle",{id:"Oval",cx:"8",cy:"4",r:"4"}),(0,r.h)("path",{d:"M8,9 C5.33,9 0,10.5633333 0,13.6666667 L0,14.8333333 C0,15.475 0.45,16 1,16 L15,16 C15.55,16 16,15.475 16,14.8333333 L16,13.6666667 C16,10.5633333 10.67,9 8,9 Z",id:"Path"}))))}},6908:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContribServices=t.getPlayerContribRegistry=void 0;var o=n(8717),r=n(3199),i=n(5753),a=n(8529),s=n(9673);function l(e){return o.PlayerContribRegistry.get(e)}t.getPlayerContribRegistry=l;var c=function(){function e(e,t){var n=this;this._playerContribRegistry=e,this._options=t,this._registered=!1,this._addListeners=function(){var e=n._options.kalturaPlayer;e.addEventListener(e.Event.PLAYER_RESET,n.reset),e.addEventListener(e.Event.PLAYER_DESTROY,n._removeListeners)},this._removeListeners=function(){var e=n._options.kalturaPlayer;e.removeEventListener(e.Event.PLAYER_RESET,n.reset),e.removeEventListener(e.Event.PLAYER_DESTROY,n._removeListeners)},this.register=function(){return n._registered?[]:(n._registered=!0,n._presetManager.registerComponents())},this.reset=function(){n._toastManager.reset(),n._floatingManager.reset(),n._bannerManager.reset()},this.destroy=function(){n._registered=!1};var o=this._options.kalturaPlayer,l=new r.PresetManager({kalturaPlayer:o}),c=new a.FloatingManager({kalturaPlayer:o,presetManager:l}),u=new i.ToastManager({floatingManager:c}),p=new s.BannerManager({kalturaPlayer:o,floatingManager:c});this._toastManager=u,this._floatingManager=c,this._presetManager=l,this._bannerManager=p,this._addListeners()}return e.get=function(t){var n=l(t.kalturaPlayer);return n.register("ContribServices",(function(){return new e(n,t)}))},Object.defineProperty(e.prototype,"presetManager",{get:function(){return this._presetManager},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"floatingManager",{get:function(){return this._floatingManager},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toastManager",{get:function(){return this._toastManager},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bannerManager",{get:function(){return this._bannerManager},enumerable:!1,configurable:!0}),e}();t.ContribServices=c},8853:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContribConfig=void 0;var o=n(5816);t.getContribConfig=function(e,t,n,r){return o.KalturaPlayerUtils.getPlayerConfig(e,"contrib.".concat(t),n,r)}},5092:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(4522);t.default=function(e,t,n){return(0,o.h)("a",{href:e,key:n,target:"_blank",rel:"noopener noreferrer"},t)}},8842:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventsManager=void 0;var n=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=n},7720:function(e,t){"use strict";var n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.FloatingPositions=t.FloatingUIModes=void 0,(o=t.FloatingUIModes||(t.FloatingUIModes={})).MediaLoaded="MediaLoaded",o.OnDemand="OnDemand",o.Immediate="Immediate",o.FirstPlay="FirstPlay",(n=t.FloatingPositions||(t.FloatingPositions={})).VideoArea="VideoArea",n.PresetArea="PresetArea",n.InteractiveArea="InteractiveArea"},5921:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FloatingItem=void 0;var o=n(4522),r=n(7720),i=n(9017),a=function(){function e(e){var t=this;this._destroyed=!1,this._isShown=!1,this._componentRef=null,this.remove=function(){t._isShown=!1,t._componentRef&&t._componentRef.update()},this.add=function(){t._isShown=!0,t._componentRef&&t._componentRef.update()},this._handleMediaLoaded=function(){var e=t._options.kalturaPlayer;e.removeEventListener(e.Event.MEDIA_LOADED,t._handleMediaLoaded),t.add()},this._handleFirstPlay=function(){var e=t._options.kalturaPlayer;e.removeEventListener(e.Event.FIRST_PLAY,t._handleFirstPlay),t.add()},this._options=e,this._addPlayerBindings()}return Object.defineProperty(e.prototype,"data",{get:function(){return this._options.data},enumerable:!1,configurable:!0}),e.prototype.update=function(){this._componentRef&&this._componentRef.update()},e.prototype.destroy=function(){this._destroyed=!0,this.remove()},e.prototype.renderFloatingChild=function(e){var t=this,n=this._options.data.label;return(0,o.h)(i.ManagedComponent,{label:n,renderChildren:function(){return t._options.data.renderContent(e)},isShown:function(){return t._isShown},ref:function(e){return t._componentRef=e}})},e.prototype._addPlayerBindings=function(){var e=this._options,t=e.kalturaPlayer,n=e.data;n.mode===r.FloatingUIModes.MediaLoaded&&t.addEventListener(t.Event.MEDIA_LOADED,this._handleMediaLoaded),n.mode===r.FloatingUIModes.FirstPlay&&t.addEventListener(t.Event.FIRST_PLAY,this._handleFirstPlay),n.mode===r.FloatingUIModes.Immediate&&this.add()},e}();t.FloatingItem=a},8529:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)},r=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.FloatingManager=void 0;var i=n(5921),a=n(7720),s=n(3199),l=n(4522),c=n(7863),u=n(9017),p=n(7417),_=n(8853),d={presetAreasMapping:{Playback:{VideoArea:"VideoArea",PresetArea:"PresetArea",InteractiveArea:"InteractiveArea"},Live:{VideoArea:"VideoArea",PresetArea:"PresetArea",InteractiveArea:"InteractiveArea"}}},h=["VideoArea","PresetArea","InteractiveArea"],A=function(){function e(e){var t,n,o=this;this._options=e,this._items=((t={})[a.FloatingPositions.VideoArea]=[],t[a.FloatingPositions.InteractiveArea]=[],t[a.FloatingPositions.PresetArea]=[],t),this._componentRef=((n={})[a.FloatingPositions.InteractiveArea]=null,n[a.FloatingPositions.VideoArea]=null,n[a.FloatingPositions.PresetArea]=null,n),this._cache={canvas:{playerSize:{width:0,height:0},videoSize:{width:0,height:0}}},this._renderItems=function(e){var t=o._getRendererProps({});return o._items[e].map((function(e){return e.renderFloatingChild(t)}))},this._renderChild=function(e){return(0,l.h)(u.ManagedComponent,{label:"floating-manager",renderChildren:function(){return o._renderItems(e)},isShown:function(){return!0},ref:function(t){return o._componentRef[e]=t}})},this._floatingConfig=(0,_.getContribConfig)(this._options.kalturaPlayer,"ui.floating",d,{explicitMerge:["presetAreasMapping"]});var r=p.PresetsUtils.groupPresetAreasByType({presetAreasMapping:this._floatingConfig.presetAreasMapping,acceptableTypes:h});Object.keys(r).forEach((function(e){o._options.presetManager.add({label:"floating-manager",presetAreas:r[e],renderChild:function(){return o._renderChild(a.FloatingPositions[e])}})})),this._addPlayerBindings(),this._updateCachedCanvas()}return e.prototype.add=function(e){var t=this._options.presetManager,n=o(o({presetManager:t},this._options),{data:e}),r=new i.FloatingItem(n);return this._items[e.position].push(r),r},e.prototype.remove=function(e){var t=this._items[e.data.position],n=t.indexOf(e);n>-1?(t[n].destroy(),t.splice(n,1)):console.warn("couldn't remove ".concat(e," since it wasn't found"))},e.prototype.reset=function(){r(r(r([],this._items.VideoArea,!0),this._items.InteractiveArea,!0),this._items.PresetArea,!0).forEach((function(e){try{e.destroy()}catch(e){console.warn(e)}})),this._items.VideoArea=[],this._items.PresetArea=[],this._items.InteractiveArea=[]},e.prototype._getRendererProps=function(e){var t=this._options.kalturaPlayer;return{currentTime:void 0!==e.currentTime?e.currentTime:1e3*t.currentTime,canvas:this._cache.canvas}},e.prototype._updateCachedCanvas=function(){this._cache.canvas={playerSize:(0,c.getPlayerSize)(this._options.kalturaPlayer),videoSize:(0,c.getVideoSize)(this._options.kalturaPlayer)}},e.prototype._updateComponents=function(){this._componentRef.InteractiveArea&&this._componentRef.InteractiveArea.update(),this._componentRef.PresetArea&&this._componentRef.PresetArea.update(),this._componentRef.VideoArea&&this._componentRef.VideoArea.update()},e.prototype._addPlayerBindings=function(){var e=this,t=this._options.kalturaPlayer;t.addEventListener(t.Event.TIME_UPDATE,(function(){e._updateComponents()})),t.addEventListener(t.Event.MEDIA_LOADED,(function(){e._updateCachedCanvas(),e._updateComponents()})),t.addEventListener(t.Event.LOADED_DATA,(function(){e._updateCachedCanvas(),e._updateComponents()})),this._options.presetManager.on(s.PresetManagerEventTypes.VideoResizeEvent,(function(){e._updateCachedCanvas(),e._updateComponents()})),this._options.presetManager.on(s.PresetManagerEventTypes.PresetResizeEvent,(function(){e._updateCachedCanvas(),e._updateComponents()}))},e}();t.FloatingManager=A},197:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkifyString=t.VisibilityMode=t.BannerManager=t.FloatingUIModes=t.FloatingPositions=t.FloatingItem=t.ToastSeverity=t.ContribServices=void 0;var o=n(6908);Object.defineProperty(t,"ContribServices",{enumerable:!0,get:function(){return o.ContribServices}});var r=n(5753);Object.defineProperty(t,"ToastSeverity",{enumerable:!0,get:function(){return r.ToastSeverity}});var i=n(5921);Object.defineProperty(t,"FloatingItem",{enumerable:!0,get:function(){return i.FloatingItem}});var a=n(7720);Object.defineProperty(t,"FloatingPositions",{enumerable:!0,get:function(){return a.FloatingPositions}}),Object.defineProperty(t,"FloatingUIModes",{enumerable:!0,get:function(){return a.FloatingUIModes}});var s=n(9673);Object.defineProperty(t,"BannerManager",{enumerable:!0,get:function(){return s.BannerManager}}),Object.defineProperty(t,"VisibilityMode",{enumerable:!0,get:function(){return s.VisibilityMode}});var l=n(8849);Object.defineProperty(t,"LinkifyString",{enumerable:!0,get:function(){return l.LinkifyString}})},5161:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InjectedComponent=void 0;var o=n(413);Object.defineProperty(t,"InjectedComponent",{enumerable:!0,get:function(){return o.InjectedComponent}})},413:function(e,t,n){"use strict";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.InjectedComponent=void 0;var i=n(4522),a=n(4367),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._root=null,t}return r(t,e),t.prototype.shouldComponentUpdate=function(){return!1},t.prototype.componentDidMount=function(){var e=this.props,t=e.onCreate;if(e.label,t){var n=this._root;n&&t({parent:n})}},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.onDestroy,n=(e.label,this._root);n&&t&&t({parent:n})},t.prototype.render=function(){var e=this,t=this.props,n=t.label,o=t.fillContainer?a.fillContainer:"";return(0,i.h)("div",{"data-contrib-injected":n,className:o,ref:function(t){return e._root=t}})},t}(i.Component);t.InjectedComponent=s},5816:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KalturaPlayerUtils=void 0;var o=n(9442),r=function(){function e(){}return e.getPlayerConfig=function(e,t,n,r){var i=o.ObjectUtils.get(e.config,t,{});return o.ObjectUtils.mergeDefaults(i,n,r)},e}();t.KalturaPlayerUtils=r},8849:function(e,t,n){"use strict";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.LinkifyString=void 0;var i=n(4522),a=n(3708),s=n(5092),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._linkify=new a,t}return r(t,e),t.prototype._parseString=function(e){var t=this;if(0===(e||"").trim().length)return"";var n=this._linkify.match(e);if(!n)return e;var o=[],r=0;return n.forEach((function(n,i){n.index>r&&o.push(e.substring(r,n.index));var a=n.url,s=n.text,l=t.props.componentRenderer(a,s,i);o.push(l),r=n.lastIndex})),e.length>r&&o.push(e.substring(r)),1===o.length?o[0]:o},t.prototype.render=function(){return(0,i.h)("span",null,this._parseString(this.props.text))},t.defaultProps={componentRenderer:s.default},t}(i.Component);t.LinkifyString=l},9017:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(3692),t)},3692:function(e,t,n){"use strict";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.ManagedComponent=void 0;var a=n(4522),s=n(4022),l=KalturaPlayer.ui.redux.connect,c=function(e){return{playerSize:e.shell.playerSize}},u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.update=function(){this.setState((function(e){return{toggler:!e.toggler}}))},t.prototype.shouldComponentUpdate=function(e){var t=this.props,n=t.updateOnPlayerSizeChanged,o=t.playerSize;return n&&e.playerSize!==o||e.playerSize===o},t.prototype.componentDidMount=function(){this.setState({toggler:!1})},t.prototype.render=function(){var e=this.props,t=e.fillContainer,n=e.isShown,o=e.playerSize;return n()?(0,a.h)("div",{"data-contrib-item":this.props.label,className:"".concat(t?s.fillContainer:"")},this.props.renderChildren(o)):null},t.defaultProps={fillContainer:!1},i([l(c,null,null,{forwardRef:!0})],t)}(a.Component);t.ManagedComponent=u},9442:function(e,t){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},n.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;var o=function(){function e(){}return e.copyDeep=function(t){var n;return Array.isArray(t)?(n=t.length>0?t.slice(0):[]).forEach((function(t,o){("object"==typeof t&&t!=={}||Array.isArray(t)&&t.length>0)&&(n[o]=e.copyDeep(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.copyDeep(n[t]))}))):n=t,n},e.isObject=function(e){return e&&"object"==typeof e&&!Array.isArray(e)},e.mergeDeep=function(t,n,o){var r,i;if(!n.length)return t;var a=(o?o.explicitMerge:null)||[],s=n.shift();if(e.isObject(t)&&e.isObject(s))for(var l in s)e.isObject(s[l])?(t[l]||Object.assign(t,((r={})[l]={},r)),-1!==a.indexOf(l)?t[l]=e.explicitFlatMerge(t[l],s[l]):e.mergeDeep(t[l],[s[l]],o)):Object.assign(t,((i={})[l]=s[l],i));return e.mergeDeep(t,n,o)},e.mergeDefaults=function(t,n,o){return e.mergeDeep({},[n,t],o)},e.explicitFlatMerge=function(e,t){var o=n({},e);return Object.keys(t).forEach((function(e){null===t[e]||0===Object.keys(t[e]).length?delete o[e]:o[e]=t[e]})),o},e.get=function(e,t,n){for(var o=function(e){var t=[];return e.split(".").forEach((function(e){e.split(/\[([^}]+)\]/g).forEach((function(e){e.length>0&&t.push(e)}))})),t}(t),r=e,i=0;i<o.length;i++){if(!r[o[i]])return n;r=r[o[i]]}return r},e}();t.ObjectUtils=o},8717:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerContribRegistry=void 0;var n=function(){function e(){this._cache={}}return e.get=function(t){return t.__contrib__=t.__contrib__||{},t.__contrib__.services=t.__contrib__.services||new e,t.__contrib__.services},e.prototype.get=function(e){var t=this._cache[e];if(!t)throw new Error("cannot find resource with token ".concat(e));return t},e.prototype.register=function(e,t){var n=this._cache[e];return n||(n=this._cache[e]={instance:t()}),n.instance},e}();t.PlayerContribRegistry=n},7863:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVideoSize=t.getPlayerSize=void 0,t.getPlayerSize=function(e){return e?e.dimensions:{width:0,height:0}},t.getVideoSize=function(e){if(!e)return{width:0,height:0};var t=e.getActiveTracks().video;return t&&void 0!==t.width&&void 0!==t.height?{width:t.width,height:t.height}:e.getVideoElement()?{width:e.getVideoElement().videoWidth,height:e.getVideoElement().videoHeight}:{width:0,height:0}}},6109:function(e,t){"use strict";var n,o,r;Object.defineProperty(t,"__esModule",{value:!0}),t.RelativeToTypes=t.ReservedPresetAreas=t.ReservedPresetNames=void 0,(r=t.ReservedPresetNames||(t.ReservedPresetNames={})).Playback="Playback",r.Live="Live",(o=t.ReservedPresetAreas||(t.ReservedPresetAreas={})).PresetFloating="PresetFloating",o.BottomBarLeftControls="BottomBarLeftControls",o.BottomBarRightControls="BottomBarRightControls",o.TopBarLeftControls="TopBarLeftControls",o.TopBarRightControls="TopBarRightControls",o.SidePanelTop="SidePanelTop",o.SidePanelLeft="SidePanelLeft",o.SidePanelRight="SidePanelRight",o.SidePanelBottom="SidePanelBottom",o.PresetArea="PresetArea",o.InteractiveArea="InteractiveArea",o.PlayerArea="PlayerArea",o.VideoArea="VideoArea",(n=t.RelativeToTypes||(t.RelativeToTypes={})).Before="Before",n.After="After",n.Replace="Replace"},6513:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PresetItem=void 0;var o=n(4522),r=n(6109),i=n(5161),a=function(){function e(e){var t=this;this._render=function(){if(t._options.data.isolateComponent){var e=t._options.data,n=e.label,r=e.fillContainer;return(0,o.h)(i.InjectedComponent,{label:n,fillContainer:r||!1,onCreate:t._onCreate,onDestroy:t._onDestroy})}return t._options.data.renderChild()},this._onDestroy=function(e){e.parent&&(0,o.render)(null,e.parent)},this._onCreate=function(e){try{if(!e.parent)return;var n=t._options.data.renderChild();if(!n)return;(0,o.render)(n,e.parent)}catch(e){}},this._options=e}return Object.defineProperty(e.prototype,"playerConfig",{get:function(){var e=[];for(var t in this._options.data.presetAreas){var n=this._options.data.presetAreas[t],o=this._options.data.relativeTo;if(n){var i={label:this._options.data.label,presets:[t],container:n,get:this._render};if(o)switch(o.type){case r.RelativeToTypes.After:i.afterComponent=o.name;break;case r.RelativeToTypes.Before:i.beforeComponent=o.name;break;case r.RelativeToTypes.Replace:i.replaceComponent=o.name}e.push(i)}}return e},enumerable:!1,configurable:!0}),e}();t.PresetItem=a},3199:function(e,t,n){"use strict";var o=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.PresetManager=t.PresetManagerEventTypes=void 0;var r,i=n(4522),a=n(6513),s=n(8842),l=n(6227),c=n(7417),u=n(8853);!function(e){e.PresetResizeEvent="PresetResizeEvent",e.VideoResizeEvent="VideoResizeEvent"}(r=t.PresetManagerEventTypes||(t.PresetManagerEventTypes={}));var p=["PlayerArea"],_={presetAreasMapping:{Playback:{PlayerArea:"PlayerArea"},Live:{PlayerArea:"PlayerArea"}}},d=function(){function e(e){var t=this;this._events=new s.EventsManager,this._isLocked=!1,this._items=[],this._pendingItems=[],this._registerToPlayer=function(e){e.addEventListener(KalturaPlayer.ui.EventType.UI_PRESET_RESIZE,t._notifyUIPresetResize),e.addEventListener(KalturaPlayer.ui.EventType.VIDEO_RESIZE,t._notifyVideoResize)},this._notifyVideoResize=function(){t._events.emit({type:r.VideoResizeEvent})},this._notifyUIPresetResize=function(){t._events.emit({type:r.PresetResizeEvent})},this._unregisterToPlayer=function(e){e.removeEventListener(KalturaPlayer.ui.EventType.UI_PRESET_RESIZE,t._notifyUIPresetResize),e.removeEventListener(KalturaPlayer.ui.EventType.VIDEO_RESIZE,t._notifyVideoResize)},this.on=this._events.on.bind(this._events),this.off=this._events.off.bind(this._events),this._options=e,this._presetConfig=(0,u.getContribConfig)(this._options.kalturaPlayer,"ui.preset",_,{explicitMerge:["presetAreasMapping"]});var n=c.PresetsUtils.groupPresetAreasByType({presetAreasMapping:this._presetConfig.presetAreasMapping,acceptableTypes:p});this.add({label:"preset-manager",presetAreas:n.PlayerArea,renderChild:function(){return(0,i.h)(l.UIPlayerAdapter,{onMount:t._registerToPlayer,onUnmount:t._unregisterToPlayer})}})}return e.prototype.add=function(e){if(this._isLocked)return console.warn("cannot add new preset items once player completed its' setup phase"),null;var t=new a.PresetItem({kalturaPlayer:this._options.kalturaPlayer,data:e});this._pendingItems.push(t)},e.prototype.lockManager=function(){this._isLocked=!0},e.prototype.registerComponents=function(){var e=[];return this._pendingItems.forEach((function(t){e=o(o([],e,!0),t.playerConfig,!0)})),this._items=o(o([],this._items,!0),this._pendingItems,!0),this._pendingItems=[],e.filter(Boolean)},e}();t.PresetManager=d},7417:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PresetsUtils=void 0;var n=function(){function e(){}return e.groupPresetAreasByType=function(e){var t=e.presetAreasMapping,n=e.acceptableTypes,o={};return n.forEach((function(e){return o[e]={}})),Object.keys(t).forEach((function(e){Object.keys(t[e]).forEach((function(r){-1===n.indexOf(r)||(o[r][e]=t[e][r])}))})),o},e}();t.PresetsUtils=n},5753:function(e,t,n){"use strict";var o=this&&this.__assign||function(){return o=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},o.apply(this,arguments)},r=this&&this.__rest||function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.ToastManager=t.ToastSeverity=void 0;var i,a=n(4144),s=n(7720),l=n(4617),c=n(4522);(i=t.ToastSeverity||(t.ToastSeverity={})).Info="Info",i.Success="Success",i.Warn="Warn",i.Error="Error";var u=function(){function e(e){var t=this;this.options=e,this._toasts=[],this._floatingItem=null,this._remove=function(e){var n=t._findToastIndexById(e);-1!==n&&(clearTimeout(t._toasts[n].timerSubscription),t._toasts.splice(n,1),t._updateToastsUI(),0===t._toasts.length&&t._removeToastsContainer())},this._options=e}return e.prototype.add=function(e){var t=e.duration,n=r(e,["duration"]);this._floatingItem||this._addToastsContainer();var i={toastProps:o(o({},n),{id:a.UUID.uuidV1(),onClose:this._remove}),duration:t,timerSubscription:null};this._toasts.push(i),this._updateToastsUI(),this._startDurationTimer(i)},e.prototype.reset=function(){var e=this;this._toasts.forEach((function(t){e._remove(t.toastProps.id)}))},e.prototype._startDurationTimer=function(e){var t=this;e.timerSubscription=setTimeout((function(){t._remove(e.toastProps.id)}),e.duration)},e.prototype._addToastsContainer=function(){var e=this;this._floatingItem=this._options.floatingManager.add({label:"Toasts",mode:s.FloatingUIModes.Immediate,position:s.FloatingPositions.InteractiveArea,renderContent:function(){return(0,c.h)(l.ToastsContainer,{toasts:e._toasts.map((function(e){return e.toastProps}))})}})},e.prototype._removeToastsContainer=function(){this._floatingItem&&(this._options.floatingManager.remove(this._floatingItem),this._floatingItem=null)},e.prototype._updateToastsUI=function(){this._floatingItem&&this._floatingItem.update()},e.prototype._findToastIndexById=function(e){for(var t=0;t<this._toasts.length;){if(this._toasts[t].toastProps.id===e)return t;t++}return-1},e}();t.ToastManager=u},1569:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloseIcon=void 0;var o=n(4522);t.CloseIcon=function(){return(0,o.h)("svg",{width:"16px",height:"16px",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},(0,o.h)("g",{id:"Icons/16/Close",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,o.h)("path",{d:"M8.8497789,8 L11.824005,10.9742261 C12.058665,11.2088861 12.058665,11.5893451 11.824005,11.824005 C11.5893451,12.058665 11.2088861,12.058665 10.9742261,11.824005 L8,8.8497789 L5.02577387,11.824005 C4.7911139,12.058665 4.41065493,12.058665 4.17599497,11.824005 C3.94133501,11.5893451 3.94133501,11.2088861 4.17599497,10.9742261 L7.1502211,8 L4.17599497,5.02577387 C3.94133501,4.7911139 3.94133501,4.41065493 4.17599497,4.17599497 C4.41065493,3.94133501 4.7911139,3.94133501 5.02577387,4.17599497 L8,7.1502211 L10.9742261,4.17599497 C11.2088861,3.94133501 11.5893451,3.94133501 11.824005,4.17599497 C12.058665,4.41065493 12.058665,4.7911139 11.824005,5.02577387 L8.8497789,8 Z",id:"Path",fill:"#cccccc"})))}},3810:function(e,t,n){"use strict";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.Toast=void 0;var i=n(4522),a=n(181),s=n(5753),l=n(1569),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={isShown:!0},t._onClick=function(e){t.props.onClick(),t._onClose(e)},t._onClose=function(e){e.stopPropagation(),t.setState({isShown:!1}),t.props.onClose(t.props.id)},t}return r(t,e),t.prototype._getToastSeverityClass=function(){switch(this.props.severity){case s.ToastSeverity.Success:return a.successToast;case s.ToastSeverity.Warn:return a.warnToast;case s.ToastSeverity.Error:return a.errorToast;default:return a.infoToast}},t.prototype.render=function(){var e=this.props,t=e.text,n=e.title,o=e.icon;return(0,i.h)("div",{className:a.toastWrapper+" "+this._getToastSeverityClass(),onClick:this._onClick},(0,i.h)("button",{className:a.closeButton,onClick:this._onClose},(0,i.h)(l.CloseIcon,null)),(0,i.h)("div",{className:a.title},n),(0,i.h)("div",{className:a.toastBody},(0,i.h)("div",{className:a.iconContainer},(0,i.h)("div",{className:a.iconWrapper},o)),(0,i.h)("div",{className:a.text},t)))},t}(i.Component);t.Toast=c},4617:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ToastsContainer=void 0;var o=n(7371);Object.defineProperty(t,"ToastsContainer",{enumerable:!0,get:function(){return o.ToastsContainer}})},7371:function(e,t,n){"use strict";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.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.ToastsContainer=void 0;var a=n(4522),s=n(3810),l=n(5579),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return(0,a.h)("div",{className:l.toastsContainer,"aria-live":"polite"},this.props.toasts.map((function(e){return(0,a.h)("div",{className:l.toastRow,key:e.id},(0,a.h)(s.Toast,i({},e)))})))},t}(a.Component);t.ToastsContainer=c},6227:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(9873),t)},9873:function(e,t,n){"use strict";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.UIPlayerAdapter=void 0;var a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.componentDidMount=function(){this.props.onMount(this.props.player)},t.prototype.componentWillUnmount=function(){this.props.onUnmount(this.props.player)},t.prototype.render=function(e){return null},t.defaultProps={player:null},i([KalturaPlayer.ui.components.withPlayer],t)}(n(4522).Component);t.UIPlayerAdapter=a},4144:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UUID=void 0;var n=function(){function e(){}return e.uuidV1=function(){return"".concat(Date.now(),"-").concat(Math.random())},e}();t.UUID=n},1123:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventsManager=void 0;var n=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=n},6265:function(e,t,n){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(1123),t),r(n(4300),t)},4300:function(e,t){"use strict";function n(){return"undefined"==typeof Storage?o():((e=localStorage.getItem("anonymousUserId"))||(e=o(),localStorage.setItem("anonymousUserId",e)),e);var e}function o(){return"##".concat("Guest").concat("HashSeparator").concat(function(){for(var e=(0,t.generateId)(),n="",o=0;o<e.length;o++){var r=e.charAt(o);n+=Number.isNaN(+r)?r.charCodeAt(0):r}return n}(),"##")}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)},t.getUserId=n,t.getQnaUserId=function(e){var t,o,r,i,a=e,s=a.config,l=a.plugins,c=(null==s?void 0:s.session)||{},u=(null===(o=null===(t=null==l?void 0:l.qna)||void 0===t?void 0:t.config)||void 0===o?void 0:o.userRole)||c.userRole;return u&&"anonymousRole"!==u?(null===(i=null===(r=null==l?void 0:l.qna)||void 0===r?void 0:r.config)||void 0===i?void 0:i.userId)||c.userId:n()},t.debounce=function(e,t,n){var o;return void 0===t&&(t=50),void 0===n&&(n={isImmediate:!1}),function(){for(var r=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=function(){o=void 0,n.isImmediate||e.apply(r,i)},l=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout(s,t),l&&e.apply(this,i)}}},42:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var s in n)o.call(n,s)&&n[s]&&e.push(s)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},6298:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".Button__button___NM3Vl{display:flex;justify-content:center;align-items:center;flex-wrap:nowrap;font-weight:700;border:1px solid rgba(0,0,0,0);border-radius:4px;cursor:pointer}.Button__button___NM3Vl.Button__primary___vkWyL{background-color:var(--playkit-primary-color);color:var(--playkit-primary-text-contrast-color)}.Button__button___NM3Vl.Button__primary___vkWyL:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-primary-darker-color)}.Button__button___NM3Vl.Button__primary___vkWyL:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-primary-brighter-color)}.Button__button___NM3Vl.Button__danger___lCKPq{background-color:var(--playkit-danger-color);color:var(--playkit-danger-text-contrast-color)}.Button__button___NM3Vl.Button__danger___lCKPq:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-danger-darker-color)}.Button__button___NM3Vl.Button__danger___lCKPq:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-danger-brighter-color)}.Button__button___NM3Vl.Button__translucent___nSc5h{background-color:rgba(0,0,0,.6);color:var(--playkit-primary-text-contrast-color)}.Button__button___NM3Vl.Button__borderless___sov7o{background-color:rgba(0,0,0,0);color:var(--playkit-tone-1-color)}.Button__button___NM3Vl.Button__borderless___sov7o:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-tone-4-color)}.Button__button___NM3Vl.Button__borderless___sov7o:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-tone-6-color)}.Button__button___NM3Vl.Button__small____SSTu{height:24px;font-size:13px;line-height:16px;padding:0 4px}.Button__button___NM3Vl.Button__small____SSTu.Button__withIcon___c3vxV{padding-right:8px}.Button__button___NM3Vl.Button__small____SSTu.Button__withIcon___c3vxV>span{margin-left:2px}.Button__button___NM3Vl.Button__small____SSTu.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__medium___psqY1{height:32px;font-size:14px;line-height:17px;padding:0 8px}.Button__button___NM3Vl.Button__medium___psqY1.Button__withIcon___c3vxV{padding-right:12px}.Button__button___NM3Vl.Button__medium___psqY1.Button__withIcon___c3vxV>span{margin-left:4px}.Button__button___NM3Vl.Button__medium___psqY1.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__large___ftsNW{height:40px;font-size:16px;line-height:19px;padding:0 16px}.Button__button___NM3Vl.Button__large___ftsNW.Button__withIcon___c3vxV{padding-left:12px}.Button__button___NM3Vl.Button__large___ftsNW.Button__withIcon___c3vxV>span{margin-left:4px}.Button__button___NM3Vl.Button__large___ftsNW.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__disabled___j4KjS{background-color:rgba(0,0,0,0);color:var(--playkit-tone-4-color);border-color:var(--playkit-tone-4-color);cursor:default}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/components/button/Button.scss","webpack://./../node_modules/@playkit-js/common/dist/components/variables.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAGA,wBACE,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,8BAAA,CACA,iBCPY,CDQZ,cAAA,CACA,gDACE,6CEVY,CFWZ,gDER0B,CFUxB,qFACE,oDEbe,CFejB,qFACE,sDEfiB,CFmBvB,+CACE,4CENW,CFOX,+CEJyB,CFMvB,oFACE,mDETc,CFWhB,oFACE,qDEXgB,CFetB,oDACE,+BAAA,CACA,gDEhC0B,CFkC5B,mDACE,8BAAA,CACA,iCEZW,CFcT,wFACE,4CEZO,CFcT,wFACE,4CEbO,CFiBb,8CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,uEACE,iBAAA,CACA,4EACE,eAAA,CAGJ,uEACE,aAAA,CAGJ,+CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,wEACE,kBAAA,CACA,6EACE,eAAA,CAGJ,wEACE,aAAA,CAGJ,8CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,cAAA,CACA,uEACE,iBAAA,CACA,4EACE,eAAA,CAGJ,uEACE,aAAA,CAGJ,iDACE,8BAAA,CACA,iCElEW,CFmEX,wCEnEW,CFoEX,cAAA",sourcesContent:["@import '../variables.scss';\n\n// https://www.figma.com/file/GYMv1jsthckOnKmCrdQJY3/%E2%8F%AF-Player-v7-(Guidelines)?node-id=21%3A1943&t=ywdMo875C6kzd7pN-0\n.button {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-wrap: nowrap;\n  font-weight: 700;\n  border: 1px solid transparent;\n  border-radius: $roundness-1;\n  cursor: pointer;\n  &.primary {\n    background-color: $primary-color;\n    color: $primary-text-contrast-color;\n    &:not(.disabled) {\n      &:hover {\n        background-color: $primary-darker-color;\n      }\n      &:focus {\n        background-color: $primary-brighter-color;\n      }\n    }\n  }\n  &.danger {\n    background-color: $danger-color;\n    color: $danger-text-contrast-color;\n    &:not(.disabled) {\n      &:hover {\n        background-color: $danger-darker-color;\n      }\n      &:focus {\n        background-color: $danger-brighter-color;\n      }\n    }\n  }\n  &.translucent {\n    background-color: rgba(0, 0, 0, 0.6);\n    color: $primary-text-contrast-color;\n  }\n  &.borderless {\n    background-color: transparent;\n    color: $tone-1-color;\n    &:not(.disabled) {\n      &:hover {\n        background-color: $tone-4-color;\n      }\n      &:focus {\n        background-color: $tone-6-color;\n      }\n    }\n  }\n  &.small {\n    height: 24px;\n    font-size: 13px;\n    line-height: 16px;\n    padding: 0 4px;\n    &.withIcon {\n      padding-right: 8px;\n      > span {\n        margin-left: 2px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.medium {\n    height: 32px;\n    font-size: 14px;\n    line-height: 17px;\n    padding: 0 8px;\n    &.withIcon {\n      padding-right: 12px;\n      > span {\n        margin-left: 4px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.large {\n    height: 40px;\n    font-size: 16px;\n    line-height: 19px;\n    padding: 0 16px;\n    &.withIcon {\n      padding-left: 12px;\n      > span {\n        margin-left: 4px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.disabled {\n    background-color: transparent;\n    color: $tone-4-color;\n    border-color: $tone-4-color;\n    cursor: default;\n  }\n}\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n// colors\n$white: #ffffff;\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={button:"Button__button___NM3Vl",primary:"Button__primary___vkWyL",disabled:"Button__disabled___j4KjS",danger:"Button__danger___lCKPq",translucent:"Button__translucent___nSc5h",borderless:"Button__borderless___sov7o",small:"Button__small____SSTu",withIcon:"Button__withIcon___c3vxV",iconOnly:"Button__iconOnly___dISNi",medium:"Button__medium___psqY1",large:"Button__large___ftsNW"},t.default=a},2707:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".InputField__input-field-wrapper___K1QeS{display:flex;align-items:center;flex-grow:1;width:100%;max-width:599px;padding-right:8px;height:32px;border:solid 1px rgba(255,255,255,.4);border-radius:4px}.InputField__input-field-wrapper___K1QeS ::-moz-placeholder{opacity:1}.InputField__input-field-wrapper___K1QeS .InputField__search-results___PBRGr{display:flex;justify-content:flex-end;align-items:center;flex-shrink:0;margin:0 8px 0 6px;font-size:12px;text-overflow:ellipsis}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA{display:flex;flex-direction:column;justify-content:space-around;max-height:100%;height:100%;width:8px;flex:0 0 8px}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA .InputField__prev-next-button___HP7Me{display:flex;align-items:center;height:50%;padding:0;background-color:rgba(0,0,0,0);border:none;cursor:pointer}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA .InputField__prev-next-button___HP7Me.InputField__disabled___GVLcH{opacity:.4;cursor:default}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE{width:100%;flex-grow:1;flex-shrink:1;font-size:15px;padding:0 6px 1px 6px;color:var(--playkit-tone-1-color);background:rgba(0,0,0,0);border:none;overflow:hidden;text-overflow:ellipsis}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE::placeholder{color:var(--playkit-tone-2-color)}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE::selection{background-color:var(--playkit-primary-brighter-color)}.InputField__input-field-wrapper___K1QeS .InputField__clear-icon___eTi3X{padding:0;flex:0 0 12px;max-width:12px;max-height:12px;background-color:rgba(0,0,0,0);width:12px;height:12px;outline-offset:4px;border:none;cursor:pointer}.InputField__input-field-wrapper___K1QeS:hover{border-color:#fff}.InputField__input-field-wrapper___K1QeS.InputField__active____D1qS{color:var(--playkit-tone-2-color);background:var(--playkit-tone-8-color);border-color:#fff}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/components/input-field/InputField.scss","webpack://./../node_modules/@playkit-js/common/dist/components/variables.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,yCAKE,YAAA,CACA,kBAAA,CACA,WAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,WAAA,CACA,qCAAA,CACA,iBCZY,CAAA,4DDCV,SAAA,CAYF,6EACE,YAAA,CACA,wBAAA,CACA,kBAAA,CACA,aAAA,CACA,kBAAA,CACA,cAAA,CACA,sBAAA,CAEF,gFACE,YAAA,CACA,qBAAA,CACA,4BAAA,CACA,eAAA,CACA,WAAA,CACA,SAAA,CACA,YAAA,CACA,sHACE,YAAA,CACA,kBAAA,CACA,UAAA,CACA,SAAA,CACA,8BAAA,CACA,WAAA,CACA,cAAA,CACA,mJACE,UAAA,CACA,cAAA,CAIN,4EACE,UAAA,CACA,WAAA,CACA,aAAA,CACA,cAAA,CACA,qBAAA,CACA,iCEvBW,CFwBX,wBAAA,CACA,WAAA,CACA,eAAA,CACA,sBAAA,CACA,yFACE,iCE5BS,CF8BX,uFACE,sDEzDmB,CF4DvB,yEACE,SAAA,CACA,aAAA,CACA,cAAA,CACA,eAAA,CACA,8BAAA,CACA,UAAA,CACA,WAAA,CACA,kBAAA,CACA,WAAA,CACA,cAAA,CAEF,+CACE,iBCvEI,CDyEN,oEACE,iCElDW,CFmDX,sCE7CW,CF8CX,iBC5EI",sourcesContent:["@import '../variables.scss';\n\n.input-field-wrapper {\n  ::-moz-placeholder {\n    opacity: 1;\n  }\n\n  display: flex;\n  align-items: center;\n  flex-grow: 1;\n  width: 100%;\n  max-width: 599px;\n  padding-right: 8px;\n  height: 32px;\n  border: solid 1px rgba(255, 255, 255, 0.4);\n  border-radius: $roundness-1;\n  .search-results {\n    display: flex;\n    justify-content: flex-end;\n    align-items: center;\n    flex-shrink: 0;\n    margin: 0 8px 0 6px;\n    font-size: 12px;\n    text-overflow: ellipsis;\n  }\n  .prev-next-wrapper {\n    display: flex;\n    flex-direction: column;\n    justify-content: space-around;\n    max-height: 100%;\n    height: 100%;\n    width: 8px;\n    flex: 0 0 8px;\n    .prev-next-button {\n      display: flex;\n      align-items: center;\n      height: 50%;\n      padding: 0;\n      background-color: transparent;\n      border: none;\n      cursor: pointer;\n      &.disabled {\n        opacity: 0.4;\n        cursor: default;\n      }\n    }\n  }\n  .input-element {\n    width: 100%;\n    flex-grow: 1;\n    flex-shrink: 1;\n    font-size: 15px;\n    padding: 0 6px 1px 6px;\n    color: $tone-1-color;\n    background: transparent;\n    border: none;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    &::placeholder {\n      color: $tone-2-color;\n    }\n    &::selection {\n      background-color: $primary-brighter-color;\n    }\n  }\n  .clear-icon {\n    padding: 0;\n    flex: 0 0 12px;\n    max-width: 12px;\n    max-height: 12px;\n    background-color: transparent;\n    width: 12px;\n    height: 12px;\n    outline-offset: 4px;\n    border: none;\n    cursor: pointer;\n  }\n  &:hover {\n    border-color: $white;\n  }\n  &.active {\n    color: $tone-2-color;\n    background: $tone-8-color;\n    border-color: $white;\n  }\n}\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n// colors\n$white: #ffffff;\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={"input-field-wrapper":"InputField__input-field-wrapper___K1QeS",inputFieldWrapper:"InputField__input-field-wrapper___K1QeS","search-results":"InputField__search-results___PBRGr",searchResults:"InputField__search-results___PBRGr","prev-next-wrapper":"InputField__prev-next-wrapper___zAxBA",prevNextWrapper:"InputField__prev-next-wrapper___zAxBA","prev-next-button":"InputField__prev-next-button___HP7Me",prevNextButton:"InputField__prev-next-button___HP7Me",disabled:"InputField__disabled___GVLcH","input-element":"InputField__input-element___BAphE",inputElement:"InputField__input-element___BAphE","clear-icon":"InputField__clear-icon___eTi3X",clearIcon:"InputField__clear-icon___eTi3X",active:"InputField__active____D1qS"},t.default=a},3861:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".sr-wrapper__sr-wrapper___GwVLr{position:absolute;height:1px;width:1px;overflow:hidden;padding:0;margin:-1px;border:0}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/hoc/sr-wrapper/sr-wrapper.scss"],names:[],mappings:"AAAA,gCACE,iBAAA,CACA,UAAA,CACA,SAAA,CACA,eAAA,CACA,SAAA,CACA,WAAA,CACA,QAAA",sourcesContent:[".sr-wrapper {\n  position: absolute;\n  height: 1px;\n  width: 1px;\n  overflow: hidden;\n  padding: 0;\n  margin: -1px;\n  border: 0;\n}"],sourceRoot:""}]),a.locals={"sr-wrapper":"sr-wrapper__sr-wrapper___GwVLr",srWrapper:"sr-wrapper__sr-wrapper___GwVLr"},t.default=a},6469:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".icon__iconWrapper___O5uqn.icon__small___IddLg{width:16px;height:16px}.icon__iconWrapper___O5uqn.icon__medium___llFxB{width:24px;height:24px}.icon__iconWrapper___O5uqn.icon__large___Q96VN{width:32px;height:32px}.icon__iconWrapper___O5uqn>svg{width:100%;height:100%}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/icon/icon.scss"],names:[],mappings:"AACE,+CACE,UAAA,CACA,WAAA,CAEF,gDACE,UAAA,CACA,WAAA,CAEF,+CACE,UAAA,CACA,WAAA,CAEF,+BACE,UAAA,CACA,WAAA",sourcesContent:[".iconWrapper {\n  &.small {\n    width: 16px;\n    height: 16px;\n  }\n  &.medium {\n    width: 24px;\n    height: 24px;\n  }\n  &.large {\n    width: 32px;\n    height: 32px;\n  }\n  > svg {\n    width: 100%;\n    height: 100%;\n  }\n}\n"],sourceRoot:""}]),a.locals={iconWrapper:"icon__iconWrapper___O5uqn",small:"icon__small___IddLg",medium:"icon__medium___llFxB",large:"icon__large___Q96VN"},t.default=a},5588:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._banner-container__bannerContainerRoot___xakgR{position:absolute;max-width:100%;min-width:270px;padding:0 16px 8px;height:88px;bottom:0;left:0;transition:all .5s ease}._banner-container__bannerContainer___Qm02i{position:relative;width:100%;height:100%;border-radius:4px;transition:all .5s ease}._banner-container__closeButton___WVWto{position:absolute;background-color:rgba(0,0,0,0);padding:0;border:none;top:0;right:0;width:32px;height:32px;padding:0}._banner-container__closeButton___WVWto ._banner-container__small___Tgp11{display:none}._banner-container__closeButton___WVWto:hover,._banner-container__closeButton___WVWto:active{cursor:pointer}.playkit-size-md ._banner-container__bannerContainerRoot___xakgR{height:68px;min-width:230px}.playkit-size-md ._banner-container__closeButton___WVWto{top:8px;right:8px;width:10px;height:10px}.playkit-size-md ._banner-container__closeButton___WVWto ._banner-container__large___aw4QR{display:none}.playkit-size-md ._banner-container__closeButton___WVWto ._banner-container__small___Tgp11{display:block}.playkit-size-sm ._banner-container__bannerContainerRoot___xakgR,.playkit-size-xs ._banner-container__bannerContainerRoot___xakgR,.playkit-size-ty ._banner-container__bannerContainerRoot___xakgR{display:none;width:0;height:0}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/banner-container/_banner-container.scss"],names:[],mappings:"AAAA,gDACE,iBAAA,CACA,cAAA,CACA,eAAA,CACA,kBAAA,CACA,WAAA,CACA,QAAA,CACA,MAAA,CACA,uBAAA,CAGF,4CACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,iBAAA,CACA,uBAAA,CAGF,wCACE,iBAAA,CACA,8BAAA,CACA,SAAA,CACA,WAAA,CACA,KAAA,CACA,OAAA,CACA,UAAA,CACA,WAAA,CACA,SAAA,CACA,0EACE,YAAA,CAIJ,6FAEE,cAAA,CAMI,iEACE,WAAA,CACA,eAAA,CAEF,yDACE,OAAA,CACA,SAAA,CACA,UAAA,CACA,WAAA,CACA,2FACE,YAAA,CAEF,2FACE,aAAA,CAWN,mMACE,YAAA,CACA,OAAA,CACA,QAAA",sourcesContent:[".bannerContainerRoot {\n  position: absolute;\n  max-width: 100%;\n  min-width: 270px;\n  padding: 0 16px 8px;\n  height: 88px;\n  bottom: 0;\n  left: 0;\n  transition: all 0.5s ease;\n}\n\n.bannerContainer {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  border-radius: 4px;\n  transition: all 0.5s ease;\n}\n\n.closeButton {\n  position: absolute;\n  background-color: transparent;\n  padding: 0;\n  border: none;\n  top: 0;\n  right: 0;\n  width: 32px;\n  height: 32px;\n  padding: 0;\n  .small {\n    display: none;\n  }\n}\n\n.closeButton:hover,\n.closeButton:active {\n  cursor: pointer;\n}\n\n:global {\n  .playkit-size-md {\n    :local {\n      .bannerContainerRoot {\n        height: 68px;\n        min-width: 230px;\n      }\n      .closeButton {\n        top: 8px;\n        right: 8px;\n        width: 10px;\n        height: 10px;\n        .large {\n          display: none;\n        }\n        .small {\n          display: block;\n        }\n      }\n    }\n  }\n}\n\n:global {\n  .playkit-size-sm,\n  .playkit-size-xs,\n  .playkit-size-ty {\n    :local .bannerContainerRoot {\n      display: none;\n      width: 0;\n      height: 0;\n    }\n  }\n}\n"],sourceRoot:""}]),a.locals={bannerContainerRoot:"_banner-container__bannerContainerRoot___xakgR",bannerContainer:"_banner-container__bannerContainer___Qm02i",closeButton:"_banner-container__closeButton___WVWto",small:"_banner-container__small___Tgp11",large:"_banner-container__large___aw4QR"},t.default=a},9882:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._banner__defaultBannerRoot___NepFO{display:flex;max-width:100%;height:100%;transition:all .5s ease;text-align:left}._banner__bannerWrapper___Rs8hK{padding:18px 17px 17px 16px}._banner__iconContainer___wyKRN{height:100%;width:64px}._banner__iconWrapper___duGbT{position:relative;height:48px;width:48px;background-color:rgba(255,255,255,.14);border-radius:50%;transition:all .5s ease}._banner__iconImage___I0LAA{position:absolute;width:32px;height:32px;left:calc(50% - 16px);top:calc(50% - 16px);transition:all .5s ease;padding:0}._banner__iconImage___I0LAA ._banner__small___mrxMV{display:none}._banner__bannerBody___ISEP1{height:100%;flex:1 1 auto;overflow:hidden}._banner__title___LCkfF{opacity:.9;font-size:14px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1;letter-spacing:normal;color:#ebebeb}._banner__text___UyS4n{opacity:.9;font-size:24px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.21;letter-spacing:normal;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .5s ease}.playkit-size-md ._banner__bannerWrapper___Rs8hK{padding:14px 16px 14px}.playkit-size-md ._banner__iconContainer___wyKRN{width:44px}.playkit-size-md ._banner__iconWrapper___duGbT{height:32px;width:32px}.playkit-size-md ._banner__iconImage___I0LAA{width:20px;height:20px;left:calc(50% - 10px);top:calc(50% - 10px)}.playkit-size-md ._banner__iconImage___I0LAA ._banner__small___mrxMV{display:block}.playkit-size-md ._banner__iconImage___I0LAA ._banner__large___q5r6u{display:none}.playkit-size-md ._banner__bannerBody___ISEP1{flex:1 1 auto}.playkit-size-md ._banner__title___LCkfF{font-size:12px;font-weight:bold;line-height:1.17}.playkit-size-md ._banner__text___UyS4n{font-size:15px;line-height:1.27}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/banner/_banner.scss"],names:[],mappings:"AAAA,oCACE,YAAA,CACA,cAAA,CACA,WAAA,CACA,uBAAA,CACA,eAAA,CAGF,gCACE,2BAAA,CAGF,gCACE,WAAA,CACA,UAAA,CAGF,8BACE,iBAAA,CACA,WAAA,CACA,UAAA,CACA,sCAAA,CACA,iBAAA,CACA,uBAAA,CAGF,4BACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,qBAAA,CACA,oBAAA,CACA,uBAAA,CACA,SAAA,CACA,oDACE,YAAA,CAIJ,6BACE,WAAA,CACA,aAAA,CACA,eAAA,CAGF,wBACE,UAAA,CACA,cAAA,CACA,kBAAA,CACA,iBAAA,CACA,mBAAA,CACA,aAAA,CACA,qBAAA,CACA,aAAA,CAGF,uBACE,UAAA,CACA,cAAA,CACA,kBAAA,CACA,iBAAA,CACA,mBAAA,CACA,gBAAA,CACA,qBAAA,CACA,UAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,uBAAA,CAMI,iDACE,sBAAA,CAEF,iDACE,UAAA,CAEF,+CACE,WAAA,CACA,UAAA,CAEF,6CACE,UAAA,CACA,WAAA,CACA,qBAAA,CACA,oBAAA,CACA,qEACE,aAAA,CAEF,qEACE,YAAA,CAGJ,8CACE,aAAA,CAEF,yCACE,cAAA,CACA,gBAAA,CACA,gBAAA,CAEF,wCACE,cAAA,CACA,gBAAA",sourcesContent:[".defaultBannerRoot {\n  display: flex;\n  max-width: 100%;\n  height: 100%;\n  transition: all 0.5s ease;\n  text-align: left;\n}\n\n.bannerWrapper {\n  padding: 18px 17px 17px 16px;\n}\n\n.iconContainer {\n  height: 100%;\n  width: 64px;\n}\n\n.iconWrapper {\n  position: relative;\n  height: 48px;\n  width: 48px;\n  background-color: rgba(255, 255, 255, 0.14);\n  border-radius: 50%;\n  transition: all 0.5s ease;\n}\n\n.iconImage {\n  position: absolute;\n  width: 32px;\n  height: 32px;\n  left: calc(50% - 16px);\n  top: calc(50% - 16px);\n  transition: all 0.5s ease;\n  padding: 0;\n  .small {\n    display: none;\n  }\n}\n\n.bannerBody {\n  height: 100%;\n  flex: 1 1 auto;\n  overflow: hidden;\n}\n\n.title {\n  opacity: 0.9;\n  font-size: 14px;\n  font-weight: normal;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: 1;\n  letter-spacing: normal;\n  color: #ebebeb;\n}\n\n.text {\n  opacity: 0.9;\n  font-size: 24px;\n  font-weight: normal;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: 1.21;\n  letter-spacing: normal;\n  color: #ffffff;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  transition: all 0.5s ease;\n}\n\n:global {\n  .playkit-size-md {\n    :local {\n      .bannerWrapper {\n        padding: 14px 16px 14px;\n      }\n      .iconContainer {\n        width: 44px;\n      }\n      .iconWrapper {\n        height: 32px;\n        width: 32px;\n      }\n      .iconImage {\n        width: 20px;\n        height: 20px;\n        left: calc(50% - 10px);\n        top: calc(50% - 10px);\n        .small {\n          display: block;\n        }\n        .large {\n          display: none;\n        }\n      }\n      .bannerBody {\n        flex: 1 1 auto;\n      }\n      .title {\n        font-size: 12px;\n        font-weight: bold;\n        line-height: 1.17;\n      }\n      .text {\n        font-size: 15px;\n        line-height: 1.27;\n      }\n    }\n  }\n}\n"],sourceRoot:""}]),a.locals={defaultBannerRoot:"_banner__defaultBannerRoot___NepFO",bannerWrapper:"_banner__bannerWrapper___Rs8hK",iconContainer:"_banner__iconContainer___wyKRN",iconWrapper:"_banner__iconWrapper___duGbT",iconImage:"_banner__iconImage___I0LAA",small:"_banner__small___mrxMV",bannerBody:"_banner__bannerBody___ISEP1",title:"_banner__title___LCkfF",text:"_banner__text___UyS4n",large:"_banner__large___q5r6u"},t.default=a},1355:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,".injected-component__fill-container___mNczr{width:100%;height:100%;overflow:hidden}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/injected-component/injected-component.scss"],names:[],mappings:"AAAA,4CACE,UAAA,CACA,WAAA,CACA,eAAA",sourcesContent:[".fill-container {\n  width: 100%;\n  height: 100%;\n  overflow: hidden;\n}\n"],sourceRoot:""}]),a.locals={"fill-container":"injected-component__fill-container___mNczr",fillContainer:"injected-component__fill-container___mNczr"},t.default=a},8931:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._managed-component__fill-container___BZ9jB{width:100%;height:100%}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/managed-component/_managed-component.scss"],names:[],mappings:"AAAA,4CACE,UAAA,CACA,WAAA",sourcesContent:[".fill-container {\n  width: 100%;\n  height: 100%;\n}\n"],sourceRoot:""}]),a.locals={"fill-container":"_managed-component__fill-container___BZ9jB",fillContainer:"_managed-component__fill-container___BZ9jB"},t.default=a},9318:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._toast__toastWrapper___WvdiK{position:relative;min-width:120px;max-width:310px;height:100%;border-radius:4px;background-color:#222;border-left-style:solid;border-left-width:4px;text-align:left}._toast__infoToast___GSdk1{border-left-color:#01accd}._toast__successToast___dyb3J{border-left-color:#009e48}._toast__warnToast___vCnBw{border-left-color:#f9a71b}._toast__errorToast___GAr1R{border-left-color:#e7585d}._toast__closeButton___kXqZM{position:absolute;background-color:rgba(0,0,0,0);top:0;right:0;width:16px;height:16px;object-fit:contain;background-repeat:no-repeat;border:none;padding:0}._toast__closeButton___kXqZM:hover{cursor:pointer}._toast__title___aQCgz{font-size:12px;font-weight:normal;font-style:normal;font-stretch:normal;line-height:1.17;letter-spacing:normal;color:#ccc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-top:4px;padding-right:16px;padding-left:12px}._toast__toastBody___aP3ij{position:relative;width:100%;padding:2px 16px 5px 12px}._toast__iconContainer___S5hMD{position:relative;height:16px;width:16px;float:left;margin-right:7px}._toast__iconWrapper___kqam1{height:16px;width:16px}._toast__text___EdqX7{font-size:14px;font-weight:bold;font-style:normal;font-stretch:normal;line-height:normal;letter-spacing:normal;color:#ccc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/toast/_toast.scss"],names:[],mappings:"AAAA,8BACE,iBAAA,CACA,eAAA,CACA,eAAA,CACA,WAAA,CACA,iBAAA,CACA,qBAAA,CACA,uBAAA,CACA,qBAAA,CACA,eAAA,CAGF,2BACE,yBAAA,CAGF,8BACE,yBAAA,CAGF,2BACE,yBAAA,CAGF,4BACE,yBAAA,CAGF,6BACE,iBAAA,CACA,8BAAA,CACA,KAAA,CACA,OAAA,CACA,UAAA,CACA,WAAA,CACA,kBAAA,CACA,2BAAA,CACA,WAAA,CACA,SAAA,CAEA,mCACE,cAAA,CAIJ,uBACE,cAAA,CACA,kBAAA,CACA,iBAAA,CACA,mBAAA,CACA,gBAAA,CACA,qBAAA,CACA,UAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA,CACA,eAAA,CACA,kBAAA,CACA,iBAAA,CAGF,2BACE,iBAAA,CACA,UAAA,CACA,yBAAA,CAGF,+BACE,iBAAA,CACA,WAAA,CACA,UAAA,CACA,UAAA,CACA,gBAAA,CAGF,6BACE,WAAA,CACA,UAAA,CAGF,sBACE,cAAA,CACA,gBAAA,CACA,iBAAA,CACA,mBAAA,CACA,kBAAA,CACA,qBAAA,CACA,UAAA,CACA,kBAAA,CACA,eAAA,CACA,sBAAA",sourcesContent:[".toastWrapper {\n  position: relative;\n  min-width: 120px;\n  max-width: 310px;\n  height: 100%;\n  border-radius: 4px;\n  background-color: #222222;\n  border-left-style: solid;\n  border-left-width: 4px;\n  text-align: left;\n}\n\n.infoToast {\n  border-left-color: #01ACCD;\n}\n\n.successToast {\n  border-left-color: #009E48;\n}\n\n.warnToast {\n  border-left-color: #F9A71B;\n}\n\n.errorToast {\n  border-left-color: #E7585D;\n}\n\n.closeButton {\n  position: absolute;\n  background-color: transparent;\n  top: 0;\n  right: 0;\n  width: 16px;\n  height: 16px;\n  object-fit: contain;\n  background-repeat: no-repeat;\n  border: none;\n  padding: 0;\n\n  &:hover {\n    cursor: pointer;\n  }\n}\n\n.title {\n  font-size: 12px;\n  font-weight: normal;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: 1.17;\n  letter-spacing: normal;\n  color: #cccccc;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  padding-top: 4px;\n  padding-right: 16px;\n  padding-left: 12px;\n}\n\n.toastBody {\n  position: relative;\n  width: 100%;\n  padding: 2px 16px 5px 12px;\n}\n\n.iconContainer {\n  position: relative;\n  height: 16px;\n  width: 16px;\n  float: left;\n  margin-right: 7px;\n}\n\n.iconWrapper {\n  height: 16px;\n  width: 16px;\n}\n\n.text {\n  font-size: 14px;\n  font-weight: bold;\n  font-style: normal;\n  font-stretch: normal;\n  line-height: normal;\n  letter-spacing: normal;\n  color: #cccccc;\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n\n"],sourceRoot:""}]),a.locals={toastWrapper:"_toast__toastWrapper___WvdiK",infoToast:"_toast__infoToast___GSdk1",successToast:"_toast__successToast___dyb3J",warnToast:"_toast__warnToast___vCnBw",errorToast:"_toast__errorToast___GAr1R",closeButton:"_toast__closeButton___kXqZM",title:"_toast__title___aQCgz",toastBody:"_toast__toastBody___aP3ij",iconContainer:"_toast__iconContainer___S5hMD",iconWrapper:"_toast__iconWrapper___kqam1",text:"_toast__text___EdqX7"},t.default=a},3346:function(e,t,n){"use strict";n.r(t);var o=n(559),r=n.n(o),i=n(3476),a=n.n(i)()(r());a.push([e.id,"._toasts-container__toastsContainer___ep0ad{position:absolute;right:0;top:0;padding:8px 16px 0;min-width:120px;max-width:310px;display:flex;flex-direction:column}._toasts-container__toastRow___J1NQa{height:42px;min-width:120px;max-width:310px;margin-bottom:8px;overflow:hidden;overflow-wrap:break-word;text-overflow:ellipsis;align-self:flex-end}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/ui-common/toasts-container/_toasts-container.scss"],names:[],mappings:"AAAA,4CACE,iBAAA,CACA,OAAA,CACA,KAAA,CACA,kBAAA,CACA,eAAA,CACA,eAAA,CACA,YAAA,CACA,qBAAA,CAGF,qCACE,WAAA,CACA,eAAA,CACA,eAAA,CACA,iBAAA,CACA,eAAA,CACA,wBAAA,CACA,sBAAA,CACA,mBAAA",sourcesContent:[".toastsContainer {\n  position: absolute;\n  right: 0;\n  top: 0;\n  padding: 8px 16px 0;\n  min-width: 120px;\n  max-width: 310px;\n  display: flex;\n  flex-direction: column;\n}\n\n.toastRow {\n  height: 42px;\n  min-width: 120px;\n  max-width: 310px;\n  margin-bottom: 8px;\n  overflow: hidden;\n  overflow-wrap: break-word;\n  text-overflow: ellipsis;\n  align-self: flex-end;\n}\n"],sourceRoot:""}]),a.locals={toastsContainer:"_toasts-container__toastsContainer___ep0ad",toastRow:"_toasts-container__toastRow___J1NQa"},t.default=a},3476:function(e){"use strict";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 l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);o&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),r&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=r):u[4]="".concat(r)),t.push(u))}},t}},559:function(e){"use strict";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")}},3708:function(e,t,n){"use strict";function o(e){var t=Array.prototype.slice.call(arguments,1);return t.forEach((function(t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}function r(e){return Object.prototype.toString.call(e)}function i(e){return"[object Function]"===r(e)}function a(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}var s={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1},l={"http:":{validate:function(e,t,n){var o=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(o)?o.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){var o=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(o)?t>=3&&":"===e[t-3]||t>=3&&"/"===e[t-3]?0:o.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){var o=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(o)?o.match(n.re.mailto)[0].length:0}}},c="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function u(e){var t=e.re=n(2596)(e.__opts__),o=e.__tlds__.slice();function s(e){return e.replace("%TLDS%",t.src_tlds)}e.onCompile(),e.__tlds_replaced__||o.push("a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]"),o.push(t.src_xn),t.src_tlds=o.join("|"),t.email_fuzzy=RegExp(s(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(s(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(s(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(s(t.tpl_host_fuzzy_test),"i");var l=[];function c(e,t){throw new Error('(LinkifyIt) Invalid schema "'+e+'": '+t)}e.__compiled__={},Object.keys(e.__schemas__).forEach((function(t){var n=e.__schemas__[t];if(null!==n){var o={validate:null,link:null};if(e.__compiled__[t]=o,"[object Object]"===r(n))return"[object RegExp]"!==r(n.validate)?i(n.validate)?o.validate=n.validate:c(t,n):o.validate=function(e){return function(t,n){var o=t.slice(n);return e.test(o)?o.match(e)[0].length:0}}(n.validate),void(i(n.normalize)?o.normalize=n.normalize:n.normalize?c(t,n):o.normalize=function(e,t){t.normalize(e)});!function(e){return"[object String]"===r(e)}(n)?c(t,n):l.push(t)}})),l.forEach((function(t){e.__compiled__[e.__schemas__[t]]&&(e.__compiled__[t].validate=e.__compiled__[e.__schemas__[t]].validate,e.__compiled__[t].normalize=e.__compiled__[e.__schemas__[t]].normalize)})),e.__compiled__[""]={validate:null,normalize:function(e,t){t.normalize(e)}};var u=Object.keys(e.__compiled__).filter((function(t){return t.length>0&&e.__compiled__[t]})).map(a).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><｜]|"+t.src_ZPCc+"))("+u+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><｜]|"+t.src_ZPCc+"))("+u+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),function(e){e.__index__=-1,e.__text_cache__=""}(e)}function p(e,t){var n=e.__index__,o=e.__last_index__,r=e.__text_cache__.slice(n,o);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=o+t,this.raw=r,this.text=r,this.url=r}function _(e,t){var n=new p(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function d(e,t){if(!(this instanceof d))return new d(e,t);var n;t||(n=e,Object.keys(n||{}).reduce((function(e,t){return e||s.hasOwnProperty(t)}),!1)&&(t=e,e={})),this.__opts__=o({},s,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=o({},l,e),this.__compiled__={},this.__tlds__=c,this.__tlds_replaced__=!1,this.re={},u(this)}d.prototype.add=function(e,t){return this.__schemas__[e]=t,u(this),this},d.prototype.set=function(e){return this.__opts__=o(this.__opts__,e),this},d.prototype.test=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return!1;var t,n,o,r,i,a,s,l;if(this.re.schema_test.test(e))for((s=this.re.schema_search).lastIndex=0;null!==(t=s.exec(e));)if(r=this.testSchemaAt(e,t[2],s.lastIndex)){this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+r;break}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=e.search(this.re.host_fuzzy_test))>=0&&(this.__index__<0||l<this.__index__)&&null!==(n=e.match(this.__opts__.fuzzyIP?this.re.link_fuzzy:this.re.link_no_ip_fuzzy))&&(i=n.index+n[1].length,(this.__index__<0||i<this.__index__)&&(this.__schema__="",this.__index__=i,this.__last_index__=n.index+n[0].length)),this.__opts__.fuzzyEmail&&this.__compiled__["mailto:"]&&e.indexOf("@")>=0&&null!==(o=e.match(this.re.email_fuzzy))&&(i=o.index+o[1].length,a=o.index+o[0].length,(this.__index__<0||i<this.__index__||i===this.__index__&&a>this.__last_index__)&&(this.__schema__="mailto:",this.__index__=i,this.__last_index__=a)),this.__index__>=0},d.prototype.pretest=function(e){return this.re.pretest.test(e)},d.prototype.testSchemaAt=function(e,t,n){return this.__compiled__[t.toLowerCase()]?this.__compiled__[t.toLowerCase()].validate(e,n,this):0},d.prototype.match=function(e){var t=0,n=[];this.__index__>=0&&this.__text_cache__===e&&(n.push(_(this,t)),t=this.__last_index__);for(var o=t?e.slice(t):e;this.test(o);)n.push(_(this,t)),o=o.slice(this.__last_index__),t+=this.__last_index__;return n.length?n:null},d.prototype.matchAtStart=function(e){if(this.__text_cache__=e,this.__index__=-1,!e.length)return null;var t=this.re.schema_at_start.exec(e);if(!t)return null;var n=this.testSchemaAt(e,t[2],t[0].length);return n?(this.__schema__=t[2],this.__index__=t.index+t[1].length,this.__last_index__=t.index+t[0].length+n,_(this,0)):null},d.prototype.tlds=function(e,t){return e=Array.isArray(e)?e:[e],t?(this.__tlds__=this.__tlds__.concat(e).sort().filter((function(e,t,n){return e!==n[t-1]})).reverse(),u(this),this):(this.__tlds__=e.slice(),this.__tlds_replaced__=!0,u(this),this)},d.prototype.normalize=function(e){e.schema||(e.url="http://"+e.url),"mailto:"!==e.schema||/^mailto:/i.test(e.url)||(e.url="mailto:"+e.url)},d.prototype.onCompile=function(){},e.exports=d},2596:function(e,t,n){"use strict";e.exports=function(e){var t={};return e=e||{},t.src_Any=n(8287).source,t.src_Cc=n(699).source,t.src_Z=n(9338).source,t.src_P=n(6924).source,t.src_ZPCc=[t.src_Z,t.src_P,t.src_Cc].join("|"),t.src_ZCc=[t.src_Z,t.src_Cc].join("|"),t.src_pseudo_letter="(?:(?![><｜]|"+t.src_ZPCc+")"+t.src_Any+")",t.src_ip4="(?:(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)",t.src_auth="(?:(?:(?!"+t.src_ZCc+"|[@/\\[\\]()]).)+@)?",t.src_port="(?::(?:6(?:[0-4]\\d{3}|5(?:[0-4]\\d{2}|5(?:[0-2]\\d|3[0-5])))|[1-5]?\\d{1,4}))?",t.src_host_terminator="(?=$|[><｜]|"+t.src_ZPCc+")(?!"+(e["---"]?"-(?!--)|":"-|")+"_|:\\d|\\.-|\\.(?!$|"+t.src_ZPCc+"))",t.src_path="(?:[/?#](?:(?!"+t.src_ZCc+"|[><｜]|[()[\\]{}.,\"'?!\\-;]).|\\[(?:(?!"+t.src_ZCc+"|\\]).)*\\]|\\((?:(?!"+t.src_ZCc+"|[)]).)*\\)|\\{(?:(?!"+t.src_ZCc+'|[}]).)*\\}|\\"(?:(?!'+t.src_ZCc+'|["]).)+\\"|\\\'(?:(?!'+t.src_ZCc+"|[']).)+\\'|\\'(?="+t.src_pseudo_letter+"|[-])|\\.{2,}[a-zA-Z0-9%/&]|\\.(?!"+t.src_ZCc+"|[.]|$)|"+(e["---"]?"\\-(?!--(?:[^-]|$))(?:-*)|":"\\-+|")+",(?!"+t.src_ZCc+"|$)|;(?!"+t.src_ZCc+"|$)|\\!+(?!"+t.src_ZCc+"|[!]|$)|\\?(?!"+t.src_ZCc+"|[?]|$))+|\\/)?",t.src_email_name='[\\-;:&=\\+\\$,\\.a-zA-Z0-9_][\\-;:&=\\+\\$,\\"\\.a-zA-Z0-9_]*',t.src_xn="xn--[a-z0-9\\-]{1,59}",t.src_domain_root="(?:"+t.src_xn+"|"+t.src_pseudo_letter+"{1,63})",t.src_domain="(?:"+t.src_xn+"|(?:"+t.src_pseudo_letter+")|(?:"+t.src_pseudo_letter+"(?:-|"+t.src_pseudo_letter+"){0,61}"+t.src_pseudo_letter+"))",t.src_host="(?:(?:(?:(?:"+t.src_domain+")\\.)*"+t.src_domain+"))",t.tpl_host_fuzzy="(?:"+t.src_ip4+"|(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%)))",t.tpl_host_no_ip_fuzzy="(?:(?:(?:"+t.src_domain+")\\.)+(?:%TLDS%))",t.src_host_strict=t.src_host+t.src_host_terminator,t.tpl_host_fuzzy_strict=t.tpl_host_fuzzy+t.src_host_terminator,t.src_host_port_strict=t.src_host+t.src_port+t.src_host_terminator,t.tpl_host_port_fuzzy_strict=t.tpl_host_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_port_no_ip_fuzzy_strict=t.tpl_host_no_ip_fuzzy+t.src_port+t.src_host_terminator,t.tpl_host_fuzzy_test="localhost|www\\.|\\.\\d{1,3}\\.|(?:\\.(?:%TLDS%)(?:"+t.src_ZPCc+"|>|$))",t.tpl_email_fuzzy='(^|[><｜]|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|"+t.src_ZPCc+"))((?![$+<=>^`|｜])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`|｜]|"+t.src_ZPCc+"))((?![$+<=>^`|｜])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}},7538:function(e,t,n){var o=n(1892),r=n(6298);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},7998:function(e,t,n){var o=n(1892),r=n(2707);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},73:function(e,t,n){var o=n(1892),r=n(3861);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},3278:function(e,t,n){var o=n(1892),r=n(6469);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},6502:function(e,t,n){var o=n(1892),r=n(5588);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},9480:function(e,t,n){var o=n(1892),r=n(9882);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},4367:function(e,t,n){var o=n(1892),r=n(1355);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},4022:function(e,t,n){var o=n(1892),r=n(8931);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},181:function(e,t,n){var o=n(1892),r=n(9318);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},5579:function(e,t,n){var o=n(1892),r=n(3346);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.id,r,""]]);o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},1892:function(e,t,n){"use strict";var o,r=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]}}(),i=[];function a(e){for(var t=-1,n=0;n<i.length;n++)if(i[n].identifier===e){t=n;break}return t}function s(e,t){for(var n={},o=[],r=0;r<e.length;r++){var s=e[r],l=t.base?s[0]+t.base:s[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var p=a(u),_={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(i[p].references++,i[p].updater(_)):i.push({identifier:u,updater:A(_,t),references:1}),o.push(u)}return o}function l(e){var t=document.createElement("style"),o=e.attributes||{};if(void 0===o.nonce){var i=n.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(e){t.setAttribute(e,o[e])})),"function"==typeof e.insert)e.insert(t);else{var a=r(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 c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function p(e,t,n,o){var r=n?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(e.styleSheet)e.styleSheet.cssText=u(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function _(e,t,n){var o=n.css,r=n.media,i=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}var d=null,h=0;function A(e,t){var n,o,r;if(t.singleton){var i=h++;n=d||(d=l(t)),o=p.bind(null,n,i,!1),r=p.bind(null,n,i,!0)}else n=l(t),o=_.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var o=0;o<n.length;o++){var r=a(n[o]);i[r].references--}for(var l=s(e,t),c=0;c<n.length;c++){var u=a(n[c]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}n=l}}}},5360:function(e,t,n){"use strict";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.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var a=n(4522),s=n(573),l={position:"absolute",display:"table",boxSizing:"border-box"},c={position:"relative",width:"100%",height:"100%",appearance:"none",border:"none",display:"table-cell",verticalAlign:"middle",textAlign:"center",cursor:"pointer",wordBreak:"break-all",textRendering:"geometricPrecision",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},u={styles:{}};function p(e){return e.match(/^https?:\/\//i)||(e="http://"+e),e}var _=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={disableClick:!0,isReady:!1},t.isClickable=function(){var e=t.props.hotspot.onClick;if(!e)return!1;switch(e.type){case"jumpToTime":return void 0!==e.jumpToTime;case"openUrl":case"openUrlInNewTab":return!!e.url;default:return!1}},t.handleClick=function(){var e=t.props.hotspot,n=t.state.disableClick;if(e.onClick&&!n)switch(e.onClick.type){case"jumpToTime":if(void 0===e.onClick.jumpToTime)return;t.props.seekTo(e.onClick.jumpToTime/1e3);break;case"openUrl":if(!e.onClick.url)return;var o=p(e.onClick.url);window.open(o,"_top"),t.props.sendAnalytics({eventNumber:47,target:o,hotspotId:e.id});break;case"openUrlInNewTab":if(!e.onClick.url)return;t.props.pauseVideo(),o=p(e.onClick.url);try{window.open(o,"_blank"),t.props.sendAnalytics({eventNumber:47,target:o,hotspotId:e.id})}catch(e){}}},t.getFontSize=function(e,n,o){var r=t.createDivElement();r.style.top="".concat(e.y,"px"),r.style.fontSize="".concat(n.styles["font-size"],"px"),r.style.fontFamily="".concat(n.styles["font-family"]),r.textContent=o||"",document.body.appendChild(r);var i=r.clientWidth,a=parseInt(n.styles["font-size"]),s=a;if(i>e.width)for(s=a-1;s>=10&&(r.style.fontSize="".concat(s,"px"),!(r.clientWidth<=e.width));s--);return document.body.removeChild(r),s},t.createDivElement=function(){var e=document.createElement("div");return e.id="textDivTest",e.style.position="absolute",e.style.display="table-cell",e.style.textAlign="center",e.style.wordBreak="break-all",e.style.textRendering="geometricPrecision",e},t}return r(t,e),t.prototype.componentDidMount=function(){var e=this.props.hotspot;e&&e.onClick?this.setState({isReady:!0,disableClick:!this.isClickable()}):this.setState({isReady:!0})},t.prototype.render=function(){var e=this.props.hotspot,t=e.layout,n=e.label,o=this.state,r=o.isReady,u=o.disableClick;if(!r||!this.props.visible)return null;var p=i(i({},l),{top:t.y,left:t.x,height:t.height,width:t.width}),_="".concat(this.getFontSize(t,e,n||""),"px"),d=i(i(i({},c),e.styles),{cursor:u?"default":"pointer",maxWidth:"".concat(t.width,"px"),fontSize:_});return(0,a.h)(s.A11yWrapper,{onClick:this.handleClick},(0,a.h)("div",{tabIndex:0,"aria-label":n,"aria-disabled":u,style:p,"data-testid":"hotspots_hotspot"},(0,a.h)("div",{style:d},n)))},t.defaultProps=u,t}(a.Component);t.default=_},6658:function(e,t,n){"use strict";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});var i=n(4522),a=n(6912),s=n(5360),l={position:"absolute",display:"block",overflow:"visible",top:0,left:0,width:0,height:0},c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.renderHotspots=function(e){if(!e)return null;var n=t.props,o=n.seekTo,r=n.pauseVideo,a=n.sendAnalytics;return e.map((function(e){return(0,i.h)(s.default,{pauseVideo:r,seekTo:o,key:e.id,visible:!0,hotspot:e,sendAnalytics:a})}))},t}return r(t,e),t.prototype.shouldComponentUpdate=function(e){return!(0,a.shallowCompareHotspots)(this.props.hotspots,e.hotspots)},t.prototype.render=function(){var e=this.props.hotspots,t=this.renderHotspots(e);return(0,i.h)("div",{style:l,"data-testid":"hotspots_hotspotsContainer"},t)},t}(i.Component);t.default=c},1624:function(e,t,n){"use strict";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.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.HotspotsPlugin=void 0;var a=n(4522),s=n(573),l=n(6658),c=n(8263),u=function(e){function t(t,n,o){var r=e.call(this,t,n,o)||this;return r._hotspots=[],r._floatingItem=null,r._canvas=null,r._isHotspotType=function(e){var t=e.metadata,n=r.cuePointManager,o=n.KalturaCuePointType,i=n.KalturaCuePointTags;return(null==t?void 0:t.cuePointType)===o.ANNOTATION&&(null==t?void 0:t.tags)===i.HOTSPOT},r._filterHotspotCues=function(e){return e.filter(r._isHotspotType)},r._prepareHotspots=function(e){var t=[];return e.forEach((function(e){var n=e.metadata.partnerData;n&&n.schemaVersion&&t.push({id:e.id,startTime:e.startTime,endTime:e.endTime,label:e.metadata.text,styles:n.styles,onClick:n.onClick,rawLayout:i({},n.layout)})})),t},r._recalculateCuepointLayout=function(e){var t,n;if(r.logger.debug("calculating cuepoint layout based on video/player sizes"),!(null===(t=r._canvas)||void 0===t?void 0:t.playerSize)||!(null===(n=r._canvas)||void 0===n?void 0:n.videoSize))return r.logger.warn("missing video/player sizes, hide all cuepoint"),[];var o=r._canvas.playerSize,a=o.width,s=o.height,l=r._canvas.videoSize,u=l.width,p=l.height;if(!(a&&s&&u&&p))return r.logger.warn("missing video/player sizes, hide all cuepoint"),[];var _=(0,c.scaleVideo)(u,p,a,s,!0);return r.logger.debug("recalculate cuepoint layout based on new sizes"),e.map((function(e){return i(i({},e),{layout:r._calculateLayout(e,_)})}))},r._onTimedMetadataChange=function(e){var t=e.payload,n=r._filterHotspotCues(t.cues);if(n.length||r._hotspots.length){var o=r._prepareHotspots(n);r._hotspots=r._recalculateCuepointLayout(o),r._updateHotspotsContainer()}},r._pauseVideo=function(){r._player.pause()},r._seekTo=function(e){r._player.currentTime=e},r._checkIfResizeHappened=function(e){if(!r._canvas)return r._canvas=e,!0;var t=r._canvas.playerSize,n=r._canvas.videoSize,o=e.playerSize,i=e.videoSize;return(t.width!==o.width||t.height!==o.height||n.width!==i.width||n.height!==i.height)&&(r._canvas=e,!0)},r._renderRoot=function(e){return r._checkIfResizeHappened(e.canvas)&&(r._hotspots=r._recalculateCuepointLayout(r._hotspots)),(0,a.h)(l.default,{key:"hotspotWrapper",hotspots:r._hotspots,pauseVideo:r._pauseVideo,seekTo:r._seekTo,sendAnalytics:function(){}})},r._player=n,r._contribServices=s.ContribServices.get({kalturaPlayer:r._player}),r}return r(t,e),t.isValid=function(){return!0},Object.defineProperty(t.prototype,"cuePointManager",{get:function(){return this._player.getService("kalturaCuepoints")},enumerable:!1,configurable:!0}),t.prototype.getUIComponents=function(){return this._contribServices.register()},t.prototype.loadMedia=function(){this.cuePointManager&&!this._player.isLive()?(this._addHotspotsContainer(),this.cuePointManager.registerTypes([this.cuePointManager.CuepointType.HOTSPOT]),this.eventManager.listen(this._player,this._player.Event.TIMED_METADATA_CHANGE,this._onTimedMetadataChange)):this.logger.warn("kalturaCuepoints haven't registered or current entry is live")},t.prototype._calculateLayout=function(e,t){var n=e.rawLayout;return{x:t.left+n.relativeX*t.width,y:t.top+n.relativeY*t.height,width:n.relativeWidth*t.width,height:n.relativeHeight*t.height}},t.prototype._addHotspotsContainer=function(){this._floatingItem=this._contribServices.floatingManager.add({label:"Hotspots",mode:s.FloatingUIModes.MediaLoaded,position:s.FloatingPositions.VideoArea,renderContent:this._renderRoot})},t.prototype._updateHotspotsContainer=function(){this._floatingItem&&this._floatingItem.update()},t.prototype.reset=function(){this.eventManager.removeAll(),this._hotspots=[],this._canvas=null,this._floatingItem&&(this._contribServices.floatingManager.remove(this._floatingItem),this._floatingItem=null)},t.prototype.destroy=function(){},t.defaultConfig={},t}(KalturaPlayer.core.BasePlugin);t.HotspotsPlugin=u},6912:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shallowCompareHotspots=void 0,t.shallowCompareHotspots=function(e,t){var n=e.length;if(t.length!==n)return!1;for(var o=0;o<n;o++)if(e[o]!==t[o])return!1;return!0}},8263:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scaleVideo=void 0,t.scaleVideo=function(e,t,n,o,r){var i={width:0,height:0,left:0,top:0,scaleToTargetWidth:!0};if(e<=0||t<=0||n<=0||o<=0)return i;var a=n,s=t*n/e,l=e*o/t,c=o,u=l>n;return(u=u?r:!r)?(i.width=Math.abs(a),i.height=Math.abs(s),i.scaleToTargetWidth=!0):(i.width=Math.abs(l),i.height=Math.abs(c),i.scaleToTargetWidth=!1),i.left=Math.abs((n-i.width)/2),i.top=Math.abs((o-i.height)/2),i}},699:function(e){e.exports=/[\0-\x1F\x7F-\x9F]/},6924:function(e){e.exports=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4E\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDF3C-\uDF3E]|\uD806[\uDC3B\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/},9338:function(e){e.exports=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/},8287:function(e){e.exports=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/},2052:function(e){"use strict";e.exports=KalturaPlayer},4522:function(e){"use strict";e.exports=KalturaPlayer.ui.preact}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={id:o,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.exports}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 o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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})},n.nc=void 0;var o={};!function(){"use strict";var e=o;Object.defineProperty(e,"__esModule",{value:!0}),e.NAME=e.VERSION=e.Plugin=void 0;var t=n(1624);Object.defineProperty(e,"Plugin",{enumerable:!0,get:function(){return t.HotspotsPlugin}}),e.VERSION="3.1.7",e.NAME="@playkit-js/hotspots",KalturaPlayer.core.registerPlugin("playkit-js-hotspots",t.HotspotsPlugin)}(),((KalturaPlayer=void 0===KalturaPlayer?{}:KalturaPlayer).plugins=KalturaPlayer.plugins||{}).hotspots=o}();

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){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @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.6";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,isDefaultThumb:!e.assetId}}));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,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.retryConfig.maxAttempts=1,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.retryConfig.maxAttempts=1,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.4-canary.0-ab0b9a0"}])},function(e,t,n){"use strict";n.r(t),n.d(t,"Plugin",(function(){return x})),n.d(t,"EventType",(function(){return y})),n.d(t,"HttpMethodType",(function(){return M})),n.d(t,"VERSION",(function(){return H})),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),a(this,"shareNetworkName",""),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.getShareNetworkName=function(){return this.shareNetworkName},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{}}},SHARE_CLICKED:{type:"SHARE_CLICKED",index:21,getEventModel:function(){return{}}},SHARE_NETWORK:{type:"SHARE_NETWORK",index:22,getEventModel:function(e){return{socialNetwork:e.getShareNetworkName()}}}},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}();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}var S=r.core.FakeEvent,C=r.core.FakeEventTarget,P=function(){function e(e,t){T(this,"worker",null);var n=new Blob(["setInterval(() => postMessage(0), "+t+");"]),r=URL.createObjectURL(n);this.worker=new Worker(r),this.worker.onmessage=e}return e.prototype.stop=function(){this.worker&&this.worker.terminate()},e}(),A=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._terminateTimer(),this._stopped=!1,this._resetCounter=0,this._eventCounter=0,this._timer=new P((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._terminateTimer()},i._terminateTimer=function(){this._timer&&(this._timer.stop(),this._timer=null)},i._monitor=function(){this._stopped?(this._resetCounter===this._config.resetCounter&&(this.dispatchEvent(new S(r.Event.RESET)),this._resetCounter=0,this._eventCounter=0),this._resetCounter++):(this.dispatchEvent(new S(r.Event.TICK)),this._eventCounter===this._config.eventCounter&&(this.dispatchEvent(new S(r.Event.REPORT)),this._eventCounter=0),this._eventCounter++)},r}(C);T(A,"Event",{TICK:"tick",RESET:"reset",REPORT:"report"});var M={GET:"GET",POST:"POST"},R={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 b="related_selected",I="related_clicked",w="share_clicked",O="share_network";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 N(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 k=r.core.Error,F=(r.core.FakeEvent,r.core.Utils),x=function(e){var t,n;function r(t,n,r){var i;if(L(N(i=e.call(this,t,n,r)||this),"_lastDroppedFrames",0),L(N(i),"_lastTotalFrames",0),L(N(i),"_performanceEntries",[]),L(N(i),"_pendingFragLoadedUrls",[]),L(N(i),"_fragLoadedFiredOnce",!1),L(N(i),"_canPlayOccured",!1),L(N(i),"_isManualPreload",!1),i._rateHandler=new v,i._model=new s,i._setModelDelegates(),i._timer=new A({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,A.Event.TICK,(function(){return e._rateHandler.countCurrent()})),this.eventManager.listen(this._timer,A.Event.REPORT,(function(){return e._onReport()})),this.eventManager.listen(this._timer,A.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,I,(function(){return e._onRelatedClicked()})),this.eventManager.listen(this.player,b,(function(){return e._onRelatedSelected()})),this.eventManager.listen(this.player,w,(function(){return e._onShareClicked()})),this.eventManager.listen(this.player,O,(function(t){return e._onShareNetworkClicked(t)})),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===k.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._onShareClicked=function(){this._sendAnalytics(E.SHARE_CLICKED)},S._onShareNetworkClicked=function(e){var t=e.payload.shareNetworkName;t&&(this._model.updateModel({shareNetworkName:t}),this._sendAnalytics(E.SHARE_NETWORK))},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 R?R[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 F.Object.copyDeep(y)}}])&&D(a.prototype,o),T&&D(a,T),r}(r.BasePlugin);L(x,"defaultConfig",{serviceUrl:F.Http.protocol+"//analytics.kaltura.com/api_v3/index.php",requestMethod:M.POST,viewEventCountdown:10,resetSessionCountdown:30,dvrThreshold:120,playbackContext:"",applicationVersion:"",application:"",kalturaApplicationVersion:"",kalturaApplication:""});var H="1.5.7",B="@playkit-js/playkit-js-kava";Object(r.registerPlugin)("kava",x)}]);

var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.share=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},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=KalturaPlayer},function(e,t,n){var i=n(3),r=n(4);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]);var a={attributes:{id:"@playkit-js/share"},insert:"head",singleton:!1};i(r,a);e.exports=r.locals||{}},function(e,t,n){window,e.exports=function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},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 i;!function(r,a){"use strict";var o="model",s="name",c="type",u="vendor",l="version",d="mobile",h="tablet",f="smarttv",p=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},_=function(e,t){return"string"==typeof e&&-1!==A(t).indexOf(A(e))},A=function(e){return e.toLowerCase()},g=function(e,t){if("string"==typeof e)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0===t?e:e.substring(0,255)},v=function(e,t){for(var n,i,r,a,o,s,c=0;c<t.length&&!o;){var u=t[c],l=t[c+1];for(n=i=0;n<u.length&&!o;)if(o=u[n++].exec(e))for(r=0;r<l.length;r++)s=o[++i],"object"==typeof(a=l[r])&&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;c+=2}},y=function(e,t){for(var n in t)if("object"==typeof t[n]&&t[n].length>0){for(var i=0;i<t[n].length;i++)if(_(t[n][i],e))return"?"===n?void 0:n}else if(_(t[n],e))return"?"===n?void 0:n;return e},m={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],[l,[s,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[l,[s,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[s,l],[/opios[\/ ]+([\w\.]+)/i],[l,[s,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[l,[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,l],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[l,[s,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[l,[s,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[l,[s,"WeChat"]],[/konqueror\/([\w\.]+)/i],[l,[s,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[l,[s,"IE"]],[/yabrowser\/([\w\.]+)/i],[l,[s,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[s,/(.+)/,"$1 Secure Browser"],l],[/\bfocus\/([\w\.]+)/i],[l,[s,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[l,[s,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[l,[s,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[l,[s,"Dolphin"]],[/coast\/([\w\.]+)/i],[l,[s,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[l,[s,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[l,[s,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[s,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[s,/(.+)/,"$1 Browser"],l],[/(comodo_dragon)\/([\w\.]+)/i],[[s,/_/g," "],l],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[s,l],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[s],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[s,"Facebook"],l],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[s,l],[/\bgsa\/([\w\.]+) .*safari\//i],[l,[s,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[l,[s,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[s,"Chrome WebView"],l],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[l,[s,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[s,l],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[l,[s,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[l,s],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[s,[l,y,{"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,l],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[s,"Netscape"],l],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[l,[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,l]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",A]],[/((?: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/,"",A]],[/(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",A]]],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"],[c,h]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[u,"Samsung"],[c,d]],[/\((ip(?:hone|od)[\w ]*);/i],[o,[u,"Apple"],[c,d]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[u,"Apple"],[c,h]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[u,"Huawei"],[c,h]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[o,[u,"Huawei"],[c,d]],[/\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"],[c,d]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[u,"Xiaomi"],[c,h]],[/; (\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"],[c,d]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[u,"Vivo"],[c,d]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[o,[u,"Realme"],[c,d]],[/\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"],[c,d]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[u,"Motorola"],[c,h]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[u,"LG"],[c,h]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[u,"LG"],[c,d]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[u,"Lenovo"],[c,h]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[u,"Nokia"],[c,d]],[/(pixel c)\b/i],[o,[u,"Google"],[c,h]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[u,"Google"],[c,d]],[/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"],[c,d]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[u,"Sony"],[c,h]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[u,"OnePlus"],[c,d]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[u,"Amazon"],[c,h]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[u,"Amazon"],[c,d]],[/(playbook);[-\w\),; ]+(rim)/i],[o,u,[c,h]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[u,"BlackBerry"],[c,d]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[u,"ASUS"],[c,h]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[u,"ASUS"],[c,d]],[/(nexus 9)/i],[o,[u,"HTC"],[c,h]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[u,[o,/_/g," "],[c,d]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[u,"Acer"],[c,h]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[u,"Meizu"],[c,d]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[u,"Sharp"],[c,d]],[/(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,[c,d]],[/(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,[c,h]],[/(surface duo)/i],[o,[u,"Microsoft"],[c,h]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[u,"Fairphone"],[c,d]],[/(u304aa)/i],[o,[u,"AT&T"],[c,d]],[/\bsie-(\w*)/i],[o,[u,"Siemens"],[c,d]],[/\b(rct\w+) b/i],[o,[u,"RCA"],[c,h]],[/\b(venue[\d ]{2,7}) b/i],[o,[u,"Dell"],[c,h]],[/\b(q(?:mv|ta)\w+) b/i],[o,[u,"Verizon"],[c,h]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[u,"Barnes & Noble"],[c,h]],[/\b(tm\d{3}\w+) b/i],[o,[u,"NuVision"],[c,h]],[/\b(k88) b/i],[o,[u,"ZTE"],[c,h]],[/\b(nx\d{3}j) b/i],[o,[u,"ZTE"],[c,d]],[/\b(gen\d{3}) b.+49h/i],[o,[u,"Swiss"],[c,d]],[/\b(zur\d{3}) b/i],[o,[u,"Swiss"],[c,h]],[/\b((zeki)?tb.*\b) b/i],[o,[u,"Zeki"],[c,h]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],o,[c,h]],[/\b(ns-?\w{0,9}) b/i],[o,[u,"Insignia"],[c,h]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[u,"NextBook"],[c,h]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],o,[c,d]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],o,[c,d]],[/\b(ph-1) /i],[o,[u,"Essential"],[c,d]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[u,"Envizen"],[c,h]],[/\b(trio[-\w\. ]+) b/i],[o,[u,"MachSpeed"],[c,h]],[/\btu_(1491) b/i],[o,[u,"Rotor"],[c,h]],[/(shield[\w ]+) b/i],[o,[u,"Nvidia"],[c,h]],[/(sprint) (\w+)/i],[u,o,[c,d]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[u,"Microsoft"],[c,d]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[u,"Zebra"],[c,h]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[u,"Zebra"],[c,d]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,o,[c,"console"]],[/droid.+; (shield) bui/i],[o,[u,"Nvidia"],[c,"console"]],[/(playstation [345portablevi]+)/i],[o,[u,"Sony"],[c,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[u,"Microsoft"],[c,"console"]],[/smart-tv.+(samsung)/i],[u,[c,f]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[u,"Samsung"],[c,f]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,"LG"],[c,f]],[/(apple) ?tv/i],[u,[o,"Apple TV"],[c,f]],[/crkey/i],[[o,"Chromecast"],[u,"Google"],[c,f]],[/droid.+aft(\w)( bui|\))/i],[o,[u,"Amazon"],[c,f]],[/\(dtv[\);].+(aquos)/i],[o,[u,"Sharp"],[c,f]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[u,g],[o,g],[c,f]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[c,f]],[/((pebble))app/i],[u,o,[c,"wearable"]],[/droid.+; (glass) \d/i],[o,[u,"Google"],[c,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[o,[u,"Zebra"],[c,"wearable"]],[/(quest( 2)?)/i],[o,[u,"Facebook"],[c,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[c,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[o,[c,d]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[c,h]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[c,h]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[c,d]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[l,[s,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[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,l],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[l,s]],os:[[/microsoft (windows) (vista|xp)/i],[s,l],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[s,[l,y,m]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[l,y,m]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[l,/_/g,"."],[s,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[s,"Mac OS"],[l,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[l,s],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[s,l],[/\(bb(10);/i],[l,[s,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[l,[s,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[l,[s,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[l,[s,"webOS"]],[/crkey\/([\d\.]+)/i],[l,[s,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[s,"Chromium OS"],l],[/(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,l],[/(sunos) ?([\w\.\d]*)/i],[[s,"Solaris"],l],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[s,l]]},b=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof b))return new b(e,t).getResult();var n=e||(void 0!==r&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),i=t?function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n}(E,t):E;return this.getBrowser=function(){var e,t={name:void 0,version:void 0};return v.call(t,n,i.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 v.call(e,n,i.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return v.call(e,n,i.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return v.call(e,n,i.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return v.call(e,n,i.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?g(e,255):e,this},this.setUA(n),this};b.VERSION="1.0.2",b.BROWSER=p([s,l,"major"]),b.CPU=p(["architecture"]),b.DEVICE=p([o,u,c,"console",d,f,h,"wearable","embedded"]),b.ENGINE=b.OS=p([s,l]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=b),t.UAParser=b):n(4)?void 0===(i=function(){return b}.call(t,n,t,e))||(e.exports=i):void 0!==r&&(r.UAParser=b);var T=void 0!==r&&(r.jQuery||r.Zepto);if(T&&!T.ua){var k=new b;T.ua=k.getResult(),T.ua.get=function(){return k.getUA()},T.ua.set=function(e){k.setUA(e);var t=k.getResult();for(var n in t)T.ua[n]=t[n]}}}("object"==typeof window?window:this)},function(e,t,n){var i,r;
/*!
 * 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"},c={},u=function(e,t){return function(){return t.apply(e,arguments)}},l=function(){var e,t,n=arguments,i=n[0];for(t=1;t<n.length;t++)for(e in n[t])!(e in i)&&n[t].hasOwnProperty(e)&&(i[e]=n[t][e]);return i},d=function(e,t){return{value:e,name:t}};s.TRACE=d(1,"TRACE"),s.DEBUG=d(2,"DEBUG"),s.INFO=d(3,"INFO"),s.TIME=d(4,"TIME"),s.WARN=d(5,"WARN"),s.ERROR=d(8,"ERROR"),s.OFF=d(99,"OFF");var h=function(e){this.context=e,this.setLevel(e.filterLevel),this.log=this.info};h.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,l({level:e},this.context))}};var f,p=new h({filterLevel:s.OFF});(f=s).enabledFor=u(p,p.enabledFor),f.trace=u(p,p.trace),f.debug=u(p,p.debug),f.time=u(p,p.time),f.timeEnd=u(p,p.timeEnd),f.info=u(p,p.info),f.warn=u(p,p.warn),f.error=u(p,p.error),f.log=f.info,s.setHandler=function(e){o=e},s.setLevel=function(e){for(var t in p.setLevel(e),c)c.hasOwnProperty(t)&&c[t].setLevel(e)},s.getLevel=function(){return p.getLevel()},s.get=function(e){return c[e]||(c[e]=new h(l({name:e},p.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(i,r){i=Array.prototype.slice.call(i);var a,o=console.log;r.level===s.TIME?(a=(r.name?"["+r.name+"] ":"")+i[0],"start"===i[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"])):(r.level===s.WARN&&console.warn?o=console.warn:r.level===s.ERROR&&console.error?o=console.error:r.level===s.INFO&&console.info?o=console.info:r.level===s.DEBUG&&console.debug?o=console.debug:r.level===s.TRACE&&console.trace&&(o=console.trace),e.formatter(i,r),n(o,i))}},s.useDefaults=function(e){s.setLevel(e&&e.defaultLevel||s.DEBUG),s.setHandler(s.createDefaultHandler(e))},void 0===(r="function"==typeof(i=s)?i.call(t,n,t,e):i)||(e.exports=r)}()},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 i=n(6),r=n(7);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]),i(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},function(e,t,n){"use strict";var i,r=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={},i=[],r=0;r<e.length;r++){var s=e[r],c=t.base?s[0]+t.base:s[0],u=n[c]||0,l="".concat(c," ").concat(u);n[c]=u+1;var d=o(l),h={css:s[1],media:s[2],sourceMap:s[3]};-1!==d?(a[d].references++,a[d].updater(h)):a.push({identifier:l,updater:_(h,t),references:1}),i.push(l)}return i}function c(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var a=n.nc;a&&(i.nonce=a)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var o=r(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,l=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function d(e,t,n,i){var r=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=l(t,r);else{var a=document.createTextNode(r),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function h(e,t,n){var i=n.css,r=n.media,a=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),a&&btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var f=null,p=0;function _(e,t){var n,i,r;if(t.singleton){var a=p++;n=f||(f=c(t)),i=d.bind(null,n,a,!1),r=d.bind(null,n,a,!0)}else n=c(t),i=h.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=(void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i));var n=s(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<n.length;i++){var r=o(n[i]);a[r].references--}for(var c=s(e,t),u=0;u<n.length;u++){var l=o(n[u]);0===a[l].references&&(a[l].updater(),a.splice(l,1))}n=c}}}},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,i,r,a=e[1]||"",o=e[3];if(!o)return a;if(t&&"function"==typeof btoa){var s=(n=o,i=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(i),"/*# ".concat(r," */")),c=o.sources.map((function(e){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(e," */")}));return[a].concat(c).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,i){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(i)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(r[o]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);i&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"loadPlayer",(function(){return Hn})),n.d(t,"registerMediaSourceAdapter",(function(){return Pt})),n.d(t,"BaseMediaSourceAdapter",(function(){return At})),n.d(t,"BaseMiddleware",(function(){return it})),n.d(t,"Track",(function(){return ie})),n.d(t,"VideoTrack",(function(){return ae})),n.d(t,"AudioTrack",(function(){return oe})),n.d(t,"TextTrack",(function(){return Ze})),n.d(t,"ImageTrack",(function(){return dt})),n.d(t,"TextStyle",(function(){return Ae})),n.d(t,"Cue",(function(){return He})),n.d(t,"TimedMetadata",(function(){return Lt})),n.d(t,"createTextTrackCue",(function(){return Mt})),n.d(t,"createTimedMetadata",(function(){return Ut})),n.d(t,"Utils",(function(){return i})),n.d(t,"utils",(function(){return i})),n.d(t,"Error",(function(){return P})),n.d(t,"FakeEvent",(function(){return v})),n.d(t,"FakeEventTarget",(function(){return C})),n.d(t,"EventManager",(function(){return I})),n.d(t,"VERSION",(function(){return Fn})),n.d(t,"NAME",(function(){return Bn})),n.d(t,"Env",(function(){return _})),n.d(t,"State",(function(){return $})),n.d(t,"getCapabilities",(function(){return Vn})),n.d(t,"setCapabilities",(function(){return jn})),n.d(t,"EngineDecoratorProvider",(function(){return Mn})),n.d(t,"registerEngine",(function(){return $t})),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 Y})),n.d(t,"filterTracksByRestriction",(function(){return vt})),n.d(t,"Html5EventType",(function(){return K})),n.d(t,"CustomEventType",(function(){return z})),n.d(t,"EventType",(function(){return X})),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 $e})),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 yt})),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 vn})),n.d(t,"ThumbnailInfo",(function(){return ft})),n.d(t,"getLogger",(function(){return w})),n.d(t,"LogLevel",(function(){return m})),n.d(t,"getLogLevel",(function(){return k})),n.d(t,"setLogLevel",(function(){return S})),n.d(t,"setLogHandler",(function(){return b}));var i={};n.r(i),n.d(i,"Number",(function(){return M})),n.d(i,"String",(function(){return U})),n.d(i,"Object",(function(){return F})),n.d(i,"Generator",(function(){return B})),n.d(i,"Dom",(function(){return H})),n.d(i,"Http",(function(){return V})),n.d(i,"VERSION",(function(){return j})),n.d(i,"ResizeWatcher",(function(){return cn})),n.d(i,"MultiMap",(function(){return g})),n.d(i,"binarySearch",(function(){return ln}));var r=n(0),a=n.n(r),o=/^.*(web0s).*(smarttv).*$/i,s=/^.*(smart-tv).*(tizen).*$/i,c=/^.*(vidaa).*(smarttv).*$/i,u=[[s],[[a.a.BROWSER.NAME,"SAMSUNG_TV_BROWSER"],[a.a.BROWSER.MAJOR,""],[a.a.BROWSER.VERSION,""]]],l=[[o],[a.a.OS.NAME],[c],[a.a.OS.NAME]],d=[[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]],[c],[[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]]],h=[[/(edg)\/((\d+)?[\w.]+)/i],[[a.a.BROWSER.NAME,"Edge"],a.a.BROWSER.VERSION,a.a.BROWSER.MAJOR]],f=[].concat(h,u),p=new a.a(void 0,{browser:f,device:d,os:l}).getResult();p.isConsole=p.device.type===a.a.DEVICE.CONSOLE,p.isSmartTV=p.device.type===a.a.DEVICE.SMARTTV,p.isMobile=p.device.type===a.a.DEVICE.MOBILE,p.isTablet=p.device.type===a.a.DEVICE.TABLET,p.isWearable=p.device.type===a.a.DEVICE.WEARABLE,p.isEmbedded=p.device.type===a.a.DEVICE.EMBEDDED,p.isIPadOS="Mac OS"===p.os.name&&"ontouchend"in document,p.isSafari=p.browser.name.includes("Safari"),p.isIOS="iOS"===p.os.name,p.isMacOS="Mac OS"===p.os.name;var _=p;function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var g=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 A(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)?A(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}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 i=e.value;t=t.concat(i)}return t},t.remove=function(e,t){if(this._map.has(e)){var n=this._map.get(e);if(Array.isArray(n)){for(var i=0;i<n.length;++i)n[i]==t&&(n.splice(i,1),--i);0===n.length&&this._map.delete(e)}}},t.keys=function(){return this._map.keys()},t.clear=function(){this._map.clear()},e}(),v=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}(),y=n(1),m={DEBUG:y.DEBUG,INFO:y.INFO,TIME:y.TIME,WARN:y.WARN,ERROR:y.ERROR,OFF:y.OFF},E={};function b(e){y.setHandler((function(t,n){return e(t,n)}))}function T(e){return e?y.get(e):y}function k(e){return T(e).getLevel()}function S(e,t){T(t).setLevel(e)}Object.keys(m).forEach((function(e){E[e]=e})),y.useDefaults({defaultLevel:y.ERROR});var w=T,C=function(){function e(){this._listeners=new g,this.dispatchTarget=this,this.__logger=w("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 i=t[n];try{i.handleEvent?i.handleEvent(e):i.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 O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var R=function(){function e(){this._bindingMap=new g}var t=e.prototype;return t.destroy=function(){return this.removeAll(),this._bindingMap=null,Promise.resolve()},t.listenOnce=function(e,t,n,i){var r=this;this.listen(e,t,(function i(a){r.unlisten(e,t,i),n.call(r,a)}),i)},t.listen=function(e,t,n,i){var r=new D(e,t,n,i);this._bindingMap&&this._bindingMap.push(t,r)},t.unlisten=function(e,t,n){if(this._bindingMap)for(var i=this._bindingMap.get(t),r=0;r<i.length;++r){var a=i[r];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 O(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)?O(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}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}(),D=function(){function e(e,t,n,i){this.target=e,this.type=t,this.listener=n,this.options=i,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}(),I=R,N={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 x(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(N,{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 P=function e(t,n,i,r){void 0===r&&(r={}),this.severity=t,this.category=n,this.code=i,this.data=r,k("Error")!==m.OFF&&e._logger.error("Category:"+n+" | Code:"+i+" |",r)};function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}x(P,"Severity",{RECOVERABLE:1,CRITICAL:2}),x(P,"Category",{NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,ADS:8,STORAGE:9,CAST:10,VR:11}),x(P,"Code",N),x(P,"_logger",w("Error"));var M={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={},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 L(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)?L(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}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=i()).done;){var r=t.value;Object.assign(n,r)}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),i=1;i<t;i++)n[i-1]=arguments[i];if(!n.length)return e;var r=n.shift();if(this.isObject(e)&&this.isObject(r))for(var a in r){var o,s;this.isObject(r[a])&&!this.isClassInstance(r[a])?(e[a]||Object.assign(e,((o={})[a]={},o)),this.mergeDeep(e[a],r[a])):Object.assign(e,((s={})[a]=r[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,i){("object"==typeof e&&e!=={}||Array.isArray(e)&&e.length>0)&&(t[i]=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("."),i=0;i<n.length;i++){var r=n[i];if(!e||!window.Object.prototype.hasOwnProperty.call(e,r))return!1;e=e[r]}return!0},createPropertyPath:function(e,t,n){void 0===n&&(n=null);for(var i=t.split("."),r=e;i.length>1;){var a=i,o=a[0];i=a.slice(1),void 0===r[o]&&(r[o]={}),r=r[o]}return r[i[0]]=n,e},deletePropertyPath:function(e,t){if(e&&t){for(var n=t.split("."),i=0;i<n.length-1;i++)if(void 0===(e=e[n[i]]))return;delete e[n.pop()]}},defer:function(){var e,t,n=new Promise((function(n,i){e=n,t=i}));return n.resolve=e,n.reject=t,n},bind:function(e,t){return function(){t.apply(e,arguments)}}},B={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()}},H={addClassName:function(e,t){e&&(e.classList?e.classList.add(t):H.hasClassName(e,t)||(e.className+=t))},removeClassName:function(e,t){e&&(e.classList?e.classList.remove(t):H.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,i){var r=!1,a=t.createElement("link");a.type="text/css",a.rel="stylesheet",a.href=e,a.async=!0,a.onload=a.onreadystatechange=function(){r||this.readyState&&"complete"!==this.readyState||(r=!0,n(this))},a.onerror=a.onabort=i,H.appendChild(document.head,a)}))},loadScriptAsync:function(e){var t=this;return new Promise((function(n,i){var r=!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(){r||this.readyState&&"complete"!==this.readyState||(r=!0,n(this))},o.onerror=o.onabort=i,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,i,r,a){void 0===n&&(n="POST");var o=new XMLHttpRequest;return new Promise((function(s,c){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 c(o.responseText)},o.open(n,e),i&&i.forEach((function(e,t){o.setRequestHeader(t,e)})),r&&(o.timeout=r),a&&(o.ontimeout=function(e){a(),c(e)}),o.send(t)}))},jsonp:function(e,t,n){var i,r=(n=n||{}).timeout?n.timeout:5e3,a=document.createElement("script"),o="jsonpcallback"+Math.round(Date.now()+1000001*Math.random()),s=e,c=function(){a&&a.parentNode&&a.parentNode.removeChild(a),window[o]=function(){},i&&clearTimeout(i)};return new Promise((function(n,u){r&&(i=setTimeout((function(){c(),u(new P(P.Severity.CRITICAL,P.Category.NETWORK,P.Code.TIMEOUT,e))}),r)),window[o]=function(i){var r=t(i,e);c(),n(r)},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(": "),i=n.shift().toLowerCase(),r=n.join(": ");t[i]=r}))}catch(e){}return t}},j={compare:function(e,t,n){void 0===n&&(n={});var i=(n=F.merge([{lexicographical:!1,zeroExtend:!0},n])).lexicographical,r=n.zeroExtend,a=(e||"0").split("."),o=(t||"0").split("."),s=function(e){return(i?/^\d+[A-Za-zαß]*$/:/^\d+[A-Za-zαß]?$/).test(e)},c=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(r){for(;a.length<o.length;)a.push("0");for(;o.length<a.length;)o.push("0")}i||(a=c(a),o=c(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 G(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var W=function(){function e(){this._createEl()}var t,n,i=e.prototype;return i.setSrc=function(e){e&&(this._posterUrl=e,H.setStyle(this._el,"background-image",'url("'+this._posterUrl+'")'),this.hide())},i.getElement=function(){return this._el},i._createEl=function(){if(!this._el){var e=this._el=H.createElement("div");H.setAttribute(e,"id",B.uniqueId(5)),H.setAttribute(e,"tabindex","-1")}},i._removeEl=function(){this._el&&H.removeChild(this._el.parentNode,this._el)},i.show=function(){H.setStyle(this._el,"display","")},i.hide=function(){H.setStyle(this._el,"display","none")},i.reset=function(){this._posterUrl="",H.setStyle(this._el,"background-image","")},i.destroy=function(){this.reset(),this._removeEl()},t=e,(n=[{key:"src",get:function(){return this._posterUrl}}])&&G(t.prototype,n),e}(),Y={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"},K={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"},z={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"},X=F.merge([K,z,Y]);function q(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var Z=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}}])&&q(t,n),e}();function Q(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var $=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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var te=function(){function e(e){var t,n,i,r,a,o,s,c,u,l=this;s=this,c="_transitions",(o={})[J.IDLE]=((t={})[K.LOAD_START]=function(){return l._updateState(J.LOADING)},t[K.PLAY]=function(){return l._updateState(J.BUFFERING)},t[K.SEEKED]=function(){return l._updateState(J.PAUSED)},t),o[J.LOADING]=((n={})[K.LOADED_METADATA]=function(){return l._updateState(J.PAUSED)},n[K.ERROR]=function(e){return e.payload.severity===P.Severity.CRITICAL&&l._updateState(J.IDLE)},n[K.SEEKED]=function(){l._prevState&&l._prevState.type===J.PLAYING&&l._updateState(J.PLAYING)},n),o[J.PAUSED]=((i={})[K.PLAY]=function(){return l._updateState(J.PLAYING)},i[K.PLAYING]=function(){return l._updateState(J.PLAYING)},i[K.ENDED]=function(){return l._updateState(J.IDLE)},i),o[J.PLAYING]=((r={})[K.PAUSE]=function(){return l._updateState(J.PAUSED)},r[K.WAITING]=function(){l._player.seeking?l._updateState(J.LOADING):(l._updateState(J.BUFFERING),l._lastWaitingTime=l._player.currentTime)},r[K.ENDED]=function(){return l._updateState(J.IDLE)},r[K.ERROR]=function(e){return e.payload.severity===P.Severity.CRITICAL&&l._updateState(J.IDLE)},r),o[J.BUFFERING]=((a={})[K.PLAYING]=function(){return l._updateState(J.PLAYING)},a[K.PAUSE]=function(){return l._updateState(J.PAUSED)},a[K.TIME_UPDATE]=function(){"IE"===_.browser.name&&l._player.currentTime!==l._lastWaitingTime&&l._prevState&&l._prevState.type===J.PLAYING&&(l._lastWaitingTime=null,l._updateState(J.PLAYING))},a),u=o,c in s?Object.defineProperty(s,c,{value:u,enumerable:!0,configurable:!0,writable:!0}):s[c]=u,this._player=e,this._logger=w("StateManager"),this._eventManager=new I,this._history=[],this._prevState=null,this._curState=new $(J.IDLE),this._attachListeners()}var t,n,i=e.prototype;return i._attachListeners=function(){this._eventManager.listen(this._player,K.ERROR,this._doTransition.bind(this)),this._eventManager.listen(this._player,K.ENDED,this._doTransition.bind(this)),this._eventManager.listen(this._player,K.PLAY,this._doTransition.bind(this)),this._eventManager.listen(this._player,K.LOAD_START,this._doTransition.bind(this)),this._eventManager.listen(this._player,K.PLAYING,this._doTransition.bind(this)),this._eventManager.listen(this._player,K.LOADED_METADATA,this._doTransition.bind(this)),this._eventManager.listen(this._player,K.PAUSE,this._doTransition.bind(this)),this._eventManager.listen(this._player,K.WAITING,this._doTransition.bind(this)),this._eventManager.listen(this._player,K.SEEKED,this._doTransition.bind(this)),this._eventManager.listen(this._player,K.TIME_UPDATE,this._doTransition.bind(this))},i._doTransition=function(e){(e.type!==K.TIME_UPDATE||this._curState===J.BUFFERING&&e.type===K.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)},i._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 $(e),this._logger.debug("Switch player state: from "+this._prevState.type+" to "+this._curState.type),this._dispatchEvent())},i._dispatchEvent=function(){var e=new v(z.PLAYER_STATE_CHANGED,{oldState:this._prevState,newState:this._curState});this._player.dispatchEvent(e)},i.destroy=function(){this._history=[],this._eventManager.destroy()},i.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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ie=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,i){try{return e=e.toLowerCase(),t=t.toLowerCase(),n&&(n=n.toLowerCase()),i?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 re(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ae=function(e){var t,n,i,r;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,i=a,(r=[{key:"bandwidth",get:function(){return this._bandwidth}},{key:"width",get:function(){return this._width}},{key:"height",get:function(){return this._height}}])&&re(i.prototype,r),a}(ie),oe=function(e){var t,n;function i(){return e.apply(this,arguments)||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(ie);function se(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ce(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 le(e){return"number"==typeof e&&e>=0&&e<=100}var de,he=function(){function e(){ce(this,"_width",100),ce(this,"_lines",3),ce(this,"_regionAnchorX",0),ce(this,"_regionAnchorY",100),ce(this,"_viewportAnchorX",0),ce(this,"_viewportAnchorY",100),ce(this,"_scroll","")}var t,n;return t=e,(n=[{key:"width",get:function(){return this._width},set:function(e){if(!le(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(!le(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(!le(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(!le(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(!le(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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function pe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}de="undefined"!=typeof window&&window.VTTRegion?window.VTTRegion:he;var _e=function(){function e(){pe(this,"_fontSizeIndex",2),pe(this,"fontFamily",e.FontFamily.SANS_SERIF),pe(this,"fontColor",e.StandardColors.WHITE),pe(this,"fontOpacity",e.StandardOpacities.OPAQUE),pe(this,"backgroundColor",e.StandardColors.BLACK),pe(this,"backgroundOpacity",e.StandardOpacities.OPAQUE),pe(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},i=new e;return i.fontEdge=n(t.fontEdge,i.fontEdge),i.fontSize=n(t.fontSize,i.fontSize),i.fontScale=n(t.fontScale,i.fontScale),i.fontColor=n(t.fontColor,i.fontColor),i.fontOpacity=n(t.fontOpacity,i.fontOpacity),i.backgroundColor=n(t.backgroundColor,i.backgroundColor),i.backgroundOpacity=n(t.backgroundOpacity,i.backgroundOpacity),i.fontFamily=n(t.fontFamily,i.fontFamily),i},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,i=e.prototype;return i.getTextShadow=function(){for(var t=[],n=0;n<this.fontEdge.length;n++){var i=this.fontEdge[n].slice(0,3),r=this.fontEdge[n].slice(3,6);t.push(e.toRGBA(i,this.fontOpacity)+" "+r.join("px ")+"px")}return t.join(",")},i.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; ")},i.clone=function(){return e.fromJson(e.toJson(this))},i.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}();pe(_e,"FontFamily",{ARIAL:"Arial",HELVETICA:"Helvetica",VERDANA:"Verdana",SANS_SERIF:"sans-serif"}),pe(_e,"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]}),pe(_e,"StandardOpacities",{OPAQUE:1,SEMI_HIGH:.75,SEMI_LOW:.25,TRANSPARENT:0}),pe(_e,"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]]}),pe(_e,"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 Ae=_e;function ge(e){function t(e,t,n,i){return 3600*(0|e)+60*(0|t)+(0|n)+(0|i)/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 ve={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},ye={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},me={v:"title",lang:"lang"},Ee={rt:"ruby"};function be(){this.values=xe(null)}function Te(e,t,n,i){var r=i?e.split(i):[e];for(var a in r)if("string"==typeof r[a]){var o=r[a].split(n);2===o.length&&t(o[0],o[1])}}function ke(e,t,n){var i=e;function r(){var t=ge(e);if(null===t)throw new Pe(Pe.Errors.BadTimeStamp,"Malformed timestamp: "+i);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function a(){e=e.replace(/^\s+/,"")}if(a(),t.startTime=r(),a(),"--\x3e"!==e.substr(0,3))throw new Pe(Pe.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+i);e=e.substr(3),a(),t.endTime=r(),a(),function(e,t){var i=new be;Te(e,(function(e,t){switch(e){case"region":for(var r=n.length-1;r>=0;r--)if(n[r].id===t){i.set(e,n[r].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];i.integer(e,o),i.percent(e,o)&&i.set("snapToLines",!1),i.alt(e,o,["auto"]),2===a.length&&i.alt("lineAlign",a[1],["start","center","end"]);break;case"position":a=t.split(","),i.percent(e,a[0]),2===a.length&&i.alt("positionAlign",a[1],["start","center","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical",""),t.line=i.get("line",t.line||"auto"),t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100);try{t.align=i.get("align","center")}catch(e){t.align=i.get("align","middle")}t.position=i.get("position",t.position||"auto"),t.positionAlign=i.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}function Se(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 i(e){return ve[e]}function r(e){for(var t;t=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(t[0],i);return e}function a(e,t){return!Ee[t.localName]||Ee[t.localName]===e.localName}function o(t,n){var i=ye[t];if(!i)return null;var r=e.document.createElement(i),a=me[t];return a&&n&&(r[a]=n.trim()),r}for(var s,c=e.document.createElement("div"),u=c,l=[];null!==(s=n());)if("<"!==s[0])u.appendChild(e.document.createTextNode(r(s)));else{if("/"===s[1]){l.length&&l[l.length-1]===s.substr(2).replace(">","")&&(l.pop(),u=u.parentNode);continue}var d=ge(s.substr(1,s.length-2)),h=void 0;if(d){h=e.document.createProcessingInstruction("timestamp",d),u.appendChild(h);continue}var f=s.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!f)continue;if(!(h=o(f[1],f[3])))continue;if(!a(u,h))continue;f[2]&&(h.className=f[2].substr(1).replace("."," ")),l.push(f[1]),u.appendChild(h),u=h}return c}be.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 i=0;i<n.length;++i)if(t===n[i]){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 we=[[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<we.length;t++){var n=we[t];if(e>=n[0]&&e<=n[1])return!0}return!1}var Oe=function(e){var t,n;function i(t,n,i){var r;r=e.call(this)||this;var a="undefined"!=typeof navigator&&/MSIE\s8\.0/.test(navigator.userAgent);"undefined"!=typeof WebVTTSet&&(WebVTTSet.fontSet,WebVTTSet.backgroundSet,WebVTTSet.edgeSet),r.cue=n,r.cueDiv=Se(t,n.text);var o={color:i.color,backgroundColor:i.backgroundColor,textShadow:i.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"),r.applyStyles(o,r.cueDiv),r.div=t.document.createElement("div"),o={textAlign:"middle"===n.align?"center":n.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},a||(o.direction=function(e){var t=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;n>=0;n--)e.push(t.childNodes[n])}function r(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?r(e):t.childNodes?(i(e,t),r(e)):void 0}for(i(t,e);n=r(t);)for(var a=0;a<n.length;a++)if(Ce(n.charCodeAt(a)))return"rtl";return"ltr"}(r.cueDiv),o.writingMode=""===n.vertical?"horizontal-tb":"lr"===n.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),r.applyStyles(o),r.div.appendChild(r.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?r.applyStyles({left:r.formatStyle(s,"%"),width:r.formatStyle(Math.min(n.size,100-s)||n.size,"%")}):r.applyStyles({top:r.formatStyle(s,"%"),height:r.formatStyle(Math.min(n.size,100-s)||n.size,"%")}),r.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")})},r}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(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}()),Re=function(){function e(e){var t,n,i,r;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,i=e.div.offsetWidth,r=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||r,this.height=e.height||n,this.bottom=e.bottom||r+(e.height||n),this.width=e.width||i,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,i=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||i,height:e.height||t,bottom:e.bottom||i+(e.height||t),width:e.width||n}},e}();function De(e,t,n,i){var r=new Re(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,i=0,r=0;r<n.length&&n[r]!==t;r++)n[r].mode===Ze.MODE.SHOWING&&i++;return-1*++i}(a),s=[];if(a.snapToLines){var c;switch(a.vertical){case"":s=["+y","-y"],c="height";break;case"rl":s=["+x","-x"],c="width";break;case"lr":s=["-x","+x"],c="width"}var u=r.lineHeight,l=u*Math.round(o),d=n[c]+u,h=s[0];Math.abs(l)>d&&(l=l<0?-1:1,l*=Math.ceil(d/u)*u),o<0&&(l+=""===a.vertical?n.height:n.width,s=s.reverse()),r.move(h,l)}else{var f=r.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"],r=new Re(t)}var p=function(e,t){for(var r,a=new Re(e),o=1,s=0;s<t.length;s++){for(;e.overlapsOppositeAxis(n,t[s])||e.within(n)&&e.overlapsAny(i);)e.move(t[s]);if(e.within(n))return e;var c=e.intersectPercentage(n);o>c&&(r=new Re(e),o=c),e=new Re(a)}return r||a}(r,s);t.move(p.toCSSCompatValues(n))}var Ie=function(e,t){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new TextDecoder("utf8"),this.regionList=[]},Ne=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},xe=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 Pe(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function Le(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Me(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Pe.prototype=xe(Error.prototype),Pe.prototype.constructor=Pe,Pe.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Ie.prototype={reportOrThrowError:function(e){if(!(e instanceof Pe))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 i=e.substr(0,n);return"\r"===e[n]&&++n,"\n"===e[n]&&++n,t.buffer=e.substr(n),i}function i(e){Te(e,(function(e,n){switch(e){case"Region":!function(e){var n=new be;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 i=t.split(",");if(2!==i.length)break;var r=new be;if(r.percent("x",i[0]),r.percent("y",i[1]),!r.has("x")||!r.has("y"))break;n.set(e+"X",r.get("x")),n.set(e+"Y",r.get("y"));break;case"scroll":n.alt(e,t,["up"])}}),/=/,/\s/),n.has("id")){var i=new de;i.width=n.get("width",100),i.lines=n.get("lines",3),i.regionAnchorX=n.get("regionanchorX",0),i.regionAnchorY=n.get("regionanchorY",100),i.viewportAnchorX=n.get("viewportanchorX",0),i.viewportAnchorY=n.get("viewportanchorY",100),i.scroll=n.get("scroll",""),t.onregion&&t.onregion(i),t.regionList.push({id:n.get("id"),region:i})}}(n)}}),/:/)}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 a=(r=n()).match(/^WEBVTT([ \t].*)?$/);if(!a||!a[0])throw new Pe(Pe.Errors.BadSignature);t.state="HEADER"}for(var o=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(o?o=!1:r=n(),t.state){case"HEADER":/:/.test(r)?i(r):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 He(0,0,""),t.state="CUE",-1===r.indexOf("--\x3e")){t.cue.id=r;continue}case"CUE":try{ke(r,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!==r.indexOf("--\x3e");if(!r||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+=r;continue;case"BADCUE":r||(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 Pe(Pe.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 Be(e){return"string"==typeof e&&!!Fe[e.toLowerCase()]&&e.toLowerCase()}var He,Ve,je,Ge=function(){function e(e,t,n){Me(this,"hasBeenReset",!1),Me(this,"displayState",void 0),Me(this,"_id",""),Me(this,"_pauseOnExit",!1),Me(this,"_region",null),Me(this,"_vertical",""),Me(this,"_snapToLines",!0),Me(this,"_line","auto"),Me(this,"_lineAlign","start"),Me(this,"_position",50),Me(this,"_positionAlign","center"),Me(this,"_size",50),Me(this,"_align","center"),this._startTime=e,this._endTime=t,this._text=n}var t,n,i=e.prototype;return i.resetCue=function(){this.hasBeenReset=!0},i.getCueAsHTML=function(){return function(e,t){return e&&t?Se(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=Be(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=Be(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=Be(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");"string"==typeof t&&(this._align=t,this.resetCue())}}])&&Le(t.prototype,n),e}();function We(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ye(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}He="undefined"!=typeof window&&window.VTTCue?window.VTTCue:Ge;var Ke,ze,Xe=(je=Ve=function(e){var t,n,i,r;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},i=a,(r=[{key:"kind",get:function(){return this._kind}},{key:"external",get:function(){return this._external}},{key:"default",get:function(){return this._default}}])&&Ye(i.prototype,r),a}(ie),(ze="_tracksCount")in(Ke=Ve)?Object.defineProperty(Ke,ze,{value:0,enumerable:!0,configurable:!0,writable:!0}):Ke[ze]=0,je);function qe(e){for(var t,n=[],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 We(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)?We(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}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=i()).done;){var r=t.value;if(window.VTTCue&&r instanceof window.VTTCue||window.DataCue&&r instanceof window.DataCue)n.push(r);else if(window.TextTrackCue&&r instanceof window.TextTrackCue)try{n.push(new He(r.startTime,r.endTime,r.text))}catch(e){new P(P.Severity.RECOVERABLE,P.Category.TEXT,P.Code.UNABLE_TO_CREATE_TEXT_CUE,e)}}return n}Xe.MODE={DISABLED:"disabled",SHOWING:"showing",HIDDEN:"hidden"},Xe.KIND={METADATA:"metadata",SUBTITLES:"subtitles",CAPTIONS:"captions"},Xe.EXTERNAL_TRACK_ID="playkit-external-track",Xe.isMetaDataTrack=function(e){return e&&e.kind===Xe.KIND.METADATA},Xe.isNativeTextTrack=function(e){return e&&[Xe.KIND.SUBTITLES,Xe.KIND.CAPTIONS].includes(e.kind)},Xe.isExternalTrack=function(e){return e&&[e.language,e.label].includes(Xe.EXTERNAL_TRACK_ID)};var Ze=Xe,Qe=Object.freeze({VIDEO:"video",AUDIO:"audio",TEXT:"text",IMAGE:"image"}),$e={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"},it=function(){function e(){}return e.prototype.callNext=function(e){e&&e()},e}(),rt=function(){function e(e){this._actions=e,this._middlewares=new g,this._logger=w("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 i=this._middlewares.get(e),r=arguments.length,a=new Array(r>2?r-2:0),o=2;o<r;o++)a[o-2]=arguments[o];this._executeMiddleware(i,(function(){n._logger.debug("Finish middleware chain for action "+e),t.apply(void 0,arguments)}),a)},t._executeMiddleware=function(e,t,n){var i=n,r=function(e,t,n){var r;(null==t?void 0:t.length)&&(i=t),(null==(r=i)?void 0:r.length)?e.apply(void 0,i.concat([n])):e(n)};e.reduceRight((function(e,t){return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];r(t,i,e)}}),(function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];r(t,n)}))()},e}(),at=function(){function e(){this._middleware=new rt(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}},ct={options:{},metadata:{}},ut=(n(5),{MANIFEST:0,SEGMENT:1,LICENSE:2});function lt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var dt=function(e){var t,n,i,r;function a(t){var n;n=e.call(this,t)||this;var i=t.url,r=t.width,a=t.height,o=t.duration,s=t.rows,c=t.cols,u=t.customData;return n._url=i,n._width=r,n._height=a,n._duration=o,n._customData=u,n._rows=s||1,n._cols=c||1,n}return n=e,(t=a).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i=a,(r=[{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}}])&&lt(i.prototype,r),a}(ie);function ht(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var ft=function(){function e(e){var t=e.url,n=e.width,i=e.height,r=e.x,a=e.y;this._url=t,this._width=n,this._height=i,this._x=r,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}}])&&ht(t.prototype,n),e}();function pt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}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}var At=function(e){var t,n;function i(t,n,i){var r;return void 0===i&&(i={}),_t(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)||this),"_capabilities",{fpsControl:!1}),r._videoElement=t,r._sourceObj=n,r._config=i,r._onDurationChanged=function(){r.isLive()&&r._videoElement.paused&&r._trigger(K.TIME_UPDATE)},r._eventManager=new I,r._handleLiveTimeUpdate(),r}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.isSupported=function(){return!0},i.isMSESupported=function(){var e=window.MediaSource||window.WebKitMediaSource;return!!e&&"function"==typeof e.isTypeSupported};var r,a,o=i.prototype;return o.destroy=function(){return this._sourceObj=null,this._config={},this.disableNativeTextTracks(),this._videoElement.removeEventListener(K.DURATION_CHANGE,this._onDurationChanged),this._eventManager.destroy(),Promise.resolve()},o._onTrackChanged=function(e){e instanceof ae?(i._logger.debug("Video track changed",e),this._trigger(z.VIDEO_TRACK_CHANGED,{selectedVideoTrack:e})):e instanceof oe?(i._logger.debug("Audio track changed",e),this._trigger(z.AUDIO_TRACK_CHANGED,{selectedAudioTrack:e})):e instanceof Ze?(i._logger.debug("Text track changed",e),this._trigger(z.TEXT_TRACK_CHANGED,{selectedTextTrack:e})):e instanceof dt&&(i._logger.debug("Image track changed",e),this._trigger(z.IMAGE_TRACK_CHANGED,{selectedImageTrack:e}))},o._trigger=function(e,t){this.dispatchEvent(new v(e,t))},i.canPlayType=function(e,t){return i._throwNotImplementedError("static canPlayType")},o.load=function(){return i._throwNotImplementedError("load")},o.selectVideoTrack=function(e){return i._throwNotImplementedError("selectVideoTrack")},o.selectAudioTrack=function(e){i._throwNotImplementedError("selectAudioTrack")},o.selectTextTrack=function(e){i._throwNotImplementedError("selectTextTrack")},o.selectImageTrack=function(e){},o.hideTextTrack=function(){i._throwNotImplementedError("hideTextTrack")},o.enableAdaptiveBitrate=function(){i._throwNotImplementedError("enableAdaptiveBitrate")},o.isAdaptiveBitrateEnabled=function(){return i._throwNotImplementedError("isAdaptiveBitrateEnabled")},o.applyABRRestriction=function(e){return i._throwNotImplementedError("applyABRRestriction")},o._getLiveEdge=function(){return i._throwNotImplementedError("_getLiveEdge")},o.seekToLiveEdge=function(){i._throwNotImplementedError("seekToLiveEdge")},o.isLive=function(){return i._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(K.DURATION_CHANGE,this._onDurationChanged)},o.disableNativeTextTracks=function(){Array.from(this._videoElement.textTracks).forEach((function(e){Ze.isNativeTextTrack(e)&&!Ze.isExternalTrack(e)&&(e.mode=Ze.MODE.DISABLED)}))},o.handleMediaError=function(e){return!1},o.getStartTimeOfDvrWindow=function(){return i._throwNotImplementedError("getStartTimeOfDvrWindow")},o.getThumbnail=function(e){return null},o.getSegmentDuration=function(){return i._throwNotImplementedError("getSegmentDuration")},i._throwNotImplementedError=function(e){throw new P(P.Severity.CRITICAL,P.Category.PLAYER,P.Code.RUNTIME_ERROR_METHOD_NOT_IMPLEMENTED,e)},o.getDrmInfo=function(){return null},r=i,(a=[{key:"liveDuration",get:function(){return i._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}}])&&pt(r.prototype,a),i}(C);function gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function vt(e,t){var n=function(e,t){var n=function(e,t,n){return e>=(t||0)&&e<=(n||1/0)},i=t.maxHeight,r=t.minHeight,a=t.maxWidth,o=t.minWidth;if(0!==r||0!==o||i!==1/0||a!==1/0)return e.filter((function(e){return n(e.height,r,i)})).filter((function(e){return n(e.width,o,a)}));var s=t.maxBitrate,c=t.minBitrate;return 0!==c||s!==1/0?e.filter((function(e){return n(e.bandwidth,c,s)})):e}(e,t);return n.length?n:[]}_t(At,"id","BaseAdapter"),_t(At,"getLogger",w),_t(At,"_logger",At.getLogger(At.id));var yt={WIDEVINE:"com.widevine.alpha",PLAYREADY:"com.microsoft.playready",FAIRPLAY:"com.apple.fairplay"},mt=w("FairPlay"),Et=function(){function e(){}return e.isConfigured=function(e,t){return yt.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===yt.FAIRPLAY}))&&!!window.WebKitMediaKeys;return mt.debug("Can play DRM scheme of: "+yt.FAIRPLAY+" is "+t.toString()),t},e.setDrmPlayback=function(e,t){mt.debug("Sets drm playback");var n=t.find((function(e){return e.scheme===yt.FAIRPLAY}));n&&(e.licenseUrl=n.licenseUrl,e.certificate=n.certificate)},e}(),bt=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 kt={NEED_KEY:"webkitneedkey",KEY_MESSAGE:"webkitkeymessage",KEY_ADDED:"webkitkeyadded",KEY_ERROR:"webkitkeyerror"},St=function(){function e(t,n,i,r){var a=this;Tt(this,"_logger",w("FairPlayDrmHandler")),Tt(this,"_retryLicenseRequest",4),Tt(this,"_defaultConfig",{licenseUrl:"",certificate:"",network:{responseFilter:function(t,n){var i={};try{var r=new DataView(n.data),o=(new TextDecoder).decode(r).trim();i=JSON.parse(o)}catch(e){return void a._onError(P.Code.BAD_FAIRPLAY_RESPONSE,{error:e,responseText:n.data})}var s=e._validateResponse(i);s.valid?n.data=e._base64DecodeUint8Array(i.ckc):a._onError(P.Code.BAD_FAIRPLAY_RESPONSE,s)}}}),this._config=F.mergeDeep({},this._defaultConfig,n),this._errorCallback=i,this._drmResponseCallback=r,this._videoElement=t,this._onWebkitNeedKeyHandler=function(e){return a._onWebkitNeedKey(e)},this._eventManager=new I,this._eventManager.listen(this._videoElement,kt.NEED_KEY,this._onWebkitNeedKeyHandler)}var t=e.prototype;return t._onWebkitNeedKey=function(t){var n=this;this._logger.debug("Webkit need key triggered");var i=t.target,r=t.initData,a=e._extractContentId(r),o=e._base64DecodeUint8Array(this._config.certificate);if(r=e._concatInitDataIdAndCertificate(r,a,o),!i.webkitKeys){var s=this._selectKeySystem();this._logger.debug("Sets media keys"),i.webkitSetMediaKeys(new window.WebKitMediaKeys(s))}i.webkitKeys||this._onError(P.Code.COULD_NOT_CREATE_MEDIA_KEYS),this._logger.debug("Creates session"),this._keySession=i.webkitKeys.createSession("video/mp4",r),this._keySession||this._onError(P.Code.COULD_NOT_CREATE_KEY_SESSION),this._keySession.contentId=a,this._eventManager.listen(this._keySession,kt.KEY_MESSAGE,(function(e){return n._onWebkitKeyMessage(e)})),this._eventManager.listen(this._keySession,kt.KEY_ADDED,(function(){return n._onWebkitKeyAdded()})),this._eventManager.listen(this._keySession,kt.KEY_ERROR,(function(e){return n._onWebkitKeyError(e)}))},t.getDrmInfo=function(){var e=this._config;return{certificate:e.certificate,licenseUrl:e.licenseUrl,scheme:yt.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 i=t.message,r=new XMLHttpRequest;r.responseType="arraybuffer",this._eventManager.listenOnce(r,"load",(function(e){return n._licenseRequestLoaded(e)}));var a,o={url:this._config.licenseUrl,body:e._base64EncodeUint8Array(i),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){r.open("POST",e.url,!0);var t=!0;e.headers&&Object.entries(e.headers).forEach((function(e){var n=e[0],i=e[1];"string"==typeof i&&r.setRequestHeader(n,i),t&&(t="content-type"!==n.toLowerCase())})),"boolean"==typeof e.withCredentials&&(r.withCredentials=e.withCredentials),t&&r.setRequestHeader("Content-type","application/json"),n._logger.debug("Ready for license request"),r.onerror=function(){n._onError(P.Code.LICENSE_REQUEST_FAILED,{status:r.status,responseText:r.responseText})},n._licenseRequestTime=Date.now(),r.send(e.body)})).catch((function(e){n._errorCallback(new P(P.Severity.CRITICAL,P.Category.NETWORK,P.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(P.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(P.Code.LICENSE_REQUEST_FAILED,{status:n.status,error:n.responseText});else{if(this._drmResponseCallback){var i=Date.now()-this._licenseRequestTime;this._drmResponseCallback({licenseTime:i/1e3,scheme:yt.FAIRPLAY})}var r,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{r=this._config.network.responseFilter(ut.LICENSE,s)}catch(e){r=Promise.reject(e)}(r=r||Promise.resolve(s)).then((function(e){t._keySession.update(e.data)})).catch((function(e){t._errorCallback(new P(P.Severity.CRITICAL,P.Category.NETWORK,P.Code.RESPONSE_FILTER_ERROR,e)),t.destroy()}))}},t._onError=function(e,t){this._errorCallback(new P(P.Severity.CRITICAL,P.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,i=new Uint8Array(new ArrayBuffer(n)),r=0;r<n;r++)i[r]=t.charCodeAt(r);return i},e._concatInitDataIdAndCertificate=function(t,n,i){"string"==typeof n&&(n=e._stringToArray(n));var r=0,a=new ArrayBuffer(t.byteLength+4+n.byteLength+4+i.byteLength),o=new DataView(a);new Uint8Array(a,r,t.byteLength).set(t),r+=t.byteLength,o.setUint32(r,n.byteLength,!0),r+=4;var s=new Uint8Array(a,r,n.byteLength);return s.set(n),r+=s.byteLength,o.setUint32(r,i.byteLength,!0),r+=4,new Uint8Array(a,r,i.byteLength).set(i),new Uint8Array(a,0,a.byteLength)},e._stringToArray=function(e){for(var t=new ArrayBuffer(2*e.length),n=new Uint16Array(t),i=0,r=e.length;i<r;i++)n[i]=e.charCodeAt(i);return n},e._base64EncodeUint8Array=function(e){for(var t,n,i,r,a,o,s,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u="",l=0;l<e.length;)r=(t=e[l++])>>2,a=(3&t)<<4|(n=l<e.length?e[l++]:Number.NaN)>>4,o=(15&n)<<2|(i=l<e.length?e[l++]:Number.NaN)>>6,s=63&i,isNaN(n)?o=s=64:isNaN(i)&&(s=64),u+=c.charAt(r)+c.charAt(a)+c.charAt(o)+c.charAt(s);return u},e}();function wt(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 i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}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,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ot(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Rt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Tt(St,"WebkitEvents",kt),St.WebkitEvents=kt;var It=function(e){var t,n;function i(t,n,r){var a;return i._logger.debug("Creating adapter"),Dt(Rt(a=e.call(this,t,n,r)||this),"_lastTimeUpdate",0),Dt(Rt(a),"_waitingEventTriggered",!1),Dt(Rt(a),"_segmentDuration",0),Dt(Rt(a),"_mediaErrorRecoveryAttempts",0),Dt(Rt(a),"_lastTimeDetach",NaN),Dt(Rt(a),"_startTimeAttach",NaN),Dt(Rt(a),"_nativeTextTracksMap",{}),Dt(Rt(a),"_captionsHidden",!1),a._config=F.mergeDeep({},bt,a._config),a._progressiveSources=r.progressiveSources,a._liveEdge=0,a}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.canPlayType=function(e){var t=!1;return"string"==typeof e&&(t=!!i.TEST_VIDEO.canPlayType(e.toLowerCase())),i._logger.debug("canPlayType result for mimeType:"+e+" is "+t.toString()),t},i.canPlayDrm=function(e,t){i._drmProtocol=null;for(var n,r=wt(i._drmProtocols);!(n=r()).done;){var a=n.value;if(a.isConfigured(e,t)){i._drmProtocol=a;break}}if(!i._drmProtocol)for(var o,s=wt(i._drmProtocols);!(o=s()).done;){var c=o.value;c.canPlayDrm(e)&&(i._drmProtocol=c)}return!!i._drmProtocol},i.createAdapter=function(e,t,n){i._logger.debug("createAdapter");var r={displayTextTrack:!1,progressiveSources:[]};if(F.hasPropertyPath(n,"text.useNativeTextTrack")&&(r.displayTextTrack=F.getPropertyPath(n,"text.useNativeTextTrack")),F.hasPropertyPath(n,"sources.progressive")&&(r.progressiveSources=F.getPropertyPath(n,"sources.progressive")),F.hasPropertyPath(n,"text")&&(r.enableCEA708Captions=n.text.enableCEA708Captions,r.captionsTextTrack1Label=n.text.captionsTextTrack1Label,r.captionsTextTrack1LanguageCode=n.text.captionsTextTrack1LanguageCode,r.captionsTextTrack2Label=n.text.captionsTextTrack2Label,r.captionsTextTrack2LanguageCode=n.text.captionsTextTrack2LanguageCode),F.hasPropertyPath(n,"playback")&&F.hasPropertyPath(n.playback,"options.html5.native")&&F.mergeDeep(r,n.playback.options.html5.native),F.hasPropertyPath(n,"abr")){var a=n.abr;a.restrictions&&F.createPropertyPath(r,"abr.restrictions",a.restrictions)}return r.network=n.network,new this(e,t,r)};var r,a,o=i.prototype;return o._dispatchErrorCallback=function(e){this._trigger(K.ERROR,e)},o._dispatchDRMLicenseLoaded=function(e){this._trigger(z.DRM_LICENSE_LOADED,e)},o._maybeSetDrmPlayback=function(){var e=this;if(i._drmProtocol&&this._sourceObj&&this._sourceObj.drmData){var t={licenseUrl:"",certificate:"",network:this._config.network};i._drmProtocol.setDrmPlayback(t,this._sourceObj.drmData),this._drmHandler=new St(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 i=null;if(n&&e){for(var r,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 gt(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)?gt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}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=s()).done;){var c=r.value,u=Math.abs(c.width-t);u<o?(o=u,a=[c]):u===o&&a.push(c)}for(var l=t/n,d=a,h=1/0,f=0,p=a;f<p.length;f++){var _=p[f];if(_.height){var A=Math.abs(_.width/_.height-l);A<h?(h=A,d=[_]):A===h&&d.push(_)}}for(var g=0,v=0,y=d;v<y.length;v++){var m=y[v];(m.bandwidth>g||!m.bandwidth)&&(g=m.bandwidth||g,i=m)}}return i}(this._progressiveSources,this._videoElement.offsetWidth,this._videoElement.offsetHeight);e&&(this._sourceObj=e)},o._isProgressivePlayback=function(){return!!this._sourceObj&&i._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,i){t._lastTimeUpdate=e||0;var r=t._startTimeAttach||e||0;t._loadPromiseReject=i,t._eventManager.listenOnce(t._videoElement,K.LOADED_DATA,(function(){return t._onLoadedData(n,r)})),t._eventManager.listenOnce(t._videoElement,K.PLAYING,(function(){return t._onPlaying(r)})),t._eventManager.listen(t._videoElement,K.TIME_UPDATE,(function(){return t._onTimeUpdate()})),t._eventManager.listen(t._videoElement,K.PLAY,(function(){return t._resetHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,K.PAUSE,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,K.ENDED,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,K.ABORT,(function(){return t._clearHeartbeatTimeout()})),t._eventManager.listen(t._videoElement,K.SEEKED,(function(){return t._syncCurrentTime()})),t._eventManager.listen(t._videoElement,K.WAITING,(function(){return t._waitingEventTriggered=!0})),t._eventManager.listen(t._videoElement,K.PLAYING,(function(){return t._waitingEventTriggered=!1})),t._eventManager.listen(window,"focus",(function(){setTimeout((function(){_.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(z.ABR_MODE_CHANGED,{mode:t._isProgressivePlayback()?"manual":"auto"}),t._videoElement.load()})):t._videoElement.load()}))),this._loadPromise},o._handleDecodeError=function(e){var t=this;i._logger.debug("handleDecodeError",e);var n=this._videoElement.currentTime,r=this._getActivePKAudioTrack(),a=this._getActivePKTextTrack();this._videoElement.load(),this._eventManager.listenOnce(this._videoElement,K.PLAYING,(function(){t._mediaErrorRecoveryAttempts=0})),this._eventManager.listenOnce(this._videoElement,K.CAN_PLAY,(function(){i._logger.debug("CAN_PLAY"),t._videoElement.currentTime=n,t._videoElement.play(),t._videoElement.pause(),r&&t.selectAudioTrack(r),a?t.selectTextTrack(a):t.disableNativeTextTracks()}))},o.handleMediaError=function(e){return this._loadPromiseReject?(this._loadPromiseReject(new P(P.Severity.CRITICAL,P.Category.MEDIA,P.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&&(H.setAttribute(this._videoElement,"src",""),H.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{i._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(K.ERROR,new P(P.Severity.CRITICAL,P.Category.NETWORK,P.Code.REQUEST_FILTER_ERROR,e))})),e},o._onPlaying=function(e){this.isLive()&&this._setStartTime(e)},o._onLoadedData=function(e,t){var n=this,r=function(){n._playerTracks=n._getParsedTracks(),n._addNativeAudioTrackChangeListener(),n._addNativeTextTrackChangeListener(),n._addNativeTextTrackAddedListener(),i._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?r():this._eventManager.listenOnce(this._videoElement,K.CAN_PLAY,r.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(K.PLAYING)),this._resetHeartbeatTimeout()):this._videoElement.currentTime<this._lastTimeUpdate?this._syncCurrentTime():(this._waitingEventTriggered=!0,this._trigger(K.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(K.ERROR,new P(P.Severity.CRITICAL,P.Category.NETWORK,P.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,i=e.videoTracks;if(!this._videoDimensions||t!==this._videoDimensions.videoHeight||n!==this._videoDimensions.videoWidth){this._videoDimensions={videoHeight:t,videoWidth:n};var r={language:"",height:t,width:n,active:!0,index:Array.from(i).findIndex((function(e){return e.selected}))};this._onTrackChanged(new ae(r))}}},o.destroy=function(){var t=this;return i._logger.debug("destroy"),new Promise((function(n,i){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 i}))}))},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 i={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(i))}return t},o._getParsedAdaptiveVideoTracks=function(){var e=this._videoElement.videoTracks,t=[];if(e)for(var n=0;n<e.length;n++){var i={id:e[n].id,active:e[n].selected,label:e[n].label,language:e[n].language,index:n};t.push(new ae(i))}return t},o._getParsedAudioTracks=function(){var e=this._videoElement.audioTracks,t=[];if(e)for(var n=0;n<e.length;n++){var i={id:e[n].id,active:e[n].enabled,label:e[n].label,language:e[n].language,index:n};t.push(new oe(i))}return t},o._getParsedTextTracks=function(){var e=[this._config.captionsTextTrack1Label,this._config.captionsTextTrack2Label],t=[this._config.captionsTextTrack1LanguageCode,this._config.captionsTextTrack2LanguageCode],n=this._videoElement.textTracks,i=[];if(n){for(var r=0;r<n.length;r++)if(!Ze.isExternalTrack(n[r])){var a={kind:n[r].kind,active:n[r].mode===Ze.MODE.SHOWING,label:n[r].label,language:n[r].language,available:!0};if(a.kind===Ze.KIND.SUBTITLES){var o=new Ze(a);i.push(o),this._nativeTextTracksMap[o.index]=n[r]}else if(a.kind===Ze.KIND.CAPTIONS&&this._config.enableCEA708Captions){a.label=a.label||e.shift(),a.language=a.language||t.shift(),a.available=this._captionsHidden;var s=new Ze(a);i.push(s),this._nativeTextTracksMap[s.index]=n[r]}}this._captionsHidden||this._maybeShow708Captions()}return i},o._maybeShow708Captions=function(){var e=this,t=Array.from(this._videoElement.textTracks).filter((function(e){return e.kind===Ze.KIND.CAPTIONS})),n=t.find((function(e){return e.mode===Ze.MODE.SHOWING||e.mode===Ze.MODE.HIDDEN}))||t[0];n&&(n.mode=Ze.MODE.HIDDEN,this._captionsHidden=!0,this._eventManager.listenOnce(n,"cuechange",(function(){e._getPKTextTracks().forEach((function(e){return(e.available=!0)&&(e.mode=Ze.MODE.DISABLED)})),e._trigger(z.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 i=this._videoElement.currentTime,r=this._videoElement.paused;e.active=!0,this._sourceObj=n[e.index],this._eventManager.listenOnce(this._videoElement,K.LOADED_DATA,(function(){"Android Browser"===_.browser.name?(t._eventManager.listenOnce(t._videoElement,K.DURATION_CHANGE,(function(){t._videoElement.currentTime=i})),t._eventManager.listenOnce(t._videoElement,K.SEEKED,(function(){t._onTrackChanged(e),r&&t._videoElement.pause()})),t._videoElement.play()):(t._eventManager.listenOnce(t._videoElement,K.SEEKED,(function(){t._onTrackChanged(e)})),t._videoElement.currentTime=i,r||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){i._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(),r=n?n.index:-1;if(t!==r){var a=this._getPKAudioTracks().find((function(e){return e.index===t}));a&&(i._logger.debug("Native selection of track, update the player audio track ("+r+" -> "+t+")"),this._onTrackChanged(a))}},o.selectTextTrack=function(e){if(e instanceof Ze&&Ze.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 Ze}))},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})),r=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(r!==o)if(-1==r)n&&(i._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===r}));s&&(i._logger.debug("Native selection of track, update the player text track ("+o+" -> "+r+")"),this._onTrackChanged(s))}},o._getDisplayTextTrackModeString=function(){return this._config.displayTextTrack?Ze.MODE.SHOWING:Ze.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(z.TRACKS_CHANGED,{tracks:this._playerTracks})},o.hideTextTrack=function(){this.disableNativeTextTracks()},o.enableAdaptiveBitrate=function(){i._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=vt(this._playerTracks.filter((function(e){return e instanceof ae})),e);!t.find((function(e){return e.active}))&&t.length?this.selectVideoTrack(t[0]):i._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){i._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(K.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 i=this._getLiveEdge();this._liveEdge&&this._liveEdge!==i&&(this._segmentDuration=i-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},r=i,(a=[{key:"liveDuration",get:function(){return this._getLiveEdge()}}])&&Ot(r.prototype,a),i}(At);function Nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Dt(It,"id","NativeAdapter"),Dt(It,"_logger",At.getLogger(It.id)),Dt(It,"TEST_VIDEO",H.createElement("video")),Dt(It,"_drmProtocols",[Et]),Dt(It,"_drmProtocol",null),Dt(It,"_progressiveMimeTypes",["video/mp4","audio/mp3"]);var xt=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,i){void 0===n&&(n=!0),e._orderMediaSourceAdapters(n);var r=e._mediaSourceAdapters;if(t&&t.mimetype)for(var a=0;a<r.length;a++)if(r[a].canPlayType(t.mimetype)&&(!t.drmData||r[a].canPlayDrm(t.drmData,i)))return e._selectedAdapter=r[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(It):e._mediaSourceAdapters.push(It)},e.getMediaSourceAdapter=function(t,n,i){return t&&n&&i?(e._selectedAdapter||e.canPlaySource(n,!0,i.drm),e._selectedAdapter?e._selectedAdapter.createAdapter(t,n,i):null):null},e.destroy=function(){e._selectedAdapter=null},e}();Nt(xt,"_logger",w("MediaSourceProvider")),Nt(xt,"_mediaSourceAdapters",[It]),Nt(xt,"_selectedAdapter",null);var Pt=xt.register,Lt=function(e,t,n,i,r){this.startTime=e,this.endTime=t,this.id=n,this.type=i,this.metadata=r};function Mt(e){try{var t=e.startTime,n=e.endTime,i=e.id,r=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:r,data:a};return o.id=i,o.value=s,o}catch(e){return null}}function Ut(e){if(e){var t=e.startTime,n=e.endTime,i=e.id;if(Ft(e)){var r=Ft(e),a=r.type,o=r.metadata;return new Lt(t,n,i,a,o)}}return null}function Ft(e){if(e){var t=e.type,n=e.value,i=e.track;if(n){var r=n.key,a=n.data,o="org.id3"===t||"id3"===(i&&i.label),s=Object.values(Lt.TYPE).find((function(e){return e===r}));return s||(s=o?Lt.TYPE.ID3:Lt.TYPE.CUSTOM),{type:s,metadata:o||!a?n:a}}}return null}Lt.TYPE={ID3:"id3",EMSG:"emsg",CUE_POINT:"cuepoint",CUSTOM:"custom"};var Bt,Ht,Vt=n(3);function jt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Gt=(Ht=Bt=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=H.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,i=t.mutedAutoPlay;"boolean"==typeof n&&(e._capabilities.autoplay=n),"boolean"==typeof i&&(e._capabilities.mutedAutoPlay=i)},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(K.ERROR,(function(){n()}));var i=setTimeout((function(){e._logger.debug("Timeout 500 ms has been reached"),n()}),500);!0===e._vid.paused?(clearTimeout(i),n()):(clearTimeout(i),t())}))},e}(),jt(Bt,"_logger",w("Html5AutoPlayCapability")),jt(Bt,"_capabilities",{}),Ht);function Wt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yt(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=function(e){var t,n;function i(t,n,r){var a;return Yt(Wt(a=e.call(this)||this),"_droppedFramesInterval",null),Yt(Wt(a),"_lastDroppedFrames",0),Yt(Wt(a),"_lastDecodedFrames",0),Yt(Wt(a),"_lastTime",0),Yt(Wt(a),"_currentBitrate",0),a._eventManager=new I,a._mediaSourceAdapter=t,a._config=n,a._videoElement=r,a._mediaSourceAdapter.capabilities.fpsControl?(a._eventManager.listen(a._mediaSourceAdapter,z.FPS_DROP,(function(e){return a._triggerFPSDrop(e.payload.data)})),Wt(a)):(-1===a._getDroppedAndDecodedFrames()[0]?i._logger.debug("Dropped frame watcher is not supported"):a._config.capLevelOnFPSDrop?(i._logger.debug("Initialized capLevelOnFPSDrop = true"),a._init()):i._logger.debug("Not Initialized"),a)}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r._init=function(){var e=this;this._eventManager.listen(this._mediaSourceAdapter,z.VIDEO_TRACK_CHANGED,(function(t){return e._currentBitrate=t.payload.selectedVideoTrack.bandwidth})),this._droppedFramesInterval=setInterval((function(){return e._checkFPS()}),this._config.fpsDroppedFramesInterval)},r._triggerFPSDrop=function(e){this.dispatchEvent(new v(z.FPS_DROP,e))},r._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]},r._checkFPS=function(){var e=this._getDroppedAndDecodedFrames(),t=e[0],n=e[1];try{var r=performance.now();if(n){if(this._lastTime){var a=r-this._lastTime,o=t-this._lastDroppedFrames,s=n-this._lastDecodedFrames,c=1e3*o/a;c>0&&(i._logger.debug("checkFPS : droppedFPS/decodedFPS:"+c/(1e3*s/a)),o>this._config.fpsDroppedMonitoringThreshold*s&&(this._mediaSourceAdapter.setMaxBitrate(this._currentBitrate-1),this._triggerFPSDrop({currentDropped:o,currentDecoded:s,totalDroppedFrames:c})))}this._lastTime=r,this._lastDroppedFrames=t,this._lastDecodedFrames=n}}catch(e){i._logger.error("Error occur while trying to check dropFrames: ",e)}},r.destroy=function(){this._droppedFramesInterval&&clearInterval(this._droppedFramesInterval),this._droppedFramesInterval=null,this._eventManager.destroy()},i}(C);function zt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Yt(Kt,"_logger",w("droppedFramesWatcher"));var qt=function(e){var t,n;function i(t,n,i){var r;return Xt(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)||this),"_reset",!1),r._eventManager=new I,r._canLoadMediaSourceAdapterPromise=Promise.resolve(),r._createVideoElement(i),r._init(t,n),r}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.isSupported=function(){try{var e=H.createElement("video");return e.volume=.5,!!e.canPlayType}catch(e){return!1}},i.createEngine=function(e,t,n){return new this(e,t,n)},i.canPlaySource=function(e,t,n){return xt.canPlaySource(e,t,n)},i.runCapabilities=function(){i._capabilities.forEach((function(e){return e.runCapability()}))},i.getCapabilities=function(){var e=[];return i._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={})[i.id]=n,t}))},i.setCapabilities=function(e){i._capabilities.forEach((function(t){return t.setCapabilities(e)}))},i.prepareVideoElement=function(e){if(!i.videoElementStore[e]){i._logger.debug("Create the video element for playing "+e);var t=H.createElement("video");i.videoElementStore[e]=t}i._logger.debug("Prepare the video element for playing "+e),i.videoElementStore[e].load()};var r,a,o=i.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 i=e._mediaSourceAdapter?e._mediaSourceAdapter.destroy():Promise.resolve();e._el&&e._el.src?i.then((function(){H.setAttribute(e._el,"src",""),H.removeAttribute(e._el,"src"),t()}),n):i.then(t,n)})),this._mediaSourceAdapter=null)},o.destroy=function(){this.detach(),this._el&&(this.pause(),H.removeAttribute(this._el,"src"),H.removeChild(this._el.parentNode,this._el)),this._eventManager.destroy(),xt.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(K).forEach((function(t){[K.ERROR,K.WAITING].includes(K[t])||e._eventManager.listen(e._el,K[t],(function(){return e.dispatchEvent(new v(K[t]))}))})),this._eventManager.listen(this._el,K.ERROR,(function(){return e._handleVideoError()})),this._eventManager.listen(this._el,K.WAITING,(function(){return e._handleWaiting()})),this._handleMetadataTrackEvents(),this._eventManager.listen(this._el.textTracks,"addtrack",(function(t){Ze.isNativeTextTrack(t.track)&&e.dispatchEvent(new v(z.TEXT_TRACK_ADDED,{track:t.track}))}));var t=this._mediaSourceAdapter;t&&(this._eventManager.listen(t,z.VIDEO_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.AUDIO_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.TEXT_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.IMAGE_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.ABR_MODE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.TEXT_CUE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.TRACKS_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.FRAG_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.DRM_LICENSE_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.MANIFEST_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,K.ERROR,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,K.TIME_UPDATE,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,K.PLAYING,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,K.WAITING,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.MEDIA_RECOVERED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(t,z.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,z.FPS_DROP,(function(t){return e.dispatchEvent(t)})))},o.detach=function(){var e=this;Object.keys(K).forEach((function(t){e._eventManager.unlisten(e._el,K[t])})),this._mediaSourceAdapter&&(this._eventManager.unlisten(this._mediaSourceAdapter,z.VIDEO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,z.AUDIO_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,z.TEXT_TRACK_CHANGED),this._eventManager.unlisten(this._mediaSourceAdapter,z.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 v(z.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 v(K.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 v(K.ERROR,new P(P.Severity.RECOVERABLE,P.Category.PLAYER,P.Code.ENTER_PICTURE_IN_PICTURE_FAILED,t)))})):"function"==typeof this._el.webkitSetPresentationMode&&(this._el.webkitSetPresentationMode("picture-in-picture"),setTimeout((function(){return e.dispatchEvent(new v(K.ENTER_PICTURE_IN_PICTURE))}),0))}catch(e){this.dispatchEvent(new v(K.ERROR,new P(P.Severity.RECOVERABLE,P.Category.PLAYER,P.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 v(K.ERROR,new P(P.Severity.RECOVERABLE,P.Category.PLAYER,P.Code.EXIT_PICTURE_IN_PICTURE_FAILED,t)))})):"function"==typeof this._el.webkitSetPresentationMode&&this._el.webkitSetPresentationMode("inline")}catch(e){this.dispatchEvent(new v(K.ERROR,new P(P.Severity.RECOVERABLE,P.Category.PLAYER,P.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=i.videoElementStore[e]||H.createElement("video"),this._el.id=B.uniqueId(5),this._el.controls=!1},o._loadMediaSourceAdapter=function(e){this._mediaSourceAdapter=xt.getMediaSourceAdapter(this.getVideoElement(),e,this._config),this._mediaSourceAdapter&&(this._droppedFramesWatcher=new Kt(this._mediaSourceAdapter,this._config.abr,this._el))},o._addCueChangeListener=function(){var e=this,t=Array.from(this._el.textTracks).find((function(e){return Ze.isNativeTextTrack(e)&&e.mode!==Ze.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!Ze.isMetaDataTrack(e)})).forEach((function(t){e._eventManager.unlisten(t,"cuechange")}))},o._onCueChange=function(e){var t=qe(e.currentTarget.activeCues);this.dispatchEvent(new v(z.TEXT_CUE_CHANGED,{cues:t}))},o.resetAllCues=function(){var e=Array.from(this._el.textTracks).find((function(e){return Ze.isNativeTextTrack(e)&&e.mode!==Ze.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 i=new P(P.Severity.CRITICAL,P.Category.MEDIA,P.Code.VIDEO_ERROR,{code:e,extended:t,message:n});this.dispatchEvent(new v(K.ERROR,i))}}}},o._handleWaiting=function(){var e=this,t=!1;this._eventManager.listenOnce(this._el,K.PLAYING,(function(){return t=!0})),setTimeout((function(){t||e.dispatchEvent(new v(K.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=Ze.MODE.HIDDEN,e._eventManager.listen(t,"cuechange",(function(){var t=[];Array.from(e._el.textTracks).forEach((function(e){Ze.isMetaDataTrack(e)&&(t=t.concat(qe(e.activeCues)))})),t=t.sort((function(e,t){return e.startTime-t.startTime})),e.dispatchEvent(new v(z.TIMED_METADATA,{cues:t})),e.dispatchEvent(new v(z.TIMED_METADATA_CHANGE,{cues:t.map((function(e){return Ut(e)}))}))}))};Array.from(this._el.textTracks).forEach((function(e){Ze.isMetaDataTrack(e)&&t(e)})),this._eventManager.listen(this._el.textTracks,"addtrack",(function(e){Ze.isMetaDataTrack(e.track)&&t(e.track)})),this._eventManager.listen(this._el.textTracks,"change",(function(){Array.from(e._el.textTracks).forEach((function(e){Ze.isMetaDataTrack(e)&&e.mode!==Ze.MODE.HIDDEN&&(e.mode=Ze.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()},r=i,(a=[{key:"id",get:function(){return i.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 i.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}}])&&zt(r.prototype,a),i}(C);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}Xt(qt,"_logger",w("Html5")),Xt(qt,"_capabilities",[Gt]),Xt(qt,"id","html5"),Xt(qt,"videoElementStore",{}),Xt(qt,"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}();Zt(Qt,"_logger",w("EngineProvider")),Zt(Qt,"_engineProviders",{}),qt.isSupported()&&Qt.register(qt.id,qt);var $t=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 i(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 I,n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.hideTextTrack=function(){this._player.config.text.useNativeTextTrack?(this._removeCueChangeListeners(),this._resetExternalNativeTextTrack()):this._isTextTrackActive&&(this._eventManager.unlisten(this._player,K.TIME_UPDATE),this.dispatchEvent(new v(z.TEXT_CUE_CHANGED,{cues:[]})),this._resetCurrentTrack())},r.getExternalTracks=function(e){var t=this,n=this._player.sources.captions;if(!n)return[];this._player.config.text.useNativeTextTrack&&this._addNativeTextTrack();var i=e.filter((function(e){return e instanceof Ze})),r=[];return n.forEach((function(e){if(e.language){var n=t._createTextTrack(e);t._maybeAddTrack(n,e,i,r)}else{var a=new P(P.Severity.RECOVERABLE,P.Category.TEXT,P.Code.UNKNOWN_LANGUAGE,{caption:e});t.dispatchEvent(new v(K.ERROR,a))}})),r},r._maybeAddTrack=function(e,t,n,r){var a=n.find((function(e){return e.available&&ie.langComparer(t.language,e.language)}));a?i._logger.warn("duplicated language, taking the inband option. Language: ",a.language):(r.push(e),this._updateTextTracksModel(t))},r._createTextTrack=function(e){return new Ze({active:!!e.default,kind:Ze.KIND.SUBTITLES,label:e.label,language:e.language,external:!0})},r._updateTextTracksModel=function(e){this._textTrackModel[e.language]={cuesStatus:1,cues:[],url:e.url,type:e.type}},r.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 v(K.ERROR,e))})))},r._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 v(z.TEXT_TRACK_CHANGED,{selectedTextTrack:e}))},r.resetAllCues=function(){for(var e in this._textTrackModel)this._textTrackModel[e].cues.forEach((function(e){e.hasBeenReset=!0}))},r._addCueChangeListener=function(){var e=this,t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return Ze.isNativeTextTrack(e)&&e.mode===Ze.MODE.SHOWING}));n&&this._eventManager.listen(n,"cuechange",(function(t){return e._onCueChange(t)}))}},r._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")},r._onCueChange=function(e){var t=qe(e.currentTarget.activeCues);this.dispatchEvent(new v(z.TEXT_CUE_CHANGED,{cues:t}))},r.reset=function(){this._resetCurrentTrack(),this._textTrackModel={},this._resetExternalNativeTextTrack(),this._eventManager.removeAll()},r.destroy=function(){this._textTrackModel={},this._eventManager.destroy(),this._activeTextCues=[]},r._resetCurrentTrack=function(){this._activeTextCues=[],this._isTextTrackActive=!1,this._maybeSetExternalCueIndex()},r._getCuesString=function(e){var t=this;return new Promise((function(n,i){var r=t._textTrackModel[e.language],a=r.type||t._getFileType(r.url);[nn,rn].includes(a)||(t._textTrackModel[e.language].cuesStatus=1,i(new P(P.Severity.RECOVERABLE,P.Category.TEXT,P.Code.UNKNOWN_FILE_TYPE,{captionType:a}))),V.execute(r.url,{},"GET").then((function(e){n(a===nn?t._convertSrtToVtt(e):e)})).catch((function(){t._textTrackModel[e.language].cuesStatus=1,i(new P(P.Severity.RECOVERABLE,P.Category.TEXT,P.Code.HTTP_ERROR,{url:r.url}))}))}))},r._parseCues=function(e){return new Promise((function(t,n){var r=new Ie(window,Ne()),a=[];r.oncue=function(e){return a.push(e)},r.onflush=function(){i._logger.debug("finished parsing external cues"),t(a)},r.parse(e),r.flush(),r.onparsingerror((function(e){return n(e)}))}))},r._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,i,r){return t+"."+n+" --\x3e "+i+"."+r}))},r._downloadAndParseCues=function(e){var t=this;return this._textTrackModel[e.language].cuesStatus=2,new Promise((function(n,i){t._getCuesString(e).then((function(e){return t._parseCues(e)})).then((function(i){t._textTrackModel[e.language].cues=i,n()})).catch((function(e){return i(e)}))}))},r._getFileType=function(e){return e.split(/[#?]/)[0].split(".").pop().trim()},r._handleCaptionOnTimeUpdate=function(e){var t=this._player.currentTime;if(t){var n=!1;this._hadSeeked()&&(this._activeTextCues=[],n=this._maybeSetExternalCueIndex());var i=this._maybeRemoveActiveCues(),r=this._maybeAddToActiveCues(e);(n||r||i)&&this.dispatchEvent(new v(z.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._lastTimeUpdate=t}},r._hadSeeked=function(){return!!this._player.currentTime&&Math.abs(this._player.currentTime-this._lastTimeUpdate)>1},r._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},r._maybeAddToActiveCues=function(e){var t=this._player.currentTime;if(!t)return!1;for(var n=!1,i=this._textTrackModel[e.language].cues;this._externalCueIndex<i.length&&t>i[this._externalCueIndex].startTime;)t<i[this._externalCueIndex].endTime&&this._activeTextCues.push(i[this._externalCueIndex]),this._externalCueIndex++,n=!0;return n},r._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},r._resetExternalNativeTextTrack=function(){var e=this._player.getVideoElement();if(e&&e.textTracks){var t=Array.from(e.textTracks).find((function(e){return!!e&&Ze.isExternalTrack(e)}));t&&(t.cues&&Object.values(t.cues).forEach((function(e){return t.removeCue(e)})),t.mode=Ze.MODE.DISABLED)}},r._addCuesToNativeTextTrack=function(e){var t=this._player.getVideoElement();if(t&&t.textTracks){var n=Array.from(t.textTracks).find((function(e){return!!e&&Ze.isExternalTrack(e)}));n&&(n.mode=Ze.MODE.SHOWING,void 0===window.VTTCue?this._convertCues(e).forEach((function(e){return n.addCue(e)})):e.forEach((function(e){return n.addCue(e)})))}},r._convertCues=function(e){return e.map((function(e){return new window.TextTrackCue(e.startTime,e.endTime,e.text)}))},r._addNativeTextTrack=function(){var e=this._player.getVideoElement();e&&e.textTracks&&(Array.from(e.textTracks).findIndex((function(e){return!!e&&Ze.isExternalTrack(e)}))>-1?this._resetExternalNativeTextTrack():e.addTextTrack(Ze.KIND.SUBTITLES,Ze.EXTERNAL_TRACK_ID,Ze.EXTERNAL_TRACK_ID))},r._setTextTrack=function(e){var t=this;this._player.config.text.useNativeTextTrack||(this._isTextTrackActive=!0,i._logger.debug("External text track changed",e),this._activeTextCues=[],this._externalCueIndex=0,this.dispatchEvent(new v(z.TEXT_CUE_CHANGED,{cues:this._activeTextCues})),this._eventManager.listen(this._player,K.TIME_UPDATE,(function(){return t._handleCaptionOnTimeUpdate(e)})))},i}(C);tn(an,"_logger",w("ExternalCaptionsHandler"));var on={PRE:"preroll",MID:"midroll",POST:"postroll",OVERLAY:"overlay"},sn={VAST:"vast",VMAP:"vmap"},cn=function(e){var t,n;function i(){return e.call(this)||this}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.destroy=function(){this._observer&&this._observer.disconnect(),this._observer=null,this._el=null},r.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))},r._createNativeObserver=function(){var e=this;this._observer=new window.ResizeObserver((function(t){t.forEach((function(){e._triggerResize()}))}))},r._createIframeObserver=function(){this._observer=new un(this._triggerResize.bind(this))},r._triggerResize=function(){this.dispatchEvent(new v(z.RESIZE))},i}(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(),i=e.getAttribute("id");this._observersStore[i]=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 ln(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?ln(e.slice(0,n),t):ln(e.slice(n+1),t)}function dn(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(e){dn(this,"_isElementInFullscreen",!1),dn(this,"_isScreenLocked",!1),dn(this,"_isScreenOrientationSupport",!!screen&&!!screen.orientation&&"function"==typeof screen.orientation.unlock&&"function"==typeof screen.orientation.lock),dn(this,"_isFullscreenEventDispatched",!1),this._player=e,this._isInBrowserFullscreen=!1,this._eventManager=new I}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&&H.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 i=this._player.getVideoElement();i&&"function"==typeof i.webkitEnterFullScreen&&(this._player.isInPictureInPicture()?(setTimeout((function(){return i.webkitEnterFullScreen()}),1e3),this._player.exitPictureInPicture()):i.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(),H.addClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!0,this._fullscreenEnterHandler(),this._player.dispatchEvent(new v(this._player.Event.RESIZE))},t._exitInBrowserFullscreen=function(){var e=H.getElementBySelector(".playkit-in-browser-fullscreen-mode");e&&H.removeClassName(e,"playkit-in-browser-fullscreen-mode"),this._isInBrowserFullscreen=!1,this._fullscreenExitHandler(),this._player.dispatchEvent(new v(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 v(this._player.Event.ENTER_FULLSCREEN)))},t._fullscreenExitHandler=function(){!this.isFullscreen()&&this._isFullscreenEventDispatched&&(this._isFullscreenEventDispatched=!1,this._eventManager.removeAll(),this._player.dispatchEvent(new v(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 pn=function(){function e(){fn(this,"_decoratorProviders",new Map),fn(this,"_logger",w("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 _n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function An(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var gn=function(e){var t,n;function i(t,n){var i;return(i=e.call(this)||this)._eventManager=new I,i._pluginDecorators=n.createDecorators(t,e.prototype.dispatchEvent.bind(An(i))),Object.values(X).forEach((function(e){return i._eventManager.listen(t,e,(function(e){return i.dispatchEvent(e)}))})),new Proxy(t,{get:function(e,t){"destroy"===t&&i._destroy();var n,r=i._pluginDecorators.find((function(e){return e.active}));return(n="addEventListener"===t||"removeEventListener"===t?An(i):r&&t in r?r:e)[t]&&"function"==typeof n[t].bind?n[t].bind(n):n[t]},set:function(e,t,n){var r=i._pluginDecorators.find((function(e){return t in e&&e.active}));return r&&t in r?r[t]=n:e[t]=n,!0}})||An(i)}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r,a,o=i.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()},r=i,(a=[{key:"active",get:function(){return!0}}])&&_n(r.prototype,a),i}(C),vn={TRUE:!0,FALSE:!1,IN_VIEW:"inview"};function yn(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 mn(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)?mn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}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 mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function En(){return(En=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function bn(e,t,n,i,r,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(i,r)}function Tn(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var a=e.apply(t,n);function o(e){bn(a,i,r,o,s,"next",e)}function s(e){bn(a,i,r,o,s,"throw",e)}o(void 0)}))}}function kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Sn=/#wh=/i,wn=/#xywh=/i,Cn=new RegExp("^/[^/].+"),On=function(e){var t,n;function i(){var t;return kn(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 I,t}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var r=i.prototype;return r.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 i._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)}}(),r.getThumbnail=function(e){var t=this._findCue(e,this._cues);if(t){var n=t.size,i=t.coordinates,r=En({url:t.imgUrl},n=n||this._naturalImgSize,i=i||{x:0,y:0});return new ft(r)}return null},r.isUsingVttThumbnails=function(){var e;return!!(null==(e=this._cues)?void 0:e.length)},r._downloadAndParseCues=function(){var e=Tn(regeneratorRuntime.mark((function e(t){var n,i;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 i=e.sent,e.next=9,this._formatIntoThumbnailCues(i,t);case 9:this._cues=e.sent,e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),this.dispatchEvent(new v(K.ERROR,e.t0));case 15:case"end":return e.stop()}}),e,this,[[0,12]])})));return function(t){return e.apply(this,arguments)}}(),r._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 P(P.Severity.RECOVERABLE,P.Category.TEXT,P.Code.HTTP_ERROR,e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),r._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 r=new Ie(window,Ne()),a=[];r.oncue=function(e){return a.push(e)},r.onflush=function(){i._logger.debug("finished parsing thumbnails cues"),e(a)},r.parse(t),r.flush(),r.onparsingerror((function(e){return n(e)}))})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r._formatIntoThumbnailCues=function(){var e=Tn(regeneratorRuntime.mark((function e(t,n){var i,r,a,o,s,c;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.validateThumbnailsVTTFormat(t)){e.next=4;break}throw new P(P.Severity.RECOVERABLE,P.Category.TEXT,P.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"invalid thumbnail vtt format",vttUrl:n.vttUrl});case 4:return i=this._extractCueMetadata(t[0],n),e.next=7,this.validateImgUrl(i.imgUrl);case 7:if(e.sent){e.next=11;break}throw new P(P.Severity.RECOVERABLE,P.Category.TEXT,P.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"failed loading the image - invalid image url",imgUrl:i.imgUrl});case 11:return e.next=13,this.extractImgNaturalDimensions(i.imgUrl);case 13:for(this._naturalImgSize=e.sent,r=[],a=yn(t);!(o=a()).done;)s=o.value,c=this._extractCueMetadata(s,n),r.push(c);return e.abrupt("return",r);case 17:case"end":return e.stop()}}),e,this)})));return function(t,n){return e.apply(this,arguments)}}(),r.validateThumbnailsVTTFormat=function(e){return e.length&&e[0]instanceof He},r.extractImgNaturalDimensions=function(e){var t=this;return new Promise((function(n){var i=new Image;i.src=e,t._eventManager.listenOnce(i,"load",(function(){n({height:i.naturalHeight,width:i.naturalWidth})})),t._eventManager.listenOnce(i,"error",(function(){return n(null)}))}))},r.validateImgUrl=function(e){var t=this;return new Promise((function(n){var i=new Image;i.src=e,t._eventManager.listenOnce(i,"load",(function(){n(!0)})),t._eventManager.listenOnce(i,"error",(function(){return n(!1)}))}))},r._extractCueMetadata=function(e,t){var n,r=e.startTime,a=e.endTime,o=e.text,s=t.vttUrl.substring(0,t.vttUrl.lastIndexOf("/")),c=Sn.test(o),u=wn.test(o),l=!1,d=null,h=null;if(c)n=o.split(Sn)[0],i._logger.warn('vtt thumbnails in "'+Sn+'" form - is supported but the width and height options are ignored and The images will be displayed in their natural dimensions'),l=void 0!==n;else if(u){var f=o.split(wn);n=f[0];var p=f[1].split(",").map(Number),_=p[0],A=p[1],g=p[2],v=p[3];d={x:_,y:A},h={width:g,height:v},l=[_,A,g,v,n].every((function(e){return void 0!==e}))}else n=o,l=!!o;if(0!==n.indexOf("http://")&&0!==n.indexOf("https://")&&(n=s+"/"+(n=Cn.test(n)?n.substring(1):n)),l)return{startTime:r,endTime:a,imgUrl:n,size:h,coordinates:d};throw new P(P.Severity.RECOVERABLE,P.Category.TEXT,P.Code.INVALID_VTT_THUMBNAILS_FILE,{message:"error while parsing the vtt cues - invalid cue",parsedCue:{startTime:r,endTime:a,options:o}})},r._findCue=function(e,t){for(var n=0,i=t.length-1;n<=i;){var r=Math.floor((n+i)/2),a=t[r];if(e>=a.startTime&&e<a.endTime)return t[r];e<a.startTime?i=r-1:n=r+1}return null},r.reset=function(){this._cues=[],this._eventManager.removeAll(),this._naturalImgSize={}},r.destroy=function(){this.reset(),this._eventManager.destroy()},i}(C);function Rn(){return(Rn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function Dn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function In(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Nn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function xn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}kn(On,"_logger",w("ExternalThumbnailsHandler"));var Pn="off",Ln=function(e){var t,n;function i(t){var n;return void 0===t&&(t={}),xn(Nn(n=e.call(this)||this),"_sources",{}),xn(Nn(n),"_activeTextCues",[]),xn(Nn(n),"_textDisplaySettings",{}),xn(Nn(n),"_playbackAttributesState",{muted:void 0,volume:void 0,rate:void 0,videoTrack:void 0,audioLanguage:"",textLanguage:""}),xn(Nn(n),"_hasUserInteracted",!1),xn(Nn(n),"_isOnLiveEdge",!1),xn(Nn(n),"_shouldLoadAfterAttach",!1),n._setConfigLogLevel(t),n._playerId=B.uniqueId(5),n._prepareVideoElement(),i.runCapabilities(),n._env=_,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=i._defaultConfig,n._sources=F.copyDeep(ct),n._eventManager=new I,n._posterManager=new W,n._stateManager=new te(Nn(n)),n._resizeWatcher=new cn,n._playbackMiddleware=new at,n._textStyle=new Ae,n._createReadyPromise(),n._createPlayerContainer(),n._appendDomElements(),n._externalCaptionsHandler=new an(Nn(n)),n._externalThumbnailsHandler=new On,n._fullscreenController=new hn(Nn(n)),n.configure(t),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.runCapabilities=function(){i._logger.debug("Running player capabilities"),Qt.getEngines().forEach((function(e){return e.runCapabilities()}))},i.getCapabilities=function(e){i._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}))},i.setCapabilities=function(e,t){i._logger.debug("Set player capabilities",e,t);var n=Qt.getEngines().find((function(t){return t.id===e}));n&&n.setCapabilities(t)};var r,a,o,s=i.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(H.getElementById(this._playerId)),i._logger.debug("Change source started"),this.dispatchEvent(new v(z.CHANGE_SOURCE_STARTED)),this._reset=!1,this._selectEngineByPriority()?(this.dispatchEvent(new v(z.SOURCE_SELECTED,{selectedSource:this._sources[this._streamType]})),this._attachMedia(),this._handlePlaybackOptions(),this._posterManager.setSrc(this._sources.poster),this._handleDimensions(),this._handlePreload(),this._handleAutoPlay(),i._logger.debug("Change source ended"),this.dispatchEvent(new v(z.CHANGE_SOURCE_ENDED))):(i._logger.warn("No playable engines was found to play the given sources"),this.dispatchEvent(new v(K.ERROR,new P(P.Severity.CRITICAL,P.Category.PLAYER,P.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?i._logger.debug("The source has already been loaded. load request ignored"):this._playbackMiddleware.load((function(){e._engine?e._load():e._eventManager.listenOnce(e,z.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 v(z.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 v(K.ERROR,new P(P.Severity.CRITICAL,P.Category.PLAYER,P.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(ct),this._activeTextCues=[],this._updateTextDisplay([]),this._tracks=[],Ze.reset(),this._resetStateFlags(),this._engineType="",this._streamType="",this._pendingSelectedVideoTrack=null,this._engine&&this._engine.reset(),this.showBlackCover(),this._reset=!0,this.dispatchEvent(new v(z.PLAYER_RESET,{isChangeMedia:e})),this._eventManager.removeAll(),this._resizeWatcher.init(H.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&&H.removeChild(this._el.parentNode,this._el),this._destroyed=!0,this.dispatchEvent(new v(z.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,K.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 pn),e&&this._engineDecoratorManager.register(e)},s._getTargetElement=function(){return H.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 Ze?(this._resetTextDisplay(),e.language===Pn?(this.hideTextTrack(),this._externalCaptionsHandler.hideTextTrack(),this._playbackAttributesState.textLanguage=Pn):e.external?(this._engine.hideTextTrack(),this._externalCaptionsHandler.selectTextTrack(e)):(this._externalCaptionsHandler.hideTextTrack(),this._engine.selectTextTrack(e))):e instanceof dt&&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===Pn}));n&&(n.active=!0,this.dispatchEvent(new v(z.TEXT_TRACK_CHANGED,{selectedTextTrack:n}))),this._playbackAttributesState.textLanguage=Pn}},s.showTextTrack=function(){var e=this._getTextTracks(),t=this._playbackAttributesState.textLanguage!==Pn&&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=vt(this._tracks.filter((function(e){return e instanceof ae})),t);if(n.length){var r=this._tracks.filter((function(e){return e instanceof ae&&e.available}));(r.length!==n.length||!r.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 v(z.TRACKS_CHANGED,{tracks:this._tracks.filter((function(e){return e.available}))})))}else i._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=Ae.fromJson(this._config.text.textStyle))}catch(e){i._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 v(z.ENTER_FULLSCREEN))},s.notifyExitFullscreen=function(){this.isFullscreen()||this.dispatchEvent(new v(z.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 k(e)},s.setLogLevel=function(e,t){S(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&&m[e.log.level]&&S(m[e.log.level]),e.log&&"function"==typeof e.log.handler&&b(e.log.handler)},s._hasSources=function(e){return!!e&&!!Object.values($e).find((function(t){return e[t]&&e[t].length>0}))},s._createPlayerContainer=function(){var e=this._el=H.createElement("div");H.addClassName(e,"playkit-container"),H.setAttribute(e,"id",this._playerId),H.setAttribute(e,"tabindex","-1")},s._appendEngineEl=function(){if(this._el){var e=this._engine.getVideoElement();H.addClassName(e,"playkit-engine");var t="playkit-engine-"+this._engine.id;H.addClassName(e,t),H.prependTo(e,this._el),"youtube"===this._engine.id&&(this._el.style.zIndex=1)}},s._appendDomElements=function(){this._blackCoverEl=H.createElement("div"),H.addClassName(this._blackCoverEl,"playkit-black-cover"),H.appendChild(this._el,this._blackCoverEl);var e=this._posterManager.getElement();H.addClassName(e,"playkit-poster"),H.appendChild(this._el,e),this._textDisplayEl=H.createElement("div"),H.addClassName(this._textDisplayEl,"playkit-subtitles"),H.appendChild(this._el,this._textDisplayEl)},s._createReadyPromise=function(){var e=this;this._readyPromise=new Promise((function(t,n){e._eventManager.listenOnce(e,z.TRACKS_CHANGED,(function(){e.dispatchEvent(new v(z.MEDIA_LOADED)),t()})),e._eventManager.listen(e,K.ERROR,(function(e){e.payload.severity===P.Severity.CRITICAL&&n()}))})).catch((function(){}))},s._selectEngineByPriority=function(){for(var e,t=this,n=this._config.playback.streamPriority,r=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():"",c=Qt.getEngines().find((function(e){return e.id===o}));if(c){var u=a[s];if(u&&u.length>0){var l=u[0];if(c.canPlaySource(l,r[s],t._config.drm))return i._logger.debug("Source selected: ",u),t._loadEngine(c,l),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 Dn(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)?Dn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}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 c=o();if("object"==typeof c)return c.v}return!1},s._loadEngine=function(e,t){this._engine?this._engine.id===e.id?this._engine.restore(t,Rn({},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,Rn({},this._config,{sources:this._sources}),this._playerId);this._engine=this._engineDecoratorManager?new gn(n,this._engineDecoratorManager):n},s._attachMedia=function(){var e=this;if(this._engine){Object.keys(K).forEach((function(t){e._eventManager.listen(e._engine,K[t],(function(t){return e.dispatchEvent(t)}))})),this._eventManager.listen(this._engine,K.SEEKING,(function(){e.isLive()&&(e._isOnLiveEdge=!(!e.duration||!e.currentTime)&&e.currentTime>=e.duration-1&&!e.paused)})),this._eventManager.listen(this._engine,K.SEEKED,(function(){var t=e._env.browser.name;"Edge"!==t&&"IE"!==t||e._removeTextCuePatch()})),this._eventManager.listen(this._engine,z.MEDIA_RECOVERED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.IMAGE_TRACK_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.TEXT_TRACK_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.VIDEO_TRACK_CHANGED,(function(t){return e._markActiveTrack(t.payload.selectedVideoTrack),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.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,z.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._engine,z.TRACKS_CHANGED,(function(t){return e._onTracksChanged(t)})),this._eventManager.listen(this._engine,z.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._engine,z.ABR_MODE_CHANGED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.TIMED_METADATA,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.TIMED_METADATA_CHANGE,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.TIMED_METADATA_ADDED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.PLAY_FAILED,(function(t){e._onPlayFailed(t),e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.FPS_DROP,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.FRAG_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.DRM_LICENSE_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.MANIFEST_LOADED,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._engine,z.MEDIA_RECOVERED,(function(){return e._handleRecovered()})),this._eventManager.listen(this,K.PLAY,this._onPlay.bind(this)),this._eventManager.listen(this,K.PAUSE,this._onPause.bind(this)),this._eventManager.listen(this,K.PLAYING,this._onPlaying.bind(this)),this._eventManager.listen(this,K.ENDED,this._onEnded.bind(this)),this._eventManager.listen(this,z.MUTE_CHANGE,(function(){e._playbackAttributesState.muted=e.muted})),this._eventManager.listen(this,K.VOLUME_CHANGE,(function(){e._playbackAttributesState.volume=e.volume})),this._eventManager.listen(this,K.RATE_CHANGE,(function(){e._playbackAttributesState.rate=e.playbackRate})),this._eventManager.listen(this,z.ENTER_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this,z.EXIT_FULLSCREEN,(function(){return e._resetTextCuesAndReposition()})),this._eventManager.listen(this._resizeWatcher,z.RESIZE,(function(t){e._resetTextCuesAndReposition(),e.dispatchEvent(t)})),this._eventManager.listen(this._externalCaptionsHandler,z.TEXT_CUE_CHANGED,(function(t){return e._onCueChange(t)})),this._eventManager.listen(this._externalCaptionsHandler,z.TEXT_TRACK_CHANGED,(function(t){return e._onTextTrackChanged(t)})),this._eventManager.listen(this._externalCaptionsHandler,K.ERROR,(function(t){return e.dispatchEvent(t)})),this._eventManager.listen(this._externalThumbnailsHandler,K.ERROR,(function(t){return e.dispatchEvent(t)}));var t=H.getElementBySelector("#"+this.config.targetId);t&&this._eventManager.listen(t,"click",(function(){e._hasUserInteracted=!0,e.dispatchEvent(new v(z.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,i=t._startTime,r=e.currentTime;if(r<n&&r>i)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;i.getCapabilities(this.engineType).then((function(i){i.autoplay?n():i.mutedAutoPlay?e.muted&&!e._fallbackToMutedAutoPlay?r():t?a():o():o()}));var n=function(){i._logger.debug("Start autoplay"),e._fallbackToMutedAutoPlay&&(e._fallbackToMutedAutoPlay=!1,e.muted=!1),e.play()},r=function(){i._logger.debug("Start muted autoplay"),e.play()},a=function(){i._logger.debug("Fallback to muted autoplay"),e._fallbackToMutedAutoPlay=!0,e.muted=!0,e.dispatchEvent(new v(z.FALLBACK_TO_MUTED_AUTOPLAY)),e.play()},o=function(){i._logger.warn("Autoplay failed, pause player"),e._posterManager.show(),e.load(),e.dispatchEvent(new v(z.AUTOPLAY_FAILED))}},s._handleAutoPlay=function(){(this.isAudio()||this._config.playback.autoplay!==vn.TRUE)&&this._posterManager.show(),this._config.playback.autoplay===vn.TRUE&&this._autoPlay()},s._playAfterAsyncMiddleware=function(){var e=this;this._engine?this._play():this._eventManager.listenOnce(this,z.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 v(z.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&&M.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 v(z.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 v(z.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 v(z.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)})),i=n[0],r=n[1];if(t.width||!t.width&&!t.height){var a=r/i*e.clientWidth;e.style.height=a+"px"}else if(t.height&&!t.width){var o=i/r*e.clientHeight;e.style.width=o+"px"}}},s._onTracksChanged=function(e){this._updateTracks(e.payload.tracks),this.dispatchEvent(e)},s._updateTracks=function(e){i._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(dt)},s._getTextTracks=function(){return this._getTracksByType(Ze)},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 Ze&&(t=this._getTextTracks()),t)for(var n=0;n<t.length;n++)t[n].active=e.index===t[n].index},s._onCueChange=function(e){i._logger.debug("Text cue changed",e.payload.cues);try{this._activeTextCues=e.payload.cues.filter((function(e,t,n){var i=n[t-1];return!i||!(e.startTime===i.startTime&&e.endTime===i.endTime&&e.text.trim()===i.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 i=e[n];for(var r in t)t[r]&&(i[r]=t[r])}},s._updateTextDisplay=function(e){this._config.text.useNativeTextTrack||this._config.text.useShakaTextTrackDisplay||function(e,t,n,i){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=e.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),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=Re.getSimpleBoxPosition(r),s=o.height<o.width?o.height:o.width,c={font:Math.round(.058*s*100)/100*1*i.implicitFontScale+"px "+i.fontFamily,color:Ae.toRGBA(i.fontColor,i.fontOpacity),backgroundColor:Ae.toRGBA(i.backgroundColor,i.backgroundOpacity),textShadow:i.getTextShadow()};!function(){for(var n,i,s=0;s<t.length;s++)i=t[s],n=new Oe(e,i,c),r.appendChild(n.div),De(0,n,o,a),i.displayState=n.div,a.push(Re.getSimpleBoxPosition(n))}()}else for(var u=0;u<t.length;u++)r.appendChild(t[u].displayState)}(window,e,this._textDisplayEl,this._textStyle)},s._addTextTrackOffOption=function(){var e=this._getTextTracks();e&&e.length&&this._tracks.push(new Ze({active:!1,kind:Ze.KIND.SUBTITLES,label:"Off",language:Pn}))},s._setDefaultTracks=function(){var e=this.getActiveTracks(),t=this._getTextTracks().find((function(e){return e.default})),n=this.config.playback,i=this._getTextTracks().find((function(e){return Ze.langComparer(Pn,e.language)})),r=this._getLanguage(this._getTextTracks(),n.textLanguage,t),a=this._playbackAttributesState.textLanguage&&this._playbackAttributesState.textLanguage!==Pn?this._playbackAttributesState.textLanguage:r,o=this._playbackAttributesState.audioLanguage||this._getLanguage(this._getAudioTracks(),n.audioLanguage,e.audio);a===n.textLanguage?this._setDefaultTrack(this._getTextTracks(),a,i,n.additionalTextLanguage):this._setDefaultTrack(this._getTextTracks(),a,i),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 i=t;if("auto"===i){var r=e.find((function(e){return ie.langComparer(Z.language,e.language)}));r?i=r.language:n&&n.language!==Pn?i=n.language:e&&e.length>0&&(i=e[0].language)}return i},s._setDefaultTrack=function(e,t,n,i){var r=this,a=function(e){r.selectTrack(e),r._markActiveTrack(e)},o=e.find((function(e){return ie.langComparer(t,e.language,i,!0)}));if(o)a(o);else{var s=e.find((function(e){return ie.langComparer(t,e.language,i,!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)}))},r=i,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&&(M.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 v(z.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),i=n.height,r=n.width;t.style.width="number"==typeof r?r+"px":r,t.style.height="number"==typeof i?i+"px":i,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 Ae))throw new Error("Style must be instance of TextStyle");var t=H.getElementBySelector("."+this._playerId+".playkit-subtitles-style");t||(t=H.createElement("style"),H.addClassName(t,this._playerId),H.addClassName(t,"playkit-subtitles-style"),H.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 v(z.TEXT_STYLE_CHANGED))}catch(e){i._logger.error(e.message)}},get:function(){return this._textStyle.clone()}},{key:"Event",get:function(){return X}},{key:"TextStyle",get:function(){return Ae}},{key:"State",get:function(){return J}},{key:"Track",get:function(){return Qe}},{key:"LogLevelType",get:function(){return E}},{key:"LogLevel",get:function(){return m}},{key:"AbrMode",get:function(){return tt}},{key:"MediaType",get:function(){return et}},{key:"StreamType",get:function(){return $e}},{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 P}}])&&In(r.prototype,a),o&&In(r,o),i}(C);xn(Ln,"_logger",w("Player"));var Mn=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",Bn="@playkit-js/playkit-js";function Hn(e){return new Ln(e||{})}var Vn=Ln.getCapabilities,jn=Ln.setCapabilities;t.default=Hn}])},function(e,t,n){"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},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 c(e,t){for(var n={},i=[],r=0;r<e.length;r++){var a=e[r],c=t.base?a[0]+t.base:a[0],u=n[c]||0,l="".concat(c," ").concat(u);n[c]=u+1;var d=s(l),h={css:a[1],media:a[2],sourceMap:a[3]};-1!==d?(o[d].references++,o[d].updater(h)):o.push({identifier:l,updater:A(h,t),references:1}),i.push(l)}return i}function u(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var r=n.nc;r&&(i.nonce=r)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[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 l,d=(l=[],function(e,t){return l[e]=t,l.filter(Boolean).join("\n")});function h(e,t,n,i){var r=n?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=d(t,r);else{var a=document.createTextNode(r),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 i=n.css,r=n.media,a=n.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),a&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var p=null,_=0;function A(e,t){var n,i,r;if(t.singleton){var a=_++;n=p||(p=u(t)),i=h.bind(null,n,a,!1),r=h.bind(null,n,a,!0)}else n=u(t),i=f.bind(null,n,t),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else r()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=r());var n=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<n.length;i++){var r=s(n[i]);o[r].references--}for(var a=c(e,t),u=0;u<n.length;u++){var l=s(n[u]);0===o[l].references&&(o[l].updater(),o.splice(l,1))}n=a}}}},function(e,t,n){(t=n(5)(!1)).push([e.i,".playkit-overlay.playkit-share-overlay .playkit-control-button-container{margin:0 0}.playkit-overlay.playkit-share-overlay .playkit-share-icons{margin:40px 0 16px 0}.playkit-overlay.playkit-share-overlay .playkit-share-icons .playkit-btn-social-network{margin:0 8px}.playkit-overlay.playkit-share-overlay .playkit-link-options-container{width:auto;display:inline-block;max-width:100%;text-align:left;margin:0 auto}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-copy-url-row{display:flex}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-copy-url-row .playkit-input-copy-url{margin:0}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-copy-url-row .playkit-btn-copy-url .playkit-icon{margin-top:0px;border:0px}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-container{display:flex;flex-direction:column;align-items:flex-start;margin-top:16px}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-container .playkit-video-start-options-row{margin-top:13px;text-align:center;display:flex;flex-direction:row;align-items:center;width:100%}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-container .playkit-video-start-options-row .playkit-radio-button{font-size:15px;position:relative;display:flex;flex-direction:row;align-items:center;margin-right:14px;width:120px}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-container .playkit-video-start-options-row .playkit-radio-button input{display:none}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-container .playkit-video-start-options-row .playkit-radio-button label{margin-left:8px}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-container .playkit-video-start-options-row .playkit-form-group{margin:0}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-container .playkit-video-start-options-row .playkit-clip-time-slots-container{display:flex;flex-direction:row;align-items:center}.playkit-overlay.playkit-share-overlay .playkit-link-options-container .playkit-video-start-options-container .playkit-video-start-options-row .playkit-clip-time-slots-container .playkit-clip-rectangle{width:8px;height:2px;border-radius:2px;background:rgba(255,255,255,.4);margin-right:8px;margin-left:8px}.playkit-share-main-container{width:312px;max-width:100%;margin:0 auto;text-align:center}.playkit-player.playkit-size-sm .playkit-overlay.playkit-share-overlay .playkit-share-icons,.playkit-player.playkit-size-xs .playkit-overlay.playkit-share-overlay .playkit-share-icons{margin:24px 0 8px 0}.playkit-player.playkit-size-sm .playkit-link-options-container .playkit-video-start-options-row,.playkit-player.playkit-size-xs .playkit-link-options-container .playkit-video-start-options-row{margin-top:8px}.playkit-startAtInput{text-align:center;border:1px solid rgba(255,255,255,.4)}.playkit-startAtInput.playkit-disabled{color:rgba(255,255,255,.4);background-color:rgba(0,0,0,.3);border:1px solid rgba(255,255,255,.3)}",""]),t.locals={overlay:"playkit-overlay","share-overlay":"playkit-share-overlay",shareOverlay:"playkit-share-overlay","control-button-container":"playkit-control-button-container",controlButtonContainer:"playkit-control-button-container","share-icons":"playkit-share-icons",shareIcons:"playkit-share-icons","btn-social-network":"playkit-btn-social-network",btnSocialNetwork:"playkit-btn-social-network","link-options-container":"playkit-link-options-container",linkOptionsContainer:"playkit-link-options-container","copy-url-row":"playkit-copy-url-row",copyUrlRow:"playkit-copy-url-row","input-copy-url":"playkit-input-copy-url",inputCopyUrl:"playkit-input-copy-url","btn-copy-url":"playkit-btn-copy-url",btnCopyUrl:"playkit-btn-copy-url",icon:"playkit-icon","video-start-options-container":"playkit-video-start-options-container",videoStartOptionsContainer:"playkit-video-start-options-container","video-start-options-row":"playkit-video-start-options-row",videoStartOptionsRow:"playkit-video-start-options-row","radio-button":"playkit-radio-button",radioButton:"playkit-radio-button","form-group":"playkit-form-group",formGroup:"playkit-form-group","clip-time-slots-container":"playkit-clip-time-slots-container",clipTimeSlotsContainer:"playkit-clip-time-slots-container","clip-rectangle":"playkit-clip-rectangle",clipRectangle:"playkit-clip-rectangle","share-main-container":"playkit-share-main-container",shareMainContainer:"playkit-share-main-container",player:"playkit-player","size-sm":"playkit-size-sm",sizeSm:"playkit-size-sm","size-xs":"playkit-size-xs",sizeXs:"playkit-size-xs",startAtInput:"playkit-startAtInput",disabled:"playkit-disabled"},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]||"",i=e[3];if(!i)return n;if(t&&"function"==typeof btoa){var r=(o=i,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),a=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[n].concat(a).concat([r]).join("\n")}var o,s,c;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,i){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(i)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(r[o]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);i&&r[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return Xt})),n.d(t,"NAME",(function(){return qt})),n.d(t,"Plugin",(function(){return zt})),n.d(t,"Share",(function(){return dt}));var i,r,a,o,s,c=n(0),u={},l=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(e,t){for(var n in t)e[n]=t[n];return e}function f(e){var t=e.parentNode;t&&t.removeChild(e)}function p(e,t,n){var r,a,o,s={};for(o in t)"key"==o?r=t[o]:"ref"==o?a=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?i.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(o in e.defaultProps)void 0===s[o]&&(s[o]=e.defaultProps[o]);return _(e,s,r,a,null)}function _(e,t,n,i,o){var s={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++a:o};return null==o&&null!=r.vnode&&r.vnode(s),s}function A(e){return e.children}function g(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 y(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 y(e)}}function m(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!E.__r++||s!==r.debounceRendering)&&((s=r.debounceRendering)||setTimeout)(E)}function E(){for(var e;E.__r=o.length;)e=o.sort((function(e,t){return e.__v.__b-t.__v.__b})),o=[],e.some((function(e){var t,n,i,r,a,o;e.__d&&(a=(r=(t=e).__v).__e,(o=t.__P)&&(n=[],(i=h({},r)).__v=r.__v+1,R(o,r,i,t.__n,void 0!==o.ownerSVGElement,null!=r.__h?[a]:null,n,null==a?v(r):a,r.__h),D(n,r),r.__e!=a&&y(r)))}))}function b(e,t,n,i,r,a,o,s,c,d){var h,f,p,g,y,m,E,b=i&&i.__k||l,S=b.length;for(n.__k=[],h=0;h<t.length;h++)if(null!=(g=n.__k[h]=null==(g=t[h])||"boolean"==typeof g?null:"string"==typeof g||"number"==typeof g||"bigint"==typeof g?_(null,g,null,null,g):Array.isArray(g)?_(A,{children:g},null,null,null):g.__b>0?_(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)){if(g.__=n,g.__b=n.__b+1,null===(p=b[h])||p&&g.key==p.key&&g.type===p.type)b[h]=void 0;else for(f=0;f<S;f++){if((p=b[f])&&g.key==p.key&&g.type===p.type){b[f]=void 0;break}p=null}R(e,g,p=p||u,r,a,o,s,c,d),y=g.__e,(f=g.ref)&&p.ref!=f&&(E||(E=[]),p.ref&&E.push(p.ref,null,g),E.push(f,g.__c||y,g)),null!=y?(null==m&&(m=y),"function"==typeof g.type&&g.__k===p.__k?g.__d=c=T(g,c,e):c=k(e,g,p,b,y,c),"function"==typeof n.type&&(n.__d=c)):c&&p.__e==c&&c.parentNode!=e&&(c=v(p))}for(n.__e=m,h=S;h--;)null!=b[h]&&x(b[h],b[h]);if(E)for(h=0;h<E.length;h++)N(E[h],E[++h],E[++h])}function T(e,t,n){for(var i,r=e.__k,a=0;r&&a<r.length;a++)(i=r[a])&&(i.__=e,t="function"==typeof i.type?T(i,t,n):k(n,i,i,r,i.__e,t));return t}function k(e,t,n,i,r,a){var o,s,c;if(void 0!==t.__d)o=t.__d,t.__d=void 0;else if(null==n||r!=a||null==r.parentNode)e:if(null==a||a.parentNode!==e)e.appendChild(r),o=null;else{for(s=a,c=0;(s=s.nextSibling)&&c<i.length;c+=1)if(s==r)break e;e.insertBefore(r,a),o=a}return void 0!==o?o:r.nextSibling}function S(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||d.test(t)?n:n+"px"}function w(e,t,n,i,r){var a;e:if("style"===t)if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof i&&(e.style.cssText=i=""),i)for(t in i)n&&t in n||S(e.style,t,"");if(n)for(t in n)i&&n[t]===i[t]||S(e.style,t,n[t])}else if("o"===t[0]&&"n"===t[1])a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=n,n?i||e.addEventListener(t,a?O:C,a):e.removeEventListener(t,a?O:C,a);else if("dangerouslySetInnerHTML"!==t){if(r)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break e}catch(e){}"function"==typeof n||(null==n||!1===n&&-1==t.indexOf("-")?e.removeAttribute(t):e.setAttribute(t,n))}}function C(e){this.l[e.type+!1](r.event?r.event(e):e)}function O(e){this.l[e.type+!0](r.event?r.event(e):e)}function R(e,t,n,i,a,o,s,c,u){var l,d,f,p,_,v,y,m,E,T,k,S,w,C,O,R=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(u=n.__h,c=t.__e=n.__e,t.__h=null,o=[c]),(l=r.__b)&&l(t);try{e:if("function"==typeof R){if(m=t.props,E=(l=R.contextType)&&i[l.__c],T=l?E?E.props.value:l.__:i,n.__c?y=(d=t.__c=n.__c).__=d.__E:("prototype"in R&&R.prototype.render?t.__c=d=new R(m,T):(t.__c=d=new g(m,T),d.constructor=R,d.render=P),E&&E.sub(d),d.props=m,d.state||(d.state={}),d.context=T,d.__n=i,f=d.__d=!0,d.__h=[],d._sb=[]),null==d.__s&&(d.__s=d.state),null!=R.getDerivedStateFromProps&&(d.__s==d.state&&(d.__s=h({},d.__s)),h(d.__s,R.getDerivedStateFromProps(m,d.__s))),p=d.props,_=d.state,f)null==R.getDerivedStateFromProps&&null!=d.componentWillMount&&d.componentWillMount(),null!=d.componentDidMount&&d.__h.push(d.componentDidMount);else{if(null==R.getDerivedStateFromProps&&m!==p&&null!=d.componentWillReceiveProps&&d.componentWillReceiveProps(m,T),!d.__e&&null!=d.shouldComponentUpdate&&!1===d.shouldComponentUpdate(m,d.__s,T)||t.__v===n.__v){for(d.props=m,d.state=d.__s,t.__v!==n.__v&&(d.__d=!1),d.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach((function(e){e&&(e.__=t)})),k=0;k<d._sb.length;k++)d.__h.push(d._sb[k]);d._sb=[],d.__h.length&&s.push(d);break e}null!=d.componentWillUpdate&&d.componentWillUpdate(m,d.__s,T),null!=d.componentDidUpdate&&d.__h.push((function(){d.componentDidUpdate(p,_,v)}))}if(d.context=T,d.props=m,d.__v=t,d.__P=e,S=r.__r,w=0,"prototype"in R&&R.prototype.render){for(d.state=d.__s,d.__d=!1,S&&S(t),l=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do{d.__d=!1,S&&S(t),l=d.render(d.props,d.state,d.context),d.state=d.__s}while(d.__d&&++w<25);d.state=d.__s,null!=d.getChildContext&&(i=h(h({},i),d.getChildContext())),f||null==d.getSnapshotBeforeUpdate||(v=d.getSnapshotBeforeUpdate(p,_)),O=null!=l&&l.type===A&&null==l.key?l.props.children:l,b(e,Array.isArray(O)?O:[O],t,n,i,a,o,s,c,u),d.base=t.__e,t.__h=null,d.__h.length&&s.push(d),y&&(d.__E=d.__=null),d.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=I(n.__e,t,n,i,a,o,s,u);(l=r.diffed)&&l(t)}catch(e){t.__v=null,(u||null!=o)&&(t.__e=c,t.__h=!!u,o[o.indexOf(c)]=null),r.__e(e,t,n)}}function D(e,t){r.__c&&r.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){r.__e(e,t.__v)}}))}function I(e,t,n,r,a,o,s,c){var l,d,h,p=n.props,_=t.props,A=t.type,g=0;if("svg"===A&&(a=!0),null!=o)for(;g<o.length;g++)if((l=o[g])&&"setAttribute"in l==!!A&&(A?l.localName===A:3===l.nodeType)){e=l,o[g]=null;break}if(null==e){if(null===A)return document.createTextNode(_);e=a?document.createElementNS("http://www.w3.org/2000/svg",A):document.createElement(A,_.is&&_),o=null,c=!1}if(null===A)p===_||c&&e.data===_||(e.data=_);else{if(o=o&&i.call(e.childNodes),d=(p=n.props||u).dangerouslySetInnerHTML,h=_.dangerouslySetInnerHTML,!c){if(null!=o)for(p={},g=0;g<e.attributes.length;g++)p[e.attributes[g].name]=e.attributes[g].value;(h||d)&&(h&&(d&&h.__html==d.__html||h.__html===e.innerHTML)||(e.innerHTML=h&&h.__html||""))}if(function(e,t,n,i,r){var a;for(a in n)"children"===a||"key"===a||a in t||w(e,a,null,n[a],i);for(a in t)r&&"function"!=typeof t[a]||"children"===a||"key"===a||"value"===a||"checked"===a||n[a]===t[a]||w(e,a,t[a],n[a],i)}(e,_,p,a,c),h)t.__k=[];else if(g=t.props.children,b(e,Array.isArray(g)?g:[g],t,n,r,a&&"foreignObject"!==A,o,s,o?o[0]:n.__k&&v(n,0),c),null!=o)for(g=o.length;g--;)null!=o[g]&&f(o[g]);c||("value"in _&&void 0!==(g=_.value)&&(g!==e.value||"progress"===A&&!g||"option"===A&&g!==p.value)&&w(e,"value",g,p.value,!1),"checked"in _&&void 0!==(g=_.checked)&&g!==e.checked&&w(e,"checked",g,p.checked,!1))}return e}function N(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){r.__e(e,n)}}function x(e,t,n){var i,a;if(r.unmount&&r.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||N(i,null,t)),null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){r.__e(e,t)}i.base=i.__P=null,e.__c=void 0}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&x(i[a],t,n||"function"!=typeof e.type);n||null==e.__e||f(e.__e),e.__=e.__e=e.__d=void 0}function P(e,t,n){return this.constructor(e,n)}i=l.slice,r={__e:function(e,t,n,i){for(var r,a,o;t=t.__;)if((r=t.__c)&&!r.__)try{if((a=r.constructor)&&null!=a.getDerivedStateFromError&&(r.setState(a.getDerivedStateFromError(e)),o=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(e,i||{}),o=r.__d),o)return r.__E=r}catch(t){e=t}throw e}},a=0,g.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),"function"==typeof e&&(e=e(h({},n),this.props)),e&&h(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),m(this))},g.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),m(this))},g.prototype.render=A,o=[],E.__r=0;var L,M=n(1),U=n.n(M),F=n(2),B="share_clicked",H="share_network",V=c.ui.preact.h,j=function(){return V("svg",{xmlns:"http://www.w3.org/2000/svg",width:"19",height:"19",viewBox:"0 0 19 19",fill:"none"},V("circle",{cx:"9.5",cy:"9.89948",r:"8.5",fill:"black",stroke:"#666666"}))},G=function(){return V("svg",{xmlns:"http://www.w3.org/2000/svg",width:"19",height:"19",viewBox:"0 0 19 19",fill:"none"},V("circle",{cx:"9.5",cy:"9.89948",r:"6",fill:"white",stroke:"#006EFA",strokeWidth:"6"}))};function W(e){return(W="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 Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function K(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,te(i.key),i)}}function z(e,t){return(z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function X(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Q(e);if(t){var r=Q(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return q(this,n)}}function q(e,t){if(t&&("object"===W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Z(e)}function Z(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$(Object(n),!0).forEach((function(t){ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ee(e,t,n){return(t=te(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function te(e){var t=function(e,t){if("object"!==W(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==W(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===W(t)?t:String(t)}function ne(){return(ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var ie,re=c.ui.preact,ae=c.ui.preacti18n,oe=c.ui.Components,se=c.ui.Utils,ce=c.ui.style,ue=c.ui.redux,le=c.ui.Reducers,de=c.ui.preactHooks,he=re.h,fe=re.Component,pe=de.useRef,_e=ae.Text,Ae=ae.Localizer,ge=oe.Overlay,ve=oe.Icon,ye=oe.CopyButton,me=oe.Button,Ee=oe.withLogger,be=oe.Tooltip,Te=oe.ButtonControl,ke=se.bindActions,Se=se.KeyMap,we=se.withKeyboardA11y,Ce=se.toHHMMSS,Oe=se.toSecondsFromHHMMSS,Re=se.formatOnlyNumbersInput,De=le.shell.actions,Ie=ue.connect,Ne="main",xe="embed-options",Pe=function(e){var t=e.updateShareOverlay;return he(Ae,null,he(Te,{name:"ShareButton"},he(be,{label:he(_e,{id:e.config.title})},he(Ae,null,he(me,{ref:function(t){e.addAccessibleChild(t)},role:"link","aria-label":he(_e,{id:e.config.title}),"aria-haspopup":"embed"===e.socialName,className:[ce.btnBorderless,ce.onlyIcon,U.a.btnSocialNetwork].join(" "),onClick:function(){return function(n){var i=e.config,r=i.templateUrl,a=i.shareUrl,o=i.embedUrl,s=decodeURIComponent(r);s=s.replace(/{description}/g,encodeURIComponent(e.videoDesc));try{s=s.replace(/{shareUrl}/g,encodeURIComponent(a))}catch(e){s=s.replace(/{shareUrl}/g,a)}switch(n){case"email":location.href=s;break;case"embed":t(xe,s,o);break;default:window.open(s,"_blank","width=580,height=580")}e.player.dispatchEvent(new F.FakeEvent(H,{shareNetworkName:n}))}(e.socialName)}},he(ve,{id:e.socialName,color:"#fff",path:e.config.icon,width:"24",height:"24",viewBox:"0 0 24 24"}))))))},Le=function(e){var t;return he("div",{className:e.copy?ce.copyUrlRow:""},he("div",{className:[ce.formGroup,ce.inputCopyUrl].join(" "),style:"width: 350px;"},he("input",{tabIndex:"-1",type:"text",ref:function(e){return e?t=e:void 0},className:ce.formControl,value:e.shareUrl,readOnly:!0})),e.copy&&he(ye,{addAccessibleChild:e.addAccessibleChild,copy:function(){t&&(e.isIos?t.setSelectionRange(0,9999):t.select(),document.execCommand("copy"),t.blur())}}))},Me="full",Ue="start-from",Fe="clip",Be=function(e){var t=pe(),n=pe(),i=pe(),r=function(e,t){var n;t((n=e.target.value,isNaN(n)?n:Re(n)))},a=function(e,t){for(var n=0;n<e.length;n++){var i=e.charAt(n);if(isNaN(i)&&":"!==i){t.value=e.replace(i,"");break}}},o=function(t){e.setVideoClippingOption(t)},s=function(s,c,u,l){var d,h={};return s===Me&&(h.style="width: 100%;"),he(He,ne({videoClippingOption:e.videoClippingOption,addAccessibleChild:e.addAccessibleChild,videoClippingType:s,onKeyDown:function(t){return function(t,n){[Se.ENTER,Se.SPACE].includes(t.keyCode)&&(t.preventDefault(),e.setVideoClippingOption(n))}(t,s)},onClick:function(t){return function(t,n){t.preventDefault(),e.setVideoClippingOption(n)}(t,s)},setVideoClippingOption:o,inputId:c,labelId:u,textId:l},h),s===Ue&&(d={"aria-labelledby":"start-from-label","aria-disabled":e.videoClippingOption===Ue?"false":"true",type:"text",value:Ce(e.startFromValue),className:[ce.formControl,U.a.startAtInput,e.videoClippingOption!==Ue?U.a.disabled:""].join(" "),style:e.videoHasHours?"width: 85px;":"width: 56px;",onChange:function(e){return a(e.target.value,t)},onBlur:function(t){return r(t,e.handleStartFromChange)}},e.videoClippingOption!==Ue&&(d.disabled=!0),he("div",{className:[ce.formGroup,ce.dInlineBlock].join(" ")},he("input",ne({ref:function(n){t=n,e.addAccessibleChild(n)}},d)))),s===Fe&&function(){var t={"aria-disabled":e.videoClippingOption===Fe?"false":"true",type:"text",className:[ce.formControl,U.a.startAtInput,e.videoClippingOption!==Fe?U.a.disabled:""].join(" "),style:e.videoHasHours?"width: 85px;":"width: 56px;"},o=J({"aria-labelledby":"clip-seek-from-label",value:Ce(e.clipStartTimeValue),onChange:function(e){return a(e.target.value,n)},onBlur:function(t){return r(t,e.handleClipStartTimeChange)}},t);e.videoClippingOption!==Fe&&(o.disabled=!0);var s=J({"aria-labelledby":"clip-to-label",value:Ce(e.clipEndTimeValue),onChange:function(e){return a(e.target.value,i)},onBlur:function(t){return r(t,e.handleClipEndTimeChange)}},t);return e.videoClippingOption!==Fe&&(s.disabled=!0),he("div",{className:U.a.clipTimeSlotsContainer},he("input",ne({ref:function(t){n=t,e.addAccessibleChild(t)}},o)),he("div",{className:U.a.clipRectangle}),he("input",ne({ref:function(t){i=t,e.addAccessibleChild(t)}},s)))}())};return he("div",{className:U.a.videoStartOptionsContainer,role:"radiogroup"},s(Me,"full-video","full-video-label","share.full_video"),e.config.enableTimeOffset&&s(Ue,"start-from","start-from-label","share.start_video_at"),e.config.enableClipping&&s(Fe,"clip","clip-label","share.clip_video"))},He=function(e){var t=e.videoClippingOption===e.videoClippingType,n={};return e.style&&(n.style=e.style),he("div",{className:U.a.videoStartOptionsRow},he("div",ne({role:"radio","aria-checked":t,ref:function(t){e.addAccessibleChild(t)},tabIndex:"0",onKeyDown:e.onKeyDown,onClick:e.onClick,className:U.a.radioButton},n),he("input",{type:"radio",id:e.inputId,name:"videoClippingOption",checked:t,onChange:function(){return e.setVideoClippingOption(e.videoClippingType)}}),he(t?G:j,null),he("label",{id:e.labelId,htmlFor:e.inputId},he(_e,{id:e.textId}))),e.children)},Ve=Ie((function(e){return{isLive:e.engine.isLive}}),ke(De))(L=Ee("ShareOverlay")(L=we(L=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z(e,t)}(a,e);var t,n,i,r=X(a);function a(){var e;Y(this,a);for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return ee(Z(e=r.call.apply(r,[this].concat(n))),"_onVideoClippingOptionChange",(function(t){e.setState({videoClippingOption:t})})),ee(Z(e),"_handleStartFromChange",(function(t){e.setState({startFromValue:e._convertTimeValue(t)})})),ee(Z(e),"_handleClipStartTimeChange",(function(t){e.setState({clipStartTimeValue:e._convertTimeValue(t)})})),ee(Z(e),"_handleClipEndTimeChange",(function(t){e.setState({clipEndTimeValue:e._convertTimeValue(t)})})),ee(Z(e),"_convertTimeValue",(function(t){var n=Oe(t);return n>=e.props.player.duration?e.props.player.duration:n})),ee(Z(e),"_updateOverlay",(function(t,n,i){e.setState({view:t,embedTemplate:n,embedUrl:i})})),e}return t=a,(n=[{key:"componentWillMount",value:function(){this.isIos="iOS"===this.props.player.env.os.name,this.setState({view:Ne,startFromValue:Math.floor(this.props.player.currentTime),videoClippingOption:Me,clipStartTimeValue:Math.floor(this.props.player.currentTime),clipEndTimeValue:Math.floor(this.props.player.duration)})}},{key:"componentDidUpdate",value:function(e,t){t.view!=this.state.view&&this.props.focusOnDefault()}},{key:"componentDidMount",value:function(){this.props.setIsModal(!0)}},{key:"_addKalturaClipParams",value:function(e){var t="kalturaSeekFrom=".concat(this.state.clipStartTimeValue,"&kalturaClipTo=").concat(this.state.clipEndTimeValue);return-1===e.indexOf("?")?"".concat(e,"?").concat(t):"".concat(e,"&").concat(t)}},{key:"_addUrlKalturaStartTimeParam",value:function(e){var t="kalturaStartTime=".concat(this.state.startFromValue);return-1===e.indexOf("?")?"".concat(e,"?").concat(t):"".concat(e,"&").concat(t)}},{key:"getShareUrl",value:function(){var e=this.props.config.shareUrl;return this._maybeAddParamsToUrl(e)}},{key:"_maybeAddParamsToUrl",value:function(e){return this.state.videoClippingOption===Ue?e=this._addUrlKalturaStartTimeParam(e):this.state.videoClippingOption===Fe&&(e=this._addKalturaClipParams(e)),e}},{key:"getEmbedCode",value:function(){var e=this.state.embedUrl,t=this.state.embedTemplate;return e=this._maybeAddParamsToUrl(e),t.replace(/{embedUrl}/g,e)}},{key:"_createShareOptions",value:function(e){var t=this;return Object.keys(e).map((function(n){var i=t.props.config.shareUrl,r=t.props.config.embedUrl;if("embed"!==n||["embedBaseUrl","partnerId","uiConfId","entryId"].every((function(e){return!(r.indexOf("{".concat(e,"}"))>-1)||!!t.props.config[e]&&(r=r.replace(new RegExp("{".concat(e,"}"),"g"),t.props.config[e]),!0)}))&&r){var a=J(J({},e[n]),{},{shareUrl:i,embedUrl:r});return he(Pe,{key:n,socialName:n,videoDesc:t.props.videoDesc,config:a,addAccessibleChild:t.props.addAccessibleChild,updateShareOverlay:t._updateOverlay,player:t.props.player})}}))}},{key:"renderMainState",value:function(){return he("div",{className:this.state.view===Ne?"overlay-screen active":"overlay-screen"},he("div",{className:ce.title},he(_e,{id:"share.title"})),he("div",{className:U.a.shareMainContainer},he("div",{className:U.a.shareIcons},this._createShareOptions(this.props.config.shareOptions)),he("div",{className:U.a.linkOptionsContainer},he(Le,{addAccessibleChild:this.props.addAccessibleChild,shareUrl:this.getShareUrl(),copy:!0,isIos:this.isIos}),this._renderVideoClippingOptions())))}},{key:"_renderVideoClippingOptions",value:function(){return!this.props.config.enableTimeOffset&&!this.props.config.enableClipping||this.props.isLive?void 0:he(Be,{addAccessibleChild:this.props.addAccessibleChild,startFromValue:this.state.startFromValue,handleStartFromChange:this._handleStartFromChange,videoHasHours:this.props.player.duration>=3600,config:this.props.config,videoClippingOption:this.state.videoClippingOption,setVideoClippingOption:this._onVideoClippingOptionChange,clipStartTimeValue:this.state.clipStartTimeValue,handleClipStartTimeChange:this._handleClipStartTimeChange,handleClipEndTimeChange:this._handleClipEndTimeChange,clipEndTimeValue:this.state.clipEndTimeValue})}},{key:"renderOptionsState",value:function(e){return he("div",{className:this.state.view===xe?"overlay-screen active":"overlay-screen"},he("div",{className:ce.title},e.title),he("div",{className:U.a.linkOptionsContainer},he(Le,{addAccessibleChild:this.props.addAccessibleChild,shareUrl:e.shareUrl,copy:!0,isIos:this.isIos}),this._renderVideoClippingOptions()))}},{key:"renderStateContent",value:function(){switch(this.props.clearAccessibleChildren(),this.state.view){case xe:return this.renderOptionsState({title:he(_e,{id:"share.embed_options"}),shareUrl:this.getEmbedCode()});case Ne:default:return this.renderMainState()}}},{key:"render",value:function(e){return he(ge,{open:!0,addAccessibleChild:this.props.addAccessibleChild,handleKeyDown:this.props.handleKeyDown,onClose:e.onClose,type:"playkit-share"},this.renderStateContent())}}])&&K(t.prototype,n),i&&K(t,i),Object.defineProperty(t,"prototype",{writable:!1}),a}(fe))||L)||L)||L;function je(e){return(je="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 Ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function We(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(r=i.key,a=void 0,a=function(e,t){if("object"!==je(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==je(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r,"string"),"symbol"===je(a)?a:String(a)),i)}var r,a}function Ye(e,t){return(Ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Ke(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Xe(e);if(t){var r=Xe(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return ze(this,n)}}function ze(e,t){if(t&&("object"===je(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Xe(e){return(Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Ve.displayName="ShareOverlay";var qe=c.ui.preact,Ze=c.ui.preacti18n,Qe=c.ui.Components,$e=c.ui.Utils,Je=c.ui.redux,et=c.ui.Reducers,tt=c.ui.createPortal,nt=qe.h,it=qe.Component,rt=Ze.withText,at=Qe.withLogger,ot=Qe.withPlayer,st=$e.bindActions,ct=et.shell.actions,ut=Je.connect,lt=c.core.Utils,dt=ut((function(e){return{isPlaying:e.engine.isPlaying}}),st(ct))(ie=ot(ie=at("Share")(ie=rt({shareTxt:"controls.share"})(ie=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ye(e,t)}(a,e);var t,n,i,r=Ke(a);function a(){return Ge(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"_getVideoDesc",value:function(){var e=lt.Object.getPropertyPath(this.props.player.config,"sources.metadata.name")||"the video";return"".concat(e)}},{key:"render",value:function(){var e=this.props.config,t=e.shareUrl,n=e.shareOptions;if(t&&n){var i=document.getElementById(this.props.player.config.targetId)||document,r=this._getVideoDesc();return tt(nt(Ve,{config:this.props.config,videoDesc:r,player:this.props.player,onClose:this.props.onClose}),i.querySelector(".overlay-portal"))}}}])&&We(t.prototype,n),i&&We(t,i),Object.defineProperty(t,"prototype",{writable:!1}),a}(it))||ie)||ie)||ie)||ie;dt.displayName="Share";var ht,ft={facebook:{display:!0,templateUrl:"https://www.facebook.com/sharer/sharer.php?u={shareUrl}",title:"share.share-on-facebook",icon:"M8 9.63017H9.5003V8.22342C9.5003 7.60278 9.51651 6.64628 9.98306 6.05362C10.4752 5.42639 11.1499 5 12.3116 5C14.2034 5 15 5.26011 15 5.26011L14.6256 7.4044C14.6256 7.4044 14.0004 7.23072 13.417 7.23072C12.8336 7.23072 12.3116 7.43238 12.3116 7.99459V9.63017H14.7032L14.536 11.7242H12.3116V19H9.5003V11.7242H8V9.63017Z"},linkedin:{display:!0,templateUrl:"https://www.linkedin.com/shareArticle?mini=true&url={shareUrl}",title:"share.share-on-linkedin",icon:"M18 19H15.1268V14.43C15.1268 13.2338 14.6774 12.4172 13.6891 12.4172C12.9331 12.4172 12.5128 12.9682 12.3171 13.4993C12.2437 13.69 12.2552 13.9555 12.2552 14.221V19H9.40875C9.40875 19 9.44544 10.9047 9.40875 10.1688H12.2552V11.5548C12.4233 10.9488 13.3329 10.0839 14.7844 10.0839C16.5852 10.0839 18 11.3542 18 14.0895V19ZM6.53022 9.06416H6.51188C5.59466 9.06416 5 8.38906 5 7.53333C5 6.66095 5.61224 6 6.5478 6C7.4826 6 8.05738 6.65928 8.07573 7.53083C8.07573 8.38657 7.4826 9.06416 6.53022 9.06416ZM5.3279 19H7.86171V10.1688H5.3279V19Z"},twitter:{display:!0,templateUrl:"https://twitter.com/share?url={shareUrl}",title:"share.share-on-twitter",icon:"M16.4284 5H18.7899L13.6308 10.9303L19.7001 19H14.9479L11.2258 14.1057L6.96694 19H4.60406L10.1222 12.6569L4.29996 5H9.17277L12.5372 9.47354L16.4284 5ZM15.5997 17.5785H16.9082L8.46176 6.34687H7.0576L15.5997 17.5785Z"},email:{display:!0,templateUrl:"mailto:?subject=Check out {description}&body=Check out {description} - {shareUrl}",title:"share.email",icon:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M21 6.75C21 5.7835 20.1941 5 19.2 5H4.8C3.80589 5 3 5.7835 3 6.75V17.25C3 18.2165 3.80589 19 4.8 19H19.2C20.1941 19 21 18.2165 21 17.25V6.75ZM18.8944 8.55276C18.6474 8.05878 18.0467 7.85856 17.5528 8.10555L12 10.881L6.44719 8.10555L6.33987 8.05941C5.8692 7.88866 5.33489 8.09407 5.10555 8.55276C4.85856 9.04674 5.05878 9.64741 5.55276 9.8944L11.5528 12.8944L11.6762 12.9461C11.9279 13.0323 12.2059 13.0151 12.4472 12.8944L18.4472 9.8944L18.5485 9.83623C18.9675 9.56215 19.1237 9.01146 18.8944 8.55276Z"}},embed:{display:!0,templateUrl:'<iframe src="{embedUrl}" style="width: 560px;height: 395px" allowfullscreen webkitallowfullscreen mozAllowFullScreen frameborder="0" allow="accelerometer *; autoplay *; encrypted-media *; gyroscope *; picture-in-picture *"/>',title:"share.embed",icon:"M13.9864 6.16443C14.0772 5.61966 13.7092 5.10444 13.1644 5.01364C12.6197 4.92285 12.1044 5.29086 12.0136 5.83564L10.0136 17.8356C9.92284 18.3804 10.2909 18.8956 10.8356 18.9864C11.3804 19.0772 11.8956 18.7092 11.9864 18.1644L13.9864 6.16443Z M15.2929 15.7071C14.9024 15.3166 14.9024 14.6834 15.2929 14.2929L17.5858 12L15.2929 9.70711C14.9024 9.31658 14.9024 8.68342 15.2929 8.29289C15.6834 7.90237 16.3166 7.90237 16.7071 8.29289L19.7071 11.2929C20.0976 11.6834 20.0976 12.3166 19.7071 12.7071L16.7071 15.7071C16.3166 16.0976 15.6834 16.0976 15.2929 15.7071Z M8.70711 8.29289C9.09763 8.68342 9.09763 9.31658 8.70711 9.70711L6.41421 12L8.70711 14.2929C9.09763 14.6834 9.09763 15.3166 8.70711 15.7071C8.31658 16.0976 7.68342 16.0976 7.29289 15.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L7.29289 8.29289C7.68342 7.90237 8.31658 7.90237 8.70711 8.29289Z"}};function pt(e){return(pt="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 _t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function At(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(r=i.key,a=void 0,a=function(e,t){if("object"!==pt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==pt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(r,"string"),"symbol"===pt(a)?a:String(a)),i)}var r,a}function gt(e,t){return(gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function vt(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=mt(e);if(t){var r=mt(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return yt(this,n)}}function yt(e,t){if(t&&("object"===pt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function mt(e){return(mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Et=c.ui.preact,bt=c.ui.preacti18n,Tt=c.ui.Components,kt=c.ui.style,St=Et.h,wt=Et.Component,Ct=bt.withText,Ot=Tt.Tooltip,Rt=Tt.Icon,Dt=Ct({shareTxt:"controls.share"})(ht=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gt(e,t)}(a,e);var t,n,i,r=vt(a);function a(){return _t(this,a),r.apply(this,arguments)}return t=a,(n=[{key:"render",value:function(){var e=this.props.config,t=e.shareUrl,n=e.shareOptions;if(t&&n)return St(Ot,{label:this.props.shareTxt},St("button",{tabIndex:0,"aria-haspopup":"true",className:kt.upperBarIcon,"aria-label":this.props.shareTxt},St(Rt,{id:Kt,path:"M318.641 446.219l236.155-142.257c-0.086-1.754-0.129-3.52-0.129-5.295 0-58.91 47.756-106.667 106.667-106.667s106.667 47.756 106.667 106.667c0 58.91-47.756 106.667-106.667 106.667-33.894 0-64.095-15.808-83.633-40.454l-236.467 142.445c-0.132-3.064-0.394-6.095-0.779-9.087l7.271-12.835-0.117 53.333-7.183-12.743c0.399-3.046 0.67-6.131 0.806-9.252l236.467 142.383c19.538-24.648 49.741-40.457 83.636-40.457 58.91 0 106.667 47.756 106.667 106.667s-47.756 106.667-106.667 106.667c-58.91 0-106.667-47.756-106.667-106.667 0-1.775 0.043-3.539 0.129-5.293l-236.19-142.216c-19.528 24.867-49.868 40.841-83.939 40.841-58.91 0-106.667-47.756-106.667-106.667s47.756-106.667 106.667-106.667c34.091 0 64.447 15.993 83.974 40.886zM234.667 554.667c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667c-23.564 0-42.667 19.103-42.667 42.667s19.103 42.667 42.667 42.667zM661.333 341.333c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667c-23.564 0-42.667 19.103-42.667 42.667s19.103 42.667 42.667 42.667zM661.333 768c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667c-23.564 0-42.667 19.103-42.667 42.667s19.103 42.667 42.667 42.667z"})))}}])&&At(t.prototype,n),i&&At(t,i),Object.defineProperty(t,"prototype",{writable:!1}),a}(wt))||ht;function It(e){return(It="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 Nt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,Bt(i.key),i)}}function xt(){return(xt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var i=Pt(e,t);if(i){var r=Object.getOwnPropertyDescriptor(i,t);return r.get?r.get.call(arguments.length<3?e:n):r.value}}).apply(this,arguments)}function Pt(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ft(e)););return e}function Lt(e,t){return(Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mt(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Ft(e);if(t){var r=Ft(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Ut(this,n)}}function Ut(e,t){if(t&&("object"===It(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ft(e){return(Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Bt(e){var t=function(e,t){if("object"!==It(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==It(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===It(t)?t:String(t)}Dt.displayName="ShareButton";var Ht,Vt,jt,Gt=c.ui.ReservedPresetNames,Wt=c.core.Utils,Yt=c.ui.preacti18n.Text,Kt="share",zt=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lt(e,t)}(a,e);var t,n,i,r=Mt(a);function a(e,t,n){var i;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(i=r.call(this,e,t,n)).config.shareOptions){var o=Object.keys(i.config.shareOptions).filter((function(e){return ft[e]})).reduce((function(e,t){return e[t]=ft[t],e}),{});i.config.shareOptions=Wt.Object.mergeDeep({},o,i.config.shareOptions)}else i.config.shareOptions=ft;return i._filterNonDisplayShareOptions(),i.config.shareUrl||(i.config.shareUrl=window.location.href),i._wasPlayed=!1,i._addIcon(),i}return t=a,i=[{key:"isValid",value:function(){return!0}}],(n=[{key:"_addIcon",value:function(){var e=this;this.player.ready().then((function(){e.iconId=e.player.getService("upperBarManager").add({label:p(Yt,{id:"controls.share"},"Share"),component:function(){return p(Dt,{config:e.config})},svgIcon:{path:"M318.641 446.219l236.155-142.257c-0.086-1.754-0.129-3.52-0.129-5.295 0-58.91 47.756-106.667 106.667-106.667s106.667 47.756 106.667 106.667c0 58.91-47.756 106.667-106.667 106.667-33.894 0-64.095-15.808-83.633-40.454l-236.467 142.445c-0.132-3.064-0.394-6.095-0.779-9.087l7.271-12.835-0.117 53.333-7.183-12.743c0.399-3.046 0.67-6.131 0.806-9.252l236.467 142.383c19.538-24.648 49.741-40.457 83.636-40.457 58.91 0 106.667 47.756 106.667 106.667s-47.756 106.667-106.667 106.667c-58.91 0-106.667-47.756-106.667-106.667 0-1.775 0.043-3.539 0.129-5.293l-236.19-142.216c-19.528 24.867-49.868 40.841-83.939 40.841-58.91 0-106.667-47.756-106.667-106.667s47.756-106.667 106.667-106.667c34.091 0 64.447 15.993 83.974 40.886zM234.667 554.667c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667c-23.564 0-42.667 19.103-42.667 42.667s19.103 42.667 42.667 42.667zM661.333 341.333c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667c-23.564 0-42.667 19.103-42.667 42.667s19.103 42.667 42.667 42.667zM661.333 768c23.564 0 42.667-19.103 42.667-42.667s-19.103-42.667-42.667-42.667c-23.564 0-42.667 19.103-42.667 42.667s19.103 42.667 42.667 42.667z"},onClick:e._openShareOverlay.bind(e)})}))}},{key:"_openShareOverlay",value:function(){var e=this;if(this.player.paused||(this.player.pause(),this._wasPlayed=!0),this.dispatchEvent(B),this.config.useNative&&navigator.share){var t=this._getVideoDesc();navigator.share({title:"Check out ".concat(t),text:"Check out ".concat(t),url:this.config.shareUrl}).then((function(){return e.logger.debug("Successful sharing")})).catch((function(t){return e.logger.error("Failed sharing",t)}))}else this._setOverlay(this.player.ui.addComponent({label:"info-overlay",area:"GuiArea",presets:[Gt.Playback,Gt.Live],get:function(){return p(dt,{onClose:e._closeShareOverlay.bind(e),config:e.config})}}))}},{key:"_closeShareOverlay",value:function(){this._removeOverlay(),this._wasPlayed&&(this.player.play(),this._wasPlayed=!1)}},{key:"_setOverlay",value:function(e){this._removeOverlay(),this._removeActiveOverlay=e}},{key:"_removeOverlay",value:function(){this._removeActiveOverlay&&(this._removeActiveOverlay(),this._removeActiveOverlay=null)}},{key:"_filterNonDisplayShareOptions",value:function(){var e=this;this.config.shareOptions=Object.keys(this.config.shareOptions).filter((function(t){return e.config.shareOptions[t].display})).reduce((function(t,n){return t[n]=e.config.shareOptions[n],t}),{})}},{key:"updateConfig",value:function(e){xt(Ft(a.prototype),"updateConfig",this).call(this,e),this._filterNonDisplayShareOptions()}},{key:"reset",value:function(){this._closeShareOverlay()}},{key:"destroy",value:function(){this._removeOverlay(),this.player.getService("upperBarManager").remove(this.iconId)}}])&&Nt(t.prototype,n),i&&Nt(t,i),Object.defineProperty(t,"prototype",{writable:!1}),a}(c.BasePlugin);Ht=zt,jt={useNative:!1,embedUrl:"{embedBaseUrl}/p/{partnerId}/embedPlaykitJs/uiconf_id/{uiConfId}?iframeembed=true&entry_id={entryId}",enableTimeOffset:!0,enableClipping:!0},(Vt=Bt(Vt="defaultConfig"))in Ht?Object.defineProperty(Ht,Vt,{value:jt,enumerable:!0,configurable:!0,writable:!0}):Ht[Vt]=jt;var Xt="1.2.1",qt="@playkit-js/share";Object(c.registerPlugin)(Kt,zt)}]);

/*! For license information please see playkit-transcript.js.LICENSE.txt */
var KalturaPlayer;(()=>{var e={1972:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Button=t.ButtonType=t.ButtonSize=void 0;var a,s,l=r(4522),c=r(42),u=r(2052),p=r(979),d=r(4820),h=r(7538),f=u.ui.Components.Tooltip;!function(e){e.small="small",e.medium="medium",e.large="large"}(a=t.ButtonSize||(t.ButtonSize={})),function(e){e.primary="primary",e.danger="danger",e.translucent="translucent",e.borderless="borderless"}(s=t.ButtonType||(t.ButtonType={}));var g=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.buttonRef=(0,l.createRef)(),t.renderButton=function(){var e,r=t.props,n=c(h.button,h[r.size],h[r.type],r.className,((e={})[h.disabled]=r.disabled,e[h.withIcon]=r.children&&r.icon,e[h.iconOnly]=!r.children&&r.icon,e)),o=i(i(i(i({ref:t.buttonRef,disabled:r.disabled,"aria-disabled":r.disabled,tabIndex:r.tabIndex,className:n},r.ariaLabel?{"aria-label":r.ariaLabel}:{}),r.testId?{"data-testid":r.testId}:{}),r.onFocus?{onFocus:r.onFocus}:{}),r.onBlur?{onBlur:r.onBlur}:{}),a=(0,l.h)("button",i({},o),(0,l.h)(l.Fragment,null,r.icon&&(0,l.h)(d.Icon,{name:r.icon,size:d.IconSize[r.size]}),r.children&&(0,l.h)("span",null,r.children)));return r.onClick?(0,l.h)(p.A11yWrapper,{onClick:r.onClick},a):a},t}return o(t,e),t.prototype.componentDidMount=function(){var e;this.props.setRef&&this.props.setRef(this.buttonRef.current),this.props.focusOnMount&&(null===(e=this.buttonRef.current)||void 0===e||e.focus())},t.prototype.render=function(e){if(e.tooltip){var t=i(i({label:e.tooltip.label},e.tooltip.type?{type:e.tooltip.type}:{}),e.tooltip.className?{classNames:e.tooltip.className}:{});return(0,l.h)(f,i({},t),this.renderButton())}return this.renderButton()},t}(l.Component);t.Button=g,g.defaultProps={disabled:!1,focusOnMount:!1,tabIndex:0,children:null,size:a.medium,icon:null,type:s.primary}},178:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.InputField=void 0;var a=r(4522),s=r(979),l=r(7998),c=function(e){function t(t){var r=e.call(this,t)||this;return r.state={active:!1},r._inputRef=null,r.setFocus=function(e){var t;null===(t=r._inputRef)||void 0===t||t.focus(e)},r._handleOnChange=function(e){r.props.onChange(e.target.value)},r._onClear=function(){var e;null===(e=r._inputRef)||void 0===e||e.focus(),r.props.onChange("")},r._onFocus=function(){r.setState({active:!0})},r._onBlur=function(){r.setState({active:!1})},r._goToNextSearchResult=function(){var e=r.props.searchResults,t=e.activeSearchIndex,n=e.totalSearchResults,o=e.onSearchIndexChange;0!==n&&o(t!==n?t+1:1)},r._goToPrevSearchResult=function(){var e=r.props.searchResults,t=e.activeSearchIndex,n=e.totalSearchResults;(0,e.onSearchIndexChange)(1!==t?t-1:n)},r._renderSearchResults=function(){return(0,a.h)(a.Fragment,null,(0,a.h)("div",{className:l.searchResults,"aria-live":"polite","aria-label":r.props.searchResults.searchResultsLabel},"".concat(r.props.searchResults.totalSearchResults>0?"".concat(r.props.searchResults.activeSearchIndex,"/").concat(r.props.searchResults.totalSearchResults):"0/0")),(0,a.h)("div",{className:l.prevNextWrapper},r.props.value&&(0,a.h)(s.A11yWrapper,{onClick:r._goToPrevSearchResult},(0,a.h)("button",{tabIndex:0,className:"".concat(l.prevNextButton," ").concat(0===r.props.searchResults.totalSearchResults?l.disabled:""),"aria-label":r.props.searchResults.prevMatchLabel},(0,a.h)("svg",{width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{d:"M0.292893 4.70711C0.653377 5.06759 1.22061 5.09532 1.6129 4.7903L1.70711 4.70711L4 2.415L6.29289 4.70711C6.65338 5.06759 7.22061 5.09532 7.6129 4.7903L7.70711 4.70711C8.06759 4.34662 8.09532 3.77939 7.7903 3.3871L7.70711 3.29289L4.70711 0.292893C4.34662 -0.0675907 3.77939 -0.0953203 3.3871 0.209705L3.29289 0.292893L0.292893 3.29289C-0.0976311 3.68342 -0.0976311 4.31658 0.292893 4.70711Z",fill:"white","fill-opacity":"0.7"})))),r.props.value&&(0,a.h)(s.A11yWrapper,{onClick:r._goToNextSearchResult},(0,a.h)("button",{tabIndex:0,className:"".concat(l.prevNextButton," ").concat(0===r.props.searchResults.totalSearchResults?l.disabled:""),"aria-label":r.props.searchResults.nextMatchLabel},(0,a.h)("svg",{width:"8",height:"5",viewBox:"0 0 8 5",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0.292893 0.292893C0.683417 -0.0976311 1.31658 -0.0976311 1.70711 0.292893L4 2.58579L6.29289 0.292893C6.68342 -0.0976311 7.31658 -0.0976311 7.70711 0.292893C8.09763 0.683417 8.09763 1.31658 7.70711 1.70711L4.70711 4.70711C4.31658 5.09763 3.68342 5.09763 3.29289 4.70711L0.292893 1.70711C-0.0976311 1.31658 -0.0976311 0.683417 0.292893 0.292893Z",fill:"white","fill-opacity":"0.7"}))))))},r._renderClearSearch=function(){return(0,a.h)(s.A11yWrapper,{onClick:r._onClear},(0,a.h)("button",{className:l.clearIcon,tabIndex:0,"aria-label":r.props.clearSearchLabel},(0,a.h)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,a.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6 12C9.31371 12 12 9.31371 12 6C12 2.68629 9.31371 0 6 0C2.68629 0 0 2.68629 0 6C0 9.31371 2.68629 12 6 12ZM3.38951 2.3502L3.46013 2.41264L5.99548 4.9504L8.53067 2.41264L8.60129 2.3502C8.89537 2.12125 9.32081 2.1418 9.59133 2.41199C9.8844 2.70471 9.88469 3.17958 9.59197 3.47265L7.05523 6.01165L9.59197 8.55189C9.88469 8.84496 9.8844 9.31983 9.59133 9.61255C9.32081 9.88275 8.89537 9.90329 8.60129 9.67434L8.53067 9.61191L5.99548 7.0729L3.46013 9.61191L3.38951 9.67434C3.09543 9.90329 2.66999 9.88275 2.39947 9.61255C2.1064 9.31983 2.10611 8.84496 2.39883 8.55189L4.93498 6.01165L2.39883 3.47265C2.10611 3.17958 2.1064 2.70471 2.39947 2.41199C2.66999 2.1418 3.09543 2.12125 3.38951 2.3502Z",fill:"white","fill-opacity":"0.7"}))))},r.state={active:!1},r}return o(t,e),t.prototype.render=function(){var e=this,t={className:l.inputElement,value:this.props.value,onInput:this._handleOnChange,onFocus:this._onFocus,onBlur:this._onBlur,tabIndex:0,ref:function(t){e._inputRef=t}};return this.props.placeholder&&(t["aria-label"]=this.props.placeholder,t.placeholder=this.props.placeholder),(0,a.h)("div",{className:[l.inputFieldWrapper,this.props.value||this.state.active?l.active:""].join(" ")},(0,a.h)("input",i({},t)),this.props.value&&this.props.clearSearchLabel&&this._renderClearSearch(),this.props.value&&this.props.searchResults&&this._renderSearchResults())},t}(a.Component);t.InputField=c},979:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.A11yWrapper=t.isKeyboardEvent=void 0;var n=r(4522),o=r(2052).ui.utils.KeyMap,i=o.ENTER,a=o.SPACE,s=o.UP,l=o.DOWN,c=o.LEFT,u=o.RIGHT,p=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 r=e.children,o=e.onClick,d=e.onUpKeyPressed,h=e.onDownKeyPressed,f=e.onLeftKeyPressed,g=e.onRightKeyPressed,m=e.role,_=e.type,y={onKeyDown:function(e){e.keyCode===a||e.keyCode===i?(p(e),o(e,!0)):e.keyCode===s&&d?(p(e),d(e)):e.keyCode===l&&h?(p(e),h(e)):e.keyCode===c&&f?(p(e),f(e)):e.keyCode===u&&g&&(p(e),g(e))},onClick:function(e){o(e,(0,t.isKeyboardEvent)(e))},role:m};return"button"===(null==r?void 0:r.type)&&(y.type=_||"button"),(0,n.cloneElement)(r,y)},t.A11yWrapper.defaultProps={role:"button"}},9695:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Add=void 0;var n=r(4522);t.Add=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M21.8083 4C22.4665 4 23 4.55964 23 5.25V18.75C23 19.4404 22.4665 20 21.8083 20H2.19167C1.53353 20 1 19.4404 1 18.75V5.25C1 4.55964 1.53353 4 2.19167 4H21.8083ZM15 6H3V18H15V6ZM12.999 8.967L13 9L12.998 8.94L12.999 8.967L13 9V15C13 15.5523 12.5523 16 12 16C11.4872 16 11.0645 15.614 11.0067 15.1166L11 15V11.414L6.70711 15.7071C6.34662 16.0676 5.77939 16.0953 5.3871 15.7903L5.29289 15.7071C4.93241 15.3466 4.90468 14.7794 5.2097 14.3871L5.29289 14.2929L9.584 10H6C5.48716 10 5.06449 9.61396 5.00673 9.11662L5 9C5 8.44772 5.44772 8 6 8L12.0193 8.00018C12.0427 8.00063 12.066 8.00189 12.0893 8.00397C12.1097 8.00575 12.1294 8.0081 12.149 8.01102C12.1659 8.01363 12.1834 8.0167 12.2007 8.02024C12.2227 8.02464 12.2444 8.02983 12.2658 8.03572C12.2815 8.0401 12.2969 8.04473 12.3121 8.04974C12.3318 8.05612 12.3516 8.06332 12.3711 8.0711L12.4232 8.09367C12.4439 8.10338 12.4643 8.11379 12.4843 8.12488C12.4964 8.1315 12.5086 8.13861 12.5207 8.146C12.5463 8.16172 12.5711 8.17849 12.5952 8.19631L12.6525 8.24221L12.6167 8.21279C12.6802 8.26255 12.7374 8.31982 12.7872 8.38325C12.7927 8.39016 12.7982 8.3974 12.8037 8.40469C12.8215 8.42887 12.8383 8.45372 12.8539 8.47934L12.8753 8.51594C12.8862 8.53571 12.8966 8.55611 12.9063 8.5769L12.9288 8.62866C12.9367 8.64842 12.9439 8.6682 12.9505 8.68826C12.9553 8.70315 12.9599 8.71854 12.9642 8.73401C12.9702 8.75556 12.9754 8.77725 12.9798 8.79921C12.9833 8.81662 12.9864 8.83405 12.989 8.85153L12.9972 8.92482L12.998 8.94L12.999 8.967Z",fill:"white"}))}},3697:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnswerOnAir=void 0;var n=r(4522);t.AnswerOnAir=function(){return(0,n.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99999 10C7.72605 10 11.1196 10.84 11.3237 12.5079L11.3333 12.6667V13.3333C11.3333 13.6667 11.0854 13.9449 10.7648 13.9927L10.6667 14H1.33332C0.99999 14 0.721753 13.7521 0.673919 13.4315L0.666656 13.3333V12.6667C0.666656 10.8933 4.21999 10 5.99999 10ZM13.9533 1.99333C15.7933 4.42667 15.7867 7.64667 13.9533 10.0067C13.6967 10.3428 13.2103 10.3932 12.8794 10.1476L12.7933 10.0733L12.7733 10.0533C12.5133 9.79333 12.4667 9.38 12.68 9.08C14.0067 7.18667 14.0133 4.74 12.7 2.91333C12.48 2.60667 12.52 2.19333 12.7867 1.92667C13.1133 1.6 13.6733 1.62667 13.9533 1.99333ZM5.99999 3.33333C7.47275 3.33333 8.66666 4.52724 8.66666 6C8.66666 7.47276 7.47275 8.66667 5.99999 8.66667C4.52723 8.66667 3.33332 7.47276 3.33332 6C3.33332 4.52724 4.52723 3.33333 5.99999 3.33333ZM11.7867 4.46C12.3067 5.46667 12.3067 6.6 11.8 7.56667C11.5635 8.02089 10.9728 8.12086 10.5808 7.8178L10.5 7.74667L10.48 7.72667C10.24 7.48667 10.1867 7.13333 10.3133 6.82C10.5267 6.29333 10.5267 5.70667 10.3133 5.18C10.2025 4.90583 10.2295 4.59594 10.3898 4.36643L10.4667 4.27333L10.4733 4.26667C10.8667 3.87333 11.5333 3.96667 11.7867 4.46Z",fill:"white"}))}},6389:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowClose=void 0;var n=r(4522);t.ArrowClose=function(){return(0,n.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.5 21C5.01472 21 3 18.9853 3 16.5L3 7.5C3 5.01472 5.01472 3 7.5 3L16.5 3C18.9853 3 21 5.01472 21 7.5V16.5C21 18.9853 18.9853 21 16.5 21H7.5ZM8.625 17.625L14.25 17.625L14.3812 17.6174C14.9407 17.5524 15.375 17.0769 15.375 16.5C15.375 15.8787 14.8713 15.375 14.25 15.375L10.218 15.375L17.2955 8.2955L17.3891 8.18951C17.7322 7.74819 17.701 7.11005 17.2955 6.70451C16.8562 6.26517 16.1438 6.26517 15.7045 6.70451L8.625 13.7843L8.625 9.75L8.61743 9.6188C8.55245 9.0593 8.07694 8.625 7.5 8.625C6.87868 8.625 6.375 9.12868 6.375 9.75L6.375 15.375L6.38117 15.5429C6.46706 16.7071 7.43884 17.625 8.625 17.625Z",fill:"white"}))}},3029:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrowOpen=void 0;var n=r(4522);t.ArrowOpen=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.5 3C18.9853 3 21 5.01472 21 7.5V16.5C21 18.9853 18.9853 21 16.5 21H7.5C5.01472 21 3 18.9853 3 16.5V7.5C3 5.01472 5.01472 3 7.5 3H16.5ZM15.375 6.375H9.75L9.6188 6.38257C9.0593 6.44755 8.625 6.92306 8.625 7.5C8.625 8.12132 9.12868 8.625 9.75 8.625H13.782L6.7045 15.7045L6.61092 15.8105C6.26776 16.2518 6.29896 16.89 6.7045 17.2955C7.14384 17.7348 7.85616 17.7348 8.2955 17.2955L15.375 10.2158V14.25L15.3826 14.3812C15.4476 14.9407 15.9231 15.375 16.5 15.375C17.1213 15.375 17.625 14.8713 17.625 14.25V8.625L17.6188 8.45708C17.5329 7.29286 16.5612 6.375 15.375 6.375Z",fill:"white"}))}},960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoScroll=void 0;var n=r(4522);t.AutoScroll=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M6.29289 15.2929C6.65338 14.9324 7.22061 14.9047 7.6129 15.2097L7.70711 15.2929L12 19.585L16.2929 15.2929C16.6534 14.9324 17.2206 14.9047 17.6129 15.2097L17.7071 15.2929C18.0676 15.6534 18.0953 16.2206 17.7903 16.6129L17.7071 16.7071L12.7071 21.7071C12.3466 22.0676 11.7794 22.0953 11.3871 21.7903L11.2929 21.7071L6.29289 16.7071C5.90237 16.3166 5.90237 15.6834 6.29289 15.2929Z",fill:"white"}),(0,n.h)("path",{d:"M17.7071 8.70711C17.3466 9.06759 16.7794 9.09532 16.3871 8.7903L16.2929 8.70711L12 4.415L7.70711 8.70711C7.34662 9.06759 6.77939 9.09532 6.3871 8.79029L6.29289 8.70711C5.93241 8.34662 5.90468 7.77939 6.2097 7.3871L6.29289 7.29289L11.2929 2.29289C11.6534 1.93241 12.2206 1.90468 12.6129 2.2097L12.7071 2.29289L17.7071 7.29289C18.0976 7.68342 18.0976 8.31658 17.7071 8.70711Z",fill:"white"}),(0,n.h)("rect",{x:"10",y:"10",width:"4",height:"4",rx:"2",fill:"white"}))}},4953:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Chapter=void 0;var n=r(4522);t.Chapter=function(){return(0,n.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 4C4 3.44772 4.44772 3 5 3H11C11.5523 3 12 3.44772 12 4V13C12 13.824 11.0592 14.2944 10.4 13.8L8.6 12.45C8.24444 12.1833 7.75556 12.1833 7.4 12.45L5.6 13.8C4.94076 14.2944 4 13.824 4 13V4Z",fill:"white"}))}},5254:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Close=void 0;var n=r(4522);t.Close=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M11.6592 10.245L6.70483 5.29061C6.31701 4.9028 5.68581 4.90476 5.29528 5.29528C4.90204 5.68853 4.90267 6.31688 5.29061 6.70483L10.245 11.6592L5.29061 16.6137C4.9028 17.0015 4.90476 17.6327 5.29528 18.0232C5.68853 18.4165 6.31688 18.4158 6.70483 18.0279L11.6592 13.0735L16.6137 18.0279C17.0015 18.4157 17.6327 18.4137 18.0232 18.0232C18.4165 17.63 18.4158 17.0016 18.0279 16.6137L13.0735 11.6592L18.0279 6.70483C18.4157 6.31701 18.4137 5.68581 18.0232 5.29528C17.63 4.90204 17.0016 4.90267 16.6137 5.29061L11.6592 10.245Z",fill:"white"}))}},1577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Download=void 0;var n=r(4522);t.Download=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M17.5 6C17.5 5.44772 17.0523 5 16.5 5L16.3834 5.00673C15.886 5.06449 15.5 5.48716 15.5 6L15.4997 17.693L9.71029 12.2702C9.30721 11.8926 8.67439 11.9133 8.29683 12.3164C7.91928 12.7195 7.93998 13.3523 8.34306 13.7298L15.8164 20.7298C15.8212 20.7343 15.826 20.7387 15.8308 20.7431L15.8164 20.7298L15.9035 20.8027C15.9034 20.8026 15.9037 20.8028 15.9035 20.8027C15.9135 20.8101 15.9231 20.817 15.9333 20.824C15.956 20.8397 15.9793 20.8544 16.0038 20.8684C16.0148 20.8747 16.0259 20.8808 16.0366 20.8864C16.0596 20.8984 16.0832 20.9096 16.1077 20.9201C16.1223 20.9263 16.1371 20.9322 16.1515 20.9376C16.1769 20.947 16.2028 20.9555 16.2299 20.963C16.2399 20.9658 16.25 20.9684 16.2595 20.9709C16.3365 20.9899 16.4171 21 16.5 21C16.5804 21 16.6585 20.9905 16.7336 20.9725C16.7521 20.968 16.7706 20.963 16.7889 20.9576C16.8097 20.9514 16.8303 20.9444 16.8507 20.9367C16.8632 20.932 16.8756 20.9271 16.8878 20.922C16.9121 20.9118 16.936 20.9006 16.9596 20.8883C16.9735 20.8812 16.9872 20.8736 17.0007 20.8658C17.0223 20.8533 17.0434 20.84 17.0636 20.8262C17.0764 20.8174 17.0891 20.8083 17.1021 20.7985C17.1224 20.7831 17.1422 20.767 17.161 20.7504C17.1685 20.7437 17.176 20.737 17.1834 20.7301L24.6619 13.7301C25.0651 13.3527 25.086 12.7198 24.7086 12.3166L24.6172 12.2304C24.2352 11.9126 23.6674 11.9215 23.2952 12.2699L17.4997 17.694L17.5 6Z",fill:"white"}),(0,n.h)("path",{d:"M27 26C27 26.5523 26.5523 27 26 27H7C6.44772 27 6 26.5523 6 26C6 25.4477 6.44772 25 7 25H26C26.5523 25 27 25.4477 27 26Z",fill:"white"}))}},2942:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Expand=void 0;var n=r(4522);t.Expand=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M20.997 3.924L20.998 3.945L20.999 3.98L21 4V10C21 10.5523 20.5523 11 20 11C19.4872 11 19.0645 10.614 19.0067 10.1166L19 10V6.416L14.7071 10.7071C14.3466 11.0676 13.7794 11.0953 13.3871 10.7903L13.2929 10.7071C12.9324 10.3466 12.9047 9.77939 13.2097 9.3871L13.2929 9.29289L17.586 5H14C13.4872 5 13.0645 4.61396 13.0067 4.11662L13 4C13 3.48716 13.386 3.06449 13.8834 3.00673L14 3L20.0332 3.00054C20.0503 3.00109 20.0683 3.00216 20.0862 3.0037C20.1079 3.00553 20.1285 3.00797 20.149 3.01102C20.166 3.01363 20.1834 3.0167 20.2007 3.02024C20.2227 3.02464 20.2444 3.02983 20.2658 3.03572C20.2815 3.0401 20.2969 3.04473 20.3121 3.04974C20.3318 3.05612 20.3516 3.06332 20.3711 3.0711L20.4232 3.09367C20.4439 3.10338 20.4643 3.11379 20.4843 3.12488C20.4964 3.1315 20.5086 3.13861 20.5207 3.146C20.5463 3.16172 20.5711 3.17849 20.5952 3.19631L20.6525 3.24221L20.6168 3.21279C20.6802 3.26255 20.7374 3.31982 20.7872 3.38325C20.7927 3.39016 20.7982 3.3974 20.8037 3.40469C20.8215 3.42887 20.8383 3.45373 20.8539 3.47934L20.8753 3.51594C20.8862 3.53571 20.8966 3.55611 20.9063 3.5769L20.9288 3.62866C20.9367 3.64842 20.9439 3.6682 20.9505 3.68826C20.9553 3.70315 20.9599 3.71854 20.9642 3.73401C20.9702 3.75556 20.9754 3.77725 20.9798 3.79921C20.9833 3.81662 20.9864 3.83405 20.989 3.85153L20.996 3.91075L20.996 3.919L20.997 3.921V3.924ZM3.002 20.059V20.071L3.00175 20.0593C3.00122 20.0503 3.00081 20.0413 3.00052 20.0323L3 14C3 13.4477 3.44772 13 4 13C4.51284 13 4.93551 13.386 4.99327 13.8834L5 14V17.586L9.29289 13.2929C9.65338 12.9324 10.2206 12.9047 10.6129 13.2097L10.7071 13.2929C11.0676 13.6534 11.0953 14.2206 10.7903 14.6129L10.7071 14.7071L6.416 19H10C10.5128 19 10.9355 19.386 10.9933 19.8834L11 20C11 20.5128 10.614 20.9355 10.1166 20.9933L10 21H4C3.99354 21 3.98709 20.9999 3.98066 20.9998C3.95732 20.9994 3.93401 20.9981 3.91075 20.996C3.89031 20.9943 3.87058 20.9919 3.85104 20.989C3.83405 20.9864 3.81662 20.9833 3.79927 20.9798C3.77725 20.9754 3.75556 20.9702 3.73416 20.9643C3.71854 20.9599 3.70315 20.9553 3.68786 20.9503C3.6682 20.9439 3.64842 20.9367 3.62894 20.9289L3.57678 20.9063C3.55611 20.8966 3.53571 20.8862 3.51572 20.8751C3.50361 20.8685 3.49139 20.8614 3.47929 20.854C3.45373 20.8383 3.42887 20.8215 3.40484 20.8037L3.34745 20.7578L3.38325 20.7872C3.31982 20.7374 3.26255 20.6802 3.21279 20.6168C3.20728 20.6098 3.20175 20.6026 3.19633 20.5953C3.17849 20.5711 3.16172 20.5463 3.14607 20.5207L3.12467 20.4841C3.11379 20.4643 3.10338 20.4439 3.09365 20.4231L3.07123 20.3713C3.06332 20.3516 3.05612 20.3318 3.04955 20.3117C3.04473 20.2969 3.0401 20.2815 3.03585 20.266C3.02983 20.2444 3.02464 20.2227 3.02017 20.2008C3.0167 20.1834 3.01363 20.1659 3.01102 20.1485L3.0037 20.0862L3.002 20.059Z",fill:"white"}))}},3057:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Hotspot=void 0;var n=r(4522);t.Hotspot=function(){return(0,n.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M6.5 2C6.11537 2 5.79837 2.28953 5.75505 2.66253L5.75 2.75V3.5C5.75 3.91421 6.08579 4.25 6.5 4.25C6.88463 4.25 7.20163 3.96047 7.24495 3.58747L7.25 3.5V2.75C7.25 2.33579 6.91421 2 6.5 2ZM11.7955 3.8295C11.5235 3.55753 11.0946 3.53811 10.8003 3.77123L10.7348 3.8295L10.2045 4.35984C9.91161 4.65273 9.91161 5.1276 10.2045 5.4205C10.4765 5.69247 10.9054 5.71189 11.1997 5.47878L11.2652 5.4205L11.7955 4.89016C12.0884 4.59727 12.0884 4.1224 11.7955 3.8295ZM3.4545 12.1705C3.72648 12.4425 4.15536 12.4619 4.44975 12.2288L4.51516 12.1705L5.0455 11.6402C5.33839 11.3473 5.33839 10.8724 5.0455 10.5795C4.77352 10.3075 4.34464 10.2881 4.05025 10.5212L3.98484 10.5795L3.4545 11.1098C3.16161 11.4027 3.16161 11.8776 3.4545 12.1705ZM6.53592 6.98358C6.65797 6.61718 7.05316 6.41577 7.4186 6.53371L13.5234 8.50394C13.6272 8.53745 13.7214 8.59497 13.7983 8.67186C14.0693 8.94255 14.0669 9.38382 13.793 9.65748L12.8998 10.5499C12.7787 10.6708 12.7713 10.8642 12.8828 10.9915L13.6084 11.8185C14.0177 12.3362 13.9793 13.0939 13.4958 13.5769L13.4659 13.6069C12.9452 14.127 12.1056 14.1316 11.5906 13.6171L10.9802 12.9207C10.8554 12.7952 10.6516 12.7959 10.525 12.9224L9.66058 13.786C9.58277 13.8638 9.48795 13.9223 9.38376 13.957C9.01702 14.0789 8.624 13.8818 8.50593 13.5167L6.53356 7.41792C6.48802 7.27709 6.48885 7.12492 6.53592 6.98358ZM3.5 5.75C3.91421 5.75 4.25 6.08579 4.25 6.5C4.25 6.91421 3.91421 7.25 3.5 7.25H2.75C2.33579 7.25 2 6.91421 2 6.5C2 6.08579 2.33579 5.75 2.75 5.75H3.5Z",fill:"white"}))}},1861:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icons=void 0;var n=r(5254),o=r(9919),i=r(1577),a=r(7024),s=r(8835),l=r(1223),c=r(7858),u=r(6563),p=r(2489),d=r(9695),h=r(756),f=r(4726),g=r(2942),m=r(3029),_=r(6389),y=r(4953),v=r(3057),b=r(3697),A=r(9209),C=r(960);t.Icons={close:n.Close,print:o.Print,download:i.Download,related:a.Related,message:s.Message,share:l.Share,more:c.More,quiz:u.QuizIcon,switch:p.Switch,add:d.Add,minimizedVideo:h.MinimizedVideo,pictureInPicture:f.PictureInPicture,expand:g.Expand,arrowOpen:m.ArrowOpen,arrowClose:_.ArrowClose,chapter:y.Chapter,hotspot:v.Hotspot,answerOnAir:b.AnswerOnAir,screenRotation:A.ScreenRotation,autoScroll:C.AutoScroll}},8835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=void 0;var n=r(4522);t.Message=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M25 5C27.2091 5 29 6.75035 29 8.90952V18.6833C29 20.8425 27.2091 22.5928 25 22.5928H14.985L10.7019 26.7188C10.546 26.8689 10.3449 26.9641 10.1302 26.9917L10 27C9.44772 27 9 26.5624 9 26.0226V22.5928H7C4.79086 22.5928 3 20.8425 3 18.6833V8.90952C3 6.75035 4.79086 5 7 5H25ZM25 6.95476H7C5.89543 6.95476 5 7.82994 5 8.90952V18.6833C5 19.7629 5.89543 20.6381 7 20.6381H11V23.687L14.1651 20.6381H25C26.1046 20.6381 27 19.7629 27 18.6833V8.90952C27 7.82994 26.1046 6.95476 25 6.95476ZM19 14.7738C19.5523 14.7738 20 15.2114 20 15.7512C20 16.291 19.5523 16.7286 19 16.7286H10C9.44772 16.7286 9 16.291 9 15.7512C9 15.2114 9.44772 14.7738 10 14.7738H19ZM23 10.8643C23.5523 10.8643 24 11.3019 24 11.8417C24 12.3815 23.5523 12.819 23 12.819H10C9.44772 12.819 9 12.3815 9 11.8417C9 11.3019 9.44772 10.8643 10 10.8643H23Z",fill:"white"}))}},756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MinimizedVideo=void 0;var n=r(4522);t.MinimizedVideo=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.25 4.5H18.75C19.9926 4.5 21 5.50736 21 6.75V17.25C21 18.4926 19.9926 19.5 18.75 19.5H5.25C4.00736 19.5 3 18.4926 3 17.25V6.75C3 5.50736 4.00736 4.5 5.25 4.5ZM5.25 6C4.83579 6 4.5 6.33579 4.5 6.75V17.25C4.5 17.6642 4.83579 18 5.25 18H18.75C19.1642 18 19.5 17.6642 19.5 17.25V6.75C19.5 6.33579 19.1642 6 18.75 6H5.25ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},7858:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.More=void 0;var n=r(4522);t.More=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M8 12C8 13.1046 7.10457 14 6 14C4.89543 14 4 13.1046 4 12C4 10.8954 4.89543 10 6 10C7.10457 10 8 10.8954 8 12ZM14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12ZM20 12C20 13.1046 19.1046 14 18 14C16.8954 14 16 13.1046 16 12C16 10.8954 16.8954 10 18 10C19.1046 10 20 10.8954 20 12Z",fill:"white"}))}},4726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PictureInPicture=void 0;var n=r(4522);t.PictureInPicture=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M18.75 4.5H5.25C4.00736 4.5 3 5.50736 3 6.75V17.25C3 18.4926 4.00736 19.5 5.25 19.5H18.75C19.9926 19.5 21 18.4926 21 17.25V6.75C21 5.50736 19.9926 4.5 18.75 4.5ZM13 12C12.4477 12 12 12.4477 12 13V15.5C12 16.0523 12.4477 16.5 13 16.5H17C17.5523 16.5 18 16.0523 18 15.5V13C18 12.4477 17.5523 12 17 12H13Z",fill:"white"}))}},9919:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Print=void 0;var n=r(4522);t.Print=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M23 23H26C27.1046 23 28 22.1046 28 21V11C28 9.89543 27.1046 9 26 9H23V5C23 3.89543 22.1046 3 21 3H11C9.89543 3 9 3.89543 9 5V9H6C4.89543 9 4 9.89543 4 11V21C4 22.1046 4.89543 23 6 23H9V28C9 29.1046 9.89543 30 11 30H21C22.1046 30 23 29.1046 23 28V23ZM6 11V21H9V19C8.44772 19 8 18.5523 8 18C8 17.4477 8.44772 17 9 17H23C23.5523 17 24 17.4477 24 18C24 18.5523 23.5523 19 23 19V21H26V11H6ZM21 9V5H11V9H21ZM11 19V28H21V19H11Z",fill:"white"}))}},6563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuizIcon=void 0;var n=r(4522);t.QuizIcon=function(){return(0,n.h)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.49857 2.11499L12.7442 4.2052C12.9162 4.28987 12.9812 4.48721 12.8895 4.64597C12.8594 4.69807 12.8145 4.74163 12.7597 4.77201L8.54484 7.10634C8.20953 7.29205 7.79063 7.29205 7.45532 7.10634L3.2405 4.77202C3.07335 4.67945 3.01915 4.47933 3.11944 4.32505C3.15235 4.27441 3.19956 4.23299 3.256 4.2052L7.50203 2.11498C7.81345 1.96167 8.18715 1.96168 8.49857 2.11499ZM14 6.02878V10.7642C14 11.1075 13.8049 11.4256 13.486 11.6022L9.24043 13.9536C9.07328 14.0461 8.85649 13.9961 8.7562 13.8418C8.72329 13.7912 8.7059 13.7333 8.7059 13.6742V8.93882C8.7059 8.59551 8.90104 8.27738 9.21997 8.10075L13.4655 5.74942C13.6326 5.65685 13.8494 5.70688 13.9497 5.86116C13.9826 5.91179 14 5.96973 14 6.02878ZM6.5145 8.31192L2.50483 6.04476C2.45303 6.01547 2.39375 6 2.33333 6C2.14924 6 2 6.14064 2 6.31412V10.88C2 11.211 2.1843 11.5178 2.4855 11.6881L6.49517 13.9552C6.54697 13.9845 6.60625 14 6.66667 14C6.85076 14 7 13.8594 7 13.6859V9.12C7 8.78898 6.8157 8.48223 6.5145 8.31192Z",fill:"white"}))}},7024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Related=void 0;var n=r(4522);t.Related=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 7H12C13.1046 7 14 7.89543 14 9V13C14 14.1046 13.1046 15 12 15H8C6.89543 15 6 14.1046 6 13V9C6 7.89543 6.89543 7 8 7ZM8 13H12V9H8V13Z",fill:"white"}),(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 18H12C13.1046 18 14 18.8954 14 20V24C14 25.1046 13.1046 26 12 26H8C6.89543 26 6 25.1046 6 24V20C6 18.8954 6.89543 18 8 18ZM8 24H12V20H8V24Z",fill:"white"}),(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 7H20C18.8954 7 18 7.89543 18 9V13C18 14.1046 18.8954 15 20 15H24C25.1046 15 26 14.1046 26 13V9C26 7.89543 25.1046 7 24 7ZM24 13H20V9H24V13Z",fill:"white"}),(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 18H24C25.1046 18 26 18.8954 26 20V24C26 25.1046 25.1046 26 24 26H20C18.8954 26 18 25.1046 18 24V20C18 18.8954 18.8954 18 20 18ZM20 24H24V20H20V24Z",fill:"white"}))}},9209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenRotation=void 0;var n=r(4522);t.ScreenRotation=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12 3C12 2.44772 12.4477 2 13 2C17.9706 2 22 6.02944 22 11C22 11.5523 21.5523 12 21 12C20.4477 12 20 11.5523 20 11C20 7.13401 16.866 4 13 4C12.4477 4 12 3.55228 12 3ZM10.6569 7.82843L7.82843 10.6569L13.4853 16.3137L16.3137 13.4853L10.6569 7.82843ZM12.0711 6.41421C11.29 5.63317 10.0237 5.63317 9.24265 6.41421L6.41422 9.24264C5.63317 10.0237 5.63317 11.29 6.41422 12.0711L12.0711 17.7279C12.8521 18.509 14.1185 18.509 14.8995 17.7279L17.7279 14.8995C18.509 14.1184 18.509 12.8521 17.7279 12.0711L12.0711 6.41421ZM11 22C11.5523 22 12 21.5523 12 21C12 20.4477 11.5523 20 11 20C7.13401 20 4 16.866 4 13C4 12.4477 3.55228 12 3 12C2.44771 12 2 12.4477 2 13C2 17.9706 6.02944 22 11 22Z",fill:"white"}))}},1223:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Share=void 0;var n=r(4522);t.Share=function(){return(0,n.h)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M22.6667 12.6667C24.5076 12.6667 26 11.1743 26 9.33333C26 7.49238 24.5076 6 22.6667 6C20.8257 6 19.3333 7.49238 19.3333 9.33333C19.3333 9.38882 19.3347 9.44399 19.3374 9.49881L11.9575 13.9443C11.3473 13.1665 10.3987 12.6667 9.33333 12.6667C7.49238 12.6667 6 14.1591 6 16C6 17.8409 7.49238 19.3333 9.33333 19.3333C10.3981 19.3333 11.3462 18.8341 11.9564 18.057L19.3374 22.5013C19.3347 22.5561 19.3333 22.6112 19.3333 22.6667C19.3333 24.5076 20.8257 26 22.6667 26C24.5076 26 26 24.5076 26 22.6667C26 20.8257 24.5076 19.3333 22.6667 19.3333C21.6074 19.3333 20.6636 19.8274 20.053 20.5976L12.864 16.2689L12.8651 15.7324L20.0531 11.4025C20.6637 12.1727 21.6075 12.6667 22.6667 12.6667ZM22.6667 10.6667C21.9303 10.6667 21.3333 10.0697 21.3333 9.33333C21.3333 8.59695 21.9303 8 22.6667 8C23.403 8 24 8.59695 24 9.33333C24 10.0697 23.403 10.6667 22.6667 10.6667ZM9.33333 17.3333C8.59695 17.3333 8 16.7364 8 16C8 15.2636 8.59695 14.6667 9.33333 14.6667C10.0697 14.6667 10.6667 15.2636 10.6667 16C10.6667 16.7364 10.0697 17.3333 9.33333 17.3333ZM21.3333 22.6667C21.3333 23.403 21.9303 24 22.6667 24C23.403 24 24 23.403 24 22.6667C24 21.9303 23.403 21.3333 22.6667 21.3333C21.9303 21.3333 21.3333 21.9303 21.3333 22.6667Z",fill:"white"}))}},2489:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Switch=void 0;var n=r(4522);t.Switch=function(){return(0,n.h)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,n.h)("path",{d:"M17.6744 9.27934L21.7563 13.3632L21.8282 13.4537L21.887 13.5492L21.9333 13.6489L21.9684 13.7556L21.9824 13.8172L21.9974 13.929L22 14L21.9897 14.1405L21.9824 14.1828L21.9535 14.2949L21.9231 14.3759L21.887 14.4508L21.8281 14.5463L21.7763 14.6137L21.7207 14.6744L17.6744 18.7207C17.3019 19.0931 16.6981 19.0931 16.3256 18.7207C15.9818 18.3769 15.9554 17.8359 16.2463 17.4617L16.3256 17.3719L18.7439 14.9536L12.9537 14.9537C12.4675 14.9537 12.0663 14.5899 12.0074 14.1196L12 14C12 13.5109 12.3682 13.1078 12.8425 13.0527L12.9537 13.0463L18.7426 13.0451L16.3256 10.6281C15.9798 10.2823 15.9551 9.73687 16.2515 9.36252L16.3256 9.27934C16.6981 8.90689 17.3019 8.90689 17.6744 9.27934ZM6.32562 5.27934C6.69807 4.90689 7.30193 4.90689 7.67438 5.27934L7.74849 5.36252C8.04493 5.73687 8.02023 6.28225 7.67438 6.6281L5.2574 9.04508L11.0463 9.04628L11.1575 9.0527C11.6318 9.10779 12 9.5109 12 10L11.9926 10.1196C11.9337 10.5899 11.5325 10.9537 11.0463 10.9537L5.25605 10.9536L7.67438 13.3719L7.75372 13.4617C8.04463 13.8359 8.01818 14.3769 7.67438 14.7207C7.30193 15.0931 6.69807 15.0931 6.32562 14.7207L2.25793 10.6523L2.18664 10.5668L2.12413 10.4708L2.07695 10.3759L2.03697 10.2639L2.01028 10.1405L2 10C2 9.95226 2.00351 9.90534 2.01036 9.85937L2.01758 9.81716L2.04651 9.70514L2.08932 9.59642L2.12415 9.52899L2.18631 9.43351L2.24369 9.36325L6.32562 5.27934Z",fill:"white"}))}},4820:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=t.IconSize=void 0;var n,o=r(4522),i=r(42),a=r(1861),s=r(3278);!function(e){e.small="small",e.medium="medium",e.large="large"}(n=t.IconSize||(t.IconSize={})),t.Icon=function(e){var t=a.Icons[e.name];return t?(0,o.h)("div",{className:i(s.iconWrapper,s[e.size])},(0,o.h)(t,null)):null},t.Icon.defaultProps={size:n.medium}},42:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r)){if(r.length){var a=o.apply(null,r);a&&e.push(a)}}else if("object"===i){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){e.push(r.toString());continue}for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},6298:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".Button__button___NM3Vl{display:flex;justify-content:center;align-items:center;flex-wrap:nowrap;font-weight:700;border:1px solid rgba(0,0,0,0);border-radius:4px;cursor:pointer}.Button__button___NM3Vl.Button__primary___vkWyL{background-color:var(--playkit-primary-color);color:var(--playkit-primary-text-contrast-color)}.Button__button___NM3Vl.Button__primary___vkWyL:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-primary-darker-color)}.Button__button___NM3Vl.Button__primary___vkWyL:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-primary-brighter-color)}.Button__button___NM3Vl.Button__danger___lCKPq{background-color:var(--playkit-danger-color);color:var(--playkit-danger-text-contrast-color)}.Button__button___NM3Vl.Button__danger___lCKPq:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-danger-darker-color)}.Button__button___NM3Vl.Button__danger___lCKPq:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-danger-brighter-color)}.Button__button___NM3Vl.Button__translucent___nSc5h{background-color:rgba(0,0,0,.6);color:var(--playkit-primary-text-contrast-color)}.Button__button___NM3Vl.Button__borderless___sov7o{background-color:rgba(0,0,0,0);color:var(--playkit-tone-1-color)}.Button__button___NM3Vl.Button__borderless___sov7o:not(.Button__disabled___j4KjS):hover{background-color:var(--playkit-tone-4-color)}.Button__button___NM3Vl.Button__borderless___sov7o:not(.Button__disabled___j4KjS):focus{background-color:var(--playkit-tone-6-color)}.Button__button___NM3Vl.Button__small____SSTu{height:24px;font-size:13px;line-height:16px;padding:0 4px}.Button__button___NM3Vl.Button__small____SSTu.Button__withIcon___c3vxV{padding-right:8px}.Button__button___NM3Vl.Button__small____SSTu.Button__withIcon___c3vxV>span{margin-left:2px}.Button__button___NM3Vl.Button__small____SSTu.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__medium___psqY1{height:32px;font-size:14px;line-height:17px;padding:0 8px}.Button__button___NM3Vl.Button__medium___psqY1.Button__withIcon___c3vxV{padding-right:12px}.Button__button___NM3Vl.Button__medium___psqY1.Button__withIcon___c3vxV>span{margin-left:4px}.Button__button___NM3Vl.Button__medium___psqY1.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__large___ftsNW{height:40px;font-size:16px;line-height:19px;padding:0 16px}.Button__button___NM3Vl.Button__large___ftsNW.Button__withIcon___c3vxV{padding-left:12px}.Button__button___NM3Vl.Button__large___ftsNW.Button__withIcon___c3vxV>span{margin-left:4px}.Button__button___NM3Vl.Button__large___ftsNW.Button__iconOnly___dISNi{padding:0 3px}.Button__button___NM3Vl.Button__disabled___j4KjS{background-color:rgba(0,0,0,0);color:var(--playkit-tone-4-color);border-color:var(--playkit-tone-4-color);cursor:default}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/components/button/Button.scss","webpack://./../node_modules/@playkit-js/common/dist/components/variables.scss","webpack://./../node_modules/@playkit-js/common/node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAGA,wBACE,YAAA,CACA,sBAAA,CACA,kBAAA,CACA,gBAAA,CACA,eAAA,CACA,8BAAA,CACA,iBCPY,CDQZ,cAAA,CACA,gDACE,6CEVY,CFWZ,gDER0B,CFUxB,qFACE,oDEbe,CFejB,qFACE,sDEfiB,CFmBvB,+CACE,4CENW,CFOX,+CEJyB,CFMvB,oFACE,mDETc,CFWhB,oFACE,qDEXgB,CFetB,oDACE,+BAAA,CACA,gDEhC0B,CFkC5B,mDACE,8BAAA,CACA,iCEZW,CFcT,wFACE,4CEZO,CFcT,wFACE,4CEbO,CFiBb,8CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,uEACE,iBAAA,CACA,4EACE,eAAA,CAGJ,uEACE,aAAA,CAGJ,+CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,aAAA,CACA,wEACE,kBAAA,CACA,6EACE,eAAA,CAGJ,wEACE,aAAA,CAGJ,8CACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,cAAA,CACA,uEACE,iBAAA,CACA,4EACE,eAAA,CAGJ,uEACE,aAAA,CAGJ,iDACE,8BAAA,CACA,iCElEW,CFmEX,wCEnEW,CFoEX,cAAA",sourcesContent:["@import '../variables.scss';\n\n// https://www.figma.com/file/GYMv1jsthckOnKmCrdQJY3/%E2%8F%AF-Player-v7-(Guidelines)?node-id=21%3A1943&t=ywdMo875C6kzd7pN-0\n.button {\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  flex-wrap: nowrap;\n  font-weight: 700;\n  border: 1px solid transparent;\n  border-radius: $roundness-1;\n  cursor: pointer;\n  &.primary {\n    background-color: $primary-color;\n    color: $primary-text-contrast-color;\n    &:not(.disabled) {\n      &:hover {\n        background-color: $primary-darker-color;\n      }\n      &:focus {\n        background-color: $primary-brighter-color;\n      }\n    }\n  }\n  &.danger {\n    background-color: $danger-color;\n    color: $danger-text-contrast-color;\n    &:not(.disabled) {\n      &:hover {\n        background-color: $danger-darker-color;\n      }\n      &:focus {\n        background-color: $danger-brighter-color;\n      }\n    }\n  }\n  &.translucent {\n    background-color: rgba(0, 0, 0, 0.6);\n    color: $primary-text-contrast-color;\n  }\n  &.borderless {\n    background-color: transparent;\n    color: $tone-1-color;\n    &:not(.disabled) {\n      &:hover {\n        background-color: $tone-4-color;\n      }\n      &:focus {\n        background-color: $tone-6-color;\n      }\n    }\n  }\n  &.small {\n    height: 24px;\n    font-size: 13px;\n    line-height: 16px;\n    padding: 0 4px;\n    &.withIcon {\n      padding-right: 8px;\n      > span {\n        margin-left: 2px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.medium {\n    height: 32px;\n    font-size: 14px;\n    line-height: 17px;\n    padding: 0 8px;\n    &.withIcon {\n      padding-right: 12px;\n      > span {\n        margin-left: 4px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.large {\n    height: 40px;\n    font-size: 16px;\n    line-height: 19px;\n    padding: 0 16px;\n    &.withIcon {\n      padding-left: 12px;\n      > span {\n        margin-left: 4px;\n      }\n    }\n    &.iconOnly {\n      padding: 0 3px;\n    }\n  }\n  &.disabled {\n    background-color: transparent;\n    color: $tone-4-color;\n    border-color: $tone-4-color;\n    cursor: default;\n  }\n}\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n// colors\n$white: #ffffff;\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={button:"Button__button___NM3Vl",primary:"Button__primary___vkWyL",disabled:"Button__disabled___j4KjS",danger:"Button__danger___lCKPq",translucent:"Button__translucent___nSc5h",borderless:"Button__borderless___sov7o",small:"Button__small____SSTu",withIcon:"Button__withIcon___c3vxV",iconOnly:"Button__iconOnly___dISNi",medium:"Button__medium___psqY1",large:"Button__large___ftsNW"};const s=a},2707:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".InputField__input-field-wrapper___K1QeS{display:flex;align-items:center;flex-grow:1;width:100%;max-width:599px;padding-right:8px;height:32px;border:solid 1px rgba(255,255,255,.4);border-radius:4px}.InputField__input-field-wrapper___K1QeS ::-moz-placeholder{opacity:1}.InputField__input-field-wrapper___K1QeS .InputField__search-results___PBRGr{display:flex;justify-content:flex-end;align-items:center;flex-shrink:0;margin:0 8px 0 6px;font-size:12px;text-overflow:ellipsis}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA{display:flex;flex-direction:column;justify-content:space-around;max-height:100%;height:100%;width:8px;flex:0 0 8px}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA .InputField__prev-next-button___HP7Me{display:flex;align-items:center;height:50%;padding:0;background-color:rgba(0,0,0,0);border:none;cursor:pointer}.InputField__input-field-wrapper___K1QeS .InputField__prev-next-wrapper___zAxBA .InputField__prev-next-button___HP7Me.InputField__disabled___GVLcH{opacity:.4;cursor:default}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE{width:100%;flex-grow:1;flex-shrink:1;font-size:15px;padding:0 6px 1px 6px;color:var(--playkit-tone-1-color);background:rgba(0,0,0,0);border:none;overflow:hidden;text-overflow:ellipsis}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE::placeholder{color:var(--playkit-tone-2-color)}.InputField__input-field-wrapper___K1QeS .InputField__input-element___BAphE::selection{background-color:var(--playkit-primary-brighter-color)}.InputField__input-field-wrapper___K1QeS .InputField__clear-icon___eTi3X{padding:0;flex:0 0 12px;max-width:12px;max-height:12px;background-color:rgba(0,0,0,0);width:12px;height:12px;outline-offset:4px;border:none;cursor:pointer}.InputField__input-field-wrapper___K1QeS:hover{border-color:#fff}.InputField__input-field-wrapper___K1QeS.InputField__active____D1qS{color:var(--playkit-tone-2-color);background:var(--playkit-tone-8-color);border-color:#fff}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/components/input-field/InputField.scss","webpack://./../node_modules/@playkit-js/common/dist/components/variables.scss","webpack://./../node_modules/@playkit-js/common/node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,yCAKE,YAAA,CACA,kBAAA,CACA,WAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,WAAA,CACA,qCAAA,CACA,iBCZY,CAAA,4DDCV,SAAA,CAYF,6EACE,YAAA,CACA,wBAAA,CACA,kBAAA,CACA,aAAA,CACA,kBAAA,CACA,cAAA,CACA,sBAAA,CAEF,gFACE,YAAA,CACA,qBAAA,CACA,4BAAA,CACA,eAAA,CACA,WAAA,CACA,SAAA,CACA,YAAA,CACA,sHACE,YAAA,CACA,kBAAA,CACA,UAAA,CACA,SAAA,CACA,8BAAA,CACA,WAAA,CACA,cAAA,CACA,mJACE,UAAA,CACA,cAAA,CAIN,4EACE,UAAA,CACA,WAAA,CACA,aAAA,CACA,cAAA,CACA,qBAAA,CACA,iCEvBW,CFwBX,wBAAA,CACA,WAAA,CACA,eAAA,CACA,sBAAA,CACA,yFACE,iCE5BS,CF8BX,uFACE,sDEzDmB,CF4DvB,yEACE,SAAA,CACA,aAAA,CACA,cAAA,CACA,eAAA,CACA,8BAAA,CACA,UAAA,CACA,WAAA,CACA,kBAAA,CACA,WAAA,CACA,cAAA,CAEF,+CACE,iBCvEI,CDyEN,oEACE,iCElDW,CFmDX,sCE7CW,CF8CX,iBC5EI",sourcesContent:["@import '../variables.scss';\n\n.input-field-wrapper {\n  ::-moz-placeholder {\n    opacity: 1;\n  }\n\n  display: flex;\n  align-items: center;\n  flex-grow: 1;\n  width: 100%;\n  max-width: 599px;\n  padding-right: 8px;\n  height: 32px;\n  border: solid 1px rgba(255, 255, 255, 0.4);\n  border-radius: $roundness-1;\n  .search-results {\n    display: flex;\n    justify-content: flex-end;\n    align-items: center;\n    flex-shrink: 0;\n    margin: 0 8px 0 6px;\n    font-size: 12px;\n    text-overflow: ellipsis;\n  }\n  .prev-next-wrapper {\n    display: flex;\n    flex-direction: column;\n    justify-content: space-around;\n    max-height: 100%;\n    height: 100%;\n    width: 8px;\n    flex: 0 0 8px;\n    .prev-next-button {\n      display: flex;\n      align-items: center;\n      height: 50%;\n      padding: 0;\n      background-color: transparent;\n      border: none;\n      cursor: pointer;\n      &.disabled {\n        opacity: 0.4;\n        cursor: default;\n      }\n    }\n  }\n  .input-element {\n    width: 100%;\n    flex-grow: 1;\n    flex-shrink: 1;\n    font-size: 15px;\n    padding: 0 6px 1px 6px;\n    color: $tone-1-color;\n    background: transparent;\n    border: none;\n    overflow: hidden;\n    text-overflow: ellipsis;\n    &::placeholder {\n      color: $tone-2-color;\n    }\n    &::selection {\n      background-color: $primary-brighter-color;\n    }\n  }\n  .clear-icon {\n    padding: 0;\n    flex: 0 0 12px;\n    max-width: 12px;\n    max-height: 12px;\n    background-color: transparent;\n    width: 12px;\n    height: 12px;\n    outline-offset: 4px;\n    border: none;\n    cursor: pointer;\n  }\n  &:hover {\n    border-color: $white;\n  }\n  &.active {\n    color: $tone-2-color;\n    background: $tone-8-color;\n    border-color: $white;\n  }\n}\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-2: 8px;\n\n// colors\n$white: #ffffff;\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={"input-field-wrapper":"InputField__input-field-wrapper___K1QeS",inputFieldWrapper:"InputField__input-field-wrapper___K1QeS","search-results":"InputField__search-results___PBRGr",searchResults:"InputField__search-results___PBRGr","prev-next-wrapper":"InputField__prev-next-wrapper___zAxBA",prevNextWrapper:"InputField__prev-next-wrapper___zAxBA","prev-next-button":"InputField__prev-next-button___HP7Me",prevNextButton:"InputField__prev-next-button___HP7Me",disabled:"InputField__disabled___GVLcH","input-element":"InputField__input-element___BAphE",inputElement:"InputField__input-element___BAphE","clear-icon":"InputField__clear-icon___eTi3X",clearIcon:"InputField__clear-icon___eTi3X",active:"InputField__active____D1qS"};const s=a},6469:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".icon__iconWrapper___O5uqn.icon__small___IddLg{width:16px;height:16px}.icon__iconWrapper___O5uqn.icon__medium___llFxB{width:24px;height:24px}.icon__iconWrapper___O5uqn.icon__large___Q96VN{width:32px;height:32px}.icon__iconWrapper___O5uqn>svg{width:100%;height:100%}","",{version:3,sources:["webpack://./../node_modules/@playkit-js/common/dist/icon/icon.scss"],names:[],mappings:"AACE,+CACE,UAAA,CACA,WAAA,CAEF,gDACE,UAAA,CACA,WAAA,CAEF,+CACE,UAAA,CACA,WAAA,CAEF,+BACE,UAAA,CACA,WAAA",sourcesContent:[".iconWrapper {\n  &.small {\n    width: 16px;\n    height: 16px;\n  }\n  &.medium {\n    width: 24px;\n    height: 24px;\n  }\n  &.large {\n    width: 32px;\n    height: 32px;\n  }\n  > svg {\n    width: 100%;\n    height: 100%;\n  }\n}\n"],sourceRoot:""}]),a.locals={iconWrapper:"icon__iconWrapper___O5uqn",small:"icon__small___IddLg",medium:"icon__medium___llFxB",large:"icon__large___Q96VN"};const s=a},9042:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".autoscroll-button__autoscroll-root___DVqxM{position:absolute;right:12px;bottom:25px;width:auto;height:32px;padding:4px}.autoscroll-button__autoscroll-button___WBkBE{opacity:0;z-index:1}.autoscroll-button__autoscroll-button___WBkBE.autoscroll-button__autoscroll-button-visible___ZHUf1{opacity:1}","",{version:3,sources:["webpack://./components/autoscroll-button/autoscroll-button.scss"],names:[],mappings:"AAEA,4CACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,UAAA,CACA,WAAA,CACA,WAAA,CAGF,8CACE,SAAA,CACA,SAAA,CACA,mGACE,SAAA",sourcesContent:["@import '../../variables.scss';\n\n.autoscroll-root {\n  position: absolute;\n  right: 12px;\n  bottom: 25px;\n  width: auto;\n  height: 32px;\n  padding: 4px;\n}\n\n.autoscroll-button {\n  opacity: 0;\n  z-index: 1;\n  &.autoscroll-button-visible {\n    opacity: 1;\n  }\n}\n"],sourceRoot:""}]),a.locals={"autoscroll-root":"autoscroll-button__autoscroll-root___DVqxM",autoscrollRoot:"autoscroll-button__autoscroll-root___DVqxM","autoscroll-button":"autoscroll-button__autoscroll-button___WBkBE",autoscrollButton:"autoscroll-button__autoscroll-button___WBkBE","autoscroll-button-visible":"autoscroll-button__autoscroll-button-visible___ZHUf1",autoscrollButtonVisible:"autoscroll-button__autoscroll-button-visible___ZHUf1"};const s=a},828:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".captionList__transcript-wrapper___Omf8T{position:absolute;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-right:9px}","",{version:3,sources:["webpack://./components/caption-list/captionList.scss"],names:[],mappings:"AAAA,yCACE,iBAAA,CACA,UAAA,CACA,YAAA,CACA,qBAAA,CACA,kBAAA,CACA,sBAAA,CACA,iBAAA",sourcesContent:[".transcript-wrapper {\n  position: absolute;\n  width: 100%;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  justify-content: center;\n  padding-right: 9px;\n}\n"],sourceRoot:""}]),a.locals={"transcript-wrapper":"captionList__transcript-wrapper___Omf8T",transcriptWrapper:"captionList__transcript-wrapper___Omf8T"};const s=a},9116:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".caption__caption___v5MZY{display:flex;justify-content:space-between;width:100%;margin-bottom:9px;margin-left:8px;color:var(--playkit-tone-1-color);cursor:pointer}.caption__caption___v5MZY .caption__caption-time___N5cw5{flex-shrink:1;min-width:48px;align-items:flex-start;margin-right:8px;padding-top:2px;text-align:right;font-size:12px;color:var(--playkit-tone-2-color)}.caption__caption___v5MZY .caption__caption-content___F1WTh{flex-grow:1;font-size:14px;line-height:18px;text-align:left;user-select:text}.caption__caption___v5MZY .caption__caption-content___F1WTh:hover .caption__caption-span___cTewu{background-color:var(--playkit-tone-6-color)}.caption__caption___v5MZY .caption__caption-content___F1WTh:hover.caption__highlighted___ikaKW .caption__caption-span___cTewu{background-color:var(--playkit-primary-darker-color);padding:0 2px}.caption__caption___v5MZY .caption__caption-content___F1WTh.caption__highlighted___ikaKW .caption__caption-span___cTewu{color:var(--playkit-primary-text-contrast-color);background-color:var(--playkit-primary-color);padding:0 2px}.caption__caption___v5MZY .caption__caption-content___F1WTh.caption__without-time___v7BWT{margin-left:16px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__caption-span___cTewu{user-select:text;-ms-user-select:text;border-radius:2px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__caption-span___cTewu::selection{background-color:var(--playkit-primary-brighter-color);padding:0 2px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__caption-span___cTewu>span::selection{background-color:var(--playkit-primary-brighter-color)}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__highlight-search___Rc4qg{color:var(--playkit-secondary-text-contrast-color);background-color:var(--playkit-secondary-color);border-radius:2px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__highlight-search___Rc4qg::selection{background-color:var(--playkit-primary-brighter-color)}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__active-search___yoZOD{color:var(--playkit-secondary-text-contrast-color);background-color:var(--playkit-primary-darker-color);border-radius:2px}.caption__caption___v5MZY .caption__caption-content___F1WTh .caption__active-search___yoZOD::selection{background-color:var(--playkit-primary-brighter-color)}","",{version:3,sources:["webpack://./components/caption/caption.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,0BACE,YAAA,CACA,6BAAA,CACA,UAAA,CACA,iBAAA,CACA,eAAA,CACA,iCCsBa,CDrBb,cAAA,CACA,yDACE,aAAA,CACA,cAAA,CACA,sBAAA,CACA,gBAAA,CACA,eAAA,CACA,gBAAA,CACA,cAAA,CACA,iCCaW,CDXb,4DACE,WAAA,CACA,cAAA,CACA,gBAAA,CACA,eAAA,CACA,gBAAA,CAEE,iGACE,4CCOO,CDJP,8HACE,oDC5Ba,CD6Bb,aAAA,CAKJ,wHACE,gDCjCsB,CDkCtB,6CCrCQ,CDsCR,aAAA,CAGJ,0FACE,gBAAA,CAEF,2FACE,gBAAA,CACA,oBAAA,CACA,iBAAA,CACA,sGACE,sDC/CiB,CDgDjB,aAAA,CAEF,2GACE,sDCnDiB,CDsDrB,+FACE,kDCjD0B,CDkD1B,+CCrDY,CDsDZ,iBAAA,CACA,0GACE,sDC3DiB,CD8DrB,4FACE,kDCzD0B,CD0D1B,oDCjEiB,CDkEjB,iBAAA,CACA,uGACE,sDCnEiB",sourcesContent:["@import '../../variables.scss';\n\n.caption {\n  display: flex;\n  justify-content: space-between;\n  width: 100%;\n  margin-bottom: 9px;\n  margin-left: 8px;\n  color: $tone-1-color;\n  cursor: pointer;\n  .caption-time {\n    flex-shrink: 1;\n    min-width: 48px;\n    align-items: flex-start;\n    margin-right: 8px;\n    padding-top: 2px;\n    text-align: right;\n    font-size: 12px;\n    color: $tone-2-color;\n  }\n  .caption-content {\n    flex-grow: 1;\n    font-size: 14px;\n    line-height: 18px;\n    text-align: left;\n    user-select: text;\n    &:hover {\n      .caption-span {\n        background-color: $tone-6-color;\n      }\n      &.highlighted {\n        .caption-span {\n          background-color: $primary-darker-color;\n          padding: 0 2px;\n        }\n      }\n    }\n    &.highlighted {\n      .caption-span {\n        color: $primary-text-contrast-color;\n        background-color: $primary-color;\n        padding: 0 2px;\n      }\n    }\n    &.without-time {\n      margin-left: 16px;\n    }\n    .caption-span {\n      user-select: text;\n      -ms-user-select: text;\n      border-radius: 2px;\n      &::selection {\n        background-color: $primary-brighter-color;\n        padding: 0 2px;\n      }\n      & > span::selection {\n        background-color: $primary-brighter-color;\n      }\n    }\n    .highlight-search {\n      color: $secondary-text-contrast-color;\n      background-color: $secondary-color;\n      border-radius: 2px;\n      &::selection {\n        background-color: $primary-brighter-color;\n      }\n    }\n    .active-search {\n      color: $secondary-text-contrast-color;\n      background-color: $primary-darker-color;\n      border-radius: 2px;\n      &::selection {\n        background-color: $primary-brighter-color;\n      }\n    }\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={caption:"caption__caption___v5MZY","caption-time":"caption__caption-time___N5cw5",captionTime:"caption__caption-time___N5cw5","caption-content":"caption__caption-content___F1WTh",captionContent:"caption__caption-content___F1WTh","caption-span":"caption__caption-span___cTewu",captionSpan:"caption__caption-span___cTewu",highlighted:"caption__highlighted___ikaKW","without-time":"caption__without-time___v7BWT",withoutTime:"caption__without-time___v7BWT","highlight-search":"caption__highlight-search___Rc4qg",highlightSearch:"caption__highlight-search___Rc4qg","active-search":"caption__active-search___yoZOD",activeSearch:"caption__active-search___yoZOD"};const s=a},6958:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".plugin-button__pluginButton___hbzoA.plugin-button__active___pVKh2{background-color:var(--playkit-tone-6-color)}","",{version:3,sources:["webpack://./components/plugin-button/plugin-button.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAGE,mEACE,4CC+BW",sourcesContent:["@import '../../variables.scss';\n\n.pluginButton {\n  &.active {\n    background-color: $tone-6-color;\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={pluginButton:"plugin-button__pluginButton___hbzoA",active:"plugin-button__active___pVKh2"};const s=a},3558:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".popover-menu__popover-anchor-container___WFlS9{cursor:pointer;border-radius:4px}.popover-menu__popover-anchor-container___WFlS9:hover{background-color:var(--playkit-tone-4-color)}.popover-menu__popover-anchor-container___WFlS9.popover-menu__active___MtUlv{background-color:var(--playkit-tone-6-color)}.popover-menu__popover-anchor-container___WFlS9 .popover-menu__popover-anchor___sJyqi{pointer-events:none}.popover-menu__popover-container___jooX_{position:relative}.popover-menu__popover-container___jooX_ .popover-menu__popover-component___lcTrW{background-color:var(--playkit-tone-7-color);border-radius:4px;display:block;font-size:15px;margin-top:6px;position:absolute;right:0px;z-index:1}.popover-menu__popover-container___jooX_ .popover-menu__popover-component___lcTrW.popover-menu__hidden___D7olL{display:none}.popover-menu__popover-container___jooX_ .popover-menu__popover-component___lcTrW.popover-menu__bottom___ep9yL{top:100%;margin-top:6px}.popover-menu__popover-container___jooX_ .popover-menu__popover-component___lcTrW.popover-menu__left___EfFuM{right:0px}.popover-menu__popover-menu-item___I24pM{align-items:center;display:flex;font-size:15px;line-height:18px;min-height:30px;padding:9px 24px 9px 16px;white-space:nowrap;margin:4px}.popover-menu__popover-menu-item___I24pM.popover-menu__popover-menu-item-disabled___IpAvq{color:var(--playkit-tone-4-color)}.popover-menu__popover-menu-item___I24pM:hover:not(.popover-menu__popover-menu-item-disabled___IpAvq){background-color:var(--playkit-tone-6-color);border-radius:4px;cursor:pointer}.popover-menu__popover-menu-item___I24pM:focus{outline:1px solid #222}.popover-menu__popover-menu___GirVB{padding-top:6px;padding-bottom:6px}","",{version:3,sources:["webpack://./components/popover-menu/popover-menu.scss","webpack://./variables.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,gDACE,cAAA,CACA,iBCDY,CDGZ,sDACE,4CE0BW,CFvBb,6EACE,4CEwBW,CFrBb,sFACE,mBAAA,CAIJ,yCACE,iBAAA,CAEA,kFACE,4CEaW,CFZX,iBCrBU,CDsBV,aAAA,CACA,cAAA,CACA,cAAA,CACA,iBAAA,CACA,SAAA,CACA,SAAA,CAEA,+GACE,YAAA,CAGF,+GACE,QAAA,CACA,cAAA,CAGF,6GACE,SAAA,CAIN,yCACE,kBAAA,CACA,YAAA,CACA,cAAA,CACA,gBAAA,CACA,eAAA,CACA,yBAAA,CACA,kBAAA,CACA,UAAA,CAEA,0FACE,iCExBW,CF2Bb,sGACE,4CE1BW,CF2BX,iBC3DU,CD4DV,cAAA,CAGF,+CACE,sBAAA,CAIJ,oCACE,eAAA,CACA,kBAAA",sourcesContent:["@import './variables.scss';\n\n.popover-anchor-container {\n  cursor: pointer;\n  border-radius: $roundness-1;\n  \n  &:hover {\n    background-color: $tone-4-color;\n  }\n  \n  &.active {\n    background-color: $tone-6-color;\n  }\n  \n  .popover-anchor {\n    pointer-events: none;\n  }\n}\n\n.popover-container {\n  position: relative;\n  \n  .popover-component {\n    background-color: $tone-7-color;\n    border-radius: $roundness-1;\n    display: block;\n    font-size: 15px;\n    margin-top: 6px;\n    position: absolute;\n    right: 0px;\n    z-index: 1;\n    \n    &.hidden {\n      display: none;\n    }\n    \n    &.bottom {\n      top: 100%;\n      margin-top: 6px;\n    }\n    \n    &.left {\n      right: 0px;\n    }\n  }\n}\n.popover-menu-item {\n  align-items: center;\n  display: flex;\n  font-size: 15px;\n  line-height: 18px;\n  min-height: 30px;\n  padding: 9px 24px 9px 16px;\n  white-space: nowrap;\n  margin: 4px;\n\n  &.popover-menu-item-disabled {\n    color: $tone-4-color;\n  }\n  \n  &:hover:not(.popover-menu-item-disabled) {\n    background-color: $tone-6-color;\n    border-radius: $roundness-1;\n    cursor: pointer;\n  }\n  \n  &:focus {\n    outline: 1px solid #222;\n  }\n}\n\n.popover-menu {\n  padding-top: 6px;\n  padding-bottom: 6px;\n}\n\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-3: 16px;\n\n@mixin plugin-scrollbar {\n  &::-webkit-scrollbar {\n    width: 4px;\n  }\n  &::-webkit-scrollbar-track {\n    background: rgba(33, 33, 33, 0.9);\n  }\n  &::-webkit-scrollbar-thumb {\n    border-radius: 3px;\n    background-color: rgba(255, 255, 255, 0.3);\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={"popover-anchor-container":"popover-menu__popover-anchor-container___WFlS9",popoverAnchorContainer:"popover-menu__popover-anchor-container___WFlS9",active:"popover-menu__active___MtUlv","popover-anchor":"popover-menu__popover-anchor___sJyqi",popoverAnchor:"popover-menu__popover-anchor___sJyqi","popover-container":"popover-menu__popover-container___jooX_",popoverContainer:"popover-menu__popover-container___jooX_","popover-component":"popover-menu__popover-component___lcTrW",popoverComponent:"popover-menu__popover-component___lcTrW",hidden:"popover-menu__hidden___D7olL",bottom:"popover-menu__bottom___ep9yL",left:"popover-menu__left___EfFuM","popover-menu-item":"popover-menu__popover-menu-item___I24pM",popoverMenuItem:"popover-menu__popover-menu-item___I24pM","popover-menu-item-disabled":"popover-menu__popover-menu-item-disabled___IpAvq",popoverMenuItemDisabled:"popover-menu__popover-menu-item-disabled___IpAvq","popover-menu":"popover-menu__popover-menu___GirVB",popoverMenu:"popover-menu__popover-menu___GirVB"};const s=a},5235:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".small-screen-slate__smallScreenWrapper___kIoD5{position:relative;width:100%;height:100%;margin-top:-8px;margin-right:-2px;display:flex;align-items:center}.small-screen-slate__smallScreenWrapper___kIoD5 .small-screen-slate__closeButton___trEe_{position:absolute;right:6px;top:0px}.small-screen-slate__smallScreenWrapper___kIoD5 .small-screen-slate__contentWrapper___m1K1A{display:flex;width:100%;flex-direction:column;justify-content:center;align-items:center}.small-screen-slate__smallScreenWrapper___kIoD5 .small-screen-slate__contentWrapper___m1K1A .small-screen-slate__textContent___IjRTd{margin-top:8px;font-size:18px;font-style:normal;font-weight:700;line-height:20px}","",{version:3,sources:["webpack://./components/small-screen-slate/small-screen-slate.scss"],names:[],mappings:"AAAA,gDACE,iBAAA,CACA,UAAA,CACA,WAAA,CACA,eAAA,CACA,iBAAA,CACA,YAAA,CACA,kBAAA,CACA,yFACE,iBAAA,CACA,SAAA,CACA,OAAA,CAEF,4FACE,YAAA,CACA,UAAA,CACA,qBAAA,CACA,sBAAA,CACA,kBAAA,CACA,qIACE,cAAA,CACA,cAAA,CACA,iBAAA,CACA,eAAA,CACA,gBAAA",sourcesContent:[".smallScreenWrapper {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  margin-top: -8px;\n  margin-right: -2px;\n  display: flex;\n  align-items: center;\n  .closeButton {\n    position: absolute;\n    right: 6px;\n    top: 0px;\n  }\n  .contentWrapper {\n    display: flex;\n    width: 100%;\n    flex-direction: column;\n    justify-content: center;\n    align-items: center;\n    .textContent {\n      margin-top: 8px;\n      font-size: 18px;\n      font-style: normal;\n      font-weight: 700;\n      line-height: 20px;\n    }\n  }\n}\n"],sourceRoot:""}]),a.locals={smallScreenWrapper:"small-screen-slate__smallScreenWrapper___kIoD5",closeButton:"small-screen-slate__closeButton___trEe_",contentWrapper:"small-screen-slate__contentWrapper___m1K1A",textContent:"small-screen-slate__textContent___IjRTd"};const s=a},7586:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".spinner__transcript-loader___SzsWJ{display:flex;flex-direction:column;height:100%;width:100%;color:var(--playkit-tone-3-color);margin:0;animation:spinner__frame-bounce___nmvI_ 2s infinite ease-in-out;overflow:hidden}.spinner__transcript-loader___SzsWJ svg{flex-shrink:0}@keyframes spinner__frame-bounce___nmvI_{0%,100%{opacity:.1}50%{opacity:.25}}","",{version:3,sources:["webpack://./components/spinner/spinner.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss"],names:[],mappings:"AAEA,oCACE,YAAA,CACA,qBAAA,CACA,WAAA,CACA,UAAA,CACA,iCCyBa,CDxBb,QAAA,CACA,+DAAA,CACA,eAAA,CACA,wCACE,aAAA,CAIJ,yCACE,QAEE,UAAA,CAEF,IACE,WAAA,CAAA",sourcesContent:["@import '../../variables.scss';\n\n.transcript-loader {\n  display: flex;\n  flex-direction: column;\n  height: 100%;\n  width: 100%;\n  color: $tone-3-color;\n  margin: 0;\n  animation: frame-bounce 2s infinite ease-in-out;\n  overflow: hidden;\n  svg {\n    flex-shrink: 0;\n  }\n}\n\n@keyframes frame-bounce {\n  0%,\n  100% {\n    opacity: 0.1;\n  }\n  50% {\n    opacity: 0.25;\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n"],sourceRoot:""}]),a.locals={"transcript-loader":"spinner__transcript-loader___SzsWJ",transcriptLoader:"spinner__transcript-loader___SzsWJ","frame-bounce":"spinner__frame-bounce___nmvI_",frameBounce:"spinner__frame-bounce___nmvI_"};const s=a},7017:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(559),o=r.n(n),i=r(3476),a=r.n(i)()(o());a.push([e.id,".transcript__hidden___uGO_Y{visibility:hidden}.transcript__root___SEZlz{display:flex;justify-content:center;padding:16px 4px 0px 0px;color:var(--playkit-tone-1-color);height:100%;width:100%;position:absolute;background:rgba(0,0,0,.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:1}.transcript__root___SEZlz .transcript__skip-transcript-button___fQwQC{position:absolute;top:-1000px;z-index:1;display:flex;align-items:center;justify-content:center;width:120px;height:32px;border-radius:16px;box-shadow:0 2px 8px 0 rgba(0,0,0,.3);border:solid 1px var(--playkit-primary-color);background-color:var(--playkit-tone-7-color);font-size:15px;line-height:1.27;color:var(--playkit-tone-1-color)}.transcript__root___SEZlz .transcript__skip-transcript-button___fQwQC:focus{top:56px;right:12px;outline:none !important}.transcript__root___SEZlz *{font-family:sans-serif;font-style:normal}.transcript__global-container___Sn7v8{height:100%;display:flex;flex-direction:column;max-width:599px;width:100%}.transcript__header___AgZkl{display:flex;align-items:center;justify-content:space-between;width:100%;margin-bottom:8px;padding-left:16px;font-size:16px;padding-right:16px;gap:8px;z-index:2}.transcript__body___jTlBG{position:relative;padding-top:1px;flex:1;width:100%;overflow-y:auto;text-align:center;overflow-x:hidden}.transcript__body___jTlBG::-webkit-scrollbar{width:4px}.transcript__body___jTlBG::-webkit-scrollbar-track{background:rgba(33,33,33,.9)}.transcript__body___jTlBG::-webkit-scrollbar-thumb{border-radius:3px;background-color:rgba(255,255,255,.3)}.transcript__error-wrapper___Qe39U{height:100%;width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;color:var(--playkit-tone-3-color)}.transcript__error-wrapper___Qe39U .transcript__error-icon___no0DO{width:100%;height:100%;max-width:184px;max-height:184px;background-size:contain;background-repeat:no-repeat;background-position:center}.transcript__error-wrapper___Qe39U .transcript__error-main-text___VIVvd{font-size:1.3em;margin-top:8px;margin-bottom:2px}.transcript__error-wrapper___Qe39U .transcript__error-description-text___gg6yo{margin:0}.transcript__error-wrapper___Qe39U .transcript__retry-button___wCycN{width:36px;display:block;padding:0;margin:4px auto 0 auto;border:none;background:inherit;color:#fff;cursor:pointer}","",{version:3,sources:["webpack://./components/transcript/transcript.scss","webpack://./../node_modules/@playkit-js/playkit-js-ui/src/styles/exported.scss","webpack://./variables.scss"],names:[],mappings:"AAEA,4BACE,iBAAA,CAGF,0BACE,YAAA,CACA,sBAAA,CACA,wBAAA,CACA,iCCoBa,CDnBb,WAAA,CACA,UAAA,CACA,iBAAA,CACA,yBAAA,CACA,yBAAA,CACA,iCAAA,CACA,SAAA,CACA,sEACE,iBAAA,CACA,WAAA,CACA,SAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,WAAA,CACA,WAAA,CACA,kBEvBU,CFwBV,qCAAA,CACA,6CAAA,CACA,4CCMW,CDLX,cAAA,CACA,gBAAA,CACA,iCCHW,CDIX,4EACE,QAAA,CACA,UAAA,CACA,uBAAA,CAIJ,4BACE,sBAAA,CACA,iBAAA,CAIJ,sCACE,WAAA,CACA,YAAA,CACA,qBAAA,CACA,eAAA,CACA,UAAA,CAGF,4BACE,YAAA,CACA,kBAAA,CACA,6BAAA,CACA,UAAA,CACA,iBAAA,CACA,iBAAA,CACA,cAAA,CACA,kBAAA,CACA,OAAA,CACA,SAAA,CAGF,0BACE,iBAAA,CACA,eAAA,CACA,MAAA,CACA,UAAA,CACA,eAAA,CACA,iBAAA,CACA,iBAAA,CEpEA,6CACE,SAAA,CAEF,mDACE,4BAAA,CAEF,mDACE,iBAAA,CACA,qCAAA,CFgEJ,mCACE,WAAA,CACA,UAAA,CACA,YAAA,CACA,kBAAA,CACA,sBAAA,CACA,qBAAA,CACA,iCCtDa,CDuDb,mEACE,UAAA,CACA,WAAA,CACA,eAAA,CACA,gBAAA,CACA,uBAAA,CACA,2BAAA,CACA,0BAAA,CAEF,wEACE,eAAA,CACA,cAAA,CACA,iBAAA,CAEF,+EACE,QAAA,CAEF,qEACE,UAAA,CACA,aAAA,CACA,SAAA,CACA,sBAAA,CACA,WAAA,CACA,kBAAA,CACA,UAAA,CACA,cAAA",sourcesContent:["@import '../../variables.scss';\n\n.hidden {\n  visibility: hidden;\n}\n\n.root {\n  display: flex;\n  justify-content: center;\n  padding: 16px 4px 0px 0px;\n  color: $tone-1-color;\n  height: 100%;\n  width: 100%;\n  position: absolute;\n  background: rgba(0, 0, 0, 0.6);\n  backdrop-filter: blur(8px);\n  -webkit-backdrop-filter: blur(8px);\n  z-index: 1;\n  .skip-transcript-button {\n    position: absolute;\n    top: -1000px;\n    z-index: 1;\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    width: 120px;\n    height: 32px;\n    border-radius: $roundness-3;\n    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.3);\n    border: solid 1px $primary-color;\n    background-color: $tone-7-color;\n    font-size: 15px;\n    line-height: 1.27;\n    color: $tone-1-color;\n    &:focus {\n      top: 56px;\n      right: 12px;\n      outline: none !important; // prevent focus styles inherited from playkit-player.playkit-nav\n    }\n  }\n\n  * {\n    font-family: sans-serif;\n    font-style: normal;\n  }\n}\n\n.global-container {\n  height: 100%;\n  display: flex;\n  flex-direction: column;\n  max-width: 599px;\n  width: 100%;\n}\n\n.header {\n  display: flex;\n  align-items: center;\n  justify-content: space-between;\n  width: 100%;\n  margin-bottom: 8px;\n  padding-left: 16px;\n  font-size: 16px;\n  padding-right: 16px;\n  gap: 8px;\n  z-index: 2;\n}\n\n.body {\n  position: relative;\n  padding-top: 1px;\n  flex: 1;\n  width: 100%;\n  overflow-y: auto;\n  text-align: center;\n  overflow-x: hidden;\n  @include plugin-scrollbar();\n}\n\n.error-wrapper {\n  height: 100%;\n  width: 100%;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  flex-direction: column;\n  color: $tone-3-color;\n  .error-icon {\n    width: 100%;\n    height: 100%;\n    max-width: 184px;\n    max-height: 184px;\n    background-size: contain;\n    background-repeat: no-repeat;\n    background-position: center;\n  }\n  .error-main-text {\n    font-size: 1.3em;\n    margin-top: 8px;\n    margin-bottom: 2px;\n  }\n  .error-description-text {\n    margin: 0;\n  }\n  .retry-button {\n    width: 36px;\n    display: block;\n    padding: 0;\n    margin: 4px auto 0 auto;\n    border: none;\n    background: inherit;\n    color: white;\n    cursor: pointer;\n  }\n}\n","// Sass variables exported using the npm package for plugins usage\n\n// Accent Colors\n$primary-color: var(--playkit-primary-color);\n$primary-darker-color: var(--playkit-primary-darker-color);\n$primary-brighter-color: var(--playkit-primary-brighter-color);\n$primary-text-contrast-color: var(--playkit-primary-text-contrast-color);\n\n$secondary-color: var(--playkit-secondary-color);\n$secondary-darker-color: var(--playkit-secondary-darker-color);\n$secondary-brighter-color: var(--playkit-secondary-brighter-color);\n$secondary-text-contrast-color: var(--playkit-secondary-text-contrast-color);\n\n// Acknowledgement Colors\n$success-color: var(--playkit-success-color);\n$success-darker-color: var(--playkit-success-darker-color);\n$success-brighter-color: var(--playkit-success-brighter-color);\n$success-text-contrast-color: var(--playkit-success-text-contrast-color);\n\n$danger-color: var(--playkit-danger-color);\n$danger-darker-color: var(--playkit-danger-darker-color);\n$danger-brighter-color: var(--playkit-danger-brighter-color);\n$danger-text-contrast-color: var(--playkit-danger-text-contrast-color);\n\n$warning-color: var(--playkit-warning-color);\n$warning-darker-color: var(--playkit-warning-darker-color);\n$warning-brighter-color: var(--playkit-warning-brighter-color);\n$warning-text-contrast-color: var(--playkit-warning-text-contrast-color);\n\n// Tone Ramp\n$tone-1-color: var(--playkit-tone-1-color);\n$tone-2-color: var(--playkit-tone-2-color);\n$tone-3-color: var(--playkit-tone-3-color);\n$tone-4-color: var(--playkit-tone-4-color);\n$tone-5-color: var(--playkit-tone-5-color);\n$tone-6-color: var(--playkit-tone-6-color);\n$tone-7-color: var(--playkit-tone-7-color);\n$tone-8-color: var(--playkit-tone-8-color);\n\n$live-color: var(--playkit-live-color);\n$player-background-color: var(--playkit-player-background-color);\n$tab-focus-color: var(--playkit-tab-focus-color);\n$tooltip-background-color: var(--playkit-tooltip-background-color);\n$tooltip-color: var(--playkit-tooltip-color);\n$ads-color: var(--playkit-ads-color);\n","@import '~@playkit-js/playkit-js-ui';\n\n// border radius\n$roundness-1: 4px;\n$roundness-3: 16px;\n\n@mixin plugin-scrollbar {\n  &::-webkit-scrollbar {\n    width: 4px;\n  }\n  &::-webkit-scrollbar-track {\n    background: rgba(33, 33, 33, 0.9);\n  }\n  &::-webkit-scrollbar-thumb {\n    border-radius: 3px;\n    background-color: rgba(255, 255, 255, 0.3);\n  }\n}\n"],sourceRoot:""}]),a.locals={hidden:"transcript__hidden___uGO_Y",root:"transcript__root___SEZlz","skip-transcript-button":"transcript__skip-transcript-button___fQwQC",skipTranscriptButton:"transcript__skip-transcript-button___fQwQC","global-container":"transcript__global-container___Sn7v8",globalContainer:"transcript__global-container___Sn7v8",header:"transcript__header___AgZkl",body:"transcript__body___jTlBG","error-wrapper":"transcript__error-wrapper___Qe39U",errorWrapper:"transcript__error-wrapper___Qe39U","error-icon":"transcript__error-icon___no0DO",errorIcon:"transcript__error-icon___no0DO","error-main-text":"transcript__error-main-text___VIVvd",errorMainText:"transcript__error-main-text___VIVvd","error-description-text":"transcript__error-description-text___gg6yo",errorDescriptionText:"transcript__error-description-text___gg6yo","retry-button":"transcript__retry-button___wCycN",retryButton:"transcript__retry-button___wCycN"};const s=a},3476:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var c=0;c<e.length;c++){var u=[].concat(e[c]);n&&a[u[0]]||(void 0!==i&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=i),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),t.push(u))}},t}},559:e=>{"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),o="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),i="/*# ".concat(o," */"),a=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[t].concat(a).concat([i]).join("\n")}return[t].join("\n")}},1857:e=>{"use strict";var t=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===r}(e)}(e)},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function o(e,t,r){return e.concat(t).map((function(e){return n(e,r)}))}function i(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return Object.propertyIsEnumerable.call(e,t)})):[]}(e))}function a(e,t){try{return t in e}catch(e){return!1}}function s(e,r,l){(l=l||{}).arrayMerge=l.arrayMerge||o,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c=Array.isArray(r);return c===Array.isArray(e)?c?l.arrayMerge(e,r,l):function(e,t,r){var o={};return r.isMergeableObject(e)&&i(e).forEach((function(t){o[t]=n(e[t],r)})),i(t).forEach((function(i){(function(e,t){return a(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(a(e,i)&&r.isMergeableObject(t[i])?o[i]=function(e,t){if(!t.customMerge)return s;var r=t.customMerge(e);return"function"==typeof r?r:s}(i,r)(e[i],t[i],r):o[i]=n(t[i],r))})),o}(e,r,l):n(r,l)}s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return s(e,r,t)}),{})};var l=s;e.exports=l},1069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(e){return[e.toLowerCase(),e]}))),t.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(e){return[e.toLowerCase(),e]})))},6398:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&o(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.render=void 0;var s=a(r(289)),l=r(9625),c=r(1069),u=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function p(e){return e.replace(/"/g,"&quot;")}var d=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function h(e,t){void 0===t&&(t={});for(var r=("length"in e?e:[e]),n="",o=0;o<r.length;o++)n+=f(r[o],t);return n}function f(e,t){switch(e.type){case s.Root:return h(e.children,t);case s.Doctype:case s.Directive:return"<".concat(e.data,">");case s.Comment:return"\x3c!--".concat(e.data,"--\x3e");case s.CDATA:return function(e){return"<![CDATA[".concat(e.children[0].data,"]]>")}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=c.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&g.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&m.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var o="<".concat(e.name),i=function(e,t){var r;if(e){var n=!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)?p:t.xmlMode||"utf8"!==t.encodeEntities?l.encodeXML:l.escapeAttribute;return Object.keys(e).map((function(r){var o,i,a=null!==(o=e[r])&&void 0!==o?o:"";return"foreign"===t.xmlMode&&(r=null!==(i=c.attributeNames.get(r))&&void 0!==i?i:r),t.emptyAttrs||t.xmlMode||""!==a?"".concat(r,'="').concat(n(a),'"'):r})).join(" ")}}(e.attribs,t);return i&&(o+=" ".concat(i)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&d.has(e.name))?(t.xmlMode||(o+=" "),o+="/>"):(o+=">",e.children.length>0&&(o+=h(e.children,t)),!t.xmlMode&&d.has(e.name)||(o+="</".concat(e.name,">"))),o}(e,t);case s.Text:return function(e,t){var r,n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&u.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,l.encodeXML)(n):(0,l.escapeText)(n)),n}(e,t)}}t.render=h,t.default=h;var g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),m=new Set(["svg","math"])},289:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},6722:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.DomHandler=void 0;var i=r(289),a=r(1901);o(r(1901),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},l=function(){function e(e,t,r){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new a.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?i.ElementType.Tag:void 0,n=new a.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===i.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var r=new a.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===i.ElementType.Comment)this.lastNode.data+=e;else{var t=new a.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new a.Text(""),t=new a.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new a.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=l,t.default=l},1901:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.cloneNode=t.hasChildren=t.isDocument=t.isDirective=t.isComment=t.isText=t.isCDATA=t.isTag=t.Element=t.Document=t.CDATA=t.NodeWithChildren=t.ProcessingInstruction=t.Comment=t.Text=t.DataNode=t.Node=void 0;var a=r(289),s=function(){function e(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(e.prototype,"parentNode",{get:function(){return this.parent},set:function(e){this.parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"previousSibling",{get:function(){return this.prev},set:function(e){this.prev=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextSibling",{get:function(){return this.next},set:function(e){this.next=e},enumerable:!1,configurable:!0}),e.prototype.cloneNode=function(e){return void 0===e&&(e=!1),C(this,e)},e}();t.Node=s;var l=function(e){function t(t){var r=e.call(this)||this;return r.data=t,r}return o(t,e),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.data},set:function(e){this.data=e},enumerable:!1,configurable:!0}),t}(s);t.DataNode=l;var c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Text,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 3},enumerable:!1,configurable:!0}),t}(l);t.Text=c;var u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Comment,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 8},enumerable:!1,configurable:!0}),t}(l);t.Comment=u;var p=function(e){function t(t,r){var n=e.call(this,r)||this;return n.name=t,n.type=a.ElementType.Directive,n}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),t}(l);t.ProcessingInstruction=p;var d=function(e){function t(t){var r=e.call(this)||this;return r.children=t,r}return o(t,e),Object.defineProperty(t.prototype,"firstChild",{get:function(){var e;return null!==(e=this.children[0])&&void 0!==e?e:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastChild",{get:function(){return this.children.length>0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=d;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.CDATA,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(d);t.CDATA=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a.ElementType.Root,t}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(d);t.Document=f;var g=function(e){function t(t,r,n,o){void 0===n&&(n=[]),void 0===o&&(o="script"===t?a.ElementType.Script:"style"===t?a.ElementType.Style:a.ElementType.Tag);var i=e.call(this,n)||this;return i.name=t,i.attribs=r,i.type=o,i}return o(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(d);function m(e){return(0,a.isTag)(e)}function _(e){return e.type===a.ElementType.CDATA}function y(e){return e.type===a.ElementType.Text}function v(e){return e.type===a.ElementType.Comment}function b(e){return e.type===a.ElementType.Directive}function A(e){return e.type===a.ElementType.Root}function C(e,t){var r;if(void 0===t&&(t=!1),y(e))r=new c(e.data);else if(v(e))r=new u(e.data);else if(m(e)){var n=t?x(e.children):[],o=new g(e.name,i({},e.attribs),n);n.forEach((function(e){return e.parent=o})),null!=e.namespace&&(o.namespace=e.namespace),e["x-attribsNamespace"]&&(o["x-attribsNamespace"]=i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(o["x-attribsPrefix"]=i({},e["x-attribsPrefix"])),r=o}else if(_(e)){n=t?x(e.children):[];var a=new h(n);n.forEach((function(e){return e.parent=a})),r=a}else if(A(e)){n=t?x(e.children):[];var s=new f(n);n.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else{if(!b(e))throw new Error("Not implemented yet: ".concat(e.type));var l=new p(e.name,e.data);null!=e["x-name"]&&(l["x-name"]=e["x-name"],l["x-publicId"]=e["x-publicId"],l["x-systemId"]=e["x-systemId"]),r=l}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function x(e){for(var t=e.map((function(e){return C(e,!0)})),r=1;r<t.length;r++)t[r].prev=t[r-1],t[r-1].next=t[r];return t}t.Element=g,t.isTag=m,t.isCDATA=_,t.isText=y,t.isComment=v,t.isDirective=b,t.isDocument=A,t.hasChildren=function(e){return Object.prototype.hasOwnProperty.call(e,"children")},t.cloneNode=C},7652:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var n=r(1454),o=r(5198);t.getFeed=function(e){var t=l(p,e);return t?"feed"===t.name?function(e){var t,r=e.children,n={type:"atom",items:(0,o.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:s(r)};u(n,"id","id",r),u(n,"title","title",r);var o=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;o&&(n.link=o);var i=c("summary",r)||c("content",r);i&&(n.description=i);var a=c("updated",r);return a&&(n.pubDate=new Date(a)),n}))};u(n,"id","id",r),u(n,"title","title",r);var i=null===(t=l("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i),u(n,"description","subtitle",r);var a=c("updated",r);return a&&(n.updated=new Date(a)),u(n,"author","email",r,!0),n}(t):function(e){var t,r,n=null!==(r=null===(t=l("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],i={type:e.name.substr(0,3),id:"",items:(0,o.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:s(t)};u(r,"id","guid",t),u(r,"title","title",t),u(r,"link","link",t),u(r,"description","description",t);var n=c("pubDate",t)||c("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};u(i,"title","title",n),u(i,"link","link",n),u(i,"description","description",n);var a=c("lastBuildDate",n);return a&&(i.updated=new Date(a)),u(i,"author","managingEditor",n,!0),i}(t):null};var i=["url","type","lang"],a=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,o.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,o=i;n<o.length;n++)t[c=o[n]]&&(r[c]=t[c]);for(var s=0,l=a;s<l.length;s++){var c;t[c=l[s]]&&(r[c]=parseInt(t[c],10))}return t.expression&&(r.expression=t.expression),r}))}function l(e,t){return(0,o.getElementsByTagName)(e,t,!0,1)[0]}function c(e,t,r){return void 0===r&&(r=!1),(0,n.textContent)((0,o.getElementsByTagName)(e,t,r,1)).trim()}function u(e,t,r,n,o){void 0===o&&(o=!1);var i=c(r,n,o);i&&(e[t]=i)}function p(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}},6367:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.DocumentPosition=t.removeSubsets=void 0;var n,o=r(6722);function i(e,t){var r=[],i=[];if(e===t)return 0;for(var a=(0,o.hasChildren)(e)?e:e.parent;a;)r.unshift(a),a=a.parent;for(a=(0,o.hasChildren)(t)?t:t.parent;a;)i.unshift(a),a=a.parent;for(var s=Math.min(r.length,i.length),l=0;l<s&&r[l]===i[l];)l++;if(0===l)return n.DISCONNECTED;var c=r[l-1],u=c.children,p=r[l],d=i[l];return u.indexOf(p)>u.indexOf(d)?c===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:c===e?n.PRECEDING|n.CONTAINS:n.PRECEDING}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(n=t.DocumentPosition||(t.DocumentPosition={})),t.compareDocumentPosition=i,t.uniqueSort=function(e){return(e=e.filter((function(e,t,r){return!r.includes(e,t+1)}))).sort((function(e,t){var r=i(e,t);return r&n.PRECEDING?-1:r&n.FOLLOWING?1:0})),e}},557:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,o(r(1454),t),o(r(3033),t),o(r(8452),t),o(r(6361),t),o(r(5198),t),o(r(6367),t),o(r(7652),t);var i=r(6722);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return i.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return i.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return i.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return i.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return i.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return i.hasChildren}})},5198:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=r(6722),o=r(6361),i={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function a(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function s(e,t){return function(r){return e(r)||t(r)}}function l(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(i,t)?i[t](r):a(t,r)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var r=l(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var i=l(e);return i?(0,o.filter)(i,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,o.findOne)(a("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,o.filter)(i.tag_name(e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,o.filter)(i.tag_type(e),t,r,n)}},8452:(e,t)=>{"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var o=t.parent=e.parent;if(o){var i=o.children;i[i.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,o=e.next;if(t.next=o,t.prev=e,e.next=t,t.parent=n,o){if(o.prev=t,n){var i=n.children;i.splice(i.lastIndexOf(o),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var o=n.children;o.splice(o.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},6361:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=r(6722);function o(e,t,r,o){for(var i=[],a=[t],s=[0];;)if(s[0]>=a[0].length){if(1===s.length)return i;a.shift(),s.shift()}else{var l=a[0][s[0]++];if(e(l)&&(i.push(l),--o<=0))return i;r&&(0,n.hasChildren)(l)&&l.children.length>0&&(s.unshift(0),a.unshift(l.children))}}t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),o(e,Array.isArray(t)?t:[t],r,n)},t.find=o,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,o){void 0===o&&(o=!0);for(var i=null,a=0;a<r.length&&!i;a++){var s=r[a];(0,n.isTag)(s)&&(t(s)?i=s:o&&s.children.length>0&&(i=e(t,s.children,!0)))}return i},t.existsOne=function e(t,r){return r.some((function(r){return(0,n.isTag)(r)&&(t(r)||e(t,r.children))}))},t.findAll=function(e,t){for(var r=[],o=[t],i=[0];;)if(i[0]>=o[0].length){if(1===o.length)return r;o.shift(),i.shift()}else{var a=o[0][i[0]++];(0,n.isTag)(a)&&(e(a)&&r.push(a),a.children.length>0&&(i.unshift(0),o.unshift(a.children)))}}},1454:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var o=r(6722),i=n(r(6398)),a=r(289);function s(e,t){return(0,i.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,o.hasChildren)(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,o.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,o.isCDATA)(t)?e(t.children):(0,o.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,o.hasChildren)(t)&&!(0,o.isComment)(t)?e(t.children):(0,o.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,o.hasChildren)(t)&&(t.type===a.ElementType.Tag||(0,o.isCDATA)(t))?e(t.children):(0,o.isText)(t)?t.data:""}},3033:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=r(6722);function o(e){return(0,n.hasChildren)(e)?e.children:[]}function i(e){return e.parent||null}t.getChildren=o,t.getParent=i,t.getSiblings=function(e){var t=i(e);if(null!=t)return o(t);for(var r=[e],n=e.prev,a=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=a;)r.push(a),a=a.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},9529:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var s=a(r(6416));t.htmlDecodeTree=s.default;var l=a(r(9318));t.xmlDecodeTree=l.default;var c=i(r(8787));t.decodeCodePoint=c.default;var u,p,d,h,f=r(8787);function g(e){return e>=u.ZERO&&e<=u.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return f.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return f.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(u||(u={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(p=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(d||(d={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(h=t.DecodingMode||(t.DecodingMode={}));var m=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=d.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=h.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=d.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case d.EntityStart:return e.charCodeAt(t)===u.NUM?(this.state=d.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=d.NamedEntity,this.stateNamedEntity(e,t));case d.NumericStart:return this.stateNumericStart(e,t);case d.NumericDecimal:return this.stateNumericDecimal(e,t);case d.NumericHex:return this.stateNumericHex(e,t);case d.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===u.LOWER_X?(this.state=d.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=d.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var o=r-t;this.result=this.result*Math.pow(n,o)+parseInt(e.substr(t,o),n),this.consumed+=o}},e.prototype.stateNumericHex=function(e,t){for(var r,n=t;t<e.length;){var o=e.charCodeAt(t);if(!(g(o)||(r=o,r>=u.UPPER_A&&r<=u.UPPER_F||r>=u.LOWER_A&&r<=u.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(o,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t<e.length;){var n=e.charCodeAt(t);if(!g(n))return this.addToNumericResult(e,r,t,10),this.emitNumericEntity(n,2);t+=1}return this.addToNumericResult(e,r,t,10),-1},e.prototype.emitNumericEntity=function(e,t){var r;if(this.consumed<=t)return null===(r=this.errors)||void 0===r||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===u.SEMI)this.consumed+=1;else if(this.decodeMode===h.Strict)return 0;return this.emitCodePoint((0,c.replaceCodePoint)(this.result),this.consumed),this.errors&&(e!==u.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed},e.prototype.stateNamedEntity=function(e,t){for(var r=this.decodeTree,n=r[this.treeIndex],o=(n&p.VALUE_LENGTH)>>14;t<e.length;t++,this.excess++){var i=e.charCodeAt(t);if(this.treeIndex=y(r,n,this.treeIndex+Math.max(1,o),i),this.treeIndex<0)return 0===this.result||this.decodeMode===h.Attribute&&(0===o||((a=i)===u.EQUALS||function(e){return e>=u.UPPER_A&&e<=u.UPPER_Z||e>=u.LOWER_A&&e<=u.LOWER_Z||g(e)}(a)))?0:this.emitNotTerminatedNamedEntity();if(0!=(o=((n=r[this.treeIndex])&p.VALUE_LENGTH)>>14)){if(i===u.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==h.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var a;return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&p.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~p.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case d.NamedEntity:return 0===this.result||this.decodeMode===h.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case d.NumericDecimal:return this.emitNumericEntity(0,2);case d.NumericHex:return this.emitNumericEntity(0,3);case d.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case d.EntityStart:return 0}},e}();function _(e){var t="",r=new m(e,(function(e){return t+=(0,c.fromCodePoint)(e)}));return function(e,n){for(var o=0,i=0;(i=e.indexOf("&",i))>=0;){t+=e.slice(o,i),r.startEntity(n);var a=r.write(e,i+1);if(a<0){o=i+r.end();break}o=i+a,i=0===a?o+1:o}var s=t+e.slice(o);return t="",s}}function y(e,t,r,n){var o=(t&p.BRANCH_LENGTH)>>7,i=t&p.JUMP_TABLE;if(0===o)return 0!==i&&n===i?r:-1;if(i){var a=n-i;return a<0||a>=o?-1:e[r+a]-1}for(var s=r,l=s+o-1;s<=l;){var c=s+l>>>1,u=e[c];if(u<n)s=c+1;else{if(!(u>n))return e[c+o];l=c-1}}return-1}t.EntityDecoder=m,t.determineBranch=y;var v=_(s.default),b=_(l.default);t.decodeHTML=function(e,t){return void 0===t&&(t=h.Legacy),v(e,t)},t.decodeHTMLAttribute=function(e){return v(e,h.Attribute)},t.decodeHTMLStrict=function(e){return v(e,h.Strict)},t.decodeXML=function(e){return b(e,h.Strict)}},8787:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function o(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},t.replaceCodePoint=o,t.default=function(e){return(0,t.fromCodePoint)(o(e))}},6336:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var o=n(r(9491)),i=r(2476),a=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function s(e,t){for(var r,n="",a=0;null!==(r=e.exec(t));){var s=r.index;n+=t.substring(a,s);var l=t.charCodeAt(s),c=o.default.get(l);if("object"==typeof c){if(s+1<t.length){var u=t.charCodeAt(s+1),p="number"==typeof c.n?c.n===u?c.o:void 0:c.n.get(u);if(void 0!==p){n+=p,a=e.lastIndex+=1;continue}}c=c.v}if(void 0!==c)n+=c,a=s+1;else{var d=(0,i.getCodePoint)(t,s);n+="&#x".concat(d.toString(16),";"),a=e.lastIndex+=Number(d!==l)}}return n+t.substr(a)}t.encodeHTML=function(e){return s(a,e)},t.encodeNonAsciiHTML=function(e){return s(i.xmlReplacer,e)}},2476:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"&quot;"],[38,"&amp;"],[39,"&apos;"],[60,"&lt;"],[62,"&gt;"]]);function n(e){for(var n,o="",i=0;null!==(n=t.xmlReplacer.exec(e));){var a=n.index,s=e.charCodeAt(a),l=r.get(s);void 0!==l?(o+=e.substring(i,a)+l,i=a+1):(o+="".concat(e.substring(i,a),"&#x").concat((0,t.getCodePoint)(e,a).toString(16),";"),i=t.xmlReplacer.lastIndex+=Number(55296==(64512&s)))}return o+e.substr(i)}function o(e,t){return function(r){for(var n,o=0,i="";n=e.exec(r);)o!==n.index&&(i+=r.substring(o,n.index)),i+=t.get(n[0].charCodeAt(0)),o=n.index+1;return i+r.substring(o)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=o(/[&<>'"]/g,r),t.escapeAttribute=o(/["&\u00A0]/g,new Map([[34,"&quot;"],[38,"&amp;"],[160,"&nbsp;"]])),t.escapeText=o(/[&<>\u00A0]/g,new Map([[38,"&amp;"],[60,"&lt;"],[62,"&gt;"],[160,"&nbsp;"]]))},6416:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTǇǋǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉ǲኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻ǲᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤĳạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ﬃɩᾹ\0\0᾽g;耀ﬀig;耀ﬄ;쀀𝔣lig;耀ﬁlig;쀀fjƀaltῙ῜ῡt;晭ig;耀ﬂns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒α‚‰‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସǳ⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗǈⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼ǲ㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},9318:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},9491:(e,t)=>{"use strict";function r(e){for(var t=1;t<e.length;t++)e[t][0]+=e[t-1][0]+1;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Map(r([[9,"&Tab;"],[0,"&NewLine;"],[22,"&excl;"],[0,"&quot;"],[0,"&num;"],[0,"&dollar;"],[0,"&percnt;"],[0,"&amp;"],[0,"&apos;"],[0,"&lpar;"],[0,"&rpar;"],[0,"&ast;"],[0,"&plus;"],[0,"&comma;"],[1,"&period;"],[0,"&sol;"],[10,"&colon;"],[0,"&semi;"],[0,{v:"&lt;",n:8402,o:"&nvlt;"}],[0,{v:"&equals;",n:8421,o:"&bne;"}],[0,{v:"&gt;",n:8402,o:"&nvgt;"}],[0,"&quest;"],[0,"&commat;"],[26,"&lbrack;"],[0,"&bsol;"],[0,"&rbrack;"],[0,"&Hat;"],[0,"&lowbar;"],[0,"&DiacriticalGrave;"],[5,{n:106,o:"&fjlig;"}],[20,"&lbrace;"],[0,"&verbar;"],[0,"&rbrace;"],[34,"&nbsp;"],[0,"&iexcl;"],[0,"&cent;"],[0,"&pound;"],[0,"&curren;"],[0,"&yen;"],[0,"&brvbar;"],[0,"&sect;"],[0,"&die;"],[0,"&copy;"],[0,"&ordf;"],[0,"&laquo;"],[0,"&not;"],[0,"&shy;"],[0,"&circledR;"],[0,"&macr;"],[0,"&deg;"],[0,"&PlusMinus;"],[0,"&sup2;"],[0,"&sup3;"],[0,"&acute;"],[0,"&micro;"],[0,"&para;"],[0,"&centerdot;"],[0,"&cedil;"],[0,"&sup1;"],[0,"&ordm;"],[0,"&raquo;"],[0,"&frac14;"],[0,"&frac12;"],[0,"&frac34;"],[0,"&iquest;"],[0,"&Agrave;"],[0,"&Aacute;"],[0,"&Acirc;"],[0,"&Atilde;"],[0,"&Auml;"],[0,"&angst;"],[0,"&AElig;"],[0,"&Ccedil;"],[0,"&Egrave;"],[0,"&Eacute;"],[0,"&Ecirc;"],[0,"&Euml;"],[0,"&Igrave;"],[0,"&Iacute;"],[0,"&Icirc;"],[0,"&Iuml;"],[0,"&ETH;"],[0,"&Ntilde;"],[0,"&Ograve;"],[0,"&Oacute;"],[0,"&Ocirc;"],[0,"&Otilde;"],[0,"&Ouml;"],[0,"&times;"],[0,"&Oslash;"],[0,"&Ugrave;"],[0,"&Uacute;"],[0,"&Ucirc;"],[0,"&Uuml;"],[0,"&Yacute;"],[0,"&THORN;"],[0,"&szlig;"],[0,"&agrave;"],[0,"&aacute;"],[0,"&acirc;"],[0,"&atilde;"],[0,"&auml;"],[0,"&aring;"],[0,"&aelig;"],[0,"&ccedil;"],[0,"&egrave;"],[0,"&eacute;"],[0,"&ecirc;"],[0,"&euml;"],[0,"&igrave;"],[0,"&iacute;"],[0,"&icirc;"],[0,"&iuml;"],[0,"&eth;"],[0,"&ntilde;"],[0,"&ograve;"],[0,"&oacute;"],[0,"&ocirc;"],[0,"&otilde;"],[0,"&ouml;"],[0,"&div;"],[0,"&oslash;"],[0,"&ugrave;"],[0,"&uacute;"],[0,"&ucirc;"],[0,"&uuml;"],[0,"&yacute;"],[0,"&thorn;"],[0,"&yuml;"],[0,"&Amacr;"],[0,"&amacr;"],[0,"&Abreve;"],[0,"&abreve;"],[0,"&Aogon;"],[0,"&aogon;"],[0,"&Cacute;"],[0,"&cacute;"],[0,"&Ccirc;"],[0,"&ccirc;"],[0,"&Cdot;"],[0,"&cdot;"],[0,"&Ccaron;"],[0,"&ccaron;"],[0,"&Dcaron;"],[0,"&dcaron;"],[0,"&Dstrok;"],[0,"&dstrok;"],[0,"&Emacr;"],[0,"&emacr;"],[2,"&Edot;"],[0,"&edot;"],[0,"&Eogon;"],[0,"&eogon;"],[0,"&Ecaron;"],[0,"&ecaron;"],[0,"&Gcirc;"],[0,"&gcirc;"],[0,"&Gbreve;"],[0,"&gbreve;"],[0,"&Gdot;"],[0,"&gdot;"],[0,"&Gcedil;"],[1,"&Hcirc;"],[0,"&hcirc;"],[0,"&Hstrok;"],[0,"&hstrok;"],[0,"&Itilde;"],[0,"&itilde;"],[0,"&Imacr;"],[0,"&imacr;"],[2,"&Iogon;"],[0,"&iogon;"],[0,"&Idot;"],[0,"&imath;"],[0,"&IJlig;"],[0,"&ijlig;"],[0,"&Jcirc;"],[0,"&jcirc;"],[0,"&Kcedil;"],[0,"&kcedil;"],[0,"&kgreen;"],[0,"&Lacute;"],[0,"&lacute;"],[0,"&Lcedil;"],[0,"&lcedil;"],[0,"&Lcaron;"],[0,"&lcaron;"],[0,"&Lmidot;"],[0,"&lmidot;"],[0,"&Lstrok;"],[0,"&lstrok;"],[0,"&Nacute;"],[0,"&nacute;"],[0,"&Ncedil;"],[0,"&ncedil;"],[0,"&Ncaron;"],[0,"&ncaron;"],[0,"&napos;"],[0,"&ENG;"],[0,"&eng;"],[0,"&Omacr;"],[0,"&omacr;"],[2,"&Odblac;"],[0,"&odblac;"],[0,"&OElig;"],[0,"&oelig;"],[0,"&Racute;"],[0,"&racute;"],[0,"&Rcedil;"],[0,"&rcedil;"],[0,"&Rcaron;"],[0,"&rcaron;"],[0,"&Sacute;"],[0,"&sacute;"],[0,"&Scirc;"],[0,"&scirc;"],[0,"&Scedil;"],[0,"&scedil;"],[0,"&Scaron;"],[0,"&scaron;"],[0,"&Tcedil;"],[0,"&tcedil;"],[0,"&Tcaron;"],[0,"&tcaron;"],[0,"&Tstrok;"],[0,"&tstrok;"],[0,"&Utilde;"],[0,"&utilde;"],[0,"&Umacr;"],[0,"&umacr;"],[0,"&Ubreve;"],[0,"&ubreve;"],[0,"&Uring;"],[0,"&uring;"],[0,"&Udblac;"],[0,"&udblac;"],[0,"&Uogon;"],[0,"&uogon;"],[0,"&Wcirc;"],[0,"&wcirc;"],[0,"&Ycirc;"],[0,"&ycirc;"],[0,"&Yuml;"],[0,"&Zacute;"],[0,"&zacute;"],[0,"&Zdot;"],[0,"&zdot;"],[0,"&Zcaron;"],[0,"&zcaron;"],[19,"&fnof;"],[34,"&imped;"],[63,"&gacute;"],[65,"&jmath;"],[142,"&circ;"],[0,"&caron;"],[16,"&breve;"],[0,"&DiacriticalDot;"],[0,"&ring;"],[0,"&ogon;"],[0,"&DiacriticalTilde;"],[0,"&dblac;"],[51,"&DownBreve;"],[127,"&Alpha;"],[0,"&Beta;"],[0,"&Gamma;"],[0,"&Delta;"],[0,"&Epsilon;"],[0,"&Zeta;"],[0,"&Eta;"],[0,"&Theta;"],[0,"&Iota;"],[0,"&Kappa;"],[0,"&Lambda;"],[0,"&Mu;"],[0,"&Nu;"],[0,"&Xi;"],[0,"&Omicron;"],[0,"&Pi;"],[0,"&Rho;"],[1,"&Sigma;"],[0,"&Tau;"],[0,"&Upsilon;"],[0,"&Phi;"],[0,"&Chi;"],[0,"&Psi;"],[0,"&ohm;"],[7,"&alpha;"],[0,"&beta;"],[0,"&gamma;"],[0,"&delta;"],[0,"&epsi;"],[0,"&zeta;"],[0,"&eta;"],[0,"&theta;"],[0,"&iota;"],[0,"&kappa;"],[0,"&lambda;"],[0,"&mu;"],[0,"&nu;"],[0,"&xi;"],[0,"&omicron;"],[0,"&pi;"],[0,"&rho;"],[0,"&sigmaf;"],[0,"&sigma;"],[0,"&tau;"],[0,"&upsi;"],[0,"&phi;"],[0,"&chi;"],[0,"&psi;"],[0,"&omega;"],[7,"&thetasym;"],[0,"&Upsi;"],[2,"&phiv;"],[0,"&piv;"],[5,"&Gammad;"],[0,"&digamma;"],[18,"&kappav;"],[0,"&rhov;"],[3,"&epsiv;"],[0,"&backepsilon;"],[10,"&IOcy;"],[0,"&DJcy;"],[0,"&GJcy;"],[0,"&Jukcy;"],[0,"&DScy;"],[0,"&Iukcy;"],[0,"&YIcy;"],[0,"&Jsercy;"],[0,"&LJcy;"],[0,"&NJcy;"],[0,"&TSHcy;"],[0,"&KJcy;"],[1,"&Ubrcy;"],[0,"&DZcy;"],[0,"&Acy;"],[0,"&Bcy;"],[0,"&Vcy;"],[0,"&Gcy;"],[0,"&Dcy;"],[0,"&IEcy;"],[0,"&ZHcy;"],[0,"&Zcy;"],[0,"&Icy;"],[0,"&Jcy;"],[0,"&Kcy;"],[0,"&Lcy;"],[0,"&Mcy;"],[0,"&Ncy;"],[0,"&Ocy;"],[0,"&Pcy;"],[0,"&Rcy;"],[0,"&Scy;"],[0,"&Tcy;"],[0,"&Ucy;"],[0,"&Fcy;"],[0,"&KHcy;"],[0,"&TScy;"],[0,"&CHcy;"],[0,"&SHcy;"],[0,"&SHCHcy;"],[0,"&HARDcy;"],[0,"&Ycy;"],[0,"&SOFTcy;"],[0,"&Ecy;"],[0,"&YUcy;"],[0,"&YAcy;"],[0,"&acy;"],[0,"&bcy;"],[0,"&vcy;"],[0,"&gcy;"],[0,"&dcy;"],[0,"&iecy;"],[0,"&zhcy;"],[0,"&zcy;"],[0,"&icy;"],[0,"&jcy;"],[0,"&kcy;"],[0,"&lcy;"],[0,"&mcy;"],[0,"&ncy;"],[0,"&ocy;"],[0,"&pcy;"],[0,"&rcy;"],[0,"&scy;"],[0,"&tcy;"],[0,"&ucy;"],[0,"&fcy;"],[0,"&khcy;"],[0,"&tscy;"],[0,"&chcy;"],[0,"&shcy;"],[0,"&shchcy;"],[0,"&hardcy;"],[0,"&ycy;"],[0,"&softcy;"],[0,"&ecy;"],[0,"&yucy;"],[0,"&yacy;"],[1,"&iocy;"],[0,"&djcy;"],[0,"&gjcy;"],[0,"&jukcy;"],[0,"&dscy;"],[0,"&iukcy;"],[0,"&yicy;"],[0,"&jsercy;"],[0,"&ljcy;"],[0,"&njcy;"],[0,"&tshcy;"],[0,"&kjcy;"],[1,"&ubrcy;"],[0,"&dzcy;"],[7074,"&ensp;"],[0,"&emsp;"],[0,"&emsp13;"],[0,"&emsp14;"],[1,"&numsp;"],[0,"&puncsp;"],[0,"&ThinSpace;"],[0,"&hairsp;"],[0,"&NegativeMediumSpace;"],[0,"&zwnj;"],[0,"&zwj;"],[0,"&lrm;"],[0,"&rlm;"],[0,"&dash;"],[2,"&ndash;"],[0,"&mdash;"],[0,"&horbar;"],[0,"&Verbar;"],[1,"&lsquo;"],[0,"&CloseCurlyQuote;"],[0,"&lsquor;"],[1,"&ldquo;"],[0,"&CloseCurlyDoubleQuote;"],[0,"&bdquo;"],[1,"&dagger;"],[0,"&Dagger;"],[0,"&bull;"],[2,"&nldr;"],[0,"&hellip;"],[9,"&permil;"],[0,"&pertenk;"],[0,"&prime;"],[0,"&Prime;"],[0,"&tprime;"],[0,"&backprime;"],[3,"&lsaquo;"],[0,"&rsaquo;"],[3,"&oline;"],[2,"&caret;"],[1,"&hybull;"],[0,"&frasl;"],[10,"&bsemi;"],[7,"&qprime;"],[7,{v:"&MediumSpace;",n:8202,o:"&ThickSpace;"}],[0,"&NoBreak;"],[0,"&af;"],[0,"&InvisibleTimes;"],[0,"&ic;"],[72,"&euro;"],[46,"&tdot;"],[0,"&DotDot;"],[37,"&complexes;"],[2,"&incare;"],[4,"&gscr;"],[0,"&hamilt;"],[0,"&Hfr;"],[0,"&Hopf;"],[0,"&planckh;"],[0,"&hbar;"],[0,"&imagline;"],[0,"&Ifr;"],[0,"&lagran;"],[0,"&ell;"],[1,"&naturals;"],[0,"&numero;"],[0,"&copysr;"],[0,"&weierp;"],[0,"&Popf;"],[0,"&Qopf;"],[0,"&realine;"],[0,"&real;"],[0,"&reals;"],[0,"&rx;"],[3,"&trade;"],[1,"&integers;"],[2,"&mho;"],[0,"&zeetrf;"],[0,"&iiota;"],[2,"&bernou;"],[0,"&Cayleys;"],[1,"&escr;"],[0,"&Escr;"],[0,"&Fouriertrf;"],[1,"&Mellintrf;"],[0,"&order;"],[0,"&alefsym;"],[0,"&beth;"],[0,"&gimel;"],[0,"&daleth;"],[12,"&CapitalDifferentialD;"],[0,"&dd;"],[0,"&ee;"],[0,"&ii;"],[10,"&frac13;"],[0,"&frac23;"],[0,"&frac15;"],[0,"&frac25;"],[0,"&frac35;"],[0,"&frac45;"],[0,"&frac16;"],[0,"&frac56;"],[0,"&frac18;"],[0,"&frac38;"],[0,"&frac58;"],[0,"&frac78;"],[49,"&larr;"],[0,"&ShortUpArrow;"],[0,"&rarr;"],[0,"&darr;"],[0,"&harr;"],[0,"&updownarrow;"],[0,"&nwarr;"],[0,"&nearr;"],[0,"&LowerRightArrow;"],[0,"&LowerLeftArrow;"],[0,"&nlarr;"],[0,"&nrarr;"],[1,{v:"&rarrw;",n:824,o:"&nrarrw;"}],[0,"&Larr;"],[0,"&Uarr;"],[0,"&Rarr;"],[0,"&Darr;"],[0,"&larrtl;"],[0,"&rarrtl;"],[0,"&LeftTeeArrow;"],[0,"&mapstoup;"],[0,"&map;"],[0,"&DownTeeArrow;"],[1,"&hookleftarrow;"],[0,"&hookrightarrow;"],[0,"&larrlp;"],[0,"&looparrowright;"],[0,"&harrw;"],[0,"&nharr;"],[1,"&lsh;"],[0,"&rsh;"],[0,"&ldsh;"],[0,"&rdsh;"],[1,"&crarr;"],[0,"&cularr;"],[0,"&curarr;"],[2,"&circlearrowleft;"],[0,"&circlearrowright;"],[0,"&leftharpoonup;"],[0,"&DownLeftVector;"],[0,"&RightUpVector;"],[0,"&LeftUpVector;"],[0,"&rharu;"],[0,"&DownRightVector;"],[0,"&dharr;"],[0,"&dharl;"],[0,"&RightArrowLeftArrow;"],[0,"&udarr;"],[0,"&LeftArrowRightArrow;"],[0,"&leftleftarrows;"],[0,"&upuparrows;"],[0,"&rightrightarrows;"],[0,"&ddarr;"],[0,"&leftrightharpoons;"],[0,"&Equilibrium;"],[0,"&nlArr;"],[0,"&nhArr;"],[0,"&nrArr;"],[0,"&DoubleLeftArrow;"],[0,"&DoubleUpArrow;"],[0,"&DoubleRightArrow;"],[0,"&dArr;"],[0,"&DoubleLeftRightArrow;"],[0,"&DoubleUpDownArrow;"],[0,"&nwArr;"],[0,"&neArr;"],[0,"&seArr;"],[0,"&swArr;"],[0,"&lAarr;"],[0,"&rAarr;"],[1,"&zigrarr;"],[6,"&larrb;"],[0,"&rarrb;"],[15,"&DownArrowUpArrow;"],[7,"&loarr;"],[0,"&roarr;"],[0,"&hoarr;"],[0,"&forall;"],[0,"&comp;"],[0,{v:"&part;",n:824,o:"&npart;"}],[0,"&exist;"],[0,"&nexist;"],[0,"&empty;"],[1,"&Del;"],[0,"&Element;"],[0,"&NotElement;"],[1,"&ni;"],[0,"&notni;"],[2,"&prod;"],[0,"&coprod;"],[0,"&sum;"],[0,"&minus;"],[0,"&MinusPlus;"],[0,"&dotplus;"],[1,"&Backslash;"],[0,"&lowast;"],[0,"&compfn;"],[1,"&radic;"],[2,"&prop;"],[0,"&infin;"],[0,"&angrt;"],[0,{v:"&ang;",n:8402,o:"&nang;"}],[0,"&angmsd;"],[0,"&angsph;"],[0,"&mid;"],[0,"&nmid;"],[0,"&DoubleVerticalBar;"],[0,"&NotDoubleVerticalBar;"],[0,"&and;"],[0,"&or;"],[0,{v:"&cap;",n:65024,o:"&caps;"}],[0,{v:"&cup;",n:65024,o:"&cups;"}],[0,"&int;"],[0,"&Int;"],[0,"&iiint;"],[0,"&conint;"],[0,"&Conint;"],[0,"&Cconint;"],[0,"&cwint;"],[0,"&ClockwiseContourIntegral;"],[0,"&awconint;"],[0,"&there4;"],[0,"&becaus;"],[0,"&ratio;"],[0,"&Colon;"],[0,"&dotminus;"],[1,"&mDDot;"],[0,"&homtht;"],[0,{v:"&sim;",n:8402,o:"&nvsim;"}],[0,{v:"&backsim;",n:817,o:"&race;"}],[0,{v:"&ac;",n:819,o:"&acE;"}],[0,"&acd;"],[0,"&VerticalTilde;"],[0,"&NotTilde;"],[0,{v:"&eqsim;",n:824,o:"&nesim;"}],[0,"&sime;"],[0,"&NotTildeEqual;"],[0,"&cong;"],[0,"&simne;"],[0,"&ncong;"],[0,"&ap;"],[0,"&nap;"],[0,"&ape;"],[0,{v:"&apid;",n:824,o:"&napid;"}],[0,"&backcong;"],[0,{v:"&asympeq;",n:8402,o:"&nvap;"}],[0,{v:"&bump;",n:824,o:"&nbump;"}],[0,{v:"&bumpe;",n:824,o:"&nbumpe;"}],[0,{v:"&doteq;",n:824,o:"&nedot;"}],[0,"&doteqdot;"],[0,"&efDot;"],[0,"&erDot;"],[0,"&Assign;"],[0,"&ecolon;"],[0,"&ecir;"],[0,"&circeq;"],[1,"&wedgeq;"],[0,"&veeeq;"],[1,"&triangleq;"],[2,"&equest;"],[0,"&ne;"],[0,{v:"&Congruent;",n:8421,o:"&bnequiv;"}],[0,"&nequiv;"],[1,{v:"&le;",n:8402,o:"&nvle;"}],[0,{v:"&ge;",n:8402,o:"&nvge;"}],[0,{v:"&lE;",n:824,o:"&nlE;"}],[0,{v:"&gE;",n:824,o:"&ngE;"}],[0,{v:"&lnE;",n:65024,o:"&lvertneqq;"}],[0,{v:"&gnE;",n:65024,o:"&gvertneqq;"}],[0,{v:"&ll;",n:new Map(r([[824,"&nLtv;"],[7577,"&nLt;"]]))}],[0,{v:"&gg;",n:new Map(r([[824,"&nGtv;"],[7577,"&nGt;"]]))}],[0,"&between;"],[0,"&NotCupCap;"],[0,"&nless;"],[0,"&ngt;"],[0,"&nle;"],[0,"&nge;"],[0,"&lesssim;"],[0,"&GreaterTilde;"],[0,"&nlsim;"],[0,"&ngsim;"],[0,"&LessGreater;"],[0,"&gl;"],[0,"&NotLessGreater;"],[0,"&NotGreaterLess;"],[0,"&pr;"],[0,"&sc;"],[0,"&prcue;"],[0,"&sccue;"],[0,"&PrecedesTilde;"],[0,{v:"&scsim;",n:824,o:"&NotSucceedsTilde;"}],[0,"&NotPrecedes;"],[0,"&NotSucceeds;"],[0,{v:"&sub;",n:8402,o:"&NotSubset;"}],[0,{v:"&sup;",n:8402,o:"&NotSuperset;"}],[0,"&nsub;"],[0,"&nsup;"],[0,"&sube;"],[0,"&supe;"],[0,"&NotSubsetEqual;"],[0,"&NotSupersetEqual;"],[0,{v:"&subne;",n:65024,o:"&varsubsetneq;"}],[0,{v:"&supne;",n:65024,o:"&varsupsetneq;"}],[1,"&cupdot;"],[0,"&UnionPlus;"],[0,{v:"&sqsub;",n:824,o:"&NotSquareSubset;"}],[0,{v:"&sqsup;",n:824,o:"&NotSquareSuperset;"}],[0,"&sqsube;"],[0,"&sqsupe;"],[0,{v:"&sqcap;",n:65024,o:"&sqcaps;"}],[0,{v:"&sqcup;",n:65024,o:"&sqcups;"}],[0,"&CirclePlus;"],[0,"&CircleMinus;"],[0,"&CircleTimes;"],[0,"&osol;"],[0,"&CircleDot;"],[0,"&circledcirc;"],[0,"&circledast;"],[1,"&circleddash;"],[0,"&boxplus;"],[0,"&boxminus;"],[0,"&boxtimes;"],[0,"&dotsquare;"],[0,"&RightTee;"],[0,"&dashv;"],[0,"&DownTee;"],[0,"&bot;"],[1,"&models;"],[0,"&DoubleRightTee;"],[0,"&Vdash;"],[0,"&Vvdash;"],[0,"&VDash;"],[0,"&nvdash;"],[0,"&nvDash;"],[0,"&nVdash;"],[0,"&nVDash;"],[0,"&prurel;"],[1,"&LeftTriangle;"],[0,"&RightTriangle;"],[0,{v:"&LeftTriangleEqual;",n:8402,o:"&nvltrie;"}],[0,{v:"&RightTriangleEqual;",n:8402,o:"&nvrtrie;"}],[0,"&origof;"],[0,"&imof;"],[0,"&multimap;"],[0,"&hercon;"],[0,"&intcal;"],[0,"&veebar;"],[1,"&barvee;"],[0,"&angrtvb;"],[0,"&lrtri;"],[0,"&bigwedge;"],[0,"&bigvee;"],[0,"&bigcap;"],[0,"&bigcup;"],[0,"&diam;"],[0,"&sdot;"],[0,"&sstarf;"],[0,"&divideontimes;"],[0,"&bowtie;"],[0,"&ltimes;"],[0,"&rtimes;"],[0,"&leftthreetimes;"],[0,"&rightthreetimes;"],[0,"&backsimeq;"],[0,"&curlyvee;"],[0,"&curlywedge;"],[0,"&Sub;"],[0,"&Sup;"],[0,"&Cap;"],[0,"&Cup;"],[0,"&fork;"],[0,"&epar;"],[0,"&lessdot;"],[0,"&gtdot;"],[0,{v:"&Ll;",n:824,o:"&nLl;"}],[0,{v:"&Gg;",n:824,o:"&nGg;"}],[0,{v:"&leg;",n:65024,o:"&lesg;"}],[0,{v:"&gel;",n:65024,o:"&gesl;"}],[2,"&cuepr;"],[0,"&cuesc;"],[0,"&NotPrecedesSlantEqual;"],[0,"&NotSucceedsSlantEqual;"],[0,"&NotSquareSubsetEqual;"],[0,"&NotSquareSupersetEqual;"],[2,"&lnsim;"],[0,"&gnsim;"],[0,"&precnsim;"],[0,"&scnsim;"],[0,"&nltri;"],[0,"&NotRightTriangle;"],[0,"&nltrie;"],[0,"&NotRightTriangleEqual;"],[0,"&vellip;"],[0,"&ctdot;"],[0,"&utdot;"],[0,"&dtdot;"],[0,"&disin;"],[0,"&isinsv;"],[0,"&isins;"],[0,{v:"&isindot;",n:824,o:"&notindot;"}],[0,"&notinvc;"],[0,"&notinvb;"],[1,{v:"&isinE;",n:824,o:"&notinE;"}],[0,"&nisd;"],[0,"&xnis;"],[0,"&nis;"],[0,"&notnivc;"],[0,"&notnivb;"],[6,"&barwed;"],[0,"&Barwed;"],[1,"&lceil;"],[0,"&rceil;"],[0,"&LeftFloor;"],[0,"&rfloor;"],[0,"&drcrop;"],[0,"&dlcrop;"],[0,"&urcrop;"],[0,"&ulcrop;"],[0,"&bnot;"],[1,"&profline;"],[0,"&profsurf;"],[1,"&telrec;"],[0,"&target;"],[5,"&ulcorn;"],[0,"&urcorn;"],[0,"&dlcorn;"],[0,"&drcorn;"],[2,"&frown;"],[0,"&smile;"],[9,"&cylcty;"],[0,"&profalar;"],[7,"&topbot;"],[6,"&ovbar;"],[1,"&solbar;"],[60,"&angzarr;"],[51,"&lmoustache;"],[0,"&rmoustache;"],[2,"&OverBracket;"],[0,"&bbrk;"],[0,"&bbrktbrk;"],[37,"&OverParenthesis;"],[0,"&UnderParenthesis;"],[0,"&OverBrace;"],[0,"&UnderBrace;"],[2,"&trpezium;"],[4,"&elinters;"],[59,"&blank;"],[164,"&circledS;"],[55,"&boxh;"],[1,"&boxv;"],[9,"&boxdr;"],[3,"&boxdl;"],[3,"&boxur;"],[3,"&boxul;"],[3,"&boxvr;"],[7,"&boxvl;"],[7,"&boxhd;"],[7,"&boxhu;"],[7,"&boxvh;"],[19,"&boxH;"],[0,"&boxV;"],[0,"&boxdR;"],[0,"&boxDr;"],[0,"&boxDR;"],[0,"&boxdL;"],[0,"&boxDl;"],[0,"&boxDL;"],[0,"&boxuR;"],[0,"&boxUr;"],[0,"&boxUR;"],[0,"&boxuL;"],[0,"&boxUl;"],[0,"&boxUL;"],[0,"&boxvR;"],[0,"&boxVr;"],[0,"&boxVR;"],[0,"&boxvL;"],[0,"&boxVl;"],[0,"&boxVL;"],[0,"&boxHd;"],[0,"&boxhD;"],[0,"&boxHD;"],[0,"&boxHu;"],[0,"&boxhU;"],[0,"&boxHU;"],[0,"&boxvH;"],[0,"&boxVh;"],[0,"&boxVH;"],[19,"&uhblk;"],[3,"&lhblk;"],[3,"&block;"],[8,"&blk14;"],[0,"&blk12;"],[0,"&blk34;"],[13,"&square;"],[8,"&blacksquare;"],[0,"&EmptyVerySmallSquare;"],[1,"&rect;"],[0,"&marker;"],[2,"&fltns;"],[1,"&bigtriangleup;"],[0,"&blacktriangle;"],[0,"&triangle;"],[2,"&blacktriangleright;"],[0,"&rtri;"],[3,"&bigtriangledown;"],[0,"&blacktriangledown;"],[0,"&dtri;"],[2,"&blacktriangleleft;"],[0,"&ltri;"],[6,"&loz;"],[0,"&cir;"],[32,"&tridot;"],[2,"&bigcirc;"],[8,"&ultri;"],[0,"&urtri;"],[0,"&lltri;"],[0,"&EmptySmallSquare;"],[0,"&FilledSmallSquare;"],[8,"&bigstar;"],[0,"&star;"],[7,"&phone;"],[49,"&female;"],[1,"&male;"],[29,"&spades;"],[2,"&clubs;"],[1,"&hearts;"],[0,"&diamondsuit;"],[3,"&sung;"],[2,"&flat;"],[0,"&natural;"],[0,"&sharp;"],[163,"&check;"],[3,"&cross;"],[8,"&malt;"],[21,"&sext;"],[33,"&VerticalSeparator;"],[25,"&lbbrk;"],[0,"&rbbrk;"],[84,"&bsolhsub;"],[0,"&suphsol;"],[28,"&LeftDoubleBracket;"],[0,"&RightDoubleBracket;"],[0,"&lang;"],[0,"&rang;"],[0,"&Lang;"],[0,"&Rang;"],[0,"&loang;"],[0,"&roang;"],[7,"&longleftarrow;"],[0,"&longrightarrow;"],[0,"&longleftrightarrow;"],[0,"&DoubleLongLeftArrow;"],[0,"&DoubleLongRightArrow;"],[0,"&DoubleLongLeftRightArrow;"],[1,"&longmapsto;"],[2,"&dzigrarr;"],[258,"&nvlArr;"],[0,"&nvrArr;"],[0,"&nvHarr;"],[0,"&Map;"],[6,"&lbarr;"],[0,"&bkarow;"],[0,"&lBarr;"],[0,"&dbkarow;"],[0,"&drbkarow;"],[0,"&DDotrahd;"],[0,"&UpArrowBar;"],[0,"&DownArrowBar;"],[2,"&Rarrtl;"],[2,"&latail;"],[0,"&ratail;"],[0,"&lAtail;"],[0,"&rAtail;"],[0,"&larrfs;"],[0,"&rarrfs;"],[0,"&larrbfs;"],[0,"&rarrbfs;"],[2,"&nwarhk;"],[0,"&nearhk;"],[0,"&hksearow;"],[0,"&hkswarow;"],[0,"&nwnear;"],[0,"&nesear;"],[0,"&seswar;"],[0,"&swnwar;"],[8,{v:"&rarrc;",n:824,o:"&nrarrc;"}],[1,"&cudarrr;"],[0,"&ldca;"],[0,"&rdca;"],[0,"&cudarrl;"],[0,"&larrpl;"],[2,"&curarrm;"],[0,"&cularrp;"],[7,"&rarrpl;"],[2,"&harrcir;"],[0,"&Uarrocir;"],[0,"&lurdshar;"],[0,"&ldrushar;"],[2,"&LeftRightVector;"],[0,"&RightUpDownVector;"],[0,"&DownLeftRightVector;"],[0,"&LeftUpDownVector;"],[0,"&LeftVectorBar;"],[0,"&RightVectorBar;"],[0,"&RightUpVectorBar;"],[0,"&RightDownVectorBar;"],[0,"&DownLeftVectorBar;"],[0,"&DownRightVectorBar;"],[0,"&LeftUpVectorBar;"],[0,"&LeftDownVectorBar;"],[0,"&LeftTeeVector;"],[0,"&RightTeeVector;"],[0,"&RightUpTeeVector;"],[0,"&RightDownTeeVector;"],[0,"&DownLeftTeeVector;"],[0,"&DownRightTeeVector;"],[0,"&LeftUpTeeVector;"],[0,"&LeftDownTeeVector;"],[0,"&lHar;"],[0,"&uHar;"],[0,"&rHar;"],[0,"&dHar;"],[0,"&luruhar;"],[0,"&ldrdhar;"],[0,"&ruluhar;"],[0,"&rdldhar;"],[0,"&lharul;"],[0,"&llhard;"],[0,"&rharul;"],[0,"&lrhard;"],[0,"&udhar;"],[0,"&duhar;"],[0,"&RoundImplies;"],[0,"&erarr;"],[0,"&simrarr;"],[0,"&larrsim;"],[0,"&rarrsim;"],[0,"&rarrap;"],[0,"&ltlarr;"],[1,"&gtrarr;"],[0,"&subrarr;"],[1,"&suplarr;"],[0,"&lfisht;"],[0,"&rfisht;"],[0,"&ufisht;"],[0,"&dfisht;"],[5,"&lopar;"],[0,"&ropar;"],[4,"&lbrke;"],[0,"&rbrke;"],[0,"&lbrkslu;"],[0,"&rbrksld;"],[0,"&lbrksld;"],[0,"&rbrkslu;"],[0,"&langd;"],[0,"&rangd;"],[0,"&lparlt;"],[0,"&rpargt;"],[0,"&gtlPar;"],[0,"&ltrPar;"],[3,"&vzigzag;"],[1,"&vangrt;"],[0,"&angrtvbd;"],[6,"&ange;"],[0,"&range;"],[0,"&dwangle;"],[0,"&uwangle;"],[0,"&angmsdaa;"],[0,"&angmsdab;"],[0,"&angmsdac;"],[0,"&angmsdad;"],[0,"&angmsdae;"],[0,"&angmsdaf;"],[0,"&angmsdag;"],[0,"&angmsdah;"],[0,"&bemptyv;"],[0,"&demptyv;"],[0,"&cemptyv;"],[0,"&raemptyv;"],[0,"&laemptyv;"],[0,"&ohbar;"],[0,"&omid;"],[0,"&opar;"],[1,"&operp;"],[1,"&olcross;"],[0,"&odsold;"],[1,"&olcir;"],[0,"&ofcir;"],[0,"&olt;"],[0,"&ogt;"],[0,"&cirscir;"],[0,"&cirE;"],[0,"&solb;"],[0,"&bsolb;"],[3,"&boxbox;"],[3,"&trisb;"],[0,"&rtriltri;"],[0,{v:"&LeftTriangleBar;",n:824,o:"&NotLeftTriangleBar;"}],[0,{v:"&RightTriangleBar;",n:824,o:"&NotRightTriangleBar;"}],[11,"&iinfin;"],[0,"&infintie;"],[0,"&nvinfin;"],[4,"&eparsl;"],[0,"&smeparsl;"],[0,"&eqvparsl;"],[5,"&blacklozenge;"],[8,"&RuleDelayed;"],[1,"&dsol;"],[9,"&bigodot;"],[0,"&bigoplus;"],[0,"&bigotimes;"],[1,"&biguplus;"],[1,"&bigsqcup;"],[5,"&iiiint;"],[0,"&fpartint;"],[2,"&cirfnint;"],[0,"&awint;"],[0,"&rppolint;"],[0,"&scpolint;"],[0,"&npolint;"],[0,"&pointint;"],[0,"&quatint;"],[0,"&intlarhk;"],[10,"&pluscir;"],[0,"&plusacir;"],[0,"&simplus;"],[0,"&plusdu;"],[0,"&plussim;"],[0,"&plustwo;"],[1,"&mcomma;"],[0,"&minusdu;"],[2,"&loplus;"],[0,"&roplus;"],[0,"&Cross;"],[0,"&timesd;"],[0,"&timesbar;"],[1,"&smashp;"],[0,"&lotimes;"],[0,"&rotimes;"],[0,"&otimesas;"],[0,"&Otimes;"],[0,"&odiv;"],[0,"&triplus;"],[0,"&triminus;"],[0,"&tritime;"],[0,"&intprod;"],[2,"&amalg;"],[0,"&capdot;"],[1,"&ncup;"],[0,"&ncap;"],[0,"&capand;"],[0,"&cupor;"],[0,"&cupcap;"],[0,"&capcup;"],[0,"&cupbrcap;"],[0,"&capbrcup;"],[0,"&cupcup;"],[0,"&capcap;"],[0,"&ccups;"],[0,"&ccaps;"],[2,"&ccupssm;"],[2,"&And;"],[0,"&Or;"],[0,"&andand;"],[0,"&oror;"],[0,"&orslope;"],[0,"&andslope;"],[1,"&andv;"],[0,"&orv;"],[0,"&andd;"],[0,"&ord;"],[1,"&wedbar;"],[6,"&sdote;"],[3,"&simdot;"],[2,{v:"&congdot;",n:824,o:"&ncongdot;"}],[0,"&easter;"],[0,"&apacir;"],[0,{v:"&apE;",n:824,o:"&napE;"}],[0,"&eplus;"],[0,"&pluse;"],[0,"&Esim;"],[0,"&Colone;"],[0,"&Equal;"],[1,"&ddotseq;"],[0,"&equivDD;"],[0,"&ltcir;"],[0,"&gtcir;"],[0,"&ltquest;"],[0,"&gtquest;"],[0,{v:"&leqslant;",n:824,o:"&nleqslant;"}],[0,{v:"&geqslant;",n:824,o:"&ngeqslant;"}],[0,"&lesdot;"],[0,"&gesdot;"],[0,"&lesdoto;"],[0,"&gesdoto;"],[0,"&lesdotor;"],[0,"&gesdotol;"],[0,"&lap;"],[0,"&gap;"],[0,"&lne;"],[0,"&gne;"],[0,"&lnap;"],[0,"&gnap;"],[0,"&lEg;"],[0,"&gEl;"],[0,"&lsime;"],[0,"&gsime;"],[0,"&lsimg;"],[0,"&gsiml;"],[0,"&lgE;"],[0,"&glE;"],[0,"&lesges;"],[0,"&gesles;"],[0,"&els;"],[0,"&egs;"],[0,"&elsdot;"],[0,"&egsdot;"],[0,"&el;"],[0,"&eg;"],[2,"&siml;"],[0,"&simg;"],[0,"&simlE;"],[0,"&simgE;"],[0,{v:"&LessLess;",n:824,o:"&NotNestedLessLess;"}],[0,{v:"&GreaterGreater;",n:824,o:"&NotNestedGreaterGreater;"}],[1,"&glj;"],[0,"&gla;"],[0,"&ltcc;"],[0,"&gtcc;"],[0,"&lescc;"],[0,"&gescc;"],[0,"&smt;"],[0,"&lat;"],[0,{v:"&smte;",n:65024,o:"&smtes;"}],[0,{v:"&late;",n:65024,o:"&lates;"}],[0,"&bumpE;"],[0,{v:"&PrecedesEqual;",n:824,o:"&NotPrecedesEqual;"}],[0,{v:"&sce;",n:824,o:"&NotSucceedsEqual;"}],[2,"&prE;"],[0,"&scE;"],[0,"&precneqq;"],[0,"&scnE;"],[0,"&prap;"],[0,"&scap;"],[0,"&precnapprox;"],[0,"&scnap;"],[0,"&Pr;"],[0,"&Sc;"],[0,"&subdot;"],[0,"&supdot;"],[0,"&subplus;"],[0,"&supplus;"],[0,"&submult;"],[0,"&supmult;"],[0,"&subedot;"],[0,"&supedot;"],[0,{v:"&subE;",n:824,o:"&nsubE;"}],[0,{v:"&supE;",n:824,o:"&nsupE;"}],[0,"&subsim;"],[0,"&supsim;"],[2,{v:"&subnE;",n:65024,o:"&varsubsetneqq;"}],[0,{v:"&supnE;",n:65024,o:"&varsupsetneqq;"}],[2,"&csub;"],[0,"&csup;"],[0,"&csube;"],[0,"&csupe;"],[0,"&subsup;"],[0,"&supsub;"],[0,"&subsub;"],[0,"&supsup;"],[0,"&suphsub;"],[0,"&supdsub;"],[0,"&forkv;"],[0,"&topfork;"],[0,"&mlcp;"],[8,"&Dashv;"],[1,"&Vdashl;"],[0,"&Barv;"],[0,"&vBar;"],[0,"&vBarv;"],[1,"&Vbar;"],[0,"&Not;"],[0,"&bNot;"],[0,"&rnmid;"],[0,"&cirmid;"],[0,"&midcir;"],[0,"&topcir;"],[0,"&nhpar;"],[0,"&parsim;"],[9,{v:"&parsl;",n:8421,o:"&nparsl;"}],[44343,{n:new Map(r([[56476,"&Ascr;"],[1,"&Cscr;"],[0,"&Dscr;"],[2,"&Gscr;"],[2,"&Jscr;"],[0,"&Kscr;"],[2,"&Nscr;"],[0,"&Oscr;"],[0,"&Pscr;"],[0,"&Qscr;"],[1,"&Sscr;"],[0,"&Tscr;"],[0,"&Uscr;"],[0,"&Vscr;"],[0,"&Wscr;"],[0,"&Xscr;"],[0,"&Yscr;"],[0,"&Zscr;"],[0,"&ascr;"],[0,"&bscr;"],[0,"&cscr;"],[0,"&dscr;"],[1,"&fscr;"],[1,"&hscr;"],[0,"&iscr;"],[0,"&jscr;"],[0,"&kscr;"],[0,"&lscr;"],[0,"&mscr;"],[0,"&nscr;"],[1,"&pscr;"],[0,"&qscr;"],[0,"&rscr;"],[0,"&sscr;"],[0,"&tscr;"],[0,"&uscr;"],[0,"&vscr;"],[0,"&wscr;"],[0,"&xscr;"],[0,"&yscr;"],[0,"&zscr;"],[52,"&Afr;"],[0,"&Bfr;"],[1,"&Dfr;"],[0,"&Efr;"],[0,"&Ffr;"],[0,"&Gfr;"],[2,"&Jfr;"],[0,"&Kfr;"],[0,"&Lfr;"],[0,"&Mfr;"],[0,"&Nfr;"],[0,"&Ofr;"],[0,"&Pfr;"],[0,"&Qfr;"],[1,"&Sfr;"],[0,"&Tfr;"],[0,"&Ufr;"],[0,"&Vfr;"],[0,"&Wfr;"],[0,"&Xfr;"],[0,"&Yfr;"],[1,"&afr;"],[0,"&bfr;"],[0,"&cfr;"],[0,"&dfr;"],[0,"&efr;"],[0,"&ffr;"],[0,"&gfr;"],[0,"&hfr;"],[0,"&ifr;"],[0,"&jfr;"],[0,"&kfr;"],[0,"&lfr;"],[0,"&mfr;"],[0,"&nfr;"],[0,"&ofr;"],[0,"&pfr;"],[0,"&qfr;"],[0,"&rfr;"],[0,"&sfr;"],[0,"&tfr;"],[0,"&ufr;"],[0,"&vfr;"],[0,"&wfr;"],[0,"&xfr;"],[0,"&yfr;"],[0,"&zfr;"],[0,"&Aopf;"],[0,"&Bopf;"],[1,"&Dopf;"],[0,"&Eopf;"],[0,"&Fopf;"],[0,"&Gopf;"],[1,"&Iopf;"],[0,"&Jopf;"],[0,"&Kopf;"],[0,"&Lopf;"],[0,"&Mopf;"],[1,"&Oopf;"],[3,"&Sopf;"],[0,"&Topf;"],[0,"&Uopf;"],[0,"&Vopf;"],[0,"&Wopf;"],[0,"&Xopf;"],[0,"&Yopf;"],[1,"&aopf;"],[0,"&bopf;"],[0,"&copf;"],[0,"&dopf;"],[0,"&eopf;"],[0,"&fopf;"],[0,"&gopf;"],[0,"&hopf;"],[0,"&iopf;"],[0,"&jopf;"],[0,"&kopf;"],[0,"&lopf;"],[0,"&mopf;"],[0,"&nopf;"],[0,"&oopf;"],[0,"&popf;"],[0,"&qopf;"],[0,"&ropf;"],[0,"&sopf;"],[0,"&topf;"],[0,"&uopf;"],[0,"&vopf;"],[0,"&wopf;"],[0,"&xopf;"],[0,"&yopf;"],[0,"&zopf;"]]))}],[8906,"&fflig;"],[0,"&filig;"],[0,"&fllig;"],[0,"&ffilig;"],[0,"&ffllig;"]]))},9625:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var n,o,i=r(9529),a=r(6336),s=r(2476);function l(e,t){if(void 0===t&&(t=n.XML),("number"==typeof t?t:t.level)===n.HTML){var r="object"==typeof t?t.mode:void 0;return(0,i.decodeHTML)(e,r)}return(0,i.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(o=t.EncodingMode||(t.EncodingMode={})),t.decode=l,t.decodeStrict=function(e,t){var r;void 0===t&&(t=n.XML);var o="number"==typeof t?{level:t}:t;return null!==(r=o.mode)&&void 0!==r||(o.mode=i.DecodingMode.Strict),l(e,o)},t.encode=function(e,t){void 0===t&&(t=n.XML);var r="number"==typeof t?{level:t}:t;return r.mode===o.UTF8?(0,s.escapeUTF8)(e):r.mode===o.Attribute?(0,s.escapeAttribute)(e):r.mode===o.Text?(0,s.escapeText)(e):r.level===n.HTML?r.mode===o.ASCII?(0,a.encodeNonAsciiHTML)(e):(0,a.encodeHTML)(e):(0,s.encodeXML)(e)};var c=r(2476);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return c.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return c.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return c.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return c.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return c.escapeText}});var u=r(6336);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return u.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return u.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return u.encodeHTML}});var p=r(9529);Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return p.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return p.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return p.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return p.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return p.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return p.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return p.decodeXML}})},4418:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var a=i(r(4614)),s=r(9529),l=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),u=new Set(["thead","tbody"]),p=new Set(["dd","dt"]),d=new Set(["rt","rp"]),h=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",c],["h1",c],["h2",c],["h3",c],["h4",c],["h5",c],["h6",c],["select",l],["input",l],["output",l],["button",l],["datalist",l],["textarea",l],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",p],["dt",p],["address",c],["article",c],["aside",c],["blockquote",c],["details",c],["div",c],["dl",c],["fieldset",c],["figcaption",c],["figure",c],["footer",c],["form",c],["header",c],["hr",c],["main",c],["nav",c],["ol",c],["pre",c],["section",c],["table",c],["ul",c],["rt",d],["rp",d],["tbody",u],["tfoot",u]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),g=new Set(["math","svg"]),m=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),_=/\s|\//,y=function(){function e(e,t){var r,n,o,i,s;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(o=t.Tokenizer)&&void 0!==o?o:a.default)(this.options,this),null===(s=(i=this.cbs).onparserinit)||void 0===s||s.call(i,this)}return e.prototype.ontext=function(e,t){var r,n,o=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,o),this.startIndex=t},e.prototype.ontextentity=function(e){var t,r,n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,(0,s.fromCodePoint)(e)),this.startIndex=n},e.prototype.isVoidElement=function(e){return!this.options.xmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,o;this.openTagStart=this.startIndex,this.tagname=e;var i=!this.options.xmlMode&&h.get(e);if(i)for(;this.stack.length>0&&i.has(this.stack[this.stack.length-1]);){var a=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,a,!0)}this.isVoidElement(e)||(this.stack.push(e),g.has(e)?this.foreignContext.push(!0):m.has(e)&&this.foreignContext.push(!1)),null===(o=(n=this.cbs).onopentagname)||void 0===o||o.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,o,i,a,s;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(g.has(l)||m.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))this.options.xmlMode||"br"!==l||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(i=(o=this.cbs).onopentag)||void 0===i||i.call(o,"br",{},!0),null===(s=(a=this.cbs).onclosetag)||void 0===s||s.call(a,"br",!1));else{var c=this.stack.lastIndexOf(l);if(-1!==c)if(this.cbs.onclosetag)for(var u=this.stack.length-c;u--;)this.cbs.onclosetag(this.stack.pop(),0!==u);else this.stack.length=c;else this.options.xmlMode||"p"!==l||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===a.QuoteType.Double?'"':e===a.QuoteType.Single?"'":e===a.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(_),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,o,i,a;this.endIndex=t,null===(o=(n=this.cbs).oncomment)||void 0===o||o.call(n,this.getSlice(e,t-r)),null===(a=(i=this.cbs).oncommentend)||void 0===a||a.call(i),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,o,i,a,s,l,c,u,p,d;this.endIndex=t;var h=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(o=(n=this.cbs).oncdatastart)||void 0===o||o.call(n),null===(a=(i=this.cbs).ontext)||void 0===a||a.call(i,h),null===(l=(s=this.cbs).oncdataend)||void 0===l||l.call(s)):(null===(u=(c=this.cbs).oncomment)||void 0===u||u.call(c,"[CDATA[".concat(h,"]]")),null===(d=(p=this.cbs).oncommentend)||void 0===d||d.call(p)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex<this.buffers.length;)this.tokenizer.write(this.buffers[this.writeIndex++]);this.ended&&this.tokenizer.end()},e.prototype.parseChunk=function(e){this.write(e)},e.prototype.done=function(e){this.end(e)},e}();t.Parser=y},4614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,o,i,a=r(9529);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function l(e){return e===n.Slash||e===n.Gt||s(e)}function c(e){return e>=n.Zero&&e<=n.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(o||(o={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(i=t.QuoteType||(t.QuoteType={}));var u={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},p=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,i=e.decodeEntities,s=void 0===i||i;this.cbs=t,this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=s,this.entityTrie=n?a.xmlDecodeTree:a.htmlDecodeTree}return e.prototype.reset=function(){this.state=o.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=o.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.index<this.buffer.length+this.offset&&this.parse()},e.prototype.getIndex=function(){return this.index},e.prototype.getSectionStart=function(){return this.sectionStart},e.prototype.stateText=function(e){e===n.Lt||!this.decodeEntities&&this.fastForwardTo(n.Lt)?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=o.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&(this.state=o.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?l(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=o.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart<t){var r=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=r}return this.isSpecial=!1,this.sectionStart=t+2,void this.stateInClosingTagName(e)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===u.TitleEnd?this.decodeEntities&&e===n.Amp&&(this.state=o.BeforeEntity):this.fastForwardTo(n.Lt)&&(this.sequenceIndex=1):this.sequenceIndex=Number(e===n.Lt)},e.prototype.stateCDATASequence=function(e){e===u.Cdata[this.sequenceIndex]?++this.sequenceIndex===u.Cdata.length&&(this.state=o.InCommentLike,this.currentSequence=u.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=o.InDeclaration,this.stateInDeclaration(e))},e.prototype.fastForwardTo=function(e){for(;++this.index<this.buffer.length+this.offset;)if(this.buffer.charCodeAt(this.index-this.offset)===e)return!0;return this.index=this.buffer.length+this.offset-1,!1},e.prototype.stateInCommentLike=function(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index,2):this.cbs.oncomment(this.sectionStart,this.index,2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=o.Text):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)},e.prototype.isTagStartChar=function(e){return this.xmlMode?!l(e):function(e){return e>=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=o.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=o.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=o.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==u.TitleEnd[2]?this.state=this.xmlMode||t!==u.ScriptEnd[2]?o.InTagName:o.BeforeSpecialS:this.startSpecial(u.TitleEnd,3)}else e===n.Slash?this.state=o.BeforeClosingTagName:(this.state=o.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){l(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=o.Text:(this.state=this.isTagStartChar(e)?o.InClosingTagName:o.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=o.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=o.Text,this.baseState=o.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=o.InSpecialTag,this.sequenceIndex=0):this.state=o.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===n.Slash?this.state=o.InSelfClosingTag:s(e)||(this.state=o.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=o.Text,this.baseState=o.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||l(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=o.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=o.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(i.NoValue,this.index),this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(i.NoValue,this.index),this.state=o.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=o.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=o.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=o.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?i.Double:i.Single,this.index),this.state=o.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=o.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(i.Unquoted,this.index),this.state=o.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=o.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=o.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?o.BeforeComment:o.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=o.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=o.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=o.InCommentLike,this.currentSequence=u.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=o.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=o.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===u.ScriptEnd[3]?this.startSpecial(u.ScriptEnd,4):t===u.StyleEnd[3]?this.startSpecial(u.StyleEnd,4):(this.state=o.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===n.Number?this.state=o.BeforeNumericEntity:e===n.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=o.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,a.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&a.BinTrieFlags.VALUE_LENGTH;if(t){var r=(t>>14)-1;if(this.allowLegacyEntity()||e===n.Semi){var o=this.index-this.entityExcess+1;o>this.sectionStart&&this.emitPartial(this.sectionStart,o),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&a.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~a.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===n.LowerX?(this.entityExcess++,this.state=o.InHexEntity):(this.state=o.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===o.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,a.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=10*this.entityResult+(e-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):c(e)?(this.entityResult=16*this.entityResult+(e-n.Zero),this.entityExcess++):function(e){return e>=n.UpperA&&e<=n.UpperF||e>=n.LowerA&&e<=n.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===o.Text||this.baseState===o.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===o.Text||this.state===o.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==o.InAttributeValueDq&&this.state!==o.InAttributeValueSq&&this.state!==o.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index<this.buffer.length+this.offset&&this.running},e.prototype.parse=function(){for(;this.shouldContinue();){var e=this.buffer.charCodeAt(this.index-this.offset);switch(this.state){case o.Text:this.stateText(e);break;case o.SpecialStartSequence:this.stateSpecialStartSequence(e);break;case o.InSpecialTag:this.stateInSpecialTag(e);break;case o.CDATASequence:this.stateCDATASequence(e);break;case o.InAttributeValueDq:this.stateInAttributeValueDoubleQuotes(e);break;case o.InAttributeName:this.stateInAttributeName(e);break;case o.InCommentLike:this.stateInCommentLike(e);break;case o.InSpecialComment:this.stateInSpecialComment(e);break;case o.BeforeAttributeName:this.stateBeforeAttributeName(e);break;case o.InTagName:this.stateInTagName(e);break;case o.InClosingTagName:this.stateInClosingTagName(e);break;case o.BeforeTagName:this.stateBeforeTagName(e);break;case o.AfterAttributeName:this.stateAfterAttributeName(e);break;case o.InAttributeValueSq:this.stateInAttributeValueSingleQuotes(e);break;case o.BeforeAttributeValue:this.stateBeforeAttributeValue(e);break;case o.BeforeClosingTagName:this.stateBeforeClosingTagName(e);break;case o.AfterClosingTagName:this.stateAfterClosingTagName(e);break;case o.BeforeSpecialS:this.stateBeforeSpecialS(e);break;case o.InAttributeValueNq:this.stateInAttributeValueNoQuotes(e);break;case o.InSelfClosingTag:this.stateInSelfClosingTag(e);break;case o.InDeclaration:this.stateInDeclaration(e);break;case o.BeforeDeclaration:this.stateBeforeDeclaration(e);break;case o.BeforeComment:this.stateBeforeComment(e);break;case o.InProcessingInstruction:this.stateInProcessingInstruction(e);break;case o.InNamedEntity:this.stateInNamedEntity(e);break;case o.BeforeEntity:this.stateBeforeEntity(e);break;case o.InHexEntity:this.stateInHexEntity(e);break;case o.InNumericEntity:this.stateInNumericEntity(e);break;default:this.stateBeforeNumericEntity(e)}this.index++}this.cleanup()},e.prototype.finish=function(){this.state===o.InNamedEntity&&this.emitNamedEntity(),this.sectionStart<this.index&&this.handleTrailingData(),this.cbs.onend()},e.prototype.handleTrailingData=function(){var e=this.buffer.length+this.offset;this.state===o.InCommentLike?this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===o.InNumericEntity&&this.allowLegacyEntity()||this.state===o.InHexEntity&&this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state===o.InTagName||this.state===o.BeforeAttributeName||this.state===o.BeforeAttributeValue||this.state===o.AfterAttributeName||this.state===o.InAttributeName||this.state===o.InAttributeValueSq||this.state===o.InAttributeValueDq||this.state===o.InAttributeValueNq||this.state===o.InClosingTagName||this.cbs.ontext(this.sectionStart,e)},e.prototype.emitPartial=function(e,t){this.baseState!==o.Text&&this.baseState!==o.InSpecialTag?this.cbs.onattribdata(e,t):this.cbs.ontext(e,t)},e.prototype.emitCodePoint=function(e){this.baseState!==o.Text&&this.baseState!==o.InSpecialTag?this.cbs.onattribentity(e):this.cbs.ontextentity(e)},e}();t.default=p},2904:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomUtils=t.parseFeed=t.getFeed=t.ElementType=t.Tokenizer=t.createDomStream=t.parseDOM=t.parseDocument=t.DefaultHandler=t.DomHandler=t.Parser=void 0;var s=r(4418),l=r(4418);Object.defineProperty(t,"Parser",{enumerable:!0,get:function(){return l.Parser}});var c=r(6722),u=r(6722);function p(e,t){var r=new c.DomHandler(void 0,t);return new s.Parser(r,t).end(e),r.root}function d(e,t){return p(e,t).children}Object.defineProperty(t,"DomHandler",{enumerable:!0,get:function(){return u.DomHandler}}),Object.defineProperty(t,"DefaultHandler",{enumerable:!0,get:function(){return u.DomHandler}}),t.parseDocument=p,t.parseDOM=d,t.createDomStream=function(e,t,r){var n=new c.DomHandler(e,t,r);return new s.Parser(n,t)};var h=r(4614);Object.defineProperty(t,"Tokenizer",{enumerable:!0,get:function(){return a(h).default}}),t.ElementType=i(r(289));var f=r(557),g=r(557);Object.defineProperty(t,"getFeed",{enumerable:!0,get:function(){return g.getFeed}});var m={xmlMode:!0};t.parseFeed=function(e,t){return void 0===t&&(t=m),(0,f.getFeed)(d(e,t))},t.DomUtils=i(r(557))},4518:(e,t)=>{"use strict";function r(e){return"[object Object]"===Object.prototype.toString.call(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=function(e){var t,n;return!1!==r(e)&&(void 0===(t=e.constructor)||!1!==r(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}},8523:function(e,t){var r,n;void 0===(n="function"==typeof(r=function(){return function(e){function t(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e}function r(t){var r,n=t.exec(e.substring(g));if(n)return r=n[0],g+=r.length,r}for(var n,o,i,a,s,l=e.length,c=/^[ \t\n\r\u000c]+/,u=/^[, \t\n\r\u000c]+/,p=/^[^ \t\n\r\u000c]+/,d=/[,]+$/,h=/^\d+$/,f=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,g=0,m=[];;){if(r(u),g>=l)return m;n=r(p),o=[],","===n.slice(-1)?(n=n.replace(d,""),y()):_()}function _(){for(r(c),i="",a="in descriptor";;){if(s=e.charAt(g),"in descriptor"===a)if(t(s))i&&(o.push(i),i="",a="after descriptor");else{if(","===s)return g+=1,i&&o.push(i),void y();if("("===s)i+=s,a="in parens";else{if(""===s)return i&&o.push(i),void y();i+=s}}else if("in parens"===a)if(")"===s)i+=s,a="in descriptor";else{if(""===s)return o.push(i),void y();i+=s}else if("after descriptor"===a)if(t(s));else{if(""===s)return void y();a="in descriptor",g-=1}g+=1}}function y(){var t,r,i,a,s,l,c,u,p,d=!1,g={};for(a=0;a<o.length;a++)l=(s=o[a])[s.length-1],c=s.substring(0,s.length-1),u=parseInt(c,10),p=parseFloat(c),h.test(c)&&"w"===l?((t||r)&&(d=!0),0===u?d=!0:t=u):f.test(c)&&"x"===l?((t||r||i)&&(d=!0),p<0?d=!0:r=p):h.test(c)&&"h"===l?((i||r)&&(d=!0),0===u?d=!0:i=u):d=!0;d?console&&console.log&&console.log("Invalid srcset descriptor found in '"+e+"' at '"+s+"'."):(g.url=n,t&&(g.w=t),r&&(g.d=r),i&&(g.h=i),m.push(g))}}})?r.apply(t,[]):r)||(e.exports=n)},686:e=>{var t=String,r=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};e.exports=r(),e.exports.createColors=r},4926:(e,t,r)=>{const n=r(2904),o=r(8281),{isPlainObject:i}=r(4518),a=r(1857),s=r(8523),{parse:l}=r(5133),c=["img","audio","video","picture","svg","object","map","iframe","embed"],u=["script","style"];function p(e,t){e&&Object.keys(e).forEach((function(r){t(e[r],r)}))}function d(e,t){return{}.hasOwnProperty.call(e,t)}function h(e,t){const r=[];return p(e,(function(e){t(e)&&r.push(e)})),r}e.exports=g;const f=/^[^\0\t\n\f\r /<=>]+$/;function g(e,t,r){if(null==e)return"";"number"==typeof e&&(e=e.toString());let _="",y="";function v(e,t){const r=this;this.tag=e,this.attribs=t||{},this.tagPosition=_.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){M.length&&(M[M.length-1].text+=r.text)},this.updateParentNodeMediaChildren=function(){M.length&&c.includes(this.tag)&&M[M.length-1].mediaChildren.push(this.tag)}}(t=Object.assign({},g.defaults,t)).parser=Object.assign({},m,t.parser);const b=function(e){return!1===t.allowedTags||(t.allowedTags||[]).indexOf(e)>-1};u.forEach((function(e){b(e)&&!t.allowVulnerableTags&&console.warn(`\n\n⚠️ Your \`allowedTags\` option includes, \`${e}\`, which is inherently\nvulnerable to XSS attacks. Please remove it from \`allowedTags\`.\nOr, to disable this warning, add the \`allowVulnerableTags\` option\nand ensure you are accounting for this risk.\n\n`)}));const A=t.nonTextTags||["script","style","textarea","option"];let C,x;t.allowedAttributes&&(C={},x={},p(t.allowedAttributes,(function(e,t){C[t]=[];const r=[];e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(o(e).replace(/\\\*/g,".*")):C[t].push(e)})),r.length&&(x[t]=new RegExp("^("+r.join("|")+")$"))})));const w={},k={},S={};p(t.allowedClasses,(function(e,t){if(C&&(d(C,t)||(C[t]=[]),C[t].push("class")),w[t]=e,Array.isArray(e)){const r=[];w[t]=[],S[t]=[],e.forEach((function(e){"string"==typeof e&&e.indexOf("*")>=0?r.push(o(e).replace(/\\\*/g,".*")):e instanceof RegExp?S[t].push(e):w[t].push(e)})),r.length&&(k[t]=new RegExp("^("+r.join("|")+")$"))}}));const E={};let T,O,M,L,P,B,I;p(t.transformTags,(function(e,t){let r;"function"==typeof e?r=e:"string"==typeof e&&(r=g.simpleTransform(e)),"*"===t?T=r:E[t]=r}));let D=!1;j();const N=new n.Parser({onopentag:function(e,r){if(t.enforceHtmlBoundary&&"html"===e&&j(),B)return void I++;const n=new v(e,r);M.push(n);let o=!1;const c=!!n.text;let u;if(d(E,e)&&(u=E[e](e,r),n.attribs=r=u.attribs,void 0!==u.text&&(n.innerText=u.text),e!==u.tagName&&(n.name=e=u.tagName,P[O]=u.tagName)),T&&(u=T(e,r),n.attribs=r=u.attribs,e!==u.tagName&&(n.name=e=u.tagName,P[O]=u.tagName)),(!b(e)||"recursiveEscape"===t.disallowedTagsMode&&!function(e){for(const t in e)if(d(e,t))return!1;return!0}(L)||null!=t.nestingLimit&&O>=t.nestingLimit)&&(o=!0,L[O]=!0,"discard"===t.disallowedTagsMode&&-1!==A.indexOf(e)&&(B=!0,I=1),L[O]=!0),O++,o){if("discard"===t.disallowedTagsMode)return;y=_,_=""}_+="<"+e,"script"===e&&(t.allowedScriptHostnames||t.allowedScriptDomains)&&(n.innerText=""),(!C||d(C,e)||C["*"])&&p(r,(function(r,o){if(!f.test(o))return void delete n.attribs[o];if(""===r&&(t.nonBooleanAttributes.includes(o)||t.nonBooleanAttributes.includes("*")))return void delete n.attribs[o];let c=!1;if(!C||d(C,e)&&-1!==C[e].indexOf(o)||C["*"]&&-1!==C["*"].indexOf(o)||d(x,e)&&x[e].test(o)||x["*"]&&x["*"].test(o))c=!0;else if(C&&C[e])for(const t of C[e])if(i(t)&&t.name&&t.name===o){c=!0;let e="";if(!0===t.multiple){const n=r.split(" ");for(const r of n)-1!==t.values.indexOf(r)&&(""===e?e=r:e+=" "+r)}else t.values.indexOf(r)>=0&&(e=r);r=e}if(c){if(-1!==t.allowedSchemesAppliedToAttributes.indexOf(o)&&q(e,r))return void delete n.attribs[o];if("script"===e&&"src"===o){let e=!0;try{const n=$(r);if(t.allowedScriptHostnames||t.allowedScriptDomains){const r=(t.allowedScriptHostnames||[]).find((function(e){return e===n.url.hostname})),o=(t.allowedScriptDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=r||o}}catch(t){e=!1}if(!e)return void delete n.attribs[o]}if("iframe"===e&&"src"===o){let e=!0;try{const n=$(r);if(n.isRelativeUrl)e=d(t,"allowIframeRelativeUrls")?t.allowIframeRelativeUrls:!t.allowedIframeHostnames&&!t.allowedIframeDomains;else if(t.allowedIframeHostnames||t.allowedIframeDomains){const r=(t.allowedIframeHostnames||[]).find((function(e){return e===n.url.hostname})),o=(t.allowedIframeDomains||[]).find((function(e){return n.url.hostname===e||n.url.hostname.endsWith(`.${e}`)}));e=r||o}}catch(t){e=!1}if(!e)return void delete n.attribs[o]}if("srcset"===o)try{let e=s(r);if(e.forEach((function(e){q("srcset",e.url)&&(e.evil=!0)})),e=h(e,(function(e){return!e.evil})),!e.length)return void delete n.attribs[o];r=h(e,(function(e){return!e.evil})).map((function(e){if(!e.url)throw new Error("URL missing");return e.url+(e.w?` ${e.w}w`:"")+(e.h?` ${e.h}h`:"")+(e.d?` ${e.d}x`:"")})).join(", "),n.attribs[o]=r}catch(e){return void delete n.attribs[o]}if("class"===o){const t=w[e],i=w["*"],s=k[e],l=S[e],c=[s,k["*"]].concat(l).filter((function(e){return e}));if(!(u=r,p=t&&i?a(t,i):t||i,g=c,r=p?(u=u.split(/\s+/)).filter((function(e){return-1!==p.indexOf(e)||g.some((function(t){return t.test(e)}))})).join(" "):u).length)return void delete n.attribs[o]}if("style"===o)if(t.parseStyleAttributes)try{if(0===(r=function(e){return e.nodes[0].nodes.reduce((function(e,t){return e.push(`${t.prop}:${t.value}${t.important?" !important":""}`),e}),[]).join(";")}(function(e,t){if(!t)return e;const r=e.nodes[0];let n;return n=t[r.selector]&&t["*"]?a(t[r.selector],t["*"]):t[r.selector]||t["*"],n&&(e.nodes[0].nodes=r.nodes.reduce(function(e){return function(t,r){return d(e,r.prop)&&e[r.prop].some((function(e){return e.test(r.value)}))&&t.push(r),t}}(n),[])),e}(l(e+" {"+r+"}"),t.allowedStyles))).length)return void delete n.attribs[o]}catch(t){return"undefined"!=typeof window&&console.warn('Failed to parse "'+e+" {"+r+"}\", If you're running this in a browser, we recommend to disable style parsing: options.parseStyleAttributes: false, since this only works in a node environment due to a postcss dependency, More info: https://github.com/apostrophecms/sanitize-html/issues/547"),void delete n.attribs[o]}else if(t.allowedStyles)throw new Error("allowedStyles option cannot be used together with parseStyleAttributes: false.");_+=" "+o,r&&r.length&&(_+='="'+R(r,!0)+'"')}else delete n.attribs[o];var u,p,g})),-1!==t.selfClosing.indexOf(e)?_+=" />":(_+=">",!n.innerText||c||t.textFilter||(_+=R(n.innerText),D=!0)),o&&(_=y+R(_),y="")},ontext:function(e){if(B)return;const r=M[M.length-1];let n;if(r&&(n=r.tag,e=void 0!==r.innerText?r.innerText:e),"discard"!==t.disallowedTagsMode||"script"!==n&&"style"!==n){const r=R(e,!1);t.textFilter&&!D?_+=t.textFilter(r,n):D||(_+=r)}else _+=e;M.length&&(M[M.length-1].text+=e)},onclosetag:function(e,r){if(B){if(I--,I)return;B=!1}const n=M.pop();if(!n)return;if(n.tag!==e)return void M.push(n);B=!!t.enforceHtmlBoundary&&"html"===e,O--;const o=L[O];if(o){if(delete L[O],"discard"===t.disallowedTagsMode)return void n.updateParentNodeText();y=_,_=""}P[O]&&(e=P[O],delete P[O]),t.exclusiveFilter&&t.exclusiveFilter(n)?_=_.substr(0,n.tagPosition):(n.updateParentNodeMediaChildren(),n.updateParentNodeText(),-1!==t.selfClosing.indexOf(e)||r&&!b(e)&&["escape","recursiveEscape"].indexOf(t.disallowedTagsMode)>=0?o&&(_=y,y=""):(_+="</"+e+">",o&&(_=y+R(_),y=""),D=!1))}},t.parser);return N.write(e),N.end(),_;function j(){_="",O=0,M=[],L={},P={},B=!1,I=0}function R(e,r){return"string"!=typeof e&&(e+=""),t.parser.decodeEntities&&(e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r&&(e=e.replace(/"/g,"&quot;"))),e=e.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),r&&(e=e.replace(/"/g,"&quot;")),e}function q(e,r){for(r=r.replace(/[\x00-\x20]+/g,"");;){const e=r.indexOf("\x3c!--");if(-1===e)break;const t=r.indexOf("--\x3e",e+4);if(-1===t)break;r=r.substring(0,e)+r.substring(t+3)}const n=r.match(/^([a-zA-Z][a-zA-Z0-9.\-+]*):/);if(!n)return!!r.match(/^[/\\]{2}/)&&!t.allowProtocolRelative;const o=n[1].toLowerCase();return d(t.allowedSchemesByTag,e)?-1===t.allowedSchemesByTag[e].indexOf(o):!t.allowedSchemes||-1===t.allowedSchemes.indexOf(o)}function $(e){if((e=e.replace(/^(\w+:)?\s*[\\/]\s*[\\/]/,"$1//")).startsWith("relative:"))throw new Error("relative: exploit attempt");let t="relative://relative-site";for(let e=0;e<100;e++)t+=`/${e}`;const r=new URL(e,t);return{isRelativeUrl:r&&"relative-site"===r.hostname&&"relative:"===r.protocol,url:r}}}const m={decodeEntities:!0};g.defaults={allowedTags:["address","article","aside","footer","header","h1","h2","h3","h4","h5","h6","hgroup","main","nav","section","blockquote","dd","div","dl","dt","figcaption","figure","hr","li","main","ol","p","pre","ul","a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","kbd","mark","q","rb","rp","rt","rtc","ruby","s","samp","small","span","strong","sub","sup","time","u","var","wbr","caption","col","colgroup","table","tbody","td","tfoot","th","thead","tr"],nonBooleanAttributes:["abbr","accept","accept-charset","accesskey","action","allow","alt","as","autocapitalize","autocomplete","blocking","charset","cite","class","color","cols","colspan","content","contenteditable","coords","crossorigin","data","datetime","decoding","dir","dirname","download","draggable","enctype","enterkeyhint","fetchpriority","for","form","formaction","formenctype","formmethod","formtarget","headers","height","hidden","high","href","hreflang","http-equiv","id","imagesizes","imagesrcset","inputmode","integrity","is","itemid","itemprop","itemref","itemtype","kind","label","lang","list","loading","low","max","maxlength","media","method","min","minlength","name","nonce","optimum","pattern","ping","placeholder","popover","popovertarget","popovertargetaction","poster","preload","referrerpolicy","rel","rows","rowspan","sandbox","scope","shape","size","sizes","slot","span","spellcheck","src","srcdoc","srclang","srcset","start","step","style","tabindex","target","title","translate","type","usemap","value","width","wrap","onauxclick","onafterprint","onbeforematch","onbeforeprint","onbeforeunload","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","onhashchange","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onlanguagechange","onload","onloadeddata","onloadedmetadata","onloadstart","onmessage","onmessageerror","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onoffline","ononline","onpagehide","onpageshow","onpaste","onpause","onplay","onplaying","onpopstate","onprogress","onratechange","onreset","onresize","onrejectionhandled","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onstorage","onsubmit","onsuspend","ontimeupdate","ontoggle","onunhandledrejection","onunload","onvolumechange","onwaiting","onwheel"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src","srcset","alt","title","width","height","loading"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto","tel"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1,parseStyleAttributes:!0},g.simpleTransform=function(e,t,r){return r=void 0===r||r,t=t||{},function(n,o){let i;if(r)for(i in t)o[i]=t[i];else o=t;return{tagName:e,attribs:o}}}},8281:e=>{"use strict";e.exports=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}},3125:(e,t,r)=>{"use strict";let n=r(7906);class o extends n{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}e.exports=o,o.default=o,n.registerAtRule(o)},4826:(e,t,r)=>{"use strict";let n=r(2332);class o extends n{constructor(e){super(e),this.type="comment"}}e.exports=o,o.default=o},7906:(e,t,r)=>{"use strict";let n,o,i,a,{isClean:s,my:l}=r(8123),c=r(5545),u=r(4826),p=r(2332);function d(e){return e.map((e=>(e.nodes&&(e.nodes=d(e.nodes)),delete e.source,e)))}function h(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)h(t)}class f extends p{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map((e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e))):"every"===t||"some"===t?r=>e[t](((e,...t)=>r(e.toProxy(),...t))):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map((e=>e.toProxy())):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),o=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of o)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n<r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),o=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],o).reverse();n=this.index(e);for(let e of i)this.proxyOf.nodes.splice(n,0,e);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+i.length);return this.markDirty(),this}normalize(e,t){if("string"==typeof e)e=d(n(e).nodes);else if(Array.isArray(e)){e=e.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let t of e)t.parent&&t.parent.removeChild(t,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new c(e)]}else if(e.selector)e=[new o(e)];else if(e.name)e=[new i(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new u(e)]}return e.map((e=>(e[l]||f.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&h(e),void 0===e.raws.before&&t&&void 0!==t.raws.before&&(e.raws.before=t.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls((n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n}))}walkAtRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)})):this.walk(((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("atrule"===e.type)return t(e,r)})))}walkComments(e){return this.walk(((t,r)=>{if("comment"===t.type)return e(t,r)}))}walkDecls(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)})):this.walk(((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("decl"===e.type)return t(e,r)})))}walkRules(e,t){return t?e instanceof RegExp?this.walk(((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)})):this.walk(((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)})):(t=e,this.walk(((e,r)=>{if("rule"===e.type)return t(e,r)})))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}f.registerParse=e=>{n=e},f.registerRule=e=>{o=e},f.registerAtRule=e=>{i=e},f.registerRoot=e=>{a=e},e.exports=f,f.default=f,f.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,i.prototype):"rule"===e.type?Object.setPrototypeOf(e,o.prototype):"decl"===e.type?Object.setPrototypeOf(e,c.prototype):"comment"===e.type?Object.setPrototypeOf(e,u.prototype):"root"===e.type&&Object.setPrototypeOf(e,a.prototype),e[l]=!0,e.nodes&&e.nodes.forEach((e=>{f.rebuild(e)}))}},6696:(e,t,r)=>{"use strict";let n=r(686),o=r(5710);class i extends Error{constructor(e,t,r,n,o,a){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),n&&(this.source=n),a&&(this.plugin=a),void 0!==t&&void 0!==r&&("number"==typeof t?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,i)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=n.isColorSupported),o&&e&&(t=o(t));let r,i,a=t.split(/\r?\n/),s=Math.max(this.line-3,0),l=Math.min(this.line+2,a.length),c=String(l).length;if(e){let{bold:e,gray:t,red:o}=n.createColors(!0);r=t=>e(o(t)),i=e=>t(e)}else r=i=e=>e;return a.slice(s,l).map(((e,t)=>{let n=s+1+t,o=" "+(" "+n).slice(-c)+" | ";if(n===this.line){let t=i(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+i(o)+e+"\n "+t+r("^")}return" "+i(o)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}e.exports=i,i.default=i},5545:(e,t,r)=>{"use strict";let n=r(2332);class o extends n{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}e.exports=o,o.default=o},3078:(e,t,r)=>{"use strict";let n,o,i=r(7906);class a extends i{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new n(new o,this,e).stringify()}}a.registerLazyResult=e=>{n=e},a.registerProcessor=e=>{o=e},e.exports=a,a.default=a},1789:(e,t,r)=>{"use strict";let n=r(5545),o=r(5725),i=r(4826),a=r(3125),s=r(3235),l=r(9942),c=r(6779);function u(e,t){if(Array.isArray(e))return e.map((e=>u(e)));let{inputs:r,...p}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:s.prototype};r.map&&(r.map={...r.map,__proto__:o.prototype}),t.push(r)}}if(p.nodes&&(p.nodes=e.nodes.map((e=>u(e,t)))),p.source){let{inputId:e,...r}=p.source;p.source=r,null!=e&&(p.source.input=t[e])}if("root"===p.type)return new l(p);if("decl"===p.type)return new n(p);if("rule"===p.type)return new c(p);if("comment"===p.type)return new i(p);if("atrule"===p.type)return new a(p);throw new Error("Unknown node type: "+e.type)}e.exports=u,u.default=u},3235:(e,t,r)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:o}=r(984),{fileURLToPath:i,pathToFileURL:a}=r(9121),{isAbsolute:s,resolve:l}=r(5426),{nanoid:c}=r(6521),u=r(5710),p=r(6696),d=r(5725),h=Symbol("fromOffsetCache"),f=Boolean(n&&o),g=Boolean(l&&s);class m{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!g||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=l(t.from)),g&&f){let e=new d(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let o,i,s;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,s=e.col}else i=n.line,s=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let l=this.origin(t,r,i,s);return o=l?new p(e,void 0===l.endLine?l.line:{column:l.column,line:l.line},void 0===l.endLine?l.column:{column:l.endColumn,line:l.endLine},l.source,l.file,n.plugin):new p(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:s,line:i},this.css,this.file,n.plugin),o.input={column:r,endColumn:s,endLine:i,line:t,source:this.css},this.file&&(a&&(o.input.url=a(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[h])r=this[h];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,o=e.length;n<o;n++)r[n]=t,t+=e[n].length+1;this[h]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,o=r.length-2;for(;n<o;)if(t=n+(o-n>>1),e<r[t])o=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:l(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let o,l,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof r&&(o=c.originalPositionFor({column:n,line:r})),l=s(u.source)?a(u.source):new URL(u.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let p={column:u.column,endColumn:o&&o.column,endLine:o&&o.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!i)throw new Error("file: protocol is not available in this PostCSS build");p.file=i(l)}let d=c.sourceContentFor(u.source);return d&&(p.source=d),p}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}e.exports=m,m.default=m,u&&u.registerInput&&u.registerInput(m)},7369:(e,t,r)=>{"use strict";let{isClean:n,my:o}=r(8123),i=r(5002),a=r(406),s=r(7906),l=r(3078),c=(r(1724),r(3722)),u=r(6962),p=r(9942);const d={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},f={Once:!0,postcssPlugin:!0,prepare:!0};function g(e){return"object"==typeof e&&"function"==typeof e.then}function m(e){let t=!1,r=d[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function _(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:m(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function y(e){return e[n]=!1,e.nodes&&e.nodes.forEach((e=>y(e))),e}let v={};class b{constructor(e,t,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof t||null===t||"root"!==t.type&&"document"!==t.type)if(t instanceof b||t instanceof c)n=y(t.root),t.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let e=u;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(t,r)}catch(e){this.processed=!0,this.error=e}n&&!n[o]&&s.rebuild(n)}else n=y(t);this.result=new c(e,n,r),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map((e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e))}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!f[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(g(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];){e[n]=!0;let t=[_(e)];for(;t.length>0;){let e=this.visitTick(t);if(g(e))try{await e}catch(e){let r=t[t.length-1].node;throw this.handleError(e,r)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map((e=>r(e,this.helpers)));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map((t=>e.Once(t,this.helpers)));return g(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=a;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new i(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(g(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[n];)e[n]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(g(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:o}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(o.length>0&&t.visitorIndex<o.length){let[e,n]=o[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===o.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let o,i=t.iterator;for(;o=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!o[n])return o[n]=!0,void e.push(_(o));t.iterator=0,delete r.indexes[i]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[n]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[n]=!0;let t=m(e);for(let r of t)if(0===r)e.nodes&&e.each((e=>{e[n]||this.walkSync(e)}));else{let t=this.listeners[r];if(t&&this.visitSync(t,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}b.registerPostcss=e=>{v=e},e.exports=b,b.default=b,p.registerLazyResult(b),l.registerLazyResult(b)},5266:e=>{"use strict";let t={comma:e=>t.split(e,[","],!0),space:e=>t.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],o="",i=!1,a=0,s=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:s?r===l&&(s=!1):'"'===r||"'"===r?(s=!0,l=r):"("===r?a+=1:")"===r?a>0&&(a-=1):0===a&&t.includes(r)&&(i=!0),i?(""!==o&&n.push(o.trim()),o="",i=!1):o+=r;return(r||""!==o)&&n.push(o.trim()),n}};e.exports=t,t.default=t},5002:(e,t,r)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:o}=r(984),{dirname:i,relative:a,resolve:s,sep:l}=r(5426),{pathToFileURL:c}=r(9121),u=r(3235),p=Boolean(n&&o),d=Boolean(i&&s&&a&&l);e.exports=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),o=e.root||i(e.file);!1===this.mapOpts.sourcesContent?(t=new n(e.text),t.sourcesContent&&(t.sourcesContent=t.sourcesContent.map((()=>null)))):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/(\n)?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),d&&p&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(t=>{e+=t})),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=o.fromSourceMap(e)}else this.map=new o({file:this.outputFile()}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new o({file:this.outputFile()});let e,t,r=1,n=1,i="<no source>",a={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((o,s,l)=>{if(this.css+=o,s&&"end"!==l&&(a.generated.line=r,a.generated.column=n-1,s.source&&s.source.start?(a.source=this.sourcePath(s),a.original.line=s.source.start.line,a.original.column=s.source.start.column-1,this.map.addMapping(a)):(a.source=i,a.original.line=1,a.original.column=0,this.map.addMapping(a))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,s&&"start"!==l){let e=s.parent||{raws:{}};("decl"===s.type||"atrule"===s.type&&!s.nodes)&&s===e.last&&!e.raws.semicolon||(s.source&&s.source.end?(a.source=this.sourcePath(s),a.original.line=s.source.end.line,a.original.column=s.source.end.column-1,a.generated.line=r,a.generated.column=n-2,this.map.addMapping(a)):(a.source=i,a.original.line=1,a.original.column=0,a.generated.line=r,a.generated.column=n-1,this.map.addMapping(a)))}}))}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));let n=a(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}}));else{let e=new u(this.css,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}}));else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(c){let t=c(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===l&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}},2547:(e,t,r)=>{"use strict";let n=r(5002),o=r(406),i=(r(1724),r(6962));const a=r(3722);class s{constructor(e,t,r){let i;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s=o;this.result=new a(this._processor,i,this._opts),this.result.css=t;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new n(s,i,this._opts,t);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=i;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}e.exports=s,s.default=s},2332:(e,t,r)=>{"use strict";let{isClean:n,my:o}=r(8123),i=r(6696),a=r(1008),s=r(406);function l(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let o=e[n],i=typeof o;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=o:Array.isArray(o)?r[n]=o.map((e=>l(e,r))):("object"===i&&null!==o&&(o=l(o)),r[n]=o)}return r}class c{constructor(e={}){this.raws={},this[n]=!1,this[o]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of e[t])"function"==typeof r.clone?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=l(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new i(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[n]){this[n]=!1;let e=this;for(;e=e.parent;)e[n]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,o=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,o+=1):n+=1;return{column:n,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),o=n.indexOf(e.word);-1!==o&&(t=this.positionInside(o,n),r=this.positionInside(o+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new a).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let o=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e));else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let i=t.get(n.input);null==i&&(i=o,t.set(n.input,o),o++),r[e]={end:n.end,inputId:i,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map((e=>e.toJSON()))),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,(e=>{t+=e})),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}e.exports=c,c.default=c},6962:(e,t,r)=>{"use strict";let n=r(7906),o=r(7232),i=r(3235);function a(e,t){let r=new i(e,t),n=new o(r);try{n.parse()}catch(e){throw e}return n.root}e.exports=a,a.default=a,n.registerParse(a)},7232:(e,t,r)=>{"use strict";let n=r(5545),o=r(9464),i=r(4826),a=r(3125),s=r(9942),l=r(6779);const c={empty:!0,space:!0};e.exports=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.customProperty=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,o=new a;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,s=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){s=!0;break}if("}"===t){if(l.length>0){for(n=l.length-1,r=l[n];r&&"space"===r[0];)r=l[--n];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),s&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let o=t-1;o>=0&&(r=e[o],"space"===r[0]||(n+=1,2!==n));o--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,o=0;for(let[i,a]of e.entries()){if(t=a,r=t[0],"("===r&&(o+=1),")"===r&&(o-=1),0===o&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(t)}n=t}return!1}comment(e){let t=new i;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=o(this.input)}decl(e,t){let r=new n;this.init(r,e[0][2]);let o,i=e[e.length-1];for(";"===i[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(o=e.shift(),":"===o[0]){r.raws.between+=o[1];break}"word"===o[0]&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let a,s=[];for(;e.length&&(a=e[0][0],"space"===a||"comment"===a);)s.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if(o=e[t],"!important"===o[1].toLowerCase()){r.important=!0;let n=this.stringFrom(e,t);n=this.spacesFromEnd(e)+n," !important"!==n&&(r.raws.important=n);break}if("important"===o[1].toLowerCase()){let n=e.slice(0),o="";for(let e=t;e>0;e--){let t=n[e][0];if(0===o.trim().indexOf("!")&&"space"!==t)break;o=n.pop()[1]+o}0===o.trim().indexOf("!")&&(r.important=!0,r.raws.important=o,e=n)}if("space"!==o[0]&&"comment"!==o[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(r.raws.between+=s.map((e=>e[1])).join(""),s=[]),this.raw(r,"value",s.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new l;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,o=null,i=[],a=e[1].startsWith("--"),s=[],l=e;for(;l;){if(r=l[0],s.push(l),"("===r||"["===r)o||(o=l),i.push("("===r?")":"]");else if(a&&n&&"{"===r)o||(o=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(s,a);break}if("{"===r)return void this.rule(s);if("}"===r){this.tokenizer.back(s.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(o),t&&n){if(!a)for(;s.length&&(l=s[s.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(s.pop());this.decl(s,a)}else this.unknownWord(s)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let o,i,a,s,l=r.length,u="",p=!0;for(let e=0;e<l;e+=1)o=r[e],i=o[0],"space"!==i||e!==l-1||n?"comment"===i?(s=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",c[s]||c[a]||","===u.slice(-1)?p=!1:u+=o[1]):u+=o[1]:p=!1;if(!p){let n=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new l;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}}},5133:(e,t,r)=>{"use strict";let n=r(6696),o=r(5545),i=r(7369),a=r(7906),s=r(5367),l=r(406),c=r(1789),u=r(3078),p=r(8007),d=r(4826),h=r(3125),f=r(3722),g=r(3235),m=r(6962),_=r(5266),y=r(6779),v=r(9942),b=r(2332);function A(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}A.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...r);return o.postcssPlugin=e,o.postcssVersion=(new s).version,o}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return A([o(r)]).process(e,t)},o},A.stringify=l,A.parse=m,A.fromJSON=c,A.list=_,A.comment=e=>new d(e),A.atRule=e=>new h(e),A.decl=e=>new o(e),A.rule=e=>new y(e),A.root=e=>new v(e),A.document=e=>new u(e),A.CssSyntaxError=n,A.Declaration=o,A.Container=a,A.Processor=s,A.Document=u,A.Comment=d,A.Warning=p,A.AtRule=h,A.Result=f,A.Input=g,A.Rule=y,A.Root=v,A.Node=b,i.registerPostcss(A),e.exports=A,A.default=A},5725:(e,t,r)=>{"use strict";let{SourceMapConsumer:n,SourceMapGenerator:o}=r(984),{existsSync:i,readFileSync:a}=r(473),{dirname:s,join:l}=r(5426);class c{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new n(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=s(e),i(e))return this.mapFile=e,a(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof n)return o.fromSourceMap(t).toString();if(t instanceof o)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=l(s(e),t)),this.loadFile(t)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}e.exports=c,c.default=c},5367:(e,t,r)=>{"use strict";let n=r(2547),o=r(7369),i=r(3078),a=r(9942);class s{constructor(e=[]){this.version="8.4.31",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return 0===this.plugins.length&&void 0===t.parser&&void 0===t.stringifier&&void 0===t.syntax?new n(this,e,t):new o(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}e.exports=s,s.default=s,a.registerProcessor(s),i.registerProcessor(s)},3722:(e,t,r)=>{"use strict";let n=r(8007);class o{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new n(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}}e.exports=o,o.default=o},9942:(e,t,r)=>{"use strict";let n,o,i=r(7906);class a extends i{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new n(new o,this,e).stringify()}}a.registerLazyResult=e=>{n=e},a.registerProcessor=e=>{o=e},e.exports=a,a.default=a,i.registerRoot(a)},6779:(e,t,r)=>{"use strict";let n=r(7906),o=r(5266);class i extends n{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return o.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}e.exports=i,i.default=i,n.registerRule(i)},1008:e=>{"use strict";const t={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1};class r{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+n+o,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,o=0;for(;n&&"root"!==n.type;)o+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<o;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let o=e.nodes[n],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,r,n){let o;if(n||(n=r),r&&(o=e.raws[r],void 0!==o))return o;let i=e.parent;if("before"===n){if(!i||"root"===i.type&&i.first===e)return"";if(i&&"document"===i.type)return""}if(!i)return t[n];let a=e.root();if(a.rawCache||(a.rawCache={}),void 0!==a.rawCache[n])return a.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);{let t="raw"+((s=n)[0].toUpperCase()+s.slice(1));this[t]?o=this[t](a,e):a.walk((e=>{if(o=e.raws[r],void 0!==o)return!1}))}var s;return void 0===o&&(o=t[n]),a.rawCache[n]=o,o}rawBeforeClose(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls((e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk((e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1})),t}rawBeforeRule(e){let t;return e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1})),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls((e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1})),t}rawEmptyBody(e){let t;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1})),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk((r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}})),t}rawSemicolon(e){let t;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1})),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}e.exports=r,r.default=r},406:(e,t,r)=>{"use strict";let n=r(1008);function o(e,t){new n(t).stringify(e)}e.exports=o,o.default=o},8123:e=>{"use strict";e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")},9464:e=>{"use strict";const t="'".charCodeAt(0),r='"'.charCodeAt(0),n="\\".charCodeAt(0),o="/".charCodeAt(0),i="\n".charCodeAt(0),a=" ".charCodeAt(0),s="\f".charCodeAt(0),l="\t".charCodeAt(0),c="\r".charCodeAt(0),u="[".charCodeAt(0),p="]".charCodeAt(0),d="(".charCodeAt(0),h=")".charCodeAt(0),f="{".charCodeAt(0),g="}".charCodeAt(0),m=";".charCodeAt(0),_="*".charCodeAt(0),y=":".charCodeAt(0),v="@".charCodeAt(0),b=/[\t\n\f\r "#'()/;[\\\]{}]/g,A=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,x=/[\da-f]/i;e.exports=function(e,w={}){let k,S,E,T,O,M,L,P,B,I,D=e.css.valueOf(),N=w.ignoreErrors,j=D.length,R=0,q=[],$=[];function F(t){throw e.error("Unclosed "+t,R)}return{back:function(e){$.push(e)},endOfFile:function(){return 0===$.length&&R>=j},nextToken:function(e){if($.length)return $.pop();if(R>=j)return;let w=!!e&&e.ignoreUnclosed;switch(k=D.charCodeAt(R),k){case i:case a:case l:case c:case s:S=R;do{S+=1,k=D.charCodeAt(S)}while(k===a||k===i||k===l||k===c||k===s);I=["space",D.slice(R,S)],R=S-1;break;case u:case p:case f:case g:case y:case m:case h:{let e=String.fromCharCode(k);I=[e,e,R];break}case d:if(P=q.length?q.pop()[1]:"",B=D.charCodeAt(R+1),"url"===P&&B!==t&&B!==r&&B!==a&&B!==i&&B!==l&&B!==s&&B!==c){S=R;do{if(M=!1,S=D.indexOf(")",S+1),-1===S){if(N||w){S=R;break}F("bracket")}for(L=S;D.charCodeAt(L-1)===n;)L-=1,M=!M}while(M);I=["brackets",D.slice(R,S+1),R,S],R=S}else S=D.indexOf(")",R+1),T=D.slice(R,S+1),-1===S||C.test(T)?I=["(","(",R]:(I=["brackets",T,R,S],R=S);break;case t:case r:E=k===t?"'":'"',S=R;do{if(M=!1,S=D.indexOf(E,S+1),-1===S){if(N||w){S=R+1;break}F("string")}for(L=S;D.charCodeAt(L-1)===n;)L-=1,M=!M}while(M);I=["string",D.slice(R,S+1),R,S],R=S;break;case v:b.lastIndex=R+1,b.test(D),S=0===b.lastIndex?D.length-1:b.lastIndex-2,I=["at-word",D.slice(R,S+1),R,S],R=S;break;case n:for(S=R,O=!0;D.charCodeAt(S+1)===n;)S+=1,O=!O;if(k=D.charCodeAt(S+1),O&&k!==o&&k!==a&&k!==i&&k!==l&&k!==c&&k!==s&&(S+=1,x.test(D.charAt(S)))){for(;x.test(D.charAt(S+1));)S+=1;D.charCodeAt(S+1)===a&&(S+=1)}I=["word",D.slice(R,S+1),R,S],R=S;break;default:k===o&&D.charCodeAt(R+1)===_?(S=D.indexOf("*/",R+2)+1,0===S&&(N||w?S=D.length:F("comment")),I=["comment",D.slice(R,S+1),R,S],R=S):(A.lastIndex=R+1,A.test(D),S=0===A.lastIndex?D.length-1:A.lastIndex-2,I=["word",D.slice(R,S+1),R,S],q.push(I),R=S)}return R++,I},position:function(){return R}}}},1724:e=>{"use strict";let t={};e.exports=function(e){t[e]||(t[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}},8007:e=>{"use strict";class t{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}e.exports=t,t.default=t},7538:(e,t,r)=>{var n=r(1892),o=r(6298);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},7998:(e,t,r)=>{var n=r(1892),o=r(2707);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},3278:(e,t,r)=>{var n=r(1892),o=r(6469);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},3457:(e,t,r)=>{var n=r(1892),o=r(9042);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},1044:(e,t,r)=>{var n=r(1892),o=r(828);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},3930:(e,t,r)=>{var n=r(1892),o=r(9116);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},3364:(e,t,r)=>{var n=r(1892),o=r(6958);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},5318:(e,t,r)=>{var n=r(1892),o=r(3558);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},2484:(e,t,r)=>{var n=r(1892),o=r(5235);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},7863:(e,t,r)=>{var n=r(1892),o=r(7586);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},6513:(e,t,r)=>{var n=r(1892),o=r(7017);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.id,o,""]]);n(o,{insert:"head",singleton:!1}),e.exports=o.locals||{}},1892:(e,t,r)=>{"use strict";var n,o=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]}}(),i=[];function a(e){for(var t=-1,r=0;r<i.length;r++)if(i[r].identifier===e){t=r;break}return t}function s(e,t){for(var r={},n=[],o=0;o<e.length;o++){var s=e[o],l=t.base?s[0]+t.base:s[0],c=r[l]||0,u="".concat(l," ").concat(c);r[l]=c+1;var p=a(u),d={css:s[1],media:s[2],sourceMap:s[3]};-1!==p?(i[p].references++,i[p].updater(d)):i.push({identifier:u,updater:g(d,t),references:1}),n.push(u)}return n}function l(e){var t=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=r.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){t.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(t);else{var a=o(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 c,u=(c=[],function(e,t){return c[e]=t,c.filter(Boolean).join("\n")});function p(e,t,r,n){var o=r?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=u(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,f=0;function g(e,t){var r,n,o;if(t.singleton){var i=f++;r=h||(h=l(t)),n=p.bind(null,r,i,!1),o=p.bind(null,r,i,!0)}else r=l(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=(void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n));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=a(r[n]);i[o].references--}for(var l=s(e,t),c=0;c<r.length;c++){var u=a(r[c]);0===i[u].references&&(i[u].updater(),i.splice(u,1))}r=l}}}},9320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoscrollButton=void 0;var n=r(4522),o=r(3457),i=r(1972),a=KalturaPlayer.ui.preacti18n,s=a.withText,l=a.Text,c={autoScrollLabel:(0,n.h)(l,{id:"transcript.auto_scroll"},"Resume AutoScroll")};t.AutoscrollButton=s(c)((function(e){var t=e.onClick,r=e.isAutoScrollEnabled,a=e.setAutoscrollButtonRef,s=e.autoScrollLabel;return(0,n.h)("div",{className:o.autoscrollRoot,tabIndex:r?-1:1},(0,n.h)(i.Button,{onClick:t,setRef:a,className:"".concat(o.autoscrollButton," ").concat(r?"":o.autoscrollButtonVisible),type:i.ButtonType.primary,icon:"autoScroll",tooltip:{label:s,type:"left"},ariaLabel:s}))}))},7099:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(9320),t)},9291:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.CaptionList=void 0;var a=r(4522),s=r(4539),l=r(6734),c=r(1044),u=KalturaPlayer.ui.utils.KeyMap,p=u.END,d=u.HOME,h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._currentCaptionRef=null,t._firstCaptionRef=null,t._lastCaptionRef=null,t._handleClick=function(e){return function(){(0,t.props.onSeek)(e)}},t._getShouldScroll=function(e){var r=t.props,n=r.isAutoScrollEnabled,o=r.highlightedMap;return n&&o[e]},t._getShouldScrollToSearchMatch=function(e){var r=t.props,n=r.isAutoScrollEnabled,o=r.searchMap,i=r.activeSearchIndex;return!n&&o[e]&&void 0!==o[e][i]},t._getSearchProps=function(e){var r=t.props,n=r.searchMap,o=r.activeSearchIndex,i=r.captionProps,a={};return n[e]&&(a.indexMap=n[e],a.activeSearchIndex=o,a.searchLength=i.searchLength),a},t._getCaptionProps=function(e){var r=t.props,n=r.highlightedMap,o=r.captionProps,a=r.isAutoScrollEnabled,l=e.id;return i({showTime:o.showTime,scrollTo:o.scrollTo,scrollToSearchMatch:o.scrollToSearchMatch,key:l,onClick:t._handleClick(e),caption:e,highlighted:n,longerThanHour:o.videoDuration>=s.HOUR,shouldScroll:t._getShouldScroll(l),shouldScrollToSearchMatch:t._getShouldScrollToSearchMatch(l),isAutoScrollEnabled:a,searchCaption:t.props.searchMap[e.id]},t._getSearchProps(l))},t._handleKeyUp=function(e){var r,n,o,i;e.keyCode===p?null===(n=null===(r=t._lastCaptionRef)||void 0===r?void 0:r._hotspotRef)||void 0===n||n.focus():e.keyCode===d&&(null===(i=null===(o=t._firstCaptionRef)||void 0===o?void 0:o._hotspotRef)||void 0===i||i.focus())},t}return o(t,e),t.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.highlightedMap,n=t.data,o=t.searchMap,i=t.activeSearchIndex,a=t.isAutoScrollEnabled,s=t.captionProps;return r!==e.highlightedMap||n!==e.data||o!==e.searchMap||i!==e.activeSearchIndex||a!==e.isAutoScrollEnabled||s.videoDuration!==e.captionProps.videoDuration},t.prototype.render=function(){var e=this,t=this.props.data,r=!1;return(0,a.h)("div",{className:c.transcriptWrapper,onKeyUp:this._handleKeyUp},t.map((function(n,o){var s=e._getCaptionProps(n);return(0,a.h)(l.Caption,i({ref:function(i){0===o?e._firstCaptionRef=i:o===t.length-1&&(e._lastCaptionRef=i),s.searchCaption&&Object.keys(s.searchCaption).forEach((function(t){parseInt(t)===e.props.activeSearchIndex&&(e._currentCaptionRef=i,r=!0)})),!r&&s.highlighted[n.id]&&(e._currentCaptionRef=i)}},s))})))},t}(a.Component);t.CaptionList=h},5271:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(9291),t)},5348:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Caption=void 0;var a=r(4522),s=r(979),l=r(4539),c=r(3930),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._hotspotRef=null,t._handleClick=function(){t._gotoCurrentTime()},t._gotoCurrentTime=function(){var e=t.props,r=e.caption,n=e.onClick;r.text.length&&n()},t._renderText=function(e){var r=t.props,n=r.activeSearchIndex,o=r.searchLength,i=r.indexMap,s=[];return i&&(s=Object.keys(i).sort((function(e,t){return Number(e)-Number(t)}))),0===(null==e?void 0:e.length)?null:(0,a.h)("span",{className:c.captionSpan},i?s.map((function(t,r){var l=0===r?e.substring(0,i[t]):"",u=e.substring(i[t],i[t]+o),p=e.substring(i[t]+o,r-1===s.length?e.length:i[s[r+1]]);return(0,a.h)("span",null,l,(0,a.h)("span",{className:Number(t)===n?c.activeSearch:c.highlightSearch},u),p)})):e)},t}return o(t,e),t.prototype.componentDidUpdate=function(){this._hotspotRef&&this.props.shouldScroll?this.props.scrollTo(this._hotspotRef):this._hotspotRef&&this.props.shouldScrollToSearchMatch&&this.props.scrollToSearchMatch(this._hotspotRef)},t.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.indexMap,n=t.highlighted,o=t.isAutoScrollEnabled,i=t.activeSearchIndex;return t.longerThanHour!==e.longerThanHour||n!==e.highlighted||!(!n||o===e.isAutoScrollEnabled)||r!==e.indexMap||!(!r||!e.indexMap||r[i]===e.indexMap[e.activeSearchIndex])},t.prototype.render=function(){var e=this,t=this.props,r=t.caption,n=t.highlighted,o=t.showTime,u=t.longerThanHour,p=r.startTime,d=r.id,h=Object.keys(n)[0]===d,f=o?(0,l.secondsToTime)(p,u):"",g={ariaCurrent:h,tabIndex:0,ariaLabel:"".concat(f).concat(o?" ":"").concat(r.text),role:"button"};return(0,a.h)(s.A11yWrapper,{onClick:this._handleClick},(0,a.h)("div",i({className:c.caption,ref:function(t){e._hotspotRef=t}},g),o&&(0,a.h)("div",{className:c.captionTime,"aria-hidden":"true"},f),(0,a.h)("div",{"aria-hidden":"true",className:"".concat(c.captionContent," ").concat(h?c.highlighted:""," ").concat(o?"":c.withoutTime)},this._renderText(r.text))))},t}(a.Component);t.Caption=u},6734:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5348),t)},1293:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.icons=void 0,(r=t.icons||(t.icons={})).PLUGIN_ICON="M23.1111111,19 C23.6020309,19 24,19.4477153 24,20 C24,20.5522847 23.6020309,21 23.1111111,21 L8.88888889,21 C8.39796911,21 8,20.5522847 8,20 C8,19.4477153 8.39796911,19 8.88888889,19 L23.1111111,19 Z M24.8695652,3 C26.5984566,3 28,4.24720677 28,5.78571429 L28,26.2142857 C28,27.7527932 26.5984566,29 24.8695652,29 L7.13043478,29 C5.40154339,29 4,27.7527932 4,26.2142857 L4,5.78571429 C4,4.24720677 5.40154339,3 7.13043478,3 L24.8695652,3 Z M26,17 L6,17 L6,26.0833333 C6,26.5895944 6.47127921,27 7.05263158,27 L24.9473684,27 C25.5287208,27 26,26.5895944 26,26.0833333 L26,17 Z M8.88888889,23 L23.1111111,23 C23.6020309,23 24,23.4477153 24,24 C24,24.5128358 23.6568532,24.9355072 23.2147743,24.9932723 L23.1111111,25 L8.88888889,25 C8.39796911,25 8,24.5522847 8,24 C8,23.4871642 8.34314684,23.0644928 8.78522567,23.0067277 L8.88888889,23 L23.1111111,23 L8.88888889,23 Z M24.9473684,5 L7.05263158,5 C6.47127921,5 6,5.41040565 6,5.91666667 L6,15 L26,15 L26,5.91666667 C26,5.41040565 25.5287208,5 24.9473684,5 Z",r.BigSize=32,r.MediumSize=24,r.SmallSize=16},2351:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PluginButton=void 0;var n=r(4522),o=r(3364),i=r(2052),a=r(1293),s=KalturaPlayer.ui.components,l=s.Tooltip,c=s.Icon;t.PluginButton=function(e){var t=e.isActive,r=e.label,s=e.id,u=e.icon,p=e.dataTestId,d=e.setRef;return(0,n.h)(l,{label:r,type:"bottom"},(0,n.h)("button",{ref:function(e){d&&d(e)},type:"button","aria-label":r,className:[i.ui.style.upperBarIcon,o.pluginButton,t?o.active:""].join(" "),"data-testid":p},(0,n.h)(c,{id:s,height:a.icons.BigSize,width:a.icons.BigSize,viewBox:"0 0 ".concat(a.icons.BigSize," ").concat(a.icons.BigSize),path:u,hidden:"true"})))},t.PluginButton.defaultProps={dataTestId:"transcript_pluginButton"}},8909:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverMenu=void 0;var n=r(1664);Object.defineProperty(t,"PopoverMenu",{enumerable:!0,get:function(){return n.PopoverMenu}})},1664:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.PopoverMenu=void 0;var a=r(979),s=r(4522),l=KalturaPlayer.ui.components.Tooltip,c=KalturaPlayer.ui.preacti18n,u=c.withText,p=c.Text,d=KalturaPlayer.ui.Event.withEventManager,h=KalturaPlayer.ui.utils.KeyMap.TAB,f=r(5318),g={moreOptionsLabel:(0,s.h)(p,{id:"transcript.more_options"},"More transcript options")},m=function(e){function t(t){var r,n,o=this;return(o=e.call(this,t)||this)._controlElementRef=null,o._popoverElementRef=null,o._itemsRefMap=new Map,o.handleMouseEvent=function(e){var t;(null===(t=o._controlElementRef)||void 0===t?void 0:t.contains(e.target))||o.closePopover()},o.handleKeydownEvent=function(e){var t,r,n=e.target;!o.state.isOpen||e.keyCode!==h||(null===(t=o._controlElementRef)||void 0===t?void 0:t.contains(n))||(null===(r=o._popoverElementRef)||void 0===r?void 0:r.contains(n))||o.closePopover()},o._handleUpKeyPressed=function(e){return function(){var t;null===(t=o._getItemRef(e-1))||void 0===t||t.focus()}},o._handleDownKeyPressed=function(e){return function(){var t;null===(t=o._getItemRef(e+1))||void 0===t||t.focus()}},o.togglePopover=function(e){var t=!o.state.isOpen;o.setState({isOpen:t},(function(){var r;if(t&&e){var n=o.props.items.findIndex((function(e){return!e.isDisabled}));-1!==n&&(null===(r=o._getItemRef(n))||void 0===r||r.focus())}}))},o._getItemRef=function(e){return o._itemsRefMap.get(e)},o._setItemRef=function(e,t){return o._itemsRefMap.set(e,t)},o.state={isOpen:!1},null===(r=o.props.eventManager)||void 0===r||r.listen(document,"click",o.handleMouseEvent),null===(n=o.props.eventManager)||void 0===n||n.listen(document,"keydown",o.handleKeydownEvent),o}return o(t,e),t.prototype.componentWillUnmount=function(){this._itemsRefMap=new Map},t.prototype.closePopover=function(){this.setState({isOpen:!1})},t.prototype.render=function(){var e=this,t=this.props,r=t.children,n=t.items,o=(0,s.h)("div",{className:f.popoverContainer},(0,s.h)(a.A11yWrapper,{onClick:function(t){t.stopPropagation(),e.togglePopover(!0)}},(0,s.h)("div",{"aria-label":this.props.moreOptionsLabel,tabIndex:0,"data-testid":"popover-anchor-container",className:"".concat(f.popoverAnchorContainer," ").concat(this.state.isOpen?f.active:""),ref:function(t){e._controlElementRef=t}},(0,s.h)("div",{className:f.popoverAnchor},r))),(0,s.h)("div",{className:f.popoverComponent,role:"menu","aria-expanded":this.state.isOpen,ref:function(t){e._popoverElementRef=t}},this.state.isOpen?n.map((function(t,r){var n=t.label,o=t.onClick,i=t.testId,l=t.isDisabled;return(0,s.h)(a.A11yWrapper,{role:"menuitem",onClick:function(){l||(e.closePopover(),o())},onDownKeyPressed:function(){l||e._handleDownKeyPressed(r)},onUpKeyPressed:function(){l||e._handleUpKeyPressed(r)}},(0,s.h)("div",{tabIndex:l?-1:0,role:"menuitem",className:"".concat(f.popoverMenuItem," ").concat(l?f.popoverMenuItemDisabled:""),"data-testid":i,ref:function(t){e._setItemRef(r,t)}},n))})):null));return this.state.isOpen?o:(0,s.h)("div",null,(0,s.h)(l,{label:this.props.moreOptionsLabel},o))},i([u(g),d],t)}(s.Component);t.PopoverMenu=m},3517:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(8372),t)},8372:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Search=void 0;var i=r(4522),a=r(178),s=KalturaPlayer.ui.preacti18n,l=s.withText,c=s.Text,u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._inputField=null,t}return o(t,e),t.prototype.shouldComponentUpdate=function(e){var t=this.props,r=t.value,n=t.activeSearchIndex,o=t.totalSearchResults,i=t.kitchenSinkActive;return r!==e.value||n!==e.activeSearchIndex||o!==e.totalSearchResults||i!==e.kitchenSinkActive},t.prototype.componentDidUpdate=function(e){var t,r=this.props,n=r.kitchenSinkActive,o=r.toggledWithEnter;!e.kitchenSinkActive&&n&&o&&(null===(t=this._inputField)||void 0===t||t.setFocus({preventScroll:!0}))},t.prototype.render=function(){var e=this,t=this.props,r=t.value,n=t.totalSearchResults,o=t.activeSearchIndex,s=t.onChange,l=t.onSearchIndexChange;return(0,i.h)(a.InputField,{ref:function(t){e._inputField=t},value:r,onChange:s,placeholder:this.props.searchLabel,clearSearchLabel:this.props.clearSearchLabel,searchResults:{activeSearchIndex:o,totalSearchResults:n,onSearchIndexChange:l,nextMatchLabel:this.props.nextMatchLabel,prevMatchLabel:this.props.prevMatchLabel,searchResultsLabel:this.props.searchResultsLabel}})},t}(i.Component);t.Search=l((function(e){var t=e.activeSearchIndex,r=e.totalSearchResults;return{searchLabel:(0,i.h)(c,{id:"transcript.search"},"Search in Transcript"),clearSearchLabel:(0,i.h)(c,{id:"transcript.clear_search"},"Clear search"),nextMatchLabel:(0,i.h)(c,{id:"transcript.next_search_match"},"Next search result"),prevMatchLabel:(0,i.h)(c,{id:"transcript.prev_search_match"},"Previous search result"),searchResultsLabel:(0,i.h)(c,{id:"transcript.search_results",fields:{current:r>0?t:0,total:r}},"Search result ".concat(r>0?t:0," out of ").concat(r))}}))(u)},7123:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(4142),t)},4142:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.SmallScreenSlate=void 0;var a=r(4522),s=r(1972),l=r(4820),c=r(2052),u=c.ui.Components.withPlayer,p=c.ui.redux.connect,d=c.ui.preacti18n,h=d.withText,f=d.Text,g=r(2484),m=function(e){return{isMobile:e.shell.isMobile}},_={smallScreenText:(0,a.h)(f,{id:"transcript.small_screen"},"To see the transcript, go to full screen"),smallScreenMobileText:(0,a.h)(f,{id:"transcript.small_screen_mobile"},"To see the transcript, rotate the phone"),hideTranscript:(0,a.h)(f,{id:"transcript.hide_plugin"},"Hide Transcript")},y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){var e=this.props,t=e.isMobile,r=e.smallScreenMobileText,n=e.smallScreenText,o=e.onClose,i=e.toggledWithEnter,c=e.player,u=e.hideTranscript;return(0,a.h)("div",{className:g.smallScreenWrapper,"data-testid":"transcript_smallScreenWrapper"},(0,a.h)(s.Button,{icon:"close",onClick:o,type:s.ButtonType.borderless,focusOnMount:i,className:g.closeButton,ariaLabel:u,testId:"transcript_smallScreenClose"}),(0,a.h)("div",{className:g.contentWrapper},t?(0,a.h)(l.Icon,{name:"screenRotation",size:l.IconSize.large}):(0,a.h)(s.Button,{icon:"expand",onClick:function(){return null==c?void 0:c.enterFullscreen()},type:s.ButtonType.borderless,size:s.ButtonSize.medium,ariaLabel:n,testId:"transcript_smallScreenFullscreen"}),(0,a.h)("div",{className:g.textContent,"data-testid":"transcript_smallScreenTextContent"},t?r:n)))},i([h(_),u,p(m)],t)}(a.Component);t.SmallScreenSlate=y},1797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(4350),t)},4350:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Spinner=void 0;var i=r(4522),a=r(7863),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.render=function(){return(0,i.h)("div",{className:a.transcriptLoader},Array.apply(null,Array(20)).map((function(e,t){return(0,i.h)("svg",{key:t,width:"100%",height:"50",viewBox:"0 0 100% 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("rect",{x:"16",y:"8",width:"90%",height:"12",rx:"4",fill:"white"}),(0,i.h)("rect",{x:"16",y:"30",width:"60%",height:"12",rx:"4",fill:"white"}))})))},t}(i.Component);t.Spinner=s},244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TranscriptMenu=void 0;var n=r(6209);Object.defineProperty(t,"TranscriptMenu",{enumerable:!0,get:function(){return n.TranscriptMenu}})},6209:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.TranscriptMenu=void 0;var a=r(4522),s=r(8909),l=r(1972),c=KalturaPlayer.ui.preacti18n,u=c.withText,p=c.Text,d={printTranscript:(0,a.h)(p,{id:"transcript.print_transcript"},"Print current transcript"),downloadTranscript:(0,a.h)(p,{id:"transcript.download_transcript"},"Download current transcript")},h=function(e){function t(t){var r=e.call(this)||this,n=t.downloadDisabled,o=t.onDownload,i=t.printDisabled,a=t.onPrint,s=t.printTranscript,l=t.downloadTranscript,c=t.isLoading,u=[];return n||u.push({testId:"download-menu-item",label:l,onClick:o,isDisabled:c}),i||u.push({testId:"print-menu-item",label:s,onClick:a,isDisabled:c}),r.state={items:u},r}return o(t,e),t.prototype.render=function(){return this.state.items.length?(0,a.h)(s.PopoverMenu,{items:this.state.items},(0,a.h)(l.Button,{type:l.ButtonType.borderless,icon:"more",tabIndex:-1})):null},i([u(d)],t)}(a.Component);t.TranscriptMenu=h},536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorIcon=void 0;var n=r(4522);t.ErrorIcon=function(){return(0,n.h)("svg",{width:"184px",height:"184px",viewBox:"0 0 184 184",version:"1.1",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},(0,n.h)("g",{id:"IL/-Error",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},(0,n.h)("circle",{id:"Oval",fill:"#333333",cx:"92",cy:"92",r:"92"}),(0,n.h)("path",{d:"M86.8445942,41 C98.1281098,41 107.894768,46.3707345 112.610486,54.1896075 L112.772795,54.4651697 C121.905986,54.9935965 129.089492,60.510023 129.089492,67.2372881 C129.089492,67.4828605 129.07992,67.7268193 129.06103,67.9689809 C143.527428,69.1244669 154.803778,78.4637688 154.803778,89.8135593 C154.803778,101.945102 141.920543,111.779661 126.028268,111.779661 C122.218304,111.779661 118.581281,111.214432 115.253251,110.187831 C110.482744,111.936312 104.172429,113 97.2527575,113 C90.6076765,113 84.5245506,112.019057 79.8270144,110.392971 C76.2815407,111.290993 72.4601472,111.779661 68.4772473,111.779661 C49.8799037,111.779661 34.8037779,101.125556 34.8037779,87.9830508 C34.8037779,77.4055553 44.569383,68.439928 58.0766538,65.3432099 C58.0715743,65.1615713 58.069084,64.9793312 58.069084,64.7966102 C58.069084,51.6541053 70.9523188,41 86.8445942,41 Z",id:"Combined-Shape",fill:"#1A7080"}),(0,n.h)("path",{d:"M83.1492849,135.070223 C82.1325765,138.189187 86.1421275,140.443183 88.278329,137.95355 L112.039401,110.261242 C113.708897,108.315531 112.326427,105.307692 109.76264,105.307692 L102.55417,105.307692 L108.530391,92.2483573 C109.439682,90.2613598 107.987631,88 105.802461,88 L90.6745782,88 C89.4360625,88 88.3248534,88.7610908 87.8773011,89.9159147 L79.0065008,112.805338 C78.2445332,114.771451 79.6951774,116.889423 81.8037779,116.889423 L89.0757959,116.889423 L83.1492849,135.070223 Z",id:"Path-8",fill:"#333333","fill-rule":"nonzero"}),(0,n.h)("polygon",{id:"Path-8",fill:"#999999",points:"90.6745782 91 81.8037779 113.889423 93.2090926 113.889423 86.0015674 136 109.76264 108.307692 97.8821035 108.307692 105.802461 91"}),(0,n.h)("polygon",{id:"Path-8",fill:"#01ACCD",opacity:"0.5",points:"90.6745782 91 81.8037779 113.889423 93.2090926 113.889423 86.0015674 136 109.76264 108.307692 97.8821035 108.307692 105.802461 91"}),(0,n.h)("path",{d:"M86.9135883,41 C90.3885178,41 93.7197752,41.5049061 96.8044095,42.4302153 C80.0521708,44.2102049 67.0736479,56.714855 67.0736479,71.8761372 C67.0736479,72.1038764 67.0765763,72.331016 67.0824019,72.557529 C51.5088979,76.3414085 40.1641521,87.1546035 39.7216459,99.9991784 C36.6015945,96.4151247 34.8037779,92.202078 34.8037779,87.6945045 C34.8037779,77.1820037 44.5822685,68.2714617 58.1073807,65.1937351 C58.1024214,65.013137 58.0999284,64.8320391 58.0999284,64.6504633 C58.0999284,51.5886731 71.0002433,41 86.9135883,41 Z",id:"Combined-Shape",fill:"#222222",opacity:"0.3"}),(0,n.h)("path",{d:"M90.8028945,22 L90.8028945,29.0476864 C90.8028945,29.5999712 91.2506097,30.0476864 91.8028945,30.0476864 C92.3551792,30.0476864 92.8028945,29.5999712 92.8028945,29.0476864 L92.8028945,22 C92.8028945,21.4477153 92.3551792,21 91.8028945,21 C91.2506097,21 90.8028945,21.4477153 90.8028945,22 Z M126.112197,30.8515352 L121.582032,36.2503762 C121.22703,36.6734508 121.282214,37.3042064 121.705288,37.6592082 C122.128363,38.01421 122.759119,37.9590261 123.114121,37.5359514 L127.644286,32.1371104 C127.999288,31.7140357 127.944104,31.0832801 127.521029,30.7282783 C127.097955,30.3732765 126.467199,30.4284605 126.112197,30.8515352 Z M152.431974,58.6783398 L145.491357,59.9021577 C144.947463,59.9980609 144.584295,60.5167193 144.680198,61.0606136 C144.776101,61.6045079 145.294759,61.9676764 145.838654,61.8717732 L152.77927,60.6479553 C153.323164,60.552052 153.686333,60.0333936 153.59043,59.4894993 C153.494526,58.945605 152.975868,58.5824365 152.431974,58.6783398 Z M30.826519,60.6479553 L37.7671352,61.8717732 C38.3110295,61.9676764 38.8296879,61.6045079 38.9255912,61.0606136 C39.0214944,60.5167193 38.6583259,59.9980609 38.1144316,59.9021577 L31.1738154,58.6783398 C30.6299211,58.5824365 30.1112627,58.945605 30.0153594,59.4894993 C29.9194562,60.0333936 30.2826247,60.552052 30.826519,60.6479553 Z M55.9615029,32.1371104 L60.4916684,37.5359514 C60.8466702,37.9590261 61.4774258,38.01421 61.9005005,37.6592082 C62.3235751,37.3042064 62.3787591,36.6734508 62.0237573,36.2503762 L57.4935918,30.8515352 C57.13859,30.4284605 56.5078344,30.3732765 56.0847597,30.7282783 C55.6616851,31.0832801 55.6065011,31.7140357 55.9615029,32.1371104 Z",id:"Path-9",fill:"#01ACCD","fill-rule":"nonzero",opacity:"0.5"}),(0,n.h)("g",{id:"Oval-Copy-5",opacity:"0.3",transform:"translate(80.000000, 166.000000)",fill:"#01ACCD"},(0,n.h)("path",{d:"M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,-5.32907052e-15 3.3015873,-5.32907052e-15 C1.47817098,-5.32907052e-15 1.07647224e-12,1.4883507 1.07647224e-12,3.32432432 C1.07647224e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z",id:"Oval-Copy-3"})),(0,n.h)("g",{id:"Path-Copy-4",opacity:"0.9",transform:"translate(100.000000, 146.000000)",fill:"#01ACCD"},(0,n.h)("polygon",{id:"Path-Copy-2",points:"5.5 2.5 8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0"})),(0,n.h)("g",{id:"Oval-2",opacity:"0.5",transform:"translate(39.000000, 115.000000)",fill:"#01ACCD"},(0,n.h)("path",{d:"M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,0 3.3015873,0 C1.47817098,0 1.08002496e-12,1.4883507 1.08002496e-12,3.32432432 C1.08002496e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z",id:"Oval"})),(0,n.h)("g",{id:"Oval-Copy-4",opacity:"0.8",transform:"translate(60.000000, 139.000000)",fill:"#01ACCD"},(0,n.h)("path",{d:"M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,1.42108547e-14 3.3015873,1.42108547e-14 C1.47817098,1.42108547e-14 1.08002496e-12,1.4883507 1.08002496e-12,3.32432432 C1.08002496e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z",id:"Oval-Copy"})),(0,n.h)("g",{id:"Path-Copy-3",opacity:"0.3",transform:"translate(31.000000, 142.000000)",fill:"#01ACCD"},(0,n.h)("polygon",{id:"Path-Copy",points:"5.5 2.5 8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0"})),(0,n.h)("g",{id:"Oval-Copy-6",opacity:"0.6",transform:"translate(139.000000, 139.000000)",fill:"#01ACCD"},(0,n.h)("path",{d:"M3.3015873,6.64864865 C5.12500362,6.64864865 6.6031746,5.16029795 6.6031746,3.32432432 C6.6031746,1.4883507 5.12500362,0 3.3015873,0 C1.47817098,0 1.08713039e-12,1.4883507 1.08713039e-12,3.32432432 C1.08713039e-12,5.16029795 1.47817098,6.64864865 3.3015873,6.64864865 Z M3.3015873,4.64864865 C2.5858248,4.64864865 2,4.05878945 2,3.32432432 C2,2.5898592 2.5858248,2 3.3015873,2 C4.0173498,2 4.6031746,2.5898592 4.6031746,3.32432432 C4.6031746,4.05878945 4.0173498,4.64864865 3.3015873,4.64864865 Z",id:"Oval-Copy-2"})),(0,n.h)("g",{id:"Path-2",opacity:"0.4",transform:"translate(122.000000, 122.000000)",fill:"#01ACCD"},(0,n.h)("polygon",{id:"Path",points:"5.5 2.5 8 2.5 8 5.5 5.5 5.5 5.5 8 2.5 8 2.5 5.5 0 5.5 0 2.5 2.5 2.5 2.5 0 5.5 0"}))))}},9754:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(464),t)},464:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a};Object.defineProperty(t,"__esModule",{value:!0}),t.Transcript=void 0;var s=r(4522),l=r(2052),c=r(4539),u=r(6513),p=r(1797),d=r(3517),h=r(5271),f=r(536),g=r(7099),m=r(244),_=r(7123),y=r(1972),v=l.ui.utils.KeyMap,b=v.ENTER,A=v.SPACE,C=v.TAB,x=l.ui.preacti18n,w=x.withText,k=x.Text,S=l.ui.SidePanelModes,E=l.ui.Components.PLAYER_BREAK_POINTS,T=l.ui.redux.connect,O={skipTranscript:(0,s.h)(k,{id:"transcript.skip_transcript"},"Skip transcript"),errorTitle:(0,s.h)(k,{id:"transcript.whoops"},"Whoops!"),errorDescripton:(0,s.h)(k,{id:"transcript.load_failed"},"Failed to load transcript")},M={search:"",activeSearchIndex:1,searchMap:{},totalSearchResults:0,searchLength:0},L=38,P=(null==E?void 0:E.SMALL)||480,B=function(e,t){var r;return{smallScreen:t.expandMode===S.ALONGSIDE&&(null===(r=e.shell.playerClientRect)||void 0===r?void 0:r.width)<P}},I=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._transcriptListRef=null,t._captionListRef=null,t._skipTranscriptButtonRef=null,t._autoscrollButtonRef=null,t._preventScrollEvent=!1,t._scrollToSearchMatchEnabled=!1,t._widgetRootRef=null,t._widgetHeight=0,t._topAutoscrollEdge=0,t._bottomAutoscrollEdge=0,t._thirdOfWidgetHeight=0,t.state=i({isAutoScrollEnabled:!0,widgetWidth:0},M),t._enableAutoScroll=function(e,r){var n;e.preventDefault(),t.state.isAutoScrollEnabled||(t._preventScrollEvent=!0,t.setState({isAutoScrollEnabled:!0}),r&&(null===(n=t._skipTranscriptButtonRef)||void 0===n||n.focus()))},t._renderScrollToButton=function(){var e=t.state.isAutoScrollEnabled;return(0,s.h)(g.AutoscrollButton,{setAutoscrollButtonRef:function(e){t._autoscrollButtonRef=e},isAutoScrollEnabled:e,onClick:t._enableAutoScroll})},t._onSearch=function(e){t.setState({search:e})},t._findSearchMatches=function(){t.setState((function(e){if(!e.search)return i({},M);var r=0,n=e.search.toLowerCase(),o={};return t.props.captions.forEach((function(e){for(var t,a,s=(null===(t=null==e?void 0:e.text)||void 0===t?void 0:t.toLowerCase())||"",l=new RegExp(n,"gi"),c=[];a=l.exec(s);)c.push(a.index);c.forEach((function(t){var n;r++,o[e.id]=i(i({},o[e.id]),((n={})[r]=t,n))}))})),{searchMap:o,totalSearchResults:r,activeSearchIndex:1,searchLength:n.length}}))},t._setActiveSearchIndex=function(e){t._scrollToSearchMatchEnabled=!0,t.setState({activeSearchIndex:e,isAutoScrollEnabled:!1})},t._getHeaderStyles=function(){var e=t.state.widgetWidth;return e>=692?"":e>=649?u.mediumWidth:u.smallWidth},t._renderHeader=function(){var e=t.props,r=e.toggledWithEnter,n=e.kitchenSinkActive,o=e.downloadDisabled,a=e.onDownload,l=e.printDisabled,c=e.onPrint,p=e.isLoading,h=t.state,f=h.search,g=h.activeSearchIndex,_=h.totalSearchResults;return(0,s.h)("div",{className:[u.header,t._getHeaderStyles()].join(" "),"data-testid":"transcript_header"},(0,s.h)(d.Search,{onChange:t._onSearch,onSearchIndexChange:t._debounced.onActiveSearchIndexChange,value:f,activeSearchIndex:g,totalSearchResults:_,toggledWithEnter:r,kitchenSinkActive:n}),(0,s.h)(m.TranscriptMenu,i({},{downloadDisabled:o,onDownload:a,printDisabled:l,onPrint:c,isLoading:p})),(0,s.h)("div",{"data-testid":"transcriptCloseButton"},(0,s.h)(y.Button,{type:y.ButtonType.borderless,size:y.ButtonSize.medium,disabled:!1,onClick:t.props.onClose,ariaLabel:"Hide Transcript",tooltip:{label:"Hide Transcript"},icon:"close"})))},t._handleClick=function(e){var r;e.preventDefault(),null===(r=t._autoscrollButtonRef)||void 0===r||r.focus()},t._handleKeyDown=function(e){var r,n;if(e.keyCode!==C||e.shiftKey)e.keyCode!==b&&e.keyCode!==A||t._handleClick(e);else{t.setState({isAutoScrollEnabled:!1});var o=null===(n=null===(r=t._captionListRef)||void 0===r?void 0:r._currentCaptionRef)||void 0===n?void 0:n._hotspotRef;o&&(e.preventDefault(),o.focus())}},t._renderSkipTranscriptButton=function(){return(0,s.h)("div",{role:"button",ref:function(e){t._skipTranscriptButtonRef=e},"data-testid":"transcript_skipButton",className:u.skipTranscriptButton,onKeyDown:t._handleKeyDown,onClick:t._handleClick,tabIndex:0},t.props.skipTranscript)},t._renderTranscript=function(){var e=t.props,r=e.captions,n=e.hasError,o=(e.onRetryLoad,e.showTime),i=e.videoDuration,a=e.highlightedMap,l=t.state,c=l.isAutoScrollEnabled,p=l.searchMap,d=l.activeSearchIndex,g=l.searchLength;if(n)return(0,s.h)("div",{className:u.errorWrapper},(0,s.h)("div",{className:u.errorIcon},(0,s.h)(f.ErrorIcon,null)),(0,s.h)("p",{className:u.errorMainText},t.props.errorTitle),(0,s.h)("p",{className:u.errorDescriptionText},t.props.errorDescripton));if(!r||!r.length)return null;var m={showTime:o,searchLength:g,scrollTo:t._scrollTo,scrollToSearchMatch:t._scrollToSearchMatch,videoDuration:i};return(0,s.h)(h.CaptionList,{ref:function(e){t._captionListRef=e},highlightedMap:a,data:r,onSeek:t._handleSeek,isAutoScrollEnabled:c,searchMap:p,activeSearchIndex:d,captionProps:m,onScroll:t._onScroll,widgetWidth:t.state.widgetWidth,showItemsIcons:!0,searchActive:!1})},t._setWidgetSize=function(){if(t._widgetRootRef){var e=t._widgetRootRef.getBoundingClientRect(),r=e.width,n=e.height;e.top,t.state.widgetWidth!==r&&t.setState({widgetWidth:r}),t._widgetHeight!==n&&(t._widgetHeight=n,t._thirdOfWidgetHeight=n/3,t._topAutoscrollEdge=Math.floor(t._thirdOfWidgetHeight+L),t._bottomAutoscrollEdge=Math.ceil(2*t._thirdOfWidgetHeight+L))}},t._renderLoading=function(){return(0,s.h)(p.Spinner,null)},t._scrollTo=function(e){if(t._transcriptListRef){t._preventScrollEvent=!0;var r=e.getBoundingClientRect().top;(r>=t._topAutoscrollEdge||r<=t._bottomAutoscrollEdge)&&(t._transcriptListRef.scrollTop=e.offsetTop-(t._thirdOfWidgetHeight-L))}},t._scrollToSearchMatch=function(e){t._transcriptListRef&&t._scrollToSearchMatchEnabled&&(t._scrollToSearchMatchEnabled=!1,t._preventScrollEvent=!0,t._transcriptListRef.scrollTop=e.offsetTop-L)},t._onScroll=function(){t._preventScrollEvent?t._preventScrollEvent=!1:t.setState({isAutoScrollEnabled:!1})},t._handleSeek=function(e){var r=t.props.onSeek,n=window.getSelection();n&&"Range"!==n.type&&r(e.startTime)},t._debounced={findSearchMatches:(0,c.debounce)(t._findSearchMatches,t.props.searchDebounceTimeout),onActiveSearchIndexChange:(0,c.debounce)(t._setActiveSearchIndex,t.props.searchNextPrevDebounceTimeout)},t}return o(t,e),t.prototype.componentDidUpdate=function(e,t){var r=this.props.captions,n=this.state.search;e.captions!==r&&this.setState({search:"",isAutoScrollEnabled:!0}),t.search!==n&&this._debounced.findSearchMatches(),this._setWidgetSize()},t.prototype.render=function(e){var t=this,r=e.isLoading,n=e.kitchenSinkActive,o=e.hasError,i=e.smallScreen,a=e.toggledWithEnter,l=!(r||o);return(0,s.h)("div",{className:"".concat(u.root," ").concat(n?"":u.hidden),ref:function(e){t._widgetRootRef=e},"data-testid":"transcript_root"},i?(0,s.h)(_.SmallScreenSlate,{onClose:this.props.onClose,toggledWithEnter:a}):(0,s.h)("div",{className:u.globalContainer},this._renderHeader(),l&&this._renderSkipTranscriptButton(),(0,s.h)("div",{className:u.body,onScroll:this._onScroll,ref:function(e){t._transcriptListRef=e},"data-testid":"transcript_list"},r?this._renderLoading():this._renderTranscript()),l&&this._renderScrollToButton()))},a([T(B),w(O)],t)}(s.Component);t.Transcript=I},5667:function(e,t,r){"use strict";var n,o=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(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 r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.TranscriptPlugin=void 0;var a=r(4926),s=r(4522),l=r(2052),c=r(4539),u=r(1293),p=r(2351),d=r(9754),h=r(4539),f=r(2085),g=l.ui.SidePanelModes,m=l.ui.SidePanelPositions,_=l.ui.ReservedPresetNames,y=(l.ui.ReservedPresetAreas,KalturaPlayer.ui.preacti18n),v=y.withText,b=y.Text,A=c.ObjectUtils.get,C=function(e){function t(t,r,n){var o=e.call(this,t,r,n)||this;return o._activeCaptionMapId="",o._activeCuePointsMap={},o._captionMap=new Map,o._isLoading=!1,o._hasError=!1,o._triggeredByKeyboard=!1,o._transcriptPanel=-1,o._transcriptIcon=-1,o._pluginState=null,o._pluginButtonRef=null,o._initLoading=function(){clearTimeout(o._loadingTimeoutId),o._isLoading=!1,o._hasError=!1,o._captionMap.has(o._activeCaptionMapId)||(o._isLoading=!0,o._loadingTimeoutId=setTimeout((function(){o._isLoading=!1,o._hasError=!0,o._updateTranscriptPanel()}),1e4)),o._updateTranscriptPanel()},o._handleLanguageChange=function(){o._activeCaptionMapId=o._getCaptionMapId(),o._initLoading()},o._onTimedMetadataAdded=function(e){var t=e.payload,r=[];t.cues.forEach((function(e){e.metadata.cuePointType===f.ItemTypes.Caption&&r.push((0,h.prepareCuePoint)(e))})),r.length&&(o._addCaptionData(r),o._addTranscriptItem())},o._onTimedMetadataChange=function(e){var t=e.payload.cues.filter((function(e){return e.metadata.cuePointType===f.ItemTypes.Caption})).filter((function(e,t,r){var n=r[t+1];return!n||e.endTime!==n.startTime}));o._activeCuePointsMap={},t.forEach((function(e){o._activeCuePointsMap[e.id]=!0})),o._updateTranscriptPanel()},o._addCaptionData=function(e){o._activeCaptionMapId=o._getCaptionMapId(),o._captionMap.set(o._activeCaptionMapId,o._sanitizeCaptions(e)),o._isLoading=!1,clearTimeout(o._loadingTimeoutId),o._updateTranscriptPanel()},o._getTextTracks=function(){return o.player.getTracks(o.player.Track.TEXT)||[]},o._getCaptionMapId=function(){var e,t,r=o._getTextTracks(),n=r.find((function(e){return e.active}));return"off"===(null==n?void 0:n.language)?"".concat(null===(e=r[0])||void 0===e?void 0:e.language,"-").concat(null===(t=r[0])||void 0===t?void 0:t.label):"".concat(null==n?void 0:n.language,"-").concat(null==n?void 0:n.label)},o._activatePlugin=function(){o.ready.then((function(){var e,t;null===(e=o.sidePanelsManager)||void 0===e||e.activateItem(o._transcriptPanel),o._pluginState=f.PluginStates.OPENED,null===(t=o.upperBarManager)||void 0===t||t.update(o._transcriptIcon)}))},o._deactivatePlugin=function(){o.ready.then((function(){var e,t;null===(e=o.sidePanelsManager)||void 0===e||e.deactivateItem(o._transcriptPanel),null===(t=o.upperBarManager)||void 0===t||t.update(o._transcriptIcon)}))},o._isPluginActive=function(){return o.sidePanelsManager.isItemActive(o._transcriptPanel)},o._handleClickOnPluginIcon=function(e,t){o._isPluginActive()?(o._triggeredByKeyboard=!1,o._deactivatePlugin(),o._pluginState=f.PluginStates.CLOSED):(o._triggeredByKeyboard=Boolean(t),o._activatePlugin())},o._sanitizeCaptions=function(e){return e.map((function(e){return i(i({},e),{text:(0,c.decodeString)(a(e.text||"",{allowedAttributes:{},allowedTags:[]}))})}))},o._setPluginButtonRef=function(e){o._pluginButtonRef=e},o._seekTo=function(e){o.player.currentTime=e},o._handleDownload=function(){var e=o.player.config,t=o._sanitizeCaptions(o._captionMap.get(o._activeCaptionMapId)||[]);if(t){var r=A(e,"sources.metadata",{}),n=o._getCaptionMapId();(0,c.downloadContent)((0,h.makePlainText)(t),"".concat(n).concat(r.name?"-".concat(r.name):"",".txt"))}},o._handlePrint=function(){var e=o._sanitizeCaptions(o._captionMap.get(o._activeCaptionMapId)||[]);e&&(0,c.printContent)((0,h.makePlainText)(e))},o._handleClose=function(e,t){var r;t&&(null===(r=o._pluginButtonRef)||void 0===r||r.focus()),o._deactivatePlugin(),o._pluginState=f.PluginStates.CLOSED},o}return o(t,e),Object.defineProperty(t.prototype,"sidePanelsManager",{get:function(){return this.player.getService("sidePanelsManager")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"upperBarManager",{get:function(){return this.player.getService("upperBarManager")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cuePointManager",{get:function(){return this.player.getService("kalturaCuepoints")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_data",{get:function(){return this._captionMap.get(this._activeCaptionMapId)||[]},enumerable:!1,configurable:!0}),t.prototype.loadMedia=function(){this.cuePointManager&&this.sidePanelsManager&&this.upperBarManager?this.player.isLive()||(this._initListeners(),this.cuePointManager.registerTypes([this.cuePointManager.CuepointType.CAPTION])):this.logger.warn("kalturaCuepoints, sidePanelsManager or upperBarManager haven't registered")},t.prototype._initListeners=function(){var e=this;this.eventManager.listenOnce(this.player,this.player.Event.TRACKS_CHANGED,(function(){e._getTextTracks().length&&(e.eventManager.listen(e.player,e.player.Event.TIMED_METADATA_CHANGE,e._onTimedMetadataChange),e.eventManager.listen(e.player,e.player.Event.TIMED_METADATA_ADDED,e._onTimedMetadataAdded),e.eventManager.listen(e.player,e.player.Event.TEXT_TRACK_CHANGED,e._handleLanguageChange))}))},t.prototype._updateTranscriptPanel=function(){var e;this._transcriptPanel&&(null===(e=this.sidePanelsManager)||void 0===e||e.update(this._transcriptPanel))},t.prototype._addTranscriptItem=function(){var e=this;if(!(Math.max(this._transcriptPanel,this._transcriptIcon)>0)){var t=this.config,r=t.expandMode,n=t.position,o=t.expandOnFirstPlay,i=t.showTime,a=t.scrollOffset,l=t.searchDebounceTimeout,c=t.searchNextPrevDebounceTimeout,m=t.downloadDisabled,y=t.printDisabled;this._transcriptPanel=this.sidePanelsManager.add({label:"Transcript",panelComponent:function(){return(0,s.h)(d.Transcript,{showTime:(0,h.getConfigValue)(i,h.isBoolean,!0),scrollOffset:(0,h.getConfigValue)(a,Number.isInteger,0),searchDebounceTimeout:(0,h.getConfigValue)(l,Number.isInteger,250),searchNextPrevDebounceTimeout:(0,h.getConfigValue)(c,Number.isInteger,100),highlightedMap:e._activeCuePointsMap,onSeek:e._seekTo,onItemClicked:e._seekTo,expandMode:e.config.expandMode,captions:e._data,isLoading:e._isLoading,hasError:e._hasError,onRetryLoad:e._updateTranscriptPanel,currentTime:e.player.currentTime,videoDuration:e.player.duration,kitchenSinkActive:e._isPluginActive(),toggledWithEnter:e._triggeredByKeyboard,onClose:e._handleClose,downloadDisabled:(0,h.getConfigValue)(m,h.isBoolean,!1),onDownload:e._handleDownload,printDisabled:(0,h.getConfigValue)(y,h.isBoolean,!1),onPrint:e._handlePrint})},presets:[_.Playback,_.Live,_.Ads],position:n,expandMode:r===g.ALONGSIDE?g.ALONGSIDE:g.OVER,onDeactivate:this._deactivatePlugin});var A={showTranscript:(0,s.h)(b,{id:"transcript.show_plugin"},"Show Transcript"),hideTranscript:(0,s.h)(b,{id:"transcript.hide_plugin"},"Hide Transcript")};this._transcriptIcon=this.upperBarManager.add({label:"Transcript",svgIcon:{path:u.icons.PLUGIN_ICON,viewBox:"0 0 ".concat(u.icons.BigSize," ").concat(u.icons.BigSize)},onClick:this._handleClickOnPluginIcon,component:v(A)((function(t){var r=e._isPluginActive(),n=r?t.hideTranscript:t.showTranscript;return(0,s.h)(p.PluginButton,{isActive:r,id:"transcript-icon",label:n,icon:u.icons.PLUGIN_ICON,dataTestId:"transcript_pluginButton",setRef:e._setPluginButtonRef})}))}),(o&&!this._pluginState||this._pluginState===f.PluginStates.OPENED)&&this._activatePlugin()}},t.isValid=function(){return!0},t.prototype.reset=function(){var e;this.eventManager.removeAll(),Math.max(this._transcriptPanel,this._transcriptIcon)>0&&(null===(e=this.sidePanelsManager)||void 0===e||e.remove(this._transcriptPanel),this.upperBarManager.remove(this._transcriptIcon),this._transcriptPanel=-1,this._transcriptIcon=-1,this._pluginButtonRef=null),this._captionMap=new Map,this._activeCaptionMapId="",this._isLoading=!1,clearTimeout(this._loadingTimeoutId),this._hasError=!1,this._triggeredByKeyboard=!1},t.prototype.destroy=function(){this.reset()},t.defaultConfig={expandMode:g.ALONGSIDE,expandOnFirstPlay:!0,showTime:!0,position:m.RIGHT,scrollOffset:0,searchDebounceTimeout:250,searchNextPrevDebounceTimeout:100,downloadDisabled:!1,printDisabled:!1},t}(KalturaPlayer.core.BasePlugin);t.TranscriptPlugin=C},2085:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(5481),t),o(r(4944),t),o(r(1352),t)},4944:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1352:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemTypes=void 0,(t.ItemTypes||(t.ItemTypes={})).Caption="kalturaCaption"},5481:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.PluginStates=void 0,(r=t.PluginStates||(t.PluginStates={})).OPENED="opened",r.CLOSED="closed"},7256:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0,t.debounce=function(e,t,r){var n;return void 0===t&&(t=50),void 0===r&&(r={isImmediate:!1}),function(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=function(){n=void 0,r.isImmediate||e.apply(o,i)},l=r.isImmediate&&void 0===n;void 0!==n&&clearTimeout(n),n=setTimeout(s,t),l&&e.apply(this,i)}}},4539:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(9714),t),o(r(4935),t),o(r(7256),t)},4935:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUtils=void 0;var r=function(){function e(){}return e.get=function(e,t,r){for(var n=function(e){var t=[];return e.split(".").forEach((function(e){e.split(/\[([^}]+)\]/g).forEach((function(e){e.length>0&&t.push(e)}))})),t}(t),o=e,i=0;i<n.length;i++){if(!o[n[i]])return r;o=o[n[i]]}return o},e}();t.ObjectUtils=r},9714:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printContent=t.downloadContent=t.prepareCuePoint=t.decodeString=t.makePlainText=t.isBoolean=t.getConfigValue=t.secondsToTime=t.toSeconds=t.HOUR=void 0,t.HOUR=3600,t.toSeconds=function(e,r){void 0===r&&(r=!1);var n=(r?/(\d+):(\d{2}):(\d{2}).(\d{2,3}|\d{2})/:/(\d+):(\d{2}):(\d{2}),((\d{2,3}|\d{2}|\d{1}))?/).exec(e);if(null===n)return 0;for(var o=1;o<5;o++)n[o]=parseInt(n[o],10),isNaN(n[o])&&(n[o]=0);return n[1]*t.HOUR+60*n[2]+n[3]+n[4]/1e3};var r=function(e){return e<10?"0".concat(e):e};t.secondsToTime=function(e,n){var o=new Date(0);return o.setSeconds(e),"".concat(n?function(e){var r=Math.floor(e/t.HOUR);return r>=1?"".concat(r,":"):""}(e):"").concat(r(o.getUTCMinutes()),":").concat(r(o.getUTCSeconds()))},t.getConfigValue=function(e,t,r){var n=r;return"function"==typeof t&&t(e)&&(n=e),n},t.isBoolean=function(e){return"boolean"==typeof e},t.makePlainText=function(e){return e.reduce((function(e,t){return"".concat(e.trim()," ").concat(t.text.trim())}),"")},t.decodeString=function(e){return"string"!=typeof e?e:e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&nbsp;/gi," ").replace(/  /gi," ").replace(/&amp;/gi,"&").replace(/&quot;/gi,'"')},t.prepareCuePoint=function(e){var r=e.metadata;return{id:e.id,startTime:e.startTime,displayTime:Math.floor(e.startTime),text:(0,t.decodeString)(r.text)}},t.downloadContent=function(e,t){var r=new Blob([e],{type:"text/plain;charset=utf-8;"}),n=document.createElement("a"),o=window.navigator;o.msSaveBlob?o.msSaveOrOpenBlob(r,t):(-1!==o.userAgent.search("Firefox")?(n.style.display="none",n.setAttribute("href","data:text/plain;charset=utf-8,"+encodeURIComponent(e))):n.setAttribute("href",URL.createObjectURL(r)),n.setAttribute("target","_blank"),n.setAttribute("download",t),n.click(),n.remove())},t.printContent=function(e){var t=window.open("","","width=400,height=600");t&&(t.document.write(e),t.document.close(),t.focus(),t.print(),t.close())}},2052:e=>{"use strict";e.exports=KalturaPlayer},4522:e=>{"use strict";e.exports=KalturaPlayer.ui.preact},5710:()=>{},473:()=>{},5426:()=>{},984:()=>{},9121:()=>{},6521:e=>{e.exports={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",o=r;for(;o--;)n+=e[Math.random()*e.length|0];return n}}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,exports:{}};return e[n].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;var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.NAME=e.VERSION=e.Plugin=void 0;var t=r(5667);Object.defineProperty(e,"Plugin",{enumerable:!0,get:function(){return t.TranscriptPlugin}}),e.VERSION="3.5.4",e.NAME="@playkit-js/transcript",KalturaPlayer.core.registerPlugin("playkit-js-transcript",t.TranscriptPlugin)})(),((KalturaPlayer=void 0===KalturaPlayer?{}:KalturaPlayer).plugins=KalturaPlayer.plugins||{}).transcript=n})();

(()=>{"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,v=e.onRightKeyPressed,y=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&&v&&(u(e),v(e))},onClick:function(e){r(e,(0,t.isKeyboardEvent)(e))},role:y};return"button"===(null==n?void 0: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:()=>v.uj,default:()=>m,sidePanelWrapper:()=>v.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),v=n(499),y={};y.styleTagTransform=h(),y.setAttributes=l(),y.insert=p().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=d(),r()(v.ZP,y);const m=v.ZP&&v.ZP.locals?v.ZP.locals:void 0},611:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,rightUpperBarWrapperContainer:()=>v.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),v=n(477),y={};y.styleTagTransform=h(),y.setAttributes=l(),y.insert=p().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=d(),r()(v.Z,y);const m=v.Z&&v.Z.locals?v.Z.locals:void 0},23:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,dropdownItem:()=>v.mB,dropdownItemDescription:()=>v._h,icon:()=>v.qv,moreDropdown:()=>v.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),v=n(206),y={};y.styleTagTransform=h(),y.setAttributes=l(),y.insert=p().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=d(),r()(v.ZP,y);const m=v.ZP&&v.ZP.locals?v.ZP.locals:void 0},781:(e,t,n)=>{n.r(t),n.d(t,{default:()=>m,moreIcon:()=>v.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),v=n(324),y={};y.styleTagTransform=h(),y.setAttributes=l(),y.insert=p().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=d(),r()(v.Z,y);const m=v.Z&&v.Z.locals?v.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=n(52).ui.ReservedPresetNames,i=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)(),this.presets=t.presets&&t.presets.length>0?t.presets:[r.Playback,r.Live]}return e.prototype.update=function(){this.componentRef.current.forceUpdate()},e.nextId=0,e}();t.IconModel=i},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},a=this&&this.__read||function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a},s=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;r<i;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.DisplayedBar=void 0;var p=n(522),c=n(883),l=n(611),u=n(52),d=n(951),f=u.ui.Components.PLAYER_SIZE,h=u.ui.redux.connect,v=function(e){return{playerSize:e.shell.playerSize}},y=function(e){function t(){var t=e.call(this)||this;return t.handleOnClick=function(){t.setState((function(e){return{showDropdown:!e.showDropdown}}))},t.update=function(){t.forceUpdate()},t.state={showDropdown:!1},t}return r(t,e),t.prototype.closeDropdown=function(){this.setState({showDropdown:!1})},t.prototype.splitControlsIntoDisplayedAndDropdown=function(){switch(this.props.playerSize){case f.TINY:return{displayedControls:[],dropdownControls:[]};case f.EXTRA_SMALL:case f.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,t=this.splitControlsIntoDisplayedAndDropdown(),n=t.displayedControls,o=t.dropdownControls;return(0,p.h)("div",{className:l.rightUpperBarWrapperContainer},n.map((function(t){var n=t.id,o=t.component,r=t.onClick,i=t.componentRef,l=o;return(0,p.h)(c.IconWrapper,{key:n,onClick:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];r.apply(void 0,s([],a(t),!1)),e.closeDropdown()},ref:i},(0,p.h)(l,null))})),o.length>0&&(0,p.h)(d.MoreIcon,{showDropdown:this.state.showDropdown,onClick:this.handleOnClick,icons:o}))},i([h(v,null,null,{forwardRef:!0})],t)}(p.Component);t.DisplayedBar=y},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){var n=t.id,o=t.label,r=t.svgIcon,s=t.onClick;return(0,i.h)(i.Fragment,{key:n},(0,i.h)(p.A11yWrapper,{onClick:function(t){s(t),e.props.onDropdownClick()},role:"menuitem"},(0,i.h)("div",{className:a.dropdownItem,tabIndex:0,"aria-label":o},(0,i.h)("div",{className:a.icon},(0,i.h)(c,{id:"icon-".concat(o,"-").concat(n),path:r.path,viewBox:r.viewBox})),(0,i.h)("span",{className:a.dropdownItemDescription},o))))})))},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(720),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.render=function(){return(0,i.h)(a.A11yWrapper,{role:"generic",onClick:this.props.onClick},(0,i.h)("div",null,(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,v=p.ui.Event.withEventManager,y=p.ui.preacti18n,m=y.withText,g=y.Text,A=function(e){function t(){var t=e.call(this)||this;return 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.props.onClick},(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.props.showDropdown&&(0,a.h)("div",null,(0,a.h)(l.DropdownBar,{onDropdownClick:this.props.onClick,controls:this.props.icons})))},i([v,m({moreIconTxt:(0,a.h)(g,{id:"controls.moreIcon"},"More")})],t)}(a.Component);t.MoreIcon=A},765:function(e,t,n){var o=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.UpperBarManager=void 0;var r=n(52),i=n(183),a=n(522),s=n(328),p=r.ui.ReservedPresetAreas,c=r.ui.ReservedPresetNames,l=Object.values(c).filter((function(e){return e!==c.Idle&&e!==c.Error})),u=function(){function e(e,t,n){var o=this;this.player=e,this.componentsRegistry=new Map,this.logger=t,this.displayedBarComponentRefs={},l.forEach((function(e){return o.displayedBarComponentRefs[e]=(0,a.createRef)()})),this.injectDisplayedBarComponentWrapper(n.pluginsIconsOrder)}return e.prototype.add=function(t){var n=this;if(e.validateItem(t)){var o=new i.IconModel(t);return this.componentsRegistry.set(o.id,o),o.presets.forEach((function(e){var t;return null===(t=n.displayedBarComponentRefs[e].current)||void 0===t?void 0:t.update()})),this.logger.debug("Icon Id: '".concat(o.id,"' '").concat(o.label,"' added")),o.id}this.logger.warn("Invalid Icon parameters",t)},e.prototype.remove=function(e){var t=this,n=this.componentsRegistry.get(e);n?(this.componentsRegistry.delete(e),n.presets.forEach((function(e){var n;return null===(n=t.displayedBarComponentRefs[e].current)||void 0===n?void 0:n.update()})),this.logger.debug("Icon Id: '".concat(n.id,"' Label: '").concat(n.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.getControls=function(e){return Array.from(this.componentsRegistry.values()).sort((function(t,n){return e[t.label]>e[n.label]?1:-1}))},e.prototype.injectDisplayedBarComponentWrapper=function(e){var t,n,r=this,i=function(t){c.player.ui.addComponent({label:"Right-Upper-Bar-Wrapper",presets:[t],area:p.TopBarRightControls,get:function(){return(0,a.h)(s.DisplayedBar,{ref:r.displayedBarComponentRefs[t],getControls:function(){return r.getControls(e).filter((function(e){return e.presets.includes(t)}))}})}})},c=this;try{for(var u=o(l),d=u.next();!d.done;d=u.next())i(d.value)}catch(e){t={error:e}}finally{try{d&&!d.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}},e.validateItem=function(e){return"function"==typeof e.onClick&&"function"==typeof e.component},e}();t.UpperBarManager=u},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)})();

var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.visibility=function(t){var n={};function e(i){if(n[i])return n[i].exports;var a=n[i]={i:i,l:!1,exports:{}};return t[i].call(a.exports,a,a.exports,e),a.l=!0,a.exports}return e.m=t,e.c=n,e.d=function(t,n,i){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:i})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(e.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var a in t)e.d(i,a,function(n){return t[n]}.bind(null,a));return i},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=5)}([function(t,n){t.exports=KalturaPlayer},function(t,n,e){"use strict";t.exports=function(t){var n=[];return n.toString=function(){return this.map((function(n){var e=function(t,n){var e=t[1]||"",i=t[3];if(!i)return e;if(n&&"function"==typeof btoa){var a=(r=i,s=btoa(unescape(encodeURIComponent(JSON.stringify(r)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(l," */")),o=i.sources.map((function(t){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(t," */")}));return[e].concat(o).concat([a]).join("\n")}var r,s,l;return[e].join("\n")}(n,t);return n[2]?"@media ".concat(n[2]," {").concat(e,"}"):e})).join("")},n.i=function(t,e,i){"string"==typeof t&&(t=[[null,t,""]]);var a={};if(i)for(var o=0;o<this.length;o++){var r=this[o][0];null!=r&&(a[r]=!0)}for(var s=0;s<t.length;s++){var l=[].concat(t[s]);i&&a[l[0]]||(e&&(l[2]?l[2]="".concat(e," and ").concat(l[2]):l[2]=e),n.push(l))}},n}},function(t,n,e){var i=e(3),a=e(4);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[t.i,a,""]]);var o={insert:"head",singleton:!1};i(a,o);t.exports=a.locals||{}},function(t,n,e){"use strict";var i,a=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},o=function(){var t={};return function(n){if(void 0===t[n]){var e=document.querySelector(n);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(t){e=null}t[n]=e}return t[n]}}(),r=[];function s(t){for(var n=-1,e=0;e<r.length;e++)if(r[e].identifier===t){n=e;break}return n}function l(t,n){for(var e={},i=[],a=0;a<t.length;a++){var o=t[a],l=n.base?o[0]+n.base:o[0],c=e[l]||0,u="".concat(l," ").concat(c);e[l]=c+1;var p=s(u),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==p?(r[p].references++,r[p].updater(f)):r.push({identifier:u,updater:y(f,n),references:1}),i.push(u)}return i}function c(t){var n=document.createElement("style"),i=t.attributes||{};if(void 0===i.nonce){var a=e.nc;a&&(i.nonce=a)}if(Object.keys(i).forEach((function(t){n.setAttribute(t,i[t])})),"function"==typeof t.insert)t.insert(n);else{var r=o(t.insert||"head");if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}return n}var u,p=(u=[],function(t,n){return u[t]=n,u.filter(Boolean).join("\n")});function f(t,n,e,i){var a=e?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(t.styleSheet)t.styleSheet.cssText=p(n,a);else{var o=document.createTextNode(a),r=t.childNodes;r[n]&&t.removeChild(r[n]),r.length?t.insertBefore(o,r[n]):t.appendChild(o)}}function g(t,n,e){var i=e.css,a=e.media,o=e.sourceMap;if(a?t.setAttribute("media",a):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=i;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(i))}}var h=null,d=0;function y(t,n){var e,i,a;if(n.singleton){var o=d++;e=h||(h=c(n)),i=f.bind(null,e,o,!1),a=f.bind(null,e,o,!0)}else e=c(n),i=g.bind(null,e,n),a=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)};return i(t),function(n){if(n){if(n.css===t.css&&n.media===t.media&&n.sourceMap===t.sourceMap)return;i(t=n)}else a()}}t.exports=function(t,n){(n=n||{}).singleton||"boolean"==typeof n.singleton||(n.singleton=a());var e=l(t=t||[],n);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var i=0;i<e.length;i++){var a=s(e[i]);r[a].references--}for(var o=l(t,n),c=0;c<e.length;c++){var u=s(e[c]);0===r[u].references&&(r[u].updater(),r.splice(u,1))}e=o}}}},function(t,n,e){"use strict";e.r(n);var i=e(1),a=e.n(i)()(!0);a.push([t.i,"\n.playkit-floating-poster {\n  height: 100%;\n  width: 100%;\n  background-color: black;\n  background-repeat: no-repeat;\n  background-size: contain;\n  background-position: center;\n  display: none;\n}\n.playkit-floating-poster.playkit-floating-poster-show {\n  display: block;\n}\n.playkit-floating-active.playkit-floating-active-top {\n  top: 0;\n}\n.playkit-floating-active.playkit-floating-active-bottom {\n  bottom: 0;\n}\n.playkit-floating-active.playkit-floating-active-left {\n  left: 0;\n}\n.playkit-floating-active.playkit-floating-active-right {\n  right: 0;\n}\n\n.playkit-floating-container {\n  height: 100%;\n  width: 100%;\n  touch-action: none;\n}\n.playkit-floating-container.playkit-floating-active {\n  z-index: 9999;\n  position: fixed;\n}\n.playkit-floating-container.playkit-floating-active.draggable {\n  cursor: grab;\n}\n\n.playkit-floating-dismissible {\n  display: none;\n  height: 24px;\n  width: 24px;\n}\n\n.playkit-floating-container.playkit-floating-active .playkit-floating-dismissible {\n  display: inline-block;\n}\n.playkit-floating-dismissible.playkit-floating-infullscreen{\n  display: none !important;\n}\n","",{version:3,sources:["webpack://style.css"],names:[],mappings:";AACA;EACE,YAAY;EACZ,WAAW;EACX,uBAAuB;EACvB,4BAA4B;EAC5B,wBAAwB;EACxB,2BAA2B;EAC3B,aAAa;AACf;AACA;EACE,cAAc;AAChB;AACA;EACE,MAAM;AACR;AACA;EACE,SAAS;AACX;AACA;EACE,OAAO;AACT;AACA;EACE,QAAQ;AACV;;AAEA;EACE,YAAY;EACZ,WAAW;EACX,kBAAkB;AACpB;AACA;EACE,aAAa;EACb,eAAe;AACjB;AACA;EACE,YAAY;AACd;;AAEA;EACE,aAAa;EACb,YAAY;EACZ,WAAW;AACb;;AAEA;EACE,qBAAqB;AACvB;AACA;EACE,wBAAwB;AAC1B",sourcesContent:["\n.playkit-floating-poster {\n  height: 100%;\n  width: 100%;\n  background-color: black;\n  background-repeat: no-repeat;\n  background-size: contain;\n  background-position: center;\n  display: none;\n}\n.playkit-floating-poster.playkit-floating-poster-show {\n  display: block;\n}\n.playkit-floating-active.playkit-floating-active-top {\n  top: 0;\n}\n.playkit-floating-active.playkit-floating-active-bottom {\n  bottom: 0;\n}\n.playkit-floating-active.playkit-floating-active-left {\n  left: 0;\n}\n.playkit-floating-active.playkit-floating-active-right {\n  right: 0;\n}\n\n.playkit-floating-container {\n  height: 100%;\n  width: 100%;\n  touch-action: none;\n}\n.playkit-floating-container.playkit-floating-active {\n  z-index: 9999;\n  position: fixed;\n}\n.playkit-floating-container.playkit-floating-active.draggable {\n  cursor: grab;\n}\n\n.playkit-floating-dismissible {\n  display: none;\n  height: 24px;\n  width: 24px;\n}\n\n.playkit-floating-container.playkit-floating-active .playkit-floating-dismissible {\n  display: inline-block;\n}\n.playkit-floating-dismissible.playkit-floating-infullscreen{\n  display: none !important;\n}\n"],sourceRoot:""}]),n.default=a},function(t,n,e){"use strict";e.r(n),e.d(n,"Plugin",(function(){return C})),e.d(n,"VERSION",(function(){return b})),e.d(n,"NAME",(function(){return E})),e.d(n,"EventType",(function(){return y}));var i=e(0);e(2);var a=i.ui.h,o=i.ui.preact,r=i.ui.preacti18n,s=i.ui.utils,l=i.ui.Components,c=r.Localizer,u=r.Text,p=o.Component,f=s.KeyMap,g=l.Icon,h=l.IconType,d=function(t){var n,e;function i(){return t.apply(this,arguments)||this}return e=t,(n=i).prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e,i.prototype.render=function(t){return a(c,null,a("a",{role:"button",ref:function(n){t.addAccessibleChild&&t.addAccessibleChild(n)},tabIndex:"0",onClick:function(){return t.onClose()},onKeyDown:function(n){n.keyCode===f.ENTER&&t.onClose()},"aria-label":a(u,{id:"overlay.close"}),className:"playkit-floating-dismissible playkit-icon playkit-icon-close"},a(g,{type:h.Close})))},i}(p),y={FLOATING_PLAYER_STATE_CHANGED:"floatingplayerstatechanged",FLOATING_PLAYER_DISMISSED:"floatingplayerdismissed"};function A(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function v(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var m=i.core.Utils,_={position:"bottom-right",height:"225",width:"400",marginX:"20",marginY:"20",dismissible:!0,draggable:!0},C=function(t){var n,e;e=t,(n=a).prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e;var i=a.prototype;function a(n,e,i){var a;return v(A(a=t.call(this,n,e,i)||this),"_playbackStartOccurred",!1),v(A(a),"_dismissed",!1),v(A(a),"_isInPIP",!1),v(A(a),"_currMousePos",{x:0,y:0}),v(A(a),"_throttleWait",!1),a._appTargetContainer=m.Dom.getElementById(a.player.config.targetId),a._initFloating(),a._addBindings(),a}return i.getUIComponents=function(){var t=this;return this.config.dismissible?[{label:"dismissibleFloatingButtonComponent",presets:["Playback","Live","Error","Ads","Idle"],container:"TopBarRightControls",get:d,props:{onClose:function(){t._handleDismissFloating()}}}]:[]},a.isValid=function(){return!0},i._initFloating=function(){var t=this;this.config=m.Object.mergeDeep(_,this.config),this._floatingPoster=m.Dom.createElement("div"),this._floatingPoster.className="playkit-floating-poster",this._floatingContainer=m.Dom.createElement("div"),this._floatingContainer.className="playkit-floating-container",m.Dom.prependTo(this._floatingPoster,this._appTargetContainer);var n=m.Dom.getElementById(this.player.config.ui.targetId);this._appTargetContainer&&this._floatingContainer&&(this._appTargetContainer.replaceChild(this._floatingContainer,n),m.Dom.appendChild(this._floatingContainer,n),this.config.position.split("-").forEach((function(n){m.Dom.addClassName(t._floatingContainer,"playkit-floating-active-"+n)}))),this.config.draggable&&m.Dom.addClassName(this._floatingContainer,"playkit-floating-draggable")},i._handleDismissFloating=function(){this._dismissed=!0,this.player.pause(),this._stopFloating(),this.dispatchEvent(y.FLOATING_PLAYER_DISMISSED)},i._stopFloating=function(){m.Dom.removeClassName(this._floatingPoster,"playkit-floating-poster-show"),m.Dom.removeClassName(this._floatingContainer,"playkit-floating-active"),m.Dom.removeAttribute(this._floatingContainer,"style"),this.config.draggable&&(this.eventManager.unlisten(this._floatingContainer,"mousedown"),this.eventManager.unlisten(this._floatingContainer,"touchstart"),this._stopDrag()),this.dispatchEvent(y.FLOATING_PLAYER_STATE_CHANGED,{active:!1})},i._startFloating=function(){var t=this;m.Dom.addClassName(this._floatingContainer,"playkit-floating-active"),m.Dom.addClassName(this._floatingPoster,"playkit-floating-poster-show"),m.Dom.setStyle(this._floatingContainer,"height",this.config.height+"px"),m.Dom.setStyle(this._floatingContainer,"width",this.config.width+"px"),m.Dom.setStyle(this._floatingContainer,"margin",this.config.marginY+"px "+this.config.marginX+"px"),this.config.draggable&&(this.eventManager.listen(this._floatingContainer,"mousedown",(function(n){t._startDrag(n,"mousemove","mouseup")})),this.eventManager.listen(this._floatingContainer,"touchstart",(function(n){t.eventManager.unlisten(t._floatingContainer,"mousedown"),t._startDrag(n,"touchmove","touchend")}))),this.dispatchEvent(y.FLOATING_PLAYER_STATE_CHANGED,{active:!0})},i._handleFloatingChange=function(t){t?this._stopFloating():this._startFloating()},i._addBindings=function(){var t=this;this.eventManager.listen(this.player,this.player.Event.ENTER_PICTURE_IN_PICTURE,(function(){t._stopFloating(),t._isInPIP=!0})),this.eventManager.listen(this.player,this.player.Event.LEAVE_PICTURE_IN_PICTURE,(function(){t._isInPIP=!1})),this.player.viewabilityManager.observe(this._appTargetContainer,this._handleViewabilityChanged.bind(this)),this.eventManager.listen(this.player,this.player.Event.PLAYBACK_START,(function(){t._playbackStartOccurred=!0,m.Dom.setStyle(t._floatingPoster,"background-image",'url("'+t.player.config.sources.poster+'")')})),this.eventManager.listen(this.player,this.player.Event.ENTER_FULLSCREEN,(function(){var n=m.Dom.getElementById(t.player.config.ui.targetId).querySelector(".playkit-floating-dismissible");m.Dom.addClassName(n,"playkit-floating-infullscreen")})),this.eventManager.listen(this.player,this.player.Event.EXIT_FULLSCREEN,(function(){var n=m.Dom.getElementById(t.player.config.ui.targetId).querySelector(".playkit-floating-dismissible");m.Dom.removeClassName(n,"playkit-floating-infullscreen")}))},i._handleViewabilityChanged=function(t,n){n!==this.player.ViewabilityType.VIEWPORT||!this._playbackStartOccurred||this._dismissed||this._isInPIP||this._handleFloatingChange(t)},i.destroy=function(){this.logger.debug("destroy"),m.Dom.removeChild(this._appTargetContainer,this._floatingContainer),m.Dom.removeChild(this._appTargetContainer,this._floatingPoster),this.player.viewabilityManager.unObserve(this._appTargetContainer,this._handleViewabilityChanged.bind(this)),this._appTargetContainer=null,this._floatingContainer=null,this._floatingPoster=null,this.eventManager.destroy()},i._startDrag=function(t,n,e){var i=this;this.eventManager.listenOnce(document,e,(function(){i._stopDrag()})),this._currMousePos.x=this._clientX(t),this._currMousePos.y=this._clientY(t),this.eventManager.listen(document,n,(function(t){i._moveDrag(t)}))},i._clientX=function(t){return t instanceof MouseEvent?t.clientX:t.changedTouches&&t.changedTouches[0]&&t.changedTouches[0].clientX},i._clientY=function(t){return t instanceof MouseEvent?t.clientY:t.changedTouches&&t.changedTouches[0]&&t.changedTouches[0].clientY},i._moveDrag=function(t){var n=this;if(!this._throttleWait){t=t||window.event;var e=this._currMousePos.x-this._clientX(t),i=this._currMousePos.y-this._clientY(t);this._currMousePos.x=this._clientX(t),this._currMousePos.y=this._clientY(t);var a=this._floatingContainer;if(a){var o=a.getBoundingClientRect(),r=Math.max(o.top-parseInt(a.style.marginTop)-i,0);r=Math.min(r,window.innerHeight-o.height-2*this.config.marginY),a.style.top=r+"px";var s=Math.max(o.left-parseInt(a.style.marginLeft)-e,0);s=Math.min(s,window.innerWidth-o.width-2*this.config.marginX),a.style.left=s+"px"}this._throttleWait=!0,setTimeout((function(){n._throttleWait=!1}),30)}},i._stopDrag=function(){this.eventManager.unlisten(document,"mousemove"),this.eventManager.unlisten(document,"touchmove")},a}(i.BasePlugin);v(C,"defaultConfig",{});var b="2.1.5",E="@playkit-js/playkit-js-visibility";Object(i.registerPlugin)("floating",C)}]);

var KalturaPlayer="object"==typeof KalturaPlayer?KalturaPlayer:{};KalturaPlayer.plugins=KalturaPlayer.plugins||{},KalturaPlayer.plugins.vr=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=5)}([function(t,e){t.exports=KalturaPlayer},function(t,e,i){var n=i(2),r=i(3);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[t.i,r,""]]);var a={insert:"head",singleton:!1};n(r,a);t.exports=r.locals||{}},function(t,e,i){"use strict";var n,r=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},a=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),o=[];function s(t){for(var e=-1,i=0;i<o.length;i++)if(o[i].identifier===t){e=i;break}return e}function c(t,e){for(var i={},n=[],r=0;r<t.length;r++){var a=t[r],c=e.base?a[0]+e.base:a[0],h=i[c]||0,l="".concat(c," ").concat(h);i[c]=h+1;var u=s(l),p={css:a[1],media:a[2],sourceMap:a[3]};-1!==u?(o[u].references++,o[u].updater(p)):o.push({identifier:l,updater:g(p,e),references:1}),n.push(l)}return n}function h(t){var e=document.createElement("style"),n=t.attributes||{};if(void 0===n.nonce){var r=i.nc;r&&(n.nonce=r)}if(Object.keys(n).forEach((function(t){e.setAttribute(t,n[t])})),"function"==typeof t.insert)t.insert(e);else{var o=a(t.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(e)}return e}var l,u=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function p(t,e,i,n){var r=i?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(t.styleSheet)t.styleSheet.cssText=u(e,r);else{var a=document.createTextNode(r),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(a,o[e]):t.appendChild(a)}}function d(t,e,i){var n=i.css,r=i.media,a=i.sourceMap;if(r?t.setAttribute("media",r):t.removeAttribute("media"),a&&btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var f=null,m=0;function g(t,e){var i,n,r;if(e.singleton){var a=m++;i=f||(f=h(e)),n=p.bind(null,i,a,!1),r=p.bind(null,i,a,!0)}else i=h(e),n=d.bind(null,i,e),r=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else r()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=r());var i=c(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var n=0;n<i.length;n++){var r=s(i[n]);o[r].references--}for(var a=c(t,e),h=0;h<i.length;h++){var l=s(i[h]);0===o[l].references&&(o[l].updater(),o.splice(l,1))}i=a}}}},function(t,e,i){(e=i(4)(!1)).push([t.i,".playkit-vr-video {\n  opacity: 0;\n}\n\n.playkit-vr-canvas {\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  left: 0;\n  margin: auto;\n  width: 100%;\n}\n",""]),t.exports=e},function(t,e,i){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",n=t[3];if(!n)return i;if(e&&"function"==typeof btoa){var r=(o=n,s=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(s),"/*# ".concat(c," */")),a=n.sources.map((function(t){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(t," */")}));return[i].concat(a).concat([r]).join("\n")}var o,s,c;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,n){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(n)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(r[o]=!0)}for(var s=0;s<t.length;s++){var c=[].concat(t[s]);n&&r[c[0]]||(i&&(c[2]?c[2]="".concat(i," and ").concat(c[2]):c[2]=i),e.push(c))}},e}},function(t,e,i){"use strict";i.r(e),i.d(e,"Plugin",(function(){return rs})),i.d(e,"VERSION",(function(){return as})),i.d(e,"NAME",(function(){return os}));var n=i(0);function r(){}void 0===Number.EPSILON&&(Number.EPSILON=Math.pow(2,-52)),void 0===Number.isInteger&&(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),void 0===Math.sign&&(Math.sign=function(t){return t<0?-1:t>0?1:+t}),"name"in Function.prototype==!1&&Object.defineProperty(Function.prototype,"name",{get:function(){return this.toString().match(/^\s*function\s*([^\(\s]*)/)[1]}}),void 0===Object.assign&&(Object.assign=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var n=arguments[i];if(null!=n)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}),Object.assign(r.prototype,{addEventListener:function(t,e){void 0===this._listeners&&(this._listeners={});var i=this._listeners;void 0===i[t]&&(i[t]=[]),-1===i[t].indexOf(e)&&i[t].push(e)},hasEventListener:function(t,e){if(void 0===this._listeners)return!1;var i=this._listeners;return void 0!==i[t]&&-1!==i[t].indexOf(e)},removeEventListener:function(t,e){if(void 0!==this._listeners){var i=this._listeners[t];if(void 0!==i){var n=i.indexOf(e);-1!==n&&i.splice(n,1)}}},dispatchEvent:function(t){if(void 0!==this._listeners){var e=this._listeners[t.type];if(void 0!==e){t.target=this;for(var i=e.slice(0),n=0,r=i.length;n<r;n++)i[n].call(this,t)}}}});var a,o,s,c,h,l,u,p,d,f,m,g={DEG2RAD:Math.PI/180,RAD2DEG:180/Math.PI,generateUUID:function(){for(var t=[],e=0;e<256;e++)t[e]=(e<16?"0":"")+e.toString(16);return function(){var e=4294967295*Math.random()|0,i=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(t[255&e]+t[e>>8&255]+t[e>>16&255]+t[e>>24&255]+"-"+t[255&i]+t[i>>8&255]+"-"+t[i>>16&15|64]+t[i>>24&255]+"-"+t[63&n|128]+t[n>>8&255]+"-"+t[n>>16&255]+t[n>>24&255]+t[255&r]+t[r>>8&255]+t[r>>16&255]+t[r>>24&255]).toUpperCase()}}(),clamp:function(t,e,i){return Math.max(e,Math.min(i,t))},euclideanModulo:function(t,e){return(t%e+e)%e},mapLinear:function(t,e,i,n,r){return n+(t-e)*(r-n)/(i-e)},lerp:function(t,e,i){return(1-i)*t+i*e},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},degToRad:function(t){return t*g.DEG2RAD},radToDeg:function(t){return t*g.RAD2DEG},isPowerOfTwo:function(t){return 0==(t&t-1)&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}};function v(t,e){this.x=t||0,this.y=e||0}function y(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}function x(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._w=void 0!==n?n:1}function _(t,e,i){this.x=t||0,this.y=e||0,this.z=i||0}function b(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}Object.defineProperties(v.prototype,{width:{get:function(){return this.x},set:function(t){this.x=t}},height:{get:function(){return this.y},set:function(t){this.y=t}}}),Object.assign(v.prototype,{isVector2:!0,set:function(t,e){return this.x=t,this.y=e,this},setScalar:function(t){return this.x=t,this.y=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y)},copy:function(t){return this.x=t.x,this.y=t.y,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)},addScalar:function(t){return this.x+=t,this.y+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)},subScalar:function(t){return this.x-=t,this.y-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},divideScalar:function(t){return this.multiplyScalar(1/t)},applyMatrix3:function(t){var e=this.x,i=this.y,n=t.elements;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this},clampScalar:(a=new v,o=new v,function(t,e){return a.set(t,t),o.set(e,e),this.clamp(a,o)}),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this},negate:function(){return this.x=-this.x,this.y=-this.y,this},dot:function(t){return this.x*t.x+this.y*t.y},lengthSq:function(){return this.x*this.x+this.y*this.y},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)},normalize:function(){return this.divideScalar(this.length()||1)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y;return e*e+i*i},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t},fromBufferAttribute:function(t,e,i){return void 0!==i&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this},rotateAround:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=this.x-t.x,a=this.y-t.y;return this.x=r*i-a*n+t.x,this.y=r*n+a*i+t.y,this}}),Object.assign(y.prototype,{isMatrix4:!0,set:function(t,e,i,n,r,a,o,s,c,h,l,u,p,d,f,m){var g=this.elements;return g[0]=t,g[4]=e,g[8]=i,g[12]=n,g[1]=r,g[5]=a,g[9]=o,g[13]=s,g[2]=c,g[6]=h,g[10]=l,g[14]=u,g[3]=p,g[7]=d,g[11]=f,g[15]=m,this},identity:function(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this},clone:function(){return(new y).fromArray(this.elements)},copy:function(t){var e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this},copyPosition:function(t){var e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this},extractBasis:function(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this},makeBasis:function(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this},extractRotation:(f=new _,function(t){var e=this.elements,i=t.elements,n=1/f.setFromMatrixColumn(t,0).length(),r=1/f.setFromMatrixColumn(t,1).length(),a=1/f.setFromMatrixColumn(t,2).length();return e[0]=i[0]*n,e[1]=i[1]*n,e[2]=i[2]*n,e[3]=0,e[4]=i[4]*r,e[5]=i[5]*r,e[6]=i[6]*r,e[7]=0,e[8]=i[8]*a,e[9]=i[9]*a,e[10]=i[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}),makeRotationFromEuler:function(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");var e=this.elements,i=t.x,n=t.y,r=t.z,a=Math.cos(i),o=Math.sin(i),s=Math.cos(n),c=Math.sin(n),h=Math.cos(r),l=Math.sin(r);if("XYZ"===t.order){var u=a*h,p=a*l,d=o*h,f=o*l;e[0]=s*h,e[4]=-s*l,e[8]=c,e[1]=p+d*c,e[5]=u-f*c,e[9]=-o*s,e[2]=f-u*c,e[6]=d+p*c,e[10]=a*s}else if("YXZ"===t.order){var m=s*h,g=s*l,v=c*h,y=c*l;e[0]=m+y*o,e[4]=v*o-g,e[8]=a*c,e[1]=a*l,e[5]=a*h,e[9]=-o,e[2]=g*o-v,e[6]=y+m*o,e[10]=a*s}else if("ZXY"===t.order){m=s*h,g=s*l,v=c*h,y=c*l;e[0]=m-y*o,e[4]=-a*l,e[8]=v+g*o,e[1]=g+v*o,e[5]=a*h,e[9]=y-m*o,e[2]=-a*c,e[6]=o,e[10]=a*s}else if("ZYX"===t.order){u=a*h,p=a*l,d=o*h,f=o*l;e[0]=s*h,e[4]=d*c-p,e[8]=u*c+f,e[1]=s*l,e[5]=f*c+u,e[9]=p*c-d,e[2]=-c,e[6]=o*s,e[10]=a*s}else if("YZX"===t.order){var x=a*s,_=a*c,b=o*s,w=o*c;e[0]=s*h,e[4]=w-x*l,e[8]=b*l+_,e[1]=l,e[5]=a*h,e[9]=-o*h,e[2]=-c*h,e[6]=_*l+b,e[10]=x-w*l}else if("XZY"===t.order){x=a*s,_=a*c,b=o*s,w=o*c;e[0]=s*h,e[4]=-l,e[8]=c*h,e[1]=x*l+w,e[5]=a*h,e[9]=_*l-b,e[2]=b*l-_,e[6]=o*h,e[10]=w*l+x}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},makeRotationFromQuaternion:(p=new _(0,0,0),d=new _(1,1,1),function(t){return this.compose(p,t,d)}),lookAt:(h=new _,l=new _,u=new _,function(t,e,i){var n=this.elements;return u.subVectors(t,e),0===u.lengthSq()&&(u.z=1),u.normalize(),h.crossVectors(i,u),0===h.lengthSq()&&(1===Math.abs(i.z)?u.x+=1e-4:u.z+=1e-4,u.normalize(),h.crossVectors(i,u)),h.normalize(),l.crossVectors(u,h),n[0]=h.x,n[4]=l.x,n[8]=u.x,n[1]=h.y,n[5]=l.y,n[9]=u.y,n[2]=h.z,n[6]=l.z,n[10]=u.z,this}),multiply:function(t,e){return void 0!==e?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements,r=this.elements,a=i[0],o=i[4],s=i[8],c=i[12],h=i[1],l=i[5],u=i[9],p=i[13],d=i[2],f=i[6],m=i[10],g=i[14],v=i[3],y=i[7],x=i[11],_=i[15],b=n[0],w=n[4],M=n[8],E=n[12],T=n[1],S=n[5],A=n[9],R=n[13],L=n[2],P=n[6],C=n[10],O=n[14],I=n[3],N=n[7],D=n[11],U=n[15];return r[0]=a*b+o*T+s*L+c*I,r[4]=a*w+o*S+s*P+c*N,r[8]=a*M+o*A+s*C+c*D,r[12]=a*E+o*R+s*O+c*U,r[1]=h*b+l*T+u*L+p*I,r[5]=h*w+l*S+u*P+p*N,r[9]=h*M+l*A+u*C+p*D,r[13]=h*E+l*R+u*O+p*U,r[2]=d*b+f*T+m*L+g*I,r[6]=d*w+f*S+m*P+g*N,r[10]=d*M+f*A+m*C+g*D,r[14]=d*E+f*R+m*O+g*U,r[3]=v*b+y*T+x*L+_*I,r[7]=v*w+y*S+x*P+_*N,r[11]=v*M+y*A+x*C+_*D,r[15]=v*E+y*R+x*O+_*U,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this},applyToBufferAttribute:function(){var t=new _;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix4(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),determinant:function(){var t=this.elements,e=t[0],i=t[4],n=t[8],r=t[12],a=t[1],o=t[5],s=t[9],c=t[13],h=t[2],l=t[6],u=t[10],p=t[14];return t[3]*(+r*s*l-n*c*l-r*o*u+i*c*u+n*o*p-i*s*p)+t[7]*(+e*s*p-e*c*u+r*a*u-n*a*p+n*c*h-r*s*h)+t[11]*(+e*c*l-e*o*p-r*a*l+i*a*p+r*o*h-i*c*h)+t[15]*(-n*o*h-e*s*l+e*o*u+n*a*l-i*a*u+i*s*h)},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this},setPosition:function(t){var e=this.elements;return e[12]=t.x,e[13]=t.y,e[14]=t.z,this},getInverse:function(t,e){var i=this.elements,n=t.elements,r=n[0],a=n[1],o=n[2],s=n[3],c=n[4],h=n[5],l=n[6],u=n[7],p=n[8],d=n[9],f=n[10],m=n[11],g=n[12],v=n[13],y=n[14],x=n[15],_=d*y*u-v*f*u+v*l*m-h*y*m-d*l*x+h*f*x,b=g*f*u-p*y*u-g*l*m+c*y*m+p*l*x-c*f*x,w=p*v*u-g*d*u+g*h*m-c*v*m-p*h*x+c*d*x,M=g*d*l-p*v*l-g*h*f+c*v*f+p*h*y-c*d*y,E=r*_+a*b+o*w+s*M;if(0===E){var T="THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(T);return console.warn(T),this.identity()}var S=1/E;return i[0]=_*S,i[1]=(v*f*s-d*y*s-v*o*m+a*y*m+d*o*x-a*f*x)*S,i[2]=(h*y*s-v*l*s+v*o*u-a*y*u-h*o*x+a*l*x)*S,i[3]=(d*l*s-h*f*s-d*o*u+a*f*u+h*o*m-a*l*m)*S,i[4]=b*S,i[5]=(p*y*s-g*f*s+g*o*m-r*y*m-p*o*x+r*f*x)*S,i[6]=(g*l*s-c*y*s-g*o*u+r*y*u+c*o*x-r*l*x)*S,i[7]=(c*f*s-p*l*s+p*o*u-r*f*u-c*o*m+r*l*m)*S,i[8]=w*S,i[9]=(g*d*s-p*v*s-g*a*m+r*v*m+p*a*x-r*d*x)*S,i[10]=(c*v*s-g*h*s+g*a*u-r*v*u-c*a*x+r*h*x)*S,i[11]=(p*h*s-c*d*s-p*a*u+r*d*u+c*a*m-r*h*m)*S,i[12]=M*S,i[13]=(p*v*o-g*d*o+g*a*f-r*v*f-p*a*y+r*d*y)*S,i[14]=(g*h*o-c*v*o-g*a*l+r*v*l+c*a*y-r*h*y)*S,i[15]=(c*d*o-p*h*o+p*a*l-r*d*l-c*a*f+r*h*f)*S,this},scale:function(t){var e=this.elements,i=t.x,n=t.y,r=t.z;return e[0]*=i,e[4]*=n,e[8]*=r,e[1]*=i,e[5]*=n,e[9]*=r,e[2]*=i,e[6]*=n,e[10]*=r,e[3]*=i,e[7]*=n,e[11]*=r,this},getMaxScaleOnAxis:function(){var t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))},makeTranslation:function(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this},makeRotationX:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this},makeRotationY:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this},makeRotationZ:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,a=t.x,o=t.y,s=t.z,c=r*a,h=r*o;return this.set(c*a+i,c*o-n*s,c*s+n*o,0,c*o+n*s,h*o+i,h*s-n*a,0,c*s-n*o,h*s+n*a,r*s*s+i,0,0,0,0,1),this},makeScale:function(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this},makeShear:function(t,e,i){return this.set(1,e,i,0,t,1,i,0,t,e,1,0,0,0,0,1),this},compose:function(t,e,i){var n=this.elements,r=e._x,a=e._y,o=e._z,s=e._w,c=r+r,h=a+a,l=o+o,u=r*c,p=r*h,d=r*l,f=a*h,m=a*l,g=o*l,v=s*c,y=s*h,x=s*l,_=i.x,b=i.y,w=i.z;return n[0]=(1-(f+g))*_,n[1]=(p+x)*_,n[2]=(d-y)*_,n[3]=0,n[4]=(p-x)*b,n[5]=(1-(u+g))*b,n[6]=(m+v)*b,n[7]=0,n[8]=(d+y)*w,n[9]=(m-v)*w,n[10]=(1-(u+f))*w,n[11]=0,n[12]=t.x,n[13]=t.y,n[14]=t.z,n[15]=1,this},decompose:(s=new _,c=new y,function(t,e,i){var n=this.elements,r=s.set(n[0],n[1],n[2]).length(),a=s.set(n[4],n[5],n[6]).length(),o=s.set(n[8],n[9],n[10]).length();this.determinant()<0&&(r=-r),t.x=n[12],t.y=n[13],t.z=n[14],c.copy(this);var h=1/r,l=1/a,u=1/o;return c.elements[0]*=h,c.elements[1]*=h,c.elements[2]*=h,c.elements[4]*=l,c.elements[5]*=l,c.elements[6]*=l,c.elements[8]*=u,c.elements[9]*=u,c.elements[10]*=u,e.setFromRotationMatrix(c),i.x=r,i.y=a,i.z=o,this}),makePerspective:function(t,e,i,n,r,a){void 0===a&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");var o=this.elements,s=2*r/(e-t),c=2*r/(i-n),h=(e+t)/(e-t),l=(i+n)/(i-n),u=-(a+r)/(a-r),p=-2*a*r/(a-r);return o[0]=s,o[4]=0,o[8]=h,o[12]=0,o[1]=0,o[5]=c,o[9]=l,o[13]=0,o[2]=0,o[6]=0,o[10]=u,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this},makeOrthographic:function(t,e,i,n,r,a){var o=this.elements,s=1/(e-t),c=1/(i-n),h=1/(a-r),l=(e+t)*s,u=(i+n)*c,p=(a+r)*h;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-l,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-u,o[2]=0,o[6]=0,o[10]=-2*h,o[14]=-p,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this},equals:function(t){for(var e=this.elements,i=t.elements,n=0;n<16;n++)if(e[n]!==i[n])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var i=0;i<16;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}),Object.assign(x,{slerp:function(t,e,i,n){return i.copy(t).slerp(e,n)},slerpFlat:function(t,e,i,n,r,a,o){var s=i[n+0],c=i[n+1],h=i[n+2],l=i[n+3],u=r[a+0],p=r[a+1],d=r[a+2],f=r[a+3];if(l!==f||s!==u||c!==p||h!==d){var m=1-o,g=s*u+c*p+h*d+l*f,v=g>=0?1:-1,y=1-g*g;if(y>Number.EPSILON){var x=Math.sqrt(y),_=Math.atan2(x,g*v);m=Math.sin(m*_)/x,o=Math.sin(o*_)/x}var b=o*v;if(s=s*m+u*b,c=c*m+p*b,h=h*m+d*b,l=l*m+f*b,m===1-o){var w=1/Math.sqrt(s*s+c*c+h*h+l*l);s*=w,c*=w,h*=w,l*=w}}t[e]=s,t[e+1]=c,t[e+2]=h,t[e+3]=l}}),Object.defineProperties(x.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback()}}}),Object.assign(x.prototype,{set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._w=n,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._w)},copy:function(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this.onChangeCallback(),this},setFromEuler:function(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");var i=t._x,n=t._y,r=t._z,a=t.order,o=Math.cos,s=Math.sin,c=o(i/2),h=o(n/2),l=o(r/2),u=s(i/2),p=s(n/2),d=s(r/2);return"XYZ"===a?(this._x=u*h*l+c*p*d,this._y=c*p*l-u*h*d,this._z=c*h*d+u*p*l,this._w=c*h*l-u*p*d):"YXZ"===a?(this._x=u*h*l+c*p*d,this._y=c*p*l-u*h*d,this._z=c*h*d-u*p*l,this._w=c*h*l+u*p*d):"ZXY"===a?(this._x=u*h*l-c*p*d,this._y=c*p*l+u*h*d,this._z=c*h*d+u*p*l,this._w=c*h*l-u*p*d):"ZYX"===a?(this._x=u*h*l-c*p*d,this._y=c*p*l+u*h*d,this._z=c*h*d-u*p*l,this._w=c*h*l+u*p*d):"YZX"===a?(this._x=u*h*l+c*p*d,this._y=c*p*l+u*h*d,this._z=c*h*d-u*p*l,this._w=c*h*l-u*p*d):"XZY"===a&&(this._x=u*h*l-c*p*d,this._y=c*p*l-u*h*d,this._z=c*h*d+u*p*l,this._w=c*h*l+u*p*d),!1!==e&&this.onChangeCallback(),this},setFromAxisAngle:function(t,e){var i=e/2,n=Math.sin(i);return this._x=t.x*n,this._y=t.y*n,this._z=t.z*n,this._w=Math.cos(i),this.onChangeCallback(),this},setFromRotationMatrix:function(t){var e,i=t.elements,n=i[0],r=i[4],a=i[8],o=i[1],s=i[5],c=i[9],h=i[2],l=i[6],u=i[10],p=n+s+u;return p>0?(e=.5/Math.sqrt(p+1),this._w=.25/e,this._x=(l-c)*e,this._y=(a-h)*e,this._z=(o-r)*e):n>s&&n>u?(e=2*Math.sqrt(1+n-s-u),this._w=(l-c)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(a+h)/e):s>u?(e=2*Math.sqrt(1+s-n-u),this._w=(a-h)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(c+l)/e):(e=2*Math.sqrt(1+u-n-s),this._w=(o-r)/e,this._x=(a+h)/e,this._y=(c+l)/e,this._z=.25*e),this.onChangeCallback(),this},setFromUnitVectors:function(){var t,e=new _;return function(i,n){return void 0===e&&(e=new _),(t=i.dot(n)+1)<1e-6?(t=0,Math.abs(i.x)>Math.abs(i.z)?e.set(-i.y,i.x,0):e.set(0,-i.z,i.y)):e.crossVectors(i,n),this._x=e.x,this._y=e.y,this._z=e.z,this._w=t,this.normalize()}}(),inverse:function(){return this.conjugate()},conjugate:function(){return this._x*=-1,this._y*=-1,this._z*=-1,this.onChangeCallback(),this},dot:function(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w},lengthSq:function(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w},length:function(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)},normalize:function(){var t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this.onChangeCallback(),this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)},premultiply:function(t){return this.multiplyQuaternions(t,this)},multiplyQuaternions:function(t,e){var i=t._x,n=t._y,r=t._z,a=t._w,o=e._x,s=e._y,c=e._z,h=e._w;return this._x=i*h+a*o+n*c-r*s,this._y=n*h+a*s+r*o-i*c,this._z=r*h+a*c+i*s-n*o,this._w=a*h-i*o-n*s-r*c,this.onChangeCallback(),this},slerp:function(t,e){if(0===e)return this;if(1===e)return this.copy(t);var i=this._x,n=this._y,r=this._z,a=this._w,o=a*t._w+i*t._x+n*t._y+r*t._z;if(o<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,o=-o):this.copy(t),o>=1)return this._w=a,this._x=i,this._y=n,this._z=r,this;var s=Math.sqrt(1-o*o);if(Math.abs(s)<.001)return this._w=.5*(a+this._w),this._x=.5*(i+this._x),this._y=.5*(n+this._y),this._z=.5*(r+this._z),this;var c=Math.atan2(s,o),h=Math.sin((1-e)*c)/s,l=Math.sin(e*c)/s;return this._w=a*h+this._w*l,this._x=i*h+this._x*l,this._y=n*h+this._y*l,this._z=r*h+this._z*l,this.onChangeCallback(),this},equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w},fromArray:function(t,e){return void 0===e&&(e=0),this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(_.prototype,{isVector3:!0,set:function(t,e,i){return this.x=t,this.y=e,this.z=i,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this},multiply:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this},multiplyVectors:function(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this},applyEuler:(m=new x,function(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(m.setFromEuler(t))}),applyAxisAngle:function(){var t=new x;return function(e,i){return this.applyQuaternion(t.setFromAxisAngle(e,i))}}(),applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements,a=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*a,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*a,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*a,this},applyQuaternion:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,a=t.y,o=t.z,s=t.w,c=s*e+a*n-o*i,h=s*i+o*e-r*n,l=s*n+r*i-a*e,u=-r*e-a*i-o*n;return this.x=c*s+u*-r+h*-o-l*-a,this.y=h*s+u*-a+l*-r-c*-o,this.z=l*s+u*-o+c*-a-h*-r,this},project:function(){var t=new y;return function(e){return t.multiplyMatrices(e.projectionMatrix,t.getInverse(e.matrixWorld)),this.applyMatrix4(t)}}(),unproject:function(){var t=new y;return function(e){return t.multiplyMatrices(e.matrixWorld,t.getInverse(e.projectionMatrix)),this.applyMatrix4(t)}}(),transformDirection:function(t){var e=this.x,i=this.y,n=this.z,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*n,this.y=r[1]*e+r[5]*i+r[9]*n,this.z=r[2]*e+r[6]*i+r[10]*n,this.normalize()},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this},divideScalar:function(t){return this.multiplyScalar(1/t)},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this},clampScalar:function(){var t=new _,e=new _;return function(i,n){return t.set(i,i,i),e.set(n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},cross:function(t,e){return void 0!==e?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,a=e.x,o=e.y,s=e.z;return this.x=n*s-r*o,this.y=r*a-i*s,this.z=i*o-n*a,this},projectOnVector:function(t){var e=t.dot(this)/t.lengthSq();return this.copy(t).multiplyScalar(e)},projectOnPlane:function(){var t=new _;return function(e){return t.copy(this).projectOnVector(e),this.sub(t)}}(),reflect:function(){var t=new _;return function(e){return this.sub(t.copy(e).multiplyScalar(2*this.dot(e)))}}(),angleTo:function(t){var e=this.dot(t)/Math.sqrt(this.lengthSq()*t.lengthSq());return Math.acos(g.clamp(e,-1,1))},distanceTo:function(t){return Math.sqrt(this.distanceToSquared(t))},distanceToSquared:function(t){var e=this.x-t.x,i=this.y-t.y,n=this.z-t.z;return e*e+i*i+n*n},manhattanDistanceTo:function(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)},setFromSpherical:function(t){var e=Math.sin(t.phi)*t.radius;return this.x=e*Math.sin(t.theta),this.y=Math.cos(t.phi)*t.radius,this.z=e*Math.cos(t.theta),this},setFromCylindrical:function(t){return this.x=t.radius*Math.sin(t.theta),this.y=t.y,this.z=t.radius*Math.cos(t.theta),this},setFromMatrixPosition:function(t){var e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this},setFromMatrixScale:function(t){var e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),n=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=n,this},setFromMatrixColumn:function(t,e){return this.fromArray(t.elements,4*e)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t},fromBufferAttribute:function(t,e,i){return void 0!==i&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}}),Object.assign(b.prototype,{isMatrix3:!0,set:function(t,e,i,n,r,a,o,s,c){var h=this.elements;return h[0]=t,h[1]=n,h[2]=o,h[3]=e,h[4]=r,h[5]=s,h[6]=i,h[7]=a,h[8]=c,this},identity:function(){return this.set(1,0,0,0,1,0,0,0,1),this},clone:function(){return(new this.constructor).fromArray(this.elements)},copy:function(t){var e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},setFromMatrix4:function(t){var e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this},applyToBufferAttribute:function(){var t=new _;return function(e){for(var i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.applyMatrix3(this),e.setXYZ(i,t.x,t.y,t.z);return e}}(),multiply:function(t){return this.multiplyMatrices(this,t)},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.elements,n=e.elements,r=this.elements,a=i[0],o=i[3],s=i[6],c=i[1],h=i[4],l=i[7],u=i[2],p=i[5],d=i[8],f=n[0],m=n[3],g=n[6],v=n[1],y=n[4],x=n[7],_=n[2],b=n[5],w=n[8];return r[0]=a*f+o*v+s*_,r[3]=a*m+o*y+s*b,r[6]=a*g+o*x+s*w,r[1]=c*f+h*v+l*_,r[4]=c*m+h*y+l*b,r[7]=c*g+h*x+l*w,r[2]=u*f+p*v+d*_,r[5]=u*m+p*y+d*b,r[8]=u*g+p*x+d*w,this},multiplyScalar:function(t){var e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this},determinant:function(){var t=this.elements,e=t[0],i=t[1],n=t[2],r=t[3],a=t[4],o=t[5],s=t[6],c=t[7],h=t[8];return e*a*h-e*o*c-i*r*h+i*o*s+n*r*c-n*a*s},getInverse:function(t,e){t&&t.isMatrix4&&console.error("THREE.Matrix3: .getInverse() no longer takes a Matrix4 argument.");var i=t.elements,n=this.elements,r=i[0],a=i[1],o=i[2],s=i[3],c=i[4],h=i[5],l=i[6],u=i[7],p=i[8],d=p*c-h*u,f=h*l-p*s,m=u*s-c*l,g=r*d+a*f+o*m;if(0===g){var v="THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0";if(!0===e)throw new Error(v);return console.warn(v),this.identity()}var y=1/g;return n[0]=d*y,n[1]=(o*u-p*a)*y,n[2]=(h*a-o*c)*y,n[3]=f*y,n[4]=(p*r-o*l)*y,n[5]=(o*s-h*r)*y,n[6]=m*y,n[7]=(a*l-u*r)*y,n[8]=(c*r-a*s)*y,this},transpose:function(){var t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this},getNormalMatrix:function(t){return this.setFromMatrix4(t).getInverse(this).transpose()},transposeIntoArray:function(t){var e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this},setUvTransform:function(t,e,i,n,r,a,o){var s=Math.cos(r),c=Math.sin(r);this.set(i*s,i*c,-i*(s*a+c*o)+a+t,-n*c,n*s,-n*(-c*a+s*o)+o+e,0,0,1)},scale:function(t,e){var i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this},rotate:function(t){var e=Math.cos(t),i=Math.sin(t),n=this.elements,r=n[0],a=n[3],o=n[6],s=n[1],c=n[4],h=n[7];return n[0]=e*r+i*s,n[3]=e*a+i*c,n[6]=e*o+i*h,n[1]=-i*r+e*s,n[4]=-i*a+e*c,n[7]=-i*o+e*h,this},translate:function(t,e){var i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this},equals:function(t){for(var e=this.elements,i=t.elements,n=0;n<9;n++)if(e[n]!==i[n])return!1;return!0},fromArray:function(t,e){void 0===e&&(e=0);for(var i=0;i<9;i++)this.elements[i]=t[i+e];return this},toArray:function(t,e){void 0===t&&(t=[]),void 0===e&&(e=0);var i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}});var w,M,E,T,S,A=0;function R(t,e,i,n,r,a,o,s,c,h){Object.defineProperty(this,"id",{value:A++}),this.uuid=g.generateUUID(),this.name="",this.image=void 0!==t?t:R.DEFAULT_IMAGE,this.mipmaps=[],this.mapping=void 0!==e?e:R.DEFAULT_MAPPING,this.wrapS=void 0!==i?i:1001,this.wrapT=void 0!==n?n:1001,this.magFilter=void 0!==r?r:1006,this.minFilter=void 0!==a?a:1008,this.anisotropy=void 0!==c?c:1,this.format=void 0!==o?o:1023,this.type=void 0!==s?s:1009,this.offset=new v(0,0),this.repeat=new v(1,1),this.center=new v(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new b,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=void 0!==h?h:3e3,this.version=0,this.onUpdate=null}function L(t,e,i,n){this.x=t||0,this.y=e||0,this.z=i||0,this.w=void 0!==n?n:1}function P(t,e,i){this.width=t,this.height=e,this.scissor=new L(0,0,t,e),this.scissorTest=!1,this.viewport=new L(0,0,t,e),void 0===(i=i||{}).minFilter&&(i.minFilter=1006),this.texture=new R(void 0,void 0,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.generateMipmaps=void 0===i.generateMipmaps||i.generateMipmaps,this.depthBuffer=void 0===i.depthBuffer||i.depthBuffer,this.stencilBuffer=void 0===i.stencilBuffer||i.stencilBuffer,this.depthTexture=void 0!==i.depthTexture?i.depthTexture:null}function C(t,e,i){P.call(this,t,e,i),this.activeCubeFace=0,this.activeMipMapLevel=0}function O(t,e,i,n,r,a,o,s,c,h,l,u){R.call(this,null,a,o,s,c,h,n,r,l,u),this.image={data:t,width:e,height:i},this.magFilter=void 0!==c?c:1003,this.minFilter=void 0!==h?h:1003,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}function I(t,e){this.min=void 0!==t?t:new _(1/0,1/0,1/0),this.max=void 0!==e?e:new _(-1/0,-1/0,-1/0)}function N(t,e){this.center=void 0!==t?t:new _,this.radius=void 0!==e?e:0}function D(t,e){this.normal=void 0!==t?t:new _(1,0,0),this.constant=void 0!==e?e:0}function U(t,e,i,n,r,a){this.planes=[void 0!==t?t:new D,void 0!==e?e:new D,void 0!==i?i:new D,void 0!==n?n:new D,void 0!==r?r:new D,void 0!==a?a:new D]}R.DEFAULT_IMAGE=void 0,R.DEFAULT_MAPPING=300,R.prototype=Object.assign(Object.create(r.prototype),{constructor:R,isTexture:!0,updateMatrix:function(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.encoding=t.encoding,this},toJSON:function(t){var e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];var i={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY};if(void 0!==this.image){var n=this.image;void 0===n.uuid&&(n.uuid=g.generateUUID()),e||void 0!==t.images[n.uuid]||(t.images[n.uuid]={uuid:n.uuid,url:function(t){var e;if(t instanceof HTMLCanvasElement)e=t;else{(e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")).width=t.width,e.height=t.height;var i=e.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height)}return e.width>2048||e.height>2048?e.toDataURL("image/jpeg",.6):e.toDataURL("image/png")}(n)}),i.image=n.uuid}return e||(t.textures[this.uuid]=i),i},dispose:function(){this.dispatchEvent({type:"dispose"})},transformUv:function(t){if(300===this.mapping){if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case 1e3:t.x=t.x-Math.floor(t.x);break;case 1001:t.x=t.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case 1e3:t.y=t.y-Math.floor(t.y);break;case 1001:t.y=t.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}this.flipY&&(t.y=1-t.y)}}}),Object.defineProperty(R.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(L.prototype,{isVector4:!0,set:function(t,e,i,n){return this.x=t,this.y=e,this.z=i,this.w=n,this},setScalar:function(t){return this.x=t,this.y=t,this.z=t,this.w=t,this},setX:function(t){return this.x=t,this},setY:function(t){return this.y=t,this},setZ:function(t){return this.z=t,this},setW:function(t){return this.w=t,this},setComponent:function(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this},getComponent:function(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}},clone:function(){return new this.constructor(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this},add:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this},addScaledVector:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this},sub:function(t,e){return void 0!==e?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)},subScalar:function(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this},subVectors:function(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this},multiplyScalar:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,a=t.elements;return this.x=a[0]*e+a[4]*i+a[8]*n+a[12]*r,this.y=a[1]*e+a[5]*i+a[9]*n+a[13]*r,this.z=a[2]*e+a[6]*i+a[10]*n+a[14]*r,this.w=a[3]*e+a[7]*i+a[11]*n+a[15]*r,this},divideScalar:function(t){return this.multiplyScalar(1/t)},setAxisAngleFromQuaternion:function(t){this.w=2*Math.acos(t.w);var e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this},setAxisAngleFromRotationMatrix:function(t){var e,i,n,r,a=t.elements,o=a[0],s=a[4],c=a[8],h=a[1],l=a[5],u=a[9],p=a[2],d=a[6],f=a[10];if(Math.abs(s-h)<.01&&Math.abs(c-p)<.01&&Math.abs(u-d)<.01){if(Math.abs(s+h)<.1&&Math.abs(c+p)<.1&&Math.abs(u+d)<.1&&Math.abs(o+l+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;var m=(o+1)/2,g=(l+1)/2,v=(f+1)/2,y=(s+h)/4,x=(c+p)/4,_=(u+d)/4;return m>g&&m>v?m<.01?(i=0,n=.707106781,r=.707106781):(n=y/(i=Math.sqrt(m)),r=x/i):g>v?g<.01?(i=.707106781,n=0,r=.707106781):(i=y/(n=Math.sqrt(g)),r=_/n):v<.01?(i=.707106781,n=.707106781,r=0):(i=x/(r=Math.sqrt(v)),n=_/r),this.set(i,n,r,e),this}var b=Math.sqrt((d-u)*(d-u)+(c-p)*(c-p)+(h-s)*(h-s));return Math.abs(b)<.001&&(b=1),this.x=(d-u)/b,this.y=(c-p)/b,this.z=(h-s)/b,this.w=Math.acos((o+l+f-1)/2),this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this},clamp:function(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this},clampScalar:function(){var t,e;return function(i,n){return void 0===t&&(t=new L,e=new L),t.set(i,i,i,i),e.set(n,n,n,n),this.clamp(t,e)}}(),clampLength:function(t,e){var i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))},floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this},ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this},round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this},roundToZero:function(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lengthSq:function(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)},manhattanLength:function(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)},normalize:function(){return this.divideScalar(this.length()||1)},setLength:function(t){return this.normalize().multiplyScalar(t)},lerp:function(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this},lerpVectors:function(t,e,i){return this.subVectors(e,t).multiplyScalar(i).add(t)},equals:function(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t},fromBufferAttribute:function(t,e,i){return void 0!==i&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}}),P.prototype=Object.assign(Object.create(r.prototype),{constructor:P,isWebGLRenderTarget:!0,setSize:function(t,e){this.width===t&&this.height===e||(this.width=t,this.height=e,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.width=t.width,this.height=t.height,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),C.prototype=Object.create(P.prototype),C.prototype.constructor=C,C.prototype.isWebGLRenderTargetCube=!0,O.prototype=Object.create(R.prototype),O.prototype.constructor=O,O.prototype.isDataTexture=!0,Object.assign(I.prototype,{isBox3:!0,set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromArray:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,a=-1/0,o=-1/0,s=0,c=t.length;s<c;s+=3){var h=t[s],l=t[s+1],u=t[s+2];h<e&&(e=h),l<i&&(i=l),u<n&&(n=u),h>r&&(r=h),l>a&&(a=l),u>o&&(o=u)}return this.min.set(e,i,n),this.max.set(r,a,o),this},setFromBufferAttribute:function(t){for(var e=1/0,i=1/0,n=1/0,r=-1/0,a=-1/0,o=-1/0,s=0,c=t.count;s<c;s++){var h=t.getX(s),l=t.getY(s),u=t.getZ(s);h<e&&(e=h),l<i&&(i=l),u<n&&(n=u),h>r&&(r=h),l>a&&(a=l),u>o&&(o=u)}return this.min.set(e,i,n),this.max.set(r,a,o),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new _;return function(e,i){var n=t.copy(i).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),setFromObject:function(t){return this.makeEmpty(),this.expandByObject(t)},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box3: .getCenter() target is now required"),t=new _),this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box3: .getSize() target is now required"),t=new _),this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},expandByObject:function(){var t,e,i,n=new _;function r(r){var a=r.geometry;if(void 0!==a)if(a.isGeometry){var o=a.vertices;for(e=0,i=o.length;e<i;e++)n.copy(o[e]),n.applyMatrix4(r.matrixWorld),t.expandByPoint(n)}else if(a.isBufferGeometry){var s=a.attributes.position;if(void 0!==s)for(e=0,i=s.count;e<i;e++)n.fromBufferAttribute(s,e).applyMatrix4(r.matrixWorld),t.expandByPoint(n)}}return function(e){return t=this,e.updateMatrixWorld(!0),e.traverse(r),this}}(),containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .getParameter() target is now required"),e=new _),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)},intersectsSphere:(w=new _,function(t){return this.clampPoint(t.center,w),w.distanceToSquared(t.center)<=t.radius*t.radius}),intersectsPlane:function(t){var e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=t.constant&&i>=t.constant},intersectsTriangle:function(){var t=new _,e=new _,i=new _,n=new _,r=new _,a=new _,o=new _,s=new _,c=new _,h=new _;function l(n){var r,a;for(r=0,a=n.length-3;r<=a;r+=3){o.fromArray(n,r);var s=c.x*Math.abs(o.x)+c.y*Math.abs(o.y)+c.z*Math.abs(o.z),h=t.dot(o),l=e.dot(o),u=i.dot(o);if(Math.max(-Math.max(h,l,u),Math.min(h,l,u))>s)return!1}return!0}return function(o){if(this.isEmpty())return!1;this.getCenter(s),c.subVectors(this.max,s),t.subVectors(o.a,s),e.subVectors(o.b,s),i.subVectors(o.c,s),n.subVectors(e,t),r.subVectors(i,e),a.subVectors(t,i);var u=[0,-n.z,n.y,0,-r.z,r.y,0,-a.z,a.y,n.z,0,-n.x,r.z,0,-r.x,a.z,0,-a.x,-n.y,n.x,0,-r.y,r.x,0,-a.y,a.x,0];return!!l(u)&&(!!l(u=[1,0,0,0,1,0,0,0,1])&&(h.crossVectors(n,r),l(u=[h.x,h.y,h.z])))}}(),clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box3: .clampPoint() target is now required"),e=new _),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new _;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),getBoundingSphere:function(){var t=new _;return function(e){return void 0===e&&(console.warn("THREE.Box3: .getBoundingSphere() target is now required"),e=new N),this.getCenter(e.center),e.radius=.5*this.getSize(t).length(),e}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},applyMatrix4:function(t){if(this.isEmpty())return this;var e=t.elements,i=e[0]*this.min.x,n=e[1]*this.min.x,r=e[2]*this.min.x,a=e[0]*this.max.x,o=e[1]*this.max.x,s=e[2]*this.max.x,c=e[4]*this.min.y,h=e[5]*this.min.y,l=e[6]*this.min.y,u=e[4]*this.max.y,p=e[5]*this.max.y,d=e[6]*this.max.y,f=e[8]*this.min.z,m=e[9]*this.min.z,g=e[10]*this.min.z,v=e[8]*this.max.z,y=e[9]*this.max.z,x=e[10]*this.max.z;return this.min.x=Math.min(i,a)+Math.min(c,u)+Math.min(f,v)+e[12],this.min.y=Math.min(n,o)+Math.min(h,p)+Math.min(m,y)+e[13],this.min.z=Math.min(r,s)+Math.min(l,d)+Math.min(g,x)+e[14],this.max.x=Math.max(i,a)+Math.max(c,u)+Math.max(f,v)+e[12],this.max.y=Math.max(n,o)+Math.max(h,p)+Math.max(m,y)+e[13],this.max.z=Math.max(r,s)+Math.max(l,d)+Math.max(g,x)+e[14],this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Object.assign(N.prototype,{set:function(t,e){return this.center.copy(t),this.radius=e,this},setFromPoints:(M=new I,function(t,e){var i=this.center;void 0!==e?i.copy(e):M.setFromPoints(t).getCenter(i);for(var n=0,r=0,a=t.length;r<a;r++)n=Math.max(n,i.distanceToSquared(t[r]));return this.radius=Math.sqrt(n),this}),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.center.copy(t.center),this.radius=t.radius,this},empty:function(){return this.radius<=0},containsPoint:function(t){return t.distanceToSquared(this.center)<=this.radius*this.radius},distanceToPoint:function(t){return t.distanceTo(this.center)-this.radius},intersectsSphere:function(t){var e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e},intersectsBox:function(t){return t.intersectsSphere(this)},intersectsPlane:function(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius},clampPoint:function(t,e){var i=this.center.distanceToSquared(t);return void 0===e&&(console.warn("THREE.Sphere: .clampPoint() target is now required"),e=new _),e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e},getBoundingBox:function(t){return void 0===t&&(console.warn("THREE.Sphere: .getBoundingBox() target is now required"),t=new I),t.set(this.center,this.center),t.expandByScalar(this.radius),t},applyMatrix4:function(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this},translate:function(t){return this.center.add(t),this},equals:function(t){return t.center.equals(this.center)&&t.radius===this.radius}}),Object.assign(D.prototype,{set:function(t,e){return this.normal.copy(t),this.constant=e,this},setComponents:function(t,e,i,n){return this.normal.set(t,e,i),this.constant=n,this},setFromNormalAndCoplanarPoint:function(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this},setFromCoplanarPoints:function(){var t=new _,e=new _;return function(i,n,r){var a=t.subVectors(r,n).cross(e.subVectors(i,n)).normalize();return this.setFromNormalAndCoplanarPoint(a,i),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.normal.copy(t.normal),this.constant=t.constant,this},normalize:function(){var t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this},negate:function(){return this.constant*=-1,this.normal.negate(),this},distanceToPoint:function(t){return this.normal.dot(t)+this.constant},distanceToSphere:function(t){return this.distanceToPoint(t.center)-t.radius},projectPoint:function(t,e){return void 0===e&&(console.warn("THREE.Plane: .projectPoint() target is now required"),e=new _),e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)},intersectLine:function(){var t=new _;return function(e,i){void 0===i&&(console.warn("THREE.Plane: .intersectLine() target is now required"),i=new _);var n=e.delta(t),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?i.copy(e.start):void 0;var a=-(e.start.dot(this.normal)+this.constant)/r;return a<0||a>1?void 0:i.copy(n).multiplyScalar(a).add(e.start)}}(),intersectsLine:function(t){var e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0},intersectsBox:function(t){return t.intersectsPlane(this)},intersectsSphere:function(t){return t.intersectsPlane(this)},coplanarPoint:function(t){return void 0===t&&(console.warn("THREE.Plane: .coplanarPoint() target is now required"),t=new _),t.copy(this.normal).multiplyScalar(-this.constant)},applyMatrix4:function(){var t=new _,e=new b;return function(i,n){var r=n||e.getNormalMatrix(i),a=this.coplanarPoint(t).applyMatrix4(i),o=this.normal.applyMatrix3(r).normalize();return this.constant=-a.dot(o),this}}(),translate:function(t){return this.constant-=t.dot(this.normal),this},equals:function(t){return t.normal.equals(this.normal)&&t.constant===this.constant}}),Object.assign(U.prototype,{set:function(t,e,i,n,r,a){var o=this.planes;return o[0].copy(t),o[1].copy(e),o[2].copy(i),o[3].copy(n),o[4].copy(r),o[5].copy(a),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){for(var e=this.planes,i=0;i<6;i++)e[i].copy(t.planes[i]);return this},setFromMatrix:function(t){var e=this.planes,i=t.elements,n=i[0],r=i[1],a=i[2],o=i[3],s=i[4],c=i[5],h=i[6],l=i[7],u=i[8],p=i[9],d=i[10],f=i[11],m=i[12],g=i[13],v=i[14],y=i[15];return e[0].setComponents(o-n,l-s,f-u,y-m).normalize(),e[1].setComponents(o+n,l+s,f+u,y+m).normalize(),e[2].setComponents(o+r,l+c,f+p,y+g).normalize(),e[3].setComponents(o-r,l-c,f-p,y-g).normalize(),e[4].setComponents(o-a,l-h,f-d,y-v).normalize(),e[5].setComponents(o+a,l+h,f+d,y+v).normalize(),this},intersectsObject:(S=new N,function(t){var e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),S.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(S)}),intersectsSprite:function(){var t=new N;return function(e){return t.center.set(0,0,0),t.radius=.7071067811865476,t.applyMatrix4(e.matrixWorld),this.intersectsSphere(t)}}(),intersectsSphere:function(t){for(var e=this.planes,i=t.center,n=-t.radius,r=0;r<6;r++){if(e[r].distanceToPoint(i)<n)return!1}return!0},intersectsBox:(E=new _,T=new _,function(t){for(var e=this.planes,i=0;i<6;i++){var n=e[i];E.x=n.normal.x>0?t.min.x:t.max.x,T.x=n.normal.x>0?t.max.x:t.min.x,E.y=n.normal.y>0?t.min.y:t.max.y,T.y=n.normal.y>0?t.max.y:t.min.y,E.z=n.normal.z>0?t.min.z:t.max.z,T.z=n.normal.z>0?t.max.z:t.min.z;var r=n.distanceToPoint(E),a=n.distanceToPoint(T);if(r<0&&a<0)return!1}return!0}),containsPoint:function(t){for(var e=this.planes,i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}});var z,B={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif\n",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif\n",alphatest_fragment:"#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif\n",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif\n",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"\nvec3 transformed = vec3( position );\n",beginnormal_vertex:"\nvec3 objectNormal = vec3( normal );\n",bsdfs:"float punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tif( decayExponent > 0.0 ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tfloat maxDistanceCutoffFactor = pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\treturn distanceFalloff * maxDistanceCutoffFactor;\n#else\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n#endif\n\t}\n\treturn 1.0;\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNL = saturate( dot( geometry.normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE  = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS  = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness ) {\n\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 AB = vec2( -1.04, 1.04 ) * a004 + r.zw;\n\treturn specularColor * AB.x + AB.y;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif\n",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif\n",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( PHYSICAL ) && ! defined( PHONG )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif\n",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvarying vec3 vViewPosition;\n#endif\n",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0 && ! defined( PHYSICAL ) && ! defined( PHONG )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n",color_fragment:"#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif\n",color_pars_vertex:"#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif",color_vertex:"#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif",common:"#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\n#define EPSILON 1e-6\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#define whiteCompliment(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\n",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n#define cubeUV_textureSize (1024.0)\nint getFaceFromDirection(vec3 direction) {\n\tvec3 absDirection = abs(direction);\n\tint face = -1;\n\tif( absDirection.x > absDirection.z ) {\n\t\tif(absDirection.x > absDirection.y )\n\t\t\tface = direction.x > 0.0 ? 0 : 3;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\telse {\n\t\tif(absDirection.z > absDirection.y )\n\t\t\tface = direction.z > 0.0 ? 2 : 5;\n\t\telse\n\t\t\tface = direction.y > 0.0 ? 1 : 4;\n\t}\n\treturn face;\n}\n#define cubeUV_maxLods1  (log2(cubeUV_textureSize*0.25) - 1.0)\n#define cubeUV_rangeClamp (exp2((6.0 - 1.0) * 2.0))\nvec2 MipLevelInfo( vec3 vec, float roughnessLevel, float roughness ) {\n\tfloat scale = exp2(cubeUV_maxLods1 - roughnessLevel);\n\tfloat dxRoughness = dFdx(roughness);\n\tfloat dyRoughness = dFdy(roughness);\n\tvec3 dx = dFdx( vec * scale * dxRoughness );\n\tvec3 dy = dFdy( vec * scale * dyRoughness );\n\tfloat d = max( dot( dx, dx ), dot( dy, dy ) );\n\td = clamp(d, 1.0, cubeUV_rangeClamp);\n\tfloat mipLevel = 0.5 * log2(d);\n\treturn vec2(floor(mipLevel), fract(mipLevel));\n}\n#define cubeUV_maxLods2 (log2(cubeUV_textureSize*0.25) - 2.0)\n#define cubeUV_rcpTextureSize (1.0 / cubeUV_textureSize)\nvec2 getCubeUV(vec3 direction, float roughnessLevel, float mipLevel) {\n\tmipLevel = roughnessLevel > cubeUV_maxLods2 - 3.0 ? 0.0 : mipLevel;\n\tfloat a = 16.0 * cubeUV_rcpTextureSize;\n\tvec2 exp2_packed = exp2( vec2( roughnessLevel, mipLevel ) );\n\tvec2 rcp_exp2_packed = vec2( 1.0 ) / exp2_packed;\n\tfloat powScale = exp2_packed.x * exp2_packed.y;\n\tfloat scale = rcp_exp2_packed.x * rcp_exp2_packed.y * 0.25;\n\tfloat mipOffset = 0.75*(1.0 - rcp_exp2_packed.y) * rcp_exp2_packed.x;\n\tbool bRes = mipLevel == 0.0;\n\tscale =  bRes && (scale < a) ? a : scale;\n\tvec3 r;\n\tvec2 offset;\n\tint face = getFaceFromDirection(direction);\n\tfloat rcpPowScale = 1.0 / powScale;\n\tif( face == 0) {\n\t\tr = vec3(direction.x, -direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 1) {\n\t\tr = vec3(direction.y, direction.x, direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 2) {\n\t\tr = vec3(direction.z, direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.75 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? a : offset.y;\n\t}\n\telse if( face == 3) {\n\t\tr = vec3(direction.x, direction.z, direction.y);\n\t\toffset = vec2(0.0+mipOffset,0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse if( face == 4) {\n\t\tr = vec3(direction.y, direction.x, -direction.z);\n\t\toffset = vec2(scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\telse {\n\t\tr = vec3(direction.z, -direction.x, direction.y);\n\t\toffset = vec2(2.0*scale+mipOffset, 0.5 * rcpPowScale);\n\t\toffset.y = bRes && (offset.y < 2.0*a) ? 0.0 : offset.y;\n\t}\n\tr = normalize(r);\n\tfloat texelOffset = 0.5 * cubeUV_rcpTextureSize;\n\tvec2 s = ( r.yz / abs( r.x ) + vec2( 1.0 ) ) * 0.5;\n\tvec2 base = offset + vec2( texelOffset );\n\treturn base + s * ( scale - 2.0 * texelOffset );\n}\n#define cubeUV_maxLods3 (log2(cubeUV_textureSize*0.25) - 3.0)\nvec4 textureCubeUV(vec3 reflectedDirection, float roughness ) {\n\tfloat roughnessVal = roughness* cubeUV_maxLods3;\n\tfloat r1 = floor(roughnessVal);\n\tfloat r2 = r1 + 1.0;\n\tfloat t = fract(roughnessVal);\n\tvec2 mipInfo = MipLevelInfo(reflectedDirection, r1, roughness);\n\tfloat s = mipInfo.y;\n\tfloat level0 = mipInfo.x;\n\tfloat level1 = level0 + 1.0;\n\tlevel1 = level1 > 5.0 ? 5.0 : level1;\n\tlevel0 += min( floor( s + 0.5 ), 5.0 );\n\tvec2 uv_10 = getCubeUV(reflectedDirection, r1, level0);\n\tvec4 color10 = envMapTexelToLinear(texture2D(envMap, uv_10));\n\tvec2 uv_20 = getCubeUV(reflectedDirection, r2, level0);\n\tvec4 color20 = envMapTexelToLinear(texture2D(envMap, uv_20));\n\tvec4 result = mix(color10, color20, t);\n\treturn vec4(result.rgb, 1.0);\n}\n#endif\n",defaultnormal_vertex:"vec3 transformedNormal = normalMatrix * objectNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif\n",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, uv ).x * displacementScale + displacementBias );\n#endif\n",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif\n",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif\n",encodings_fragment:"  gl_FragColor = linearToOutputTexel( gl_FragColor );\n",encodings_pars_fragment:"\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.w );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.xyz * value.w * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat M      = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM            = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.x, max( value.g, value.b ) );\n\tfloat D      = max( maxRange / maxRGB, 1.0 );\n\tD            = min( floor( D ) / 255.0, 1.0 );\n\treturn vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value )  {\n\tvec3 Xp_Y_XYZp = value.rgb * cLogLuvM;\n\tXp_Y_XYZp = max(Xp_Y_XYZp, vec3(1e-6, 1e-6, 1e-6));\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract(Le);\n\tvResult.z = (Le - (floor(vResult.w*255.0))/255.0)/255.0;\n\treturn vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2((Le - 127.0) / 2.0);\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = Xp_Y_XYZp.rgb * cLogLuvInverseM;\n\treturn vec4( max(vRGB, 0.0), 1.0 );\n}\n",envmap_fragment:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvec3 cameraToVertex = normalize( vWorldPosition - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\tenvColor = envMapTexelToLinear( envColor );\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif\n",envmap_pars_fragment:"#if defined( USE_ENVMAP ) || defined( PHYSICAL )\n\tuniform float reflectivity;\n\tuniform float envMapIntensity;\n#endif\n#ifdef USE_ENVMAP\n\t#if ! defined( PHYSICAL ) && ( defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) )\n\t\tvarying vec3 vWorldPosition;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( PHYSICAL )\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif\n",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif\n",envmap_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif\n",fog_vertex:"\n#ifdef USE_FOG\nfogDepth = -mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n  varying float fogDepth;\n#endif\n",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = whiteCompliment( exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 ) );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif\n",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif\n",gradientmap_pars_fragment:"#ifdef TOON\n\tuniform sampler2D gradientMap;\n\tvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\t\tfloat dotNL = dot( normal, lightDirection );\n\t\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t\t#ifdef USE_GRADIENTMAP\n\t\t\treturn texture2D( gradientMap, coord ).rgb;\n\t\t#else\n\t\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t\t#endif\n\t}\n#endif\n",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\treflectedLight.indirectDiffuse += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n#endif\n",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvLightFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\n#endif\n",lights_pars_begin:"uniform vec3 ambientLightColor;\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight  ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif\n",lights_pars_maps:"#if defined( USE_ENVMAP ) && defined( PHYSICAL )\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\tvec4 envMapColor = textureCubeUV( queryVec, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in GeometricContext geometry, const in float blinnShininessExponent, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( -geometry.viewDir, geometry.normal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( -geometry.viewDir, geometry.normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( blinnShininessExponent, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\tvec4 envMapColor = textureCubeUV(queryReflectVec, BlinnExponentToGGXRoughness(blinnShininessExponent));\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif\n",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;\n",lights_phong_pars_fragment:"varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifdef TOON\n\t\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#else\n\t\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\t\tvec3 irradiance = dotNL * directLight.color;\n\t#endif\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)\n",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nmaterial.specularRoughness = clamp( roughnessFactor, 0.04, 1.0 );\n#ifdef STANDARD\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.clearCoat = saturate( clearCoat );\tmaterial.clearCoatRoughness = clamp( clearCoatRoughness, 0.04, 1.0 );\n#endif\n",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n\t#ifndef STANDARD\n\t\tfloat clearCoat;\n\t\tfloat clearCoatRoughness;\n\t#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearCoatDHRApprox( const in float roughness, const in float dotNL ) {\n\treturn DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos - halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos + halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos + halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos - halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifndef STANDARD\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.directSpecular += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry, material.specularColor, material.specularRoughness );\n\treflectedLight.directDiffuse += ( 1.0 - clearCoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\t#ifndef STANDARD\n\t\treflectedLight.directSpecular += irradiance * material.clearCoat * BRDF_Specular_GGX( directLight, geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 clearCoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t#ifndef STANDARD\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\tfloat dotNL = dotNV;\n\t\tfloat clearCoatDHR = material.clearCoat * clearCoatDHRApprox( material.clearCoatRoughness, dotNL );\n\t#else\n\t\tfloat clearCoatDHR = 0.0;\n\t#endif\n\treflectedLight.indirectSpecular += ( 1.0 - clearCoatDHR ) * radiance * BRDF_Specular_GGX_Environment( geometry, material.specularColor, material.specularRoughness );\n\t#ifndef STANDARD\n\t\treflectedLight.indirectSpecular += clearCoatRadiance * material.clearCoat * BRDF_Specular_GGX_Environment( geometry, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearCoatRoughness );\n\t#endif\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\n#define Material_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.specularRoughness )\n#define Material_ClearCoat_BlinnShininessExponent( material )   GGXRoughnessToBlinnExponent( material.clearCoatRoughness )\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}\n",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = normalize( vViewPosition );\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( pointLight.shadow, directLight.visible ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( spotLight.shadow, directLight.visible ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#ifdef USE_SHADOWMAP\n\t\tdirectLight.color *= all( bvec2( directionalLight.shadow, directLight.visible ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearCoatRadiance = vec3( 0.0 );\n#endif\n",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec3 lightMapIrradiance = texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( PHYSICAL ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tirradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry, Material_BlinnShininessExponent( material ), maxMipLevel );\n\t#ifndef STANDARD\n\t\tclearCoatRadiance += getLightProbeIndirectRadiance( geometry, Material_ClearCoat_BlinnShininessExponent( material ), maxMipLevel );\n\t#endif\n#endif\n",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, clearCoatRadiance, geometry, material, reflectedLight );\n#endif\n",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#ifdef USE_LOGDEPTHBUF\n\tuniform float logDepthBufFC;\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n#endif\n",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t#endif\n\tuniform float logDepthBufFC;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t#else\n\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\tgl_Position.z *= gl_Position.w;\n\t#endif\n#endif\n",map_fragment:"#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif\n",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n",map_particle_fragment:"#ifdef USE_MAP\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n",map_particle_pars_fragment:"#ifdef USE_MAP\n\tuniform mat3 uvTransform;\n\tuniform sampler2D map;\n#endif\n",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif\n",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal += ( morphNormal0 - normal ) * morphTargetInfluences[ 0 ];\n\tobjectNormal += ( morphNormal1 - normal ) * morphTargetInfluences[ 1 ];\n\tobjectNormal += ( morphNormal2 - normal ) * morphTargetInfluences[ 2 ];\n\tobjectNormal += ( morphNormal3 - normal ) * morphTargetInfluences[ 3 ];\n#endif\n",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed += ( morphTarget0 - position ) * morphTargetInfluences[ 0 ];\n\ttransformed += ( morphTarget1 - position ) * morphTargetInfluences[ 1 ];\n\ttransformed += ( morphTarget2 - position ) * morphTargetInfluences[ 2 ];\n\ttransformed += ( morphTarget3 - position ) * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += ( morphTarget4 - position ) * morphTargetInfluences[ 4 ];\n\ttransformed += ( morphTarget5 - position ) * morphTargetInfluences[ 5 ];\n\ttransformed += ( morphTarget6 - position ) * morphTargetInfluences[ 6 ];\n\ttransformed += ( morphTarget7 - position ) * morphTargetInfluences[ 7 ];\n\t#endif\n#endif\n",normal_fragment_begin:"#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n#endif\n",normal_fragment_maps:"#ifdef USE_NORMALMAP\n\tnormal = perturbNormal2Arb( -vViewPosition, normal );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif\n",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t\tmapN.xy *= normalScale;\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif\n",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256.,  256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}\n",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif\n",project_vertex:"vec4 mvPosition = modelViewMatrix * vec4( transformed, 1.0 );\ngl_Position = projectionMatrix * mvPosition;\n",dithering_fragment:"#if defined( DITHERING )\n  gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif\n",dithering_pars_fragment:"#if defined( DITHERING )\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif\n",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif\n",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tfloat texture2DShadowLerp( sampler2D depths, vec2 size, vec2 uv, float compare ) {\n\t\tconst vec2 offset = vec2( 0.0, 1.0 );\n\t\tvec2 texelSize = vec2( 1.0 ) / size;\n\t\tvec2 centroidUV = floor( uv * size + 0.5 ) / size;\n\t\tfloat lb = texture2DCompare( depths, centroidUV + texelSize * offset.xx, compare );\n\t\tfloat lt = texture2DCompare( depths, centroidUV + texelSize * offset.xy, compare );\n\t\tfloat rb = texture2DCompare( depths, centroidUV + texelSize * offset.yx, compare );\n\t\tfloat rt = texture2DCompare( depths, centroidUV + texelSize * offset.yy, compare );\n\t\tvec2 f = fract( uv * size + 0.5 );\n\t\tfloat a = mix( lb, lt, f.y );\n\t\tfloat b = mix( rb, rt, f.y );\n\t\tfloat c = mix( a, b, f.x );\n\t\treturn c;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tshadow = (\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DShadowLerp( shadowMap, shadowMapSize, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif\n",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHTS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHTS ];\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHTS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHTS ];\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHTS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHTS ];\n\t#endif\n#endif\n",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif\n",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHTS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= bool( directionalLight.shadow ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHTS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= bool( spotLight.shadow ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHTS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= bool( pointLight.shadow ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}\n",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif\n",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif\n",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix  = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n#endif\n",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n  gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif\n",tonemapping_pars_fragment:"#ifndef saturate\n\t#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\n",uv_pars_fragment:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\n",uv_vertex:"#if defined( USE_MAP ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( USE_SPECULARMAP ) || defined( USE_ALPHAMAP ) || defined( USE_EMISSIVEMAP ) || defined( USE_ROUGHNESSMAP ) || defined( USE_METALNESSMAP )\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = uv2;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n#endif\n",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldPosition;\nvoid main() {\n\tgl_FragColor = textureCube( tCube, vec3( tFlip * vWorldPosition.x, vWorldPosition.yz ) );\n\tgl_FragColor.a *= opacity;\n}\n",cube_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}\n",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#endif\n}\n",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n}\n",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}\n",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}\n",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldPosition );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n}\n",equirect_vert:"varying vec3 vWorldPosition;\n#include <common>\nvoid main() {\n\tvWorldPosition = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}\n",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}\n",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\treflectedLight.indirectDiffuse += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}\n",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",meshphysical_frag:"#define PHYSICAL\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifndef STANDARD\n\tuniform float clearCoat;\n\tuniform float clearCoatRoughness;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <lights_pars_begin>\n#include <lights_pars_maps>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}\n",meshphysical_vert:"#define PHYSICAL\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n",normal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}\n",normal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}\n",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <premultiplied_alpha_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}\n",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#ifdef USE_SIZEATTENUATION\n\t\tgl_PointSize = size * ( scale / - mvPosition.z );\n\t#else\n\t\tgl_PointSize = size;\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}\n",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <fog_fragment>\n}\n",shadow_vert:"#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}\n"},F={merge:function(t){for(var e={},i=0;i<t.length;i++){var n=this.clone(t[i]);for(var r in n)e[r]=n[r]}return e},clone:function(t){var e={};for(var i in t)for(var n in e[i]={},t[i]){var r=t[i][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture)?e[i][n]=r.clone():Array.isArray(r)?e[i][n]=r.slice():e[i][n]=r}return e}},G={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function H(t,e,i){return void 0===e&&void 0===i?this.set(t):this.setRGB(t,e,i)}Object.assign(H.prototype,{isColor:!0,r:1,g:1,b:1,set:function(t){return t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t),this},setScalar:function(t){return this.r=t,this.g=t,this.b=t,this},setHex:function(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,this},setRGB:function(t,e,i){return this.r=t,this.g=e,this.b=i,this},setHSL:function(){function t(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+6*(e-t)*(2/3-i):t}return function(e,i,n){if(e=g.euclideanModulo(e,1),i=g.clamp(i,0,1),n=g.clamp(n,0,1),0===i)this.r=this.g=this.b=n;else{var r=n<=.5?n*(1+i):n+i-n*i,a=2*n-r;this.r=t(a,r,e+1/3),this.g=t(a,r,e),this.b=t(a,r,e-1/3)}return this}}(),setStyle:function(t){function e(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}var i;if(i=/^((?:rgb|hsl)a?)\(\s*([^\)]*)\)/.exec(t)){var n,r=i[1],a=i[2];switch(r){case"rgb":case"rgba":if(n=/^(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(n[1],10))/255,this.g=Math.min(255,parseInt(n[2],10))/255,this.b=Math.min(255,parseInt(n[3],10))/255,e(n[5]),this;if(n=/^(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(n[1],10))/100,this.g=Math.min(100,parseInt(n[2],10))/100,this.b=Math.min(100,parseInt(n[3],10))/100,e(n[5]),this;break;case"hsl":case"hsla":if(n=/^([0-9]*\.?[0-9]+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(,\s*([0-9]*\.?[0-9]+)\s*)?$/.exec(a)){var o=parseFloat(n[1])/360,s=parseInt(n[2],10)/100,c=parseInt(n[3],10)/100;return e(n[5]),this.setHSL(o,s,c)}}}else if(i=/^\#([A-Fa-f0-9]+)$/.exec(t)){var h,l=(h=i[1]).length;if(3===l)return this.r=parseInt(h.charAt(0)+h.charAt(0),16)/255,this.g=parseInt(h.charAt(1)+h.charAt(1),16)/255,this.b=parseInt(h.charAt(2)+h.charAt(2),16)/255,this;if(6===l)return this.r=parseInt(h.charAt(0)+h.charAt(1),16)/255,this.g=parseInt(h.charAt(2)+h.charAt(3),16)/255,this.b=parseInt(h.charAt(4)+h.charAt(5),16)/255,this}t&&t.length>0&&(void 0!==(h=G[t])?this.setHex(h):console.warn("THREE.Color: Unknown color "+t));return this},clone:function(){return new this.constructor(this.r,this.g,this.b)},copy:function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this},copyGammaToLinear:function(t,e){return void 0===e&&(e=2),this.r=Math.pow(t.r,e),this.g=Math.pow(t.g,e),this.b=Math.pow(t.b,e),this},copyLinearToGamma:function(t,e){void 0===e&&(e=2);var i=e>0?1/e:1;return this.r=Math.pow(t.r,i),this.g=Math.pow(t.g,i),this.b=Math.pow(t.b,i),this},convertGammaToLinear:function(t){return this.copyGammaToLinear(this,t),this},convertLinearToGamma:function(t){return this.copyLinearToGamma(this,t),this},getHex:function(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0},getHexString:function(){return("000000"+this.getHex().toString(16)).slice(-6)},getHSL:function(t){void 0===t&&(console.warn("THREE.Color: .getHSL() target is now required"),t={h:0,s:0,l:0});var e,i,n=this.r,r=this.g,a=this.b,o=Math.max(n,r,a),s=Math.min(n,r,a),c=(s+o)/2;if(s===o)e=0,i=0;else{var h=o-s;switch(i=c<=.5?h/(o+s):h/(2-o-s),o){case n:e=(r-a)/h+(r<a?6:0);break;case r:e=(a-n)/h+2;break;case a:e=(n-r)/h+4}e/=6}return t.h=e,t.s=i,t.l=c,t},getStyle:function(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"},offsetHSL:(z={},function(t,e,i){return this.getHSL(z),z.h+=t,z.s+=e,z.l+=i,this.setHSL(z.h,z.s,z.l),this}),add:function(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this},addColors:function(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this},addScalar:function(t){return this.r+=t,this.g+=t,this.b+=t,this},sub:function(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this},multiply:function(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this},multiplyScalar:function(t){return this.r*=t,this.g*=t,this.b*=t,this},lerp:function(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this},equals:function(t){return t.r===this.r&&t.g===this.g&&t.b===this.b},fromArray:function(t,e){return void 0===e&&(e=0),this.r=t[e],this.g=t[e+1],this.b=t[e+2],this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t},toJSON:function(){return this.getHex()}});var V,k={common:{diffuse:{value:new H(15658734)},opacity:{value:1},map:{value:null},uvTransform:{value:new b},alphaMap:{value:null}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new v(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new H(16777215)}},lights:{ambientLightColor:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{},shadow:{},shadowBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}}},points:{diffuse:{value:new H(15658734)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},uvTransform:{value:new b}}},j={basic:{uniforms:F.merge([k.common,k.specularmap,k.envmap,k.aomap,k.lightmap,k.fog]),vertexShader:B.meshbasic_vert,fragmentShader:B.meshbasic_frag},lambert:{uniforms:F.merge([k.common,k.specularmap,k.envmap,k.aomap,k.lightmap,k.emissivemap,k.fog,k.lights,{emissive:{value:new H(0)}}]),vertexShader:B.meshlambert_vert,fragmentShader:B.meshlambert_frag},phong:{uniforms:F.merge([k.common,k.specularmap,k.envmap,k.aomap,k.lightmap,k.emissivemap,k.bumpmap,k.normalmap,k.displacementmap,k.gradientmap,k.fog,k.lights,{emissive:{value:new H(0)},specular:{value:new H(1118481)},shininess:{value:30}}]),vertexShader:B.meshphong_vert,fragmentShader:B.meshphong_frag},standard:{uniforms:F.merge([k.common,k.envmap,k.aomap,k.lightmap,k.emissivemap,k.bumpmap,k.normalmap,k.displacementmap,k.roughnessmap,k.metalnessmap,k.fog,k.lights,{emissive:{value:new H(0)},roughness:{value:.5},metalness:{value:.5},envMapIntensity:{value:1}}]),vertexShader:B.meshphysical_vert,fragmentShader:B.meshphysical_frag},points:{uniforms:F.merge([k.points,k.fog]),vertexShader:B.points_vert,fragmentShader:B.points_frag},dashed:{uniforms:F.merge([k.common,k.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:B.linedashed_vert,fragmentShader:B.linedashed_frag},depth:{uniforms:F.merge([k.common,k.displacementmap]),vertexShader:B.depth_vert,fragmentShader:B.depth_frag},normal:{uniforms:F.merge([k.common,k.bumpmap,k.normalmap,k.displacementmap,{opacity:{value:1}}]),vertexShader:B.normal_vert,fragmentShader:B.normal_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:B.cube_vert,fragmentShader:B.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:B.equirect_vert,fragmentShader:B.equirect_frag},distanceRGBA:{uniforms:F.merge([k.common,k.displacementmap,{referencePosition:{value:new _},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:B.distanceRGBA_vert,fragmentShader:B.distanceRGBA_frag},shadow:{uniforms:F.merge([k.lights,k.fog,{color:{value:new H(0)},opacity:{value:1}}]),vertexShader:B.shadow_vert,fragmentShader:B.shadow_frag}};function W(){var t=null,e=!1,i=null;function n(r,a){!1!==e&&(i(r,a),t.requestAnimationFrame(n))}return{start:function(){!0!==e&&null!==i&&(t.requestAnimationFrame(n),e=!0)},stop:function(){e=!1},setAnimationLoop:function(t){i=t},setContext:function(e){t=e}}}function X(t){var e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(i){i.isInterleavedBufferAttribute&&(i=i.data);var n=e.get(i);n&&(t.deleteBuffer(n.buffer),e.delete(i))},update:function(i,n){i.isInterleavedBufferAttribute&&(i=i.data);var r=e.get(i);void 0===r?e.set(i,function(e,i){var n=e.array,r=e.dynamic?t.DYNAMIC_DRAW:t.STATIC_DRAW,a=t.createBuffer();t.bindBuffer(i,a),t.bufferData(i,n,r),e.onUploadCallback();var o=t.FLOAT;return n instanceof Float32Array?o=t.FLOAT:n instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):n instanceof Uint16Array?o=t.UNSIGNED_SHORT:n instanceof Int16Array?o=t.SHORT:n instanceof Uint32Array?o=t.UNSIGNED_INT:n instanceof Int32Array?o=t.INT:n instanceof Int8Array?o=t.BYTE:n instanceof Uint8Array&&(o=t.UNSIGNED_BYTE),{buffer:a,type:o,bytesPerElement:n.BYTES_PER_ELEMENT,version:e.version}}(i,n)):r.version<i.version&&(!function(e,i,n){var r=i.array,a=i.updateRange;t.bindBuffer(n,e),!1===i.dynamic?t.bufferData(n,r,t.STATIC_DRAW):-1===a.count?t.bufferSubData(n,0,r):0===a.count?console.error("THREE.WebGLObjects.updateBuffer: dynamic THREE.BufferAttribute marked as needsUpdate but updateRange.count is 0, ensure you are using set methods or updating manually."):(t.bufferSubData(n,a.offset*r.BYTES_PER_ELEMENT,r.subarray(a.offset,a.offset+a.count)),a.count=-1)}(r.buffer,i,n),r.version=i.version)}}}function q(t,e,i,n){this._x=t||0,this._y=e||0,this._z=i||0,this._order=n||q.DefaultOrder}function Y(){this.mask=1}j.physical={uniforms:F.merge([j.standard.uniforms,{clearCoat:{value:0},clearCoatRoughness:{value:0}}]),vertexShader:B.meshphysical_vert,fragmentShader:B.meshphysical_frag},q.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"],q.DefaultOrder="XYZ",Object.defineProperties(q.prototype,{x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback()}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback()}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback()}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback()}}}),Object.assign(q.prototype,{isEuler:!0,set:function(t,e,i,n){return this._x=t,this._y=e,this._z=i,this._order=n||this._order,this.onChangeCallback(),this},clone:function(){return new this.constructor(this._x,this._y,this._z,this._order)},copy:function(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this.onChangeCallback(),this},setFromRotationMatrix:function(t,e,i){var n=g.clamp,r=t.elements,a=r[0],o=r[4],s=r[8],c=r[1],h=r[5],l=r[9],u=r[2],p=r[6],d=r[10];return"XYZ"===(e=e||this._order)?(this._y=Math.asin(n(s,-1,1)),Math.abs(s)<.99999?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(p,h),this._z=0)):"YXZ"===e?(this._x=Math.asin(-n(l,-1,1)),Math.abs(l)<.99999?(this._y=Math.atan2(s,d),this._z=Math.atan2(c,h)):(this._y=Math.atan2(-u,a),this._z=0)):"ZXY"===e?(this._x=Math.asin(n(p,-1,1)),Math.abs(p)<.99999?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-o,h)):(this._y=0,this._z=Math.atan2(c,a))):"ZYX"===e?(this._y=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(this._x=Math.atan2(p,d),this._z=Math.atan2(c,a)):(this._x=0,this._z=Math.atan2(-o,h))):"YZX"===e?(this._z=Math.asin(n(c,-1,1)),Math.abs(c)<.99999?(this._x=Math.atan2(-l,h),this._y=Math.atan2(-u,a)):(this._x=0,this._y=Math.atan2(s,d))):"XZY"===e?(this._z=Math.asin(-n(o,-1,1)),Math.abs(o)<.99999?(this._x=Math.atan2(p,h),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-l,d),this._y=0)):console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: "+e),this._order=e,!1!==i&&this.onChangeCallback(),this},setFromQuaternion:function(){var t=new y;return function(e,i,n){return t.makeRotationFromQuaternion(e),this.setFromRotationMatrix(t,i,n)}}(),setFromVector3:function(t,e){return this.set(t.x,t.y,t.z,e||this._order)},reorder:(V=new x,function(t){return V.setFromEuler(this),this.setFromQuaternion(V,t)}),equals:function(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order},fromArray:function(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this.onChangeCallback(),this},toArray:function(t,e){return void 0===t&&(t=[]),void 0===e&&(e=0),t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t},toVector3:function(t){return t?t.set(this._x,this._y,this._z):new _(this._x,this._y,this._z)},onChange:function(t){return this.onChangeCallback=t,this},onChangeCallback:function(){}}),Object.assign(Y.prototype,{set:function(t){this.mask=1<<t|0},enable:function(t){this.mask|=1<<t|0},toggle:function(t){this.mask^=1<<t|0},disable:function(t){this.mask&=~(1<<t|0)},test:function(t){return 0!=(this.mask&t.mask)}});var Z,J,Q,K,$=0;function tt(){Object.defineProperty(this,"id",{value:$++}),this.uuid=g.generateUUID(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=tt.DefaultUp.clone();var t=new _,e=new q,i=new x,n=new _(1,1,1);e.onChange((function(){i.setFromEuler(e,!1)})),i.onChange((function(){e.setFromQuaternion(i,void 0,!1)})),Object.defineProperties(this,{position:{enumerable:!0,value:t},rotation:{enumerable:!0,value:e},quaternion:{enumerable:!0,value:i},scale:{enumerable:!0,value:n},modelViewMatrix:{value:new y},normalMatrix:{value:new b}}),this.matrix=new y,this.matrixWorld=new y,this.matrixAutoUpdate=tt.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new Y,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.userData={}}function et(){tt.call(this),this.type="Camera",this.matrixWorldInverse=new y,this.projectionMatrix=new y}function it(t,e,i,n,r,a){et.call(this),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=n,this.near=void 0!==r?r:.1,this.far=void 0!==a?a:2e3,this.updateProjectionMatrix()}function nt(t,e,i,n,r,a){this.a=t,this.b=e,this.c=i,this.normal=n&&n.isVector3?n:new _,this.vertexNormals=Array.isArray(n)?n:[],this.color=r&&r.isColor?r:new H,this.vertexColors=Array.isArray(r)?r:[],this.materialIndex=void 0!==a?a:0}tt.DefaultUp=new _(0,1,0),tt.DefaultMatrixAutoUpdate=!0,tt.prototype=Object.assign(Object.create(r.prototype),{constructor:tt,isObject3D:!0,onBeforeRender:function(){},onAfterRender:function(){},applyMatrix:function(t){this.matrix.multiplyMatrices(t,this.matrix),this.matrix.decompose(this.position,this.quaternion,this.scale)},applyQuaternion:function(t){return this.quaternion.premultiply(t),this},setRotationFromAxisAngle:function(t,e){this.quaternion.setFromAxisAngle(t,e)},setRotationFromEuler:function(t){this.quaternion.setFromEuler(t,!0)},setRotationFromMatrix:function(t){this.quaternion.setFromRotationMatrix(t)},setRotationFromQuaternion:function(t){this.quaternion.copy(t)},rotateOnAxis:(K=new x,function(t,e){return K.setFromAxisAngle(t,e),this.quaternion.multiply(K),this}),rotateOnWorldAxis:function(){var t=new x;return function(e,i){return t.setFromAxisAngle(e,i),this.quaternion.premultiply(t),this}}(),rotateX:function(){var t=new _(1,0,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateY:function(){var t=new _(0,1,0);return function(e){return this.rotateOnAxis(t,e)}}(),rotateZ:function(){var t=new _(0,0,1);return function(e){return this.rotateOnAxis(t,e)}}(),translateOnAxis:function(){var t=new _;return function(e,i){return t.copy(e).applyQuaternion(this.quaternion),this.position.add(t.multiplyScalar(i)),this}}(),translateX:function(){var t=new _(1,0,0);return function(e){return this.translateOnAxis(t,e)}}(),translateY:function(){var t=new _(0,1,0);return function(e){return this.translateOnAxis(t,e)}}(),translateZ:function(){var t=new _(0,0,1);return function(e){return this.translateOnAxis(t,e)}}(),localToWorld:function(t){return t.applyMatrix4(this.matrixWorld)},worldToLocal:(Q=new y,function(t){return t.applyMatrix4(Q.getInverse(this.matrixWorld))}),lookAt:function(){var t=new y,e=new _;return function(i,n,r){i.isVector3?e.copy(i):e.set(i,n,r),this.isCamera?t.lookAt(this.position,e,this.up):t.lookAt(e,this.position,this.up),this.quaternion.setFromRotationMatrix(t)}}(),add:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,t.dispatchEvent({type:"added"}),this.children.push(t)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)},remove:function(t){if(arguments.length>1){for(var e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}var i=this.children.indexOf(t);return-1!==i&&(t.parent=null,t.dispatchEvent({type:"removed"}),this.children.splice(i,1)),this},getObjectById:function(t){return this.getObjectByProperty("id",t)},getObjectByName:function(t){return this.getObjectByProperty("name",t)},getObjectByProperty:function(t,e){if(this[t]===e)return this;for(var i=0,n=this.children.length;i<n;i++){var r=this.children[i].getObjectByProperty(t,e);if(void 0!==r)return r}},getWorldPosition:function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldPosition() target is now required"),t=new _),this.updateMatrixWorld(!0),t.setFromMatrixPosition(this.matrixWorld)},getWorldQuaternion:(Z=new _,J=new _,function(t){return void 0===t&&(console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"),t=new x),this.updateMatrixWorld(!0),this.matrixWorld.decompose(Z,t,J),t}),getWorldScale:function(){var t=new _,e=new x;return function(i){return void 0===i&&(console.warn("THREE.Object3D: .getWorldScale() target is now required"),i=new _),this.updateMatrixWorld(!0),this.matrixWorld.decompose(t,e,i),i}}(),getWorldDirection:function(){var t=new x;return function(e){return void 0===e&&(console.warn("THREE.Object3D: .getWorldDirection() target is now required"),e=new _),this.getWorldQuaternion(t),e.set(0,0,1).applyQuaternion(t)}}(),raycast:function(){},traverse:function(t){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverse(t)},traverseVisible:function(t){if(!1!==this.visible){t(this);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].traverseVisible(t)}},traverseAncestors:function(t){var e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))},updateMatrix:function(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0},updateMatrixWorld:function(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(var e=this.children,i=0,n=e.length;i<n;i++)e[i].updateMatrixWorld(t)},toJSON:function(t){var e=void 0===t||"string"==typeof t,i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{}},i.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});var n={};function r(e,i){return void 0===e[i.uuid]&&(e[i.uuid]=i.toJSON(t)),i.uuid}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),!0===this.castShadow&&(n.castShadow=!0),!0===this.receiveShadow&&(n.receiveShadow=!0),!1===this.visible&&(n.visible=!1),!1===this.frustumCulled&&(n.frustumCulled=!1),0!==this.renderOrder&&(n.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),n.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(n.matrixAutoUpdate=!1),void 0!==this.geometry){n.geometry=r(t.geometries,this.geometry);var a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){var o=a.shapes;if(Array.isArray(o))for(var s=0,c=o.length;s<c;s++){var h=o[s];r(t.shapes,h)}else r(t.shapes,o)}}if(void 0!==this.material)if(Array.isArray(this.material)){var l=[];for(s=0,c=this.material.length;s<c;s++)l.push(r(t.materials,this.material[s]));n.material=l}else n.material=r(t.materials,this.material);if(this.children.length>0){n.children=[];for(s=0;s<this.children.length;s++)n.children.push(this.children[s].toJSON(t).object)}if(e){var u=m(t.geometries),p=m(t.materials),d=m(t.textures),f=m(t.images);o=m(t.shapes);u.length>0&&(i.geometries=u),p.length>0&&(i.materials=p),d.length>0&&(i.textures=d),f.length>0&&(i.images=f),o.length>0&&(i.shapes=o)}return i.object=n,i;function m(t){var e=[];for(var i in t){var n=t[i];delete n.metadata,e.push(n)}return e}},clone:function(t){return(new this.constructor).copy(this,t)},copy:function(t,e){if(void 0===e&&(e=!0),this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(var i=0;i<t.children.length;i++){var n=t.children[i];this.add(n.clone())}return this}}),et.prototype=Object.assign(Object.create(tt.prototype),{constructor:et,isCamera:!0,copy:function(t,e){return tt.prototype.copy.call(this,t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this},getWorldDirection:function(){var t=new x;return function(e){return void 0===e&&(console.warn("THREE.Camera: .getWorldDirection() target is now required"),e=new _),this.getWorldQuaternion(t),e.set(0,0,-1).applyQuaternion(t)}}(),updateMatrixWorld:function(t){tt.prototype.updateMatrixWorld.call(this,t),this.matrixWorldInverse.getInverse(this.matrixWorld)},clone:function(){return(new this.constructor).copy(this)}}),it.prototype=Object.assign(Object.create(et.prototype),{constructor:it,isOrthographicCamera:!0,copy:function(t,e){return et.prototype.copy.call(this,t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this},setViewOffset:function(t,e,i,n,r,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,n=(this.top+this.bottom)/2,r=i-t,a=i+t,o=n+e,s=n-e;if(null!==this.view&&this.view.enabled){var c=this.zoom/(this.view.width/this.view.fullWidth),h=this.zoom/(this.view.height/this.view.fullHeight),l=(this.right-this.left)/this.view.width,u=(this.top-this.bottom)/this.view.height;a=(r+=l*(this.view.offsetX/c))+l*(this.view.width/c),s=(o-=u*(this.view.offsetY/h))-u*(this.view.height/h)}this.projectionMatrix.makeOrthographic(r,a,o,s,this.near,this.far)},toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}),Object.assign(nt.prototype,{clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.a=t.a,this.b=t.b,this.c=t.c,this.normal.copy(t.normal),this.color.copy(t.color),this.materialIndex=t.materialIndex;for(var e=0,i=t.vertexNormals.length;e<i;e++)this.vertexNormals[e]=t.vertexNormals[e].clone();for(e=0,i=t.vertexColors.length;e<i;e++)this.vertexColors[e]=t.vertexColors[e].clone();return this}});var rt,at,ot=0;function st(){Object.defineProperty(this,"id",{value:ot+=2}),this.uuid=g.generateUUID(),this.name="",this.type="Geometry",this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.elementsNeedUpdate=!1,this.verticesNeedUpdate=!1,this.uvsNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.lineDistancesNeedUpdate=!1,this.groupsNeedUpdate=!1}function ct(t,e,i){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=!0===i,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function ht(t,e,i){ct.call(this,new Int8Array(t),e,i)}function lt(t,e,i){ct.call(this,new Uint8Array(t),e,i)}function ut(t,e,i){ct.call(this,new Uint8ClampedArray(t),e,i)}function pt(t,e,i){ct.call(this,new Int16Array(t),e,i)}function dt(t,e,i){ct.call(this,new Uint16Array(t),e,i)}function ft(t,e,i){ct.call(this,new Int32Array(t),e,i)}function mt(t,e,i){ct.call(this,new Uint32Array(t),e,i)}function gt(t,e,i){ct.call(this,new Float32Array(t),e,i)}function vt(t,e,i){ct.call(this,new Float64Array(t),e,i)}function yt(){this.vertices=[],this.normals=[],this.colors=[],this.uvs=[],this.uvs2=[],this.groups=[],this.morphTargets={},this.skinWeights=[],this.skinIndices=[],this.boundingBox=null,this.boundingSphere=null,this.verticesNeedUpdate=!1,this.normalsNeedUpdate=!1,this.colorsNeedUpdate=!1,this.uvsNeedUpdate=!1,this.groupsNeedUpdate=!1}function xt(t){if(0===t.length)return-1/0;for(var e=t[0],i=1,n=t.length;i<n;++i)t[i]>e&&(e=t[i]);return e}st.prototype=Object.assign(Object.create(r.prototype),{constructor:st,isGeometry:!0,applyMatrix:function(t){for(var e=(new b).getNormalMatrix(t),i=0,n=this.vertices.length;i<n;i++){this.vertices[i].applyMatrix4(t)}for(i=0,n=this.faces.length;i<n;i++){var r=this.faces[i];r.normal.applyMatrix3(e).normalize();for(var a=0,o=r.vertexNormals.length;a<o;a++)r.vertexNormals[a].applyMatrix3(e).normalize()}return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this.verticesNeedUpdate=!0,this.normalsNeedUpdate=!0,this},rotateX:function(){var t=new y;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new y;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new y;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new y;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new y;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:(at=new tt,function(t){at.lookAt(t),at.updateMatrix(),this.applyMatrix(at.matrix)}),fromBufferGeometry:function(t){var e=this,i=null!==t.index?t.index.array:void 0,n=t.attributes,r=n.position.array,a=void 0!==n.normal?n.normal.array:void 0,o=void 0!==n.color?n.color.array:void 0,s=void 0!==n.uv?n.uv.array:void 0,c=void 0!==n.uv2?n.uv2.array:void 0;void 0!==c&&(this.faceVertexUvs[1]=[]);for(var h=[],l=[],u=[],p=0,d=0;p<r.length;p+=3,d+=2)e.vertices.push(new _(r[p],r[p+1],r[p+2])),void 0!==a&&h.push(new _(a[p],a[p+1],a[p+2])),void 0!==o&&e.colors.push(new H(o[p],o[p+1],o[p+2])),void 0!==s&&l.push(new v(s[d],s[d+1])),void 0!==c&&u.push(new v(c[d],c[d+1]));function f(t,i,n,r){var p=new nt(t,i,n,void 0!==a?[h[t].clone(),h[i].clone(),h[n].clone()]:[],void 0!==o?[e.colors[t].clone(),e.colors[i].clone(),e.colors[n].clone()]:[],r);e.faces.push(p),void 0!==s&&e.faceVertexUvs[0].push([l[t].clone(),l[i].clone(),l[n].clone()]),void 0!==c&&e.faceVertexUvs[1].push([u[t].clone(),u[i].clone(),u[n].clone()])}var m=t.groups;if(m.length>0)for(p=0;p<m.length;p++)for(var g=m[p],y=g.start,x=(d=y,y+g.count);d<x;d+=3)void 0!==i?f(i[d],i[d+1],i[d+2],g.materialIndex):f(d,d+1,d+2,g.materialIndex);else if(void 0!==i)for(p=0;p<i.length;p+=3)f(i[p],i[p+1],i[p+2]);else for(p=0;p<r.length/3;p+=3)f(p,p+1,p+2);return this.computeFaceNormals(),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),this},center:(rt=new _,function(){return this.computeBoundingBox(),this.boundingBox.getCenter(rt).negate(),this.translate(rt.x,rt.y,rt.z),this}),normalize:function(){this.computeBoundingSphere();var t=this.boundingSphere.center,e=this.boundingSphere.radius,i=0===e?1:1/e,n=new y;return n.set(i,0,0,-i*t.x,0,i,0,-i*t.y,0,0,i,-i*t.z,0,0,0,1),this.applyMatrix(n),this},computeFaceNormals:function(){for(var t=new _,e=new _,i=0,n=this.faces.length;i<n;i++){var r=this.faces[i],a=this.vertices[r.a],o=this.vertices[r.b],s=this.vertices[r.c];t.subVectors(s,o),e.subVectors(a,o),t.cross(e),t.normalize(),r.normal.copy(t)}},computeVertexNormals:function(t){var e,i,n,r,a,o;for(void 0===t&&(t=!0),o=new Array(this.vertices.length),e=0,i=this.vertices.length;e<i;e++)o[e]=new _;if(t){var s,c,h,l=new _,u=new _;for(n=0,r=this.faces.length;n<r;n++)a=this.faces[n],s=this.vertices[a.a],c=this.vertices[a.b],h=this.vertices[a.c],l.subVectors(h,c),u.subVectors(s,c),l.cross(u),o[a.a].add(l),o[a.b].add(l),o[a.c].add(l)}else for(this.computeFaceNormals(),n=0,r=this.faces.length;n<r;n++)o[(a=this.faces[n]).a].add(a.normal),o[a.b].add(a.normal),o[a.c].add(a.normal);for(e=0,i=this.vertices.length;e<i;e++)o[e].normalize();for(n=0,r=this.faces.length;n<r;n++){var p=(a=this.faces[n]).vertexNormals;3===p.length?(p[0].copy(o[a.a]),p[1].copy(o[a.b]),p[2].copy(o[a.c])):(p[0]=o[a.a].clone(),p[1]=o[a.b].clone(),p[2]=o[a.c].clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeFlatVertexNormals:function(){var t,e,i;for(this.computeFaceNormals(),t=0,e=this.faces.length;t<e;t++){var n=(i=this.faces[t]).vertexNormals;3===n.length?(n[0].copy(i.normal),n[1].copy(i.normal),n[2].copy(i.normal)):(n[0]=i.normal.clone(),n[1]=i.normal.clone(),n[2]=i.normal.clone())}this.faces.length>0&&(this.normalsNeedUpdate=!0)},computeMorphNormals:function(){var t,e,i,n,r;for(i=0,n=this.faces.length;i<n;i++)for((r=this.faces[i]).__originalFaceNormal?r.__originalFaceNormal.copy(r.normal):r.__originalFaceNormal=r.normal.clone(),r.__originalVertexNormals||(r.__originalVertexNormals=[]),t=0,e=r.vertexNormals.length;t<e;t++)r.__originalVertexNormals[t]?r.__originalVertexNormals[t].copy(r.vertexNormals[t]):r.__originalVertexNormals[t]=r.vertexNormals[t].clone();var a=new st;for(a.faces=this.faces,t=0,e=this.morphTargets.length;t<e;t++){if(!this.morphNormals[t]){this.morphNormals[t]={},this.morphNormals[t].faceNormals=[],this.morphNormals[t].vertexNormals=[];var o=this.morphNormals[t].faceNormals,s=this.morphNormals[t].vertexNormals;for(i=0,n=this.faces.length;i<n;i++)c=new _,h={a:new _,b:new _,c:new _},o.push(c),s.push(h)}var c,h,l=this.morphNormals[t];for(a.vertices=this.morphTargets[t].vertices,a.computeFaceNormals(),a.computeVertexNormals(),i=0,n=this.faces.length;i<n;i++)r=this.faces[i],c=l.faceNormals[i],h=l.vertexNormals[i],c.copy(r.normal),h.a.copy(r.vertexNormals[0]),h.b.copy(r.vertexNormals[1]),h.c.copy(r.vertexNormals[2])}for(i=0,n=this.faces.length;i<n;i++)(r=this.faces[i]).normal=r.__originalFaceNormal,r.vertexNormals=r.__originalVertexNormals},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new I),this.boundingBox.setFromPoints(this.vertices)},computeBoundingSphere:function(){null===this.boundingSphere&&(this.boundingSphere=new N),this.boundingSphere.setFromPoints(this.vertices)},merge:function(t,e,i){if(t&&t.isGeometry){var n,r=this.vertices.length,a=this.vertices,o=t.vertices,s=this.faces,c=t.faces,h=this.faceVertexUvs[0],l=t.faceVertexUvs[0],u=this.colors,p=t.colors;void 0===i&&(i=0),void 0!==e&&(n=(new b).getNormalMatrix(e));for(var d=0,f=o.length;d<f;d++){var m=o[d].clone();void 0!==e&&m.applyMatrix4(e),a.push(m)}for(d=0,f=p.length;d<f;d++)u.push(p[d].clone());for(d=0,f=c.length;d<f;d++){var g,v,y,x=c[d],_=x.vertexNormals,w=x.vertexColors;(g=new nt(x.a+r,x.b+r,x.c+r)).normal.copy(x.normal),void 0!==n&&g.normal.applyMatrix3(n).normalize();for(var M=0,E=_.length;M<E;M++)v=_[M].clone(),void 0!==n&&v.applyMatrix3(n).normalize(),g.vertexNormals.push(v);g.color.copy(x.color);for(M=0,E=w.length;M<E;M++)y=w[M],g.vertexColors.push(y.clone());g.materialIndex=x.materialIndex+i,s.push(g)}for(d=0,f=l.length;d<f;d++){var T=l[d],S=[];if(void 0!==T){for(M=0,E=T.length;M<E;M++)S.push(T[M].clone());h.push(S)}}}else console.error("THREE.Geometry.merge(): geometry not an instance of THREE.Geometry.",t)},mergeMesh:function(t){t&&t.isMesh?(t.matrixAutoUpdate&&t.updateMatrix(),this.merge(t.geometry,t.matrix)):console.error("THREE.Geometry.mergeMesh(): mesh not an instance of THREE.Mesh.",t)},mergeVertices:function(){var t,e,i,n,r,a,o,s,c={},h=[],l=[],u=Math.pow(10,4);for(i=0,n=this.vertices.length;i<n;i++)t=this.vertices[i],void 0===c[e=Math.round(t.x*u)+"_"+Math.round(t.y*u)+"_"+Math.round(t.z*u)]?(c[e]=i,h.push(this.vertices[i]),l[i]=h.length-1):l[i]=l[c[e]];var p=[];for(i=0,n=this.faces.length;i<n;i++){(r=this.faces[i]).a=l[r.a],r.b=l[r.b],r.c=l[r.c],a=[r.a,r.b,r.c];for(var d=0;d<3;d++)if(a[d]===a[(d+1)%3]){p.push(i);break}}for(i=p.length-1;i>=0;i--){var f=p[i];for(this.faces.splice(f,1),o=0,s=this.faceVertexUvs.length;o<s;o++)this.faceVertexUvs[o].splice(f,1)}var m=this.vertices.length-h.length;return this.vertices=h,m},setFromPoints:function(t){this.vertices=[];for(var e=0,i=t.length;e<i;e++){var n=t[e];this.vertices.push(new _(n.x,n.y,n.z||0))}return this},sortFacesByMaterialIndex:function(){for(var t=this.faces,e=t.length,i=0;i<e;i++)t[i]._id=i;t.sort((function(t,e){return t.materialIndex-e.materialIndex}));var n,r,a=this.faceVertexUvs[0],o=this.faceVertexUvs[1];a&&a.length===e&&(n=[]),o&&o.length===e&&(r=[]);for(i=0;i<e;i++){var s=t[i]._id;n&&n.push(a[s]),r&&r.push(o[s])}n&&(this.faceVertexUvs[0]=n),r&&(this.faceVertexUvs[1]=r)},toJSON:function(){var t={metadata:{version:4.5,type:"Geometry",generator:"Geometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),void 0!==this.parameters){var e=this.parameters;for(var i in e)void 0!==e[i]&&(t[i]=e[i]);return t}for(var n=[],r=0;r<this.vertices.length;r++){var a=this.vertices[r];n.push(a.x,a.y,a.z)}var o=[],s=[],c={},h=[],l={},u=[],p={};for(r=0;r<this.faces.length;r++){var d=this.faces[r],f=void 0!==this.faceVertexUvs[0][r],m=d.normal.length()>0,g=d.vertexNormals.length>0,v=1!==d.color.r||1!==d.color.g||1!==d.color.b,y=d.vertexColors.length>0,x=0;if(x=M(x,0,0),x=M(x,1,!0),x=M(x,2,!1),x=M(x,3,f),x=M(x,4,m),x=M(x,5,g),x=M(x,6,v),x=M(x,7,y),o.push(x),o.push(d.a,d.b,d.c),o.push(d.materialIndex),f){var _=this.faceVertexUvs[0][r];o.push(S(_[0]),S(_[1]),S(_[2]))}if(m&&o.push(E(d.normal)),g){var b=d.vertexNormals;o.push(E(b[0]),E(b[1]),E(b[2]))}if(v&&o.push(T(d.color)),y){var w=d.vertexColors;o.push(T(w[0]),T(w[1]),T(w[2]))}}function M(t,e,i){return i?t|1<<e:t&~(1<<e)}function E(t){var e=t.x.toString()+t.y.toString()+t.z.toString();return void 0!==c[e]||(c[e]=s.length/3,s.push(t.x,t.y,t.z)),c[e]}function T(t){var e=t.r.toString()+t.g.toString()+t.b.toString();return void 0!==l[e]||(l[e]=h.length,h.push(t.getHex())),l[e]}function S(t){var e=t.x.toString()+t.y.toString();return void 0!==p[e]||(p[e]=u.length/2,u.push(t.x,t.y)),p[e]}return t.data={},t.data.vertices=n,t.data.normals=s,h.length>0&&(t.data.colors=h),u.length>0&&(t.data.uvs=[u]),t.data.faces=o,t},clone:function(){return(new st).copy(this)},copy:function(t){var e,i,n,r,a,o;this.vertices=[],this.colors=[],this.faces=[],this.faceVertexUvs=[[]],this.morphTargets=[],this.morphNormals=[],this.skinWeights=[],this.skinIndices=[],this.lineDistances=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var s=t.vertices;for(e=0,i=s.length;e<i;e++)this.vertices.push(s[e].clone());var c=t.colors;for(e=0,i=c.length;e<i;e++)this.colors.push(c[e].clone());var h=t.faces;for(e=0,i=h.length;e<i;e++)this.faces.push(h[e].clone());for(e=0,i=t.faceVertexUvs.length;e<i;e++){var l=t.faceVertexUvs[e];for(void 0===this.faceVertexUvs[e]&&(this.faceVertexUvs[e]=[]),n=0,r=l.length;n<r;n++){var u=l[n],p=[];for(a=0,o=u.length;a<o;a++){var d=u[a];p.push(d.clone())}this.faceVertexUvs[e].push(p)}}var f=t.morphTargets;for(e=0,i=f.length;e<i;e++){var m={};if(m.name=f[e].name,void 0!==f[e].vertices)for(m.vertices=[],n=0,r=f[e].vertices.length;n<r;n++)m.vertices.push(f[e].vertices[n].clone());if(void 0!==f[e].normals)for(m.normals=[],n=0,r=f[e].normals.length;n<r;n++)m.normals.push(f[e].normals[n].clone());this.morphTargets.push(m)}var g=t.morphNormals;for(e=0,i=g.length;e<i;e++){var v={};if(void 0!==g[e].vertexNormals)for(v.vertexNormals=[],n=0,r=g[e].vertexNormals.length;n<r;n++){var y=g[e].vertexNormals[n],x={};x.a=y.a.clone(),x.b=y.b.clone(),x.c=y.c.clone(),v.vertexNormals.push(x)}if(void 0!==g[e].faceNormals)for(v.faceNormals=[],n=0,r=g[e].faceNormals.length;n<r;n++)v.faceNormals.push(g[e].faceNormals[n].clone());this.morphNormals.push(v)}var _=t.skinWeights;for(e=0,i=_.length;e<i;e++)this.skinWeights.push(_[e].clone());var b=t.skinIndices;for(e=0,i=b.length;e<i;e++)this.skinIndices.push(b[e].clone());var w=t.lineDistances;for(e=0,i=w.length;e<i;e++)this.lineDistances.push(w[e]);var M=t.boundingBox;null!==M&&(this.boundingBox=M.clone());var E=t.boundingSphere;return null!==E&&(this.boundingSphere=E.clone()),this.elementsNeedUpdate=t.elementsNeedUpdate,this.verticesNeedUpdate=t.verticesNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.lineDistancesNeedUpdate=t.lineDistancesNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Object.defineProperty(ct.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(ct.prototype,{isBufferAttribute:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.itemSize:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.itemSize,i*=e.itemSize;for(var n=0,r=this.itemSize;n<r;n++)this.array[t+n]=e.array[i+n];return this},copyArray:function(t){return this.array.set(t),this},copyColorsArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",n),a=new H),e[i++]=a.r,e[i++]=a.g,e[i++]=a.b}return this},copyVector2sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",n),a=new v),e[i++]=a.x,e[i++]=a.y}return this},copyVector3sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",n),a=new _),e[i++]=a.x,e[i++]=a.y,e[i++]=a.z}return this},copyVector4sArray:function(t){for(var e=this.array,i=0,n=0,r=t.length;n<r;n++){var a=t[n];void 0===a&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",n),a=new L),e[i++]=a.x,e[i++]=a.y,e[i++]=a.z,e[i++]=a.w}return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},getX:function(t){return this.array[t*this.itemSize]},setX:function(t,e){return this.array[t*this.itemSize]=e,this},getY:function(t){return this.array[t*this.itemSize+1]},setY:function(t,e){return this.array[t*this.itemSize+1]=e,this},getZ:function(t){return this.array[t*this.itemSize+2]},setZ:function(t,e){return this.array[t*this.itemSize+2]=e,this},getW:function(t){return this.array[t*this.itemSize+3]},setW:function(t,e){return this.array[t*this.itemSize+3]=e,this},setXY:function(t,e,i){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t*=this.itemSize,this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=n,this.array[t+3]=r,this},onUpload:function(t){return this.onUploadCallback=t,this},clone:function(){return new this.constructor(this.array,this.itemSize).copy(this)}}),ht.prototype=Object.create(ct.prototype),ht.prototype.constructor=ht,lt.prototype=Object.create(ct.prototype),lt.prototype.constructor=lt,ut.prototype=Object.create(ct.prototype),ut.prototype.constructor=ut,pt.prototype=Object.create(ct.prototype),pt.prototype.constructor=pt,dt.prototype=Object.create(ct.prototype),dt.prototype.constructor=dt,ft.prototype=Object.create(ct.prototype),ft.prototype.constructor=ft,mt.prototype=Object.create(ct.prototype),mt.prototype.constructor=mt,gt.prototype=Object.create(ct.prototype),gt.prototype.constructor=gt,vt.prototype=Object.create(ct.prototype),vt.prototype.constructor=vt,Object.assign(yt.prototype,{computeGroups:function(t){for(var e,i=[],n=void 0,r=t.faces,a=0;a<r.length;a++){var o=r[a];o.materialIndex!==n&&(n=o.materialIndex,void 0!==e&&(e.count=3*a-e.start,i.push(e)),e={start:3*a,materialIndex:n})}void 0!==e&&(e.count=3*a-e.start,i.push(e)),this.groups=i},fromGeometry:function(t){var e,i=t.faces,n=t.vertices,r=t.faceVertexUvs,a=r[0]&&r[0].length>0,o=r[1]&&r[1].length>0,s=t.morphTargets,c=s.length;if(c>0){e=[];for(var h=0;h<c;h++)e[h]=[];this.morphTargets.position=e}var l,u=t.morphNormals,p=u.length;if(p>0){l=[];for(h=0;h<p;h++)l[h]=[];this.morphTargets.normal=l}var d=t.skinIndices,f=t.skinWeights,m=d.length===n.length,g=f.length===n.length;0===i.length&&console.error("THREE.DirectGeometry: Faceless geometries are not supported.");for(h=0;h<i.length;h++){var y=i[h];this.vertices.push(n[y.a],n[y.b],n[y.c]);var x=y.vertexNormals;if(3===x.length)this.normals.push(x[0],x[1],x[2]);else{var _=y.normal;this.normals.push(_,_,_)}var b,w=y.vertexColors;if(3===w.length)this.colors.push(w[0],w[1],w[2]);else{var M=y.color;this.colors.push(M,M,M)}if(!0===a)void 0!==(b=r[0][h])?this.uvs.push(b[0],b[1],b[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ",h),this.uvs.push(new v,new v,new v));if(!0===o)void 0!==(b=r[1][h])?this.uvs2.push(b[0],b[1],b[2]):(console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ",h),this.uvs2.push(new v,new v,new v));for(var E=0;E<c;E++){var T=s[E].vertices;e[E].push(T[y.a],T[y.b],T[y.c])}for(E=0;E<p;E++){var S=u[E].vertexNormals[h];l[E].push(S.a,S.b,S.c)}m&&this.skinIndices.push(d[y.a],d[y.b],d[y.c]),g&&this.skinWeights.push(f[y.a],f[y.b],f[y.c])}return this.computeGroups(t),this.verticesNeedUpdate=t.verticesNeedUpdate,this.normalsNeedUpdate=t.normalsNeedUpdate,this.colorsNeedUpdate=t.colorsNeedUpdate,this.uvsNeedUpdate=t.uvsNeedUpdate,this.groupsNeedUpdate=t.groupsNeedUpdate,this}});var _t=1;function bt(){Object.defineProperty(this,"id",{value:_t+=2}),this.uuid=g.generateUUID(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}function wt(t,e,i,n,r,a){st.call(this),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:a},this.fromBufferGeometry(new Mt(t,e,i,n,r,a)),this.mergeVertices()}function Mt(t,e,i,n,r,a){bt.call(this),this.type="BoxBufferGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:n,heightSegments:r,depthSegments:a};var o=this;t=t||1,e=e||1,i=i||1,n=Math.floor(n)||1,r=Math.floor(r)||1,a=Math.floor(a)||1;var s=[],c=[],h=[],l=[],u=0,p=0;function d(t,e,i,n,r,a,d,f,m,g,v){var y,x,b=a/m,w=d/g,M=a/2,E=d/2,T=f/2,S=m+1,A=g+1,R=0,L=0,P=new _;for(x=0;x<A;x++){var C=x*w-E;for(y=0;y<S;y++){var O=y*b-M;P[t]=O*n,P[e]=C*r,P[i]=T,c.push(P.x,P.y,P.z),P[t]=0,P[e]=0,P[i]=f>0?1:-1,h.push(P.x,P.y,P.z),l.push(y/m),l.push(1-x/g),R+=1}}for(x=0;x<g;x++)for(y=0;y<m;y++){var I=u+y+S*x,N=u+y+S*(x+1),D=u+(y+1)+S*(x+1),U=u+(y+1)+S*x;s.push(I,N,U),s.push(N,D,U),L+=6}o.addGroup(p,L,v),p+=L,u+=R}d("z","y","x",-1,-1,i,e,t,a,r,0),d("z","y","x",1,-1,i,e,-t,a,r,1),d("x","z","y",1,1,t,i,e,n,a,2),d("x","z","y",1,-1,t,i,-e,n,a,3),d("x","y","z",1,-1,t,e,i,n,r,4),d("x","y","z",-1,-1,t,e,-i,n,r,5),this.setIndex(s),this.addAttribute("position",new gt(c,3)),this.addAttribute("normal",new gt(h,3)),this.addAttribute("uv",new gt(l,2))}function Et(t,e,i,n){st.call(this),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n},this.fromBufferGeometry(new Tt(t,e,i,n)),this.mergeVertices()}function Tt(t,e,i,n){bt.call(this),this.type="PlaneBufferGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:n};var r,a,o=(t=t||1)/2,s=(e=e||1)/2,c=Math.floor(i)||1,h=Math.floor(n)||1,l=c+1,u=h+1,p=t/c,d=e/h,f=[],m=[],g=[],v=[];for(a=0;a<u;a++){var y=a*d-s;for(r=0;r<l;r++){var x=r*p-o;m.push(x,-y,0),g.push(0,0,1),v.push(r/c),v.push(1-a/h)}}for(a=0;a<h;a++)for(r=0;r<c;r++){var _=r+l*a,b=r+l*(a+1),w=r+1+l*(a+1),M=r+1+l*a;f.push(_,b,M),f.push(b,w,M)}this.setIndex(f),this.addAttribute("position",new gt(m,3)),this.addAttribute("normal",new gt(g,3)),this.addAttribute("uv",new gt(v,2))}bt.prototype=Object.assign(Object.create(r.prototype),{constructor:bt,isBufferGeometry:!0,getIndex:function(){return this.index},setIndex:function(t){Array.isArray(t)?this.index=new(xt(t)>65535?mt:dt)(t,1):this.index=t},addAttribute:function(t,e){return e&&e.isBufferAttribute||e&&e.isInterleavedBufferAttribute?"index"===t?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):(this.attributes[t]=e,this):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.addAttribute(t,new ct(arguments[1],arguments[2])))},getAttribute:function(t){return this.attributes[t]},removeAttribute:function(t){return delete this.attributes[t],this},addGroup:function(t,e,i){this.groups.push({start:t,count:e,materialIndex:void 0!==i?i:0})},clearGroups:function(){this.groups=[]},setDrawRange:function(t,e){this.drawRange.start=t,this.drawRange.count=e},applyMatrix:function(t){var e=this.attributes.position;void 0!==e&&(t.applyToBufferAttribute(e),e.needsUpdate=!0);var i=this.attributes.normal;void 0!==i&&((new b).getNormalMatrix(t).applyToBufferAttribute(i),i.needsUpdate=!0);return null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this},rotateX:function(){var t=new y;return function(e){return t.makeRotationX(e),this.applyMatrix(t),this}}(),rotateY:function(){var t=new y;return function(e){return t.makeRotationY(e),this.applyMatrix(t),this}}(),rotateZ:function(){var t=new y;return function(e){return t.makeRotationZ(e),this.applyMatrix(t),this}}(),translate:function(){var t=new y;return function(e,i,n){return t.makeTranslation(e,i,n),this.applyMatrix(t),this}}(),scale:function(){var t=new y;return function(e,i,n){return t.makeScale(e,i,n),this.applyMatrix(t),this}}(),lookAt:function(){var t=new tt;return function(e){t.lookAt(e),t.updateMatrix(),this.applyMatrix(t.matrix)}}(),center:function(){var t=new _;return function(){return this.computeBoundingBox(),this.boundingBox.getCenter(t).negate(),this.translate(t.x,t.y,t.z),this}}(),setFromObject:function(t){var e=t.geometry;if(t.isPoints||t.isLine){var i=new gt(3*e.vertices.length,3),n=new gt(3*e.colors.length,3);if(this.addAttribute("position",i.copyVector3sArray(e.vertices)),this.addAttribute("color",n.copyColorsArray(e.colors)),e.lineDistances&&e.lineDistances.length===e.vertices.length){var r=new gt(e.lineDistances.length,1);this.addAttribute("lineDistance",r.copyArray(e.lineDistances))}null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone())}else t.isMesh&&e&&e.isGeometry&&this.fromGeometry(e);return this},setFromPoints:function(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i];e.push(r.x,r.y,r.z||0)}return this.addAttribute("position",new gt(e,3)),this},updateFromObject:function(t){var e,i=t.geometry;if(t.isMesh){var n=i.__directGeometry;if(!0===i.elementsNeedUpdate&&(n=void 0,i.elementsNeedUpdate=!1),void 0===n)return this.fromGeometry(i);n.verticesNeedUpdate=i.verticesNeedUpdate,n.normalsNeedUpdate=i.normalsNeedUpdate,n.colorsNeedUpdate=i.colorsNeedUpdate,n.uvsNeedUpdate=i.uvsNeedUpdate,n.groupsNeedUpdate=i.groupsNeedUpdate,i.verticesNeedUpdate=!1,i.normalsNeedUpdate=!1,i.colorsNeedUpdate=!1,i.uvsNeedUpdate=!1,i.groupsNeedUpdate=!1,i=n}return!0===i.verticesNeedUpdate&&(void 0!==(e=this.attributes.position)&&(e.copyVector3sArray(i.vertices),e.needsUpdate=!0),i.verticesNeedUpdate=!1),!0===i.normalsNeedUpdate&&(void 0!==(e=this.attributes.normal)&&(e.copyVector3sArray(i.normals),e.needsUpdate=!0),i.normalsNeedUpdate=!1),!0===i.colorsNeedUpdate&&(void 0!==(e=this.attributes.color)&&(e.copyColorsArray(i.colors),e.needsUpdate=!0),i.colorsNeedUpdate=!1),i.uvsNeedUpdate&&(void 0!==(e=this.attributes.uv)&&(e.copyVector2sArray(i.uvs),e.needsUpdate=!0),i.uvsNeedUpdate=!1),i.lineDistancesNeedUpdate&&(void 0!==(e=this.attributes.lineDistance)&&(e.copyArray(i.lineDistances),e.needsUpdate=!0),i.lineDistancesNeedUpdate=!1),i.groupsNeedUpdate&&(i.computeGroups(t.geometry),this.groups=i.groups,i.groupsNeedUpdate=!1),this},fromGeometry:function(t){return t.__directGeometry=(new yt).fromGeometry(t),this.fromDirectGeometry(t.__directGeometry)},fromDirectGeometry:function(t){var e=new Float32Array(3*t.vertices.length);if(this.addAttribute("position",new ct(e,3).copyVector3sArray(t.vertices)),t.normals.length>0){var i=new Float32Array(3*t.normals.length);this.addAttribute("normal",new ct(i,3).copyVector3sArray(t.normals))}if(t.colors.length>0){var n=new Float32Array(3*t.colors.length);this.addAttribute("color",new ct(n,3).copyColorsArray(t.colors))}if(t.uvs.length>0){var r=new Float32Array(2*t.uvs.length);this.addAttribute("uv",new ct(r,2).copyVector2sArray(t.uvs))}if(t.uvs2.length>0){var a=new Float32Array(2*t.uvs2.length);this.addAttribute("uv2",new ct(a,2).copyVector2sArray(t.uvs2))}for(var o in this.groups=t.groups,t.morphTargets){for(var s=[],c=t.morphTargets[o],h=0,l=c.length;h<l;h++){var u=c[h],p=new gt(3*u.length,3);s.push(p.copyVector3sArray(u))}this.morphAttributes[o]=s}if(t.skinIndices.length>0){var d=new gt(4*t.skinIndices.length,4);this.addAttribute("skinIndex",d.copyVector4sArray(t.skinIndices))}if(t.skinWeights.length>0){var f=new gt(4*t.skinWeights.length,4);this.addAttribute("skinWeight",f.copyVector4sArray(t.skinWeights))}return null!==t.boundingSphere&&(this.boundingSphere=t.boundingSphere.clone()),null!==t.boundingBox&&(this.boundingBox=t.boundingBox.clone()),this},computeBoundingBox:function(){null===this.boundingBox&&(this.boundingBox=new I);var t=this.attributes.position;void 0!==t?this.boundingBox.setFromBufferAttribute(t):this.boundingBox.makeEmpty(),(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox: Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)},computeBoundingSphere:function(){var t=new I,e=new _;return function(){null===this.boundingSphere&&(this.boundingSphere=new N);var i=this.attributes.position;if(i){var n=this.boundingSphere.center;t.setFromBufferAttribute(i),t.getCenter(n);for(var r=0,a=0,o=i.count;a<o;a++)e.x=i.getX(a),e.y=i.getY(a),e.z=i.getZ(a),r=Math.max(r,n.distanceToSquared(e));this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}}(),computeFaceNormals:function(){},computeVertexNormals:function(){var t=this.index,e=this.attributes,i=this.groups;if(e.position){var n=e.position.array;if(void 0===e.normal)this.addAttribute("normal",new ct(new Float32Array(n.length),3));else for(var r=e.normal.array,a=0,o=r.length;a<o;a++)r[a]=0;var s,c,h,l=e.normal.array,u=new _,p=new _,d=new _,f=new _,m=new _;if(t){var g=t.array;0===i.length&&this.addGroup(0,g.length);for(var v=0,y=i.length;v<y;++v){var x=i[v],b=x.start;for(a=b,o=b+x.count;a<o;a+=3)s=3*g[a+0],c=3*g[a+1],h=3*g[a+2],u.fromArray(n,s),p.fromArray(n,c),d.fromArray(n,h),f.subVectors(d,p),m.subVectors(u,p),f.cross(m),l[s]+=f.x,l[s+1]+=f.y,l[s+2]+=f.z,l[c]+=f.x,l[c+1]+=f.y,l[c+2]+=f.z,l[h]+=f.x,l[h+1]+=f.y,l[h+2]+=f.z}}else for(a=0,o=n.length;a<o;a+=9)u.fromArray(n,a),p.fromArray(n,a+3),d.fromArray(n,a+6),f.subVectors(d,p),m.subVectors(u,p),f.cross(m),l[a]=f.x,l[a+1]=f.y,l[a+2]=f.z,l[a+3]=f.x,l[a+4]=f.y,l[a+5]=f.z,l[a+6]=f.x,l[a+7]=f.y,l[a+8]=f.z;this.normalizeNormals(),e.normal.needsUpdate=!0}},merge:function(t,e){if(t&&t.isBufferGeometry){void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));var i=this.attributes;for(var n in i)if(void 0!==t.attributes[n])for(var r=i[n].array,a=t.attributes[n],o=a.array,s=0,c=a.itemSize*e;s<o.length;s++,c++)r[c]=o[s];return this}console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t)},normalizeNormals:function(){var t=new _;return function(){for(var e=this.attributes.normal,i=0,n=e.count;i<n;i++)t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.normalize(),e.setXYZ(i,t.x,t.y,t.z)}}(),toNonIndexed:function(){if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): Geometry is already non-indexed."),this;var t=new bt,e=this.index.array,i=this.attributes;for(var n in i){for(var r=i[n],a=r.array,o=r.itemSize,s=new a.constructor(e.length*o),c=0,h=0,l=0,u=e.length;l<u;l++){c=e[l]*o;for(var p=0;p<o;p++)s[h++]=a[c++]}t.addAttribute(n,new ct(s,o))}var d=this.groups;for(l=0,u=d.length;l<u;l++){var f=d[l];t.addGroup(f.start,f.count,f.materialIndex)}return t},toJSON:function(){var t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){var e=this.parameters;for(var i in e)void 0!==e[i]&&(t[i]=e[i]);return t}t.data={attributes:{}};var n=this.index;if(null!==n){var r=Array.prototype.slice.call(n.array);t.data.index={type:n.array.constructor.name,array:r}}var a=this.attributes;for(var i in a){var o=a[i];r=Array.prototype.slice.call(o.array);t.data.attributes[i]={itemSize:o.itemSize,type:o.array.constructor.name,array:r,normalized:o.normalized}}var s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));var c=this.boundingSphere;return null!==c&&(t.data.boundingSphere={center:c.center.toArray(),radius:c.radius}),t},clone:function(){return(new bt).copy(this)},copy:function(t){var e,i,n;this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.name=t.name;var r=t.index;null!==r&&this.setIndex(r.clone());var a=t.attributes;for(e in a){var o=a[e];this.addAttribute(e,o.clone())}var s=t.morphAttributes;for(e in s){var c=[],h=s[e];for(i=0,n=h.length;i<n;i++)c.push(h[i].clone());this.morphAttributes[e]=c}var l=t.groups;for(i=0,n=l.length;i<n;i++){var u=l[i];this.addGroup(u.start,u.count,u.materialIndex)}var p=t.boundingBox;null!==p&&(this.boundingBox=p.clone());var d=t.boundingSphere;return null!==d&&(this.boundingSphere=d.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),wt.prototype=Object.create(st.prototype),wt.prototype.constructor=wt,Mt.prototype=Object.create(bt.prototype),Mt.prototype.constructor=Mt,Et.prototype=Object.create(st.prototype),Et.prototype.constructor=Et,Tt.prototype=Object.create(bt.prototype),Tt.prototype.constructor=Tt;var St,At,Rt,Lt,Pt,Ct,Ot,It=0;function Nt(){Object.defineProperty(this,"id",{value:It++}),this.uuid=g.generateUUID(),this.name="",this.type="Material",this.fog=!0,this.lights=!0,this.blending=1,this.side=0,this.flatShading=!1,this.vertexColors=0,this.opacity=1,this.transparent=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaTest=0,this.premultipliedAlpha=!1,this.overdraw=0,this.visible=!0,this.userData={},this.needsUpdate=!0}function Dt(t){Nt.call(this),this.type="MeshBasicMaterial",this.color=new H(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function Ut(t){Nt.call(this),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}function zt(t,e){this.origin=void 0!==t?t:new _,this.direction=void 0!==e?e:new _}function Bt(t,e){this.start=void 0!==t?t:new _,this.end=void 0!==e?e:new _}function Ft(t,e,i){this.a=void 0!==t?t:new _,this.b=void 0!==e?e:new _,this.c=void 0!==i?i:new _}function Gt(t,e){tt.call(this),this.type="Mesh",this.geometry=void 0!==t?t:new bt,this.material=void 0!==e?e:new Dt({color:16777215*Math.random()}),this.drawMode=0,this.updateMorphTargets()}function Ht(t,e,i,n){var r,a,o,s=new H(0),c=0;function h(t,i){e.buffers.color.setClear(t.r,t.g,t.b,i,n)}return{getClearColor:function(){return s},setClearColor:function(t,e){s.set(t),h(s,c=void 0!==e?e:1)},getClearAlpha:function(){return c},setClearAlpha:function(t){h(s,c=t)},render:function(e,n,l,u){var p=n.background;null===p?h(s,c):p&&p.isColor&&(h(p,1),u=!0),(t.autoClear||u)&&t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil),p&&p.isCubeTexture?(void 0===o&&((o=new Gt(new Mt(1,1,1),new Ut({uniforms:j.cube.uniforms,vertexShader:j.cube.vertexShader,fragmentShader:j.cube.fragmentShader,side:1,depthTest:!0,depthWrite:!1,fog:!1}))).geometry.removeAttribute("normal"),o.geometry.removeAttribute("uv"),o.onBeforeRender=function(t,e,i){this.matrixWorld.copyPosition(i.matrixWorld)},i.update(o)),o.material.uniforms.tCube.value=p,e.push(o,o.geometry,o.material,0,null)):p&&p.isTexture&&(void 0===r&&(r=new it(-1,1,1,-1,0,1),a=new Gt(new Tt(2,2),new Dt({depthTest:!1,depthWrite:!1,fog:!1})),i.update(a)),a.material.map=p,t.renderBufferDirect(r,null,a.geometry,a.material,a,null))}}}function Vt(t,e,i){var n;this.setMode=function(t){n=t},this.render=function(e,r){t.drawArrays(n,e,r),i.update(r,n)},this.renderInstances=function(t,r,a){var o=e.get("ANGLE_instanced_arrays");null!==o?(o.drawArraysInstancedANGLE(n,r,a,t.maxInstancedCount),i.update(a,n,t.maxInstancedCount)):console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function kt(t,e,i){var n;function r(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var a=void 0!==i.precision?i.precision:"highp",o=r(a);o!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",o,"instead."),a=o);var s=!0===i.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),u=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),p=t.getParameter(t.MAX_VERTEX_ATTRIBS),d=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),f=t.getParameter(t.MAX_VARYING_VECTORS),m=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),g=h>0,v=!!e.get("OES_texture_float");return{getMaxAnisotropy:function(){if(void 0!==n)return n;var i=e.get("EXT_texture_filter_anisotropic");return n=null!==i?t.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:s,maxTextures:c,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:u,maxAttributes:p,maxVertexUniforms:d,maxVaryings:f,maxFragmentUniforms:m,vertexTextures:g,floatFragmentTextures:v,floatVertexTextures:g&&v}}function jt(){var t=this,e=null,i=0,n=!1,r=!1,a=new D,o=new b,s={value:null,needsUpdate:!1};function c(){s.value!==e&&(s.value=e,s.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function h(e,i,n,r){var c=null!==e?e.length:0,h=null;if(0!==c){if(h=s.value,!0!==r||null===h){var l=n+4*c,u=i.matrixWorldInverse;o.getNormalMatrix(u),(null===h||h.length<l)&&(h=new Float32Array(l));for(var p=0,d=n;p!==c;++p,d+=4)a.copy(e[p]).applyMatrix4(u,o),a.normal.toArray(h,d),h[d+3]=a.constant}s.value=h,s.needsUpdate=!0}return t.numPlanes=c,h}this.uniform=s,this.numPlanes=0,this.numIntersection=0,this.init=function(t,r,a){var o=0!==t.length||r||0!==i||n;return n=r,e=h(t,a,0),i=t.length,o},this.beginShadows=function(){r=!0,h(null)},this.endShadows=function(){r=!1,c()},this.setState=function(t,a,o,l,u,p){if(!n||null===t||0===t.length||r&&!o)r?h(null):c();else{var d=r?0:i,f=4*d,m=u.clippingState||null;s.value=m,m=h(t,l,f,p);for(var g=0;g!==f;++g)m[g]=e[g];u.clippingState=m,this.numIntersection=a?this.numPlanes:0,this.numPlanes+=d}}}function Wt(t){var e={};return{get:function(i){if(void 0!==e[i])return e[i];var n;switch(i){case"WEBGL_depth_texture":n=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=t.getExtension(i)}return null===n&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),e[i]=n,n}}}function Xt(t,e,i){var n={},r={};function a(t){var o=t.target,s=n[o.id];for(var c in null!==s.index&&e.remove(s.index),s.attributes)e.remove(s.attributes[c]);o.removeEventListener("dispose",a),delete n[o.id];var h=r[o.id];h&&(e.remove(h),delete r[o.id]),(h=r[s.id])&&(e.remove(h),delete r[s.id]),i.memory.geometries--}return{get:function(t,e){var r=n[e.id];return r||(e.addEventListener("dispose",a),e.isBufferGeometry?r=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new bt).setFromObject(t)),r=e._bufferGeometry),n[e.id]=r,i.memory.geometries++,r)},update:function(i){var n=i.index,r=i.attributes;for(var a in null!==n&&e.update(n,t.ELEMENT_ARRAY_BUFFER),r)e.update(r[a],t.ARRAY_BUFFER);var o=i.morphAttributes;for(var a in o)for(var s=o[a],c=0,h=s.length;c<h;c++)e.update(s[c],t.ARRAY_BUFFER)},getWireframeAttribute:function(i){var n=r[i.id];if(n)return n;var a,o=[],s=i.index,c=i.attributes;if(null!==s)for(var h=0,l=(a=s.array).length;h<l;h+=3){var u=a[h+0],p=a[h+1],d=a[h+2];o.push(u,p,p,d,d,u)}else for(h=0,l=(a=c.position.array).length/3-1;h<l;h+=3){u=h+0,p=h+1,d=h+2;o.push(u,p,p,d,d,u)}return n=new(xt(o)>65535?mt:dt)(o,1),e.update(n,t.ELEMENT_ARRAY_BUFFER),r[i.id]=n,n}}}function qt(t,e,i){var n,r,a;this.setMode=function(t){n=t},this.setIndex=function(t){r=t.type,a=t.bytesPerElement},this.render=function(e,o){t.drawElements(n,o,r,e*a),i.update(o,n)},this.renderInstances=function(t,o,s){var c=e.get("ANGLE_instanced_arrays");null!==c?(c.drawElementsInstancedANGLE(n,s,r,o*a,t.maxInstancedCount),i.update(s,n,t.maxInstancedCount)):console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.")}}function Yt(t){var e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.frame++,e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(i,n,r){switch(r=r||1,e.calls++,n){case t.TRIANGLES:e.triangles+=r*(i/3);break;case t.TRIANGLE_STRIP:case t.TRIANGLE_FAN:e.triangles+=r*(i-2);break;case t.LINES:e.lines+=r*(i/2);break;case t.LINE_STRIP:e.lines+=r*(i-1);break;case t.LINE_LOOP:e.lines+=r*i;break;case t.POINTS:e.points+=r*i;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function Zt(t,e){return Math.abs(e[1])-Math.abs(t[1])}function Jt(t){var e={},i=new Float32Array(8);return{update:function(n,r,a,o){var s=n.morphTargetInfluences,c=s.length,h=e[r.id];if(void 0===h){h=[];for(var l=0;l<c;l++)h[l]=[l,0];e[r.id]=h}var u=a.morphTargets&&r.morphAttributes.position,p=a.morphNormals&&r.morphAttributes.normal;for(l=0;l<c;l++){0!==(d=h[l])[1]&&(u&&r.removeAttribute("morphTarget"+l),p&&r.removeAttribute("morphNormal"+l))}for(l=0;l<c;l++){(d=h[l])[0]=l,d[1]=s[l]}for(h.sort(Zt),l=0;l<8;l++){var d;if(d=h[l]){var f=d[0],m=d[1];if(m){u&&r.addAttribute("morphTarget"+l,u[f]),p&&r.addAttribute("morphNormal"+l,p[f]),i[l]=m;continue}}i[l]=0}o.getUniforms().setValue(t,"morphTargetInfluences",i)}}}function Qt(t,e){var i={};return{update:function(n){var r=e.render.frame,a=n.geometry,o=t.get(n,a);return i[o.id]!==r&&(a.isGeometry&&o.updateFromObject(n),t.update(o),i[o.id]=r),o},dispose:function(){i={}}}}function Kt(t,e,i,n,r,a,o,s,c,h){t=void 0!==t?t:[],e=void 0!==e?e:301,R.call(this,t,e,i,n,r,a,o,s,c,h),this.flipY=!1}Nt.prototype=Object.assign(Object.create(r.prototype),{constructor:Nt,isMaterial:!0,onBeforeCompile:function(){},setValues:function(t){if(void 0!==t)for(var e in t){var i=t[e];if(void 0!==i)if("shading"!==e){var n=this[e];void 0!==n?n&&n.isColor?n.set(i):n&&n.isVector3&&i&&i.isVector3?n.copy(i):this[e]="overdraw"===e?Number(i):i:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}else console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===i;else console.warn("THREE.Material: '"+e+"' parameter is undefined.")}},toJSON:function(t){var e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});var i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function n(t){var e=[];for(var i in t){var n=t[i];delete n.metadata,e.push(n)}return e}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearCoat&&(i.clearCoat=this.clearCoat),void 0!==this.clearCoatRoughness&&(i.clearCoatRoughness=this.clearCoatRoughness),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,i.reflectivity=this.reflectivity),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.size&&(i.size=this.size),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(i.blending=this.blending),!0===this.flatShading&&(i.flatShading=this.flatShading),0!==this.side&&(i.side=this.side),0!==this.vertexColors&&(i.vertexColors=this.vertexColors),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,0!==this.rotation&&(i.rotation=this.rotation),1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.morphTargets&&(i.morphTargets=!0),!0===this.skinning&&(i.skinning=!0),!1===this.visible&&(i.visible=!1),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),e){var r=n(t.textures),a=n(t.images);r.length>0&&(i.textures=r),a.length>0&&(i.images=a)}return i},clone:function(){return(new this.constructor).copy(this)},copy:function(t){this.name=t.name,this.fog=t.fog,this.lights=t.lights,this.blending=t.blending,this.side=t.side,this.flatShading=t.flatShading,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.premultipliedAlpha=t.premultipliedAlpha,this.overdraw=t.overdraw,this.visible=t.visible,this.userData=JSON.parse(JSON.stringify(t.userData)),this.clipShadows=t.clipShadows,this.clipIntersection=t.clipIntersection;var e=t.clippingPlanes,i=null;if(null!==e){var n=e.length;i=new Array(n);for(var r=0;r!==n;++r)i[r]=e[r].clone()}return this.clippingPlanes=i,this.shadowSide=t.shadowSide,this},dispose:function(){this.dispatchEvent({type:"dispose"})}}),Dt.prototype=Object.create(Nt.prototype),Dt.prototype.constructor=Dt,Dt.prototype.isMeshBasicMaterial=!0,Dt.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this},Ut.prototype=Object.create(Nt.prototype),Ut.prototype.constructor=Ut,Ut.prototype.isShaderMaterial=!0,Ut.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=F.clone(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this.extensions=t.extensions,this},Ut.prototype.toJSON=function(t){var e=Nt.prototype.toJSON.call(this,t);return e.uniforms=this.uniforms,e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e},Object.assign(zt.prototype,{set:function(t,e){return this.origin.copy(t),this.direction.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this},at:function(t,e){return void 0===e&&(console.warn("THREE.Ray: .at() target is now required"),e=new _),e.copy(this.direction).multiplyScalar(t).add(this.origin)},lookAt:function(t){return this.direction.copy(t).sub(this.origin).normalize(),this},recast:function(){var t=new _;return function(e){return this.origin.copy(this.at(e,t)),this}}(),closestPointToPoint:function(t,e){void 0===e&&(console.warn("THREE.Ray: .closestPointToPoint() target is now required"),e=new _),e.subVectors(t,this.origin);var i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(i).add(this.origin)},distanceToPoint:function(t){return Math.sqrt(this.distanceSqToPoint(t))},distanceSqToPoint:function(){var t=new _;return function(e){var i=t.subVectors(e,this.origin).dot(this.direction);return i<0?this.origin.distanceToSquared(e):(t.copy(this.direction).multiplyScalar(i).add(this.origin),t.distanceToSquared(e))}}(),distanceSqToSegment:(At=new _,Rt=new _,Lt=new _,function(t,e,i,n){At.copy(t).add(e).multiplyScalar(.5),Rt.copy(e).sub(t).normalize(),Lt.copy(this.origin).sub(At);var r,a,o,s,c=.5*t.distanceTo(e),h=-this.direction.dot(Rt),l=Lt.dot(this.direction),u=-Lt.dot(Rt),p=Lt.lengthSq(),d=Math.abs(1-h*h);if(d>0)if(a=h*l-u,s=c*d,(r=h*u-l)>=0)if(a>=-s)if(a<=s){var f=1/d;o=(r*=f)*(r+h*(a*=f)+2*l)+a*(h*r+a+2*u)+p}else a=c,o=-(r=Math.max(0,-(h*a+l)))*r+a*(a+2*u)+p;else a=-c,o=-(r=Math.max(0,-(h*a+l)))*r+a*(a+2*u)+p;else a<=-s?o=-(r=Math.max(0,-(-h*c+l)))*r+(a=r>0?-c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p:a<=s?(r=0,o=(a=Math.min(Math.max(-c,-u),c))*(a+2*u)+p):o=-(r=Math.max(0,-(h*c+l)))*r+(a=r>0?c:Math.min(Math.max(-c,-u),c))*(a+2*u)+p;else a=h>0?-c:c,o=-(r=Math.max(0,-(h*a+l)))*r+a*(a+2*u)+p;return i&&i.copy(this.direction).multiplyScalar(r).add(this.origin),n&&n.copy(Rt).multiplyScalar(a).add(At),o}),intersectSphere:function(){var t=new _;return function(e,i){t.subVectors(e.center,this.origin);var n=t.dot(this.direction),r=t.dot(t)-n*n,a=e.radius*e.radius;if(r>a)return null;var o=Math.sqrt(a-r),s=n-o,c=n+o;return s<0&&c<0?null:s<0?this.at(c,i):this.at(s,i)}}(),intersectsSphere:function(t){return this.distanceToPoint(t.center)<=t.radius},distanceToPlane:function(t){var e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;var i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null},intersectPlane:function(t,e){var i=this.distanceToPlane(t);return null===i?null:this.at(i,e)},intersectsPlane:function(t){var e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0},intersectBox:function(t,e){var i,n,r,a,o,s,c=1/this.direction.x,h=1/this.direction.y,l=1/this.direction.z,u=this.origin;return c>=0?(i=(t.min.x-u.x)*c,n=(t.max.x-u.x)*c):(i=(t.max.x-u.x)*c,n=(t.min.x-u.x)*c),h>=0?(r=(t.min.y-u.y)*h,a=(t.max.y-u.y)*h):(r=(t.max.y-u.y)*h,a=(t.min.y-u.y)*h),i>a||r>n?null:((r>i||i!=i)&&(i=r),(a<n||n!=n)&&(n=a),l>=0?(o=(t.min.z-u.z)*l,s=(t.max.z-u.z)*l):(o=(t.max.z-u.z)*l,s=(t.min.z-u.z)*l),i>s||o>n?null:((o>i||i!=i)&&(i=o),(s<n||n!=n)&&(n=s),n<0?null:this.at(i>=0?i:n,e)))},intersectsBox:(St=new _,function(t){return null!==this.intersectBox(t,St)}),intersectTriangle:function(){var t=new _,e=new _,i=new _,n=new _;return function(r,a,o,s,c){e.subVectors(a,r),i.subVectors(o,r),n.crossVectors(e,i);var h,l=this.direction.dot(n);if(l>0){if(s)return null;h=1}else{if(!(l<0))return null;h=-1,l=-l}t.subVectors(this.origin,r);var u=h*this.direction.dot(i.crossVectors(t,i));if(u<0)return null;var p=h*this.direction.dot(e.cross(t));if(p<0)return null;if(u+p>l)return null;var d=-h*t.dot(n);return d<0?null:this.at(d/l,c)}}(),applyMatrix4:function(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this},equals:function(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}}),Object.assign(Bt.prototype,{set:function(t,e){return this.start.copy(t),this.end.copy(e),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.start.copy(t.start),this.end.copy(t.end),this},getCenter:function(t){return void 0===t&&(console.warn("THREE.Line3: .getCenter() target is now required"),t=new _),t.addVectors(this.start,this.end).multiplyScalar(.5)},delta:function(t){return void 0===t&&(console.warn("THREE.Line3: .delta() target is now required"),t=new _),t.subVectors(this.end,this.start)},distanceSq:function(){return this.start.distanceToSquared(this.end)},distance:function(){return this.start.distanceTo(this.end)},at:function(t,e){return void 0===e&&(console.warn("THREE.Line3: .at() target is now required"),e=new _),this.delta(e).multiplyScalar(t).add(this.start)},closestPointToPointParameter:(Pt=new _,Ct=new _,function(t,e){Pt.subVectors(t,this.start),Ct.subVectors(this.end,this.start);var i=Ct.dot(Ct),n=Ct.dot(Pt)/i;return e&&(n=g.clamp(n,0,1)),n}),closestPointToPoint:function(t,e,i){var n=this.closestPointToPointParameter(t,e);return void 0===i&&(console.warn("THREE.Line3: .closestPointToPoint() target is now required"),i=new _),this.delta(i).multiplyScalar(n).add(this.start)},applyMatrix4:function(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this},equals:function(t){return t.start.equals(this.start)&&t.end.equals(this.end)}}),Object.assign(Ft,{getNormal:(Ot=new _,function(t,e,i,n){void 0===n&&(console.warn("THREE.Triangle: .getNormal() target is now required"),n=new _),n.subVectors(i,e),Ot.subVectors(t,e),n.cross(Ot);var r=n.lengthSq();return r>0?n.multiplyScalar(1/Math.sqrt(r)):n.set(0,0,0)}),getBarycoord:function(){var t=new _,e=new _,i=new _;return function(n,r,a,o,s){t.subVectors(o,r),e.subVectors(a,r),i.subVectors(n,r);var c=t.dot(t),h=t.dot(e),l=t.dot(i),u=e.dot(e),p=e.dot(i),d=c*u-h*h;if(void 0===s&&(console.warn("THREE.Triangle: .getBarycoord() target is now required"),s=new _),0===d)return s.set(-2,-1,-1);var f=1/d,m=(u*l-h*p)*f,g=(c*p-h*l)*f;return s.set(1-m-g,g,m)}}(),containsPoint:function(){var t=new _;return function(e,i,n,r){return Ft.getBarycoord(e,i,n,r,t),t.x>=0&&t.y>=0&&t.x+t.y<=1}}()}),Object.assign(Ft.prototype,{set:function(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this},setFromPointsAndIndices:function(t,e,i,n){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[n]),this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this},getArea:function(){var t=new _,e=new _;return function(){return t.subVectors(this.c,this.b),e.subVectors(this.a,this.b),.5*t.cross(e).length()}}(),getMidpoint:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getMidpoint() target is now required"),t=new _),t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)},getNormal:function(t){return Ft.getNormal(this.a,this.b,this.c,t)},getPlane:function(t){return void 0===t&&(console.warn("THREE.Triangle: .getPlane() target is now required"),t=new _),t.setFromCoplanarPoints(this.a,this.b,this.c)},getBarycoord:function(t,e){return Ft.getBarycoord(t,this.a,this.b,this.c,e)},containsPoint:function(t){return Ft.containsPoint(t,this.a,this.b,this.c)},intersectsBox:function(t){return t.intersectsTriangle(this)},closestPointToPoint:function(){var t=new D,e=[new Bt,new Bt,new Bt],i=new _,n=new _;return function(r,a){void 0===a&&(console.warn("THREE.Triangle: .closestPointToPoint() target is now required"),a=new _);var o=1/0;if(t.setFromCoplanarPoints(this.a,this.b,this.c),t.projectPoint(r,i),!0===this.containsPoint(i))a.copy(i);else{e[0].set(this.a,this.b),e[1].set(this.b,this.c),e[2].set(this.c,this.a);for(var s=0;s<e.length;s++){e[s].closestPointToPoint(i,!0,n);var c=i.distanceToSquared(n);c<o&&(o=c,a.copy(n))}}return a}}(),equals:function(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}),Gt.prototype=Object.assign(Object.create(tt.prototype),{constructor:Gt,isMesh:!0,setDrawMode:function(t){this.drawMode=t},copy:function(t){return tt.prototype.copy.call(this,t),this.drawMode=t.drawMode,void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this},updateMorphTargets:function(){var t,e,i,n=this.geometry;if(n.isBufferGeometry){var r=n.morphAttributes,a=Object.keys(r);if(a.length>0){var o=r[a[0]];if(void 0!==o)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=o.length;t<e;t++)i=o[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[i]=t}}else{var s=n.morphTargets;if(void 0!==s&&s.length>0)for(this.morphTargetInfluences=[],this.morphTargetDictionary={},t=0,e=s.length;t<e;t++)i=s[t].name||String(t),this.morphTargetInfluences.push(0),this.morphTargetDictionary[i]=t}},raycast:function(){var t=new y,e=new zt,i=new N,n=new _,r=new _,a=new _,o=new _,s=new _,c=new _,h=new v,l=new v,u=new v,p=new _,d=new _,f=new _;function m(t,e,i,n,r,a,o){return Ft.getBarycoord(t,e,i,n,p),r.multiplyScalar(p.x),a.multiplyScalar(p.y),o.multiplyScalar(p.z),r.add(a).add(o),r.clone()}function g(t,e,i,n,r,a,o,s){if(null===(1===e.side?n.intersectTriangle(o,a,r,!0,s):n.intersectTriangle(r,a,o,2!==e.side,s)))return null;f.copy(s),f.applyMatrix4(t.matrixWorld);var c=i.ray.origin.distanceTo(f);return c<i.near||c>i.far?null:{distance:c,point:f.clone(),object:t}}function x(t,e,i,o,s,c,p,f){n.fromBufferAttribute(o,c),r.fromBufferAttribute(o,p),a.fromBufferAttribute(o,f);var v=g(t,t.material,e,i,n,r,a,d);if(v){s&&(h.fromBufferAttribute(s,c),l.fromBufferAttribute(s,p),u.fromBufferAttribute(s,f),v.uv=m(d,n,r,a,h,l,u));var y=new nt(c,p,f);Ft.getNormal(n,r,a,y.normal),v.face=y}return v}return function(p,f){var v,y=this.geometry,_=this.material,b=this.matrixWorld;if(void 0!==_&&(null===y.boundingSphere&&y.computeBoundingSphere(),i.copy(y.boundingSphere),i.applyMatrix4(b),!1!==p.ray.intersectsSphere(i)&&(t.getInverse(b),e.copy(p.ray).applyMatrix4(t),null===y.boundingBox||!1!==e.intersectsBox(y.boundingBox))))if(y.isBufferGeometry){var w,M,E,T,S,A=y.index,R=y.attributes.position,L=y.attributes.uv;if(null!==A)for(T=0,S=A.count;T<S;T+=3)w=A.getX(T),M=A.getX(T+1),E=A.getX(T+2),(v=x(this,p,e,R,L,w,M,E))&&(v.faceIndex=Math.floor(T/3),f.push(v));else if(void 0!==R)for(T=0,S=R.count;T<S;T+=3)(v=x(this,p,e,R,L,w=T,M=T+1,E=T+2))&&(v.faceIndex=Math.floor(T/3),f.push(v))}else if(y.isGeometry){var P,C,O,I,N=Array.isArray(_),D=y.vertices,U=y.faces,z=y.faceVertexUvs[0];z.length>0&&(I=z);for(var B=0,F=U.length;B<F;B++){var G=U[B],H=N?_[G.materialIndex]:_;if(void 0!==H){if(P=D[G.a],C=D[G.b],O=D[G.c],!0===H.morphTargets){var V=y.morphTargets,k=this.morphTargetInfluences;n.set(0,0,0),r.set(0,0,0),a.set(0,0,0);for(var j=0,W=V.length;j<W;j++){var X=k[j];if(0!==X){var q=V[j].vertices;n.addScaledVector(o.subVectors(q[G.a],P),X),r.addScaledVector(s.subVectors(q[G.b],C),X),a.addScaledVector(c.subVectors(q[G.c],O),X)}}n.add(P),r.add(C),a.add(O),P=n,C=r,O=a}if(v=g(this,H,p,e,P,C,O,d)){if(I&&I[B]){var Y=I[B];h.copy(Y[0]),l.copy(Y[1]),u.copy(Y[2]),v.uv=m(d,P,C,O,h,l,u)}v.face=G,v.faceIndex=B,f.push(v)}}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Kt.prototype=Object.create(R.prototype),Kt.prototype.constructor=Kt,Kt.prototype.isCubeTexture=!0,Object.defineProperty(Kt.prototype,"images",{get:function(){return this.image},set:function(t){this.image=t}});var $t=new R,te=new Kt;function ee(){this.seq=[],this.map={}}var ie=[],ne=[],re=new Float32Array(16),ae=new Float32Array(9),oe=new Float32Array(4);function se(t,e,i){var n=t[0];if(n<=0||n>0)return t;var r=e*i,a=ie[r];if(void 0===a&&(a=new Float32Array(r),ie[r]=a),0!==e){n.toArray(a,0);for(var o=1,s=0;o!==e;++o)s+=i,t[o].toArray(a,s)}return a}function ce(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i<n;i++)if(t[i]!==e[i])return!1;return!0}function he(t,e){for(var i=0,n=e.length;i<n;i++)t[i]=e[i]}function le(t,e){var i=ne[e];void 0===i&&(i=new Int32Array(e),ne[e]=i);for(var n=0;n!==e;++n)i[n]=t.allocTextureUnit();return i}function ue(t,e){var i=this.cache;i[0]!==e&&(t.uniform1f(this.addr,e),i[0]=e)}function pe(t,e){var i=this.cache;i[0]!==e&&(t.uniform1i(this.addr,e),i[0]=e)}function de(t,e){var i=this.cache;if(void 0!==e.x)i[0]===e.x&&i[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),i[0]=e.x,i[1]=e.y);else{if(ce(i,e))return;t.uniform2fv(this.addr,e),he(i,e)}}function fe(t,e){var i=this.cache;if(void 0!==e.x)i[0]===e.x&&i[1]===e.y&&i[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),i[0]=e.x,i[1]=e.y,i[2]=e.z);else if(void 0!==e.r)i[0]===e.r&&i[1]===e.g&&i[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),i[0]=e.r,i[1]=e.g,i[2]=e.b);else{if(ce(i,e))return;t.uniform3fv(this.addr,e),he(i,e)}}function me(t,e){var i=this.cache;if(void 0!==e.x)i[0]===e.x&&i[1]===e.y&&i[2]===e.z&&i[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),i[0]=e.x,i[1]=e.y,i[2]=e.z,i[3]=e.w);else{if(ce(i,e))return;t.uniform4fv(this.addr,e),he(i,e)}}function ge(t,e){var i=this.cache,n=e.elements;if(void 0===n){if(ce(i,e))return;t.uniformMatrix2fv(this.addr,!1,e),he(i,e)}else{if(ce(i,n))return;oe.set(n),t.uniformMatrix2fv(this.addr,!1,oe),he(i,n)}}function ve(t,e){var i=this.cache,n=e.elements;if(void 0===n){if(ce(i,e))return;t.uniformMatrix3fv(this.addr,!1,e),he(i,e)}else{if(ce(i,n))return;ae.set(n),t.uniformMatrix3fv(this.addr,!1,ae),he(i,n)}}function ye(t,e){var i=this.cache,n=e.elements;if(void 0===n){if(ce(i,e))return;t.uniformMatrix4fv(this.addr,!1,e),he(i,e)}else{if(ce(i,n))return;re.set(n),t.uniformMatrix4fv(this.addr,!1,re),he(i,n)}}function xe(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTexture2D(e||$t,r)}function _e(t,e,i){var n=this.cache,r=i.allocTextureUnit();n[0]!==r&&(t.uniform1i(this.addr,r),n[0]=r),i.setTextureCube(e||te,r)}function be(t,e){var i=this.cache;ce(i,e)||(t.uniform2iv(this.addr,e),he(i,e))}function we(t,e){var i=this.cache;ce(i,e)||(t.uniform3iv(this.addr,e),he(i,e))}function Me(t,e){var i=this.cache;ce(i,e)||(t.uniform4iv(this.addr,e),he(i,e))}function Ee(t,e){var i=this.cache;ce(i,e)||(t.uniform1fv(this.addr,e),he(i,e))}function Te(t,e){var i=this.cache;ce(i,e)||(t.uniform1iv(this.addr,e),he(i,e))}function Se(t,e){var i=this.cache,n=se(e,this.size,2);ce(i,n)||(t.uniform2fv(this.addr,n),this.updateCache(n))}function Ae(t,e){var i=this.cache,n=se(e,this.size,3);ce(i,n)||(t.uniform3fv(this.addr,n),this.updateCache(n))}function Re(t,e){var i=this.cache,n=se(e,this.size,4);ce(i,n)||(t.uniform4fv(this.addr,n),this.updateCache(n))}function Le(t,e){var i=this.cache,n=se(e,this.size,4);ce(i,n)||(t.uniformMatrix2fv(this.addr,!1,n),this.updateCache(n))}function Pe(t,e){var i=this.cache,n=se(e,this.size,9);ce(i,n)||(t.uniformMatrix3fv(this.addr,!1,n),this.updateCache(n))}function Ce(t,e){var i=this.cache,n=se(e,this.size,16);ce(i,n)||(t.uniformMatrix4fv(this.addr,!1,n),this.updateCache(n))}function Oe(t,e,i){var n=this.cache,r=e.length,a=le(i,r);!1===ce(n,a)&&(t.uniform1iv(this.addr,a),he(n,a));for(var o=0;o!==r;++o)i.setTexture2D(e[o]||$t,a[o])}function Ie(t,e,i){var n=this.cache,r=e.length,a=le(i,r);!1===ce(n,a)&&(t.uniform1iv(this.addr,a),he(n,a));for(var o=0;o!==r;++o)i.setTextureCube(e[o]||te,a[o])}function Ne(t,e,i){this.id=t,this.addr=i,this.cache=[],this.setValue=function(t){switch(t){case 5126:return ue;case 35664:return de;case 35665:return fe;case 35666:return me;case 35674:return ge;case 35675:return ve;case 35676:return ye;case 35678:case 36198:return xe;case 35680:return _e;case 5124:case 35670:return pe;case 35667:case 35671:return be;case 35668:case 35672:return we;case 35669:case 35673:return Me}}(e.type)}function De(t,e,i){this.id=t,this.addr=i,this.cache=[],this.size=e.size,this.setValue=function(t){switch(t){case 5126:return Ee;case 35664:return Se;case 35665:return Ae;case 35666:return Re;case 35674:return Le;case 35675:return Pe;case 35676:return Ce;case 35678:return Oe;case 35680:return Ie;case 5124:case 35670:return Te;case 35667:case 35671:return be;case 35668:case 35672:return we;case 35669:case 35673:return Me}}(e.type)}function Ue(t){this.id=t,ee.call(this)}De.prototype.updateCache=function(t){var e=this.cache;t instanceof Float32Array&&e.length!==t.length&&(this.cache=new Float32Array(t.length)),he(e,t)},Ue.prototype.setValue=function(t,e){for(var i=this.seq,n=0,r=i.length;n!==r;++n){var a=i[n];a.setValue(t,e[a.id])}};var ze=/([\w\d_]+)(\])?(\[|\.)?/g;function Be(t,e){t.seq.push(e),t.map[e.id]=e}function Fe(t,e,i){var n=t.name,r=n.length;for(ze.lastIndex=0;;){var a=ze.exec(n),o=ze.lastIndex,s=a[1],c="]"===a[2],h=a[3];if(c&&(s|=0),void 0===h||"["===h&&o+2===r){Be(i,void 0===h?new Ne(s,t,e):new De(s,t,e));break}var l=i.map[s];void 0===l&&Be(i,l=new Ue(s)),i=l}}function Ge(t,e,i){ee.call(this),this.renderer=i;for(var n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS),r=0;r<n;++r){var a=t.getActiveUniform(e,r);Fe(a,t.getUniformLocation(e,a.name),this)}}function He(t,e,i){var n=t.createShader(e);return t.shaderSource(n,i),t.compileShader(n),!1===t.getShaderParameter(n,t.COMPILE_STATUS)&&console.error("THREE.WebGLShader: Shader couldn't compile."),""!==t.getShaderInfoLog(n)&&console.warn("THREE.WebGLShader: gl.getShaderInfoLog()",e===t.VERTEX_SHADER?"vertex":"fragment",t.getShaderInfoLog(n),function(t){for(var e=t.split("\n"),i=0;i<e.length;i++)e[i]=i+1+": "+e[i];return e.join("\n")}(i)),n}Ge.prototype.setValue=function(t,e,i){var n=this.map[e];void 0!==n&&n.setValue(t,i,this.renderer)},Ge.prototype.setOptional=function(t,e,i){var n=e[i];void 0!==n&&this.setValue(t,i,n)},Ge.upload=function(t,e,i,n){for(var r=0,a=e.length;r!==a;++r){var o=e[r],s=i[o.id];!1!==s.needsUpdate&&o.setValue(t,s.value,n)}},Ge.seqWithValue=function(t,e){for(var i=[],n=0,r=t.length;n!==r;++n){var a=t[n];a.id in e&&i.push(a)}return i};var Ve=0;function ke(t){switch(t){case 3e3:return["Linear","( value )"];case 3001:return["sRGB","( value )"];case 3002:return["RGBE","( value )"];case 3004:return["RGBM","( value, 7.0 )"];case 3005:return["RGBM","( value, 16.0 )"];case 3006:return["RGBD","( value, 256.0 )"];case 3007:return["Gamma","( value, float( GAMMA_FACTOR ) )"];default:throw new Error("unsupported encoding: "+t)}}function je(t,e){var i=ke(e);return"vec4 "+t+"( vec4 value ) { return "+i[0]+"ToLinear"+i[1]+"; }"}function We(t,e){var i;switch(e){case 1:i="Linear";break;case 2:i="Reinhard";break;case 3:i="Uncharted2";break;case 4:i="OptimizedCineon";break;default:throw new Error("unsupported toneMapping: "+e)}return"vec3 "+t+"( vec3 color ) { return "+i+"ToneMapping( color ); }"}function Xe(t){return""!==t}function qe(t,e){return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights)}function Ye(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}function Ze(t){return t.replace(/^[ \t]*#include +<([\w\d.]+)>/gm,(function(t,e){var i=B[e];if(void 0===i)throw new Error("Can not resolve #include <"+e+">");return Ze(i)}))}function Je(t){return t.replace(/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,(function(t,e,i,n){for(var r="",a=parseInt(e);a<parseInt(i);a++)r+=n.replace(/\[ i \]/g,"[ "+a+" ]");return r}))}function Qe(t,e,i,n,r,a){var o=t.context,s=n.defines,c=r.vertexShader,h=r.fragmentShader,l="SHADOWMAP_TYPE_BASIC";1===a.shadowMapType?l="SHADOWMAP_TYPE_PCF":2===a.shadowMapType&&(l="SHADOWMAP_TYPE_PCF_SOFT");var u="ENVMAP_TYPE_CUBE",p="ENVMAP_MODE_REFLECTION",d="ENVMAP_BLENDING_MULTIPLY";if(a.envMap){switch(n.envMap.mapping){case 301:case 302:u="ENVMAP_TYPE_CUBE";break;case 306:case 307:u="ENVMAP_TYPE_CUBE_UV";break;case 303:case 304:u="ENVMAP_TYPE_EQUIREC";break;case 305:u="ENVMAP_TYPE_SPHERE"}switch(n.envMap.mapping){case 302:case 304:p="ENVMAP_MODE_REFRACTION"}switch(n.combine){case 0:d="ENVMAP_BLENDING_MULTIPLY";break;case 1:d="ENVMAP_BLENDING_MIX";break;case 2:d="ENVMAP_BLENDING_ADD"}}var f,m,g,v,y,x=t.gammaFactor>0?t.gammaFactor:1,_=function(t,e,i){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.normalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&i.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&i.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&i.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Xe).join("\n")}(n.extensions,a,e),b=function(t){var e=[];for(var i in t){var n=t[i];!1!==n&&e.push("#define "+i+" "+n)}return e.join("\n")}(s),w=o.createProgram();n.isRawShaderMaterial?((f=[b].filter(Xe).join("\n")).length>0&&(f+="\n"),(m=[_,b].filter(Xe).join("\n")).length>0&&(m+="\n")):(f=["precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,b,a.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+x,"#define MAX_BONES "+a.maxBones,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+p:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.displacementMap&&a.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexColors?"#define USE_COLOR":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.useVertexTexture?"#define BONE_TEXTURE":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+l:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Xe).join("\n"),m=[_,"precision "+a.precision+" float;","precision "+a.precision+" int;","#define SHADER_NAME "+r.name,b,a.alphaTest?"#define ALPHATEST "+a.alphaTest+(a.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+x,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+u:"",a.envMap?"#define "+p:"",a.envMap?"#define "+d:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexColors?"#define USE_COLOR":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+l:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&e.get("EXT_frag_depth")?"#define USE_LOGDEPTHBUF_EXT":"",a.envMap&&e.get("EXT_shader_texture_lod")?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",0!==a.toneMapping?"#define TONE_MAPPING":"",0!==a.toneMapping?B.tonemapping_pars_fragment:"",0!==a.toneMapping?We("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.outputEncoding||a.mapEncoding||a.envMapEncoding||a.emissiveMapEncoding?B.encodings_pars_fragment:"",a.mapEncoding?je("mapTexelToLinear",a.mapEncoding):"",a.envMapEncoding?je("envMapTexelToLinear",a.envMapEncoding):"",a.emissiveMapEncoding?je("emissiveMapTexelToLinear",a.emissiveMapEncoding):"",a.outputEncoding?(g="linearToOutputTexel",v=a.outputEncoding,y=ke(v),"vec4 "+g+"( vec4 value ) { return LinearTo"+y[0]+y[1]+"; }"):"",a.depthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Xe).join("\n")),c=Ye(c=qe(c=Ze(c),a),a),h=Ye(h=qe(h=Ze(h),a),a);var M=f+(c=Je(c)),E=m+(h=Je(h)),T=He(o,o.VERTEX_SHADER,M),S=He(o,o.FRAGMENT_SHADER,E);o.attachShader(w,T),o.attachShader(w,S),void 0!==n.index0AttributeName?o.bindAttribLocation(w,0,n.index0AttributeName):!0===a.morphTargets&&o.bindAttribLocation(w,0,"position"),o.linkProgram(w);var A,R,L=o.getProgramInfoLog(w).trim(),P=o.getShaderInfoLog(T).trim(),C=o.getShaderInfoLog(S).trim(),O=!0,I=!0;return!1===o.getProgramParameter(w,o.LINK_STATUS)?(O=!1,console.error("THREE.WebGLProgram: shader error: ",o.getError(),"gl.VALIDATE_STATUS",o.getProgramParameter(w,o.VALIDATE_STATUS),"gl.getProgramInfoLog",L,P,C)):""!==L?console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()",L):""!==P&&""!==C||(I=!1),I&&(this.diagnostics={runnable:O,material:n,programLog:L,vertexShader:{log:P,prefix:f},fragmentShader:{log:C,prefix:m}}),o.deleteShader(T),o.deleteShader(S),this.getUniforms=function(){return void 0===A&&(A=new Ge(o,w,t)),A},this.getAttributes=function(){return void 0===R&&(R=function(t,e){for(var i={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),r=0;r<n;r++){var a=t.getActiveAttrib(e,r).name;i[a]=t.getAttribLocation(e,a)}return i}(o,w)),R},this.destroy=function(){o.deleteProgram(w),this.program=void 0},Object.defineProperties(this,{uniforms:{get:function(){return console.warn("THREE.WebGLProgram: .uniforms is now .getUniforms()."),this.getUniforms()}},attributes:{get:function(){return console.warn("THREE.WebGLProgram: .attributes is now .getAttributes()."),this.getAttributes()}}}),this.name=r.name,this.id=Ve++,this.code=i,this.usedTimes=1,this.program=w,this.vertexShader=T,this.fragmentShader=S,this}function Ke(t,e,i){var n=[],r={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"phong",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow"},a=["precision","supportsVertexTextures","map","mapEncoding","envMap","envMapMode","envMapEncoding","lightMap","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","displacementMap","specularMap","roughnessMap","metalnessMap","gradientMap","alphaMap","combine","vertexColors","fog","useFog","fogExp","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","maxMorphTargets","maxMorphNormals","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","alphaTest","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering"];function o(t,e){var i;return t?t.isTexture?i=t.encoding:t.isWebGLRenderTarget&&(console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."),i=t.texture.encoding):i=3e3,3e3===i&&e&&(i=3007),i}this.getParameters=function(e,n,a,s,c,h,l){var u=r[e.type],p=l.isSkinnedMesh?function(t){var e=t.skeleton.bones;if(i.floatVertexTextures)return 1024;var n=i.maxVertexUniforms,r=Math.floor((n-20)/4),a=Math.min(r,e.length);return a<e.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+e.length+" bones. This GPU supports "+a+"."),0):a}(l):0,d=i.precision;null!==e.precision&&(d=i.getMaxPrecision(e.precision))!==e.precision&&console.warn("THREE.WebGLProgram.getParameters:",e.precision,"not supported, using",d,"instead.");var f=t.getRenderTarget();return{shaderID:u,precision:d,supportsVertexTextures:i.vertexTextures,outputEncoding:o(f?f.texture:null,t.gammaOutput),map:!!e.map,mapEncoding:o(e.map,t.gammaInput),envMap:!!e.envMap,envMapMode:e.envMap&&e.envMap.mapping,envMapEncoding:o(e.envMap,t.gammaInput),envMapCubeUV:!!e.envMap&&(306===e.envMap.mapping||307===e.envMap.mapping),lightMap:!!e.lightMap,aoMap:!!e.aoMap,emissiveMap:!!e.emissiveMap,emissiveMapEncoding:o(e.emissiveMap,t.gammaInput),bumpMap:!!e.bumpMap,normalMap:!!e.normalMap,displacementMap:!!e.displacementMap,roughnessMap:!!e.roughnessMap,metalnessMap:!!e.metalnessMap,specularMap:!!e.specularMap,alphaMap:!!e.alphaMap,gradientMap:!!e.gradientMap,combine:e.combine,vertexColors:e.vertexColors,fog:!!s,useFog:e.fog,fogExp:s&&s.isFogExp2,flatShading:e.flatShading,sizeAttenuation:e.sizeAttenuation,logarithmicDepthBuffer:i.logarithmicDepthBuffer,skinning:e.skinning&&p>0,maxBones:p,useVertexTexture:i.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:n.directional.length,numPointLights:n.point.length,numSpotLights:n.spot.length,numRectAreaLights:n.rectArea.length,numHemiLights:n.hemi.length,numClippingPlanes:c,numClipIntersection:h,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&l.receiveShadow&&a.length>0,shadowMapType:t.shadowMap.type,toneMapping:t.toneMapping,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:2===e.side,flipSided:1===e.side,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,i){var n=[];if(i.shaderID?n.push(i.shaderID):(n.push(e.fragmentShader),n.push(e.vertexShader)),void 0!==e.defines)for(var r in e.defines)n.push(r),n.push(e.defines[r]);for(var o=0;o<a.length;o++)n.push(i[a[o]]);return n.push(e.onBeforeCompile.toString()),n.push(t.gammaOutput),n.join()},this.acquireProgram=function(i,r,a,o){for(var s,c=0,h=n.length;c<h;c++){var l=n[c];if(l.code===o){++(s=l).usedTimes;break}}return void 0===s&&(s=new Qe(t,e,o,i,r,a),n.push(s)),s},this.releaseProgram=function(t){if(0==--t.usedTimes){var e=n.indexOf(t);n[e]=n[n.length-1],n.pop(),t.destroy()}},this.programs=n}function $e(){var t=new WeakMap;return{get:function(e){var i=t.get(e);return void 0===i&&(i={},t.set(e,i)),i},remove:function(e){t.delete(e)},update:function(e,i,n){t.get(e)[i]=n},dispose:function(){t=new WeakMap}}}function ti(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.program&&e.program&&t.program!==e.program?t.program.id-e.program.id:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function ei(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function ii(){var t=[],e=0,i=[],n=[];return{opaque:i,transparent:n,init:function(){e=0,i.length=0,n.length=0},push:function(r,a,o,s,c){var h=t[e];void 0===h?(h={id:r.id,object:r,geometry:a,material:o,program:o.program,renderOrder:r.renderOrder,z:s,group:c},t[e]=h):(h.id=r.id,h.object=r,h.geometry=a,h.material=o,h.program=o.program,h.renderOrder=r.renderOrder,h.z=s,h.group=c),(!0===o.transparent?n:i).push(h),e++},sort:function(){i.length>1&&i.sort(ti),n.length>1&&n.sort(ei)}}}function ni(){var t={};return{get:function(e,i){var n=e.id+","+i.id,r=t[n];return void 0===r&&(r=new ii,t[n]=r),r},dispose:function(){t={}}}}function ri(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var i;switch(e.type){case"DirectionalLight":i={direction:new _,color:new H,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new v};break;case"SpotLight":i={position:new _,direction:new _,color:new H,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new v};break;case"PointLight":i={position:new _,color:new H,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new v,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new _,skyColor:new H,groundColor:new H};break;case"RectAreaLight":i={color:new H,position:new _,halfWidth:new _,halfHeight:new _}}return t[e.id]=i,i}}}var ai,oi,si,ci,hi,li,ui,pi,di=0;function fi(){var t=new ri,e={id:di++,hash:"",ambient:[0,0,0],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]},i=new _,n=new y,r=new y;return{setup:function(a,o,s){for(var c=0,h=0,l=0,u=0,p=0,d=0,f=0,m=0,g=s.matrixWorldInverse,v=0,y=a.length;v<y;v++){var x=a[v],_=x.color,b=x.intensity,w=x.distance,M=x.shadow&&x.shadow.map?x.shadow.map.texture:null;if(x.isAmbientLight)c+=_.r*b,h+=_.g*b,l+=_.b*b;else if(x.isDirectionalLight){if((T=t.get(x)).color.copy(x.color).multiplyScalar(x.intensity),T.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),T.direction.sub(i),T.direction.transformDirection(g),T.shadow=x.castShadow,x.castShadow){var E=x.shadow;T.shadowBias=E.bias,T.shadowRadius=E.radius,T.shadowMapSize=E.mapSize}e.directionalShadowMap[u]=M,e.directionalShadowMatrix[u]=x.shadow.matrix,e.directional[u]=T,u++}else if(x.isSpotLight){if((T=t.get(x)).position.setFromMatrixPosition(x.matrixWorld),T.position.applyMatrix4(g),T.color.copy(_).multiplyScalar(b),T.distance=w,T.direction.setFromMatrixPosition(x.matrixWorld),i.setFromMatrixPosition(x.target.matrixWorld),T.direction.sub(i),T.direction.transformDirection(g),T.coneCos=Math.cos(x.angle),T.penumbraCos=Math.cos(x.angle*(1-x.penumbra)),T.decay=0===x.distance?0:x.decay,T.shadow=x.castShadow,x.castShadow){E=x.shadow;T.shadowBias=E.bias,T.shadowRadius=E.radius,T.shadowMapSize=E.mapSize}e.spotShadowMap[d]=M,e.spotShadowMatrix[d]=x.shadow.matrix,e.spot[d]=T,d++}else if(x.isRectAreaLight){(T=t.get(x)).color.copy(_).multiplyScalar(b),T.position.setFromMatrixPosition(x.matrixWorld),T.position.applyMatrix4(g),r.identity(),n.copy(x.matrixWorld),n.premultiply(g),r.extractRotation(n),T.halfWidth.set(.5*x.width,0,0),T.halfHeight.set(0,.5*x.height,0),T.halfWidth.applyMatrix4(r),T.halfHeight.applyMatrix4(r),e.rectArea[f]=T,f++}else if(x.isPointLight){if((T=t.get(x)).position.setFromMatrixPosition(x.matrixWorld),T.position.applyMatrix4(g),T.color.copy(x.color).multiplyScalar(x.intensity),T.distance=x.distance,T.decay=0===x.distance?0:x.decay,T.shadow=x.castShadow,x.castShadow){E=x.shadow;T.shadowBias=E.bias,T.shadowRadius=E.radius,T.shadowMapSize=E.mapSize,T.shadowCameraNear=E.camera.near,T.shadowCameraFar=E.camera.far}e.pointShadowMap[p]=M,e.pointShadowMatrix[p]=x.shadow.matrix,e.point[p]=T,p++}else if(x.isHemisphereLight){var T;(T=t.get(x)).direction.setFromMatrixPosition(x.matrixWorld),T.direction.transformDirection(g),T.direction.normalize(),T.skyColor.copy(x.color).multiplyScalar(b),T.groundColor.copy(x.groundColor).multiplyScalar(b),e.hemi[m]=T,m++}}e.ambient[0]=c,e.ambient[1]=h,e.ambient[2]=l,e.directional.length=u,e.spot.length=d,e.rectArea.length=f,e.point.length=p,e.hemi.length=m,e.hash=e.id+","+u+","+p+","+d+","+f+","+m+","+o.length},state:e}}function mi(){var t=new fi,e=[],i=[],n=[];return{init:function(){e.length=0,i.length=0,n.length=0},state:{lightsArray:e,shadowsArray:i,spritesArray:n,lights:t},setupLights:function(n){t.setup(e,i,n)},pushLight:function(t){e.push(t)},pushShadow:function(t){i.push(t)},pushSprite:function(t){n.push(t)}}}function gi(){var t={};return{get:function(e,i){var n=e.id+","+i.id,r=t[n];return void 0===r&&(r=new mi,t[n]=r),r},dispose:function(){t={}}}}function vi(t){Nt.call(this),this.type="MeshDepthMaterial",this.depthPacking=3200,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.setValues(t)}function yi(t){Nt.call(this),this.type="MeshDistanceMaterial",this.referencePosition=new _,this.nearDistance=1,this.farDistance=1e3,this.skinning=!1,this.morphTargets=!1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.lights=!1,this.setValues(t)}function xi(t,e,i){for(var n=new U,r=new y,a=new v,o=new v(i,i),s=new _,c=new _,h=new Array(4),l=new Array(4),u={},p={0:1,1:0,2:2},d=[new _(1,0,0),new _(-1,0,0),new _(0,0,1),new _(0,0,-1),new _(0,1,0),new _(0,-1,0)],f=[new _(0,1,0),new _(0,1,0),new _(0,1,0),new _(0,1,0),new _(0,0,1),new _(0,0,-1)],m=[new L,new L,new L,new L,new L,new L],g=0;4!==g;++g){var x=0!=(1&g),b=0!=(2&g),w=new vi({depthPacking:3201,morphTargets:x,skinning:b});h[g]=w;var M=new yi({morphTargets:x,skinning:b});l[g]=M}var E=this;function T(e,i,n,r,a,o){var s=e.geometry,c=null,d=h,f=e.customDepthMaterial;if(n&&(d=l,f=e.customDistanceMaterial),f)c=f;else{var m=!1;i.morphTargets&&(s&&s.isBufferGeometry?m=s.morphAttributes&&s.morphAttributes.position&&s.morphAttributes.position.length>0:s&&s.isGeometry&&(m=s.morphTargets&&s.morphTargets.length>0)),e.isSkinnedMesh&&!1===i.skinning&&console.warn("THREE.WebGLShadowMap: THREE.SkinnedMesh with material.skinning set to false:",e);var g=0;m&&(g|=1),e.isSkinnedMesh&&i.skinning&&(g|=2),c=d[g]}if(t.localClippingEnabled&&!0===i.clipShadows&&0!==i.clippingPlanes.length){var v=c.uuid,y=i.uuid,x=u[v];void 0===x&&(x={},u[v]=x);var _=x[y];void 0===_&&(_=c.clone(),x[y]=_),c=_}return c.visible=i.visible,c.wireframe=i.wireframe,c.side=null!=i.shadowSide?i.shadowSide:p[i.side],c.clipShadows=i.clipShadows,c.clippingPlanes=i.clippingPlanes,c.clipIntersection=i.clipIntersection,c.wireframeLinewidth=i.wireframeLinewidth,c.linewidth=i.linewidth,n&&c.isMeshDistanceMaterial&&(c.referencePosition.copy(r),c.nearDistance=a,c.farDistance=o),c}function S(i,r,a,o){if(!1!==i.visible){if(i.layers.test(r.layers)&&(i.isMesh||i.isLine||i.isPoints)&&i.castShadow&&(!i.frustumCulled||n.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,i.matrixWorld);var s=e.update(i),h=i.material;if(Array.isArray(h))for(var l=s.groups,u=0,p=l.length;u<p;u++){var d=l[u],f=h[d.materialIndex];if(f&&f.visible){var m=T(i,f,o,c,a.near,a.far);t.renderBufferDirect(a,null,s,m,i,d)}}else if(h.visible){m=T(i,h,o,c,a.near,a.far);t.renderBufferDirect(a,null,s,m,i,null)}}for(var g=i.children,v=0,y=g.length;v<y;v++)S(g[v],r,a,o)}}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1,this.render=function(e,i,h){if(!1!==E.enabled&&(!1!==E.autoUpdate||!1!==E.needsUpdate)&&0!==e.length){var l,u=t.context,p=t.state;p.disable(u.BLEND),p.buffers.color.setClear(1,1,1,1),p.buffers.depth.setTest(!0),p.setScissorTest(!1);for(var g=0,v=e.length;g<v;g++){var y=e[g],x=y.shadow,_=y&&y.isPointLight;if(void 0!==x){var b=x.camera;if(a.copy(x.mapSize),a.min(o),_){var w=a.x,M=a.y;m[0].set(2*w,M,w,M),m[1].set(0,M,w,M),m[2].set(3*w,M,w,M),m[3].set(w,M,w,M),m[4].set(3*w,0,w,M),m[5].set(w,0,w,M),a.x*=4,a.y*=2}if(null===x.map){var T={minFilter:1003,magFilter:1003,format:1023};x.map=new P(a.x,a.y,T),x.map.texture.name=y.name+".shadowMap",b.updateProjectionMatrix()}x.isSpotLightShadow&&x.update(y);var A=x.map,R=x.matrix;c.setFromMatrixPosition(y.matrixWorld),b.position.copy(c),_?(l=6,R.makeTranslation(-c.x,-c.y,-c.z)):(l=1,s.setFromMatrixPosition(y.target.matrixWorld),b.lookAt(s),b.updateMatrixWorld(),R.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),R.multiply(b.projectionMatrix),R.multiply(b.matrixWorldInverse)),t.setRenderTarget(A),t.clear();for(var L=0;L<l;L++){if(_){s.copy(b.position),s.add(d[L]),b.up.copy(f[L]),b.lookAt(s),b.updateMatrixWorld();var C=m[L];p.viewport(C)}r.multiplyMatrices(b.projectionMatrix,b.matrixWorldInverse),n.setFromMatrix(r),S(i,h,b,_)}}else console.warn("THREE.WebGLShadowMap:",y,"has no shadow.")}E.needsUpdate=!1}}}function _i(t,e,i,n,r,a,o,s,c){R.call(this,t,e,i,n,r,a,o,s,c),this.needsUpdate=!0}function bi(t,e,i,n,r){var a,o,s,c,h,l,u=new _,p=new x,d=new _;function f(){var t=new Float32Array([-.5,-.5,0,0,.5,-.5,1,0,.5,.5,1,1,-.5,.5,0,1]),i=new Uint16Array([0,1,2,0,2,3]);a=e.createBuffer(),o=e.createBuffer(),e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,o),e.bufferData(e.ELEMENT_ARRAY_BUFFER,i,e.STATIC_DRAW),s=function(){var t=e.createProgram(),i=e.createShader(e.VERTEX_SHADER),n=e.createShader(e.FRAGMENT_SHADER);return e.shaderSource(i,["precision "+r.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform float rotation;","uniform vec2 center;","uniform vec2 scale;","uniform vec2 uvOffset;","uniform vec2 uvScale;","attribute vec2 position;","attribute vec2 uv;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvUV = uvOffset + uv * uvScale;","\tvec2 alignedPosition = ( position - center ) * scale;","\tvec2 rotatedPosition;","\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;","\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;","\tvec4 mvPosition;","\tmvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );","\tmvPosition.xy += rotatedPosition;","\tgl_Position = projectionMatrix * mvPosition;","\tfogDepth = - mvPosition.z;","}"].join("\n")),e.shaderSource(n,["precision "+r.precision+" float;","#define SHADER_NAME SpriteMaterial","uniform vec3 color;","uniform sampler2D map;","uniform float opacity;","uniform int fogType;","uniform vec3 fogColor;","uniform float fogDensity;","uniform float fogNear;","uniform float fogFar;","uniform float alphaTest;","varying vec2 vUV;","varying float fogDepth;","void main() {","\tvec4 texture = texture2D( map, vUV );","\tgl_FragColor = vec4( color * texture.xyz, texture.a * opacity );","\tif ( gl_FragColor.a < alphaTest ) discard;","\tif ( fogType > 0 ) {","\t\tfloat fogFactor = 0.0;","\t\tif ( fogType == 1 ) {","\t\t\tfogFactor = smoothstep( fogNear, fogFar, fogDepth );","\t\t} else {","\t\t\tconst float LOG2 = 1.442695;","\t\t\tfogFactor = exp2( - fogDensity * fogDensity * fogDepth * fogDepth * LOG2 );","\t\t\tfogFactor = 1.0 - clamp( fogFactor, 0.0, 1.0 );","\t\t}","\t\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );","\t}","}"].join("\n")),e.compileShader(i),e.compileShader(n),e.attachShader(t,i),e.attachShader(t,n),e.linkProgram(t),t}(),c={position:e.getAttribLocation(s,"position"),uv:e.getAttribLocation(s,"uv")},h={uvOffset:e.getUniformLocation(s,"uvOffset"),uvScale:e.getUniformLocation(s,"uvScale"),rotation:e.getUniformLocation(s,"rotation"),center:e.getUniformLocation(s,"center"),scale:e.getUniformLocation(s,"scale"),color:e.getUniformLocation(s,"color"),map:e.getUniformLocation(s,"map"),opacity:e.getUniformLocation(s,"opacity"),modelViewMatrix:e.getUniformLocation(s,"modelViewMatrix"),projectionMatrix:e.getUniformLocation(s,"projectionMatrix"),fogType:e.getUniformLocation(s,"fogType"),fogDensity:e.getUniformLocation(s,"fogDensity"),fogNear:e.getUniformLocation(s,"fogNear"),fogFar:e.getUniformLocation(s,"fogFar"),fogColor:e.getUniformLocation(s,"fogColor"),fogDepth:e.getUniformLocation(s,"fogDepth"),alphaTest:e.getUniformLocation(s,"alphaTest")};var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=8,n.height=8;var u=n.getContext("2d");u.fillStyle="white",u.fillRect(0,0,8,8),l=new _i(n)}function m(t,e){return t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:e.id-t.id}this.render=function(r,g,v){if(0!==r.length){void 0===s&&f(),i.useProgram(s),i.initAttributes(),i.enableAttribute(c.position),i.enableAttribute(c.uv),i.disableUnusedAttributes(),i.disable(e.CULL_FACE),i.enable(e.BLEND),e.bindBuffer(e.ARRAY_BUFFER,a),e.vertexAttribPointer(c.position,2,e.FLOAT,!1,16,0),e.vertexAttribPointer(c.uv,2,e.FLOAT,!1,16,8),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,o),e.uniformMatrix4fv(h.projectionMatrix,!1,v.projectionMatrix.elements),i.activeTexture(e.TEXTURE0),e.uniform1i(h.map,0);var y=0,x=0,_=g.fog;_?(e.uniform3f(h.fogColor,_.color.r,_.color.g,_.color.b),_.isFog?(e.uniform1f(h.fogNear,_.near),e.uniform1f(h.fogFar,_.far),e.uniform1i(h.fogType,1),y=1,x=1):_.isFogExp2&&(e.uniform1f(h.fogDensity,_.density),e.uniform1i(h.fogType,2),y=2,x=2)):(e.uniform1i(h.fogType,0),y=0,x=0);for(var b=0,w=r.length;b<w;b++){(T=r[b]).modelViewMatrix.multiplyMatrices(v.matrixWorldInverse,T.matrixWorld),T.z=-T.modelViewMatrix.elements[14]}r.sort(m);var M=[],E=[];for(b=0,w=r.length;b<w;b++){var T,S=(T=r[b]).material;if(!1!==S.visible){T.onBeforeRender(t,g,v,void 0,S,void 0),e.uniform1f(h.alphaTest,S.alphaTest),e.uniformMatrix4fv(h.modelViewMatrix,!1,T.modelViewMatrix.elements),T.matrixWorld.decompose(u,p,d),M[0]=d.x,M[1]=d.y,E[0]=T.center.x-.5,E[1]=T.center.y-.5;var A=0;g.fog&&S.fog&&(A=x),y!==A&&(e.uniform1i(h.fogType,A),y=A),null!==S.map?(e.uniform2f(h.uvOffset,S.map.offset.x,S.map.offset.y),e.uniform2f(h.uvScale,S.map.repeat.x,S.map.repeat.y)):(e.uniform2f(h.uvOffset,0,0),e.uniform2f(h.uvScale,1,1)),e.uniform1f(h.opacity,S.opacity),e.uniform3f(h.color,S.color.r,S.color.g,S.color.b),e.uniform1f(h.rotation,S.rotation),e.uniform2fv(h.center,E),e.uniform2fv(h.scale,M),i.setBlending(S.blending,S.blendEquation,S.blendSrc,S.blendDst,S.blendEquationAlpha,S.blendSrcAlpha,S.blendDstAlpha,S.premultipliedAlpha),i.buffers.depth.setTest(S.depthTest),i.buffers.depth.setMask(S.depthWrite),i.buffers.color.setMask(S.colorWrite),n.setTexture2D(S.map||l,0),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0),T.onAfterRender(t,g,v,void 0,S,void 0)}}i.enable(e.CULL_FACE),i.reset()}}}function wi(t,e,i){var n=new function(){var e=!1,i=new L,n=null,r=new L(0,0,0,0);return{setMask:function(i){n===i||e||(t.colorMask(i,i,i,i),n=i)},setLocked:function(t){e=t},setClear:function(e,n,a,o,s){!0===s&&(e*=o,n*=o,a*=o),i.set(e,n,a,o),!1===r.equals(i)&&(t.clearColor(e,n,a,o),r.copy(i))},reset:function(){e=!1,n=null,r.set(-1,0,0,0)}}},r=new function(){var e=!1,i=null,n=null,r=null;return{setTest:function(e){e?B(t.DEPTH_TEST):F(t.DEPTH_TEST)},setMask:function(n){i===n||e||(t.depthMask(n),i=n)},setFunc:function(e){if(n!==e){if(e)switch(e){case 0:t.depthFunc(t.NEVER);break;case 1:t.depthFunc(t.ALWAYS);break;case 2:t.depthFunc(t.LESS);break;case 3:t.depthFunc(t.LEQUAL);break;case 4:t.depthFunc(t.EQUAL);break;case 5:t.depthFunc(t.GEQUAL);break;case 6:t.depthFunc(t.GREATER);break;case 7:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}else t.depthFunc(t.LEQUAL);n=e}},setLocked:function(t){e=t},setClear:function(e){r!==e&&(t.clearDepth(e),r=e)},reset:function(){e=!1,i=null,n=null,r=null}}},a=new function(){var e=!1,i=null,n=null,r=null,a=null,o=null,s=null,c=null,h=null;return{setTest:function(e){e?B(t.STENCIL_TEST):F(t.STENCIL_TEST)},setMask:function(n){i===n||e||(t.stencilMask(n),i=n)},setFunc:function(e,i,o){n===e&&r===i&&a===o||(t.stencilFunc(e,i,o),n=e,r=i,a=o)},setOp:function(e,i,n){o===e&&s===i&&c===n||(t.stencilOp(e,i,n),o=e,s=i,c=n)},setLocked:function(t){e=t},setClear:function(e){h!==e&&(t.clearStencil(e),h=e)},reset:function(){e=!1,i=null,n=null,r=null,a=null,o=null,s=null,c=null,h=null}}},o=t.getParameter(t.MAX_VERTEX_ATTRIBS),s=new Uint8Array(o),c=new Uint8Array(o),h=new Uint8Array(o),l={},u=null,p=null,d=null,f=null,m=null,g=null,v=null,y=null,x=null,_=!1,b=null,w=null,M=null,E=null,T=null,S=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS),A=!1,R=0,P=t.getParameter(t.VERSION);-1!==P.indexOf("WebGL")?(R=parseFloat(/^WebGL\ ([0-9])/.exec(P)[1]),A=R>=1):-1!==P.indexOf("OpenGL ES")&&(R=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(P)[1]),A=R>=2);var C=null,O={},I=new L,N=new L;function D(e,i,n){var r=new Uint8Array(4),a=t.createTexture();t.bindTexture(e,a),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var o=0;o<n;o++)t.texImage2D(i+o,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,r);return a}var U={};function z(i,n){(s[i]=1,0===c[i]&&(t.enableVertexAttribArray(i),c[i]=1),h[i]!==n)&&(e.get("ANGLE_instanced_arrays").vertexAttribDivisorANGLE(i,n),h[i]=n)}function B(e){!0!==l[e]&&(t.enable(e),l[e]=!0)}function F(e){!1!==l[e]&&(t.disable(e),l[e]=!1)}function G(e,n,r,a,o,s,c,h){if(0!==e?B(t.BLEND):F(t.BLEND),5!==e){if(e!==d||h!==_)switch(e){case 2:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE,t.ONE,t.ONE)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.SRC_ALPHA,t.ONE));break;case 3:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.ONE_MINUS_SRC_COLOR));break;case 4:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA)):(t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ZERO,t.SRC_COLOR));break;default:h?(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA)):(t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD),t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA))}f=null,m=null,g=null,v=null,y=null,x=null}else o=o||n,s=s||r,c=c||a,n===f&&o===v||(t.blendEquationSeparate(i.convert(n),i.convert(o)),f=n,v=o),r===m&&a===g&&s===y&&c===x||(t.blendFuncSeparate(i.convert(r),i.convert(a),i.convert(s),i.convert(c)),m=r,g=a,y=s,x=c);d=e,_=h}function H(e){b!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),b=e)}function V(e){0!==e?(B(t.CULL_FACE),e!==w&&(1===e?t.cullFace(t.BACK):2===e?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):F(t.CULL_FACE),w=e}function k(e,i,n){e?(B(t.POLYGON_OFFSET_FILL),E===i&&T===n||(t.polygonOffset(i,n),E=i,T=n)):F(t.POLYGON_OFFSET_FILL)}function j(e){void 0===e&&(e=t.TEXTURE0+S-1),C!==e&&(t.activeTexture(e),C=e)}return U[t.TEXTURE_2D]=D(t.TEXTURE_2D,t.TEXTURE_2D,1),U[t.TEXTURE_CUBE_MAP]=D(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),n.setClear(0,0,0,1),r.setClear(1),a.setClear(0),B(t.DEPTH_TEST),r.setFunc(3),H(!1),V(1),B(t.CULL_FACE),B(t.BLEND),G(1),{buffers:{color:n,depth:r,stencil:a},initAttributes:function(){for(var t=0,e=s.length;t<e;t++)s[t]=0},enableAttribute:function(t){z(t,0)},enableAttributeAndDivisor:z,disableUnusedAttributes:function(){for(var e=0,i=c.length;e!==i;++e)c[e]!==s[e]&&(t.disableVertexAttribArray(e),c[e]=0)},enable:B,disable:F,getCompressedTextureFormats:function(){if(null===u&&(u=[],e.get("WEBGL_compressed_texture_pvrtc")||e.get("WEBGL_compressed_texture_s3tc")||e.get("WEBGL_compressed_texture_etc1")||e.get("WEBGL_compressed_texture_astc")))for(var i=t.getParameter(t.COMPRESSED_TEXTURE_FORMATS),n=0;n<i.length;n++)u.push(i[n]);return u},useProgram:function(e){return p!==e&&(t.useProgram(e),p=e,!0)},setBlending:G,setMaterial:function(e,i){2===e.side?F(t.CULL_FACE):B(t.CULL_FACE);var a=1===e.side;i&&(a=!a),H(a),!0===e.transparent?G(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha):G(0),r.setFunc(e.depthFunc),r.setTest(e.depthTest),r.setMask(e.depthWrite),n.setMask(e.colorWrite),k(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits)},setFlipSided:H,setCullFace:V,setLineWidth:function(e){e!==M&&(A&&t.lineWidth(e),M=e)},setPolygonOffset:k,setScissorTest:function(e){e?B(t.SCISSOR_TEST):F(t.SCISSOR_TEST)},activeTexture:j,bindTexture:function(e,i){null===C&&j();var n=O[C];void 0===n&&(n={type:void 0,texture:void 0},O[C]=n),n.type===e&&n.texture===i||(t.bindTexture(e,i||U[e]),n.type=e,n.texture=i)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===I.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),I.copy(e))},viewport:function(e){!1===N.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),N.copy(e))},reset:function(){for(var e=0;e<c.length;e++)1===c[e]&&(t.disableVertexAttribArray(e),c[e]=0);l={},u=null,C=null,O={},p=null,d=null,b=null,w=null,n.reset(),r.reset(),a.reset()}}}function Mi(t,e,i,n,r,a,o){var s,c="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,h={};function l(t,e){if(t.width>e||t.height>e){if("data"in t)return void console.warn("THREE.WebGLRenderer: image in DataTexture is too big ("+t.width+"x"+t.height+").");var i=e/Math.max(t.width,t.height),n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");return n.width=Math.floor(t.width*i),n.height=Math.floor(t.height*i),n.getContext("2d").drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height),console.warn("THREE.WebGLRenderer: image is too big ("+t.width+"x"+t.height+"). Resized to "+n.width+"x"+n.height,t),n}return t}function u(t){return g.isPowerOfTwo(t.width)&&g.isPowerOfTwo(t.height)}function p(t,e){return t.generateMipmaps&&e&&1003!==t.minFilter&&1006!==t.minFilter}function d(e,i,r,a){t.generateMipmap(e),n.get(i).__maxMipLevel=Math.log(Math.max(r,a))*Math.LOG2E}function f(e){return 1003===e||1004===e||1005===e?t.NEAREST:t.LINEAR}function m(e){var i=e.target;i.removeEventListener("dispose",m),function(e){var i=n.get(e);if(e.image&&i.__image__webglTextureCube)t.deleteTexture(i.__image__webglTextureCube);else{if(void 0===i.__webglInit)return;t.deleteTexture(i.__webglTexture)}n.remove(e)}(i),i.isVideoTexture&&delete h[i.id],o.memory.textures--}function v(e){var i=e.target;i.removeEventListener("dispose",v),function(e){var i=n.get(e),r=n.get(e.texture);if(!e)return;void 0!==r.__webglTexture&&t.deleteTexture(r.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var a=0;a<6;a++)t.deleteFramebuffer(i.__webglFramebuffer[a]),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer[a]);else t.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer);n.remove(e.texture),n.remove(e)}(i),o.memory.textures--}function y(e,f){var v=n.get(e);if(e.isVideoTexture&&function(t){var e=t.id,i=o.render.frame;h[e]!==i&&(h[e]=i,t.update())}(e),e.version>0&&v.__version!==e.version){var y=e.image;if(void 0===y)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined",e);else{if(!1!==y.complete)return void function(e,n,h){void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),o.memory.textures++);i.activeTexture(t.TEXTURE0+h),i.bindTexture(t.TEXTURE_2D,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,n.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,n.unpackAlignment);var f=l(n.image,r.maxTextureSize);(function(t){return 1001!==t.wrapS||1001!==t.wrapT||1003!==t.minFilter&&1006!==t.minFilter})(n)&&!1===u(f)&&(f=function(t){return t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageBitmap?(void 0===s&&(s=document.createElementNS("http://www.w3.org/1999/xhtml","canvas")),s.width=g.floorPowerOfTwo(t.width),s.height=g.floorPowerOfTwo(t.height),s.getContext("2d").drawImage(t,0,0,s.width,s.height),console.warn("THREE.WebGLRenderer: image is not power of two ("+t.width+"x"+t.height+"). Resized to "+s.width+"x"+s.height,t),s):t}(f));var v=u(f),y=a.convert(n.format),_=a.convert(n.type);x(t.TEXTURE_2D,n,v);var b,w=n.mipmaps;if(n.isDepthTexture){var M=t.DEPTH_COMPONENT;if(1015===n.type){if(!c)throw new Error("Float Depth Texture only supported in WebGL2.0");M=t.DEPTH_COMPONENT32F}else c&&(M=t.DEPTH_COMPONENT16);1026===n.format&&M===t.DEPTH_COMPONENT&&1012!==n.type&&1014!==n.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),n.type=1012,_=a.convert(n.type)),1027===n.format&&(M=t.DEPTH_STENCIL,1020!==n.type&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),n.type=1020,_=a.convert(n.type))),i.texImage2D(t.TEXTURE_2D,0,M,f.width,f.height,0,y,_,null)}else if(n.isDataTexture)if(w.length>0&&v){for(var E=0,T=w.length;E<T;E++)b=w[E],i.texImage2D(t.TEXTURE_2D,E,y,b.width,b.height,0,y,_,b.data);n.generateMipmaps=!1,e.__maxMipLevel=w.length-1}else i.texImage2D(t.TEXTURE_2D,0,y,f.width,f.height,0,y,_,f.data),e.__maxMipLevel=0;else if(n.isCompressedTexture){for(E=0,T=w.length;E<T;E++)b=w[E],1023!==n.format&&1022!==n.format?i.getCompressedTextureFormats().indexOf(y)>-1?i.compressedTexImage2D(t.TEXTURE_2D,E,y,b.width,b.height,0,b.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):i.texImage2D(t.TEXTURE_2D,E,y,b.width,b.height,0,y,_,b.data);e.__maxMipLevel=w.length-1}else if(w.length>0&&v){for(E=0,T=w.length;E<T;E++)b=w[E],i.texImage2D(t.TEXTURE_2D,E,y,y,_,b);n.generateMipmaps=!1,e.__maxMipLevel=w.length-1}else i.texImage2D(t.TEXTURE_2D,0,y,y,_,f),e.__maxMipLevel=0;p(n,v)&&d(t.TEXTURE_2D,n,f.width,f.height);e.__version=n.version,n.onUpdate&&n.onUpdate(n)}(v,e,f);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete",e)}}i.activeTexture(t.TEXTURE0+f),i.bindTexture(t.TEXTURE_2D,v.__webglTexture)}function x(i,o,s){var c;if(s?(t.texParameteri(i,t.TEXTURE_WRAP_S,a.convert(o.wrapS)),t.texParameteri(i,t.TEXTURE_WRAP_T,a.convert(o.wrapT)),t.texParameteri(i,t.TEXTURE_MAG_FILTER,a.convert(o.magFilter)),t.texParameteri(i,t.TEXTURE_MIN_FILTER,a.convert(o.minFilter))):(t.texParameteri(i,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(i,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),1001===o.wrapS&&1001===o.wrapT||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping.",o),t.texParameteri(i,t.TEXTURE_MAG_FILTER,f(o.magFilter)),t.texParameteri(i,t.TEXTURE_MIN_FILTER,f(o.minFilter)),1003!==o.minFilter&&1006!==o.minFilter&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.",o)),c=e.get("EXT_texture_filter_anisotropic")){if(1015===o.type&&null===e.get("OES_texture_float_linear"))return;if(1016===o.type&&null===e.get("OES_texture_half_float_linear"))return;(o.anisotropy>1||n.get(o).__currentAnisotropy)&&(t.texParameterf(i,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,r.getMaxAnisotropy())),n.get(o).__currentAnisotropy=o.anisotropy)}}function _(e,r,o,s){var c=a.convert(r.texture.format),h=a.convert(r.texture.type);i.texImage2D(s,0,c,r.width,r.height,0,c,h,null),t.bindFramebuffer(t.FRAMEBUFFER,e),t.framebufferTexture2D(t.FRAMEBUFFER,o,s,n.get(r.texture).__webglTexture,0),t.bindFramebuffer(t.FRAMEBUFFER,null)}function b(e,i){t.bindRenderbuffer(t.RENDERBUFFER,e),i.depthBuffer&&!i.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_COMPONENT16,i.width,i.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e)):i.depthBuffer&&i.stencilBuffer?(t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,i.width,i.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e)):t.renderbufferStorage(t.RENDERBUFFER,t.RGBA4,i.width,i.height),t.bindRenderbuffer(t.RENDERBUFFER,null)}function w(e){var i=n.get(e),r=!0===e.isWebGLRenderTargetCube;if(e.depthTexture){if(r)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,i){if(i&&i.isWebGLRenderTargetCube)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(t.FRAMEBUFFER,e),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");n.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),y(i.depthTexture,0);var r=n.get(i.depthTexture).__webglTexture;if(1026===i.depthTexture.format)t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,r,0);else{if(1027!==i.depthTexture.format)throw new Error("Unknown depthTexture format");t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,r,0)}}(i.__webglFramebuffer,e)}else if(r){i.__webglDepthbuffer=[];for(var a=0;a<6;a++)t.bindFramebuffer(t.FRAMEBUFFER,i.__webglFramebuffer[a]),i.__webglDepthbuffer[a]=t.createRenderbuffer(),b(i.__webglDepthbuffer[a],e)}else t.bindFramebuffer(t.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer=t.createRenderbuffer(),b(i.__webglDepthbuffer,e);t.bindFramebuffer(t.FRAMEBUFFER,null)}this.setTexture2D=y,this.setTextureCube=function(e,s){var c=n.get(e);if(6===e.image.length)if(e.version>0&&c.__version!==e.version){c.__image__webglTextureCube||(e.addEventListener("dispose",m),c.__image__webglTextureCube=t.createTexture(),o.memory.textures++),i.activeTexture(t.TEXTURE0+s),i.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var h=e&&e.isCompressedTexture,f=e.image[0]&&e.image[0].isDataTexture,g=[],v=0;v<6;v++)g[v]=h||f?f?e.image[v].image:e.image[v]:l(e.image[v],r.maxCubemapSize);var y=g[0],_=u(y),b=a.convert(e.format),w=a.convert(e.type);x(t.TEXTURE_CUBE_MAP,e,_);for(v=0;v<6;v++)if(h)for(var M,E=g[v].mipmaps,T=0,S=E.length;T<S;T++)M=E[T],1023!==e.format&&1022!==e.format?i.getCompressedTextureFormats().indexOf(b)>-1?i.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+v,T,b,M.width,M.height,0,M.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+v,T,b,M.width,M.height,0,b,w,M.data);else f?i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+v,0,b,g[v].width,g[v].height,0,b,w,g[v].data):i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+v,0,b,b,w,g[v]);c.__maxMipLevel=h?E.length-1:0,p(e,_)&&d(t.TEXTURE_CUBE_MAP,e,y.width,y.height),c.__version=e.version,e.onUpdate&&e.onUpdate(e)}else i.activeTexture(t.TEXTURE0+s),i.bindTexture(t.TEXTURE_CUBE_MAP,c.__image__webglTextureCube)},this.setTextureCubeDynamic=function(e,r){i.activeTexture(t.TEXTURE0+r),i.bindTexture(t.TEXTURE_CUBE_MAP,n.get(e).__webglTexture)},this.setupRenderTarget=function(e){var r=n.get(e),a=n.get(e.texture);e.addEventListener("dispose",v),a.__webglTexture=t.createTexture(),o.memory.textures++;var s=!0===e.isWebGLRenderTargetCube,c=u(e);if(s){r.__webglFramebuffer=[];for(var h=0;h<6;h++)r.__webglFramebuffer[h]=t.createFramebuffer()}else r.__webglFramebuffer=t.createFramebuffer();if(s){i.bindTexture(t.TEXTURE_CUBE_MAP,a.__webglTexture),x(t.TEXTURE_CUBE_MAP,e.texture,c);for(h=0;h<6;h++)_(r.__webglFramebuffer[h],e,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+h);p(e.texture,c)&&d(t.TEXTURE_CUBE_MAP,e.texture,e.width,e.height),i.bindTexture(t.TEXTURE_CUBE_MAP,null)}else i.bindTexture(t.TEXTURE_2D,a.__webglTexture),x(t.TEXTURE_2D,e.texture,c),_(r.__webglFramebuffer,e,t.COLOR_ATTACHMENT0,t.TEXTURE_2D),p(e.texture,c)&&d(t.TEXTURE_2D,e.texture,e.width,e.height),i.bindTexture(t.TEXTURE_2D,null);e.depthBuffer&&w(e)},this.updateRenderTargetMipmap=function(e){var r=e.texture;if(p(r,u(e))){var a=e.isWebGLRenderTargetCube?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,o=n.get(r).__webglTexture;i.bindTexture(a,o),d(a,r,e.width,e.height),i.bindTexture(a,null)}}}function Ei(t,e){return{convert:function(i){var n;if(1e3===i)return t.REPEAT;if(1001===i)return t.CLAMP_TO_EDGE;if(1002===i)return t.MIRRORED_REPEAT;if(1003===i)return t.NEAREST;if(1004===i)return t.NEAREST_MIPMAP_NEAREST;if(1005===i)return t.NEAREST_MIPMAP_LINEAR;if(1006===i)return t.LINEAR;if(1007===i)return t.LINEAR_MIPMAP_NEAREST;if(1008===i)return t.LINEAR_MIPMAP_LINEAR;if(1009===i)return t.UNSIGNED_BYTE;if(1017===i)return t.UNSIGNED_SHORT_4_4_4_4;if(1018===i)return t.UNSIGNED_SHORT_5_5_5_1;if(1019===i)return t.UNSIGNED_SHORT_5_6_5;if(1010===i)return t.BYTE;if(1011===i)return t.SHORT;if(1012===i)return t.UNSIGNED_SHORT;if(1013===i)return t.INT;if(1014===i)return t.UNSIGNED_INT;if(1015===i)return t.FLOAT;if(1016===i&&null!==(n=e.get("OES_texture_half_float")))return n.HALF_FLOAT_OES;if(1021===i)return t.ALPHA;if(1022===i)return t.RGB;if(1023===i)return t.RGBA;if(1024===i)return t.LUMINANCE;if(1025===i)return t.LUMINANCE_ALPHA;if(1026===i)return t.DEPTH_COMPONENT;if(1027===i)return t.DEPTH_STENCIL;if(100===i)return t.FUNC_ADD;if(101===i)return t.FUNC_SUBTRACT;if(102===i)return t.FUNC_REVERSE_SUBTRACT;if(200===i)return t.ZERO;if(201===i)return t.ONE;if(202===i)return t.SRC_COLOR;if(203===i)return t.ONE_MINUS_SRC_COLOR;if(204===i)return t.SRC_ALPHA;if(205===i)return t.ONE_MINUS_SRC_ALPHA;if(206===i)return t.DST_ALPHA;if(207===i)return t.ONE_MINUS_DST_ALPHA;if(208===i)return t.DST_COLOR;if(209===i)return t.ONE_MINUS_DST_COLOR;if(210===i)return t.SRC_ALPHA_SATURATE;if((33776===i||33777===i||33778===i||33779===i)&&null!==(n=e.get("WEBGL_compressed_texture_s3tc"))){if(33776===i)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===i)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===i)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===i)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if((35840===i||35841===i||35842===i||35843===i)&&null!==(n=e.get("WEBGL_compressed_texture_pvrtc"))){if(35840===i)return n.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===i)return n.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===i)return n.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===i)return n.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===i&&null!==(n=e.get("WEBGL_compressed_texture_etc1")))return n.COMPRESSED_RGB_ETC1_WEBGL;if((37808===i||37809===i||37810===i||37811===i||37812===i||37813===i||37814===i||37815===i||37816===i||37817===i||37818===i||37819===i||37820===i||37821===i)&&null!==(n=e.get("WEBGL_compressed_texture_astc")))return i;if((103===i||104===i)&&null!==(n=e.get("EXT_blend_minmax"))){if(103===i)return n.MIN_EXT;if(104===i)return n.MAX_EXT}return 1020===i&&null!==(n=e.get("WEBGL_depth_texture"))?n.UNSIGNED_INT_24_8_WEBGL:0}}}function Ti(t,e,i,n){et.call(this),this.type="PerspectiveCamera",this.fov=void 0!==t?t:50,this.zoom=1,this.near=void 0!==i?i:.1,this.far=void 0!==n?n:2e3,this.focus=10,this.aspect=void 0!==e?e:1,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}function Si(t){Ti.call(this),this.cameras=t||[]}function Ai(t){var e=this,i=null,n=null,r=null,a=new y,o=new y;"undefined"!=typeof window&&"VRFrameData"in window&&(n=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",g,!1));var s=new y,c=new x,h=new _,l=new Ti;l.bounds=new L(0,0,.5,1),l.layers.enable(1);var u=new Ti;u.bounds=new L(.5,0,.5,1),u.layers.enable(2);var p,d,f=new Si([l,u]);function m(){return null!==i&&!0===i.isPresenting}function g(){if(m()){var n=i.getEyeParameters("left"),r=n.renderWidth,a=n.renderHeight;d=t.getPixelRatio(),p=t.getSize(),t.setDrawingBufferSize(2*r,a,1),v.start()}else e.enabled&&(t.setDrawingBufferSize(p.width,p.height,d),v.stop())}f.layers.enable(1),f.layers.enable(2),this.enabled=!1,this.userHeight=1.6,this.getDevice=function(){return i},this.setDevice=function(t){void 0!==t&&(i=t),v.setContext(t)},this.setPoseTarget=function(t){void 0!==t&&(r=t)},this.getCamera=function(t){if(null===i)return t;i.depthNear=t.near,i.depthFar=t.far,i.getFrameData(n);var p=i.stageParameters;p?a.fromArray(p.sittingToStandingTransform):a.makeTranslation(0,e.userHeight,0);var d=n.pose,m=null!==r?r:t;if(m.matrix.copy(a),m.matrix.decompose(m.position,m.quaternion,m.scale),null!==d.orientation&&(c.fromArray(d.orientation),m.quaternion.multiply(c)),null!==d.position&&(c.setFromRotationMatrix(a),h.fromArray(d.position),h.applyQuaternion(c),m.position.add(h)),m.updateMatrixWorld(),!1===i.isPresenting)return t;l.near=t.near,u.near=t.near,l.far=t.far,u.far=t.far,f.matrixWorld.copy(t.matrixWorld),f.matrixWorldInverse.copy(t.matrixWorldInverse),l.matrixWorldInverse.fromArray(n.leftViewMatrix),u.matrixWorldInverse.fromArray(n.rightViewMatrix),o.getInverse(a),l.matrixWorldInverse.multiply(o),u.matrixWorldInverse.multiply(o);var g=m.parent;null!==g&&(s.getInverse(g.matrixWorld),l.matrixWorldInverse.multiply(s),u.matrixWorldInverse.multiply(s)),l.matrixWorld.getInverse(l.matrixWorldInverse),u.matrixWorld.getInverse(u.matrixWorldInverse),l.projectionMatrix.fromArray(n.leftProjectionMatrix),u.projectionMatrix.fromArray(n.rightProjectionMatrix),f.projectionMatrix.copy(l.projectionMatrix);var v=i.getLayers();if(v.length){var y=v[0];null!==y.leftBounds&&4===y.leftBounds.length&&l.bounds.fromArray(y.leftBounds),null!==y.rightBounds&&4===y.rightBounds.length&&u.bounds.fromArray(y.rightBounds)}return f},this.getStandingMatrix=function(){return a},this.isPresenting=m;var v=new W;this.setAnimationLoop=function(t){v.setAnimationLoop(t)},this.submitFrame=function(){m()&&i.submitFrame()},this.dispose=function(){"undefined"!=typeof window&&window.removeEventListener("vrdisplaypresentchange",g)}}function Ri(t){var e=t.context,i=null,n=null,r=null,a=null;function o(){return null!==n&&null!==r}var s=new Ti;s.layers.enable(1),s.viewport=new L;var c=new Ti;c.layers.enable(2),c.viewport=new L;var h=new Si([s,c]);function l(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.getInverse(t.matrixWorld)}h.layers.enable(1),h.layers.enable(2),this.enabled=!1,this.getDevice=function(){return i},this.setDevice=function(t){void 0!==t&&(i=t),e.setCompatibleXRDevice(t)},this.setSession=function(i,a){null!==(n=i)&&(n.addEventListener("end",(function(){t.setFramebuffer(null),p.stop()})),n.baseLayer=new XRWebGLLayer(n,e),n.requestFrameOfReference(a.frameOfReferenceType).then((function(e){r=e,t.setFramebuffer(n.baseLayer.framebuffer),p.setContext(n),p.start()})))},this.getCamera=function(t){if(o()){var e=t.parent,i=h.cameras;l(h,e);for(var n=0;n<i.length;n++)l(i[n],e);t.matrixWorld.copy(h.matrixWorld);for(var r=t.children,a=(n=0,r.length);n<a;n++)r[n].updateMatrixWorld(!0);return h}return t},this.isPresenting=o;var u=null;var p=new W;p.setAnimationLoop((function(t,e){a=e.getDevicePose(r);for(var i=n.baseLayer,o=e.views,s=0;s<o.length;s++){var c=o[s],l=i.getViewport(c),p=a.getViewMatrix(c),d=h.cameras[s];d.matrix.fromArray(p).getInverse(d.matrix),d.projectionMatrix.fromArray(c.projectionMatrix),d.viewport.set(l.x,l.y,l.width,l.height),0===s&&(h.matrix.copy(d.matrix),h.projectionMatrix.copy(d.projectionMatrix))}u&&u()})),this.setAnimationLoop=function(t){u=t},this.getStandingMatrix=function(){return console.warn("THREE.WebXRManager: getStandingMatrix() is no longer needed."),new THREE.Matrix4},this.submitFrame=function(){}}function Li(t){console.log("THREE.WebGLRenderer","93");var e=void 0!==(t=t||{}).canvas?t.canvas:document.createElementNS("http://www.w3.org/1999/xhtml","canvas"),i=void 0!==t.context?t.context:null,n=void 0!==t.alpha&&t.alpha,r=void 0===t.depth||t.depth,a=void 0===t.stencil||t.stencil,o=void 0!==t.antialias&&t.antialias,s=void 0===t.premultipliedAlpha||t.premultipliedAlpha,c=void 0!==t.preserveDrawingBuffer&&t.preserveDrawingBuffer,h=void 0!==t.powerPreference?t.powerPreference:"default",l=null,u=null;this.domElement=e,this.context=null,this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.gammaInput=!1,this.gammaOutput=!1,this.physicallyCorrectLights=!1,this.toneMapping=1,this.toneMappingExposure=1,this.toneMappingWhitePoint=1,this.maxMorphTargets=8,this.maxMorphNormals=4;var p,d,f,m,v,x,b,w,M,E,T,S,A,R,P,C,I,N,D,z=this,B=!1,G=null,H=null,V=null,q=-1,Y="",Z=null,J=null,Q=new L,K=new L,$=null,tt=0,et=e.width,it=e.height,nt=1,rt=new L(0,0,et,it),at=new L(0,0,et,it),ot=!1,st=new U,ct=new jt,ht=!1,lt=!1,ut=new y,pt=new _;function dt(){return null===H?nt:1}try{var ft={alpha:n,depth:r,stencil:a,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:c,powerPreference:h};if(e.addEventListener("webglcontextlost",yt,!1),e.addEventListener("webglcontextrestored",xt,!1),null===(p=i||e.getContext("webgl",ft)||e.getContext("experimental-webgl",ft)))throw null!==e.getContext("webgl")?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.");void 0===p.getShaderPrecisionFormat&&(p.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(t){console.error("THREE.WebGLRenderer: "+t.message)}function mt(){(d=new Wt(p)).get("WEBGL_depth_texture"),d.get("OES_texture_float"),d.get("OES_texture_float_linear"),d.get("OES_texture_half_float"),d.get("OES_texture_half_float_linear"),d.get("OES_standard_derivatives"),d.get("OES_element_index_uint"),d.get("ANGLE_instanced_arrays"),D=new Ei(p,d),f=new kt(p,d,t),(m=new wi(p,d,D)).scissor(K.copy(at).multiplyScalar(nt)),m.viewport(Q.copy(rt).multiplyScalar(nt)),v=new Yt(p),x=new $e,b=new Mi(p,d,m,x,f,D,v),w=new X(p),M=new Xt(p,w,v),E=new Qt(M,v),P=new Jt(p),T=new Ke(z,d,f),S=new ni,A=new gi,R=new Ht(z,m,E,s),C=new Vt(p,d,v),I=new qt(p,d,v),N=new bi(z,p,m,b,f),v.programs=T.programs,z.context=p,z.capabilities=f,z.extensions=d,z.properties=x,z.renderLists=S,z.state=m,z.info=v}mt();var gt="xr"in navigator?new Ri(z):new Ai(z);this.vr=gt;var vt=new xi(z,E,f.maxTextureSize);function yt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),B=!0}function xt(){console.log("THREE.WebGLRenderer: Context Restored."),B=!1,mt()}function _t(t){var e=t.target;e.removeEventListener("dispose",_t),function(t){bt(t),x.remove(t)}(e)}function bt(t){var e=x.get(t).program;t.program=void 0,void 0!==e&&T.releaseProgram(e)}this.shadowMap=vt,this.getContext=function(){return p},this.getContextAttributes=function(){return p.getContextAttributes()},this.forceContextLoss=function(){var t=d.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){var t=d.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return nt},this.setPixelRatio=function(t){void 0!==t&&(nt=t,this.setSize(et,it,!1))},this.getSize=function(){return{width:et,height:it}},this.setSize=function(t,i,n){gt.isPresenting()?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(et=t,it=i,e.width=t*nt,e.height=i*nt,!1!==n&&(e.style.width=t+"px",e.style.height=i+"px"),this.setViewport(0,0,t,i))},this.getDrawingBufferSize=function(){return{width:et*nt,height:it*nt}},this.setDrawingBufferSize=function(t,i,n){et=t,it=i,nt=n,e.width=t*n,e.height=i*n,this.setViewport(0,0,t,i)},this.getCurrentViewport=function(){return Q},this.setViewport=function(t,e,i,n){rt.set(t,it-e-n,i,n),m.viewport(Q.copy(rt).multiplyScalar(nt))},this.setScissor=function(t,e,i,n){at.set(t,it-e-n,i,n),m.scissor(K.copy(at).multiplyScalar(nt))},this.setScissorTest=function(t){m.setScissorTest(ot=t)},this.getClearColor=function(){return R.getClearColor()},this.setClearColor=function(){R.setClearColor.apply(R,arguments)},this.getClearAlpha=function(){return R.getClearAlpha()},this.setClearAlpha=function(){R.setClearAlpha.apply(R,arguments)},this.clear=function(t,e,i){var n=0;(void 0===t||t)&&(n|=p.COLOR_BUFFER_BIT),(void 0===e||e)&&(n|=p.DEPTH_BUFFER_BIT),(void 0===i||i)&&(n|=p.STENCIL_BUFFER_BIT),p.clear(n)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.clearTarget=function(t,e,i,n){this.setRenderTarget(t),this.clear(e,i,n)},this.dispose=function(){e.removeEventListener("webglcontextlost",yt,!1),e.removeEventListener("webglcontextrestored",xt,!1),S.dispose(),A.dispose(),x.dispose(),E.dispose(),gt.dispose(),Et.stop()},this.renderBufferImmediate=function(t,e,i){m.initAttributes();var n=x.get(t);t.hasPositions&&!n.position&&(n.position=p.createBuffer()),t.hasNormals&&!n.normal&&(n.normal=p.createBuffer()),t.hasUvs&&!n.uv&&(n.uv=p.createBuffer()),t.hasColors&&!n.color&&(n.color=p.createBuffer());var r=e.getAttributes();if(t.hasPositions&&(p.bindBuffer(p.ARRAY_BUFFER,n.position),p.bufferData(p.ARRAY_BUFFER,t.positionArray,p.DYNAMIC_DRAW),m.enableAttribute(r.position),p.vertexAttribPointer(r.position,3,p.FLOAT,!1,0,0)),t.hasNormals){if(p.bindBuffer(p.ARRAY_BUFFER,n.normal),!i.isMeshPhongMaterial&&!i.isMeshStandardMaterial&&!i.isMeshNormalMaterial&&!0===i.flatShading)for(var a=0,o=3*t.count;a<o;a+=9){var s=t.normalArray,c=(s[a+0]+s[a+3]+s[a+6])/3,h=(s[a+1]+s[a+4]+s[a+7])/3,l=(s[a+2]+s[a+5]+s[a+8])/3;s[a+0]=c,s[a+1]=h,s[a+2]=l,s[a+3]=c,s[a+4]=h,s[a+5]=l,s[a+6]=c,s[a+7]=h,s[a+8]=l}p.bufferData(p.ARRAY_BUFFER,t.normalArray,p.DYNAMIC_DRAW),m.enableAttribute(r.normal),p.vertexAttribPointer(r.normal,3,p.FLOAT,!1,0,0)}t.hasUvs&&i.map&&(p.bindBuffer(p.ARRAY_BUFFER,n.uv),p.bufferData(p.ARRAY_BUFFER,t.uvArray,p.DYNAMIC_DRAW),m.enableAttribute(r.uv),p.vertexAttribPointer(r.uv,2,p.FLOAT,!1,0,0)),t.hasColors&&0!==i.vertexColors&&(p.bindBuffer(p.ARRAY_BUFFER,n.color),p.bufferData(p.ARRAY_BUFFER,t.colorArray,p.DYNAMIC_DRAW),m.enableAttribute(r.color),p.vertexAttribPointer(r.color,3,p.FLOAT,!1,0,0)),m.disableUnusedAttributes(),p.drawArrays(p.TRIANGLES,0,t.count),t.count=0},this.renderBufferDirect=function(t,e,i,n,r,a){var o=r.isMesh&&r.matrixWorld.determinant()<0;m.setMaterial(n,o);var s=Rt(t,e,n,r),c=i.id+"_"+s.id+"_"+(!0===n.wireframe),h=!1;c!==Y&&(Y=c,h=!0),r.morphTargetInfluences&&(P.update(r,i,n,s),h=!0);var l,u=i.index,f=i.attributes.position,g=1;!0===n.wireframe&&(u=M.getWireframeAttribute(i),g=2);var v=C;null!==u&&(l=w.get(u),(v=I).setIndex(l)),h&&(!function(t,e,i){if(i&&i.isInstancedBufferGeometry&&null===d.get("ANGLE_instanced_arrays"))return void console.error("THREE.WebGLRenderer.setupVertexAttributes: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");m.initAttributes();var n=i.attributes,r=e.getAttributes(),a=t.defaultAttributeValues;for(var o in r){var s=r[o];if(s>=0){var c=n[o];if(void 0!==c){var h=c.normalized,l=c.itemSize,u=w.get(c);if(void 0===u)continue;var f=u.buffer,g=u.type,v=u.bytesPerElement;if(c.isInterleavedBufferAttribute){var y=c.data,x=y.stride,_=c.offset;y&&y.isInstancedInterleavedBuffer?(m.enableAttributeAndDivisor(s,y.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=y.meshPerAttribute*y.count)):m.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,f),p.vertexAttribPointer(s,l,g,h,x*v,_*v)}else c.isInstancedBufferAttribute?(m.enableAttributeAndDivisor(s,c.meshPerAttribute),void 0===i.maxInstancedCount&&(i.maxInstancedCount=c.meshPerAttribute*c.count)):m.enableAttribute(s),p.bindBuffer(p.ARRAY_BUFFER,f),p.vertexAttribPointer(s,l,g,h,0,0)}else if(void 0!==a){var b=a[o];if(void 0!==b)switch(b.length){case 2:p.vertexAttrib2fv(s,b);break;case 3:p.vertexAttrib3fv(s,b);break;case 4:p.vertexAttrib4fv(s,b);break;default:p.vertexAttrib1fv(s,b)}}}}m.disableUnusedAttributes()}(n,s,i),null!==u&&p.bindBuffer(p.ELEMENT_ARRAY_BUFFER,l.buffer));var y=1/0;null!==u?y=u.count:void 0!==f&&(y=f.count);var x=i.drawRange.start*g,_=i.drawRange.count*g,b=null!==a?a.start*g:0,E=null!==a?a.count*g:1/0,T=Math.max(x,b),S=Math.min(y,x+_,b+E)-1,A=Math.max(0,S-T+1);if(0!==A){if(r.isMesh)if(!0===n.wireframe)m.setLineWidth(n.wireframeLinewidth*dt()),v.setMode(p.LINES);else switch(r.drawMode){case 0:v.setMode(p.TRIANGLES);break;case 1:v.setMode(p.TRIANGLE_STRIP);break;case 2:v.setMode(p.TRIANGLE_FAN)}else if(r.isLine){var R=n.linewidth;void 0===R&&(R=1),m.setLineWidth(R*dt()),r.isLineSegments?v.setMode(p.LINES):r.isLineLoop?v.setMode(p.LINE_LOOP):v.setMode(p.LINE_STRIP)}else r.isPoints&&v.setMode(p.POINTS);i&&i.isInstancedBufferGeometry?i.maxInstancedCount>0&&v.renderInstances(i,T,A):v.render(T,A)}},this.compile=function(t,e){(u=A.get(t,e)).init(),t.traverse((function(t){t.isLight&&(u.pushLight(t),t.castShadow&&u.pushShadow(t))})),u.setupLights(e),t.traverse((function(e){if(e.material)if(Array.isArray(e.material))for(var i=0;i<e.material.length;i++)At(e.material[i],t.fog,e);else At(e.material,t.fog,e)}))};var wt=null;var Mt,Et=new W;function Tt(t,e,i,n){for(var r=0,a=t.length;r<a;r++){var o=t[r],s=o.object,c=o.geometry,h=void 0===n?o.material:n,l=o.group;if(i.isArrayCamera){J=i;for(var u=i.cameras,p=0,d=u.length;p<d;p++){var f=u[p];if(s.layers.test(f.layers)){if("viewport"in f)m.viewport(Q.copy(f.viewport));else{var g=f.bounds,v=g.x*et,y=g.y*it,x=g.z*et,_=g.w*it;m.viewport(Q.set(v,y,x,_).multiplyScalar(nt))}St(s,e,f,c,h,l)}}}else J=null,St(s,e,i,c,h,l)}}function St(t,e,i,n,r,a){if(t.onBeforeRender(z,e,i,n,r,a),u=A.get(e,J||i),t.modelViewMatrix.multiplyMatrices(i.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),t.isImmediateRenderObject){var o=t.isMesh&&t.matrixWorld.determinant()<0;m.setMaterial(r,o);var s=Rt(i,e.fog,r,t);Y="",function(t,e,i){t.render((function(t){z.renderBufferImmediate(t,e,i)}))}(t,s,r)}else z.renderBufferDirect(i,e.fog,n,r,t,a);t.onAfterRender(z,e,i,n,r,a),u=A.get(e,J||i)}function At(t,e,i){var n=x.get(t),r=u.state.lights,a=u.state.shadowsArray,o=T.getParameters(t,r.state,a,e,ct.numPlanes,ct.numIntersection,i),s=T.getProgramCode(t,o),c=n.program,h=!0;if(void 0===c)t.addEventListener("dispose",_t);else if(c.code!==s)bt(t);else if(n.lightsHash!==r.state.hash)x.update(t,"lightsHash",r.state.hash),h=!1;else{if(void 0!==o.shaderID)return;h=!1}if(h){if(o.shaderID){var l=j[o.shaderID];n.shader={name:t.type,uniforms:F.clone(l.uniforms),vertexShader:l.vertexShader,fragmentShader:l.fragmentShader}}else n.shader={name:t.type,uniforms:t.uniforms,vertexShader:t.vertexShader,fragmentShader:t.fragmentShader};t.onBeforeCompile(n.shader,z),c=T.acquireProgram(t,n.shader,o,s),n.program=c,t.program=c}var p=c.getAttributes();if(t.morphTargets){t.numSupportedMorphTargets=0;for(var d=0;d<z.maxMorphTargets;d++)p["morphTarget"+d]>=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(d=0;d<z.maxMorphNormals;d++)p["morphNormal"+d]>=0&&t.numSupportedMorphNormals++}var f=n.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(n.numClippingPlanes=ct.numPlanes,n.numIntersection=ct.numIntersection,f.clippingPlanes=ct.uniform),n.fog=e,n.lightsHash=r.state.hash,t.lights&&(f.ambientLightColor.value=r.state.ambient,f.directionalLights.value=r.state.directional,f.spotLights.value=r.state.spot,f.rectAreaLights.value=r.state.rectArea,f.pointLights.value=r.state.point,f.hemisphereLights.value=r.state.hemi,f.directionalShadowMap.value=r.state.directionalShadowMap,f.directionalShadowMatrix.value=r.state.directionalShadowMatrix,f.spotShadowMap.value=r.state.spotShadowMap,f.spotShadowMatrix.value=r.state.spotShadowMatrix,f.pointShadowMap.value=r.state.pointShadowMap,f.pointShadowMatrix.value=r.state.pointShadowMatrix);var m=n.program.getUniforms(),g=Ge.seqWithValue(m.seq,f);n.uniformsList=g}function Rt(t,e,i,n){tt=0;var r=x.get(i),a=u.state.lights;if(ht&&(lt||t!==Z)){var o=t===Z&&i.id===q;ct.setState(i.clippingPlanes,i.clipIntersection,i.clipShadows,t,r,o)}!1===i.needsUpdate&&(void 0===r.program||i.fog&&r.fog!==e||i.lights&&r.lightsHash!==a.state.hash?i.needsUpdate=!0:void 0===r.numClippingPlanes||r.numClippingPlanes===ct.numPlanes&&r.numIntersection===ct.numIntersection||(i.needsUpdate=!0)),i.needsUpdate&&(At(i,e,n),i.needsUpdate=!1);var s,c,h=!1,l=!1,d=!1,v=r.program,y=v.getUniforms(),_=r.shader.uniforms;if(m.useProgram(v.program)&&(h=!0,l=!0,d=!0),i.id!==q&&(q=i.id,l=!0),h||t!==Z){if(y.setValue(p,"projectionMatrix",t.projectionMatrix),f.logarithmicDepthBuffer&&y.setValue(p,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),Z!==(J||t)&&(Z=J||t,l=!0,d=!0),i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.envMap){var b=y.map.cameraPosition;void 0!==b&&b.setValue(p,pt.setFromMatrixPosition(t.matrixWorld))}(i.isMeshPhongMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.skinning)&&y.setValue(p,"viewMatrix",t.matrixWorldInverse)}if(i.skinning){y.setOptional(p,n,"bindMatrix"),y.setOptional(p,n,"bindMatrixInverse");var w=n.skeleton;if(w){var M=w.bones;if(f.floatVertexTextures){if(void 0===w.boneTexture){var E=Math.sqrt(4*M.length);E=g.ceilPowerOfTwo(E),E=Math.max(E,4);var T=new Float32Array(E*E*4);T.set(w.boneMatrices);var S=new O(T,E,E,1023,1015);S.needsUpdate=!0,w.boneMatrices=T,w.boneTexture=S,w.boneTextureSize=E}y.setValue(p,"boneTexture",w.boneTexture),y.setValue(p,"boneTextureSize",w.boneTextureSize)}else y.setOptional(p,w,"boneMatrices")}}return l&&(y.setValue(p,"toneMappingExposure",z.toneMappingExposure),y.setValue(p,"toneMappingWhitePoint",z.toneMappingWhitePoint),i.lights&&(c=d,(s=_).ambientLightColor.needsUpdate=c,s.directionalLights.needsUpdate=c,s.pointLights.needsUpdate=c,s.spotLights.needsUpdate=c,s.rectAreaLights.needsUpdate=c,s.hemisphereLights.needsUpdate=c),e&&i.fog&&function(t,e){t.fogColor.value=e.color,e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(_,e),i.isMeshBasicMaterial?Lt(_,i):i.isMeshLambertMaterial?(Lt(_,i),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(_,i)):i.isMeshPhongMaterial?(Lt(_,i),i.isMeshToonMaterial?function(t,e){Pt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(_,i):Pt(_,i)):i.isMeshStandardMaterial?(Lt(_,i),i.isMeshPhysicalMaterial?function(t,e){t.clearCoat.value=e.clearCoat,t.clearCoatRoughness.value=e.clearCoatRoughness,Ct(t,e)}(_,i):Ct(_,i)):i.isMeshDepthMaterial?(Lt(_,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(_,i)):i.isMeshDistanceMaterial?(Lt(_,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(_,i)):i.isMeshNormalMaterial?(Lt(_,i),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(_,i)):i.isLineBasicMaterial?(function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity}(_,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(_,i)):i.isPointsMaterial?function(t,e){t.diffuse.value=e.color,t.opacity.value=e.opacity,t.size.value=e.size*nt,t.scale.value=.5*it,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(_,i):i.isShadowMaterial&&(_.color.value=i.color,_.opacity.value=i.opacity),void 0!==_.ltc_1&&(_.ltc_1.value=k.LTC_1),void 0!==_.ltc_2&&(_.ltc_2.value=k.LTC_2),Ge.upload(p,r.uniformsList,_,z)),i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(Ge.upload(p,r.uniformsList,_,z),i.uniformsNeedUpdate=!1),y.setValue(p,"modelViewMatrix",n.modelViewMatrix),y.setValue(p,"normalMatrix",n.normalMatrix),y.setValue(p,"modelMatrix",n.matrixWorld),v}function Lt(t,e){var i;t.opacity.value=e.opacity,e.color&&(t.diffuse.value=e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap&&e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=x.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?i=e.map:e.specularMap?i=e.specularMap:e.displacementMap?i=e.displacementMap:e.normalMap?i=e.normalMap:e.bumpMap?i=e.bumpMap:e.roughnessMap?i=e.roughnessMap:e.metalnessMap?i=e.metalnessMap:e.alphaMap?i=e.alphaMap:e.emissiveMap&&(i=e.emissiveMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix))}function Pt(t,e){t.specular.value=e.specular,t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Ct(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,1===e.side&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),1===e.side&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}Et.setAnimationLoop((function(){gt.isPresenting()||wt&&wt()})),Et.setContext(window),this.setAnimationLoop=function(t){wt=t,gt.setAnimationLoop(t),Et.start()},this.render=function(t,e,i,n){if(e&&e.isCamera){if(!B){Y="",q=-1,Z=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),gt.enabled&&(e=gt.getCamera(e)),(u=A.get(t,e)).init(),t.onBeforeRender(z,t,e,i),ut.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),st.setFromMatrix(ut),lt=this.localClippingEnabled,ht=ct.init(this.clippingPlanes,lt,e),(l=S.get(t,e)).init(),function t(e,i,n){if(!1===e.visible)return;if(e.layers.test(i.layers))if(e.isLight)u.pushLight(e),e.castShadow&&u.pushShadow(e);else if(e.isSprite)e.frustumCulled&&!st.intersectsSprite(e)||u.pushSprite(e);else if(e.isImmediateRenderObject)n&&pt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ut),l.push(e,null,e.material,pt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.update(),!e.frustumCulled||st.intersectsObject(e))){n&&pt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ut);var r=E.update(e),a=e.material;if(Array.isArray(a))for(var o=r.groups,s=0,c=o.length;s<c;s++){var h=o[s],p=a[h.materialIndex];p&&p.visible&&l.push(e,r,p,pt.z,h)}else a.visible&&l.push(e,r,a,pt.z,null)}var d=e.children;for(s=0,c=d.length;s<c;s++)t(d[s],i,n)}(t,e,z.sortObjects),!0===z.sortObjects&&l.sort(),ht&&ct.beginShadows();var r=u.state.shadowsArray;vt.render(r,t,e),u.setupLights(e),ht&&ct.endShadows(),this.info.autoReset&&this.info.reset(),void 0===i&&(i=null),this.setRenderTarget(i),R.render(l,t,e,n);var a=l.opaque,o=l.transparent;if(t.overrideMaterial){var s=t.overrideMaterial;a.length&&Tt(a,t,e,s),o.length&&Tt(o,t,e,s)}else a.length&&Tt(a,t,e),o.length&&Tt(o,t,e);var c=u.state.spritesArray;N.render(c,t,e),i&&b.updateRenderTargetMipmap(i),m.buffers.depth.setTest(!0),m.buffers.depth.setMask(!0),m.buffers.color.setMask(!0),m.setPolygonOffset(!1),t.onAfterRender(z,t,e),gt.enabled&&gt.submitFrame(),l=null,u=null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.allocTextureUnit=function(){var t=tt;return t>=f.maxTextures&&console.warn("THREE.WebGLRenderer: Trying to use "+t+" texture units while this GPU supports only "+f.maxTextures),tt+=1,t},this.setTexture2D=(Mt=!1,function(t,e){t&&t.isWebGLRenderTarget&&(Mt||(console.warn("THREE.WebGLRenderer.setTexture2D: don't use render targets as textures. Use their .texture property instead."),Mt=!0),t=t.texture),b.setTexture2D(t,e)}),this.setTexture=function(){var t=!1;return function(e,i){t||(console.warn("THREE.WebGLRenderer: .setTexture is deprecated, use setTexture2D instead."),t=!0),b.setTexture2D(e,i)}}(),this.setTextureCube=function(){var t=!1;return function(e,i){e&&e.isWebGLRenderTargetCube&&(t||(console.warn("THREE.WebGLRenderer.setTextureCube: don't use cube render targets as textures. Use their .texture property instead."),t=!0),e=e.texture),e&&e.isCubeTexture||Array.isArray(e.image)&&6===e.image.length?b.setTextureCube(e,i):b.setTextureCubeDynamic(e,i)}}(),this.setFramebuffer=function(t){G=t},this.getRenderTarget=function(){return H},this.setRenderTarget=function(t){H=t,t&&void 0===x.get(t).__webglFramebuffer&&b.setupRenderTarget(t);var e=G,i=!1;if(t){var n=x.get(t).__webglFramebuffer;t.isWebGLRenderTargetCube?(e=n[t.activeCubeFace],i=!0):e=n,Q.copy(t.viewport),K.copy(t.scissor),$=t.scissorTest}else Q.copy(rt).multiplyScalar(nt),K.copy(at).multiplyScalar(nt),$=ot;if(V!==e&&(p.bindFramebuffer(p.FRAMEBUFFER,e),V=e),m.viewport(Q),m.scissor(K),m.setScissorTest($),i){var r=x.get(t.texture);p.framebufferTexture2D(p.FRAMEBUFFER,p.COLOR_ATTACHMENT0,p.TEXTURE_CUBE_MAP_POSITIVE_X+t.activeCubeFace,r.__webglTexture,t.activeMipMapLevel)}},this.readRenderTargetPixels=function(t,e,i,n,r,a){if(t&&t.isWebGLRenderTarget){var o=x.get(t).__webglFramebuffer;if(o){var s=!1;o!==V&&(p.bindFramebuffer(p.FRAMEBUFFER,o),s=!0);try{var c=t.texture,h=c.format,l=c.type;if(1023!==h&&D.convert(h)!==p.getParameter(p.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!(1009===l||D.convert(l)===p.getParameter(p.IMPLEMENTATION_COLOR_READ_TYPE)||1015===l&&(d.get("OES_texture_float")||d.get("WEBGL_color_buffer_float"))||1016===l&&d.get("EXT_color_buffer_half_float")))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");p.checkFramebufferStatus(p.FRAMEBUFFER)===p.FRAMEBUFFER_COMPLETE?e>=0&&e<=t.width-n&&i>=0&&i<=t.height-r&&p.readPixels(e,i,n,r,D.convert(h),D.convert(l),a):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{s&&p.bindFramebuffer(p.FRAMEBUFFER,V)}}}else console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.")},this.copyFramebufferToTexture=function(t,e,i){var n=e.image.width,r=e.image.height,a=D.convert(e.format);this.setTexture2D(e,0),p.copyTexImage2D(p.TEXTURE_2D,i||0,a,t.x,t.y,n,r,0)},this.copyTextureToTexture=function(t,e,i,n){var r=e.image.width,a=e.image.height,o=D.convert(i.format),s=D.convert(i.type);this.setTexture2D(i,0),e.isDataTexture?p.texSubImage2D(p.TEXTURE_2D,n||0,t.x,t.y,r,a,o,s,e.image.data):p.texSubImage2D(p.TEXTURE_2D,n||0,t.x,t.y,o,s,e.image)}}function Pi(t,e){this.name="",this.color=new H(t),this.density=void 0!==e?e:25e-5}function Ci(t,e,i){this.name="",this.color=new H(t),this.near=void 0!==e?e:1,this.far=void 0!==i?i:1e3}function Oi(){tt.call(this),this.type="Scene",this.background=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0}function Ii(t){Nt.call(this),this.type="SpriteMaterial",this.color=new H(16777215),this.map=null,this.rotation=0,this.fog=!1,this.lights=!1,this.setValues(t)}function Ni(t){tt.call(this),this.type="Sprite",this.material=void 0!==t?t:new Ii,this.center=new v(.5,.5)}function Di(){tt.call(this),this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}})}function Ui(t,e){if(t=t||[],this.bones=t.slice(0),this.boneMatrices=new Float32Array(16*this.bones.length),void 0===e)this.calculateInverses();else if(this.bones.length===e.length)this.boneInverses=e.slice(0);else{console.warn("THREE.Skeleton boneInverses is the wrong length."),this.boneInverses=[];for(var i=0,n=this.bones.length;i<n;i++)this.boneInverses.push(new y)}}function zi(){tt.call(this),this.type="Bone"}function Bi(t,e){Gt.call(this,t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new y,this.bindMatrixInverse=new y;var i=new Ui(this.initBones());this.bind(i,this.matrixWorld),this.normalizeSkinWeights()}function Fi(t){Nt.call(this),this.type="LineBasicMaterial",this.color=new H(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.lights=!1,this.setValues(t)}function Gi(t,e,i){if(1===i)return console.warn("THREE.Line: parameter THREE.LinePieces no longer supported. Created THREE.LineSegments instead."),new Hi(t,e);tt.call(this),this.type="Line",this.geometry=void 0!==t?t:new bt,this.material=void 0!==e?e:new Fi({color:16777215*Math.random()})}function Hi(t,e){Gi.call(this,t,e),this.type="LineSegments"}function Vi(t,e){Gi.call(this,t,e),this.type="LineLoop"}function ki(t){Nt.call(this),this.type="PointsMaterial",this.color=new H(16777215),this.map=null,this.size=1,this.sizeAttenuation=!0,this.morphTargets=!1,this.lights=!1,this.setValues(t)}function ji(t,e){tt.call(this),this.type="Points",this.geometry=void 0!==t?t:new bt,this.material=void 0!==e?e:new ki({color:16777215*Math.random()})}function Wi(){tt.call(this),this.type="Group"}function Xi(t,e,i,n,r,a,o,s,c){R.call(this,t,e,i,n,r,a,o,s,c),this.generateMipmaps=!1}function qi(t,e,i,n,r,a,o,s,c,h,l,u){R.call(this,null,a,o,s,c,h,n,r,l,u),this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}function Yi(t,e,i,n,r,a,o,s,c,h){if(1026!==(h=void 0!==h?h:1026)&&1027!==h)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&1026===h&&(i=1012),void 0===i&&1027===h&&(i=1020),R.call(this,null,n,r,a,o,s,h,i,c),this.image={width:t,height:e},this.magFilter=void 0!==o?o:1003,this.minFilter=void 0!==s?s:1003,this.flipY=!1,this.generateMipmaps=!1}function Zi(t){bt.call(this),this.type="WireframeGeometry";var e,i,n,r,a,o,s,c,h,l,u=[],p=[0,0],d={},f=["a","b","c"];if(t&&t.isGeometry){var m=t.faces;for(e=0,n=m.length;e<n;e++){var g=m[e];for(i=0;i<3;i++)s=g[f[i]],c=g[f[(i+1)%3]],p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[h=p[0]+","+p[1]]&&(d[h]={index1:p[0],index2:p[1]})}for(h in d)o=d[h],l=t.vertices[o.index1],u.push(l.x,l.y,l.z),l=t.vertices[o.index2],u.push(l.x,l.y,l.z)}else if(t&&t.isBufferGeometry){var v,y,x,b,w,M,E;if(l=new _,null!==t.index){for(v=t.attributes.position,y=t.index,0===(x=t.groups).length&&(x=[{start:0,count:y.count,materialIndex:0}]),r=0,a=x.length;r<a;++r)for(e=w=(b=x[r]).start,n=w+b.count;e<n;e+=3)for(i=0;i<3;i++)s=y.getX(e+i),c=y.getX(e+(i+1)%3),p[0]=Math.min(s,c),p[1]=Math.max(s,c),void 0===d[h=p[0]+","+p[1]]&&(d[h]={index1:p[0],index2:p[1]});for(h in d)o=d[h],l.fromBufferAttribute(v,o.index1),u.push(l.x,l.y,l.z),l.fromBufferAttribute(v,o.index2),u.push(l.x,l.y,l.z)}else for(e=0,n=(v=t.attributes.position).count/3;e<n;e++)for(i=0;i<3;i++)M=3*e+i,l.fromBufferAttribute(v,M),u.push(l.x,l.y,l.z),E=3*e+(i+1)%3,l.fromBufferAttribute(v,E),u.push(l.x,l.y,l.z)}this.addAttribute("position",new gt(u,3))}function Ji(t,e,i){st.call(this),this.type="ParametricGeometry",this.parameters={func:t,slices:e,stacks:i},this.fromBufferGeometry(new Qi(t,e,i)),this.mergeVertices()}function Qi(t,e,i){bt.call(this),this.type="ParametricBufferGeometry",this.parameters={func:t,slices:e,stacks:i};var n,r,a=[],o=[],s=[],c=[],h=1e-5,l=new _,u=new _,p=new _,d=new _,f=new _;t.length<3&&console.error("THREE.ParametricGeometry: Function must now modify a Vector3 as third parameter.");var m=e+1;for(n=0;n<=i;n++){var g=n/i;for(r=0;r<=e;r++){var v=r/e;t(v,g,u),o.push(u.x,u.y,u.z),v-h>=0?(t(v-h,g,p),d.subVectors(u,p)):(t(v+h,g,p),d.subVectors(p,u)),g-h>=0?(t(v,g-h,p),f.subVectors(u,p)):(t(v,g+h,p),f.subVectors(p,u)),l.crossVectors(d,f).normalize(),s.push(l.x,l.y,l.z),c.push(v,g)}}for(n=0;n<i;n++)for(r=0;r<e;r++){var y=n*m+r,x=n*m+r+1,b=(n+1)*m+r+1,w=(n+1)*m+r;a.push(y,x,w),a.push(x,b,w)}this.setIndex(a),this.addAttribute("position",new gt(o,3)),this.addAttribute("normal",new gt(s,3)),this.addAttribute("uv",new gt(c,2))}function Ki(t,e,i,n){st.call(this),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},this.fromBufferGeometry(new $i(t,e,i,n)),this.mergeVertices()}function $i(t,e,i,n){bt.call(this),this.type="PolyhedronBufferGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:n},i=i||1;var r=[],a=[];function o(t,e,i,n){var r,a,o=Math.pow(2,n),c=[];for(r=0;r<=o;r++){c[r]=[];var h=t.clone().lerp(i,r/o),l=e.clone().lerp(i,r/o),u=o-r;for(a=0;a<=u;a++)c[r][a]=0===a&&r===o?h:h.clone().lerp(l,a/u)}for(r=0;r<o;r++)for(a=0;a<2*(o-r)-1;a++){var p=Math.floor(a/2);a%2==0?(s(c[r][p+1]),s(c[r+1][p]),s(c[r][p])):(s(c[r][p+1]),s(c[r+1][p+1]),s(c[r+1][p]))}}function s(t){r.push(t.x,t.y,t.z)}function c(e,i){var n=3*e;i.x=t[n+0],i.y=t[n+1],i.z=t[n+2]}function h(t,e,i,n){n<0&&1===t.x&&(a[e]=t.x-1),0===i.x&&0===i.z&&(a[e]=n/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}function u(t){return Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))}!function(t){for(var i=new _,n=new _,r=new _,a=0;a<e.length;a+=3)c(e[a+0],i),c(e[a+1],n),c(e[a+2],r),o(i,n,r,t)}(n=n||0),function(t){for(var e=new _,i=0;i<r.length;i+=3)e.x=r[i+0],e.y=r[i+1],e.z=r[i+2],e.normalize().multiplyScalar(t),r[i+0]=e.x,r[i+1]=e.y,r[i+2]=e.z}(i),function(){for(var t=new _,e=0;e<r.length;e+=3){t.x=r[e+0],t.y=r[e+1],t.z=r[e+2];var i=l(t)/2/Math.PI+.5,n=u(t)/Math.PI+.5;a.push(i,1-n)}(function(){for(var t=new _,e=new _,i=new _,n=new _,o=new v,s=new v,c=new v,u=0,p=0;u<r.length;u+=9,p+=6){t.set(r[u+0],r[u+1],r[u+2]),e.set(r[u+3],r[u+4],r[u+5]),i.set(r[u+6],r[u+7],r[u+8]),o.set(a[p+0],a[p+1]),s.set(a[p+2],a[p+3]),c.set(a[p+4],a[p+5]),n.copy(t).add(e).add(i).divideScalar(3);var d=l(n);h(o,p+0,t,d),h(s,p+2,e,d),h(c,p+4,i,d)}})(),function(){for(var t=0;t<a.length;t+=6){var e=a[t+0],i=a[t+2],n=a[t+4],r=Math.max(e,i,n),o=Math.min(e,i,n);r>.9&&o<.1&&(e<.2&&(a[t+0]+=1),i<.2&&(a[t+2]+=1),n<.2&&(a[t+4]+=1))}}()}(),this.addAttribute("position",new gt(r,3)),this.addAttribute("normal",new gt(r.slice(),3)),this.addAttribute("uv",new gt(a,2)),0===n?this.computeVertexNormals():this.normalizeNormals()}function tn(t,e){st.call(this),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new en(t,e)),this.mergeVertices()}function en(t,e){$i.call(this,[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],t,e),this.type="TetrahedronBufferGeometry",this.parameters={radius:t,detail:e}}function nn(t,e){st.call(this),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new rn(t,e)),this.mergeVertices()}function rn(t,e){$i.call(this,[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],t,e),this.type="OctahedronBufferGeometry",this.parameters={radius:t,detail:e}}function an(t,e){st.call(this),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new on(t,e)),this.mergeVertices()}function on(t,e){var i=(1+Math.sqrt(5))/2,n=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1];$i.call(this,n,[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],t,e),this.type="IcosahedronBufferGeometry",this.parameters={radius:t,detail:e}}function sn(t,e){st.call(this),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e},this.fromBufferGeometry(new cn(t,e)),this.mergeVertices()}function cn(t,e){var i=(1+Math.sqrt(5))/2,n=1/i,r=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-n,-i,0,-n,i,0,n,-i,0,n,i,-n,-i,0,-n,i,0,n,-i,0,n,i,0,-i,0,-n,i,0,-n,-i,0,n,i,0,n];$i.call(this,r,[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronBufferGeometry",this.parameters={radius:t,detail:e}}function hn(t,e,i,n,r,a){st.call(this),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},void 0!==a&&console.warn("THREE.TubeGeometry: taper has been removed.");var o=new ln(t,e,i,n,r);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals,this.fromBufferGeometry(o),this.mergeVertices()}function ln(t,e,i,n,r){bt.call(this),this.type="TubeBufferGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:n,closed:r},e=e||64,i=i||1,n=n||8,r=r||!1;var a=t.computeFrenetFrames(e,r);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;var o,s,c=new _,h=new _,l=new v,u=new _,p=[],d=[],f=[],m=[];function g(r){u=t.getPointAt(r/e,u);var o=a.normals[r],l=a.binormals[r];for(s=0;s<=n;s++){var f=s/n*Math.PI*2,m=Math.sin(f),g=-Math.cos(f);h.x=g*o.x+m*l.x,h.y=g*o.y+m*l.y,h.z=g*o.z+m*l.z,h.normalize(),d.push(h.x,h.y,h.z),c.x=u.x+i*h.x,c.y=u.y+i*h.y,c.z=u.z+i*h.z,p.push(c.x,c.y,c.z)}}!function(){for(o=0;o<e;o++)g(o);g(!1===r?e:0),function(){for(o=0;o<=e;o++)for(s=0;s<=n;s++)l.x=o/e,l.y=s/n,f.push(l.x,l.y)}(),function(){for(s=1;s<=e;s++)for(o=1;o<=n;o++){var t=(n+1)*(s-1)+(o-1),i=(n+1)*s+(o-1),r=(n+1)*s+o,a=(n+1)*(s-1)+o;m.push(t,i,a),m.push(i,r,a)}}()}(),this.setIndex(m),this.addAttribute("position",new gt(p,3)),this.addAttribute("normal",new gt(d,3)),this.addAttribute("uv",new gt(f,2))}function un(t,e,i,n,r,a,o){st.call(this),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:a},void 0!==o&&console.warn("THREE.TorusKnotGeometry: heightScale has been deprecated. Use .scale( x, y, z ) instead."),this.fromBufferGeometry(new pn(t,e,i,n,r,a)),this.mergeVertices()}function pn(t,e,i,n,r,a){bt.call(this),this.type="TorusKnotBufferGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:n,p:r,q:a},t=t||1,e=e||.4,i=Math.floor(i)||64,n=Math.floor(n)||8,r=r||2,a=a||3;var o,s,c=[],h=[],l=[],u=[],p=new _,d=new _,f=new _,m=new _,g=new _,v=new _,y=new _;for(o=0;o<=i;++o){var x=o/i*r*Math.PI*2;for(R(x,r,a,t,f),R(x+.01,r,a,t,m),v.subVectors(m,f),y.addVectors(m,f),g.crossVectors(v,y),y.crossVectors(g,v),g.normalize(),y.normalize(),s=0;s<=n;++s){var b=s/n*Math.PI*2,w=-e*Math.cos(b),M=e*Math.sin(b);p.x=f.x+(w*y.x+M*g.x),p.y=f.y+(w*y.y+M*g.y),p.z=f.z+(w*y.z+M*g.z),h.push(p.x,p.y,p.z),d.subVectors(p,f).normalize(),l.push(d.x,d.y,d.z),u.push(o/i),u.push(s/n)}}for(s=1;s<=i;s++)for(o=1;o<=n;o++){var E=(n+1)*(s-1)+(o-1),T=(n+1)*s+(o-1),S=(n+1)*s+o,A=(n+1)*(s-1)+o;c.push(E,T,A),c.push(T,S,A)}function R(t,e,i,n,r){var a=Math.cos(t),o=Math.sin(t),s=i/e*t,c=Math.cos(s);r.x=n*(2+c)*.5*a,r.y=n*(2+c)*o*.5,r.z=n*Math.sin(s)*.5}this.setIndex(c),this.addAttribute("position",new gt(h,3)),this.addAttribute("normal",new gt(l,3)),this.addAttribute("uv",new gt(u,2))}function dn(t,e,i,n,r){st.call(this),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},this.fromBufferGeometry(new fn(t,e,i,n,r)),this.mergeVertices()}function fn(t,e,i,n,r){bt.call(this),this.type="TorusBufferGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:n,arc:r},t=t||1,e=e||.4,i=Math.floor(i)||8,n=Math.floor(n)||6,r=r||2*Math.PI;var a,o,s=[],c=[],h=[],l=[],u=new _,p=new _,d=new _;for(a=0;a<=i;a++)for(o=0;o<=n;o++){var f=o/n*r,m=a/i*Math.PI*2;p.x=(t+e*Math.cos(m))*Math.cos(f),p.y=(t+e*Math.cos(m))*Math.sin(f),p.z=e*Math.sin(m),c.push(p.x,p.y,p.z),u.x=t*Math.cos(f),u.y=t*Math.sin(f),d.subVectors(p,u).normalize(),h.push(d.x,d.y,d.z),l.push(o/n),l.push(a/i)}for(a=1;a<=i;a++)for(o=1;o<=n;o++){var g=(n+1)*a+o-1,v=(n+1)*(a-1)+o-1,y=(n+1)*(a-1)+o,x=(n+1)*a+o;s.push(g,v,x),s.push(v,y,x)}this.setIndex(s),this.addAttribute("position",new gt(c,3)),this.addAttribute("normal",new gt(h,3)),this.addAttribute("uv",new gt(l,2))}vi.prototype=Object.create(Nt.prototype),vi.prototype.constructor=vi,vi.prototype.isMeshDepthMaterial=!0,vi.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.depthPacking=t.depthPacking,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this},yi.prototype=Object.create(Nt.prototype),yi.prototype.constructor=yi,yi.prototype.isMeshDistanceMaterial=!0,yi.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this},_i.prototype=Object.create(R.prototype),_i.prototype.constructor=_i,_i.prototype.isCanvasTexture=!0,Ti.prototype=Object.assign(Object.create(et.prototype),{constructor:Ti,isPerspectiveCamera:!0,copy:function(t,e){return et.prototype.copy.call(this,t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this},setFocalLength:function(t){var e=.5*this.getFilmHeight()/t;this.fov=2*g.RAD2DEG*Math.atan(e),this.updateProjectionMatrix()},getFocalLength:function(){var t=Math.tan(.5*g.DEG2RAD*this.fov);return.5*this.getFilmHeight()/t},getEffectiveFOV:function(){return 2*g.RAD2DEG*Math.atan(Math.tan(.5*g.DEG2RAD*this.fov)/this.zoom)},getFilmWidth:function(){return this.filmGauge*Math.min(this.aspect,1)},getFilmHeight:function(){return this.filmGauge/Math.max(this.aspect,1)},setViewOffset:function(t,e,i,n,r,a){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=n,this.view.width=r,this.view.height=a,this.updateProjectionMatrix()},clearViewOffset:function(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()},updateProjectionMatrix:function(){var t=this.near,e=t*Math.tan(.5*g.DEG2RAD*this.fov)/this.zoom,i=2*e,n=this.aspect*i,r=-.5*n,a=this.view;if(null!==this.view&&this.view.enabled){var o=a.fullWidth,s=a.fullHeight;r+=a.offsetX*n/o,e-=a.offsetY*i/s,n*=a.width/o,i*=a.height/s}var c=this.filmOffset;0!==c&&(r+=t*c/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+n,e,e-i,t,this.far)},toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}),Si.prototype=Object.assign(Object.create(Ti.prototype),{constructor:Si,isArrayCamera:!0}),Pi.prototype.isFogExp2=!0,Pi.prototype.clone=function(){return new Pi(this.color,this.density)},Pi.prototype.toJSON=function(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}},Ci.prototype.isFog=!0,Ci.prototype.clone=function(){return new Ci(this.color,this.near,this.far)},Ci.prototype.toJSON=function(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}},Oi.prototype=Object.assign(Object.create(tt.prototype),{constructor:Oi,copy:function(t,e){return tt.prototype.copy.call(this,t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this},toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);return null!==this.background&&(e.object.background=this.background.toJSON(t)),null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}}),Ii.prototype=Object.create(Nt.prototype),Ii.prototype.constructor=Ii,Ii.prototype.isSpriteMaterial=!0,Ii.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.rotation=t.rotation,this},Ni.prototype=Object.assign(Object.create(tt.prototype),{constructor:Ni,isSprite:!0,raycast:(ai=new _,oi=new _,si=new _,function(t,e){oi.setFromMatrixPosition(this.matrixWorld),t.ray.closestPointToPoint(oi,ai),si.setFromMatrixScale(this.matrixWorld);var i=si.x*si.y/4;if(!(oi.distanceToSquared(ai)>i)){var n=t.ray.origin.distanceTo(ai);n<t.near||n>t.far||e.push({distance:n,point:ai.clone(),face:null,object:this})}}),clone:function(){return new this.constructor(this.material).copy(this)},copy:function(t){return tt.prototype.copy.call(this,t),void 0!==t.center&&this.center.copy(t.center),this}}),Di.prototype=Object.assign(Object.create(tt.prototype),{constructor:Di,copy:function(t){tt.prototype.copy.call(this,t,!1);for(var e=t.levels,i=0,n=e.length;i<n;i++){var r=e[i];this.addLevel(r.object.clone(),r.distance)}return this},addLevel:function(t,e){void 0===e&&(e=0),e=Math.abs(e);for(var i=this.levels,n=0;n<i.length&&!(e<i[n].distance);n++);i.splice(n,0,{distance:e,object:t}),this.add(t)},getObjectForDistance:function(t){for(var e=this.levels,i=1,n=e.length;i<n&&!(t<e[i].distance);i++);return e[i-1].object},raycast:(ci=new _,function(t,e){ci.setFromMatrixPosition(this.matrixWorld);var i=t.ray.origin.distanceTo(ci);this.getObjectForDistance(i).raycast(t,e)}),update:function(){var t=new _,e=new _;return function(i){var n=this.levels;if(n.length>1){t.setFromMatrixPosition(i.matrixWorld),e.setFromMatrixPosition(this.matrixWorld);var r=t.distanceTo(e);n[0].object.visible=!0;for(var a=1,o=n.length;a<o&&r>=n[a].distance;a++)n[a-1].object.visible=!1,n[a].object.visible=!0;for(;a<o;a++)n[a].object.visible=!1}}}(),toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);e.object.levels=[];for(var i=this.levels,n=0,r=i.length;n<r;n++){var a=i[n];e.object.levels.push({object:a.object.uuid,distance:a.distance})}return e}}),Object.assign(Ui.prototype,{calculateInverses:function(){this.boneInverses=[];for(var t=0,e=this.bones.length;t<e;t++){var i=new y;this.bones[t]&&i.getInverse(this.bones[t].matrixWorld),this.boneInverses.push(i)}},pose:function(){var t,e,i;for(e=0,i=this.bones.length;e<i;e++)(t=this.bones[e])&&t.matrixWorld.getInverse(this.boneInverses[e]);for(e=0,i=this.bones.length;e<i;e++)(t=this.bones[e])&&(t.parent&&t.parent.isBone?(t.matrix.getInverse(t.parent.matrixWorld),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))},update:(hi=new y,li=new y,function(){for(var t=this.bones,e=this.boneInverses,i=this.boneMatrices,n=this.boneTexture,r=0,a=t.length;r<a;r++){var o=t[r]?t[r].matrixWorld:li;hi.multiplyMatrices(o,e[r]),hi.toArray(i,16*r)}void 0!==n&&(n.needsUpdate=!0)}),clone:function(){return new Ui(this.bones,this.boneInverses)},getBoneByName:function(t){for(var e=0,i=this.bones.length;e<i;e++){var n=this.bones[e];if(n.name===t)return n}}}),zi.prototype=Object.assign(Object.create(tt.prototype),{constructor:zi,isBone:!0}),Bi.prototype=Object.assign(Object.create(Gt.prototype),{constructor:Bi,isSkinnedMesh:!0,initBones:function(){var t,e,i,n,r=[];if(this.geometry&&void 0!==this.geometry.bones){for(i=0,n=this.geometry.bones.length;i<n;i++)e=this.geometry.bones[i],t=new zi,r.push(t),t.name=e.name,t.position.fromArray(e.pos),t.quaternion.fromArray(e.rotq),void 0!==e.scl&&t.scale.fromArray(e.scl);for(i=0,n=this.geometry.bones.length;i<n;i++)-1!==(e=this.geometry.bones[i]).parent&&null!==e.parent&&void 0!==r[e.parent]?r[e.parent].add(r[i]):this.add(r[i])}return this.updateMatrixWorld(!0),r},bind:function(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.getInverse(e)},pose:function(){this.skeleton.pose()},normalizeSkinWeights:function(){var t,e;if(this.geometry&&this.geometry.isGeometry)for(e=0;e<this.geometry.skinWeights.length;e++){var i=this.geometry.skinWeights[e];(t=1/i.manhattanLength())!==1/0?i.multiplyScalar(t):i.set(1,0,0,0)}else if(this.geometry&&this.geometry.isBufferGeometry){var n=new L,r=this.geometry.attributes.skinWeight;for(e=0;e<r.count;e++)n.x=r.getX(e),n.y=r.getY(e),n.z=r.getZ(e),n.w=r.getW(e),(t=1/n.manhattanLength())!==1/0?n.multiplyScalar(t):n.set(1,0,0,0),r.setXYZW(e,n.x,n.y,n.z,n.w)}},updateMatrixWorld:function(t){Gt.prototype.updateMatrixWorld.call(this,t),"attached"===this.bindMode?this.bindMatrixInverse.getInverse(this.matrixWorld):"detached"===this.bindMode?this.bindMatrixInverse.getInverse(this.bindMatrix):console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)},clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Fi.prototype=Object.create(Nt.prototype),Fi.prototype.constructor=Fi,Fi.prototype.isLineBasicMaterial=!0,Fi.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this},Gi.prototype=Object.assign(Object.create(tt.prototype),{constructor:Gi,isLine:!0,computeLineDistances:(ui=new _,pi=new _,function(){var t=this.geometry;if(t.isBufferGeometry)if(null===t.index){for(var e=t.attributes.position,i=[0],n=1,r=e.count;n<r;n++)ui.fromBufferAttribute(e,n-1),pi.fromBufferAttribute(e,n),i[n]=i[n-1],i[n]+=ui.distanceTo(pi);t.addAttribute("lineDistance",new gt(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(t.isGeometry){var a=t.vertices;for((i=t.lineDistances)[0]=0,n=1,r=a.length;n<r;n++)i[n]=i[n-1],i[n]+=a[n-1].distanceTo(a[n])}return this}),raycast:function(){var t=new y,e=new zt,i=new N;return function(n,r){var a=n.linePrecision,o=a*a,s=this.geometry,c=this.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),i.copy(s.boundingSphere),i.applyMatrix4(c),!1!==n.ray.intersectsSphere(i)){t.getInverse(c),e.copy(n.ray).applyMatrix4(t);var h=new _,l=new _,u=new _,p=new _,d=this&&this.isLineSegments?2:1;if(s.isBufferGeometry){var f=s.index,m=s.attributes.position.array;if(null!==f)for(var g=f.array,v=0,y=g.length-1;v<y;v+=d){var x=g[v],b=g[v+1];if(h.fromArray(m,3*x),l.fromArray(m,3*b),!(e.distanceSqToSegment(h,l,p,u)>o))p.applyMatrix4(this.matrixWorld),(E=n.ray.origin.distanceTo(p))<n.near||E>n.far||r.push({distance:E,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}else for(v=0,y=m.length/3-1;v<y;v+=d){if(h.fromArray(m,3*v),l.fromArray(m,3*v+3),!(e.distanceSqToSegment(h,l,p,u)>o))p.applyMatrix4(this.matrixWorld),(E=n.ray.origin.distanceTo(p))<n.near||E>n.far||r.push({distance:E,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}else if(s.isGeometry){var w=s.vertices,M=w.length;for(v=0;v<M-1;v+=d){var E;if(!(e.distanceSqToSegment(w[v],w[v+1],p,u)>o))p.applyMatrix4(this.matrixWorld),(E=n.ray.origin.distanceTo(p))<n.near||E>n.far||r.push({distance:E,point:u.clone().applyMatrix4(this.matrixWorld),index:v,face:null,faceIndex:null,object:this})}}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Hi.prototype=Object.assign(Object.create(Gi.prototype),{constructor:Hi,isLineSegments:!0,computeLineDistances:function(){var t=new _,e=new _;return function(){var i=this.geometry;if(i.isBufferGeometry)if(null===i.index){for(var n=i.attributes.position,r=[],a=0,o=n.count;a<o;a+=2)t.fromBufferAttribute(n,a),e.fromBufferAttribute(n,a+1),r[a]=0===a?0:r[a-1],r[a+1]=r[a]+t.distanceTo(e);i.addAttribute("lineDistance",new gt(r,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else if(i.isGeometry){var s=i.vertices;for(r=i.lineDistances,a=0,o=s.length;a<o;a+=2)t.copy(s[a]),e.copy(s[a+1]),r[a]=0===a?0:r[a-1],r[a+1]=r[a]+t.distanceTo(e)}return this}}()}),Vi.prototype=Object.assign(Object.create(Gi.prototype),{constructor:Vi,isLineLoop:!0}),ki.prototype=Object.create(Nt.prototype),ki.prototype.constructor=ki,ki.prototype.isPointsMaterial=!0,ki.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.morphTargets=t.morphTargets,this},ji.prototype=Object.assign(Object.create(tt.prototype),{constructor:ji,isPoints:!0,raycast:function(){var t=new y,e=new zt,i=new N;return function(n,r){var a=this,o=this.geometry,s=this.matrixWorld,c=n.params.Points.threshold;if(null===o.boundingSphere&&o.computeBoundingSphere(),i.copy(o.boundingSphere),i.applyMatrix4(s),i.radius+=c,!1!==n.ray.intersectsSphere(i)){t.getInverse(s),e.copy(n.ray).applyMatrix4(t);var h=c/((this.scale.x+this.scale.y+this.scale.z)/3),l=h*h,u=new _,p=new _;if(o.isBufferGeometry){var d=o.index,f=o.attributes.position.array;if(null!==d)for(var m=d.array,g=0,v=m.length;g<v;g++){var y=m[g];u.fromArray(f,3*y),w(u,y)}else{g=0;for(var x=f.length/3;g<x;g++)u.fromArray(f,3*g),w(u,g)}}else{var b=o.vertices;for(g=0,x=b.length;g<x;g++)w(b[g],g)}}function w(t,i){var o=e.distanceSqToPoint(t);if(o<l){e.closestPointToPoint(t,p),p.applyMatrix4(s);var c=n.ray.origin.distanceTo(p);if(c<n.near||c>n.far)return;r.push({distance:c,distanceToRay:Math.sqrt(o),point:p.clone(),index:i,face:null,object:a})}}}}(),clone:function(){return new this.constructor(this.geometry,this.material).copy(this)}}),Wi.prototype=Object.assign(Object.create(tt.prototype),{constructor:Wi,isGroup:!0}),Xi.prototype=Object.assign(Object.create(R.prototype),{constructor:Xi,isVideoTexture:!0,update:function(){var t=this.image;t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}),qi.prototype=Object.create(R.prototype),qi.prototype.constructor=qi,qi.prototype.isCompressedTexture=!0,Yi.prototype=Object.create(R.prototype),Yi.prototype.constructor=Yi,Yi.prototype.isDepthTexture=!0,Zi.prototype=Object.create(bt.prototype),Zi.prototype.constructor=Zi,Ji.prototype=Object.create(st.prototype),Ji.prototype.constructor=Ji,Qi.prototype=Object.create(bt.prototype),Qi.prototype.constructor=Qi,Ki.prototype=Object.create(st.prototype),Ki.prototype.constructor=Ki,$i.prototype=Object.create(bt.prototype),$i.prototype.constructor=$i,tn.prototype=Object.create(st.prototype),tn.prototype.constructor=tn,en.prototype=Object.create($i.prototype),en.prototype.constructor=en,nn.prototype=Object.create(st.prototype),nn.prototype.constructor=nn,rn.prototype=Object.create($i.prototype),rn.prototype.constructor=rn,an.prototype=Object.create(st.prototype),an.prototype.constructor=an,on.prototype=Object.create($i.prototype),on.prototype.constructor=on,sn.prototype=Object.create(st.prototype),sn.prototype.constructor=sn,cn.prototype=Object.create($i.prototype),cn.prototype.constructor=cn,hn.prototype=Object.create(st.prototype),hn.prototype.constructor=hn,ln.prototype=Object.create(bt.prototype),ln.prototype.constructor=ln,un.prototype=Object.create(st.prototype),un.prototype.constructor=un,pn.prototype=Object.create(bt.prototype),pn.prototype.constructor=pn,dn.prototype=Object.create(st.prototype),dn.prototype.constructor=dn,fn.prototype=Object.create(bt.prototype),fn.prototype.constructor=fn;var mn=function(t,e,i){i=i||2;var n,r,a,o,s,c,h,l=e&&e.length,u=l?e[0]*i:t.length,p=gn(t,0,u,i,!0),d=[];if(!p)return d;if(l&&(p=function(t,e,i,n){var r,a,o,s,c,h=[];for(r=0,a=e.length;r<a;r++)o=e[r]*n,s=r<a-1?e[r+1]*n:t.length,(c=gn(t,o,s,n,!1))===c.next&&(c.steiner=!0),h.push(Sn(c));for(h.sort(Mn),r=0;r<h.length;r++)En(h[r],i),i=vn(i,i.next);return i}(t,e,p,i)),t.length>80*i){n=a=t[0],r=o=t[1];for(var f=i;f<u;f+=i)(s=t[f])<n&&(n=s),(c=t[f+1])<r&&(r=c),s>a&&(a=s),c>o&&(o=c);h=0!==(h=Math.max(a-n,o-r))?1/h:0}return yn(p,d,i,n,r,h),d};function gn(t,e,i,n,r){var a,o;if(r===function(t,e,i,n){for(var r=0,a=e,o=i-n;a<i;a+=n)r+=(t[o]-t[a])*(t[a+1]+t[o+1]),o=a;return r}(t,e,i,n)>0)for(a=e;a<i;a+=n)o=Nn(a,t[a],t[a+1],o);else for(a=i-n;a>=e;a-=n)o=Nn(a,t[a],t[a+1],o);return o&&Pn(o,o.next)&&(Dn(o),o=o.next),o}function vn(t,e){if(!t)return t;e||(e=t);var i,n=t;do{if(i=!1,n.steiner||!Pn(n,n.next)&&0!==Ln(n.prev,n,n.next))n=n.next;else{if(Dn(n),(n=e=n.prev)===n.next)break;i=!0}}while(i||n!==e);return e}function yn(t,e,i,n,r,a,o){if(t){!o&&a&&function(t,e,i,n){var r=t;do{null===r.z&&(r.z=Tn(r.x,r.y,e,i,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,i,n,r,a,o,s,c,h=1;do{for(i=t,t=null,a=null,o=0;i;){for(o++,n=i,s=0,e=0;e<h&&(s++,n=n.nextZ);e++);for(c=h;s>0||c>0&&n;)0!==s&&(0===c||!n||i.z<=n.z)?(r=i,i=i.nextZ,s--):(r=n,n=n.nextZ,c--),a?a.nextZ=r:t=r,r.prevZ=a,a=r;i=n}a.nextZ=null,h*=2}while(o>1)}(r)}(t,n,r,a);for(var s,c,h=t;t.prev!==t.next;)if(s=t.prev,c=t.next,a?_n(t,n,r,a):xn(t))e.push(s.i/i),e.push(t.i/i),e.push(c.i/i),Dn(t),t=c.next,h=c.next;else if((t=c)===h){o?1===o?yn(t=bn(t,e,i),e,i,n,r,a,2):2===o&&wn(t,e,i,n,r,a):yn(vn(t),e,i,n,r,a,1);break}}}function xn(t){var e=t.prev,i=t,n=t.next;if(Ln(e,i,n)>=0)return!1;for(var r=t.next.next;r!==t.prev;){if(An(e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y)&&Ln(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function _n(t,e,i,n){var r=t.prev,a=t,o=t.next;if(Ln(r,a,o)>=0)return!1;for(var s=r.x<a.x?r.x<o.x?r.x:o.x:a.x<o.x?a.x:o.x,c=r.y<a.y?r.y<o.y?r.y:o.y:a.y<o.y?a.y:o.y,h=r.x>a.x?r.x>o.x?r.x:o.x:a.x>o.x?a.x:o.x,l=r.y>a.y?r.y>o.y?r.y:o.y:a.y>o.y?a.y:o.y,u=Tn(s,c,e,i,n),p=Tn(h,l,e,i,n),d=t.nextZ;d&&d.z<=p;){if(d!==t.prev&&d!==t.next&&An(r.x,r.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ln(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(d=t.prevZ;d&&d.z>=u;){if(d!==t.prev&&d!==t.next&&An(r.x,r.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Ln(d.prev,d,d.next)>=0)return!1;d=d.prevZ}return!0}function bn(t,e,i){var n=t;do{var r=n.prev,a=n.next.next;!Pn(r,a)&&Cn(r,n,n.next,a)&&On(r,a)&&On(a,r)&&(e.push(r.i/i),e.push(n.i/i),e.push(a.i/i),Dn(n),Dn(n.next),n=t=a),n=n.next}while(n!==t);return n}function wn(t,e,i,n,r,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Rn(o,s)){var c=In(o,s);return o=vn(o,o.next),c=vn(c,c.next),yn(o,e,i,n,r,a),void yn(c,e,i,n,r,a)}s=s.next}o=o.next}while(o!==t)}function Mn(t,e){return t.x-e.x}function En(t,e){if(e=function(t,e){var i,n=e,r=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=r&&s>o){if(o=s,s===r){if(a===n.y)return n;if(a===n.next.y)return n.next}i=n.x<n.next.x?n:n.next}}n=n.next}while(n!==e);if(!i)return null;if(r===o)return i.prev;var c,h=i,l=i.x,u=i.y,p=1/0;n=i.next;for(;n!==h;)r>=n.x&&n.x>=l&&r!==n.x&&An(a<u?r:o,a,l,u,a<u?o:r,a,n.x,n.y)&&((c=Math.abs(a-n.y)/(r-n.x))<p||c===p&&n.x>i.x)&&On(n,t)&&(i=n,p=c),n=n.next;return i}(t,e)){var i=In(e,t);vn(i,i.next)}}function Tn(t,e,i,n,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*r)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Sn(t){var e=t,i=t;do{e.x<i.x&&(i=e),e=e.next}while(e!==t);return i}function An(t,e,i,n,r,a,o,s){return(r-o)*(e-s)-(t-o)*(a-s)>=0&&(t-o)*(n-s)-(i-o)*(e-s)>=0&&(i-o)*(a-s)-(r-o)*(n-s)>=0}function Rn(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&Cn(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(t,e)&&On(t,e)&&On(e,t)&&function(t,e){var i=t,n=!1,r=(t.x+e.x)/2,a=(t.y+e.y)/2;do{i.y>a!=i.next.y>a&&i.next.y!==i.y&&r<(i.next.x-i.x)*(a-i.y)/(i.next.y-i.y)+i.x&&(n=!n),i=i.next}while(i!==t);return n}(t,e)}function Ln(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function Pn(t,e){return t.x===e.x&&t.y===e.y}function Cn(t,e,i,n){return!!(Pn(t,e)&&Pn(i,n)||Pn(t,n)&&Pn(i,e))||Ln(t,e,i)>0!=Ln(t,e,n)>0&&Ln(i,n,t)>0!=Ln(i,n,e)>0}function On(t,e){return Ln(t.prev,t,t.next)<0?Ln(t,e,t.next)>=0&&Ln(t,t.prev,e)>=0:Ln(t,e,t.prev)<0||Ln(t,t.next,e)<0}function In(t,e){var i=new Un(t.i,t.x,t.y),n=new Un(e.i,e.x,e.y),r=t.next,a=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,n.next=i,i.prev=n,a.next=n,n.prev=a,n}function Nn(t,e,i,n){var r=new Un(t,e,i);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function Dn(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Un(t,e,i){this.i=t,this.x=e,this.y=i,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var zn={area:function(t){for(var e=t.length,i=0,n=e-1,r=0;r<e;n=r++)i+=t[n].x*t[r].y-t[r].x*t[n].y;return.5*i},isClockWise:function(t){return zn.area(t)<0},triangulateShape:function(t,e){var i=[],n=[],r=[];Bn(t),Fn(i,t);var a=t.length;e.forEach(Bn);for(var o=0;o<e.length;o++)n.push(a),a+=e[o].length,Fn(i,e[o]);var s=mn(i,n);for(o=0;o<s.length;o+=3)r.push(s.slice(o,o+3));return r}};function Bn(t){var e=t.length;e>2&&t[e-1].equals(t[0])&&t.pop()}function Fn(t,e){for(var i=0;i<e.length;i++)t.push(e[i].x),t.push(e[i].y)}function Gn(t,e){st.call(this),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},this.fromBufferGeometry(new Hn(t,e)),this.mergeVertices()}function Hn(t,e){bt.call(this),this.type="ExtrudeBufferGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];for(var i=this,n=[],r=[],a=0,o=t.length;a<o;a++){s(t[a])}function s(t){var a=[],o=void 0!==e.curveSegments?e.curveSegments:12,s=void 0!==e.steps?e.steps:1,c=void 0!==e.depth?e.depth:100,h=void 0===e.bevelEnabled||e.bevelEnabled,l=void 0!==e.bevelThickness?e.bevelThickness:6,u=void 0!==e.bevelSize?e.bevelSize:l-2,p=void 0!==e.bevelSegments?e.bevelSegments:3,d=e.extrudePath,f=void 0!==e.UVGenerator?e.UVGenerator:Vn;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),c=e.amount);var m,g,y,x,b,w,M,E,T=!1;d&&(m=d.getSpacedPoints(s),T=!0,h=!1,g=d.computeFrenetFrames(s,!1),y=new _,x=new _,b=new _),h||(p=0,l=0,u=0);var S=t.extractPoints(o),A=S.shape,R=S.holes;if(!zn.isClockWise(A))for(A=A.reverse(),M=0,E=R.length;M<E;M++)w=R[M],zn.isClockWise(w)&&(R[M]=w.reverse());var L=zn.triangulateShape(A,R),P=A;for(M=0,E=R.length;M<E;M++)w=R[M],A=A.concat(w);function C(t,e,i){return e||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().multiplyScalar(i).add(t)}var O,I,N,D,U,z,B=A.length,F=L.length;function G(t,e,i){var n,r,a,o=t.x-e.x,s=t.y-e.y,c=i.x-t.x,h=i.y-t.y,l=o*o+s*s,u=o*h-s*c;if(Math.abs(u)>Number.EPSILON){var p=Math.sqrt(l),d=Math.sqrt(c*c+h*h),f=e.x-s/p,m=e.y+o/p,g=((i.x-h/d-f)*h-(i.y+c/d-m)*c)/(o*h-s*c),y=(n=f+o*g-t.x)*n+(r=m+s*g-t.y)*r;if(y<=2)return new v(n,r);a=Math.sqrt(y/2)}else{var x=!1;o>Number.EPSILON?c>Number.EPSILON&&(x=!0):o<-Number.EPSILON?c<-Number.EPSILON&&(x=!0):Math.sign(s)===Math.sign(h)&&(x=!0),x?(n=-s,r=o,a=Math.sqrt(l)):(n=o,r=s,a=Math.sqrt(l/2))}return new v(n/a,r/a)}for(var H=[],V=0,k=P.length,j=k-1,W=V+1;V<k;V++,j++,W++)j===k&&(j=0),W===k&&(W=0),H[V]=G(P[V],P[j],P[W]);var X,q,Y=[],Z=H.concat();for(M=0,E=R.length;M<E;M++){for(w=R[M],X=[],V=0,j=(k=w.length)-1,W=V+1;V<k;V++,j++,W++)j===k&&(j=0),W===k&&(W=0),X[V]=G(w[V],w[j],w[W]);Y.push(X),Z=Z.concat(X)}for(O=0;O<p;O++){for(N=O/p,D=l*Math.cos(N*Math.PI/2),I=u*Math.sin(N*Math.PI/2),V=0,k=P.length;V<k;V++)Q((U=C(P[V],H[V],I)).x,U.y,-D);for(M=0,E=R.length;M<E;M++)for(w=R[M],X=Y[M],V=0,k=w.length;V<k;V++)Q((U=C(w[V],X[V],I)).x,U.y,-D)}for(I=u,V=0;V<B;V++)U=h?C(A[V],Z[V],I):A[V],T?(x.copy(g.normals[0]).multiplyScalar(U.x),y.copy(g.binormals[0]).multiplyScalar(U.y),b.copy(m[0]).add(x).add(y),Q(b.x,b.y,b.z)):Q(U.x,U.y,0);for(q=1;q<=s;q++)for(V=0;V<B;V++)U=h?C(A[V],Z[V],I):A[V],T?(x.copy(g.normals[q]).multiplyScalar(U.x),y.copy(g.binormals[q]).multiplyScalar(U.y),b.copy(m[q]).add(x).add(y),Q(b.x,b.y,b.z)):Q(U.x,U.y,c/s*q);for(O=p-1;O>=0;O--){for(N=O/p,D=l*Math.cos(N*Math.PI/2),I=u*Math.sin(N*Math.PI/2),V=0,k=P.length;V<k;V++)Q((U=C(P[V],H[V],I)).x,U.y,c+D);for(M=0,E=R.length;M<E;M++)for(w=R[M],X=Y[M],V=0,k=w.length;V<k;V++)U=C(w[V],X[V],I),T?Q(U.x,U.y+m[s-1].y,m[s-1].x+D):Q(U.x,U.y,c+D)}function J(t,e){var i,n;for(V=t.length;--V>=0;){i=V,(n=V-1)<0&&(n=t.length-1);var r=0,a=s+2*p;for(r=0;r<a;r++){var o=B*r,c=B*(r+1);$(e+i+o,e+n+o,e+n+c,e+i+c)}}}function Q(t,e,i){a.push(t),a.push(e),a.push(i)}function K(t,e,r){tt(t),tt(e),tt(r);var a=n.length/3,o=f.generateTopUV(i,n,a-3,a-2,a-1);et(o[0]),et(o[1]),et(o[2])}function $(t,e,r,a){tt(t),tt(e),tt(a),tt(e),tt(r),tt(a);var o=n.length/3,s=f.generateSideWallUV(i,n,o-6,o-3,o-2,o-1);et(s[0]),et(s[1]),et(s[3]),et(s[1]),et(s[2]),et(s[3])}function tt(t){n.push(a[3*t+0]),n.push(a[3*t+1]),n.push(a[3*t+2])}function et(t){r.push(t.x),r.push(t.y)}!function(){var t=n.length/3;if(h){var e=0,r=B*e;for(V=0;V<F;V++)K((z=L[V])[2]+r,z[1]+r,z[0]+r);for(r=B*(e=s+2*p),V=0;V<F;V++)K((z=L[V])[0]+r,z[1]+r,z[2]+r)}else{for(V=0;V<F;V++)K((z=L[V])[2],z[1],z[0]);for(V=0;V<F;V++)K((z=L[V])[0]+B*s,z[1]+B*s,z[2]+B*s)}i.addGroup(t,n.length/3-t,0)}(),function(){var t=n.length/3,e=0;for(J(P,e),e+=P.length,M=0,E=R.length;M<E;M++)J(w=R[M],e),e+=w.length;i.addGroup(t,n.length/3-t,1)}()}this.addAttribute("position",new gt(n,3)),this.addAttribute("uv",new gt(r,2)),this.computeVertexNormals()}Gn.prototype=Object.create(st.prototype),Gn.prototype.constructor=Gn,Gn.prototype.toJSON=function(){var t=st.prototype.toJSON.call(this);return kn(this.parameters.shapes,this.parameters.options,t)},Hn.prototype=Object.create(bt.prototype),Hn.prototype.constructor=Hn,Hn.prototype.toJSON=function(){var t=bt.prototype.toJSON.call(this);return kn(this.parameters.shapes,this.parameters.options,t)};var Vn={generateTopUV:function(t,e,i,n,r){var a=e[3*i],o=e[3*i+1],s=e[3*n],c=e[3*n+1],h=e[3*r],l=e[3*r+1];return[new v(a,o),new v(s,c),new v(h,l)]},generateSideWallUV:function(t,e,i,n,r,a){var o=e[3*i],s=e[3*i+1],c=e[3*i+2],h=e[3*n],l=e[3*n+1],u=e[3*n+2],p=e[3*r],d=e[3*r+1],f=e[3*r+2],m=e[3*a],g=e[3*a+1],y=e[3*a+2];return Math.abs(s-l)<.01?[new v(o,1-c),new v(h,1-u),new v(p,1-f),new v(m,1-y)]:[new v(s,1-c),new v(l,1-u),new v(d,1-f),new v(g,1-y)]}};function kn(t,e,i){if(i.shapes=[],Array.isArray(t))for(var n=0,r=t.length;n<r;n++){var a=t[n];i.shapes.push(a.uuid)}else i.shapes.push(t.uuid);return void 0!==e.extrudePath&&(i.options.extrudePath=e.extrudePath.toJSON()),i}function jn(t,e){st.call(this),this.type="TextGeometry",this.parameters={text:t,parameters:e},this.fromBufferGeometry(new Wn(t,e)),this.mergeVertices()}function Wn(t,e){var i=(e=e||{}).font;if(!i||!i.isFont)return console.error("THREE.TextGeometry: font parameter is not an instance of THREE.Font."),new st;var n=i.generateShapes(t,e.size,e.curveSegments);e.depth=void 0!==e.height?e.height:50,void 0===e.bevelThickness&&(e.bevelThickness=10),void 0===e.bevelSize&&(e.bevelSize=8),void 0===e.bevelEnabled&&(e.bevelEnabled=!1),Hn.call(this,n,e),this.type="TextBufferGeometry"}function Xn(t,e,i,n,r,a,o){st.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new qn(t,e,i,n,r,a,o)),this.mergeVertices()}function qn(t,e,i,n,r,a,o){bt.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:r,thetaStart:a,thetaLength:o},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=void 0!==n?n:0,r=void 0!==r?r:2*Math.PI;var s,c,h=(a=void 0!==a?a:0)+(o=void 0!==o?o:Math.PI),l=0,u=[],p=new _,d=new _,f=[],m=[],g=[],v=[];for(c=0;c<=i;c++){var y=[],x=c/i;for(s=0;s<=e;s++){var b=s/e;p.x=-t*Math.cos(n+b*r)*Math.sin(a+x*o),p.y=t*Math.cos(a+x*o),p.z=t*Math.sin(n+b*r)*Math.sin(a+x*o),m.push(p.x,p.y,p.z),d.set(p.x,p.y,p.z).normalize(),g.push(d.x,d.y,d.z),v.push(b,1-x),y.push(l++)}u.push(y)}for(c=0;c<i;c++)for(s=0;s<e;s++){var w=u[c][s+1],M=u[c][s],E=u[c+1][s],T=u[c+1][s+1];(0!==c||a>0)&&f.push(w,M,T),(c!==i-1||h<Math.PI)&&f.push(M,E,T)}this.setIndex(f),this.addAttribute("position",new gt(m,3)),this.addAttribute("normal",new gt(g,3)),this.addAttribute("uv",new gt(v,2))}function Yn(t,e,i,n,r,a){st.call(this),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:a},this.fromBufferGeometry(new Zn(t,e,i,n,r,a)),this.mergeVertices()}function Zn(t,e,i,n,r,a){bt.call(this),this.type="RingBufferGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:n,thetaStart:r,thetaLength:a},t=t||.5,e=e||1,r=void 0!==r?r:0,a=void 0!==a?a:2*Math.PI,i=void 0!==i?Math.max(3,i):8;var o,s,c,h=[],l=[],u=[],p=[],d=t,f=(e-t)/(n=void 0!==n?Math.max(1,n):1),m=new _,g=new v;for(s=0;s<=n;s++){for(c=0;c<=i;c++)o=r+c/i*a,m.x=d*Math.cos(o),m.y=d*Math.sin(o),l.push(m.x,m.y,m.z),u.push(0,0,1),g.x=(m.x/e+1)/2,g.y=(m.y/e+1)/2,p.push(g.x,g.y);d+=f}for(s=0;s<n;s++){var y=s*(i+1);for(c=0;c<i;c++){var x=o=c+y,b=o+i+1,w=o+i+2,M=o+1;h.push(x,b,M),h.push(b,w,M)}}this.setIndex(h),this.addAttribute("position",new gt(l,3)),this.addAttribute("normal",new gt(u,3)),this.addAttribute("uv",new gt(p,2))}function Jn(t,e,i,n){st.call(this),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},this.fromBufferGeometry(new Qn(t,e,i,n)),this.mergeVertices()}function Qn(t,e,i,n){bt.call(this),this.type="LatheBufferGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:n},e=Math.floor(e)||12,i=i||0,n=n||2*Math.PI,n=g.clamp(n,0,2*Math.PI);var r,a,o,s=[],c=[],h=[],l=1/e,u=new _,p=new v;for(a=0;a<=e;a++){var d=i+a*l*n,f=Math.sin(d),m=Math.cos(d);for(o=0;o<=t.length-1;o++)u.x=t[o].x*f,u.y=t[o].y,u.z=t[o].x*m,c.push(u.x,u.y,u.z),p.x=a/e,p.y=o/(t.length-1),h.push(p.x,p.y)}for(a=0;a<e;a++)for(o=0;o<t.length-1;o++){var y=r=o+a*t.length,x=r+t.length,b=r+t.length+1,w=r+1;s.push(y,x,w),s.push(x,b,w)}if(this.setIndex(s),this.addAttribute("position",new gt(c,3)),this.addAttribute("uv",new gt(h,2)),this.computeVertexNormals(),n===2*Math.PI){var M=this.attributes.normal.array,E=new _,T=new _,S=new _;for(r=e*t.length*3,a=0,o=0;a<t.length;a++,o+=3)E.x=M[o+0],E.y=M[o+1],E.z=M[o+2],T.x=M[r+o+0],T.y=M[r+o+1],T.z=M[r+o+2],S.addVectors(E,T).normalize(),M[o+0]=M[r+o+0]=S.x,M[o+1]=M[r+o+1]=S.y,M[o+2]=M[r+o+2]=S.z}}function Kn(t,e){st.call(this),this.type="ShapeGeometry","object"==typeof e&&(console.warn("THREE.ShapeGeometry: Options parameter has been removed."),e=e.curveSegments),this.parameters={shapes:t,curveSegments:e},this.fromBufferGeometry(new $n(t,e)),this.mergeVertices()}function $n(t,e){bt.call(this),this.type="ShapeBufferGeometry",this.parameters={shapes:t,curveSegments:e},e=e||12;var i=[],n=[],r=[],a=[],o=0,s=0;if(!1===Array.isArray(t))h(t);else for(var c=0;c<t.length;c++)h(t[c]),this.addGroup(o,s,c),o+=s,s=0;function h(t){var o,c,h,l=n.length/3,u=t.extractPoints(e),p=u.shape,d=u.holes;if(!1===zn.isClockWise(p))for(p=p.reverse(),o=0,c=d.length;o<c;o++)h=d[o],!0===zn.isClockWise(h)&&(d[o]=h.reverse());var f=zn.triangulateShape(p,d);for(o=0,c=d.length;o<c;o++)h=d[o],p=p.concat(h);for(o=0,c=p.length;o<c;o++){var m=p[o];n.push(m.x,m.y,0),r.push(0,0,1),a.push(m.x,m.y)}for(o=0,c=f.length;o<c;o++){var g=f[o],v=g[0]+l,y=g[1]+l,x=g[2]+l;i.push(v,y,x),s+=3}}this.setIndex(i),this.addAttribute("position",new gt(n,3)),this.addAttribute("normal",new gt(r,3)),this.addAttribute("uv",new gt(a,2))}function tr(t,e){if(e.shapes=[],Array.isArray(t))for(var i=0,n=t.length;i<n;i++){var r=t[i];e.shapes.push(r.uuid)}else e.shapes.push(t.uuid);return e}function er(t,e){bt.call(this),this.type="EdgesGeometry",this.parameters={thresholdAngle:e},e=void 0!==e?e:1;var i,n,r,a,o=[],s=Math.cos(g.DEG2RAD*e),c=[0,0],h={},l=["a","b","c"];t.isBufferGeometry?(a=new st).fromBufferGeometry(t):a=t.clone(),a.mergeVertices(),a.computeFaceNormals();for(var u=a.vertices,p=a.faces,d=0,f=p.length;d<f;d++)for(var m=p[d],v=0;v<3;v++)i=m[l[v]],n=m[l[(v+1)%3]],c[0]=Math.min(i,n),c[1]=Math.max(i,n),void 0===h[r=c[0]+","+c[1]]?h[r]={index1:c[0],index2:c[1],face1:d,face2:void 0}:h[r].face2=d;for(r in h){var y=h[r];if(void 0===y.face2||p[y.face1].normal.dot(p[y.face2].normal)<=s){var x=u[y.index1];o.push(x.x,x.y,x.z),x=u[y.index2],o.push(x.x,x.y,x.z)}}this.addAttribute("position",new gt(o,3))}function ir(t,e,i,n,r,a,o,s){st.call(this),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:a,thetaStart:o,thetaLength:s},this.fromBufferGeometry(new nr(t,e,i,n,r,a,o,s)),this.mergeVertices()}function nr(t,e,i,n,r,a,o,s){bt.call(this),this.type="CylinderBufferGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:n,heightSegments:r,openEnded:a,thetaStart:o,thetaLength:s};var c=this;t=void 0!==t?t:1,e=void 0!==e?e:1,i=i||1,n=Math.floor(n)||8,r=Math.floor(r)||1,a=void 0!==a&&a,o=void 0!==o?o:0,s=void 0!==s?s:2*Math.PI;var h=[],l=[],u=[],p=[],d=0,f=[],m=i/2,g=0;function y(i){var r,a,f,y=new v,x=new _,b=0,w=!0===i?t:e,M=!0===i?1:-1;for(a=d,r=1;r<=n;r++)l.push(0,m*M,0),u.push(0,M,0),p.push(.5,.5),d++;for(f=d,r=0;r<=n;r++){var E=r/n*s+o,T=Math.cos(E),S=Math.sin(E);x.x=w*S,x.y=m*M,x.z=w*T,l.push(x.x,x.y,x.z),u.push(0,M,0),y.x=.5*T+.5,y.y=.5*S*M+.5,p.push(y.x,y.y),d++}for(r=0;r<n;r++){var A=a+r,R=f+r;!0===i?h.push(R,R+1,A):h.push(R+1,R,A),b+=3}c.addGroup(g,b,!0===i?1:2),g+=b}!function(){var a,v,y=new _,x=new _,b=0,w=(e-t)/i;for(v=0;v<=r;v++){var M=[],E=v/r,T=E*(e-t)+t;for(a=0;a<=n;a++){var S=a/n,A=S*s+o,R=Math.sin(A),L=Math.cos(A);x.x=T*R,x.y=-E*i+m,x.z=T*L,l.push(x.x,x.y,x.z),y.set(R,w,L).normalize(),u.push(y.x,y.y,y.z),p.push(S,1-E),M.push(d++)}f.push(M)}for(a=0;a<n;a++)for(v=0;v<r;v++){var P=f[v][a],C=f[v+1][a],O=f[v+1][a+1],I=f[v][a+1];h.push(P,C,I),h.push(C,O,I),b+=6}c.addGroup(g,b,0),g+=b}(),!1===a&&(t>0&&y(!0),e>0&&y(!1)),this.setIndex(h),this.addAttribute("position",new gt(l,3)),this.addAttribute("normal",new gt(u,3)),this.addAttribute("uv",new gt(p,2))}function rr(t,e,i,n,r,a,o){ir.call(this,0,t,e,i,n,r,a,o),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:a,thetaLength:o}}function ar(t,e,i,n,r,a,o){nr.call(this,0,t,e,i,n,r,a,o),this.type="ConeBufferGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:n,openEnded:r,thetaStart:a,thetaLength:o}}function or(t,e,i,n){st.call(this),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},this.fromBufferGeometry(new sr(t,e,i,n)),this.mergeVertices()}function sr(t,e,i,n){bt.call(this),this.type="CircleBufferGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:n},t=t||1,e=void 0!==e?Math.max(3,e):8,i=void 0!==i?i:0,n=void 0!==n?n:2*Math.PI;var r,a,o=[],s=[],c=[],h=[],l=new _,u=new v;for(s.push(0,0,0),c.push(0,0,1),h.push(.5,.5),a=0,r=3;a<=e;a++,r+=3){var p=i+a/e*n;l.x=t*Math.cos(p),l.y=t*Math.sin(p),s.push(l.x,l.y,l.z),c.push(0,0,1),u.x=(s[r]/t+1)/2,u.y=(s[r+1]/t+1)/2,h.push(u.x,u.y)}for(r=1;r<=e;r++)o.push(r,r+1,0);this.setIndex(o),this.addAttribute("position",new gt(s,3)),this.addAttribute("normal",new gt(c,3)),this.addAttribute("uv",new gt(h,2))}jn.prototype=Object.create(st.prototype),jn.prototype.constructor=jn,Wn.prototype=Object.create(Hn.prototype),Wn.prototype.constructor=Wn,Xn.prototype=Object.create(st.prototype),Xn.prototype.constructor=Xn,qn.prototype=Object.create(bt.prototype),qn.prototype.constructor=qn,Yn.prototype=Object.create(st.prototype),Yn.prototype.constructor=Yn,Zn.prototype=Object.create(bt.prototype),Zn.prototype.constructor=Zn,Jn.prototype=Object.create(st.prototype),Jn.prototype.constructor=Jn,Qn.prototype=Object.create(bt.prototype),Qn.prototype.constructor=Qn,Kn.prototype=Object.create(st.prototype),Kn.prototype.constructor=Kn,Kn.prototype.toJSON=function(){var t=st.prototype.toJSON.call(this);return tr(this.parameters.shapes,t)},$n.prototype=Object.create(bt.prototype),$n.prototype.constructor=$n,$n.prototype.toJSON=function(){var t=bt.prototype.toJSON.call(this);return tr(this.parameters.shapes,t)},er.prototype=Object.create(bt.prototype),er.prototype.constructor=er,ir.prototype=Object.create(st.prototype),ir.prototype.constructor=ir,nr.prototype=Object.create(bt.prototype),nr.prototype.constructor=nr,rr.prototype=Object.create(ir.prototype),rr.prototype.constructor=rr,ar.prototype=Object.create(nr.prototype),ar.prototype.constructor=ar,or.prototype=Object.create(st.prototype),or.prototype.constructor=or,sr.prototype=Object.create(bt.prototype),sr.prototype.constructor=sr;var cr=Object.freeze({WireframeGeometry:Zi,ParametricGeometry:Ji,ParametricBufferGeometry:Qi,TetrahedronGeometry:tn,TetrahedronBufferGeometry:en,OctahedronGeometry:nn,OctahedronBufferGeometry:rn,IcosahedronGeometry:an,IcosahedronBufferGeometry:on,DodecahedronGeometry:sn,DodecahedronBufferGeometry:cn,PolyhedronGeometry:Ki,PolyhedronBufferGeometry:$i,TubeGeometry:hn,TubeBufferGeometry:ln,TorusKnotGeometry:un,TorusKnotBufferGeometry:pn,TorusGeometry:dn,TorusBufferGeometry:fn,TextGeometry:jn,TextBufferGeometry:Wn,SphereGeometry:Xn,SphereBufferGeometry:qn,RingGeometry:Yn,RingBufferGeometry:Zn,PlaneGeometry:Et,PlaneBufferGeometry:Tt,LatheGeometry:Jn,LatheBufferGeometry:Qn,ShapeGeometry:Kn,ShapeBufferGeometry:$n,ExtrudeGeometry:Gn,ExtrudeBufferGeometry:Hn,EdgesGeometry:er,ConeGeometry:rr,ConeBufferGeometry:ar,CylinderGeometry:ir,CylinderBufferGeometry:nr,CircleGeometry:or,CircleBufferGeometry:sr,BoxGeometry:wt,BoxBufferGeometry:Mt});function hr(t){Nt.call(this),this.type="ShadowMaterial",this.color=new H(0),this.transparent=!0,this.setValues(t)}function lr(t){Ut.call(this,t),this.type="RawShaderMaterial"}function ur(t){Nt.call(this),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new H(16777215),this.roughness=.5,this.metalness=.5,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function pr(t){ur.call(this),this.defines={PHYSICAL:""},this.type="MeshPhysicalMaterial",this.reflectivity=.5,this.clearCoat=0,this.clearCoatRoughness=0,this.setValues(t)}function dr(t){Nt.call(this),this.type="MeshPhongMaterial",this.color=new H(16777215),this.specular=new H(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function fr(t){dr.call(this),this.defines={TOON:""},this.type="MeshToonMaterial",this.gradientMap=null,this.setValues(t)}function mr(t){Nt.call(this),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalScale=new v(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function gr(t){Nt.call(this),this.type="MeshLambertMaterial",this.color=new H(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new H(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.skinning=!1,this.morphTargets=!1,this.morphNormals=!1,this.setValues(t)}function vr(t){Fi.call(this),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}hr.prototype=Object.create(Nt.prototype),hr.prototype.constructor=hr,hr.prototype.isShadowMaterial=!0,hr.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this},lr.prototype=Object.create(Ut.prototype),lr.prototype.constructor=lr,lr.prototype.isRawShaderMaterial=!0,ur.prototype=Object.create(Nt.prototype),ur.prototype.constructor=ur,ur.prototype.isMeshStandardMaterial=!0,ur.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapIntensity=t.envMapIntensity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},pr.prototype=Object.create(ur.prototype),pr.prototype.constructor=pr,pr.prototype.isMeshPhysicalMaterial=!0,pr.prototype.copy=function(t){return ur.prototype.copy.call(this,t),this.defines={PHYSICAL:""},this.reflectivity=t.reflectivity,this.clearCoat=t.clearCoat,this.clearCoatRoughness=t.clearCoatRoughness,this},dr.prototype=Object.create(Nt.prototype),dr.prototype.constructor=dr,dr.prototype.isMeshPhongMaterial=!0,dr.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},fr.prototype=Object.create(dr.prototype),fr.prototype.constructor=fr,fr.prototype.isMeshToonMaterial=!0,fr.prototype.copy=function(t){return dr.prototype.copy.call(this,t),this.gradientMap=t.gradientMap,this},mr.prototype=Object.create(Nt.prototype),mr.prototype.constructor=mr,mr.prototype.isMeshNormalMaterial=!0,mr.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},gr.prototype=Object.create(Nt.prototype),gr.prototype.constructor=gr,gr.prototype.isMeshLambertMaterial=!0,gr.prototype.copy=function(t){return Nt.prototype.copy.call(this,t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.skinning=t.skinning,this.morphTargets=t.morphTargets,this.morphNormals=t.morphNormals,this},vr.prototype=Object.create(Fi.prototype),vr.prototype.constructor=vr,vr.prototype.isLineDashedMaterial=!0,vr.prototype.copy=function(t){return Fi.prototype.copy.call(this,t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this};var yr=Object.freeze({ShadowMaterial:hr,SpriteMaterial:Ii,RawShaderMaterial:lr,ShaderMaterial:Ut,PointsMaterial:ki,MeshPhysicalMaterial:pr,MeshStandardMaterial:ur,MeshPhongMaterial:dr,MeshToonMaterial:fr,MeshNormalMaterial:mr,MeshLambertMaterial:gr,MeshDepthMaterial:vi,MeshDistanceMaterial:yi,MeshBasicMaterial:Dt,LineDashedMaterial:vr,LineBasicMaterial:Fi,Material:Nt}),xr={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};function _r(t,e,i){var n=this,r=!1,a=0,o=0,s=void 0;this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(t){o++,!1===r&&void 0!==n.onStart&&n.onStart(t,a,o),r=!0},this.itemEnd=function(t){a++,void 0!==n.onProgress&&n.onProgress(t,a,o),a===o&&(r=!1,void 0!==n.onLoad&&n.onLoad())},this.itemError=function(t){void 0!==n.onError&&n.onError(t)},this.resolveURL=function(t){return s?s(t):t},this.setURLModifier=function(t){return s=t,this}}var br=new _r,wr={};function Mr(t){this.manager=void 0!==t?t:br}function Er(t){this.manager=void 0!==t?t:br,this._parser=null}function Tr(t){this.manager=void 0!==t?t:br}function Sr(t){this.manager=void 0!==t?t:br}function Ar(t){this.manager=void 0!==t?t:br}function Rr(){this.type="Curve",this.arcLengthDivisions=200}function Lr(t,e,i,n,r,a,o,s){Rr.call(this),this.type="EllipseCurve",this.aX=t||0,this.aY=e||0,this.xRadius=i||1,this.yRadius=n||1,this.aStartAngle=r||0,this.aEndAngle=a||2*Math.PI,this.aClockwise=o||!1,this.aRotation=s||0}function Pr(t,e,i,n,r,a){Lr.call(this,t,e,i,i,n,r,a),this.type="ArcCurve"}function Cr(){var t=0,e=0,i=0,n=0;function r(r,a,o,s){t=r,e=o,i=-3*r+3*a-2*o-s,n=2*r-2*a+o+s}return{initCatmullRom:function(t,e,i,n,a){r(e,i,a*(i-t),a*(n-e))},initNonuniformCatmullRom:function(t,e,i,n,a,o,s){var c=(e-t)/a-(i-t)/(a+o)+(i-e)/o,h=(i-e)/o-(n-e)/(o+s)+(n-i)/s;r(e,i,c*=o,h*=o)},calc:function(r){var a=r*r;return t+e*r+i*a+n*(a*r)}}}Object.assign(Mr.prototype,{load:function(t,e,i,n){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,a=xr.get(t);if(void 0!==a)return r.manager.itemStart(t),setTimeout((function(){e&&e(a),r.manager.itemEnd(t)}),0),a;if(void 0===wr[t]){var o=t.match(/^data:(.*?)(;base64)?,(.*)$/);if(o){var s=o[1],c=!!o[2],h=o[3];h=window.decodeURIComponent(h),c&&(h=window.atob(h));try{var l,u=(this.responseType||"").toLowerCase();switch(u){case"arraybuffer":case"blob":for(var p=new Uint8Array(h.length),d=0;d<h.length;d++)p[d]=h.charCodeAt(d);l="blob"===u?new Blob([p.buffer],{type:s}):p.buffer;break;case"document":var f=new DOMParser;l=f.parseFromString(h,s);break;case"json":l=JSON.parse(h);break;default:l=h}window.setTimeout((function(){e&&e(l),r.manager.itemEnd(t)}),0)}catch(e){window.setTimeout((function(){n&&n(e),r.manager.itemEnd(t),r.manager.itemError(t)}),0)}}else{wr[t]=[],wr[t].push({onLoad:e,onProgress:i,onError:n});var m=new XMLHttpRequest;for(var g in m.open("GET",t,!0),m.addEventListener("load",(function(e){var i=this.response;xr.add(t,i);var n=wr[t];if(delete wr[t],200===this.status||0===this.status){0===this.status&&console.warn("THREE.FileLoader: HTTP Status 0 received.");for(var a=0,o=n.length;a<o;a++){(s=n[a]).onLoad&&s.onLoad(i)}r.manager.itemEnd(t)}else{for(a=0,o=n.length;a<o;a++){var s;(s=n[a]).onError&&s.onError(e)}r.manager.itemEnd(t),r.manager.itemError(t)}}),!1),m.addEventListener("progress",(function(e){for(var i=wr[t],n=0,r=i.length;n<r;n++){var a=i[n];a.onProgress&&a.onProgress(e)}}),!1),m.addEventListener("error",(function(e){var i=wr[t];delete wr[t];for(var n=0,a=i.length;n<a;n++){var o=i[n];o.onError&&o.onError(e)}r.manager.itemEnd(t),r.manager.itemError(t)}),!1),void 0!==this.responseType&&(m.responseType=this.responseType),void 0!==this.withCredentials&&(m.withCredentials=this.withCredentials),m.overrideMimeType&&m.overrideMimeType(void 0!==this.mimeType?this.mimeType:"text/plain"),this.requestHeader)m.setRequestHeader(g,this.requestHeader[g]);m.send(null)}return r.manager.itemStart(t),m}wr[t].push({onLoad:e,onProgress:i,onError:n})},setPath:function(t){return this.path=t,this},setResponseType:function(t){return this.responseType=t,this},setWithCredentials:function(t){return this.withCredentials=t,this},setMimeType:function(t){return this.mimeType=t,this},setRequestHeader:function(t){return this.requestHeader=t,this}}),Object.assign(function(t){this.manager=void 0!==t?t:br,this._parser=null}.prototype,{load:function(t,e,i,n){var r=this,a=[],o=new qi;o.image=a;var s=new Mr(this.manager);function c(c){s.load(t[c],(function(t){var i=r._parser(t,!0);a[c]={width:i.width,height:i.height,format:i.format,mipmaps:i.mipmaps},6===(h+=1)&&(1===i.mipmapCount&&(o.minFilter=1006),o.format=i.format,o.needsUpdate=!0,e&&e(o))}),i,n)}if(s.setPath(this.path),s.setResponseType("arraybuffer"),Array.isArray(t))for(var h=0,l=0,u=t.length;l<u;++l)c(l);else s.load(t,(function(t){var i=r._parser(t,!0);if(i.isCubemap)for(var n=i.mipmaps.length/i.mipmapCount,s=0;s<n;s++){a[s]={mipmaps:[]};for(var c=0;c<i.mipmapCount;c++)a[s].mipmaps.push(i.mipmaps[s*i.mipmapCount+c]),a[s].format=i.format,a[s].width=i.width,a[s].height=i.height}else o.image.width=i.width,o.image.height=i.height,o.mipmaps=i.mipmaps;1===i.mipmapCount&&(o.minFilter=1006),o.format=i.format,o.needsUpdate=!0,e&&e(o)}),i,n);return o},setPath:function(t){return this.path=t,this}}),Object.assign(Er.prototype,{load:function(t,e,i,n){var r=this,a=new O,o=new Mr(this.manager);return o.setResponseType("arraybuffer"),o.load(t,(function(t){var i=r._parser(t);i&&(void 0!==i.image?a.image=i.image:void 0!==i.data&&(a.image.width=i.width,a.image.height=i.height,a.image.data=i.data),a.wrapS=void 0!==i.wrapS?i.wrapS:1001,a.wrapT=void 0!==i.wrapT?i.wrapT:1001,a.magFilter=void 0!==i.magFilter?i.magFilter:1006,a.minFilter=void 0!==i.minFilter?i.minFilter:1008,a.anisotropy=void 0!==i.anisotropy?i.anisotropy:1,void 0!==i.format&&(a.format=i.format),void 0!==i.type&&(a.type=i.type),void 0!==i.mipmaps&&(a.mipmaps=i.mipmaps),1===i.mipmapCount&&(a.minFilter=1006),a.needsUpdate=!0,e&&e(a,i))}),i,n),a}}),Object.assign(Tr.prototype,{crossOrigin:"Anonymous",load:function(t,e,i,n){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,a=xr.get(t);if(void 0!==a)return r.manager.itemStart(t),setTimeout((function(){e&&e(a),r.manager.itemEnd(t)}),0),a;var o=document.createElementNS("http://www.w3.org/1999/xhtml","img");function s(){o.removeEventListener("load",s,!1),o.removeEventListener("error",c,!1),xr.add(t,this),e&&e(this),r.manager.itemEnd(t)}function c(e){o.removeEventListener("load",s,!1),o.removeEventListener("error",c,!1),n&&n(e),r.manager.itemEnd(t),r.manager.itemError(t)}return o.addEventListener("load",s,!1),o.addEventListener("error",c,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),r.manager.itemStart(t),o.src=t,o},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Sr.prototype,{crossOrigin:"Anonymous",load:function(t,e,i,n){var r=new Kt,a=new Tr(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);var o=0;function s(i){a.load(t[i],(function(t){r.images[i]=t,6===++o&&(r.needsUpdate=!0,e&&e(r))}),void 0,n)}for(var c=0;c<t.length;++c)s(c);return r},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Ar.prototype,{crossOrigin:"Anonymous",load:function(t,e,i,n){var r=new R,a=new Tr(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,(function(i){r.image=i;var n=t.search(/\.(jpg|jpeg)$/)>0||0===t.search(/^data\:image\/jpeg/);r.format=n?1022:1023,r.needsUpdate=!0,void 0!==e&&e(r)}),i,n),r},setCrossOrigin:function(t){return this.crossOrigin=t,this},setPath:function(t){return this.path=t,this}}),Object.assign(Rr.prototype,{getPoint:function(){return console.warn("THREE.Curve: .getPoint() not implemented."),null},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i,n=[],r=this.getPoint(0),a=0;for(n.push(0),i=1;i<=t;i++)a+=(e=this.getPoint(i/t)).distanceTo(r),n.push(a),r=e;return this.cacheArcLengths=n,n},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i,n=this.getLengths(),r=0,a=n.length;i=e||t*n[a-1];for(var o,s=0,c=a-1;s<=c;)if((o=n[r=Math.floor(s+(c-s)/2)]-i)<0)s=r+1;else{if(!(o>0)){c=r;break}c=r-1}if(n[r=c]===i)return r/(a-1);var h=n[r];return(r+(i-h)/(n[r+1]-h))/(a-1)},getTangent:function(t){var e=t-1e-4,i=t+1e-4;e<0&&(e=0),i>1&&(i=1);var n=this.getPoint(e);return this.getPoint(i).clone().sub(n).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var i,n,r,a=new _,o=[],s=[],c=[],h=new _,l=new y;for(i=0;i<=t;i++)n=i/t,o[i]=this.getTangentAt(n),o[i].normalize();s[0]=new _,c[0]=new _;var u=Number.MAX_VALUE,p=Math.abs(o[0].x),d=Math.abs(o[0].y),f=Math.abs(o[0].z);for(p<=u&&(u=p,a.set(1,0,0)),d<=u&&(u=d,a.set(0,1,0)),f<=u&&a.set(0,0,1),h.crossVectors(o[0],a).normalize(),s[0].crossVectors(o[0],h),c[0].crossVectors(o[0],s[0]),i=1;i<=t;i++)s[i]=s[i-1].clone(),c[i]=c[i-1].clone(),h.crossVectors(o[i-1],o[i]),h.length()>Number.EPSILON&&(h.normalize(),r=Math.acos(g.clamp(o[i-1].dot(o[i]),-1,1)),s[i].applyMatrix4(l.makeRotationAxis(h,r))),c[i].crossVectors(o[i],s[i]);if(!0===e)for(r=Math.acos(g.clamp(s[0].dot(s[t]),-1,1)),r/=t,o[0].dot(h.crossVectors(s[0],s[t]))>0&&(r=-r),i=1;i<=t;i++)s[i].applyMatrix4(l.makeRotationAxis(o[i],r*i)),c[i].crossVectors(o[i],s[i]);return{tangents:o,normals:s,binormals:c}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),Lr.prototype=Object.create(Rr.prototype),Lr.prototype.constructor=Lr,Lr.prototype.isEllipseCurve=!0,Lr.prototype.getPoint=function(t,e){for(var i=e||new v,n=2*Math.PI,r=this.aEndAngle-this.aStartAngle,a=Math.abs(r)<Number.EPSILON;r<0;)r+=n;for(;r>n;)r-=n;r<Number.EPSILON&&(r=a?0:n),!0!==this.aClockwise||a||(r===n?r=-n:r-=n);var o=this.aStartAngle+t*r,s=this.aX+this.xRadius*Math.cos(o),c=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){var h=Math.cos(this.aRotation),l=Math.sin(this.aRotation),u=s-this.aX,p=c-this.aY;s=u*h-p*l+this.aX,c=u*l+p*h+this.aY}return i.set(s,c)},Lr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Lr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t},Lr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this},Pr.prototype=Object.create(Lr.prototype),Pr.prototype.constructor=Pr,Pr.prototype.isArcCurve=!0;var Or=new _,Ir=new Cr,Nr=new Cr,Dr=new Cr;function Ur(t,e,i,n){Rr.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}function zr(t,e,i,n,r){var a=.5*(n-e),o=.5*(r-i),s=t*t;return(2*i-2*n+a+o)*(t*s)+(-3*i+3*n-2*a-o)*s+a*t+i}function Br(t,e,i,n){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}function Fr(t,e,i,n,r){return function(t,e){var i=1-t;return i*i*i*e}(t,e)+function(t,e){var i=1-t;return 3*i*i*t*e}(t,i)+function(t,e){return 3*(1-t)*t*t*e}(t,n)+function(t,e){return t*t*t*e}(t,r)}function Gr(t,e,i,n){Rr.call(this),this.type="CubicBezierCurve",this.v0=t||new v,this.v1=e||new v,this.v2=i||new v,this.v3=n||new v}function Hr(t,e,i,n){Rr.call(this),this.type="CubicBezierCurve3",this.v0=t||new _,this.v1=e||new _,this.v2=i||new _,this.v3=n||new _}function Vr(t,e){Rr.call(this),this.type="LineCurve",this.v1=t||new v,this.v2=e||new v}function kr(t,e){Rr.call(this),this.type="LineCurve3",this.v1=t||new _,this.v2=e||new _}function jr(t,e,i){Rr.call(this),this.type="QuadraticBezierCurve",this.v0=t||new v,this.v1=e||new v,this.v2=i||new v}function Wr(t,e,i){Rr.call(this),this.type="QuadraticBezierCurve3",this.v0=t||new _,this.v1=e||new _,this.v2=i||new _}function Xr(t){Rr.call(this),this.type="SplineCurve",this.points=t||[]}Ur.prototype=Object.create(Rr.prototype),Ur.prototype.constructor=Ur,Ur.prototype.isCatmullRomCurve3=!0,Ur.prototype.getPoint=function(t,e){var i,n,r,a,o=e||new _,s=this.points,c=s.length,h=(c-(this.closed?0:1))*t,l=Math.floor(h),u=h-l;if(this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/c)+1)*c:0===u&&l===c-1&&(l=c-2,u=1),this.closed||l>0?i=s[(l-1)%c]:(Or.subVectors(s[0],s[1]).add(s[0]),i=Or),n=s[l%c],r=s[(l+1)%c],this.closed||l+2<c?a=s[(l+2)%c]:(Or.subVectors(s[c-1],s[c-2]).add(s[c-1]),a=Or),"centripetal"===this.curveType||"chordal"===this.curveType){var p="chordal"===this.curveType?.5:.25,d=Math.pow(i.distanceToSquared(n),p),f=Math.pow(n.distanceToSquared(r),p),m=Math.pow(r.distanceToSquared(a),p);f<1e-4&&(f=1),d<1e-4&&(d=f),m<1e-4&&(m=f),Ir.initNonuniformCatmullRom(i.x,n.x,r.x,a.x,d,f,m),Nr.initNonuniformCatmullRom(i.y,n.y,r.y,a.y,d,f,m),Dr.initNonuniformCatmullRom(i.z,n.z,r.z,a.z,d,f,m)}else"catmullrom"===this.curveType&&(Ir.initCatmullRom(i.x,n.x,r.x,a.x,this.tension),Nr.initCatmullRom(i.y,n.y,r.y,a.y,this.tension),Dr.initCatmullRom(i.z,n.z,r.z,a.z,this.tension));return o.set(Ir.calc(u),Nr.calc(u),Dr.calc(u)),o},Ur.prototype.copy=function(t){Rr.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(n.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Ur.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++){var n=this.points[e];t.points.push(n.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t},Ur.prototype.fromJSON=function(t){Rr.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push((new _).fromArray(n))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this},Gr.prototype=Object.create(Rr.prototype),Gr.prototype.constructor=Gr,Gr.prototype.isCubicBezierCurve=!0,Gr.prototype.getPoint=function(t,e){var i=e||new v,n=this.v0,r=this.v1,a=this.v2,o=this.v3;return i.set(Fr(t,n.x,r.x,a.x,o.x),Fr(t,n.y,r.y,a.y,o.y)),i},Gr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Gr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Gr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Hr.prototype=Object.create(Rr.prototype),Hr.prototype.constructor=Hr,Hr.prototype.isCubicBezierCurve3=!0,Hr.prototype.getPoint=function(t,e){var i=e||new _,n=this.v0,r=this.v1,a=this.v2,o=this.v3;return i.set(Fr(t,n.x,r.x,a.x,o.x),Fr(t,n.y,r.y,a.y,o.y),Fr(t,n.z,r.z,a.z,o.z)),i},Hr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this},Hr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t},Hr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this},Vr.prototype=Object.create(Rr.prototype),Vr.prototype.constructor=Vr,Vr.prototype.isLineCurve=!0,Vr.prototype.getPoint=function(t,e){var i=e||new v;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i},Vr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},Vr.prototype.getTangent=function(){return this.v2.clone().sub(this.v1).normalize()},Vr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Vr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Vr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},kr.prototype=Object.create(Rr.prototype),kr.prototype.constructor=kr,kr.prototype.isLineCurve3=!0,kr.prototype.getPoint=function(t,e){var i=e||new _;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i},kr.prototype.getPointAt=function(t,e){return this.getPoint(t,e)},kr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v1.copy(t.v1),this.v2.copy(t.v2),this},kr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},kr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},jr.prototype=Object.create(Rr.prototype),jr.prototype.constructor=jr,jr.prototype.isQuadraticBezierCurve=!0,jr.prototype.getPoint=function(t,e){var i=e||new v,n=this.v0,r=this.v1,a=this.v2;return i.set(Br(t,n.x,r.x,a.x),Br(t,n.y,r.y,a.y)),i},jr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},jr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},jr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Wr.prototype=Object.create(Rr.prototype),Wr.prototype.constructor=Wr,Wr.prototype.isQuadraticBezierCurve3=!0,Wr.prototype.getPoint=function(t,e){var i=e||new _,n=this.v0,r=this.v1,a=this.v2;return i.set(Br(t,n.x,r.x,a.x),Br(t,n.y,r.y,a.y),Br(t,n.z,r.z,a.z)),i},Wr.prototype.copy=function(t){return Rr.prototype.copy.call(this,t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this},Wr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t},Wr.prototype.fromJSON=function(t){return Rr.prototype.fromJSON.call(this,t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this},Xr.prototype=Object.create(Rr.prototype),Xr.prototype.constructor=Xr,Xr.prototype.isSplineCurve=!0,Xr.prototype.getPoint=function(t,e){var i=e||new v,n=this.points,r=(n.length-1)*t,a=Math.floor(r),o=r-a,s=n[0===a?a:a-1],c=n[a],h=n[a>n.length-2?n.length-1:a+1],l=n[a>n.length-3?n.length-1:a+2];return i.set(zr(o,s.x,c.x,h.x,l.x),zr(o,s.y,c.y,h.y,l.y)),i},Xr.prototype.copy=function(t){Rr.prototype.copy.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push(n.clone())}return this},Xr.prototype.toJSON=function(){var t=Rr.prototype.toJSON.call(this);t.points=[];for(var e=0,i=this.points.length;e<i;e++){var n=this.points[e];t.points.push(n.toArray())}return t},Xr.prototype.fromJSON=function(t){Rr.prototype.fromJSON.call(this,t),this.points=[];for(var e=0,i=t.points.length;e<i;e++){var n=t.points[e];this.points.push((new v).fromArray(n))}return this};var qr=Object.freeze({ArcCurve:Pr,CatmullRomCurve3:Ur,CubicBezierCurve:Gr,CubicBezierCurve3:Hr,EllipseCurve:Lr,LineCurve:Vr,LineCurve3:kr,QuadraticBezierCurve:jr,QuadraticBezierCurve3:Wr,SplineCurve:Xr});function Yr(){Rr.call(this),this.type="CurvePath",this.curves=[],this.autoClose=!1}function Zr(t){Yr.call(this),this.type="Path",this.currentPoint=new v,t&&this.setFromPoints(t)}function Jr(t){Zr.call(this,t),this.uuid=g.generateUUID(),this.type="Shape",this.holes=[]}function Qr(t,e){tt.call(this),this.type="Light",this.color=new H(t),this.intensity=void 0!==e?e:1,this.receiveShadow=void 0}function Kr(t,e,i){Qr.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(tt.DefaultUp),this.updateMatrix(),this.groundColor=new H(e)}function $r(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new v(512,512),this.map=null,this.matrix=new y}function ta(){$r.call(this,new Ti(50,1,.5,500))}function ea(t,e,i,n,r,a){Qr.call(this,t,e),this.type="SpotLight",this.position.copy(tt.DefaultUp),this.updateMatrix(),this.target=new tt,Object.defineProperty(this,"power",{get:function(){return this.intensity*Math.PI},set:function(t){this.intensity=t/Math.PI}}),this.distance=void 0!==i?i:0,this.angle=void 0!==n?n:Math.PI/3,this.penumbra=void 0!==r?r:0,this.decay=void 0!==a?a:1,this.shadow=new ta}function ia(t,e,i,n){Qr.call(this,t,e),this.type="PointLight",Object.defineProperty(this,"power",{get:function(){return 4*this.intensity*Math.PI},set:function(t){this.intensity=t/(4*Math.PI)}}),this.distance=void 0!==i?i:0,this.decay=void 0!==n?n:1,this.shadow=new $r(new Ti(90,1,.5,500))}function na(){$r.call(this,new it(-5,5,5,-5,.5,500))}function ra(t,e){Qr.call(this,t,e),this.type="DirectionalLight",this.position.copy(tt.DefaultUp),this.updateMatrix(),this.target=new tt,this.shadow=new na}function aa(t,e){Qr.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}function oa(t,e,i,n){Qr.call(this,t,e),this.type="RectAreaLight",this.width=void 0!==i?i:10,this.height=void 0!==n?n:10}function sa(t,e,i,n){ya.call(this,t,e,i,n)}function ca(t,e,i){ya.call(this,t,e,i)}function ha(t,e,i,n){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==n?n:new e.constructor(i),this.sampleValues=e,this.valueSize=i}function la(t,e,i,n){ha.call(this,t,e,i,n)}function ua(t,e,i,n){ya.call(this,t,e,i,n)}function pa(t,e,i,n){ya.call(this,t,e,i,n)}function da(t,e,i,n){ya.call(this,t,e,i,n)}function fa(t,e,i,n){ha.call(this,t,e,i,n),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0}function ma(t,e,i,n){ha.call(this,t,e,i,n)}function ga(t,e,i,n){ha.call(this,t,e,i,n)}Yr.prototype=Object.assign(Object.create(Rr.prototype),{constructor:Yr,add:function(t){this.curves.push(t)},closePath:function(){var t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new Vr(e,t))},getPoint:function(t){for(var e=t*this.getLength(),i=this.getCurveLengths(),n=0;n<i.length;){if(i[n]>=e){var r=i[n]-e,a=this.curves[n],o=a.getLength(),s=0===o?0:1-r/o;return a.getPointAt(s)}n++}return null},getLength:function(){var t=this.getCurveLengths();return t[t.length-1]},updateArcLengths:function(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()},getCurveLengths:function(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;for(var t=[],e=0,i=0,n=this.curves.length;i<n;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t},getSpacedPoints:function(t){void 0===t&&(t=40);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e},getPoints:function(t){t=t||12;for(var e,i=[],n=0,r=this.curves;n<r.length;n++)for(var a=r[n],o=a&&a.isEllipseCurve?2*t:a&&a.isLineCurve?1:a&&a.isSplineCurve?t*a.points.length:t,s=a.getPoints(o),c=0;c<s.length;c++){var h=s[c];e&&e.equals(h)||(i.push(h),e=h)}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i},copy:function(t){Rr.prototype.copy.call(this,t),this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push(n.clone())}return this.autoClose=t.autoClose,this},toJSON:function(){var t=Rr.prototype.toJSON.call(this);t.autoClose=this.autoClose,t.curves=[];for(var e=0,i=this.curves.length;e<i;e++){var n=this.curves[e];t.curves.push(n.toJSON())}return t},fromJSON:function(t){Rr.prototype.fromJSON.call(this,t),this.autoClose=t.autoClose,this.curves=[];for(var e=0,i=t.curves.length;e<i;e++){var n=t.curves[e];this.curves.push((new qr[n.type]).fromJSON(n))}return this}}),Zr.prototype=Object.assign(Object.create(Yr.prototype),{constructor:Zr,setFromPoints:function(t){this.moveTo(t[0].x,t[0].y);for(var e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y)},moveTo:function(t,e){this.currentPoint.set(t,e)},lineTo:function(t,e){var i=new Vr(this.currentPoint.clone(),new v(t,e));this.curves.push(i),this.currentPoint.set(t,e)},quadraticCurveTo:function(t,e,i,n){var r=new jr(this.currentPoint.clone(),new v(t,e),new v(i,n));this.curves.push(r),this.currentPoint.set(i,n)},bezierCurveTo:function(t,e,i,n,r,a){var o=new Gr(this.currentPoint.clone(),new v(t,e),new v(i,n),new v(r,a));this.curves.push(o),this.currentPoint.set(r,a)},splineThru:function(t){var e=new Xr([this.currentPoint.clone()].concat(t));this.curves.push(e),this.currentPoint.copy(t[t.length-1])},arc:function(t,e,i,n,r,a){var o=this.currentPoint.x,s=this.currentPoint.y;this.absarc(t+o,e+s,i,n,r,a)},absarc:function(t,e,i,n,r,a){this.absellipse(t,e,i,i,n,r,a)},ellipse:function(t,e,i,n,r,a,o,s){var c=this.currentPoint.x,h=this.currentPoint.y;this.absellipse(t+c,e+h,i,n,r,a,o,s)},absellipse:function(t,e,i,n,r,a,o,s){var c=new Lr(t,e,i,n,r,a,o,s);if(this.curves.length>0){var h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);var l=c.getPoint(1);this.currentPoint.copy(l)},copy:function(t){return Yr.prototype.copy.call(this,t),this.currentPoint.copy(t.currentPoint),this},toJSON:function(){var t=Yr.prototype.toJSON.call(this);return t.currentPoint=this.currentPoint.toArray(),t},fromJSON:function(t){return Yr.prototype.fromJSON.call(this,t),this.currentPoint.fromArray(t.currentPoint),this}}),Jr.prototype=Object.assign(Object.create(Zr.prototype),{constructor:Jr,getPointsHoles:function(t){for(var e=[],i=0,n=this.holes.length;i<n;i++)e[i]=this.holes[i].getPoints(t);return e},extractPoints:function(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}},copy:function(t){Zr.prototype.copy.call(this,t),this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push(n.clone())}return this},toJSON:function(){var t=Zr.prototype.toJSON.call(this);t.uuid=this.uuid,t.holes=[];for(var e=0,i=this.holes.length;e<i;e++){var n=this.holes[e];t.holes.push(n.toJSON())}return t},fromJSON:function(t){Zr.prototype.fromJSON.call(this,t),this.uuid=t.uuid,this.holes=[];for(var e=0,i=t.holes.length;e<i;e++){var n=t.holes[e];this.holes.push((new Zr).fromJSON(n))}return this}}),Qr.prototype=Object.assign(Object.create(tt.prototype),{constructor:Qr,isLight:!0,copy:function(t){return tt.prototype.copy.call(this,t),this.color.copy(t.color),this.intensity=t.intensity,this},toJSON:function(t){var e=tt.prototype.toJSON.call(this,t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}}),Kr.prototype=Object.assign(Object.create(Qr.prototype),{constructor:Kr,isHemisphereLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}),Object.assign($r.prototype,{copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}),ta.prototype=Object.assign(Object.create($r.prototype),{constructor:ta,isSpotLightShadow:!0,update:function(t){var e=this.camera,i=2*g.RAD2DEG*t.angle,n=this.mapSize.width/this.mapSize.height,r=t.distance||e.far;i===e.fov&&n===e.aspect&&r===e.far||(e.fov=i,e.aspect=n,e.far=r,e.updateProjectionMatrix())}}),ea.prototype=Object.assign(Object.create(Qr.prototype),{constructor:ea,isSpotLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),ia.prototype=Object.assign(Object.create(Qr.prototype),{constructor:ia,isPointLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}),na.prototype=Object.assign(Object.create($r.prototype),{constructor:na}),ra.prototype=Object.assign(Object.create(Qr.prototype),{constructor:ra,isDirectionalLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}),aa.prototype=Object.assign(Object.create(Qr.prototype),{constructor:aa,isAmbientLight:!0}),oa.prototype=Object.assign(Object.create(Qr.prototype),{constructor:oa,isRectAreaLight:!0,copy:function(t){return Qr.prototype.copy.call(this,t),this.width=t.width,this.height=t.height,this},toJSON:function(t){var e=Qr.prototype.toJSON.call(this,t);return e.object.width=this.width,e.object.height=this.height,e}}),sa.prototype=Object.assign(Object.create(ya.prototype),{constructor:sa,ValueTypeName:"string",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),ca.prototype=Object.assign(Object.create(ya.prototype),{constructor:ca,ValueTypeName:"bool",ValueBufferType:Array,DefaultInterpolation:2300,InterpolantFactoryMethodLinear:void 0,InterpolantFactoryMethodSmooth:void 0}),Object.assign(ha.prototype,{evaluate:function(t){var e=this.parameterPositions,i=this._cachedIndex,n=e[i],r=e[i-1];t:{e:{var a;i:{n:if(!(t<n)){for(var o=i+2;;){if(void 0===n){if(t<r)break n;return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,t,r)}if(i===o)break;if(r=n,t<(n=e[++i]))break e}a=e.length;break i}if(t>=r)break t;var s=e[1];t<s&&(i=2,r=s);for(o=i-2;;){if(void 0===r)return this._cachedIndex=0,this.beforeStart_(0,t,n);if(i===o)break;if(n=r,t>=(r=e[--i-1]))break e}a=i,i=0}for(;i<a;){var c=i+a>>>1;t<e[c]?a=c:i=c+1}if(n=e[i],void 0===(r=e[i-1]))return this._cachedIndex=0,this.beforeStart_(0,t,n);if(void 0===n)return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,r,t)}this._cachedIndex=i,this.intervalChanged_(i,r,n)}return this.interpolate_(i,r,t,n)},settings:null,DefaultSettings_:{},getSettings_:function(){return this.settings||this.DefaultSettings_},copySampleValue_:function(t){for(var e=this.resultBuffer,i=this.sampleValues,n=this.valueSize,r=t*n,a=0;a!==n;++a)e[a]=i[r+a];return e},interpolate_:function(){throw new Error("call to abstract method")},intervalChanged_:function(){}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(ha.prototype,{beforeStart_:ha.prototype.copySampleValue_,afterEnd_:ha.prototype.copySampleValue_}),la.prototype=Object.assign(Object.create(ha.prototype),{constructor:la,interpolate_:function(t,e,i,n){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=t*o,c=(i-e)/(n-e),h=s+o;s!==h;s+=4)x.slerpFlat(r,0,a,s-o,a,s,c);return r}}),ua.prototype=Object.assign(Object.create(ya.prototype),{constructor:ua,ValueTypeName:"quaternion",DefaultInterpolation:2301,InterpolantFactoryMethodLinear:function(t){return new la(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:void 0}),pa.prototype=Object.assign(Object.create(ya.prototype),{constructor:pa,ValueTypeName:"color"}),da.prototype=Object.assign(Object.create(ya.prototype),{constructor:da,ValueTypeName:"number"}),fa.prototype=Object.assign(Object.create(ha.prototype),{constructor:fa,DefaultSettings_:{endingStart:2400,endingEnd:2400},intervalChanged_:function(t,e,i){var n=this.parameterPositions,r=t-2,a=t+1,o=n[r],s=n[a];if(void 0===o)switch(this.getSettings_().endingStart){case 2401:r=t,o=2*e-i;break;case 2402:o=e+n[r=n.length-2]-n[r+1];break;default:r=t,o=i}if(void 0===s)switch(this.getSettings_().endingEnd){case 2401:a=t,s=2*i-e;break;case 2402:a=1,s=i+n[1]-n[0];break;default:a=t-1,s=e}var c=.5*(i-e),h=this.valueSize;this._weightPrev=c/(e-o),this._weightNext=c/(s-i),this._offsetPrev=r*h,this._offsetNext=a*h},interpolate_:function(t,e,i,n){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=t*o,c=s-o,h=this._offsetPrev,l=this._offsetNext,u=this._weightPrev,p=this._weightNext,d=(i-e)/(n-e),f=d*d,m=f*d,g=-u*m+2*u*f-u*d,v=(1+u)*m+(-1.5-2*u)*f+(-.5+u)*d+1,y=(-1-p)*m+(1.5+p)*f+.5*d,x=p*m-p*f,_=0;_!==o;++_)r[_]=g*a[h+_]+v*a[c+_]+y*a[s+_]+x*a[l+_];return r}}),ma.prototype=Object.assign(Object.create(ha.prototype),{constructor:ma,interpolate_:function(t,e,i,n){for(var r=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=t*o,c=s-o,h=(i-e)/(n-e),l=1-h,u=0;u!==o;++u)r[u]=a[c+u]*l+a[s+u]*h;return r}}),ga.prototype=Object.assign(Object.create(ha.prototype),{constructor:ga,interpolate_:function(t){return this.copySampleValue_(t-1)}});var va={arraySlice:function(t,e,i){return va.isTypedArray(t)?new t.constructor(t.subarray(e,void 0!==i?i:t.length)):t.slice(e,i)},convertArray:function(t,e,i){return!t||!i&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)},isTypedArray:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)},getKeyframeOrder:function(t){for(var e=t.length,i=new Array(e),n=0;n!==e;++n)i[n]=n;return i.sort((function(e,i){return t[e]-t[i]})),i},sortedArray:function(t,e,i){for(var n=t.length,r=new t.constructor(n),a=0,o=0;o!==n;++a)for(var s=i[a]*e,c=0;c!==e;++c)r[o++]=t[s+c];return r},flattenJSON:function(t,e,i,n){for(var r=1,a=t[0];void 0!==a&&void 0===a[n];)a=t[r++];if(void 0!==a){var o=a[n];if(void 0!==o)if(Array.isArray(o))do{void 0!==(o=a[n])&&(e.push(a.time),i.push.apply(i,o)),a=t[r++]}while(void 0!==a);else if(void 0!==o.toArray)do{void 0!==(o=a[n])&&(e.push(a.time),o.toArray(i,i.length)),a=t[r++]}while(void 0!==a);else do{void 0!==(o=a[n])&&(e.push(a.time),i.push(o)),a=t[r++]}while(void 0!==a)}}};function ya(t,e,i,n){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=va.convertArray(e,this.TimeBufferType),this.values=va.convertArray(i,this.ValueBufferType),this.setInterpolation(n||this.DefaultInterpolation),this.validate(),this.optimize()}function xa(t,e,i,n){ya.call(this,t,e,i,n)}function _a(t,e,i){this.name=t,this.tracks=i,this.duration=void 0!==e?e:-1,this.uuid=g.generateUUID(),this.duration<0&&this.resetDuration(),this.optimize()}function ba(t){this.manager=void 0!==t?t:br,this.textures={}}function wa(t){this.manager=void 0!==t?t:br}Object.assign(ya,{parse:function(t){if(void 0===t.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");var e=ya._getTrackTypeForValueTypeName(t.type);if(void 0===t.times){var i=[],n=[];va.flattenJSON(t.keys,i,n,"value"),t.times=i,t.values=n}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)},toJSON:function(t){var e,i=t.constructor;if(void 0!==i.toJSON)e=i.toJSON(t);else{e={name:t.name,times:va.convertArray(t.times,Array),values:va.convertArray(t.values,Array)};var n=t.getInterpolation();n!==t.DefaultInterpolation&&(e.interpolation=n)}return e.type=t.ValueTypeName,e},_getTrackTypeForValueTypeName:function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return da;case"vector":case"vector2":case"vector3":case"vector4":return xa;case"color":return pa;case"quaternion":return ua;case"bool":case"boolean":return ca;case"string":return sa}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}}),Object.assign(ya.prototype,{constructor:ya,TimeBufferType:Float32Array,ValueBufferType:Float32Array,DefaultInterpolation:2301,InterpolantFactoryMethodDiscrete:function(t){return new ga(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodLinear:function(t){return new ma(this.times,this.values,this.getValueSize(),t)},InterpolantFactoryMethodSmooth:function(t){return new fa(this.times,this.values,this.getValueSize(),t)},setInterpolation:function(t){var e;switch(t){case 2300:e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(void 0!==e)this.createInterpolant=e;else{var i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(i);this.setInterpolation(this.DefaultInterpolation)}console.warn("THREE.KeyframeTrack:",i)}},getInterpolation:function(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}},getValueSize:function(){return this.values.length/this.times.length},shift:function(t){if(0!==t)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]+=t;return this},scale:function(t){if(1!==t)for(var e=this.times,i=0,n=e.length;i!==n;++i)e[i]*=t;return this},trim:function(t,e){for(var i=this.times,n=i.length,r=0,a=n-1;r!==n&&i[r]<t;)++r;for(;-1!==a&&i[a]>e;)--a;if(++a,0!==r||a!==n){r>=a&&(r=(a=Math.max(a,1))-1);var o=this.getValueSize();this.times=va.arraySlice(i,r,a),this.values=va.arraySlice(this.values,r*o,a*o)}return this},validate:function(){var t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);var i=this.times,n=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);for(var a=null,o=0;o!==r;o++){var s=i[o];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,o,s),t=!1;break}if(null!==a&&a>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,o,s,a),t=!1;break}a=s}if(void 0!==n&&va.isTypedArray(n)){o=0;for(var c=n.length;o!==c;++o){var h=n[o];if(isNaN(h)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,o,h),t=!1;break}}}return t},optimize:function(){for(var t=this.times,e=this.values,i=this.getValueSize(),n=2302===this.getInterpolation(),r=1,a=t.length-1,o=1;o<a;++o){var s=!1,c=t[o];if(c!==t[o+1]&&(1!==o||c!==c[0]))if(n)s=!0;else for(var h=o*i,l=h-i,u=h+i,p=0;p!==i;++p){var d=e[h+p];if(d!==e[l+p]||d!==e[u+p]){s=!0;break}}if(s){if(o!==r){t[r]=t[o];var f=o*i,m=r*i;for(p=0;p!==i;++p)e[m+p]=e[f+p]}++r}}if(a>0){t[r]=t[a];for(f=a*i,m=r*i,p=0;p!==i;++p)e[m+p]=e[f+p];++r}return r!==t.length&&(this.times=va.arraySlice(t,0,r),this.values=va.arraySlice(e,0,r*i)),this}}),xa.prototype=Object.assign(Object.create(ya.prototype),{constructor:xa,ValueTypeName:"vector"}),Object.assign(_a,{parse:function(t){for(var e=[],i=t.tracks,n=1/(t.fps||1),r=0,a=i.length;r!==a;++r)e.push(ya.parse(i[r]).scale(n));return new _a(t.name,t.duration,e)},toJSON:function(t){for(var e=[],i=t.tracks,n={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid},r=0,a=i.length;r!==a;++r)e.push(ya.toJSON(i[r]));return n},CreateFromMorphTargetSequence:function(t,e,i,n){for(var r=e.length,a=[],o=0;o<r;o++){var s=[],c=[];s.push((o+r-1)%r,o,(o+1)%r),c.push(0,1,0);var h=va.getKeyframeOrder(s);s=va.sortedArray(s,1,h),c=va.sortedArray(c,1,h),n||0!==s[0]||(s.push(r),c.push(c[0])),a.push(new da(".morphTargetInfluences["+e[o].name+"]",s,c).scale(1/i))}return new _a(t,-1,a)},findByName:function(t,e){var i=t;if(!Array.isArray(t)){var n=t;i=n.geometry&&n.geometry.animations||n.animations}for(var r=0;r<i.length;r++)if(i[r].name===e)return i[r];return null},CreateClipsFromMorphTargetSequences:function(t,e,i){for(var n={},r=/^([\w-]*?)([\d]+)$/,a=0,o=t.length;a<o;a++){var s=t[a],c=s.name.match(r);if(c&&c.length>1){var h=n[u=c[1]];h||(n[u]=h=[]),h.push(s)}}var l=[];for(var u in n)l.push(_a.CreateFromMorphTargetSequence(u,n[u],e,i));return l},parseAnimation:function(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;for(var i=function(t,e,i,n,r){if(0!==i.length){var a=[],o=[];va.flattenJSON(i,a,o,n),0!==a.length&&r.push(new t(e,a,o))}},n=[],r=t.name||"default",a=t.length||-1,o=t.fps||30,s=t.hierarchy||[],c=0;c<s.length;c++){var h=s[c].keys;if(h&&0!==h.length)if(h[0].morphTargets){for(var l={},u=0;u<h.length;u++)if(h[u].morphTargets)for(var p=0;p<h[u].morphTargets.length;p++)l[h[u].morphTargets[p]]=-1;for(var d in l){var f=[],m=[];for(p=0;p!==h[u].morphTargets.length;++p){var g=h[u];f.push(g.time),m.push(g.morphTarget===d?1:0)}n.push(new da(".morphTargetInfluence["+d+"]",f,m))}a=l.length*(o||1)}else{var v=".bones["+e[c].name+"]";i(xa,v+".position",h,"pos",n),i(ua,v+".quaternion",h,"rot",n),i(xa,v+".scale",h,"scl",n)}}return 0===n.length?null:new _a(r,a,n)}}),Object.assign(_a.prototype,{resetDuration:function(){for(var t=0,e=0,i=this.tracks.length;e!==i;++e){var n=this.tracks[e];t=Math.max(t,n.times[n.times.length-1])}this.duration=t},trim:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this},optimize:function(){for(var t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}}),Object.assign(ba.prototype,{load:function(t,e,i,n){var r=this;new Mr(r.manager).load(t,(function(t){e(r.parse(JSON.parse(t)))}),i,n)},setTextures:function(t){this.textures=t},parse:function(t){var e=this.textures;function i(t){return void 0===e[t]&&console.warn("THREE.MaterialLoader: Undefined texture",t),e[t]}var n=new yr[t.type];if(void 0!==t.uuid&&(n.uuid=t.uuid),void 0!==t.name&&(n.name=t.name),void 0!==t.color&&n.color.setHex(t.color),void 0!==t.roughness&&(n.roughness=t.roughness),void 0!==t.metalness&&(n.metalness=t.metalness),void 0!==t.emissive&&n.emissive.setHex(t.emissive),void 0!==t.specular&&n.specular.setHex(t.specular),void 0!==t.shininess&&(n.shininess=t.shininess),void 0!==t.clearCoat&&(n.clearCoat=t.clearCoat),void 0!==t.clearCoatRoughness&&(n.clearCoatRoughness=t.clearCoatRoughness),void 0!==t.uniforms&&(n.uniforms=t.uniforms),void 0!==t.vertexShader&&(n.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(n.fragmentShader=t.fragmentShader),void 0!==t.vertexColors&&(n.vertexColors=t.vertexColors),void 0!==t.fog&&(n.fog=t.fog),void 0!==t.flatShading&&(n.flatShading=t.flatShading),void 0!==t.blending&&(n.blending=t.blending),void 0!==t.side&&(n.side=t.side),void 0!==t.opacity&&(n.opacity=t.opacity),void 0!==t.transparent&&(n.transparent=t.transparent),void 0!==t.alphaTest&&(n.alphaTest=t.alphaTest),void 0!==t.depthTest&&(n.depthTest=t.depthTest),void 0!==t.depthWrite&&(n.depthWrite=t.depthWrite),void 0!==t.colorWrite&&(n.colorWrite=t.colorWrite),void 0!==t.wireframe&&(n.wireframe=t.wireframe),void 0!==t.wireframeLinewidth&&(n.wireframeLinewidth=t.wireframeLinewidth),void 0!==t.wireframeLinecap&&(n.wireframeLinecap=t.wireframeLinecap),void 0!==t.wireframeLinejoin&&(n.wireframeLinejoin=t.wireframeLinejoin),void 0!==t.rotation&&(n.rotation=t.rotation),1!==t.linewidth&&(n.linewidth=t.linewidth),void 0!==t.dashSize&&(n.dashSize=t.dashSize),void 0!==t.gapSize&&(n.gapSize=t.gapSize),void 0!==t.scale&&(n.scale=t.scale),void 0!==t.polygonOffset&&(n.polygonOffset=t.polygonOffset),void 0!==t.polygonOffsetFactor&&(n.polygonOffsetFactor=t.polygonOffsetFactor),void 0!==t.polygonOffsetUnits&&(n.polygonOffsetUnits=t.polygonOffsetUnits),void 0!==t.skinning&&(n.skinning=t.skinning),void 0!==t.morphTargets&&(n.morphTargets=t.morphTargets),void 0!==t.dithering&&(n.dithering=t.dithering),void 0!==t.visible&&(n.visible=t.visible),void 0!==t.userData&&(n.userData=t.userData),void 0!==t.shading&&(n.flatShading=1===t.shading),void 0!==t.size&&(n.size=t.size),void 0!==t.sizeAttenuation&&(n.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(n.map=i(t.map)),void 0!==t.alphaMap&&(n.alphaMap=i(t.alphaMap),n.transparent=!0),void 0!==t.bumpMap&&(n.bumpMap=i(t.bumpMap)),void 0!==t.bumpScale&&(n.bumpScale=t.bumpScale),void 0!==t.normalMap&&(n.normalMap=i(t.normalMap)),void 0!==t.normalScale){var r=t.normalScale;!1===Array.isArray(r)&&(r=[r,r]),n.normalScale=(new v).fromArray(r)}return void 0!==t.displacementMap&&(n.displacementMap=i(t.displacementMap)),void 0!==t.displacementScale&&(n.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(n.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(n.roughnessMap=i(t.roughnessMap)),void 0!==t.metalnessMap&&(n.metalnessMap=i(t.metalnessMap)),void 0!==t.emissiveMap&&(n.emissiveMap=i(t.emissiveMap)),void 0!==t.emissiveIntensity&&(n.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(n.specularMap=i(t.specularMap)),void 0!==t.envMap&&(n.envMap=i(t.envMap)),void 0!==t.reflectivity&&(n.reflectivity=t.reflectivity),void 0!==t.lightMap&&(n.lightMap=i(t.lightMap)),void 0!==t.lightMapIntensity&&(n.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(n.aoMap=i(t.aoMap)),void 0!==t.aoMapIntensity&&(n.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(n.gradientMap=i(t.gradientMap)),n}}),Object.assign(wa.prototype,{load:function(t,e,i,n){var r=this;new Mr(r.manager).load(t,(function(t){e(r.parse(JSON.parse(t)))}),i,n)},parse:function(t){var e=new bt,i=t.data.index;if(void 0!==i){var n=new Aa[i.type](i.array);e.setIndex(new ct(n,1))}var r=t.data.attributes;for(var a in r){var o=r[a];n=new Aa[o.type](o.array);e.addAttribute(a,new ct(n,o.itemSize,o.normalized))}var s=t.data.groups||t.data.drawcalls||t.data.offsets;if(void 0!==s)for(var c=0,h=s.length;c!==h;++c){var l=s[c];e.addGroup(l.start,l.count,l.materialIndex)}var u=t.data.boundingSphere;if(void 0!==u){var p=new _;void 0!==u.center&&p.fromArray(u.center),e.boundingSphere=new N(p,u.radius)}return e}});var Ma,Ea,Ta,Sa,Aa={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:"undefined"!=typeof Uint8ClampedArray?Uint8ClampedArray:Uint8Array,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Ra(){}Ra.Handlers={handlers:[],add:function(t,e){this.handlers.push(t,e)},get:function(t){for(var e=this.handlers,i=0,n=e.length;i<n;i+=2){var r=e[i],a=e[i+1];if(r.test(t))return a}return null}},Object.assign(Ra.prototype,{crossOrigin:void 0,onLoadStart:function(){},onLoadProgress:function(){},onLoadComplete:function(){},initMaterials:function(t,e,i){for(var n=[],r=0;r<t.length;++r)n[r]=this.createMaterial(t[r],e,i);return n},createMaterial:(Ma={NoBlending:0,NormalBlending:1,AdditiveBlending:2,SubtractiveBlending:3,MultiplyBlending:4,CustomBlending:5},Ea=new H,Ta=new Ar,Sa=new ba,function(t,e,i){var n={};function r(t,r,a,o,s){var c,h=e+t,l=Ra.Handlers.get(h);null!==l?c=l.load(h):(Ta.setCrossOrigin(i),c=Ta.load(h)),void 0!==r&&(c.repeat.fromArray(r),1!==r[0]&&(c.wrapS=1e3),1!==r[1]&&(c.wrapT=1e3)),void 0!==a&&c.offset.fromArray(a),void 0!==o&&("repeat"===o[0]&&(c.wrapS=1e3),"mirror"===o[0]&&(c.wrapS=1002),"repeat"===o[1]&&(c.wrapT=1e3),"mirror"===o[1]&&(c.wrapT=1002)),void 0!==s&&(c.anisotropy=s);var u=g.generateUUID();return n[u]=c,u}var a={uuid:g.generateUUID(),type:"MeshLambertMaterial"};for(var o in t){var s=t[o];switch(o){case"DbgColor":case"DbgIndex":case"opticalDensity":case"illumination":break;case"DbgName":a.name=s;break;case"blending":a.blending=Ma[s];break;case"colorAmbient":case"mapAmbient":console.warn("THREE.Loader.createMaterial:",o,"is no longer supported.");break;case"colorDiffuse":a.color=Ea.fromArray(s).getHex();break;case"colorSpecular":a.specular=Ea.fromArray(s).getHex();break;case"colorEmissive":a.emissive=Ea.fromArray(s).getHex();break;case"specularCoef":a.shininess=s;break;case"shading":"basic"===s.toLowerCase()&&(a.type="MeshBasicMaterial"),"phong"===s.toLowerCase()&&(a.type="MeshPhongMaterial"),"standard"===s.toLowerCase()&&(a.type="MeshStandardMaterial");break;case"mapDiffuse":a.map=r(s,t.mapDiffuseRepeat,t.mapDiffuseOffset,t.mapDiffuseWrap,t.mapDiffuseAnisotropy);break;case"mapDiffuseRepeat":case"mapDiffuseOffset":case"mapDiffuseWrap":case"mapDiffuseAnisotropy":break;case"mapEmissive":a.emissiveMap=r(s,t.mapEmissiveRepeat,t.mapEmissiveOffset,t.mapEmissiveWrap,t.mapEmissiveAnisotropy);break;case"mapEmissiveRepeat":case"mapEmissiveOffset":case"mapEmissiveWrap":case"mapEmissiveAnisotropy":break;case"mapLight":a.lightMap=r(s,t.mapLightRepeat,t.mapLightOffset,t.mapLightWrap,t.mapLightAnisotropy);break;case"mapLightRepeat":case"mapLightOffset":case"mapLightWrap":case"mapLightAnisotropy":break;case"mapAO":a.aoMap=r(s,t.mapAORepeat,t.mapAOOffset,t.mapAOWrap,t.mapAOAnisotropy);break;case"mapAORepeat":case"mapAOOffset":case"mapAOWrap":case"mapAOAnisotropy":break;case"mapBump":a.bumpMap=r(s,t.mapBumpRepeat,t.mapBumpOffset,t.mapBumpWrap,t.mapBumpAnisotropy);break;case"mapBumpScale":a.bumpScale=s;break;case"mapBumpRepeat":case"mapBumpOffset":case"mapBumpWrap":case"mapBumpAnisotropy":break;case"mapNormal":a.normalMap=r(s,t.mapNormalRepeat,t.mapNormalOffset,t.mapNormalWrap,t.mapNormalAnisotropy);break;case"mapNormalFactor":a.normalScale=s;break;case"mapNormalRepeat":case"mapNormalOffset":case"mapNormalWrap":case"mapNormalAnisotropy":break;case"mapSpecular":a.specularMap=r(s,t.mapSpecularRepeat,t.mapSpecularOffset,t.mapSpecularWrap,t.mapSpecularAnisotropy);break;case"mapSpecularRepeat":case"mapSpecularOffset":case"mapSpecularWrap":case"mapSpecularAnisotropy":break;case"mapMetalness":a.metalnessMap=r(s,t.mapMetalnessRepeat,t.mapMetalnessOffset,t.mapMetalnessWrap,t.mapMetalnessAnisotropy);break;case"mapMetalnessRepeat":case"mapMetalnessOffset":case"mapMetalnessWrap":case"mapMetalnessAnisotropy":break;case"mapRoughness":a.roughnessMap=r(s,t.mapRoughnessRepeat,t.mapRoughnessOffset,t.mapRoughnessWrap,t.mapRoughnessAnisotropy);break;case"mapRoughnessRepeat":case"mapRoughnessOffset":case"mapRoughnessWrap":case"mapRoughnessAnisotropy":break;case"mapAlpha":a.alphaMap=r(s,t.mapAlphaRepeat,t.mapAlphaOffset,t.mapAlphaWrap,t.mapAlphaAnisotropy);break;case"mapAlphaRepeat":case"mapAlphaOffset":case"mapAlphaWrap":case"mapAlphaAnisotropy":break;case"flipSided":a.side=1;break;case"doubleSided":a.side=2;break;case"transparency":console.warn("THREE.Loader.createMaterial: transparency has been renamed to opacity"),a.opacity=s;break;case"depthTest":case"depthWrite":case"colorWrite":case"opacity":case"reflectivity":case"transparent":case"visible":case"wireframe":a[o]=s;break;case"vertexColors":!0===s&&(a.vertexColors=2),"face"===s&&(a.vertexColors=1);break;default:console.error("THREE.Loader.createMaterial: Unsupported",o,s)}}return"MeshBasicMaterial"===a.type&&delete a.emissive,"MeshPhongMaterial"!==a.type&&delete a.specular,a.opacity<1&&(a.transparent=!0),Sa.setTextures(n),Sa.parse(a)})});var La=function(t){var e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)};function Pa(t){"boolean"==typeof t&&(console.warn("THREE.JSONLoader: showStatus parameter has been removed from constructor."),t=void 0),this.manager=void 0!==t?t:br,this.withCredentials=!1}Object.assign(Pa.prototype,{load:function(t,e,i,n){var r=this,a=this.texturePath&&"string"==typeof this.texturePath?this.texturePath:La(t),o=new Mr(this.manager);o.setWithCredentials(this.withCredentials),o.load(t,(function(i){var n=JSON.parse(i),o=n.metadata;if(void 0!==o){var s=o.type;if(void 0!==s&&"object"===s.toLowerCase())return void console.error("THREE.JSONLoader: "+t+" should be loaded with THREE.ObjectLoader instead.")}var c=r.parse(n,a);e(c.geometry,c.materials)}),i,n)},setTexturePath:function(t){this.texturePath=t},parse:function(t,e){void 0!==t.data&&(t=t.data),void 0!==t.scale?t.scale=1/t.scale:t.scale=1;var i=new st;return function(t,e){function i(t,e){return t&1<<e}var n,r,a,o,s,c,h,l,u,p,d,f,m,g,y,x,b,w,M,E,T,S,A,R,L,P=t.faces,C=t.vertices,O=t.normals,I=t.colors,N=t.scale,D=0;if(void 0!==t.uvs){for(n=0;n<t.uvs.length;n++)t.uvs[n].length&&D++;for(n=0;n<D;n++)e.faceVertexUvs[n]=[]}for(o=0,s=C.length;o<s;)(w=new _).x=C[o++]*N,w.y=C[o++]*N,w.z=C[o++]*N,e.vertices.push(w);for(o=0,s=P.length;o<s;)if(d=i(p=P[o++],0),f=i(p,1),m=i(p,3),g=i(p,4),y=i(p,5),x=i(p,6),b=i(p,7),d){if((E=new nt).a=P[o],E.b=P[o+1],E.c=P[o+3],(T=new nt).a=P[o+1],T.b=P[o+2],T.c=P[o+3],o+=4,f&&(u=P[o++],E.materialIndex=u,T.materialIndex=u),a=e.faces.length,m)for(n=0;n<D;n++)for(R=t.uvs[n],e.faceVertexUvs[n][a]=[],e.faceVertexUvs[n][a+1]=[],r=0;r<4;r++)L=new v(R[2*(l=P[o++])],R[2*l+1]),2!==r&&e.faceVertexUvs[n][a].push(L),0!==r&&e.faceVertexUvs[n][a+1].push(L);if(g&&(h=3*P[o++],E.normal.set(O[h++],O[h++],O[h]),T.normal.copy(E.normal)),y)for(n=0;n<4;n++)h=3*P[o++],A=new _(O[h++],O[h++],O[h]),2!==n&&E.vertexNormals.push(A),0!==n&&T.vertexNormals.push(A);if(x&&(S=I[c=P[o++]],E.color.setHex(S),T.color.setHex(S)),b)for(n=0;n<4;n++)S=I[c=P[o++]],2!==n&&E.vertexColors.push(new H(S)),0!==n&&T.vertexColors.push(new H(S));e.faces.push(E),e.faces.push(T)}else{if((M=new nt).a=P[o++],M.b=P[o++],M.c=P[o++],f&&(u=P[o++],M.materialIndex=u),a=e.faces.length,m)for(n=0;n<D;n++)for(R=t.uvs[n],e.faceVertexUvs[n][a]=[],r=0;r<3;r++)L=new v(R[2*(l=P[o++])],R[2*l+1]),e.faceVertexUvs[n][a].push(L);if(g&&(h=3*P[o++],M.normal.set(O[h++],O[h++],O[h])),y)for(n=0;n<3;n++)h=3*P[o++],A=new _(O[h++],O[h++],O[h]),M.vertexNormals.push(A);if(x&&(c=P[o++],M.color.setHex(I[c])),b)for(n=0;n<3;n++)c=P[o++],M.vertexColors.push(new H(I[c]));e.faces.push(M)}}(t,i),function(t,e){var i=void 0!==t.influencesPerVertex?t.influencesPerVertex:2;if(t.skinWeights)for(var n=0,r=t.skinWeights.length;n<r;n+=i){var a=t.skinWeights[n],o=i>1?t.skinWeights[n+1]:0,s=i>2?t.skinWeights[n+2]:0,c=i>3?t.skinWeights[n+3]:0;e.skinWeights.push(new L(a,o,s,c))}if(t.skinIndices)for(n=0,r=t.skinIndices.length;n<r;n+=i){var h=t.skinIndices[n],l=i>1?t.skinIndices[n+1]:0,u=i>2?t.skinIndices[n+2]:0,p=i>3?t.skinIndices[n+3]:0;e.skinIndices.push(new L(h,l,u,p))}e.bones=t.bones,e.bones&&e.bones.length>0&&(e.skinWeights.length!==e.skinIndices.length||e.skinIndices.length!==e.vertices.length)&&console.warn("When skinning, number of vertices ("+e.vertices.length+"), skinIndices ("+e.skinIndices.length+"), and skinWeights ("+e.skinWeights.length+") should match.")}(t,i),function(t,e){var i=t.scale;if(void 0!==t.morphTargets)for(var n=0,r=t.morphTargets.length;n<r;n++){e.morphTargets[n]={},e.morphTargets[n].name=t.morphTargets[n].name,e.morphTargets[n].vertices=[];for(var a=e.morphTargets[n].vertices,o=t.morphTargets[n].vertices,s=0,c=o.length;s<c;s+=3){var h=new _;h.x=o[s]*i,h.y=o[s+1]*i,h.z=o[s+2]*i,a.push(h)}}if(void 0!==t.morphColors&&t.morphColors.length>0){console.warn('THREE.JSONLoader: "morphColors" no longer supported. Using them as face colors.');var l=e.faces,u=t.morphColors[0].colors;for(n=0,r=l.length;n<r;n++)l[n].color.fromArray(u,3*n)}}(t,i),function(t,e){var i=[],n=[];void 0!==t.animation&&n.push(t.animation),void 0!==t.animations&&(t.animations.length?n=n.concat(t.animations):n.push(t.animations));for(var r=0;r<n.length;r++){var a=_a.parseAnimation(n[r],e.bones);a&&i.push(a)}if(e.morphTargets){var o=_a.CreateClipsFromMorphTargetSequences(e.morphTargets,10);i=i.concat(o)}i.length>0&&(e.animations=i)}(t,i),i.computeFaceNormals(),i.computeBoundingSphere(),void 0===t.materials||0===t.materials.length?{geometry:i}:{geometry:i,materials:Ra.prototype.initMaterials(t.materials,e,this.crossOrigin)}}}),Object.assign(function(t){this.manager=void 0!==t?t:br,this.texturePath=""}.prototype,{load:function(t,e,i,n){""===this.texturePath&&(this.texturePath=t.substring(0,t.lastIndexOf("/")+1));var r=this;new Mr(r.manager).load(t,(function(i){var a=null;try{a=JSON.parse(i)}catch(e){return void 0!==n&&n(e),void console.error("THREE:ObjectLoader: Can't parse "+t+".",e.message)}var o=a.metadata;void 0!==o&&void 0!==o.type&&"geometry"!==o.type.toLowerCase()?r.parse(a,e):console.error("THREE.ObjectLoader: Can't load "+t+". Use THREE.JSONLoader instead.")}),i,n)},setTexturePath:function(t){return this.texturePath=t,this},setCrossOrigin:function(t){return this.crossOrigin=t,this},parse:function(t,e){var i=this.parseShape(t.shapes),n=this.parseGeometries(t.geometries,i),r=this.parseImages(t.images,(function(){void 0!==e&&e(s)})),a=this.parseTextures(t.textures,r),o=this.parseMaterials(t.materials,a),s=this.parseObject(t.object,n,o);return t.animations&&(s.animations=this.parseAnimations(t.animations)),void 0!==t.images&&0!==t.images.length||void 0!==e&&e(s),s},parseShape:function(t){var e={};if(void 0!==t)for(var i=0,n=t.length;i<n;i++){var r=(new Jr).fromJSON(t[i]);e[r.uuid]=r}return e},parseGeometries:function(t,e){var i={};if(void 0!==t)for(var n=new Pa,r=new wa,a=0,o=t.length;a<o;a++){var s,c=t[a];switch(c.type){case"PlaneGeometry":case"PlaneBufferGeometry":s=new cr[c.type](c.width,c.height,c.widthSegments,c.heightSegments);break;case"BoxGeometry":case"BoxBufferGeometry":case"CubeGeometry":s=new cr[c.type](c.width,c.height,c.depth,c.widthSegments,c.heightSegments,c.depthSegments);break;case"CircleGeometry":case"CircleBufferGeometry":s=new cr[c.type](c.radius,c.segments,c.thetaStart,c.thetaLength);break;case"CylinderGeometry":case"CylinderBufferGeometry":s=new cr[c.type](c.radiusTop,c.radiusBottom,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"ConeGeometry":case"ConeBufferGeometry":s=new cr[c.type](c.radius,c.height,c.radialSegments,c.heightSegments,c.openEnded,c.thetaStart,c.thetaLength);break;case"SphereGeometry":case"SphereBufferGeometry":s=new cr[c.type](c.radius,c.widthSegments,c.heightSegments,c.phiStart,c.phiLength,c.thetaStart,c.thetaLength);break;case"DodecahedronGeometry":case"DodecahedronBufferGeometry":case"IcosahedronGeometry":case"IcosahedronBufferGeometry":case"OctahedronGeometry":case"OctahedronBufferGeometry":case"TetrahedronGeometry":case"TetrahedronBufferGeometry":s=new cr[c.type](c.radius,c.detail);break;case"RingGeometry":case"RingBufferGeometry":s=new cr[c.type](c.innerRadius,c.outerRadius,c.thetaSegments,c.phiSegments,c.thetaStart,c.thetaLength);break;case"TorusGeometry":case"TorusBufferGeometry":s=new cr[c.type](c.radius,c.tube,c.radialSegments,c.tubularSegments,c.arc);break;case"TorusKnotGeometry":case"TorusKnotBufferGeometry":s=new cr[c.type](c.radius,c.tube,c.tubularSegments,c.radialSegments,c.p,c.q);break;case"LatheGeometry":case"LatheBufferGeometry":s=new cr[c.type](c.points,c.segments,c.phiStart,c.phiLength);break;case"PolyhedronGeometry":case"PolyhedronBufferGeometry":s=new cr[c.type](c.vertices,c.indices,c.radius,c.details);break;case"ShapeGeometry":case"ShapeBufferGeometry":for(var h=[],l=0,u=c.shapes.length;l<u;l++){var p=e[c.shapes[l]];h.push(p)}s=new cr[c.type](h,c.curveSegments);break;case"ExtrudeGeometry":case"ExtrudeBufferGeometry":for(h=[],l=0,u=c.shapes.length;l<u;l++){p=e[c.shapes[l]];h.push(p)}var d=c.options.extrudePath;void 0!==d&&(c.options.extrudePath=(new qr[d.type]).fromJSON(d)),s=new cr[c.type](h,c.options);break;case"BufferGeometry":s=r.parse(c);break;case"Geometry":s=n.parse(c,this.texturePath).geometry;break;default:console.warn('THREE.ObjectLoader: Unsupported geometry type "'+c.type+'"');continue}s.uuid=c.uuid,void 0!==c.name&&(s.name=c.name),!0===s.isBufferGeometry&&void 0!==c.userData&&(s.userData=c.userData),i[c.uuid]=s}return i},parseMaterials:function(t,e){var i={};if(void 0!==t){var n=new ba;n.setTextures(e);for(var r=0,a=t.length;r<a;r++){var o=t[r];if("MultiMaterial"===o.type){for(var s=[],c=0;c<o.materials.length;c++)s.push(n.parse(o.materials[c]));i[o.uuid]=s}else i[o.uuid]=n.parse(o)}}return i},parseAnimations:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i],r=_a.parse(n);void 0!==n.uuid&&(r.uuid=n.uuid),e.push(r)}return e},parseImages:function(t,e){var i=this,n={};function r(t){return i.manager.itemStart(t),a.load(t,(function(){i.manager.itemEnd(t)}),void 0,(function(){i.manager.itemEnd(t),i.manager.itemError(t)}))}if(void 0!==t&&t.length>0){var a=new Tr(new _r(e));a.setCrossOrigin(this.crossOrigin);for(var o=0,s=t.length;o<s;o++){var c=t[o],h=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c.url)?c.url:i.texturePath+c.url;n[c.uuid]=r(h)}}return n},parseTextures:function(t,e){function i(t,e){return"number"==typeof t?t:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",t),e[t])}var n={};if(void 0!==t)for(var r=0,a=t.length;r<a;r++){var o=t[r];void 0===o.image&&console.warn('THREE.ObjectLoader: No "image" specified for',o.uuid),void 0===e[o.image]&&console.warn("THREE.ObjectLoader: Undefined image",o.image);var s=new R(e[o.image]);s.needsUpdate=!0,s.uuid=o.uuid,void 0!==o.name&&(s.name=o.name),void 0!==o.mapping&&(s.mapping=i(o.mapping,Oa)),void 0!==o.offset&&s.offset.fromArray(o.offset),void 0!==o.repeat&&s.repeat.fromArray(o.repeat),void 0!==o.center&&s.center.fromArray(o.center),void 0!==o.rotation&&(s.rotation=o.rotation),void 0!==o.wrap&&(s.wrapS=i(o.wrap[0],Ia),s.wrapT=i(o.wrap[1],Ia)),void 0!==o.format&&(s.format=o.format),void 0!==o.minFilter&&(s.minFilter=i(o.minFilter,Na)),void 0!==o.magFilter&&(s.magFilter=i(o.magFilter,Na)),void 0!==o.anisotropy&&(s.anisotropy=o.anisotropy),void 0!==o.flipY&&(s.flipY=o.flipY),n[o.uuid]=s}return n},parseObject:function(t,e,i){var n;function r(t){return void 0===e[t]&&console.warn("THREE.ObjectLoader: Undefined geometry",t),e[t]}function a(t){if(void 0!==t){if(Array.isArray(t)){for(var e=[],n=0,r=t.length;n<r;n++){var a=t[n];void 0===i[a]&&console.warn("THREE.ObjectLoader: Undefined material",a),e.push(i[a])}return e}return void 0===i[t]&&console.warn("THREE.ObjectLoader: Undefined material",t),i[t]}}switch(t.type){case"Scene":n=new Oi,void 0!==t.background&&Number.isInteger(t.background)&&(n.background=new H(t.background)),void 0!==t.fog&&("Fog"===t.fog.type?n.fog=new Ci(t.fog.color,t.fog.near,t.fog.far):"FogExp2"===t.fog.type&&(n.fog=new Pi(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":n=new Ti(t.fov,t.aspect,t.near,t.far),void 0!==t.focus&&(n.focus=t.focus),void 0!==t.zoom&&(n.zoom=t.zoom),void 0!==t.filmGauge&&(n.filmGauge=t.filmGauge),void 0!==t.filmOffset&&(n.filmOffset=t.filmOffset),void 0!==t.view&&(n.view=Object.assign({},t.view));break;case"OrthographicCamera":n=new it(t.left,t.right,t.top,t.bottom,t.near,t.far),void 0!==t.zoom&&(n.zoom=t.zoom),void 0!==t.view&&(n.view=Object.assign({},t.view));break;case"AmbientLight":n=new aa(t.color,t.intensity);break;case"DirectionalLight":n=new ra(t.color,t.intensity);break;case"PointLight":n=new ia(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":n=new oa(t.color,t.intensity,t.width,t.height);break;case"SpotLight":n=new ea(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":n=new Kr(t.color,t.groundColor,t.intensity);break;case"SkinnedMesh":console.warn("THREE.ObjectLoader.parseObject() does not support SkinnedMesh yet.");case"Mesh":var o=r(t.geometry),s=a(t.material);n=o.bones&&o.bones.length>0?new Bi(o,s):new Gt(o,s);break;case"LOD":n=new Di;break;case"Line":n=new Gi(r(t.geometry),a(t.material),t.mode);break;case"LineLoop":n=new Vi(r(t.geometry),a(t.material));break;case"LineSegments":n=new Hi(r(t.geometry),a(t.material));break;case"PointCloud":case"Points":n=new ji(r(t.geometry),a(t.material));break;case"Sprite":n=new Ni(a(t.material));break;case"Group":n=new Wi;break;default:n=new tt}if(n.uuid=t.uuid,void 0!==t.name&&(n.name=t.name),void 0!==t.matrix?(n.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(n.matrixAutoUpdate=t.matrixAutoUpdate),n.matrixAutoUpdate&&n.matrix.decompose(n.position,n.quaternion,n.scale)):(void 0!==t.position&&n.position.fromArray(t.position),void 0!==t.rotation&&n.rotation.fromArray(t.rotation),void 0!==t.quaternion&&n.quaternion.fromArray(t.quaternion),void 0!==t.scale&&n.scale.fromArray(t.scale)),void 0!==t.castShadow&&(n.castShadow=t.castShadow),void 0!==t.receiveShadow&&(n.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.bias&&(n.shadow.bias=t.shadow.bias),void 0!==t.shadow.radius&&(n.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&n.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(n.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(n.visible=t.visible),void 0!==t.frustumCulled&&(n.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(n.renderOrder=t.renderOrder),void 0!==t.userData&&(n.userData=t.userData),void 0!==t.children)for(var c=t.children,h=0;h<c.length;h++)n.add(this.parseObject(c[h],e,i));if("LOD"===t.type)for(var l=t.levels,u=0;u<l.length;u++){var p=l[u],d=n.getObjectByProperty("uuid",p.object);void 0!==d&&n.addLevel(d,p.distance)}return n}});var Ca,Oa={UVMapping:300,CubeReflectionMapping:301,CubeRefractionMapping:302,EquirectangularReflectionMapping:303,EquirectangularRefractionMapping:304,SphericalReflectionMapping:305,CubeUVReflectionMapping:306,CubeUVRefractionMapping:307},Ia={RepeatWrapping:1e3,ClampToEdgeWrapping:1001,MirroredRepeatWrapping:1002},Na={NearestFilter:1003,NearestMipMapNearestFilter:1004,NearestMipMapLinearFilter:1005,LinearFilter:1006,LinearMipMapNearestFilter:1007,LinearMipMapLinearFilter:1008};function Da(t){"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.manager=void 0!==t?t:br,this.options=void 0}function Ua(){this.type="ShapePath",this.color=new H,this.subPaths=[],this.currentPath=null}function za(t){this.type="Font",this.data=t}function Ba(t,e,i,n,r,a){var o=a.glyphs[t]||a.glyphs["?"];if(o){var s,c,h,l,u,p,d,f,m=new Ua;if(o.o)for(var g=o._cachedOutline||(o._cachedOutline=o.o.split(" ")),v=0,y=g.length;v<y;){switch(g[v++]){case"m":s=g[v++]*i+n,c=g[v++]*i+r,m.moveTo(s,c);break;case"l":s=g[v++]*i+n,c=g[v++]*i+r,m.lineTo(s,c);break;case"q":h=g[v++]*i+n,l=g[v++]*i+r,u=g[v++]*i+n,p=g[v++]*i+r,m.quadraticCurveTo(u,p,h,l);break;case"b":h=g[v++]*i+n,l=g[v++]*i+r,u=g[v++]*i+n,p=g[v++]*i+r,d=g[v++]*i+n,f=g[v++]*i+r,m.bezierCurveTo(u,p,d,f,h,l)}}return{offsetX:o.ha*i,path:m}}}Da.prototype={constructor:Da,setOptions:function(t){return this.options=t,this},load:function(t,e,i,n){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);var r=this,a=xr.get(t);if(void 0!==a)return r.manager.itemStart(t),setTimeout((function(){e&&e(a),r.manager.itemEnd(t)}),0),a;fetch(t).then((function(t){return t.blob()})).then((function(t){return createImageBitmap(t,r.options)})).then((function(i){xr.add(t,i),e&&e(i),r.manager.itemEnd(t)})).catch((function(e){n&&n(e),r.manager.itemEnd(t),r.manager.itemError(t)}))},setCrossOrigin:function(){return this},setPath:function(t){return this.path=t,this}},Object.assign(Ua.prototype,{moveTo:function(t,e){this.currentPath=new Zr,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e)},lineTo:function(t,e){this.currentPath.lineTo(t,e)},quadraticCurveTo:function(t,e,i,n){this.currentPath.quadraticCurveTo(t,e,i,n)},bezierCurveTo:function(t,e,i,n,r,a){this.currentPath.bezierCurveTo(t,e,i,n,r,a)},splineThru:function(t){this.currentPath.splineThru(t)},toShapes:function(t,e){function i(t){for(var e=[],i=0,n=t.length;i<n;i++){var r=t[i],a=new Jr;a.curves=r.curves,e.push(a)}return e}function n(t,e){for(var i=e.length,n=!1,r=i-1,a=0;a<i;r=a++){var o=e[r],s=e[a],c=s.x-o.x,h=s.y-o.y;if(Math.abs(h)>Number.EPSILON){if(h<0&&(o=e[a],c=-c,s=e[r],h=-h),t.y<o.y||t.y>s.y)continue;if(t.y===o.y){if(t.x===o.x)return!0}else{var l=h*(t.x-o.x)-c*(t.y-o.y);if(0===l)return!0;if(l<0)continue;n=!n}}else{if(t.y!==o.y)continue;if(s.x<=t.x&&t.x<=o.x||o.x<=t.x&&t.x<=s.x)return!0}}return n}var r=zn.isClockWise,a=this.subPaths;if(0===a.length)return[];if(!0===e)return i(a);var o,s,c,h=[];if(1===a.length)return s=a[0],(c=new Jr).curves=s.curves,h.push(c),h;var l=!r(a[0].getPoints());l=t?!l:l;var u,p,d=[],f=[],m=[],g=0;f[g]=void 0,m[g]=[];for(var v=0,y=a.length;v<y;v++)o=r(u=(s=a[v]).getPoints()),(o=t?!o:o)?(!l&&f[g]&&g++,f[g]={s:new Jr,p:u},f[g].s.curves=s.curves,l&&g++,m[g]=[]):m[g].push({h:s,p:u[0]});if(!f[0])return i(a);if(f.length>1){for(var x=!1,_=[],b=0,w=f.length;b<w;b++)d[b]=[];for(b=0,w=f.length;b<w;b++)for(var M=m[b],E=0;E<M.length;E++){for(var T=M[E],S=!0,A=0;A<f.length;A++)n(T.p,f[A].p)&&(b!==A&&_.push({froms:b,tos:A,hole:E}),S?(S=!1,d[A].push(T)):x=!0);S&&d[b].push(T)}_.length>0&&(x||(m=d))}v=0;for(var R=f.length;v<R;v++){c=f[v].s,h.push(c);for(var L=0,P=(p=m[v]).length;L<P;L++)c.holes.push(p[L].h)}return h}}),Object.assign(za.prototype,{isFont:!0,generateShapes:function(t,e,i){void 0===e&&(e=100),void 0===i&&(i=4);for(var n=[],r=function(t,e,i,n){for(var r=Array.from?Array.from(t):String(t).split(""),a=e/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*a,s=[],c=0,h=0,l=0;l<r.length;l++){var u=r[l];if("\n"===u)c=0,h-=o;else{var p=Ba(u,i,a,c,h,n);c+=p.offsetX,s.push(p.path)}}return s}(t,e,i,this.data),a=0,o=r.length;a<o;a++)Array.prototype.push.apply(n,r[a].toShapes());return n}}),Object.assign(function(t){this.manager=void 0!==t?t:br}.prototype,{load:function(t,e,i,n){var r=this,a=new Mr(this.manager);a.setPath(this.path),a.load(t,(function(t){var i;try{i=JSON.parse(t)}catch(e){console.warn("THREE.FontLoader: typeface.js support is being deprecated. Use typeface.json instead."),i=JSON.parse(t.substring(65,t.length-2))}var n=r.parse(i);e&&e(n)}),i,n)},parse:function(t){return new za(t)},setPath:function(t){return this.path=t,this}});var Fa,Ga,Ha,Va,ka,ja,Wa,Xa,qa,Ya,Za=function(){return void 0===Ca&&(Ca=new(window.AudioContext||window.webkitAudioContext)),Ca};function Ja(t){this.manager=void 0!==t?t:br}function Qa(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ti,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ti,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1}function Ka(t,e,i){tt.call(this),this.type="CubeCamera";var n=new Ti(90,1,t,e);n.up.set(0,-1,0),n.lookAt(new _(1,0,0)),this.add(n);var r=new Ti(90,1,t,e);r.up.set(0,-1,0),r.lookAt(new _(-1,0,0)),this.add(r);var a=new Ti(90,1,t,e);a.up.set(0,0,1),a.lookAt(new _(0,1,0)),this.add(a);var o=new Ti(90,1,t,e);o.up.set(0,0,-1),o.lookAt(new _(0,-1,0)),this.add(o);var s=new Ti(90,1,t,e);s.up.set(0,-1,0),s.lookAt(new _(0,0,1)),this.add(s);var c=new Ti(90,1,t,e);c.up.set(0,-1,0),c.lookAt(new _(0,0,-1)),this.add(c);var h={format:1022,magFilter:1006,minFilter:1006};this.renderTarget=new C(i,i,h),this.renderTarget.texture.name="CubeCamera",this.update=function(t,e){null===this.parent&&this.updateMatrixWorld();var i=this.renderTarget,h=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,i.activeCubeFace=0,t.render(e,n,i),i.activeCubeFace=1,t.render(e,r,i),i.activeCubeFace=2,t.render(e,a,i),i.activeCubeFace=3,t.render(e,o,i),i.activeCubeFace=4,t.render(e,s,i),i.texture.generateMipmaps=h,i.activeCubeFace=5,t.render(e,c,i),t.setRenderTarget(null)},this.clear=function(t,e,i,n){for(var r=this.renderTarget,a=0;a<6;a++)r.activeCubeFace=a,t.setRenderTarget(r),t.clear(e,i,n);t.setRenderTarget(null)}}function $a(){tt.call(this),this.type="AudioListener",this.context=Za(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null}function to(t){tt.call(this),this.type="Audio",this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.loop=!1,this.startTime=0,this.offset=0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.sourceType="empty",this.filters=[]}function eo(t){to.call(this,t),this.panner=this.context.createPanner(),this.panner.connect(this.gain)}function io(t,e){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=void 0!==e?e:2048,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}function no(t,e,i){this.binding=t,this.valueSize=i;var n,r=Float64Array;switch(e){case"quaternion":n=this._slerp;break;case"string":case"bool":r=Array,n=this._select;break;default:n=this._lerp}this.buffer=new r(4*i),this._mixBufferRegion=n,this.cumulativeWeight=0,this.useCount=0,this.referenceCount=0}Object.assign(Ja.prototype,{load:function(t,e,i,n){var r=new Mr(this.manager);r.setResponseType("arraybuffer"),r.load(t,(function(t){Za().decodeAudioData(t,(function(t){e(t)}))}),i,n)}}),Object.assign(Qa.prototype,{update:(qa=new y,Ya=new y,function(t){if(Fa!==this||Ga!==t.focus||Ha!==t.fov||Va!==t.aspect*this.aspect||ka!==t.near||ja!==t.far||Wa!==t.zoom||Xa!==this.eyeSep){Fa=this,Ga=t.focus,Ha=t.fov,Va=t.aspect*this.aspect,ka=t.near,ja=t.far,Wa=t.zoom;var e,i,n=t.projectionMatrix.clone(),r=(Xa=this.eyeSep/2)*ka/Ga,a=ka*Math.tan(g.DEG2RAD*Ha*.5)/Wa;Ya.elements[12]=-Xa,qa.elements[12]=Xa,e=-a*Va+r,i=a*Va+r,n.elements[0]=2*ka/(i-e),n.elements[8]=(i+e)/(i-e),this.cameraL.projectionMatrix.copy(n),e=-a*Va-r,i=a*Va-r,n.elements[0]=2*ka/(i-e),n.elements[8]=(i+e)/(i-e),this.cameraR.projectionMatrix.copy(n)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(Ya),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(qa)})}),Ka.prototype=Object.create(tt.prototype),Ka.prototype.constructor=Ka,$a.prototype=Object.assign(Object.create(tt.prototype),{constructor:$a,getInput:function(){return this.gain},removeFilter:function(){null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null)},getFilter:function(){return this.filter},setFilter:function(t){null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination)},getMasterVolume:function(){return this.gain.gain.value},setMasterVolume:function(t){this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01)},updateMatrixWorld:function(){var t=new _,e=new x,i=new _,n=new _;return function(r){tt.prototype.updateMatrixWorld.call(this,r);var a=this.context.listener,o=this.up;this.matrixWorld.decompose(t,e,i),n.set(0,0,-1).applyQuaternion(e),a.positionX?(a.positionX.setValueAtTime(t.x,this.context.currentTime),a.positionY.setValueAtTime(t.y,this.context.currentTime),a.positionZ.setValueAtTime(t.z,this.context.currentTime),a.forwardX.setValueAtTime(n.x,this.context.currentTime),a.forwardY.setValueAtTime(n.y,this.context.currentTime),a.forwardZ.setValueAtTime(n.z,this.context.currentTime),a.upX.setValueAtTime(o.x,this.context.currentTime),a.upY.setValueAtTime(o.y,this.context.currentTime),a.upZ.setValueAtTime(o.z,this.context.currentTime)):(a.setPosition(t.x,t.y,t.z),a.setOrientation(n.x,n.y,n.z,o.x,o.y,o.z))}}()}),to.prototype=Object.assign(Object.create(tt.prototype),{constructor:to,getOutput:function(){return this.gain},setNodeSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this},setMediaElementSource:function(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this},setBuffer:function(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this},play:function(){if(!0!==this.isPlaying){if(!1!==this.hasPlaybackControl){var t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.onended=this.onEnded.bind(this),t.playbackRate.setValueAtTime(this.playbackRate,this.startTime),this.startTime=this.context.currentTime,t.start(this.startTime,this.offset),this.isPlaying=!0,this.source=t,this.connect()}console.warn("THREE.Audio: this Audio has no playback control.")}else console.warn("THREE.Audio: Audio is already playing.")},pause:function(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this.source.stop(),this.offset+=(this.context.currentTime-this.startTime)*this.playbackRate,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")},stop:function(){if(!1!==this.hasPlaybackControl)return this.source.stop(),this.offset=0,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")},connect:function(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this},disconnect:function(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(var t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this},getFilters:function(){return this.filters},setFilters:function(t){return t||(t=[]),!0===this.isPlaying?(this.disconnect(),this.filters=t,this.connect()):this.filters=t,this},getFilter:function(){return this.getFilters()[0]},setFilter:function(t){return this.setFilters(t?[t]:[])},setPlaybackRate:function(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setValueAtTime(this.playbackRate,this.context.currentTime),this;console.warn("THREE.Audio: this Audio has no playback control.")},getPlaybackRate:function(){return this.playbackRate},onEnded:function(){this.isPlaying=!1},getLoop:function(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop},setLoop:function(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")},getVolume:function(){return this.gain.gain.value},setVolume:function(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}),eo.prototype=Object.assign(Object.create(to.prototype),{constructor:eo,getOutput:function(){return this.panner},getRefDistance:function(){return this.panner.refDistance},setRefDistance:function(t){this.panner.refDistance=t},getRolloffFactor:function(){return this.panner.rolloffFactor},setRolloffFactor:function(t){this.panner.rolloffFactor=t},getDistanceModel:function(){return this.panner.distanceModel},setDistanceModel:function(t){this.panner.distanceModel=t},getMaxDistance:function(){return this.panner.maxDistance},setMaxDistance:function(t){this.panner.maxDistance=t},updateMatrixWorld:function(){var t=new _;return function(e){tt.prototype.updateMatrixWorld.call(this,e),t.setFromMatrixPosition(this.matrixWorld),this.panner.setPosition(t.x,t.y,t.z)}}()}),Object.assign(io.prototype,{getFrequencyData:function(){return this.analyser.getByteFrequencyData(this.data),this.data},getAverageFrequency:function(){for(var t=0,e=this.getFrequencyData(),i=0;i<e.length;i++)t+=e[i];return t/e.length}}),Object.assign(no.prototype,{accumulate:function(t,e){var i=this.buffer,n=this.valueSize,r=t*n+n,a=this.cumulativeWeight;if(0===a){for(var o=0;o!==n;++o)i[r+o]=i[o];a=e}else{var s=e/(a+=e);this._mixBufferRegion(i,r,0,s,n)}this.cumulativeWeight=a},apply:function(t){var e=this.valueSize,i=this.buffer,n=t*e+e,r=this.cumulativeWeight,a=this.binding;if(this.cumulativeWeight=0,r<1){var o=3*e;this._mixBufferRegion(i,n,o,1-r,e)}for(var s=e,c=e+e;s!==c;++s)if(i[s]!==i[s+e]){a.setValue(i,n);break}},saveOriginalState:function(){var t=this.binding,e=this.buffer,i=this.valueSize,n=3*i;t.getValue(e,n);for(var r=i,a=n;r!==a;++r)e[r]=e[n+r%i];this.cumulativeWeight=0},restoreOriginalState:function(){var t=3*this.valueSize;this.binding.setValue(this.buffer,t)},_select:function(t,e,i,n,r){if(n>=.5)for(var a=0;a!==r;++a)t[e+a]=t[i+a]},_slerp:function(t,e,i,n){x.slerpFlat(t,e,t,e,t,i,n)},_lerp:function(t,e,i,n,r){for(var a=1-n,o=0;o!==r;++o){var s=e+o;t[s]=t[s]*a+t[i+o]*n}}});var ro,ao,oo,so,co,ho,lo,uo,po,fo,mo,go;function vo(t,e,i){var n=i||yo.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,n)}function yo(t,e,i){this.path=e,this.parsedPath=i||yo.parseTrackName(e),this.node=yo.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t}function xo(t,e,i){this._mixer=t,this._clip=e,this._localRoot=i||null;for(var n=e.tracks,r=n.length,a=new Array(r),o={endingStart:2400,endingEnd:2400},s=0;s!==r;++s){var c=n[s].createInterpolant(null);a[s]=c,c.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=new Array(r),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}function _o(t){this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}function bo(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}function wo(){bt.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}function Mo(t,e,i,n){this.data=t,this.itemSize=e,this.offset=i,this.normalized=!0===n}function Eo(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.dynamic=!1,this.updateRange={offset:0,count:-1},this.version=0}function To(t,e,i){Eo.call(this,t,e),this.meshPerAttribute=i||1}function So(t,e,i){ct.call(this,t,e),this.meshPerAttribute=i||1}function Ao(t,e){return t.distance-e.distance}function Ro(t,e,i,n){if(!1!==t.visible&&(t.raycast(e,i),!0===n))for(var r=t.children,a=0,o=r.length;a<o;a++)Ro(r[a],e,i,!0)}function Lo(t,e){this.min=void 0!==t?t:new v(1/0,1/0),this.max=void 0!==e?e:new v(-1/0,-1/0)}function Po(t){tt.call(this),this.material=t,this.render=function(){}}function Co(t,e,i,n){this.object=t,this.size=void 0!==e?e:1;var r=void 0!==i?i:16711680,a=void 0!==n?n:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=3*s.faces.length:s&&s.isBufferGeometry&&(o=s.attributes.normal.count);var c=new bt,h=new gt(2*o*3,3);c.addAttribute("position",h),Hi.call(this,c,new Fi({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function Oo(t,e){tt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;for(var i=new bt,n=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1],r=0,a=1;r<32;r++,a++){var o=r/32*Math.PI*2,s=a/32*Math.PI*2;n.push(Math.cos(o),Math.sin(o),1,Math.cos(s),Math.sin(s),1)}i.addAttribute("position",new gt(n,3));var c=new Fi({fog:!1});this.cone=new Hi(i,c),this.add(this.cone),this.update()}function Io(t){for(var e=function t(e){var i=[];e&&e.isBone&&i.push(e);for(var n=0;n<e.children.length;n++)i.push.apply(i,t(e.children[n]));return i}(t),i=new bt,n=[],r=[],a=new H(0,0,1),o=new H(0,1,0),s=0;s<e.length;s++){var c=e[s];c.parent&&c.parent.isBone&&(n.push(0,0,0),n.push(0,0,0),r.push(a.r,a.g,a.b),r.push(o.r,o.g,o.b))}i.addAttribute("position",new gt(n,3)),i.addAttribute("color",new gt(r,3));var h=new Fi({vertexColors:2,depthTest:!1,depthWrite:!1,transparent:!0});Hi.call(this,i,h),this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}function No(t,e,i){this.light=t,this.light.updateMatrixWorld(),this.color=i;var n=new qn(e,4,2),r=new Dt({wireframe:!0,fog:!1});Gt.call(this,n,r),this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}function Do(t,e){tt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;var i=new Fi({fog:!1}),n=new bt;n.addAttribute("position",new ct(new Float32Array(15),3)),this.line=new Gi(n,i),this.add(this.line),this.update()}function Uo(t,e,i){tt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i;var n=new rn(e);n.rotateY(.5*Math.PI),this.material=new Dt({wireframe:!0,fog:!1}),void 0===this.color&&(this.material.vertexColors=2);var r=n.getAttribute("position"),a=new Float32Array(3*r.count);n.addAttribute("color",new ct(a,3)),this.add(new Gt(n,this.material)),this.update()}function zo(t,e,i,n){t=t||10,e=e||10,i=new H(void 0!==i?i:4473924),n=new H(void 0!==n?n:8947848);for(var r=e/2,a=t/e,o=t/2,s=[],c=[],h=0,l=0,u=-o;h<=e;h++,u+=a){s.push(-o,0,u,o,0,u),s.push(u,0,-o,u,0,o);var p=h===r?i:n;p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3,p.toArray(c,l),l+=3}var d=new bt;d.addAttribute("position",new gt(s,3)),d.addAttribute("color",new gt(c,3));var f=new Fi({vertexColors:2});Hi.call(this,d,f)}function Bo(t,e,i,n,r,a){t=t||10,e=e||16,i=i||8,n=n||64,r=new H(void 0!==r?r:4473924),a=new H(void 0!==a?a:8947848);var o,s,c,h,l,u,p,d=[],f=[];for(h=0;h<=e;h++)c=h/e*(2*Math.PI),o=Math.sin(c)*t,s=Math.cos(c)*t,d.push(0,0,0),d.push(o,0,s),p=1&h?r:a,f.push(p.r,p.g,p.b),f.push(p.r,p.g,p.b);for(h=0;h<=i;h++)for(p=1&h?r:a,u=t-t/i*h,l=0;l<n;l++)c=l/n*(2*Math.PI),o=Math.sin(c)*u,s=Math.cos(c)*u,d.push(o,0,s),f.push(p.r,p.g,p.b),c=(l+1)/n*(2*Math.PI),o=Math.sin(c)*u,s=Math.cos(c)*u,d.push(o,0,s),f.push(p.r,p.g,p.b);var m=new bt;m.addAttribute("position",new gt(d,3)),m.addAttribute("color",new gt(f,3));var g=new Fi({vertexColors:2});Hi.call(this,m,g)}function Fo(t,e,i,n){this.object=t,this.size=void 0!==e?e:1;var r=void 0!==i?i:16776960,a=void 0!==n?n:1,o=0,s=this.object.geometry;s&&s.isGeometry?o=s.faces.length:console.warn("THREE.FaceNormalsHelper: only THREE.Geometry is supported. Use THREE.VertexNormalsHelper, instead.");var c=new bt,h=new gt(2*o*3,3);c.addAttribute("position",h),Hi.call(this,c,new Fi({color:r,linewidth:a})),this.matrixAutoUpdate=!1,this.update()}function Go(t,e,i){tt.call(this),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,void 0===e&&(e=1);var n=new bt;n.addAttribute("position",new gt([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));var r=new Fi({fog:!1});this.lightPlane=new Gi(n,r),this.add(this.lightPlane),(n=new bt).addAttribute("position",new gt([0,0,0,0,0,1],3)),this.targetLine=new Gi(n,r),this.add(this.targetLine),this.update()}function Ho(t){var e=new bt,i=new Fi({color:16777215,vertexColors:1}),n=[],r=[],a={},o=new H(16755200),s=new H(16711680),c=new H(43775),h=new H(16777215),l=new H(3355443);function u(t,e,i){p(t,i),p(e,i)}function p(t,e){n.push(0,0,0),r.push(e.r,e.g,e.b),void 0===a[t]&&(a[t]=[]),a[t].push(n.length/3-1)}u("n1","n2",o),u("n2","n4",o),u("n4","n3",o),u("n3","n1",o),u("f1","f2",o),u("f2","f4",o),u("f4","f3",o),u("f3","f1",o),u("n1","f1",o),u("n2","f2",o),u("n3","f3",o),u("n4","f4",o),u("p","n1",s),u("p","n2",s),u("p","n3",s),u("p","n4",s),u("u1","u2",c),u("u2","u3",c),u("u3","u1",c),u("c","t",h),u("p","c",l),u("cn1","cn2",l),u("cn3","cn4",l),u("cf1","cf2",l),u("cf3","cf4",l),e.addAttribute("position",new gt(n,3)),e.addAttribute("color",new gt(r,3)),Hi.call(this,e,i),this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}function Vo(t,e){this.object=t,void 0===e&&(e=16776960);var i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),n=new Float32Array(24),r=new bt;r.setIndex(new ct(i,1)),r.addAttribute("position",new ct(n,3)),Hi.call(this,r,new Fi({color:e})),this.matrixAutoUpdate=!1,this.update()}function ko(t,e){this.type="Box3Helper",this.box=t;var i=void 0!==e?e:16776960,n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new bt;r.setIndex(new ct(n,1)),r.addAttribute("position",new gt([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),Hi.call(this,r,new Fi({color:i})),this.geometry.computeBoundingSphere()}function jo(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var n=void 0!==i?i:16776960,r=new bt;r.addAttribute("position",new gt([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),r.computeBoundingSphere(),Gi.call(this,r,new Fi({color:n}));var a=new bt;a.addAttribute("position",new gt([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),a.computeBoundingSphere(),this.add(new Gt(a,new Dt({color:n,opacity:.2,transparent:!0,depthWrite:!1})))}function Wo(t,e,i,n,r,a){tt.call(this),void 0===n&&(n=16776960),void 0===i&&(i=1),void 0===r&&(r=.2*i),void 0===a&&(a=.2*r),void 0===po&&((po=new bt).addAttribute("position",new gt([0,0,0,0,1,0],3)),(fo=new nr(0,.5,1,5,1)).translate(0,-.5,0)),this.position.copy(e),this.line=new Gi(po,new Fi({color:n})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Gt(fo,new Dt({color:n})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,r,a)}function Xo(t){var e=[0,0,0,t=t||1,0,0,0,0,0,0,t,0,0,0,0,0,0,t],i=new bt;i.addAttribute("position",new gt(e,3)),i.addAttribute("color",new gt([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));var n=new Fi({vertexColors:2});Hi.call(this,i,n)}Object.assign(vo.prototype,{getValue:function(t,e){this.bind();var i=this._targetGroup.nCachedObjects_,n=this._bindings[i];void 0!==n&&n.getValue(t,e)},setValue:function(t,e){for(var i=this._bindings,n=this._targetGroup.nCachedObjects_,r=i.length;n!==r;++n)i[n].setValue(t,e)},bind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()},unbind:function(){for(var t=this._bindings,e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}),Object.assign(yo,{Composite:vo,create:function(t,e,i){return t&&t.isAnimationObjectGroup?new yo.Composite(t,e,i):new yo(t,e,i)},sanitizeNodeName:(uo=new RegExp("[\\[\\]\\.:\\/]","g"),function(t){return t.replace(/\s/g,"_").replace(uo,"")}),parseTrackName:(ro="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",ao=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),oo=/(WCOD+)?/.source.replace("WCOD",ro),so=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),co=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),ho=new RegExp("^"+ao+oo+so+co+"$"),lo=["material","materials","bones"],function(t){var e=ho.exec(t);if(!e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);var i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},n=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==n&&-1!==n){var r=i.nodeName.substring(n+1);-1!==lo.indexOf(r)&&(i.nodeName=i.nodeName.substring(0,n),i.objectName=r)}if(null===i.propertyName||0===i.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}),findNode:function(t,e){if(!e||""===e||"root"===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){var i=t.skeleton.getBoneByName(e);if(void 0!==i)return i}if(t.children){var n=function(t){for(var i=0;i<t.length;i++){var r=t[i];if(r.name===e||r.uuid===e)return r;var a=n(r.children);if(a)return a}return null},r=n(t.children);if(r)return r}return null}}),Object.assign(yo.prototype,{_getValue_unavailable:function(){},_setValue_unavailable:function(){},BindingType:{Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Versioning:{None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},GetterByBindingType:[function(t,e){t[e]=this.node[this.propertyName]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)t[e++]=i[n]},function(t,e){t[e]=this.resolvedProperty[this.propertyIndex]},function(t,e){this.resolvedProperty.toArray(t,e)}],SetterByBindingTypeAndVersioning:[[function(t,e){this.targetObject[this.propertyName]=t[e]},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++]},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.needsUpdate=!0},function(t,e){for(var i=this.resolvedProperty,n=0,r=i.length;n!==r;++n)i[n]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty[this.propertyIndex]=t[e]},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}],[function(t,e){this.resolvedProperty.fromArray(t,e)},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0},function(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}]],getValue:function(t,e){this.bind(),this.getValue(t,e)},setValue:function(t,e){this.bind(),this.setValue(t,e)},bind:function(){var t=this.node,e=this.parsedPath,i=e.objectName,n=e.propertyName,r=e.propertyIndex;if(t||(t=yo.findNode(this.rootNode,e.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,t){if(i){var a=e.objectIndex;switch(i){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(var o=0;o<t.length;o++)if(t[o].name===a){a=o;break}break;default:if(void 0===t[i])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[i]}if(void 0!==a){if(void 0===t[a])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[a]}}var s=t[n];if(void 0!==s){var c=this.Versioning.None;void 0!==t.needsUpdate?(c=this.Versioning.NeedsUpdate,this.targetObject=t):void 0!==t.matrixWorldNeedsUpdate&&(c=this.Versioning.MatrixWorldNeedsUpdate,this.targetObject=t);var h=this.BindingType.Direct;if(void 0!==r){if("morphTargetInfluences"===n){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);for(o=0;o<this.node.geometry.morphAttributes.position.length;o++)if(t.geometry.morphAttributes.position[o].name===r){r=o;break}}else{if(!t.geometry.morphTargets)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphTargets.",this);for(o=0;o<this.node.geometry.morphTargets.length;o++)if(t.geometry.morphTargets[o].name===r){r=o;break}}}h=this.BindingType.ArrayElement,this.resolvedProperty=s,this.propertyIndex=r}else void 0!==s.fromArray&&void 0!==s.toArray?(h=this.BindingType.HasFromToArray,this.resolvedProperty=s):Array.isArray(s)?(h=this.BindingType.EntireArray,this.resolvedProperty=s):this.propertyName=n;this.getValue=this.GetterByBindingType[h],this.setValue=this.SetterByBindingTypeAndVersioning[h][c]}else{var l=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+l+"."+n+" but it wasn't found.",t)}}else console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.")},unbind:function(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}),
//!\ DECLARE ALIAS AFTER assign prototype !
Object.assign(yo.prototype,{_getValue_unbound:yo.prototype.getValue,_setValue_unbound:yo.prototype.setValue}),Object.assign(function(){this.uuid=g.generateUUID(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;var t={};this._indicesByUUID=t;for(var e=0,i=arguments.length;e!==i;++e)t[arguments[e].uuid]=e;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};var n=this;this.stats={objects:{get total(){return n._objects.length},get inUse(){return this.total-n.nCachedObjects_}},get bindingsPerObject(){return n._bindings.length}}}.prototype,{isAnimationObjectGroup:!0,add:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._paths,a=this._parsedPaths,o=this._bindings,s=o.length,c=void 0,h=0,l=arguments.length;h!==l;++h){var u=arguments[h],p=u.uuid,d=n[p];if(void 0===d){d=e++,n[p]=d,t.push(u);for(var f=0,m=s;f!==m;++f)o[f].push(new yo(u,r[f],a[f]))}else if(d<i){c=t[d];var g=--i,v=t[g];n[v.uuid]=d,t[d]=v,n[p]=g,t[g]=u;for(f=0,m=s;f!==m;++f){var y=o[f],x=y[g],_=y[d];y[d]=x,void 0===_&&(_=new yo(u,r[f],a[f])),y[g]=_}}else t[d]!==c&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=i},remove:function(){for(var t=this._objects,e=this.nCachedObjects_,i=this._indicesByUUID,n=this._bindings,r=n.length,a=0,o=arguments.length;a!==o;++a){var s=arguments[a],c=s.uuid,h=i[c];if(void 0!==h&&h>=e){var l=e++,u=t[l];i[u.uuid]=h,t[h]=u,i[c]=l,t[l]=s;for(var p=0,d=r;p!==d;++p){var f=n[p],m=f[l],g=f[h];f[h]=m,f[l]=g}}}this.nCachedObjects_=e},uncache:function(){for(var t=this._objects,e=t.length,i=this.nCachedObjects_,n=this._indicesByUUID,r=this._bindings,a=r.length,o=0,s=arguments.length;o!==s;++o){var c=arguments[o],h=c.uuid,l=n[h];if(void 0!==l)if(delete n[h],l<i){var u=--i,p=t[u],d=t[y=--e];n[p.uuid]=l,t[l]=p,n[d.uuid]=u,t[u]=d,t.pop();for(var f=0,m=a;f!==m;++f){var g=(x=r[f])[u],v=x[y];x[l]=g,x[u]=v,x.pop()}}else{var y;n[(d=t[y=--e]).uuid]=l,t[l]=d,t.pop();for(f=0,m=a;f!==m;++f){var x;(x=r[f])[l]=x[y],x.pop()}}}this.nCachedObjects_=i},subscribe_:function(t,e){var i=this._bindingsIndicesByPath,n=i[t],r=this._bindings;if(void 0!==n)return r[n];var a=this._paths,o=this._parsedPaths,s=this._objects,c=s.length,h=this.nCachedObjects_,l=new Array(c);n=r.length,i[t]=n,a.push(t),o.push(e),r.push(l);for(var u=h,p=s.length;u!==p;++u){var d=s[u];l[u]=new yo(d,t,e)}return l},unsubscribe_:function(t){var e=this._bindingsIndicesByPath,i=e[t];if(void 0!==i){var n=this._paths,r=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o];e[t[o]]=i,a[i]=s,a.pop(),r[i]=r[o],r.pop(),n[i]=n[o],n.pop()}}}),Object.assign(xo.prototype,{play:function(){return this._mixer._activateAction(this),this},stop:function(){return this._mixer._deactivateAction(this),this.reset()},reset:function(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()},isRunning:function(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)},isScheduled:function(){return this._mixer._isActiveAction(this)},startAt:function(t){return this._startTime=t,this},setLoop:function(t,e){return this.loop=t,this.repetitions=e,this},setEffectiveWeight:function(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()},getEffectiveWeight:function(){return this._effectiveWeight},fadeIn:function(t){return this._scheduleFading(t,0,1)},fadeOut:function(t){return this._scheduleFading(t,1,0)},crossFadeFrom:function(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){var n=this._clip.duration,r=t._clip.duration,a=r/n,o=n/r;t.warp(1,a,e),this.warp(o,1,e)}return this},crossFadeTo:function(t,e,i){return t.crossFadeFrom(this,e,i)},stopFading:function(){var t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},setEffectiveTimeScale:function(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()},getEffectiveTimeScale:function(){return this._effectiveTimeScale},setDuration:function(t){return this.timeScale=this._clip.duration/t,this.stopWarping()},syncWith:function(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()},halt:function(t){return this.warp(this._effectiveTimeScale,0,t)},warp:function(t,e,i){var n=this._mixer,r=n.time,a=this._timeScaleInterpolant,o=this.timeScale;null===a&&(a=n._lendControlInterpolant(),this._timeScaleInterpolant=a);var s=a.parameterPositions,c=a.sampleValues;return s[0]=r,s[1]=r+i,c[0]=t/o,c[1]=e/o,this},stopWarping:function(){var t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this},getMixer:function(){return this._mixer},getClip:function(){return this._clip},getRoot:function(){return this._localRoot||this._mixer._root},_update:function(t,e,i,n){if(this.enabled){var r=this._startTime;if(null!==r){var a=(t-r)*i;if(a<0||0===i)return;this._startTime=null,e=i*a}e*=this._updateTimeScale(t);var o=this._updateTime(e),s=this._updateWeight(t);if(s>0)for(var c=this._interpolants,h=this._propertyBindings,l=0,u=c.length;l!==u;++l)c[l].evaluate(o),h[l].accumulate(n,s)}else this._updateWeight(t)},_updateWeight:function(t){var e=0;if(this.enabled){e=this.weight;var i=this._weightInterpolant;if(null!==i){var n=i.evaluate(t)[0];e*=n,t>i.parameterPositions[1]&&(this.stopFading(),0===n&&(this.enabled=!1))}}return this._effectiveWeight=e,e},_updateTimeScale:function(t){var e=0;if(!this.paused){e=this.timeScale;var i=this._timeScaleInterpolant;if(null!==i)e*=i.evaluate(t)[0],t>i.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e)}return this._effectiveTimeScale=e,e},_updateTime:function(t){var e=this.time+t;if(0===t)return e;var i=this._clip.duration,n=this.loop,r=this._loopCount;if(2200===n){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(e>=i)e=i;else{if(!(e<0))break t;e=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{var a=2202===n;if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),e>=i||e<0){var o=Math.floor(e/i);e-=i*o,r+=Math.abs(o);var s=this.repetitions-r;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,e=t>0?i:0,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===s){var c=t<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:o})}}if(a&&1==(1&r))return this.time=e,i-e}return this.time=e,e},_setEndings:function(t,e,i){var n=this._interpolantSettings;i?(n.endingStart=2401,n.endingEnd=2401):(n.endingStart=t?this.zeroSlopeAtStart?2401:2400:2402,n.endingEnd=e?this.zeroSlopeAtEnd?2401:2400:2402)},_scheduleFading:function(t,e,i){var n=this._mixer,r=n.time,a=this._weightInterpolant;null===a&&(a=n._lendControlInterpolant(),this._weightInterpolant=a);var o=a.parameterPositions,s=a.sampleValues;return o[0]=r,s[0]=e,o[1]=r+t,s[1]=i,this}}),_o.prototype=Object.assign(Object.create(r.prototype),{constructor:_o,_bindAction:function(t,e){var i=t._localRoot||this._root,n=t._clip.tracks,r=n.length,a=t._propertyBindings,o=t._interpolants,s=i.uuid,c=this._bindingsByRootAndName,h=c[s];void 0===h&&(h={},c[s]=h);for(var l=0;l!==r;++l){var u=n[l],p=u.name,d=h[p];if(void 0!==d)a[l]=d;else{if(void 0!==(d=a[l])){null===d._cacheIndex&&(++d.referenceCount,this._addInactiveBinding(d,s,p));continue}var f=e&&e._propertyBindings[l].binding.parsedPath;++(d=new no(yo.create(i,p,f),u.ValueTypeName,u.getValueSize())).referenceCount,this._addInactiveBinding(d,s,p),a[l]=d}o[l].resultBuffer=d.buffer}},_activateAction:function(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){var e=(t._localRoot||this._root).uuid,i=t._clip.uuid,n=this._actionsByClip[i];this._bindAction(t,n&&n.knownActions[0]),this._addInactiveAction(t,i,e)}for(var r=t._propertyBindings,a=0,o=r.length;a!==o;++a){var s=r[a];0==s.useCount++&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(t)}},_deactivateAction:function(t){if(this._isActiveAction(t)){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];0==--r.useCount&&(r.restoreOriginalState(),this._takeBackBinding(r))}this._takeBackAction(t)}},_initMemoryManager:function(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;var t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}},_isActiveAction:function(t){var e=t._cacheIndex;return null!==e&&e<this._nActiveActions},_addInactiveAction:function(t,e,i){var n=this._actions,r=this._actionsByClip,a=r[e];if(void 0===a)a={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,r[e]=a;else{var o=a.knownActions;t._byClipCacheIndex=o.length,o.push(t)}t._cacheIndex=n.length,n.push(t),a.actionByRoot[i]=t},_removeInactiveAction:function(t){var e=this._actions,i=e[e.length-1],n=t._cacheIndex;i._cacheIndex=n,e[n]=i,e.pop(),t._cacheIndex=null;var r=t._clip.uuid,a=this._actionsByClip,o=a[r],s=o.knownActions,c=s[s.length-1],h=t._byClipCacheIndex;c._byClipCacheIndex=h,s[h]=c,s.pop(),t._byClipCacheIndex=null,delete o.actionByRoot[(t._localRoot||this._root).uuid],0===s.length&&delete a[r],this._removeInactiveBindingsForAction(t)},_removeInactiveBindingsForAction:function(t){for(var e=t._propertyBindings,i=0,n=e.length;i!==n;++i){var r=e[i];0==--r.referenceCount&&this._removeInactiveBinding(r)}},_lendAction:function(t){var e=this._actions,i=t._cacheIndex,n=this._nActiveActions++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackAction:function(t){var e=this._actions,i=t._cacheIndex,n=--this._nActiveActions,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_addInactiveBinding:function(t,e,i){var n=this._bindingsByRootAndName,r=n[e],a=this._bindings;void 0===r&&(r={},n[e]=r),r[i]=t,t._cacheIndex=a.length,a.push(t)},_removeInactiveBinding:function(t){var e=this._bindings,i=t.binding,n=i.rootNode.uuid,r=i.path,a=this._bindingsByRootAndName,o=a[n],s=e[e.length-1],c=t._cacheIndex;s._cacheIndex=c,e[c]=s,e.pop(),delete o[r];t:{for(var h in o)break t;delete a[n]}},_lendBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=this._nActiveBindings++,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_takeBackBinding:function(t){var e=this._bindings,i=t._cacheIndex,n=--this._nActiveBindings,r=e[n];t._cacheIndex=n,e[n]=t,r._cacheIndex=i,e[i]=r},_lendControlInterpolant:function(){var t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return void 0===i&&((i=new ma(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer)).__cacheIndex=e,t[e]=i),i},_takeBackControlInterpolant:function(t){var e=this._controlInterpolants,i=t.__cacheIndex,n=--this._nActiveControlInterpolants,r=e[n];t.__cacheIndex=n,e[n]=t,r.__cacheIndex=i,e[i]=r},_controlInterpolantsResultBuffer:new Float32Array(1),clipAction:function(t,e){var i=e||this._root,n=i.uuid,r="string"==typeof t?_a.findByName(i,t):t,a=null!==r?r.uuid:t,o=this._actionsByClip[a],s=null;if(void 0!==o){var c=o.actionByRoot[n];if(void 0!==c)return c;s=o.knownActions[0],null===r&&(r=s._clip)}if(null===r)return null;var h=new xo(this,r,e);return this._bindAction(h,s),this._addInactiveAction(h,a,n),h},existingAction:function(t,e){var i=e||this._root,n=i.uuid,r="string"==typeof t?_a.findByName(i,t):t,a=r?r.uuid:t,o=this._actionsByClip[a];return void 0!==o&&o.actionByRoot[n]||null},stopAllAction:function(){var t=this._actions,e=this._nActiveActions,i=this._bindings,n=this._nActiveBindings;this._nActiveActions=0,this._nActiveBindings=0;for(var r=0;r!==e;++r)t[r].reset();for(r=0;r!==n;++r)i[r].useCount=0;return this},update:function(t){t*=this.timeScale;for(var e=this._actions,i=this._nActiveActions,n=this.time+=t,r=Math.sign(t),a=this._accuIndex^=1,o=0;o!==i;++o){e[o]._update(n,t,r,a)}var s=this._bindings,c=this._nActiveBindings;for(o=0;o!==c;++o)s[o].apply(a);return this},getRoot:function(){return this._root},uncacheClip:function(t){var e=this._actions,i=t.uuid,n=this._actionsByClip,r=n[i];if(void 0!==r){for(var a=r.knownActions,o=0,s=a.length;o!==s;++o){var c=a[o];this._deactivateAction(c);var h=c._cacheIndex,l=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,l._cacheIndex=h,e[h]=l,e.pop(),this._removeInactiveBindingsForAction(c)}delete n[i]}},uncacheRoot:function(t){var e=t.uuid,i=this._actionsByClip;for(var n in i){var r=i[n].actionByRoot[e];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}var a=this._bindingsByRootAndName[e];if(void 0!==a)for(var o in a){var s=a[o];s.restoreOriginalState(),this._removeInactiveBinding(s)}},uncacheAction:function(t,e){var i=this.existingAction(t,e);null!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}}),bo.prototype.clone=function(){return new bo(void 0===this.value.clone?this.value:this.value.clone())},wo.prototype=Object.assign(Object.create(bt.prototype),{constructor:wo,isInstancedBufferGeometry:!0,copy:function(t){return bt.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)}}),Object.defineProperties(Mo.prototype,{count:{get:function(){return this.data.count}},array:{get:function(){return this.data.array}}}),Object.assign(Mo.prototype,{isInterleavedBufferAttribute:!0,setX:function(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this},setY:function(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this},setZ:function(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this},setW:function(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this},getX:function(t){return this.data.array[t*this.data.stride+this.offset]},getY:function(t){return this.data.array[t*this.data.stride+this.offset+1]},getZ:function(t){return this.data.array[t*this.data.stride+this.offset+2]},getW:function(t){return this.data.array[t*this.data.stride+this.offset+3]},setXY:function(t,e,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this},setXYZ:function(t,e,i,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this},setXYZW:function(t,e,i,n,r){return t=t*this.data.stride+this.offset,this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=n,this.data.array[t+3]=r,this}}),Object.defineProperty(Eo.prototype,"needsUpdate",{set:function(t){!0===t&&this.version++}}),Object.assign(Eo.prototype,{isInterleavedBuffer:!0,onUploadCallback:function(){},setArray:function(t){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");return this.count=void 0!==t?t.length/this.stride:0,this.array=t,this},setDynamic:function(t){return this.dynamic=t,this},copy:function(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.dynamic=t.dynamic,this},copyAt:function(t,e,i){t*=this.stride,i*=e.stride;for(var n=0,r=this.stride;n<r;n++)this.array[t+n]=e.array[i+n];return this},set:function(t,e){return void 0===e&&(e=0),this.array.set(t,e),this},clone:function(){return(new this.constructor).copy(this)},onUpload:function(t){return this.onUploadCallback=t,this}}),To.prototype=Object.assign(Object.create(Eo.prototype),{constructor:To,isInstancedInterleavedBuffer:!0,copy:function(t){return Eo.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),So.prototype=Object.assign(Object.create(ct.prototype),{constructor:So,isInstancedBufferAttribute:!0,copy:function(t){return ct.prototype.copy.call(this,t),this.meshPerAttribute=t.meshPerAttribute,this}}),Object.assign(function(t,e,i,n){this.ray=new zt(t,e),this.near=i||0,this.far=n||1/0,this.params={Mesh:{},Line:{},LOD:{},Points:{threshold:1},Sprite:{}},Object.defineProperties(this.params,{PointCloud:{get:function(){return console.warn("THREE.Raycaster: params.PointCloud has been renamed to params.Points."),this.Points}}})}.prototype,{linePrecision:1,set:function(t,e){this.ray.set(t,e)},setFromCamera:function(t,e){e&&e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize()):e&&e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld)):console.error("THREE.Raycaster: Unsupported camera type.")},intersectObject:function(t,e,i){var n=i||[];return Ro(t,this,n,e),n.sort(Ao),n},intersectObjects:function(t,e,i){var n=i||[];if(!1===Array.isArray(t))return console.warn("THREE.Raycaster.intersectObjects: objects is not an Array."),n;for(var r=0,a=t.length;r<a;r++)Ro(t[r],this,n,e);return n.sort(Ao),n}}),Object.assign(function(t){this.autoStart=void 0===t||t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}.prototype,{start:function(){this.startTime=("undefined"==typeof performance?Date:performance).now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0},stop:function(){this.getElapsedTime(),this.running=!1,this.autoStart=!1},getElapsedTime:function(){return this.getDelta(),this.elapsedTime},getDelta:function(){var t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){var e=("undefined"==typeof performance?Date:performance).now();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}),Object.assign(function(t,e,i){return this.radius=void 0!==t?t:1,this.phi=void 0!==e?e:0,this.theta=void 0!==i?i:0,this}.prototype,{set:function(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this},makeSafe:function(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this},setFromVector3:function(t){return this.radius=t.length(),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t.x,t.z),this.phi=Math.acos(g.clamp(t.y/this.radius,-1,1))),this}}),Object.assign(function(t,e,i){return this.radius=void 0!==t?t:1,this.theta=void 0!==e?e:0,this.y=void 0!==i?i:0,this}.prototype,{set:function(t,e,i){return this.radius=t,this.theta=e,this.y=i,this},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this},setFromVector3:function(t){return this.radius=Math.sqrt(t.x*t.x+t.z*t.z),this.theta=Math.atan2(t.x,t.z),this.y=t.y,this}}),Object.assign(Lo.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this},setFromCenterAndSize:function(){var t=new v;return function(e,i){var n=t.copy(i).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}}(),clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.min.copy(t.min),this.max.copy(t.max),this},makeEmpty:function(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this},isEmpty:function(){return this.max.x<this.min.x||this.max.y<this.min.y},getCenter:function(t){return void 0===t&&(console.warn("THREE.Box2: .getCenter() target is now required"),t=new v),this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)},getSize:function(t){return void 0===t&&(console.warn("THREE.Box2: .getSize() target is now required"),t=new v),this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)},expandByPoint:function(t){return this.min.min(t),this.max.max(t),this},expandByVector:function(t){return this.min.sub(t),this.max.add(t),this},expandByScalar:function(t){return this.min.addScalar(-t),this.max.addScalar(t),this},containsPoint:function(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .getParameter() target is now required"),e=new v),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)},clampPoint:function(t,e){return void 0===e&&(console.warn("THREE.Box2: .clampPoint() target is now required"),e=new v),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(){var t=new v;return function(e){return t.copy(e).clamp(this.min,this.max).sub(e).length()}}(),intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}),Po.prototype=Object.create(tt.prototype),Po.prototype.constructor=Po,Po.prototype.isImmediateRenderObject=!0,Co.prototype=Object.create(Hi.prototype),Co.prototype.constructor=Co,Co.prototype.update=function(){var t=new _,e=new _,i=new b;return function(){var n=["a","b","c"];this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);var r=this.object.matrixWorld,a=this.geometry.attributes.position,o=this.object.geometry;if(o&&o.isGeometry)for(var s=o.vertices,c=o.faces,h=0,l=0,u=c.length;l<u;l++)for(var p=c[l],d=0,f=p.vertexNormals.length;d<f;d++){var m=s[p[n[d]]],g=p.vertexNormals[d];t.copy(m).applyMatrix4(r),e.copy(g).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),a.setXYZ(h,t.x,t.y,t.z),h+=1,a.setXYZ(h,e.x,e.y,e.z),h+=1}else if(o&&o.isBufferGeometry){var v=o.attributes.position,y=o.attributes.normal;for(h=0,d=0,f=v.count;d<f;d++)t.set(v.getX(d),v.getY(d),v.getZ(d)).applyMatrix4(r),e.set(y.getX(d),y.getY(d),y.getZ(d)),e.applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),a.setXYZ(h,t.x,t.y,t.z),h+=1,a.setXYZ(h,e.x,e.y,e.z),h+=1}a.needsUpdate=!0}}(),Oo.prototype=Object.create(tt.prototype),Oo.prototype.constructor=Oo,Oo.prototype.dispose=function(){this.cone.geometry.dispose(),this.cone.material.dispose()},Oo.prototype.update=function(){var t=new _,e=new _;return function(){this.light.updateMatrixWorld();var i=this.light.distance?this.light.distance:1e3,n=i*Math.tan(this.light.angle);this.cone.scale.set(n,n,i),t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(e.sub(t)),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}(),Io.prototype=Object.create(Hi.prototype),Io.prototype.constructor=Io,Io.prototype.updateMatrixWorld=function(){var t=new _,e=new y,i=new y;return function(n){var r=this.bones,a=this.geometry,o=a.getAttribute("position");i.getInverse(this.root.matrixWorld);for(var s=0,c=0;s<r.length;s++){var h=r[s];h.parent&&h.parent.isBone&&(e.multiplyMatrices(i,h.matrixWorld),t.setFromMatrixPosition(e),o.setXYZ(c,t.x,t.y,t.z),e.multiplyMatrices(i,h.parent.matrixWorld),t.setFromMatrixPosition(e),o.setXYZ(c+1,t.x,t.y,t.z),c+=2)}a.getAttribute("position").needsUpdate=!0,tt.prototype.updateMatrixWorld.call(this,n)}}(),No.prototype=Object.create(Gt.prototype),No.prototype.constructor=No,No.prototype.dispose=function(){this.geometry.dispose(),this.material.dispose()},No.prototype.update=function(){void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)},Do.prototype=Object.create(tt.prototype),Do.prototype.constructor=Do,Do.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Do.prototype.update=function(){var t=.5*this.light.width,e=.5*this.light.height,i=this.line.geometry.attributes.position,n=i.array;n[0]=t,n[1]=-e,n[2]=0,n[3]=t,n[4]=e,n[5]=0,n[6]=-t,n[7]=e,n[8]=0,n[9]=-t,n[10]=-e,n[11]=0,n[12]=t,n[13]=-e,n[14]=0,i.needsUpdate=!0,void 0!==this.color?this.line.material.color.set(this.color):this.line.material.color.copy(this.light.color)},Uo.prototype=Object.create(tt.prototype),Uo.prototype.constructor=Uo,Uo.prototype.dispose=function(){this.children[0].geometry.dispose(),this.children[0].material.dispose()},Uo.prototype.update=function(){var t=new _,e=new H,i=new H;return function(){var n=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{var r=n.geometry.getAttribute("color");e.copy(this.light.color),i.copy(this.light.groundColor);for(var a=0,o=r.count;a<o;a++){var s=a<o/2?e:i;r.setXYZ(a,s.r,s.g,s.b)}r.needsUpdate=!0}n.lookAt(t.setFromMatrixPosition(this.light.matrixWorld).negate())}}(),zo.prototype=Object.create(Hi.prototype),zo.prototype.constructor=zo,Bo.prototype=Object.create(Hi.prototype),Bo.prototype.constructor=Bo,Fo.prototype=Object.create(Hi.prototype),Fo.prototype.constructor=Fo,Fo.prototype.update=function(){var t=new _,e=new _,i=new b;return function(){this.object.updateMatrixWorld(!0),i.getNormalMatrix(this.object.matrixWorld);for(var n=this.object.matrixWorld,r=this.geometry.attributes.position,a=this.object.geometry,o=a.vertices,s=a.faces,c=0,h=0,l=s.length;h<l;h++){var u=s[h],p=u.normal;t.copy(o[u.a]).add(o[u.b]).add(o[u.c]).divideScalar(3).applyMatrix4(n),e.copy(p).applyMatrix3(i).normalize().multiplyScalar(this.size).add(t),r.setXYZ(c,t.x,t.y,t.z),c+=1,r.setXYZ(c,e.x,e.y,e.z),c+=1}r.needsUpdate=!0}}(),Go.prototype=Object.create(tt.prototype),Go.prototype.constructor=Go,Go.prototype.dispose=function(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()},Go.prototype.update=function(){var t=new _,e=new _,i=new _;return function(){t.setFromMatrixPosition(this.light.matrixWorld),e.setFromMatrixPosition(this.light.target.matrixWorld),i.subVectors(e,t),this.lightPlane.lookAt(i),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(i),this.targetLine.scale.z=i.length()}}(),Ho.prototype=Object.create(Hi.prototype),Ho.prototype.constructor=Ho,Ho.prototype.update=function(){var t,e,i=new _,n=new et;function r(r,a,o,s){i.set(a,o,s).unproject(n);var c=e[r];if(void 0!==c)for(var h=t.getAttribute("position"),l=0,u=c.length;l<u;l++)h.setXYZ(c[l],i.x,i.y,i.z)}return function(){t=this.geometry,e=this.pointMap;n.projectionMatrix.copy(this.camera.projectionMatrix),r("c",0,0,-1),r("t",0,0,1),r("n1",-1,-1,-1),r("n2",1,-1,-1),r("n3",-1,1,-1),r("n4",1,1,-1),r("f1",-1,-1,1),r("f2",1,-1,1),r("f3",-1,1,1),r("f4",1,1,1),r("u1",.7,1.1,-1),r("u2",-.7,1.1,-1),r("u3",0,2,-1),r("cf1",-1,0,1),r("cf2",1,0,1),r("cf3",0,-1,1),r("cf4",0,1,1),r("cn1",-1,0,-1),r("cn2",1,0,-1),r("cn3",0,-1,-1),r("cn4",0,1,-1),t.getAttribute("position").needsUpdate=!0}}(),Vo.prototype=Object.create(Hi.prototype),Vo.prototype.constructor=Vo,Vo.prototype.update=function(){var t=new I;return function(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&t.setFromObject(this.object),!t.isEmpty()){var i=t.min,n=t.max,r=this.geometry.attributes.position,a=r.array;a[0]=n.x,a[1]=n.y,a[2]=n.z,a[3]=i.x,a[4]=n.y,a[5]=n.z,a[6]=i.x,a[7]=i.y,a[8]=n.z,a[9]=n.x,a[10]=i.y,a[11]=n.z,a[12]=n.x,a[13]=n.y,a[14]=i.z,a[15]=i.x,a[16]=n.y,a[17]=i.z,a[18]=i.x,a[19]=i.y,a[20]=i.z,a[21]=n.x,a[22]=i.y,a[23]=i.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}}}(),Vo.prototype.setFromObject=function(t){return this.object=t,this.update(),this},ko.prototype=Object.create(Hi.prototype),ko.prototype.constructor=ko,ko.prototype.updateMatrixWorld=function(t){var e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),tt.prototype.updateMatrixWorld.call(this,t))},jo.prototype=Object.create(Gi.prototype),jo.prototype.constructor=jo,jo.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=e<0?1:0,this.lookAt(this.plane.normal),tt.prototype.updateMatrixWorld.call(this,t)},Wo.prototype=Object.create(tt.prototype),Wo.prototype.constructor=Wo,Wo.prototype.setDirection=(go=new _,function(t){t.y>.99999?this.quaternion.set(0,0,0,1):t.y<-.99999?this.quaternion.set(1,0,0,0):(go.set(t.z,0,-t.x).normalize(),mo=Math.acos(t.y),this.quaternion.setFromAxisAngle(go,mo))}),Wo.prototype.setLength=function(t,e,i){void 0===e&&(e=.2*t),void 0===i&&(i=.2*e),this.line.scale.set(1,Math.max(0,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()},Wo.prototype.setColor=function(t){this.line.material.color.copy(t),this.cone.material.color.copy(t)},Xo.prototype=Object.create(Hi.prototype),Xo.prototype.constructor=Xo;function qo(t){console.warn("THREE.Spline has been removed. Use THREE.CatmullRomCurve3 instead."),Ur.call(this,t),this.type="catmullrom"}Rr.create=function(t,e){return console.log("THREE.Curve.create() has been deprecated"),t.prototype=Object.create(Rr.prototype),t.prototype.constructor=t,t.prototype.getPoint=e,t},Object.assign(Yr.prototype,{createPointsGeometry:function(t){console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getPoints(t);return this.createGeometry(e)},createSpacedPointsGeometry:function(t){console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");var e=this.getSpacedPoints(t);return this.createGeometry(e)},createGeometry:function(t){console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead.");for(var e=new st,i=0,n=t.length;i<n;i++){var r=t[i];e.vertices.push(new _(r.x,r.y,r.z||0))}return e}}),Object.assign(Zr.prototype,{fromPoints:function(t){console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(t)}}),Object.create(Ur.prototype),Object.create(Ur.prototype),qo.prototype=Object.create(Ur.prototype),Object.assign(qo.prototype,{initFromArray:function(){console.error("THREE.Spline: .initFromArray() has been removed.")},getControlPointsArray:function(){console.error("THREE.Spline: .getControlPointsArray() has been removed.")},reparametrizeByArcLength:function(){console.error("THREE.Spline: .reparametrizeByArcLength() has been removed.")}}),zo.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Io.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Object.assign(Ra.prototype,{extractUrlBase:function(t){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),La(t)}}),Object.assign(Lo.prototype,{center:function(t){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},size:function(t){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(t)}}),Object.assign(I.prototype,{center:function(t){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(t)},empty:function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},isIntersectionBox:function(t){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionSphere:function(t){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)},size:function(t){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(t)}}),Bt.prototype.center=function(t){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(t)},Object.assign(g,{random16:function(){return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."),Math.random()},nearestPowerOfTwo:function(t){return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."),g.floorPowerOfTwo(t)},nextPowerOfTwo:function(t){return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."),g.ceilPowerOfTwo(t)}}),Object.assign(b.prototype,{flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},multiplyVector3:function(t){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),t.applyMatrix3(this)},multiplyVector3Array:function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix3: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")}}),Object.assign(y.prototype,{extractPosition:function(t){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(t)},flattenToArrayOffset:function(t,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(t,e)},getPosition:function(){var t;return function(){return void 0===t&&(t=new _),console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),t.setFromMatrixColumn(this,3)}}(),setRotationFromQuaternion:function(t){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(t)},multiplyToArray:function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},multiplyVector3:function(t){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector4:function(t){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},multiplyVector3Array:function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},rotateAxis:function(t){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),t.transformDirection(this)},crossVector:function(t){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),t.applyMatrix4(this)},translate:function(){console.error("THREE.Matrix4: .translate() has been removed.")},rotateX:function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},rotateY:function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},rotateZ:function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},rotateByAxis:function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},applyToBuffer:function(t){return console.warn("THREE.Matrix4: .applyToBuffer() has been removed. Use matrix.applyToBufferAttribute( attribute ) instead."),this.applyToBufferAttribute(t)},applyToVector3Array:function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},makeFrustum:function(t,e,i,n,r,a){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(t,e,n,i,r,a)}}),D.prototype.isIntersectionLine=function(t){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(t)},x.prototype.multiplyVector3=function(t){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),t.applyQuaternion(this)},Object.assign(zt.prototype,{isIntersectionBox:function(t){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(t)},isIntersectionPlane:function(t){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(t)},isIntersectionSphere:function(t){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(t)}}),Object.assign(Ft.prototype,{area:function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},barycoordFromPoint:function(t,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(t,e)},midpoint:function(t){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(t)},normal:function(t){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(t)},plane:function(t){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(t)}}),Object.assign(Ft,{barycoordFromPoint:function(t,e,i,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Ft.getBarycoord(t,e,i,n,r)},normal:function(t,e,i,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Ft.getNormal(t,e,i,n)}}),Object.assign(Jr.prototype,{extractAllPoints:function(t){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(t)},extrude:function(t){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Gn(this,t)},makeGeometry:function(t){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Kn(this,t)}}),Object.assign(v.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(_.prototype,{setEulerFromRotationMatrix:function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},setEulerFromQuaternion:function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},getPositionFromMatrix:function(t){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(t)},getScaleFromMatrix:function(t){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(t)},getColumnFromMatrix:function(t,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,t)},applyProjection:function(t){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(t)},fromAttribute:function(t,e,i){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},distanceToManhattan:function(t){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(t)},lengthManhattan:function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(L.prototype,{fromAttribute:function(t,e,i){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(t,e,i)},lengthManhattan:function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()}}),Object.assign(st.prototype,{computeTangents:function(){console.error("THREE.Geometry: .computeTangents() has been removed.")},computeLineDistances:function(){console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead.")}}),Object.assign(tt.prototype,{getChildByName:function(t){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(t)},renderDepth:function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},translate:function(t,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,t)},getWorldRotation:function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")}}),Object.defineProperties(tt.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(t){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=t}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),Object.defineProperties(Di.prototype,{objects:{get:function(){return console.warn("THREE.LOD: .objects has been renamed to .levels."),this.levels}}}),Object.defineProperty(Ui.prototype,"useVertexTexture",{get:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")},set:function(){console.warn("THREE.Skeleton: useVertexTexture has been removed.")}}),Object.defineProperty(Rr.prototype,"__arcLengthDivisions",{get:function(){return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions},set:function(t){console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."),this.arcLengthDivisions=t}}),Ti.prototype.setLens=function(t,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==e&&(this.filmGauge=e),this.setFocalLength(t)},Object.defineProperties(Qr.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(t){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=t}},shadowCameraLeft:{set:function(t){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=t}},shadowCameraRight:{set:function(t){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=t}},shadowCameraTop:{set:function(t){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=t}},shadowCameraBottom:{set:function(t){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=t}},shadowCameraNear:{set:function(t){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=t}},shadowCameraFar:{set:function(t){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=t}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(t){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=t}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(t){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=t}},shadowMapHeight:{set:function(t){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=t}}}),Object.defineProperties(ct.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},copyIndicesArray:function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")}}),Object.assign(bt.prototype,{addIndex:function(t){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(t)},addDrawCall:function(t,e,i){void 0!==i&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(t,e)},clearDrawCalls:function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},computeTangents:function(){console.warn("THREE.BufferGeometry: .computeTangents() has been removed.")},computeOffsets:function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")}}),Object.defineProperties(bt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),Object.assign(Hn.prototype,{getArrays:function(){console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed.")},addShapeList:function(){console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed.")},addShape:function(){console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed.")}}),Object.defineProperties(bo.prototype,{dynamic:{set:function(){console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead.")}},onUpdate:{value:function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this}}}),Object.defineProperties(Nt.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new H}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===t}}}),Object.defineProperties(dr.prototype,{metal:{get:function(){return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."),!1},set:function(){console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead")}}}),Object.defineProperties(Ut.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(t){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=t}}}),Object.assign(Li.prototype,{animate:function(t){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(t)},getCurrentRenderTarget:function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},getMaxAnisotropy:function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},getPrecision:function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},resetGLState:function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},supportsFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},supportsHalfFloatTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},supportsStandardDerivatives:function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},supportsCompressedTextureS3TC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},supportsCompressedTexturePVRTC:function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},supportsBlendMinMax:function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},supportsVertexTextures:function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},supportsInstancedArrays:function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},enableScissorTest:function(t){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(t)},initMaterial:function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},addPrePlugin:function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},addPostPlugin:function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},updateShadowMap:function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},setFaceCulling:function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")}}),Object.defineProperties(Li.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=t}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(t){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=t}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(xi.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(P.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=t}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(t){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=t}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=t}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(t){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=t}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(t){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=t}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(t){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=t}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(t){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=t}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(t){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=t}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(t){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=t}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(t){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=t}}}),Object.defineProperties(Ai.prototype,{standing:{set:function(){console.warn("THREE.WebVRManager: .standing has been removed.")}}}),to.prototype.load=function(t){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");var e=this;return(new Ja).load(t,(function(t){e.setBuffer(t)})),this},io.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},Ka.prototype.updateCubeMap=function(t,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(t,e)};var Yo=function(t){var e,i;function n(e){var i;return(i=t.call(this,e.canvas)||this)._ctx2d=e,i}return i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n.prototype.render=function(t,e){this._ctx2d.canvas.width=e.width,this._ctx2d.canvas.height=e.height,this._ctx2d.drawImage(t,0,0,e.width,e.height)},n}(R),Zo=function(){function t(t){this._renderer=t,this._stereo=new Qa,this._stereo.aspect=.5}var e=t.prototype;return e.setEyeSeparation=function(t){this._stereo.eyeSep=t},e.setSize=function(t,e){this._renderer.setSize(t,e)},e.render=function(t,e){t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),this._stereo.update(e);var i=this._renderer.getSize();this._renderer.autoClear&&this._renderer.clear(),this._renderer.setScissorTest(!0),this._renderer.setScissor(0,0,i.width/2,i.height),this._renderer.setViewport(0,0,i.width/2,i.height),this._renderer.render(t,this._stereo.cameraL),this._renderer.setScissor(i.width/2,0,i.width/2,i.height),this._renderer.setViewport(i.width/2,0,i.width/2,i.height),this._renderer.render(t,this._stereo.cameraR),this._renderer.setScissorTest(!1)},t}(),Jo="Your browser doesn't support features to enable VR experience",Qo="playsinline must be true for VR experience",Ko="Cannot apply VR experience for DRM content",$o="Unable to obtain the video size for VR canvas";i(1);var ts=n.core.Error,es=n.core.FakeEvent,is=n.core.Utils,ns=n.core.CorsType,rs=function(t){var e,i;function n(e,i,n){var r;return(r=t.call(this,e,i,n)||this)._initMembers(),r._addBindings(),r}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n.isValid=function(){return!0};var r=n.prototype;return r._addBindings=function(){var t=this;this.eventManager.listen(this.player,this.player.Event.SOURCE_SELECTED,(function(e){t.player.isVr()&&(t.logger.debug("VR entry has detected"),t._isVrSupported(e.payload.selectedSource[0])&&(t._requestDeviceMotionPermission(),t.eventManager.listen(t.player,t.player.Event.FIRST_PLAY,(function(){return t._initComponents()})),t.eventManager.listen(t.player,t.player.Event.ENDED,(function(){return t._cancelAnimationFrame()})),t.eventManager.listen(t.player,t.player.Event.PLAY,(function(){return t._onPlay()})),t.eventManager.listen(t.player,t.player.Event.PLAYING,(function(){return t._onPlaying()})),t.eventManager.listen(t.player,t.player.Event.RESIZE,(function(){return t._updateCanvasSize()})),t._setCrossOrigin()))}))},r._setCrossOrigin=function(){var t=this.player.env;"string"==typeof this.player.crossOrigin||"iOS"!==t.os.name&&"Safari"!==t.browser.name&&"Android Browser"!==t.browser.name||(this._crossOriginSet=!0,this.player.crossOrigin=ns.ANONYMOUS)},r._isIOSPlayer=function(){return!1===this.player.config.playback.playsinline&&"iPhone"===this.player.env.device.model},r._isUnSpportedBrowser=function(){var t=this.player.env;return"Safari"===t.browser.name&&t.browser.major<11||"iOS"===t.os.name&&is.VERSION.compare(t.os.version,"11.3")<0||"IE"===t.browser.name&&!("11"===t.browser.major&&("8.1"===t.os.version||"10"===t.os.version))},r._isVrSupported=function(t){var e=this,i="";return this._isUnSpportedBrowser()&&(i=Jo),this._isIOSPlayer()&&(i=Qo),t.drmData&&(i=Ko),!i||(this.eventManager.listen(this.player,this.player.Event.PLAYING,(function(){e.logger.warn("The playback paused due to VR experience not supported"),e.player.pause()})),this.player.dispatchEvent(new es(this.player.Event.ERROR,new ts(ts.Severity.CRITICAL,ts.Category.VR,ts.Code.VR_NOT_SUPPORTED,i))),!1)},r._addMotionBindings=function(){var t=this,e=is.Dom.getElementBySelector("#"+this.config.rootElement+" .playkit-overlay-action");e&&(this.eventManager.listen(e,"mousedown",(function(e){return t._onOverlayActionPointerDown(e)})),this.eventManager.listen(e,"touchstart",(function(e){return t._onOverlayActionPointerDown(e)})),this.eventManager.listen(window,"mousemove",(function(e){return t._onDocumentPointerMove(e)})),this.eventManager.listen(window,"touchmove",(function(e){return t._onDocumentPointerMove(e)}),{passive:!1}),this.eventManager.listen(window,"mouseup",this._onDocumentPointerUp.bind(this)),this.eventManager.listen(window,"touchend",this._onDocumentPointerUp.bind(this))),window.DeviceMotionEvent&&this.eventManager.listen(window,"devicemotion",this._onDeviceMotion.bind(this))},r._initComponents=function(){this.logger.debug("Init VR components"),this._addMotionBindings();var t=this.player.getVideoElement();is.Dom.addClassName(t,"playkit-vr-video"),this._renderer=new Li({devicePixelRatio:window.devicePixelRatio,alpha:!1,clearColor:16777215,antialias:!0});var e=this._renderer.domElement;is.Dom.addClassName(e,"playkit-vr-canvas"),is.Dom.insertBefore(this.player.getView(),e,t.nextSibling);var i=this.config.cameraOptions,n=this._getCanvasDimensions(),r=n.width&&n.height?n.width/n.height:i.aspect;this._camera=new Ti(i.fov,r,i.near,i.far),this._camera.target=new _(0,0,0),this._texture=this._getVideoTexture(t),this._texture.minFilter=this._texture.magFilter=1006,this._texture.generateMipmaps=!1,this._texture.format=1022;var a=new qn(256,32,32);a.applyMatrix((new y).makeScale(-1,1,1));var o=new Gt(a,new Dt({map:this._texture,overdraw:!0}));o.position.set(0,0,0),this._scene=new Oi,this._scene.add(o),this._effect=new Zo(this._renderer),this._updateCanvasSize()},r._getVideoTexture=function(t){if("IE"===this.player.env.browser.name){var e=is.Dom.createElement("canvas").getContext("2d");return new Yo(e)}return new Xi(t)},r._render=function(){var t=this.player.getVideoElement();this._texture&&t.readyState>=t.HAVE_CURRENT_DATA&&(this._texture.needsUpdate=!0,this._texture instanceof Yo&&this._texture.render(t,this._getCanvasDimensions())),this._rafId=requestAnimationFrame(this._render.bind(this)),this._updateCamera(),this._stereoMode&&this._effect?this._effect.render(this._scene,this._camera):this._renderer&&this._renderer.render(this._scene,this._camera)},r._updateCamera=function(){this._camera&&(this._latitude=Math.max(-89,Math.min(89,this._latitude)),this._camera.target.x=500*Math.sin(g.degToRad(90-this._latitude))*Math.cos(g.degToRad(this._longitude)),this._camera.target.y=500*Math.cos(g.degToRad(90-this._latitude)),this._camera.target.z=500*Math.sin(g.degToRad(90-this._latitude))*Math.sin(g.degToRad(this._longitude)),this._camera.lookAt(this._camera.target))},r._getCanvasDimensions=function(){var t,e,i=this.player.getView(),n=this.player.getVideoElement(),r=parseInt(n.videoWidth/n.videoHeight*i.offsetHeight);return i.offsetWidth<r?(t=n.videoHeight/n.videoWidth,e={width:i.offsetWidth,height:t*i.offsetWidth}):e={width:(t=n.videoWidth/n.videoHeight)*i.offsetHeight,height:i.offsetHeight},e},r._clearCalculateInterval=function(){this._calculateCanvasSizeInterval&&(clearInterval(this._calculateCanvasSizeInterval),this._calculateCanvasSizeInterval=null)},r._setRendererSize=function(t){this._renderer.setSize(t.width,t.height,!1),this.logger.debug("Update the VR canvas dimensions",t)},r._updateCanvasSizeByInterval=function(){var t,e=this,i=0;this._clearCalculateInterval(),this._calculateCanvasSizeInterval=setInterval((function(){(t=e._getCanvasDimensions()).width?(e._clearCalculateInterval(),e._setRendererSize(t)):++i>=600&&(e.player.pause(),e._clean(),e.player.dispatchEvent(new es(e.player.Event.ERROR,new ts(ts.Severity.CRITICAL,ts.Category.VR,ts.Code.VR_NOT_SUPPORTED,$o))))}),100)},r._updateCanvasSize=function(){if(this._renderer){var t=this._getCanvasDimensions();t.width?this._setRendererSize(t):this._updateCanvasSizeByInterval()}},r._onPlay=function(){this._rafId||this._render()},r._onPlaying=function(){this._updateCanvasSize()},r.destroy=function(){this._clean()},r.reset=function(){this._clean(),this._initMembers(),this._addBindings()},r.toggleVrStereoMode=function(){this._stereoMode=!this._stereoMode,this.player.dispatchEvent(new es(this.player.Event.VR_STEREO_MODE_CHANGED,{mode:this._stereoMode})),this._updateCanvasSize()},r.isInStereoMode=function(){return this._stereoMode},r._clean=function(){this._cancelAnimationFrame(),this.eventManager.removeAll(),is.Dom.removeClassName(this.player.getVideoElement(),"playkit-vr-video"),this._renderer&&is.Dom.removeChild(this.player.getView(),this._renderer.domElement),this._crossOriginSet&&(this.player.crossOrigin=null),this._clearCalculateInterval()},r._initMembers=function(){this._renderer=null,this._scene=null,this._camera=null,this._texture=null,this._effect=null,this._stereoMode=this.config.startInStereo,this._rafId=null,this._pointerDown=!1,this._previousX=NaN,this._previousY=NaN,this._latitude=0,this._longitude=180,this._crossOriginSet=!1},r._cancelAnimationFrame=function(){this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null)},r._onOverlayActionPointerDown=function(t){t.preventDefault(),this._pointerDown=!0,this._previousX=t.clientX||t.touches[0].clientX,this._previousY=t.clientY||t.touches[0].clientY},r._onDocumentPointerMove=function(t){this._pointerDown&&((t.clientX||t.touches&&1===t.touches.length)&&(this._longitude=(this._previousX-(t.clientX||t.touches[0].clientX))*this.config.moveMultiplier+this._longitude,this._latitude=((t.clientY||t.touches[0].clientY)-this._previousY)*this.config.moveMultiplier+this._latitude,this._previousX=t.clientX||t.touches[0].clientX,this._previousY=t.clientY||t.touches[0].clientY),t.preventDefault())},r._onDocumentPointerUp=function(){this._pointerDown=!1},r._getMobileVibrationValue=function(){return"Android Browser"===this.player.env.browser.name?1:.01},r._requestDeviceMotionPermission=function(){var t=this;if("iOS"===this.player.env.os.name&&is.VERSION.compare(this.player.env.os.version,"13")>0){var e=is.Dom.getElementBySelector("#"+this.config.rootElement);this.eventManager.listenOnce(e,"click",(function(){window.DeviceOrientationEvent&&"function"==typeof window.DeviceOrientationEvent.requestPermission&&window.DeviceOrientationEvent.requestPermission().then((function(e){t.logger.debug("Permission device motion state ",e)})).catch((function(e){t.logger.warn("Error occurred on permission request for device motion ",e)}))}))}},r._onDeviceMotion=function(t){if(t.rotationRate){var e=t.rotationRate.alpha,i=t.rotationRate.beta,n=window.innerHeight>window.innerWidth,r=t.orientation||window.orientation,a=this.config.deviceMotionMultiplier*this._getMobileVibrationValue();if(n)this._longitude=this._longitude-i*a,this._latitude=this._latitude+e*a;else{var o=-90;r&&(o=r),this._longitude=-90===o?this._longitude+e*a:this._longitude-e*a,this._latitude=-90===o?this._latitude+i*a:this._latitude-i*a}}},n}(n.BasePlugin);!function(t,e,i){e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i}(rs,"defaultConfig",{moveMultiplier:.15,deviceMotionMultiplier:1,startInStereo:!1,cameraOptions:{fov:75,aspect:640/360,near:.1,far:1e3}});var as="2.0.4",os="@playkit-js/playkit-js-vr";Object(n.registerPlugin)("vr",rs)}]);

//# sourceMappingURL=https://cdnapisec.kaltura.com/embedPlaykitJsSourceMaps/path/3_67244c78e9b6fef3a239bc22ed613107
		window.__kalturaplayerdata = (window.__kalturaplayerdata || {});
		window.__kalturaplayerdata={"plugins":{"kava":{},"share":{"shareUrl":"{embedBaseUrl}\/p\/{partnerId}\/embedPlaykitJs\/uiconf_id\/{uiConfId}?iframeembed=true&entry_id={entryId}","embedUrl":"{embedBaseUrl}\/p\/{partnerId}\/embedPlaykitJs\/uiconf_id\/{uiConfId}?iframeembed=true&entry_id={entryId}","enableTimeOffset":false,"useNative":true,"shareOptions":{"email":{"display":true,"templateUrl":"mailto:?subject=Check out {description}&body=Check out {description} - {shareUrl}","title":"share.email","icon":{"fill-rule":"evenodd","clip-rule":"evenodd","d":"M21 6.75C21 5.7835 20.1941 5 19.2 5H4.8C3.80589 5 3 5.7835 3 6.75V17.25C3 18.2165 3.80589 19 4.8 19H19.2C20.1941 19 21 18.2165 21 17.25V6.75ZM18.8944 8.55276C18.6474 8.05878 18.0467 7.85856 17.5528 8.10555L12 10.881L6.44719 8.10555L6.33987 8.05941C5.8692 7.88866 5.33489 8.09407 5.10555 8.55276C4.85856 9.04674 5.05878 9.64741 5.55276 9.8944L11.5528 12.8944L11.6762 12.9461C11.9279 13.0323 12.2059 13.0151 12.4472 12.8944L18.4472 9.8944L18.5485 9.83623C18.9675 9.56215 19.1237 9.01146 18.8944 8.55276Z"}},"embed":{"display":true,"templateUrl":"<iframe src=\"{embedUrl}\" style=\"width: 560px;height: 395px\" allowfullscreen webkitallowfullscreen mozAllowFullScreen frameborder=\"0\" allow=\"accelerometer *; autoplay *; encrypted-media *; gyroscope *; picture-in-picture *\"\/>","title":"share.embed","icon":"M13.9864 6.16443C14.0772 5.61966 13.7092 5.10444 13.1644 5.01364C12.6197 4.92285 12.1044 5.29086 12.0136 5.83564L10.0136 17.8356C9.92284 18.3804 10.2909 18.8956 10.8356 18.9864C11.3804 19.0772 11.8956 18.7092 11.9864 18.1644L13.9864 6.16443Z M15.2929 15.7071C14.9024 15.3166 14.9024 14.6834 15.2929 14.2929L17.5858 12L15.2929 9.70711C14.9024 9.31658 14.9024 8.68342 15.2929 8.29289C15.6834 7.90237 16.3166 7.90237 16.7071 8.29289L19.7071 11.2929C20.0976 11.6834 20.0976 12.3166 19.7071 12.7071L16.7071 15.7071C16.3166 16.0976 15.6834 16.0976 15.2929 15.7071Z M8.70711 8.29289C9.09763 8.68342 9.09763 9.31658 8.70711 9.70711L6.41421 12L8.70711 14.2929C9.09763 14.6834 9.09763 15.3166 8.70711 15.7071C8.31658 16.0976 7.68342 16.0976 7.29289 15.7071L4.29289 12.7071C3.90237 12.3166 3.90237 11.6834 4.29289 11.2929L7.29289 8.29289C7.68342 7.90237 8.31658 7.90237 8.70711 8.29289Z"},"facebook":{"display":true,"templateUrl":"https:\/\/www.facebook.com\/sharer\/sharer.php?u={shareUrl}","title":"share.share-on-facebook","icon":"M8 9.63017H9.5003V8.22342C9.5003 7.60278 9.51651 6.64628 9.98306 6.05362C10.4752 5.42639 11.1499 5 12.3116 5C14.2034 5 15 5.26011 15 5.26011L14.6256 7.4044C14.6256 7.4044 14.0004 7.23072 13.417 7.23072C12.8336 7.23072 12.3116 7.43238 12.3116 7.99459V9.63017H14.7032L14.536 11.7242H12.3116V19H9.5003V11.7242H8V9.63017Z"},"linkedin":{"display":true,"templateUrl":"https:\/\/www.linkedin.com\/shareArticle?mini=true&url={shareUrl}","title":"share.share-on-linkedin","icon":"M18 19H15.1268V14.43C15.1268 13.2338 14.6774 12.4172 13.6891 12.4172C12.9331 12.4172 12.5128 12.9682 12.3171 13.4993C12.2437 13.69 12.2552 13.9555 12.2552 14.221V19H9.40875C9.40875 19 9.44544 10.9047 9.40875 10.1688H12.2552V11.5548C12.4233 10.9488 13.3329 10.0839 14.7844 10.0839C16.5852 10.0839 18 11.3542 18 14.0895V19ZM6.53022 9.06416H6.51188C5.59466 9.06416 5 8.38906 5 7.53333C5 6.66095 5.61224 6 6.5478 6C7.4826 6 8.05738 6.65928 8.07573 7.53083C8.07573 8.38657 7.4826 9.06416 6.53022 9.06416ZM5.3279 19H7.86171V10.1688H5.3279V19Z"},"twitter":{"display":true,"templateUrl":"https:\/\/twitter.com\/intent\/tweet?url={shareUrl}","title":"share.share-on-twitter","icon":"M17.3508 8.73918C17.9441 8.39596 18.3993 7.85172 18.6138 7.20339C18.0583 7.5212 17.4444 7.7524 16.7887 7.87635C16.2661 7.33687 15.5191 7 14.6924 7C13.1073 7 11.8213 8.24341 11.8213 9.77681C11.8213 9.99451 11.8459 10.2059 11.8952 10.4092C9.50807 10.2932 7.39209 9.18888 5.97458 7.5069C5.72724 7.91845 5.5859 8.39596 5.5859 8.90444C5.5859 9.86739 6.09292 10.7175 6.86371 11.2157C6.39367 11.2022 5.94993 11.0758 5.56207 10.8693V10.9034C5.56207 12.2493 6.55227 13.372 7.86705 13.6262C7.62628 13.6914 7.37237 13.7239 7.11023 13.7239C6.92534 13.7239 6.74456 13.7073 6.56953 13.6747C6.9352 14.7775 7.99525 15.5807 9.25251 15.6022C8.26971 16.3474 7.03052 16.7915 5.68533 16.7915C5.4536 16.7915 5.22434 16.7788 5 16.7534C6.27123 17.54 7.78159 18 9.40289 18C14.6867 18 17.5751 13.7692 17.5751 10.0994C17.5751 9.97862 17.5726 9.85785 17.5677 9.73947C18.129 9.34778 18.6162 8.85915 19 8.3022C18.4856 8.52308 17.9317 8.67244 17.3508 8.73918Z"}}},"playkit-js-transcript":{"position":"right","expandMode":"alongside","expandOnFirstPlay":false,"showTime":true,"downloadDisabled":false,"printDisabled":true},"floating":{"position":"bottom-right","dismissible":true,"draggable":true,"width":"400","height":225,"marginX":0,"marginY":0},"vr":{"toggleStereo":true,"startInStereo":false,"moveMultiplier":0.15,"deviceMotionMultiplier":1,"cameraOptions":{"fov":75,"near":0.1,"far":1000}},"download":{},"playkit-js-hotspots":{},"googleTagManager":{"containerId":"","customEventsTracking":{"custom":[],"preset":{"coreEvents":false,"UIEvents":false,"playlistEvents":false,"castEvents":false}}},"googleAnalytics":{"trackingId":"UA-64912980-1","trackingGA4Id":"G-B2XGKKGZ84"},"kalturaCuepoints":{},"uiManagers":{}},"playback":{"autoplay":false,"preload":"auto","textLanguage":"off"},"provider":{"env":{"serviceUrl":"https:\/\/cdnapisec.kaltura.com\/api_v3","cdnUrl":"https:\/\/cfvod.kaltura.com","statsServiceUrl":"https:\/\/stats.kaltura.com","liveStatsServiceUrl":"https:\/\/livestats.kaltura.com","analyticsServiceUrl":"https:\/\/analytics.kaltura.com","apiFeatures":{"entryRedirect":"1"}}},"ui":{"userTheme":{"colors":{"primary":"#79a2a6","live":"#992405","playerBackground":"#191919"}},"components":{"logo":{"img":"https:\/\/www.scetv.org\/sites\/default\/files\/2023-02\/etv_controlbar_bug_2023_2.png","url":"http:\/\/scetv.org\/","text":"SCETV"}},"translations":{"en":{"controls":{"play":"Play","pause":"Pause","language":"Language","settings":"Settings","fullscreen":"Fullscreen","fullscreenExit":"Exit fullscreen","rewind":"Seek backwards","secondsRewind":"Seek {{seconds}} seconds backwards","forward":"Seek forward","secondsForward":"Seek {{seconds}} seconds 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 bar","readLess":"Less","readMore":"More","share":"Share"},"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","volume_slider_aria_label":"Volume control, use the arrows to control the volume"},"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","network_error":"No internet connection check your network","default_session_text":"Copy for customer care: session ID","retry":"Try again"},"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"},"watermark":{"watermark_alt_text":"Watermark"},"download":{"download":"Download","downloads":"Downloads","download_has_started":"Download has started","download_has_failed":"Download has failed","attachments":"Attachments","download_button_label":"Click to download the video","more_flavors_label":"More flavors","less_flavors_label":"Less flavors","source_label":"Source","more_captions_label":"More captions","less_captions_label":"Less captions","attachments_label":"Attachments"},"share":{"title":"Share","embed_options":"Embed Options","start_video_at":"Start at","full_video":"Full-length video","clip_video":"Share clip","email":"Share on Email","embed":"Get embed code","share-on-facebook":"Share on Facebook","share-on-linkedin":"Share on Linkedin","share-on-twitter":"Share on Twitter"},"transcript":{"hide_plugin":"Hide Transcript","show_plugin":"Show Transcript","more_options":"More transcript options","print_transcript":"Print current transcript","download_transcript":"Download current transcript","search":"Search in Transcript","clear_search":"Clear search","next_search_match":"Next search result","prev_search_match":"Previous search result","search_results":"Search result {{current}} out of {{total}}","auto_scroll":"Resume AutoScroll","whoops":"Whoops!","load_failed":"Failed to load transcript","skip_transcript":"Skip transcript","smallScreenText":"To see the transcript, go to full screen","smallScreenMobileText":"To see the transcript, rotate the phone"}}}},"disableUserCache":true,"productVersion":"7.91"};