dashjs
Version:
A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
1 lines • 84.1 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.dashjs=t():e.dashjs=t()}(window,(function(){return 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="/dist/",n(n.s=92)}({1:function(e,t,n){"use strict";function r(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 i=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,n,i;return t=e,(n=[{key:"init",value:function(){this.STREAM="stream",this.VIDEO="video",this.AUDIO="audio",this.TEXT="text",this.MUXED="muxed",this.IMAGE="image",this.STPP="stpp",this.TTML="ttml",this.VTT="vtt",this.WVTT="wvtt",this.CONTENT_STEERING="contentSteering",this.ABR_STRATEGY_DYNAMIC="abrDynamic",this.ABR_STRATEGY_BOLA="abrBola",this.ABR_STRATEGY_L2A="abrL2A",this.ABR_STRATEGY_LoLP="abrLoLP",this.ABR_STRATEGY_THROUGHPUT="abrThroughput",this.ABR_FETCH_THROUGHPUT_CALCULATION_DOWNLOADED_DATA="abrFetchThroughputCalculationDownloadedData",this.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING="abrFetchThroughputCalculationMoofParsing",this.ABR_FETCH_THROUGHPUT_CALCULATION_AAST="abrFetchThroughputCalculationAAST",this.LIVE_CATCHUP_MODE_DEFAULT="liveCatchupModeDefault",this.LIVE_CATCHUP_MODE_LOLP="liveCatchupModeLoLP",this.MOVING_AVERAGE_SLIDING_WINDOW="slidingWindow",this.MOVING_AVERAGE_EWMA="ewma",this.BAD_ARGUMENT_ERROR="Invalid Arguments",this.MISSING_CONFIG_ERROR="Missing config parameter(s)",this.TRACK_SWITCH_MODE_ALWAYS_REPLACE="alwaysReplace",this.TRACK_SWITCH_MODE_NEVER_REPLACE="neverReplace",this.TRACK_SELECTION_MODE_FIRST_TRACK="firstTrack",this.TRACK_SELECTION_MODE_HIGHEST_BITRATE="highestBitrate",this.TRACK_SELECTION_MODE_HIGHEST_EFFICIENCY="highestEfficiency",this.TRACK_SELECTION_MODE_WIDEST_RANGE="widestRange",this.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY="highestSelectionPriority",this.CMCD_MODE_QUERY="query",this.CMCD_MODE_HEADER="header",this.LOCATION="Location",this.INITIALIZE="initialize",this.TEXT_SHOWING="showing",this.TEXT_HIDDEN="hidden",this.CC1="CC1",this.CC3="CC3",this.UTF8="utf-8",this.SCHEME_ID_URI="schemeIdUri",this.START_TIME="starttime",this.SERVICE_DESCRIPTION_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:scope:2019",this.SUPPLEMENTAL_PROPERTY_DVB_LL_SCHEME="urn:dvb:dash:lowlatency:critical:2019",this.XML="XML",this.ARRAY_BUFFER="ArrayBuffer",this.DVB_REPORTING_URL="dvb:reportingUrl",this.DVB_PROBABILITY="dvb:probability",this.VIDEO_ELEMENT_READY_STATES={HAVE_NOTHING:0,HAVE_METADATA:1,HAVE_CURRENT_DATA:2,HAVE_FUTURE_DATA:3,HAVE_ENOUGH_DATA:4},this.FILE_LOADER_TYPES={FETCH:"fetch_loader",XHR:"xhr_loader"}}}])&&r(t.prototype,n),i&&r(t,i),e}());t.a=i},10:function(e,t,n){"use strict";t.a=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t||null,this.message=n||null,this.data=r||null}},14:function(e,t,n){"use strict";var r=n(37),i=n.n(r),o=n(38);function s(e){return(s="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 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)}}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"mixin",value:function(t,n,r){var i,o={};if(t)for(var a in n)n.hasOwnProperty(a)&&(i=n[a],a in t&&(t[a]===i||a in o&&o[a]===i)||("object"===s(t[a])&&null!==t[a]?t[a]=e.mixin(t[a],i,r):t[a]=r(i)));return t}},{key:"clone",value:function(t){if(!t||"object"!==s(t))return t;var n;if(t instanceof Array){n=[];for(var r=0,i=t.length;r<i;++r)r in t&&n.push(e.clone(t[r]))}else n={};return e.mixin(n,t,e.clone)}},{key:"addAditionalQueryParameterToUrl",value:function(e,t){try{if(!t||0===t.length)return e;var n=new URL(e);return t.forEach((function(e){e.key&&e.value&&n.searchParams.set(e.key,e.value)})),n.href}catch(t){return e}}},{key:"parseHttpHeaders",value:function(e){var t={};if(!e)return t;for(var n=e.trim().split("\r\n"),r=0,i=n.length;r<i;r++){var o=n[r],s=o.indexOf(": ");s>0&&(t[o.substring(0,s)]=o.substring(s+2))}return t}},{key:"generateUuid",value:function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"==t?n:3&n|8).toString(16)}))}},{key:"generateHashCode",value:function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}},{key:"getRelativeUrl",value:function(e,t){try{var n=new URL(e),r=new URL(t);if(n.protocol=r.protocol,n.origin!==r.origin)return t;var o=i.a.relative(n.pathname.substr(0,n.pathname.lastIndexOf("/")),r.pathname.substr(0,r.pathname.lastIndexOf("/"))),s=0===o.length?1:0;return o+=r.pathname.substr(r.pathname.lastIndexOf("/")+s,r.pathname.length-1),r.pathname.length<o.length?r.pathname:o}catch(e){return t}}},{key:"parseUserAgent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;try{var t=null===e&&"undefined"!=typeof navigator?navigator.userAgent.toLowerCase():"";return Object(o.UAParser)(t)}catch(e){return{}}}}],(n=null)&&a(t.prototype,n),r&&a(t,r),e}();t.a=u},18:function(e,t,n){"use strict";function r(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 i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===e[i].indexOf("public_")||(this[i]=e[i])}}}])&&r(t.prototype,n),i&&r(t,i),e}();t.a=i},26: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=[],l=!1,f=-1;function E(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var e=a(E);l=!0;for(var t=c.length;t;){for(u=c,c=[];++f<t;)u&&u[f].run();f=-1,t=c.length}u=null,l=!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 y(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new y(e,t)),1!==c.length||l||a(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},28:function(e,t,n){"use strict";function r(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 i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var i in e)!e.hasOwnProperty(i)||this[i]&&!n||r&&-1===e[i].indexOf("public_")||(this[i]=e[i])}}}])&&r(t.prototype,n),i&&r(t,i),e}();t.a=i},3:function(e,t,n){"use strict";var r=function(){var e,t=[],n={},r={};function i(e,n){for(var r in t){var i=t[r];if(i.context===e&&i.name===n)return i.instance}return null}function o(e,t){return t[e]}function s(e,t,n){e in n&&(n[e]=t)}function a(t,n,r){var i,o=t.__dashjs_factory_name,s=n[o];if(s){var a=s.instance;if(!s.override)return a.apply({context:n,factory:e},r);for(var u in i=t.apply({context:n},r),a=a.apply({context:n,factory:e,parent:i},r))i.hasOwnProperty(u)&&(i[u]=a[u])}else i=t.apply({context:n},r);return i.getClassName=function(){return o},i}return e={extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getSingletonInstance:i,setSingletonInstance:function(e,n,r){for(var i in t){var o=t[i];if(o.context===e&&o.name===n)return void(t[i].instance=r)}t.push({name:n,context:e,instance:r})},deleteSingletonInstances:function(e){t=t.filter((function(t){return t.context!==e}))},getSingletonFactory:function(e){var r=o(e.__dashjs_factory_name,n);return r||(r=function(n){var r;return void 0===n&&(n={}),{getInstance:function(){return r||(r=i(n,e.__dashjs_factory_name)),r||(r=a(e,n,arguments),t.push({name:e.__dashjs_factory_name,context:n,instance:r})),r}}},n[e.__dashjs_factory_name]=r),r},getSingletonFactoryByName:function(e){return o(e,n)},updateSingletonFactory:function(e,t){s(e,t,n)},getClassFactory:function(e){var t=o(e.__dashjs_factory_name,r);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return a(e,t,arguments)}}},r[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return o(e,r)},updateClassFactory:function(e,t){s(e,t,r)}}}();t.a=r},37:function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}t.resolve=function(){for(var t="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),s="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u<s;u++)if(i[u]!==o[u]){a=u;break}var c=[];for(u=a;u<i.length;u++)c.push("..");return(c=c.concat(o.slice(a))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),n=47===t,r=-1,i=!0,o=e.length-1;o>=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===r&&(i=!1,r=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(26))},38:function(e,t,n){var r;!function(i,o){"use strict";var s="model",a="name",u="type",c="vendor",l="version",f="mobile",E="tablet",d="smarttv",y=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!==h(t).indexOf(h(e))},h=function(e){return e.toLowerCase()},S=function(e,t){if("string"==typeof e)return e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),void 0===t?e:e.substring(0,255)},_=function(e,t){for(var n,r,i,o,s,a,u=0;u<t.length&&!s;){var c=t[u],l=t[u+1];for(n=r=0;n<c.length&&!s;)if(s=c[n++].exec(e))for(i=0;i<l.length;i++)a=s[++r],"object"==typeof(o=l[i])&&o.length>0?2===o.length?"function"==typeof o[1]?this[o[0]]=o[1].call(this,a):this[o[0]]=o[1]:3===o.length?"function"!=typeof o[1]||o[1].exec&&o[1].test?this[o[0]]=a?a.replace(o[1],o[2]):void 0:this[o[0]]=a?o[1].call(this,a,o[2]):void 0:4===o.length&&(this[o[0]]=a?o[3].call(this,a.replace(o[1],o[2])):void 0):this[o]=a||void 0;u+=2}},p=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},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"},v={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[l,[a,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[l,[a,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[a,l],[/opios[\/ ]+([\w\.]+)/i],[l,[a,"Opera Mini"]],[/\bopr\/([\w\.]+)/i],[l,[a,"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],[a,l],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[l,[a,"UCBrowser"]],[/\bqbcore\/([\w\.]+)/i],[l,[a,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[l,[a,"WeChat"]],[/konqueror\/([\w\.]+)/i],[l,[a,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[l,[a,"IE"]],[/yabrowser\/([\w\.]+)/i],[l,[a,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[a,/(.+)/,"$1 Secure Browser"],l],[/\bfocus\/([\w\.]+)/i],[l,[a,"Firefox Focus"]],[/\bopt\/([\w\.]+)/i],[l,[a,"Opera Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[l,[a,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[l,[a,"Dolphin"]],[/coast\/([\w\.]+)/i],[l,[a,"Opera Coast"]],[/miuibrowser\/([\w\.]+)/i],[l,[a,"MIUI Browser"]],[/fxios\/([-\w\.]+)/i],[l,[a,"Firefox"]],[/\bqihu|(qi?ho?o?|360)browser/i],[[a,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[a,/(.+)/,"$1 Browser"],l],[/(comodo_dragon)\/([\w\.]+)/i],[[a,/_/g," "],l],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[a,l],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i],[a],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[a,"Facebook"],l],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[a,l],[/\bgsa\/([\w\.]+) .*safari\//i],[l,[a,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[l,[a,"Chrome Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[a,"Chrome WebView"],l],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[l,[a,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[a,l],[/version\/([\w\.]+) .*mobile\/\w+ (safari)/i],[l,[a,"Mobile Safari"]],[/version\/([\w\.]+) .*(mobile ?safari|safari)/i],[l,a],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[a,[l,p,{"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],[a,l],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[a,"Netscape"],l],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[l,[a,"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],[a,l]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[["architecture","amd64"]],[/(ia32(?=;))/i],[["architecture",h]],[/((?: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/,"",h]],[/(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",h]]],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],[s,[c,"Samsung"],[u,E]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[s,[c,"Samsung"],[u,f]],[/\((ip(?:hone|od)[\w ]*);/i],[s,[c,"Apple"],[u,f]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[s,[c,"Apple"],[u,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[s,[c,"Huawei"],[u,E]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[s,[c,"Huawei"],[u,f]],[/\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],[[s,/_/g," "],[c,"Xiaomi"],[u,f]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[s,/_/g," "],[c,"Xiaomi"],[u,E]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[s,[c,"OPPO"],[u,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[s,[c,"Vivo"],[u,f]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[s,[c,"Realme"],[u,f]],[/\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],[s,[c,"Motorola"],[u,f]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[s,[c,"Motorola"],[u,E]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[s,[c,"LG"],[u,E]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[s,[c,"LG"],[u,f]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[s,[c,"Lenovo"],[u,E]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[s,/_/g," "],[c,"Nokia"],[u,f]],[/(pixel c)\b/i],[s,[c,"Google"],[u,E]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[s,[c,"Google"],[u,f]],[/droid.+ ([c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[s,[c,"Sony"],[u,f]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[s,"Xperia Tablet"],[c,"Sony"],[u,E]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[s,[c,"OnePlus"],[u,f]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[s,[c,"Amazon"],[u,E]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[s,/(.+)/g,"Fire Phone $1"],[c,"Amazon"],[u,f]],[/(playbook);[-\w\),; ]+(rim)/i],[s,c,[u,E]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[s,[c,"BlackBerry"],[u,f]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[s,[c,"ASUS"],[u,E]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[s,[c,"ASUS"],[u,f]],[/(nexus 9)/i],[s,[c,"HTC"],[u,E]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[c,[s,/_/g," "],[u,f]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[s,[c,"Acer"],[u,E]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[s,[c,"Meizu"],[u,f]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[s,[c,"Sharp"],[u,f]],[/(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],[c,s,[u,f]],[/(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],[c,s,[u,E]],[/(surface duo)/i],[s,[c,"Microsoft"],[u,E]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[s,[c,"Fairphone"],[u,f]],[/(u304aa)/i],[s,[c,"AT&T"],[u,f]],[/\bsie-(\w*)/i],[s,[c,"Siemens"],[u,f]],[/\b(rct\w+) b/i],[s,[c,"RCA"],[u,E]],[/\b(venue[\d ]{2,7}) b/i],[s,[c,"Dell"],[u,E]],[/\b(q(?:mv|ta)\w+) b/i],[s,[c,"Verizon"],[u,E]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[s,[c,"Barnes & Noble"],[u,E]],[/\b(tm\d{3}\w+) b/i],[s,[c,"NuVision"],[u,E]],[/\b(k88) b/i],[s,[c,"ZTE"],[u,E]],[/\b(nx\d{3}j) b/i],[s,[c,"ZTE"],[u,f]],[/\b(gen\d{3}) b.+49h/i],[s,[c,"Swiss"],[u,f]],[/\b(zur\d{3}) b/i],[s,[c,"Swiss"],[u,E]],[/\b((zeki)?tb.*\b) b/i],[s,[c,"Zeki"],[u,E]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],s,[u,E]],[/\b(ns-?\w{0,9}) b/i],[s,[c,"Insignia"],[u,E]],[/\b((nxa|next)-?\w{0,9}) b/i],[s,[c,"NextBook"],[u,E]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],s,[u,f]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],s,[u,f]],[/\b(ph-1) /i],[s,[c,"Essential"],[u,f]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[s,[c,"Envizen"],[u,E]],[/\b(trio[-\w\. ]+) b/i],[s,[c,"MachSpeed"],[u,E]],[/\btu_(1491) b/i],[s,[c,"Rotor"],[u,E]],[/(shield[\w ]+) b/i],[s,[c,"Nvidia"],[u,E]],[/(sprint) (\w+)/i],[c,s,[u,f]],[/(kin\.[onetw]{3})/i],[[s,/\./g," "],[c,"Microsoft"],[u,f]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[s,[c,"Zebra"],[u,E]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[s,[c,"Zebra"],[u,f]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,s,[u,"console"]],[/droid.+; (shield) bui/i],[s,[c,"Nvidia"],[u,"console"]],[/(playstation [345portablevi]+)/i],[s,[c,"Sony"],[u,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[s,[c,"Microsoft"],[u,"console"]],[/smart-tv.+(samsung)/i],[c,[u,d]],[/hbbtv.+maple;(\d+)/i],[[s,/^/,"SmartTV"],[c,"Samsung"],[u,d]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,"LG"],[u,d]],[/(apple) ?tv/i],[c,[s,"Apple TV"],[u,d]],[/crkey/i],[[s,"Chromecast"],[c,"Google"],[u,d]],[/droid.+aft(\w)( bui|\))/i],[s,[c,"Amazon"],[u,d]],[/\(dtv[\);].+(aquos)/i],[s,[c,"Sharp"],[u,d]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[c,S],[s,S],[u,d]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,d]],[/((pebble))app/i],[c,s,[u,"wearable"]],[/droid.+; (glass) \d/i],[s,[c,"Google"],[u,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[s,[c,"Zebra"],[u,"wearable"]],[/(quest( 2)?)/i],[s,[c,"Facebook"],[u,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[s,[u,f]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[s,[u,E]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,E]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[u,f]],[/(android[-\w\. ]{0,9});.+buil/i],[s,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[l,[a,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[l,[a,"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],[a,l],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[l,a]],os:[[/microsoft (windows) (vista|xp)/i],[a,l],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[a,[l,p,m]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[a,"Windows"],[l,p,m]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[l,/_/g,"."],[a,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[a,"Mac OS"],[l,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86)/i],[l,a],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[a,l],[/\(bb(10);/i],[l,[a,"BlackBerry"]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[l,[a,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[l,[a,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[l,[a,"webOS"]],[/crkey\/([\d\.]+)/i],[l,[a,"Chromecast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[a,"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],[a,l],[/(sunos) ?([\w\.\d]*)/i],[[a,"Solaris"],l],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[a,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!==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}(v,t):v;return this.getBrowser=function(){var e,t={};return t[a]=void 0,t[l]=void 0,_.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 _.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:void 0,model:void 0,type:void 0};return _.call(e,n,r.device),e},this.getEngine=function(){var e={name:void 0,version:void 0};return _.call(e,n,r.engine),e},this.getOS=function(){var e={name:void 0,version:void 0};return _.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?S(e,255):e,this},this.setUA(n),this};b.VERSION="1.0.2",b.BROWSER=y([a,l,"major"]),b.CPU=y(["architecture"]),b.DEVICE=y([s,c,u,"console",f,d,E,"wearable","embedded"]),b.ENGINE=b.OS=y([a,l]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=b),t.UAParser=b):n(53)?void 0===(r=function(){return b}.call(t,n,t,e))||(e.exports=r):void 0!==i&&(i.UAParser=b);var R=void 0!==i&&(i.jQuery||i.Zepto);if(R&&!R.ua){var w=new b;R.ua=w.getResult(),R.ua.get=function(){return w.getUA()},R.ua.set=function(e){w.setUA(e);var t=w.getResult();for(var n in t)R.ua[n]=t[n]}}}("object"==typeof window?window:this)},5:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o}));var i=function e(){r(this,e),this.tcpid=null,this.type=null,this.url=null,this.actualurl=null,this.range=null,this.trequest=null,this.tresponse=null,this.responsecode=null,this.interval=null,this.trace=[],this._stream=null,this._tfinish=null,this._mediaduration=null,this._quality=null,this._responseHeaders=null,this._serviceLocation=null,this._fileLoaderType=null},o=function e(){r(this,e),this.s=null,this.d=null,this.b=[]};i.GET="GET",i.HEAD="HEAD",i.MPD_TYPE="MPD",i.XLINK_EXPANSION_TYPE="XLinkExpansion",i.INIT_SEGMENT_TYPE="InitializationSegment",i.INDEX_SEGMENT_TYPE="IndexSegment",i.MEDIA_SEGMENT_TYPE="MediaSegment",i.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",i.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",i.DVB_REPORTING_TYPE="DVBReporting",i.LICENSE="license",i.CONTENT_STEERING_TYPE="ContentSteering",i.OTHER_TYPE="other"},53:function(e,t){(function(t){e.exports=t}).call(this,{})},92:function(e,t,n){"use strict";function r(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)}}n.r(t);var i={attributes:["Laurl","laurl"],prefixes:["clearkey","dashif"]},o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,o;return t=e,o=[{key:"findCencContentProtection",value:function(e){for(var t=null,n=0;n<e.length;++n){var r=e[n];"urn:mpeg:dash:mp4protection:2011"!==r.schemeIdUri.toLowerCase()||"cenc"!==r.value.toLowerCase()&&"cbcs"!==r.value.toLowerCase()||(t=r)}return t}},{key:"getPSSHData",value:function(e){var t=8,n=new DataView(e),r=n.getUint8(t);return t+=20,r>0&&(t+=4+16*n.getUint32(t)),t+=4,e.slice(t)}},{key:"getPSSHForKeySystem",value:function(t,n){var r=e.parsePSSHList(n);return t&&r.hasOwnProperty(t.uuid.toLowerCase())?r[t.uuid.toLowerCase()]:null}},{key:"parseInitDataFromContentProtection",value:function(e,t){return"pssh"in e?(e.pssh.__text=e.pssh.__text.replace(/\r?\n|\r/g,"").replace(/\s+/g,""),t.decodeArray(e.pssh.__text).buffer):null}},{key:"parsePSSHList",value:function(e){if(null==e)return[];for(var t=new DataView(e.buffer||e),n={},r=0;;){var i,o,s=void 0,a=r;if(r>=t.buffer.byteLength)break;if(i=r+t.getUint32(r),r+=4,1886614376===t.getUint32(r))if(r+=4,0===(o=t.getUint8(r))||1===o){r++,r+=3,s="";var u=void 0,c=void 0;for(u=0;u<4;u++)s+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=4,s+="-",u=0;u<2;u++)s+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=2,s+="-",u=0;u<2;u++)s+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=2,s+="-",u=0;u<2;u++)s+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;for(r+=2,s+="-",u=0;u<6;u++)s+=1===(c=t.getUint8(r+u).toString(16)).length?"0"+c:c;r+=6,r+=4,n[s=s.toLowerCase()]=t.buffer.slice(a,i),r=i}else r=i;else r=i}return n}},{key:"getLicenseServerUrlFromMediaInfo",value:function(e,t){try{if(!e||0===e.length)return null;for(var n=0,r=null;n<e.length&&!r;){var o=e[n];if(o&&o.contentProtection&&o.contentProtection.length>0){var s=o.contentProtection.filter((function(e){return e.schemeIdUri&&e.schemeIdUri===t}));if(s&&s.length>0)for(var a=0;a<s.length&&!r;){for(var u=s[a],c=0;c<i.attributes.length&&!r;){for(var l=0,f=i.attributes[c];l<i.prefixes.length&&!r;){var E=i.prefixes[l];u[f]&&u[f].__prefix&&u[f].__prefix===E&&u[f].__text&&(r=u[f].__text),l+=1}c+=1}a+=1}}n+=1}return r}catch(e){return null}}}],(n=null)&&r(t.prototype,n),o&&r(t,o),e}();var s=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.contentType=t,this.robustness=n};var a=function e(t,n,r,i,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initDataTypes=["cenc"],t&&t.length&&(this.audioCapabilities=t),n&&n.length&&(this.videoCapabilities=n),this.distinctiveIdentifier=r,this.persistentState=i,this.sessionTypes=o};function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(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,r=E(e);if(t){var i=E(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=new(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(n,e);var t=l(n);function n(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(e=t.call(this)).MEDIA_KEYERR_CODE=100,e.MEDIA_KEYERR_UNKNOWN_CODE=101,e.MEDIA_KEYERR_CLIENT_CODE=102,e.MEDIA_KEYERR_SERVICE_CODE=103,e.MEDIA_KEYERR_OUTPUT_CODE=104,e.MEDIA_KEYERR_HARDWARECHANGE_CODE=105,e.MEDIA_KEYERR_DOMAIN_CODE=106,e.MEDIA_KEY_MESSAGE_ERROR_CODE=107,e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE=108,e.SERVER_CERTIFICATE_UPDATED_ERROR_CODE=109,e.KEY_STATUS_CHANGED_EXPIRED_ERROR_CODE=110,e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE=111,e.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE=112,e.KEY_SESSION_CREATED_ERROR_CODE=113,e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE=114,e.MEDIA_KEYERR_UNKNOWN_MESSAGE="An unspecified error occurred. This value is used for errors that don't match any of the other codes.",e.MEDIA_KEYERR_CLIENT_MESSAGE="The Key System could not be installed or updated.",e.MEDIA_KEYERR_SERVICE_MESSAGE="The message passed into update indicated an error from the license service.",e.MEDIA_KEYERR_OUTPUT_MESSAGE="There is no available output device with the required characteristics for the content protection system.",e.MEDIA_KEYERR_HARDWARECHANGE_MESSAGE="A hardware configuration change caused a content protection error.",e.MEDIA_KEYERR_DOMAIN_MESSAGE="An error occurred in a multi-device domain licensing configuration. The most common error is a failure to join the domain.",e.MEDIA_KEY_MESSAGE_ERROR_MESSAGE="Multiple key sessions were creates with a user-agent that does not support sessionIDs!! Unpredictable behavior ahead!",e.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE="DRM: Empty key message from CDM",e.SERVER_CERTIFICATE_UPDATED_ERROR_MESSAGE="Error updating server certificate -- ",e.KEY_STATUS_CHANGED_EXPIRED_ERROR_MESSAGE="DRM: KeyStatusChange error! -- License has expired",e.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE="DRM: No license server URL specified!",e.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE="DRM: KeySystem Access Denied! -- ",e.KEY_SESSION_CREATED_ERROR_MESSAGE="DRM: unable to create session! --",e.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE="DRM: licenser error! --",e}return n}(n(28).a)),y=n(10);var g=function e(t,n,r,i,o,s,a,u){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t,this.method=n,this.responseType=r,this.headers=i,this.withCredentials=o,this.messageType=s,this.sessionId=a,this.data=u};var h=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.url=t,this.headers=n,this.data=r},S=n(5),_=n(14),p=n(1),m=n(3);function v(e){return(v="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 b(e){var t,n,r,i,u,c,l,f,E,m,b,R=(e=e||{}).protectionKeyController,w=e.protectionModel,T=e.eventBus,A=e.events,C=e.debug,D=e.BASE64,I=e.constants,M=[],O=e.cmcdModel,k=e.settings,N=e.customParametersModel;function K(){if(!(T&&T.hasOwnProperty("on")&&R&&R.hasOwnProperty("getSupportedKeySystemsFromContentProtection")))throw new Error("Missing config parameter(s)")}function L(e,t){f||E?f&&P():function(e,t){if(!E){E=!0;var r,i=[];e=e.sort((function(t,n){return(u&&u[t.ks.systemString]&&u[t.ks.systemString].priority>=0?u[t.ks.systemString].priority:e.length)-(u&&u[n.ks.systemString]&&u[n.ks.systemString].priority>=0?u[n.ks.systemString].priority:e.length)}));for(var o=0;o<e.length;o++){var s=B(e[o]);i.push({ks:e[o].ks,configs:[s],protData:e[o].protData})}w.requestKeySystemAccess(i).then((function(e){var t=(r=e.data).mksa&&r.mksa.selectedSystemString?r.mksa.selectedSystemString:r.keySystem.systemString;return n.info("DRM: KeySystem Access Granted for system string ("+t+")! Selecting key system..."),w.selectKeySystem(r)})).then((function(e){if(f=e,E=!1,w){T.trigger(A.KEY_SYSTEM_SELECTED,{data:r});var t=G(f);t&&t.serverCertificate&&t.serverCertificate.length>0&&w.setServerCertificate(D.decodeArray(t.serverCertificate).buffer),P()}})).catch((function(e){f=null,E=!1,t||T.trigger(A.KEY_SYSTEM_SELECTED,{data:null,error:new y.a(d.KEY_SYSTEM_ACCESS_DENIED_ERROR_CODE,d.KEY_SYSTEM_ACCESS_DENIED_ERROR_MESSAGE+"Error selecting key system! -- "+e.error)})}))}}(e,t)}function P(){for(var e,t=0;t<r.length;t++)for(e=0;e<r[t].length;e++)if(f===r[t][e].ks){Y(r[t][e]);break}r=[]}function Y(e){if(R.isClearKey(f)&&e.protData&&e.protData.hasOwnProperty("clearkeys")&&0!==Object.keys(e.protData.clearkeys).length){var t={kids:Object.keys(e.protData.clearkeys)};e.initData=(new TextEncoder).encode(JSON.stringify(t))}e.sessionId?x(e):null!==e.initData&&U(e)}function x(e){K(),w.loadKeySession(e)}function U(e){var t=o.getPSSHForKeySystem(f,e?e.initData:null);if(t){if(function(e){if(!e)return!1;try{for(var t=w.getSessions(),n=0;n<t.length;n++)if(t[n].getKeyId()===e)return!0;return!1}catch(e){return!1}}(e.keyId))return;if(F(t))return;try{e.initData=t,w.createKeySession(e)}catch(e){T.trigger(A.KEY_SESSION_CREATED,{data:null,error:new y.a(d.KEY_SESSION_CREATED_ERROR_CODE,d.KEY_SESSION_CREATED_ERROR_MESSAGE+e.message)})}}else e&&e.initData?w.createKeySession(e):T.trigger(A.KEY_SESSION_CREATED,{data:null,error:new y.a(d.KEY_SESSION_CREATED_ERROR_CODE,d.KEY_SESSION_CREATED_ERROR_MESSAGE+"Selected key system is "+(f?f.systemString:null)+". needkey/encrypted event contains no initData corresponding to that key system!")})}function G(e){if(e){var t=e.systemString;if(u)return t in u?u[t]:null}return null}function F(e){if(!e)return!1;try{for(var t=w.getAllInitData(),r=0;r<t.length;r++)if(R.initDataEquals(e,t[r]))return n.debug("DRM: Ignoring initData because we have already seen it!"),!0;return!1}catch(e){return!1}}function H(e){K(),e?(w.setMediaElement(e),T.on(A.NEED_KEY,J,t)):null===e&&(w.setMediaElement(e),T.off(A.NEED_KEY,J,t))}function B(e){var t=e.protData,n=[],r=[],o=t&&t.audioRobustness&&t.audioRobustness.length>0?t.audioRobustness:l,u=t&&t.videoRobustness&&t.videoRobustness.length>0?t.videoRobustness:l,c=e.sessionType,f=t&&t.distinctiveIdentifier?t.distinctiveIdentifier:"optional",E=t&&t.persistentState?t.persistentState:"temporary"===c?"optional":"required";return i.forEach((function(e){e.type===I.AUDIO?n.push(new s(e.codec,o)):e.type===I.VIDEO&&r.push(new s(e.codec,u))})),new a(n,r,f,E,[c])}function j(e){e.error?T.trigger(A.KEY_STATUSES_CHANGED,{data:null,error:e.error}):n.debug("DRM: key status = "+e.status)}function q(e){n.debug("DRM: onKeyMessage");var t=e.data;T.trigger(A.KEY_MESSAGE,{data:t});var r=t.messageType?t.messageType:"license-request",s=t.message,a=t.sessionToken,u=G(f),c=R.getLicenseServerModelInstance(f,u,r),l={sessionToken:a,messageType:r};if(s&&0!==s.byteLength){if(!c)return n.debug("DRM: License server request not required for this message (type = "+e.data.messageType+"). Session ID = "+a.getSessionId()),void V(l);if(R.isClearKey(f)){var E=R.processClearKeyLicenseRequest(f,u,s);if(E&&E.keyPairs&&E.keyPairs.length>0)return n.debug("DRM: ClearKey license request handled by application!"),V(l),void w.updateKeySession(a,E)}!function(e,t,r){var s=e.sessionToken,a=e.messageType?e.messageType:"license-request",u={sessionToken:s,messageType:a},c=f?f.systemString:null,l=function(e,t,n,r,s){var a=null,u=r.message;if(e&&e.serverURL){var c=e.serverURL;"string"==typeof c&&""!==c?a=c:"object"===v(c)&&c.hasOwnProperty(t)&&(a=c[t])}else if(e&&e.laURL&&""!==e.laURL)a=e.laURL;else if(!(a=o.getLicenseServerUrlFromMediaInfo(i,f.schemeIdURI))&&!R.isClearKey(f)){var l=o.getPSSHData(n.initData);(a=f.getLicenseServerURLFromInitData(l))||(a=r.laURL)}return a=s.getServerURLFromMessage(a,u,t)}(r,a,s,e,t);if(!l)return void V(u,new y.a(d.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_CODE,d.MEDIA_KEY_MESSAGE_NO_LICENSE_SERVER_URL_ERROR_MESSAGE));var E={},C=!1;r&&z(E,r.httpRequestHeaders);var D=e.message,I=f.getRequestHeadersFromMessage(D);z(E,I),Object.keys(E).forEach((function(e){"authorization"===e.toLowerCase()&&(C=!0)})),r&&"boolean"==typeof r.withCredentials&&(C=r.withCredentials);var M=function(e){if(w)if(e.status>=200&&e.status<=299){var n=_.a.parseHttpHeaders(e.getAllResponseHeaders?e.getAllResponseHeaders():null),r=new h(e.responseURL,n,e.response);Z(N.getLicenseResponseFilters(),r).then((function(){var n=t.getLicenseMessage(r.data,c,a);null!==n?(V(u),w.updateKeySession(s,n)):X(e,u,c,a,t)}))}else X(e,u,c,a,t)},K=function(e){V(u,new y.a(d.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,d.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+c+' update, XHR aborted. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},L=function(e){V(u,new y.a(d.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,d.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+c+' update, XHR error. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState))},P=f.getLicenseRequestFromMessage(D),Y=t.getHTTPMethod(a),x=t.getResponseType(c,a),U=r&&!isNaN(r.httpTimeout)?r.httpTimeout:8e3,G=s.getSessionId()||null,F=new g(l,Y,x,E,C,a,G,P),H=isNaN(k.get().streaming.retryAttempts[S.a.LICENSE])?3:k.get().streaming.retryAttempts[S.a.LICENSE];Z(N.getLicenseRequestFilters(),F).then((function(){!function e(t,r,i,o,s,a){var u=new XMLHttpRequest;if(k.get().streaming.cmcd&&k.get().streaming.cmcd.enabled){if(k.get().streaming.cmcd.mode===p.a.CMCD_MODE_QUERY){var c=O.getQueryParameter({url:t.url,type:S.a.LICENSE});c&&(t.url=_.a.addAditionalQueryParameterToUrl(t.url,[c]))}}u.open(t.method,t.url,!0),u.responseType=t.responseType,u.withCredentials=t.withCredentials,i>0&&(u.timeout=i);for(var l in t.headers)u.setRequestHeader(l,t.headers[l]);if(k.get().streaming.cmcd&&k.get().streaming.cmcd.enabled){if(k.get().streaming.cmcd.mode===p.a.CMCD_MODE_HEADER){var f=O.getHeaderParameters({url:t.url,type:S.a.LICENSE});if(f)for(var E in f){var d=f[E];d&&u.setRequestHeader(E,d)}}}var y=function(){r--;var n=isNaN(k.get().streaming.retryIntervals[S.a.LICENSE])?1e3:k.get().streaming.retryIntervals[S.a.LICENSE];b=setTimeout((function(){e(t,r,i,o,s,a)}),n)};u.onload=function(){m=null,this.status>=200&&this.status<=299||r<=0?o(this):(n.warn("License request failed ("+this.status+"). Retrying it... Pending retries: "+r),y())},u.ontimeout=u.onerror=function(){m=null,r<=0?a(this):(n.warn("License request network request failed . Retrying it... Pending retries: "+r),y())},u.onabort=function(){s(this)},T.trigger(A.LICENSE_REQUEST_SENDING,{url:t.url,headers:t.headers,payload:t.data,sessionId:t.sessionId}),m=u,u.send(t.data)}(F,H,U,M,K,L)}))}(t,c,u)}else V(l,new y.a(d.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_CODE,d.MEDIA_KEY_MESSAGE_NO_CHALLENGE_ERROR_MESSAGE))}function V(e,t){T.trigger(A.LICENSE_REQUEST_COMPLETE,{data:e,error:t})}function W(){m&&(m.onloadend=m.onerror=m.onprogress=void 0,m.abort(),m=null),b&&(clearTimeout(b),b=null)}function z(e,t){if(t)for(var n in t)e[n]=t[n]}function X(e,t,n,r,i){var o="NONE",s=null;e.response&&(o=i.getErrorResponse(e.response,n,r),s={serverResponse:e.response||null,responseCode:e.status||null,responseText:e.statusText||null}),V(t,new y.a(d.MEDIA_KEY_MESSAGE_LICENSER_ERROR_CODE,d.MEDIA_KEY_MESSAGE_LICENSER_ERROR_MESSAGE+n+' update, XHR complete. status is "'+e.statusText+'" ('+e.status+"), readyState is "+e.readyState+". Response is "+o,s))}function Z(e,t){return e?e.reduce((function(e,n){return e.then((function(){return n(t)}))}),Promise.resolve()):Promise.resolve()}function J(e,t){if(!k.get().streaming.protection.ignoreEmeEncryptedEvent){if(n.debug("DRM: onNeedKey"),"cenc"!==e.key.initDataType)return void n.warn("DRM: Only 'cenc' initData is supported! Ignoring initData of type: "+e.key.initDataType);if(0===i.length&&(n.warn("DRM: onNeedKey called before initializeForMedia, wait until initialized"),(t=void 0===t?1:t+1)<5))return void M.push(setTimeout((function(){J(e,t)}),500));var s=e.key.initData;if(ArrayBuffer.isView(s)&&(s=s.buffer),f){var a=o.getPSSHForKeySystem(f,s);if(a&&F(a))return}n.debug("DRM: initData:",String.fromCharCode.apply(null,new Uint8Array(s)));var l=R.getSupportedKeySystemsFromSegmentPssh(s,u,c);if(0===l.length)return void n.debug("DRM: Received needkey event with initData, but we don't support any of the key systems!");!function(e){r.push(e),L(e,!1)}(l)}}return t={initializeForMedia:function(e){if(!e)throw new Error("mediaInfo can not be null or undefined");K(),i.push(e)},clearMediaInfoArray:function(){i=[]},handleKeySystemFromManifest:function(){if(i&&0!==i.length){var e=[];i.forEach((function(t){var n=R.getSupportedKeySystemsFromContentProtection(t.contentProtection,u,c);n.length>0&&(0===e.length&&(e=n),r.push(n))})),e&&e.length>0&&L(e,!0)}},createKeySession:U,loadKeySession:x,removeKeySession:function(e){K(),w.removeKeySession(e)},closeKeySession:function(e){K(),w.closeKeySession(e)},setServerCertificate:function(e){K(),w.setServerCertificate(e)},setMediaElement:H,setSessionType:function(e){c=e},setRobustnessLevel:function(e){l=e},setProtectionData:function(e){u=e,R.setProtectionData(e)},getSupportedKeySystemsFromContentProtection:function(e){return K(),R.getSupportedKeySystemsFromContentProtection(e,u,c)},getKeySystems:function(){return R?R.getKeySystems():[]},setKeySystems:function(e){R&&R.setKeySystems(e)},stop:function(){W(),w&&w.stop()},reset:function(){T.off(A.INTERNAL_KEY_MESSAGE,q,t),T.off(A.INTERNAL_KEY_STATUS_CHANGED,j,t),K(),W(),H(null),f=null,E=!1,w&&(w.reset(),w=null),M.forEach((function(e){return clearTimeout(e)})),M=[],i=[],r=[]}},n=C.getLogger(t),r=[],i=[],c="temporary",l="",m=null,b=null,T.on(A.INTERNAL_KEY_MESSAGE,q,t),T.on(A.INTERNAL_KEY_STATUS_CHANGED,j,t),t}b.__dashjs_factory_name="ProtectionController";var R=m.a.getClassFactory(b);var w=function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.keyID=t,this.key=n};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,r.key,r)}}var A=function(){function e(t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),n&&"persistent"!==n&&"temporary"!==n)throw new Error("Invalid ClearKey key set type! Must be one of 'persistent' or 'temporary'");this.keyPairs=t,this.type=n}var t,n,r;return t=e,(n=[{key:"toJWK",value:function(){var e,t=this.keyPairs.length,n={keys:[]};for(e=0;e<t;e++){var r={kty:"oct",alg:"A128KW",kid:this.keyPairs[e].keyID,k:this.keyPairs[e].key};n.keys.push(r)}this.type&&(n.type=this.type);var i=JSON.stringify(n),o=i.length,s=new ArrayBuffer(o),a=new Uint8Array(s);for(e=0;e<o;e++)a[e]=i.charCodeAt(e);return s}}])&&T(t.prototype,n),r&&T(t,r),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 D=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,n,r;return t=e,(n=[{key:"init",value:function(){this.CLEARKEY_KEYSTEM_STRING="org.w3.clearkey",this.WIDEVINE_KEYSTEM_STRING="com.widevine.alpha",this.PLAYREADY_KEYSTEM_STRING="com.microsoft.playready",this.PLAYREADY_RECOMMENDATION_KEYSTEM_STRING="com.microsoft.playready.recommendation",this.INITIALIZATION_DATA_TYPE_CENC="cenc",this.INITIALIZATION_DATA_TYPE_KEYIDS="keyids",this.INITIALIZATION_DATA_TY