-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
dash.reporting.min.js
2 lines (2 loc) · 93.8 KB
/
dash.reporting.min.js
1
2
!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 a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.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 a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));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=93)}({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 a=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,a;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),a&&r(t,a),e}());t.a=a},14:function(e,t,n){"use strict";var r=n(37),a=n.n(r),i=n(38);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){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 a,i={};if(t)for(var s in n)n.hasOwnProperty(s)&&(a=n[s],s in t&&(t[s]===a||s in i&&i[s]===a)||("object"===o(t[s])&&null!==t[s]?t[s]=e.mixin(t[s],a,r):t[s]=r(a)));return t}},{key:"clone",value:function(t){if(!t||"object"!==o(t))return t;var n;if(t instanceof Array){n=[];for(var r=0,a=t.length;r<a;++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,a=n.length;r<a;r++){var i=n[r],o=i.indexOf(": ");o>0&&(t[i.substring(0,o)]=i.substring(o+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 i=a.a.relative(n.pathname.substr(0,n.pathname.lastIndexOf("/")),r.pathname.substr(0,r.pathname.lastIndexOf("/"))),o=0===i.length?1:0;return i+=r.pathname.substr(r.pathname.lastIndexOf("/")+o,r.pathname.length-1),r.pathname.length<i.length?r.pathname:i}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(i.UAParser)(t)}catch(e){return{}}}}],(n=null)&&s(t.prototype,n),r&&s(t,r),e}();t.a=u},15:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(1);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(a(e)!==t)throw r.a.BAD_ARGUMENT_ERROR}function o(e){if(!(null!==e&&!isNaN(e)&&e%1==0))throw r.a.BAD_ARGUMENT_ERROR+" : argument is not an integer"}},16:function(e,t,n){"use strict";var r=n(3),a=n(14),i=n(6),o=n(1),s=n(5),u=n(7),c=n(2);function l(e){return(l="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 f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(){var e,t,n=this.context,r=Object(u.a)(n).getInstance(),d={"streaming.delay.liveDelay":c.a.SETTING_UPDATED_LIVE_DELAY,"streaming.delay.liveDelayFragmentCount":c.a.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT,"streaming.liveCatchup.enabled":c.a.SETTING_UPDATED_CATCHUP_ENABLED},h={debug:{logLevel:i.a.LOG_LEVEL_WARNING,dispatchEvent:!1},streaming:{abandonLoadTimeout:1e4,wallclockTimeUpdateInterval:100,manifestUpdateRetryInterval:100,cacheInitSegments:!1,applyServiceDescription:!0,applyProducerReferenceTime:!0,applyContentSteering:!0,eventControllerRefreshDelay:100,enableManifestDurationMismatchFix:!0,capabilities:{filterUnsupportedEssentialProperties:!0,useMediaCapabilitiesApi:!1},timeShiftBuffer:{calcFromSegmentTimeline:!1,fallbackToSegmentTimeline:!0},metrics:{maxListDepth:100},delay:{liveDelayFragmentCount:NaN,liveDelay:NaN,useSuggestedPresentationDelay:!0},protection:{keepProtectionMediaKeys:!1,ignoreEmeEncryptedEvent:!1,detectPlayreadyMessageFormat:!0},buffer:{enableSeekDecorrelationFix:!1,fastSwitchEnabled:!0,flushBufferAtTrackSwitch:!1,reuseExistingSourceBuffers:!0,bufferPruningInterval:10,bufferToKeep:20,bufferTimeAtTopQuality:30,bufferTimeAtTopQualityLongForm:60,initialBufferLevel:NaN,stableBufferTime:12,longFormContentDurationThreshold:600,stallThreshold:.3,useAppendWindow:!0,setStallState:!0,avoidCurrentTimeRangePruning:!1},gaps:{jumpGaps:!0,jumpLargeGaps:!0,smallGapLimit:1.5,threshold:.3,enableSeekFix:!0,enableStallFix:!1,stallSeek:.1},utcSynchronization:{enabled:!0,useManifestDateHeaderTimeSource:!0,backgroundAttempts:2,timeBetweenSyncAttempts:30,maximumTimeBetweenSyncAttempts:600,minimumTimeBetweenSyncAttempts:2,timeBetweenSyncAttemptsAdjustmentFactor:2,maximumAllowedDrift:100,enableBackgroundSyncAfterSegmentDownloadError:!0,defaultTimingSource:{scheme:"urn:mpeg:dash:utc:http-xsdate:2014",value:"https://time.akamai.com/?iso&ms"}},scheduling:{defaultTimeout:500,lowLatencyTimeout:0,scheduleWhilePaused:!0},text:{defaultEnabled:!0},liveCatchup:{maxDrift:NaN,playbackRate:NaN,playbackBufferMin:.5,enabled:null,mode:o.a.LIVE_CATCHUP_MODE_DEFAULT},lastBitrateCachingInfo:{enabled:!0,ttl:36e4},lastMediaSettingsCachingInfo:{enabled:!0,ttl:36e4},cacheLoadThresholds:{video:50,audio:5},trackSwitchMode:{audio:o.a.TRACK_SWITCH_MODE_ALWAYS_REPLACE,video:o.a.TRACK_SWITCH_MODE_NEVER_REPLACE},selectionModeForInitialTrack:o.a.TRACK_SELECTION_MODE_HIGHEST_SELECTION_PRIORITY,fragmentRequestTimeout:2e4,retryIntervals:(e={},f(e,s.a.MPD_TYPE,500),f(e,s.a.XLINK_EXPANSION_TYPE,500),f(e,s.a.MEDIA_SEGMENT_TYPE,1e3),f(e,s.a.INIT_SEGMENT_TYPE,1e3),f(e,s.a.BITSTREAM_SWITCHING_SEGMENT_TYPE,1e3),f(e,s.a.INDEX_SEGMENT_TYPE,1e3),f(e,s.a.MSS_FRAGMENT_INFO_SEGMENT_TYPE,1e3),f(e,s.a.LICENSE,1e3),f(e,s.a.OTHER_TYPE,1e3),f(e,"lowLatencyReductionFactor",10),e),retryAttempts:(t={},f(t,s.a.MPD_TYPE,3),f(t,s.a.XLINK_EXPANSION_TYPE,1),f(t,s.a.MEDIA_SEGMENT_TYPE,3),f(t,s.a.INIT_SEGMENT_TYPE,3),f(t,s.a.BITSTREAM_SWITCHING_SEGMENT_TYPE,3),f(t,s.a.INDEX_SEGMENT_TYPE,3),f(t,s.a.MSS_FRAGMENT_INFO_SEGMENT_TYPE,3),f(t,s.a.LICENSE,3),f(t,s.a.OTHER_TYPE,3),f(t,"lowLatencyMultiplyFactor",5),t),abr:{movingAverageMethod:o.a.MOVING_AVERAGE_SLIDING_WINDOW,ABRStrategy:o.a.ABR_STRATEGY_DYNAMIC,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},bandwidthSafetyFactor:.9,useDefaultABRRules:!0,useDeadTimeLatency:!0,limitBitrateByPortal:!1,usePixelRatioInLimitBitrateByPortal:!1,maxBitrate:{audio:-1,video:-1},minBitrate:{audio:-1,video:-1},maxRepresentationRatio:{audio:1,video:1},initialBitrate:{audio:-1,video:-1},initialRepresentationRatio:{audio:-1,video:-1},autoSwitchBitrate:{audio:!0,video:!0},fetchThroughputCalculationMode:o.a.ABR_FETCH_THROUGHPUT_CALCULATION_MOOF_PARSING},cmcd:{enabled:!1,sid:null,cid:null,rtp:null,rtpSafetyFactor:5,mode:o.a.CMCD_MODE_QUERY,enabledKeys:["br","d","ot","tb","bl","dl","mtp","nor","nrr","su","bs","rtp","cid","pr","sf","sid","st","v"]}},errors:{recoverAttempts:{mediaErrorDecode:5}}},g=a.a.clone(h);return{get:function(){return g},update:function(e){"object"===l(e)&&function e(t,n,i){for(var o in t)t.hasOwnProperty(o)&&(n.hasOwnProperty(o)?"object"!==l(t[o])||t[o]instanceof Array||null===t[o]?(n[o]=a.a.clone(t[o]),d[i+o]&&r.trigger(d[i+o])):e(t[o],n[o],i.slice()+o+"."):console.error("Settings parameter "+i+o+" is not supported"))}(e,g,"")},reset:function(){g=a.a.clone(h)}}}d.__dashjs_factory_name="Settings";var h=r.a.getSingletonFactory(d);t.a=h},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 a=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,a;return t=e,(n=[{key:"extend",value:function(e,t){if(e){var n=!!t&&t.override,r=!!t&&t.publicOnly;for(var a in e)!e.hasOwnProperty(a)||this[a]&&!n||r&&-1===e[a].indexOf("public_")||(this[a]=e[a])}}}])&&r(t.prototype,n),a&&r(t,a),e}();t.a=a},19:function(e,t,n){"use strict";function r(e){return(r="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){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(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=s(e);if(t){var a=s(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}function o(e,t){return!t||"object"!==r(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 s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=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&&a(e,t)}(n,e);var t=i(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)).METRICS_INITIALISATION_COMPLETE="internal_metricsReportingInitialized",e.BECAME_REPORTING_PLAYER="internal_becameReportingPlayer",e.CMCD_DATA_GENERATED="cmcdDataGenerated",e}return n}(n(18).a));t.a=u},2:function(e,t,n){"use strict";function r(e){return(r="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){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(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=s(e);if(t){var a=s(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}function o(e,t){return!t||"object"!==r(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 s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(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=h(e);if(t){var a=h(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return d(this,n)}}function d(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 h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=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&&l(e,t)}(n,e);var t=f(n);function n(){return c(this,n),t.apply(this,arguments)}return n}(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&&a(e,t)}(n,e);var t=i(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)).ATTEMPT_BACKGROUND_SYNC="attemptBackgroundSync",e.BUFFERING_COMPLETED="bufferingCompleted",e.BUFFER_CLEARED="bufferCleared",e.BYTES_APPENDED_END_FRAGMENT="bytesAppendedEndFragment",e.BUFFER_REPLACEMENT_STARTED="bufferReplacementStarted",e.CHECK_FOR_EXISTENCE_COMPLETED="checkForExistenceCompleted",e.CURRENT_TRACK_CHANGED="currentTrackChanged",e.DATA_UPDATE_COMPLETED="dataUpdateCompleted",e.INBAND_EVENTS="inbandEvents",e.INITIAL_STREAM_SWITCH="initialStreamSwitch",e.INIT_FRAGMENT_LOADED="initFragmentLoaded",e.INIT_FRAGMENT_NEEDED="initFragmentNeeded",e.INTERNAL_MANIFEST_LOADED="internalManifestLoaded",e.ORIGINAL_MANIFEST_LOADED="originalManifestLoaded",e.LOADING_COMPLETED="loadingCompleted",e.LOADING_PROGRESS="loadingProgress",e.LOADING_DATA_PROGRESS="loadingDataProgress",e.LOADING_ABANDONED="loadingAborted",e.MANIFEST_UPDATED="manifestUpdated",e.MEDIA_FRAGMENT_LOADED="mediaFragmentLoaded",e.MEDIA_FRAGMENT_NEEDED="mediaFragmentNeeded",e.QUOTA_EXCEEDED="quotaExceeded",e.SEGMENT_LOCATION_BLACKLIST_ADD="segmentLocationBlacklistAdd",e.SEGMENT_LOCATION_BLACKLIST_CHANGED="segmentLocationBlacklistChanged",e.SERVICE_LOCATION_BLACKLIST_ADD="serviceLocationBlacklistAdd",e.SERVICE_LOCATION_BLACKLIST_CHANGED="serviceLocationBlacklistChanged",e.SET_FRAGMENTED_TEXT_AFTER_DISABLED="setFragmentedTextAfterDisabled",e.SET_NON_FRAGMENTED_TEXT="setNonFragmentedText",e.SOURCE_BUFFER_ERROR="sourceBufferError",e.STREAMS_COMPOSED="streamsComposed",e.STREAM_BUFFERING_COMPLETED="streamBufferingCompleted",e.STREAM_REQUESTING_COMPLETED="streamRequestingCompleted",e.TEXT_TRACKS_QUEUE_INITIALIZED="textTracksQueueInitialized",e.TIME_SYNCHRONIZATION_COMPLETED="timeSynchronizationComplete",e.UPDATE_TIME_SYNC_OFFSET="updateTimeSyncOffset",e.URL_RESOLUTION_FAILED="urlResolutionFailed",e.VIDEO_CHUNK_RECEIVED="videoChunkReceived",e.WALLCLOCK_TIME_UPDATED="wallclockTimeUpdated",e.XLINK_ELEMENT_LOADED="xlinkElementLoaded",e.XLINK_READY="xlinkReady",e.SEEK_TARGET="seekTarget",e.SETTING_UPDATED_LIVE_DELAY="settingUpdatedLiveDelay",e.SETTING_UPDATED_LIVE_DELAY_FRAGMENT_COUNT="settingUpdatedLiveDelayFragmentCount",e.SETTING_UPDATED_CATCHUP_ENABLED="settingUpdatedCatchupEnabled",e}return n}(n(18).a)));t.a=g},26:function(e,t){var n,r,a=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!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:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var u,c=[],l=!1,f=-1;function d(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&h())}function h(){if(!l){var e=s(d);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===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function p(){}a.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 g(e,t)),1!==c.length||l||s(h)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=p,a.addListener=p,a.once=p,a.off=p,a.removeListener=p,a.removeAllListeners=p,a.emit=p,a.prependListener=p,a.prependOnceListener=p,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},27:function(e,t,n){"use strict";var r=n(3),a=n(8),i=n(1),o=n(9);function s(e){e=e||{};var t=this.context,n=e.dashMetrics;return{getMaxIndex:function(e){var r=Object(a.a)(t).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("useBufferOccupancyABR")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("getScheduleController")))return r;!function(){if(!n||!n.hasOwnProperty("getCurrentBufferState"))throw new Error(i.a.MISSING_CONFIG_ERROR)}();var s=e.getMediaInfo(),u=e.getMediaType(),c=n.getCurrentBufferState(u),l=e.getScheduleController(),f=e.getAbrController(),d=e.getStreamInfo(),h=d?d.id:null,g=d&&d.manifestInfo?d.manifestInfo.isDynamic:null,p=f.getThroughputHistory(),m=p.getSafeAverageThroughput(u,g),E=p.getAverageLatency(u),_=e.useBufferOccupancyABR();return isNaN(m)||!c||_||f.getAbandonmentStateFor(h,u)!==o.a.ABANDON_LOAD&&(c.state===o.a.BUFFER_LOADED||g)&&(r.quality=f.getQualityForBitrate(s,m,h,E),l.setTimeToLoadDelay(0),r.reason={throughput:m,latency:E}),r},reset:function(){}}}s.__dashjs_factory_name="ThroughputRule";var u=r.a.getClassFactory(s),c=n(7),l=n(2),f=n(6),d=n(4);function h(e){e=e||{};var t,n,r,s=this.context,u=Object(c.a)(s).getInstance(),h=e.dashMetrics;function g(){(r={})[i.a.VIDEO]={ignoreCount:2},r[i.a.AUDIO]={ignoreCount:2}}function p(){g()}function m(e){isNaN(e.startTime)||e.mediaType!==i.a.AUDIO&&e.mediaType!==i.a.VIDEO||r[e.mediaType].ignoreCount>0&&r[e.mediaType].ignoreCount--}return t={getMaxIndex:function(e){var t=Object(a.a)(s).create();if(!e||!e.hasOwnProperty("getMediaType"))return t;!function(){if(!h||!h.hasOwnProperty("getCurrentBufferLevel")||!h.hasOwnProperty("getCurrentBufferState"))throw new Error(i.a.MISSING_CONFIG_ERROR)}();var u=e.getMediaType(),c=h.getCurrentBufferState(u),l=e.getRepresentationInfo().fragmentDuration,f=e.getStreamInfo(),d=f?f.id:null,g=e.getScheduleController(),p=f&&f.manifestInfo&&f.manifestInfo.isDynamic;if(function(e,t){return!e&&r[t].ignoreCount>0}(g.getPlaybackController().getLowLatencyModeEnabled(),u)||!l)return t;if(c&&c.state===o.a.BUFFER_EMPTY)n.debug("["+u+"] Switch to index 0; buffer is empty."),t.quality=0,t.reason="InsufficientBufferRule: Buffer is empty";else{var m=e.getMediaInfo(),E=e.getAbrController(),_=E.getThroughputHistory(),y=h.getCurrentBufferLevel(u),T=_.getAverageThroughput(u,p),b=_.getAverageLatency(u),v=T*(y/l)*.5;t.quality=E.getQualityForBitrate(m,v,d,b),t.reason="InsufficientBufferRule: being conservative to avoid immediate rebuffering"}return t},reset:function(){g(),u.off(d.a.PLAYBACK_SEEKING,p,t),u.off(l.a.BYTES_APPENDED_END_FRAGMENT,m,t)}},n=Object(f.a)(s).getInstance().getLogger(t),g(),u.on(d.a.PLAYBACK_SEEKING,p,t),u.on(l.a.BYTES_APPENDED_END_FRAGMENT,m,t),t}h.__dashjs_factory_name="InsufficientBufferRule";var g=r.a.getClassFactory(h);function p(e){e=e||{};var t,n,r,i,o,s=this.context,u=e.mediaPlayerModel,c=e.dashMetrics,l=e.settings;function d(){r={},i={},o=[]}return t={shouldAbandon:function(e){var t=Object(a.a)(s).create(a.a.NO_CHANGE,{name:p.__dashjs_factory_name});if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getCurrentRequest")&&e.hasOwnProperty("getRepresentationInfo")&&e.hasOwnProperty("getAbrController")))return t;var f,d,h=e.getMediaInfo(),g=e.getMediaType(),m=e.getStreamInfo(),E=m?m.id:null,_=e.getCurrentRequest();if(!isNaN(_.index)){f=g,d=_.index,r[f]=r[f]||{},r[f][d]=r[f][d]||{};var y=u.getStableBufferTime();if(c.getCurrentBufferLevel(g)>y)return t;var T=r[g][_.index];if(null===T||null===_.firstByteDate||i.hasOwnProperty(T.id))return t;if(void 0===T.firstByteTime&&(o[g]=[],T.firstByteTime=_.firstByteDate.getTime(),T.segmentDuration=_.duration,T.bytesTotal=_.bytesTotal,T.id=_.index),T.bytesLoaded=_.bytesLoaded,T.elapsedTime=(new Date).getTime()-T.firstByteTime,T.bytesLoaded>0&&T.elapsedTime>0&&function(e,t){o[e]=o[e]||[],o[e].push(t)}(g,Math.round(8*T.bytesLoaded/T.elapsedTime)),o[g].length>=5&&T.elapsedTime>500&&T.bytesLoaded<T.bytesTotal){var b=o[g].reduce((function(e,t){return e+t}),0);if(T.measuredBandwidthInKbps=Math.round(b/o[g].length),T.estimatedTimeOfDownload=+(8*T.bytesTotal/T.measuredBandwidthInKbps/1e3).toFixed(2),T.estimatedTimeOfDownload<1.8*T.segmentDuration||0===e.getRepresentationInfo().quality)return t;if(!i.hasOwnProperty(T.id)){var v=e.getAbrController(),A=T.bytesTotal-T.bytesLoaded,R=v.getBitrateList(h),w=v.getQualityForBitrate(h,T.measuredBandwidthInKbps*l.get().streaming.abr.bandwidthSafetyFactor,E),S=v.getMinAllowedIndexFor(g,E),I=void 0!==S?Math.max(S,w):w;A>T.bytesTotal*R[I].bitrate/R[v.getQualityFor(g,E)].bitrate&&(t.quality=I,t.reason.throughput=T.measuredBandwidthInKbps,t.reason.fragmentID=T.id,i[T.id]=T,n.debug("["+g+"] frag id",T.id," is asking to abandon and switch to quality to ",I," measured bandwidth was",T.measuredBandwidthInKbps),delete r[g][T.id])}}else T.bytesLoaded===T.bytesTotal&&delete r[g][T.id]}return t},reset:d},n=Object(f.a)(s).getInstance().getLogger(t),d(),t}p.__dashjs_factory_name="AbandonRequestsRule";var m=r.a.getClassFactory(p);function E(){var e,t,n=this.context;return e={getMaxIndex:function(e){var r=Object(a.a)(n).create();if(!e||!e.hasOwnProperty("getDroppedFramesHistory"))return r;var i=e.getDroppedFramesHistory(),o=e.getStreamInfo().id;if(i){var s=i.getFrameHistory(o);if(!s||0===s.length)return r;for(var u=0,c=0,l=a.a.NO_CHANGE,f=1;f<s.length;f++)if(s[f]&&(u=s[f].droppedVideoFrames,(c=s[f].totalVideoFrames)>375&&u/c>.15)){l=f-1,t.debug("index: "+l+" Dropped Frames: "+u+" Total Frames: "+c);break}return Object(a.a)(n).create(l,{droppedFrames:u})}return r}},t=Object(f.a)(n).getInstance().getLogger(e),e}E.__dashjs_factory_name="DroppedFramesRule";var _=r.a.getClassFactory(E);function y(){var e,t,n=this.context;return e={getMaxIndex:function(e){for(var r=e?e.getSwitchHistory():null,i=r?r.getSwitchRequests():[],o=0,s=0,u=0,c=Object(a.a)(n).create(),l=0;l<i.length;l++)if(void 0!==i[l]&&(o+=i[l].drops,s+=i[l].noDrops,u+=i[l].dropSize,o+s>=6&&o/s>.075)){c.quality=l>0&&i[l].drops>0?l-1:l,c.reason={index:c.quality,drops:o,noDrops:s,dropSize:u},t.debug("Switch history rule index: "+c.quality+" samples: "+(o+s)+" drops: "+o);break}return c}},t=Object(f.a)(n).getInstance().getLogger(e),e}y.__dashjs_factory_name="SwitchHistoryRule";var T=r.a.getClassFactory(y),b=n(5);function v(e){e=e||{};var t,n,r,s=this.context,u=e.dashMetrics,h=e.mediaPlayerModel,g=Object(c.a)(s).getInstance();function p(e,t,n){var r=n.reduce((function(e,t,r){return t>n[e]?r:e}),0);if(0===r)return null;var a=Math.max(e,10+2*t.length),i=(n[r]-1)/(a/10-1);return{gp:i,Vp:10/i}}function m(e){var t={},n=e.getMediaInfo().bitrateList.map((function(e){return e.bandwidth})),r=function(e){return e.map((function(e){return Math.log(e)}))}(n);r=r.map((function(e){return e-r[0]+1}));var a=h.getStableBufferTime(),i=p(a,n,r);return i?(t.state=1,t.bitrates=n,t.utilities=r,t.stableBufferTime=a,t.Vp=i.Vp,t.gp=i.gp,t.lastQuality=0,E(t)):t.state=0,t}function E(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function _(e,t){var n=h.getStableBufferTime();if(e.stableBufferTime!==n){var r=p(n,e.bitrates,e.utilities);if(r.Vp!==e.Vp||r.gp!==e.gp){var a=u.getCurrentBufferLevel(t),i=a+e.placeholderBuffer;i-=10,i*=r.Vp/e.Vp,i+=10,e.stableBufferTime=n,e.Vp=r.Vp,e.gp=r.gp,e.placeholderBuffer=Math.max(0,i-a)}}}function y(e,t){return e.Vp*(e.utilities[t]+e.gp)}function T(e,t){for(var n=e.bitrates[t],r=e.utilities[t],a=0,i=t-1;i>=0;--i)if(e.utilities[i]<e.utilities[t]){var o=e.bitrates[i],s=e.utilities[i],u=e.Vp*(e.gp+(n*s-o*r)/(n-o));a=Math.max(a,u)}return a}function v(e){var t=e.mediaType===i.a.AUDIO?[i.a.AUDIO]:r;for(var n in t)r.hasOwnProperty(n)&&2===r[n].state&&(r[n].placeholderBuffer=0)}function A(){for(var e in r)if(r.hasOwnProperty(e)){var t=r[e];0!==t.state&&(t.state=1,E(t))}}function R(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=r[e.chunk.mediaInfo.type];if(t&&0!==t.state){var n=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||n>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=n,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=n,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,S(t,e.chunk.mediaInfo.type)}}}function w(e){if(e&&e.metric===o.a.HTTP_REQUEST&&e.value&&e.value.type===b.a.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=r[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),S(t,e.mediaType))}}function S(e,t){if(!isNaN(e.lastSegmentStart)&&!isNaN(e.lastSegmentRequestTimeMs)&&!isNaN(e.placeholderBuffer)){if(e.placeholderBuffer*=.99,!isNaN(e.lastSegmentFinishTimeMs)){var n=u.getCurrentBufferLevel(t)+.001*(e.lastSegmentFinishTimeMs-e.lastSegmentRequestTimeMs),r=y(e,e.lastQuality),a=Math.max(0,r-n);e.placeholderBuffer=Math.min(a,e.placeholderBuffer)}e.lastSegmentWasReplacement&&!isNaN(e.lastSegmentDurationS)&&(e.placeholderBuffer+=e.lastSegmentDurationS),e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN}}function I(e){if(e){var t=r[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function N(e){if(e){var t=r[e.mediaType];if(t&&0!==t.state){var n,a=u.getCurrentBufferLevel(e.mediaType);n=t.abrQuality>0?T(t,t.abrQuality):10;var i=Math.max(0,n-a);t.placeholderBuffer=Math.min(t.placeholderBuffer,i)}}}function C(){r={}}return t={getMaxIndex:function(e){var t=Object(a.a)(s).create();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useBufferOccupancyABR")))return t;var i=e.getMediaInfo(),o=e.getMediaType(),c=e.getScheduleController(),l=e.getStreamInfo(),f=e.getAbrController(),d=f.getThroughputHistory(),h=l?l.id:null,g=l&&l.manifestInfo&&l.manifestInfo.isDynamic,p=e.useBufferOccupancyABR();if(t.reason=t.reason||{},!p)return t;c.setTimeToLoadDelay(0);var b=function(e){var t=e.getMediaType(),n=r[t];return n?0!==n.state&&_(n,t):(n=m(e),r[t]=n),n}(e);if(0===b.state)return t;var v,A=u.getCurrentBufferLevel(o),R=d.getAverageThroughput(o,g),w=d.getSafeAverageThroughput(o,g),S=d.getAverageLatency(o);if(t.reason.state=b.state,t.reason.throughput=R,t.reason.latency=S,isNaN(R))return t;switch(b.state){case 1:v=f.getQualityForBitrate(i,w,h,S),t.quality=v,t.reason.throughput=w,b.placeholderBuffer=Math.max(0,T(b,v)-A),b.lastQuality=v,!isNaN(b.lastSegmentDurationS)&&A>=b.lastSegmentDurationS&&(b.state=2);break;case 2:!function(e,t){var n=Date.now();if(isNaN(e.lastSegmentFinishTimeMs)){if(!isNaN(e.lastCallTimeMs)){var r=.001*(n-e.lastCallTimeMs);e.placeholderBuffer+=Math.max(0,r)}}else{var a=.001*(n-e.lastSegmentFinishTimeMs);e.placeholderBuffer+=Math.max(0,a)}e.lastCallTimeMs=n,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN,_(e,t)}(b,o),v=function(e,t){for(var n=e.bitrates.length,r=NaN,a=NaN,i=0;i<n;++i){var o=(e.Vp*(e.utilities[i]+e.gp)-t)/e.bitrates[i];(isNaN(a)||o>=a)&&(a=o,r=i)}return r}(b,A+b.placeholderBuffer);var I=f.getQualityForBitrate(i,w,h,S);v>b.lastQuality&&v>I&&(v=Math.max(I,b.lastQuality));var N=Math.max(0,A+b.placeholderBuffer-y(b,v));N<=b.placeholderBuffer?(b.placeholderBuffer-=N,N=0):(N-=b.placeholderBuffer,b.placeholderBuffer=0,v<f.getMaxAllowedIndexFor(o,h)?c.setTimeToLoadDelay(1e3*N):N=0),t.quality=v,t.reason.throughput=R,t.reason.latency=S,t.reason.bufferLevel=A,t.reason.placeholderBuffer=b.placeholderBuffer,t.reason.delay=N,b.lastQuality=v;break;default:n.debug("BOLA ABR rule invoked in bad state."),t.quality=f.getQualityForBitrate(i,w,h,S),t.reason.state=b.state,t.reason.throughput=w,t.reason.latency=S,b.state=1,E(b)}return t},reset:function(){C(),g.off(d.a.BUFFER_EMPTY,v,t),g.off(d.a.PLAYBACK_SEEKING,A,t),g.off(d.a.METRIC_ADDED,w,t),g.off(d.a.QUALITY_CHANGE_REQUESTED,I,t),g.off(d.a.FRAGMENT_LOADING_ABANDONED,N,t),g.off(l.a.MEDIA_FRAGMENT_LOADED,R,t)}},n=Object(f.a)(s).getInstance().getLogger(t),C(),g.on(d.a.BUFFER_EMPTY,v,t),g.on(d.a.PLAYBACK_SEEKING,A,t),g.on(d.a.METRIC_ADDED,w,t),g.on(d.a.QUALITY_CHANGE_REQUESTED,I,t),g.on(d.a.FRAGMENT_LOADING_ABANDONED,N,t),g.on(l.a.MEDIA_FRAGMENT_LOADED,R,t),t}v.__dashjs_factory_name="BolaRule";var A=r.a.getClassFactory(v);function R(e){e=e||{};var t,n,r,s,u=this.context,d=e.dashMetrics,h=Object(c.a)(u).getInstance();function g(e){var t={},n=e.getMediaInfo(),a=n.bitrateList.map((function(e){return e.bandwidth/1e3}));return t.state=1,t.bitrates=a,t.lastQuality=0,function(e){if(!e||!e.type)return;r[e.type]={},r[e.type].w=[],r[e.type].prev_w=[],r[e.type].Q=0,r[e.type].segment_request_start_s=0,r[e.type].segment_download_finish_s=0,r[e.type].B_target=1.5}(n),p(t),t}function p(e){e.placeholderBuffer=0,e.mostAdvancedSegmentStart=NaN,e.lastSegmentWasReplacement=!1,e.lastSegmentStart=NaN,e.lastSegmentDurationS=NaN,e.lastSegmentRequestTimeMs=NaN,e.lastSegmentFinishTimeMs=NaN}function m(){for(var e in n)if(n.hasOwnProperty(e)){var t=n[e];0!==t.state&&(t.state=1,p(t))}}function E(e){if(e&&e.chunk&&e.chunk.mediaInfo){var t=n[e.chunk.mediaInfo.type],a=r[e.chunk.mediaInfo.type];if(t&&0!==t.state){var i=e.chunk.start;isNaN(t.mostAdvancedSegmentStart)||i>t.mostAdvancedSegmentStart?(t.mostAdvancedSegmentStart=i,t.lastSegmentWasReplacement=!1):t.lastSegmentWasReplacement=!0,t.lastSegmentStart=i,t.lastSegmentDurationS=e.chunk.duration,t.lastQuality=e.chunk.quality,y(t,a)}}}function _(e){if(e&&e.metric===o.a.HTTP_REQUEST&&e.value&&e.value.type===b.a.MEDIA_SEGMENT_TYPE&&e.value.trace&&e.value.trace.length){var t=n[e.mediaType],a=r[e.mediaType];t&&0!==t.state&&(t.lastSegmentRequestTimeMs=e.value.trequest.getTime(),t.lastSegmentFinishTimeMs=e.value._tfinish.getTime(),y(t,a))}}function y(e,t){isNaN(e.lastSegmentStart)||isNaN(e.lastSegmentRequestTimeMs)||(t.segment_request_start_s=.001*e.lastSegmentRequestTimeMs,t.segment_download_finish_s=.001*e.lastSegmentFinishTimeMs,e.lastSegmentStart=NaN,e.lastSegmentRequestTimeMs=NaN)}function T(e){if(e&&e.mediaType){var t=n[e.mediaType];t&&0!==t.state&&(t.abrQuality=e.newQuality)}}function v(e,t){if(e.length!==t.length)return-1;for(var n=0,r=0;r<e.length;r++)n+=e[r]*t[r];return n}function A(){n={},r={}}return t={getMaxIndex:function(e){var t,o=Object(a.a)(u).create(),c=Math.pow(4,.99),l=Math.max(Math.pow(4,1),c*Math.sqrt(4)),f=e.getMediaInfo(),h=e.getMediaType(),m=f.bitrateList.map((function(e){return e.bandwidth})),E=m.length,_=e.getScheduleController(),y=e.getStreamInfo(),T=e.getAbrController(),b=T.getThroughputHistory(),A=y&&y.manifestInfo&&y.manifestInfo.isDynamic,R=e.useL2AABR(),w=d.getCurrentBufferLevel(h,!0),S=b.getSafeAverageThroughput(h,A),I=b.getAverageThroughput(h,A),N=b.getAverageLatency(h),C=e.getVideoModel().getPlaybackRate();if(!(e&&e.hasOwnProperty("getMediaInfo")&&e.hasOwnProperty("getMediaType")&&e.hasOwnProperty("getScheduleController")&&e.hasOwnProperty("getStreamInfo")&&e.hasOwnProperty("getAbrController")&&e.hasOwnProperty("useL2AABR")))return o;if(o.reason=o.reason||{},!R||h===i.a.AUDIO)return o;_.setTimeToLoadDelay(0);var O=function(e){var t=e.getMediaType(),r=n[t];return r||(r=g(e),n[t]=r),r}(e);if(0===O.state)return o;var M=r[h];if(!M)return o;if(o.reason.state=O.state,o.reason.throughput=I,o.reason.latency=N,isNaN(I))return o;switch(O.state){case 1:if(t=T.getQualityForBitrate(f,S,y.id,N),o.quality=t,o.reason.throughput=S,O.lastQuality=t,!isNaN(O.lastSegmentDurationS)&&w>=M.B_target){O.state=2,M.Q=c;for(var D=0;D<E;++D)D===O.lastQuality?M.prev_w[D]=1:M.prev_w[D]=0}break;case 2:var L=[],P=d.getCurrentHttpRequest(h).trace.reduce((function(e,t){return e+t.d}),0),B=d.getCurrentHttpRequest(h).trace.reduce((function(e,t){return e+t.b[0]}),0),F=Math.round(8*B/P);F<1&&(F=1);for(var x=O.lastSegmentDurationS,k=1,U=0;U<E;++U)m[U]=m[U]/1e3,C*m[U]>F&&(k=-1),M.w[U]=M.prev_w[U]+k*(x/(2*l))*((M.Q+c)*(C*m[U]/F));M.w=function(e){for(var t=e.length,n=!1,r=[],a=0;a<t;++a)r[a]=e[a];for(var i=e.sort((function(e,t){return t-e})),o=0,s=0,u=[],c=0;c<t-1;++c)if((s=((o+=i[c])-1)/(c+1))>=i[c+1]){n=!0;break}n||(s=(o+i[t-1]-1)/t);for(var l=0;l<t;++l)u[l]=Math.max(r[l]-s,0);return u}(M.w);for(var G=0;G<E;++G)L[G]=M.w[G]-M.prev_w[G],M.prev_w[G]=M.w[G];M.Q=Math.max(0,M.Q-x+x*C*((v(m,M.prev_w)+v(m,L))/F));for(var j=[],H=0;H<E;++H)j[H]=Math.abs(m[H]-v(M.w,m));(t=j.indexOf(Math.min.apply(Math,j)))>O.lastQuality&&m[O.lastQuality+1]<=F&&(t=O.lastQuality+1),m[t]>=F&&(M.Q=2*Math.max(c,M.Q)),o.quality=t,o.reason.throughput=I,o.reason.latency=N,o.reason.bufferLevel=w,O.lastQuality=o.quality;break;default:s.debug("L2A ABR rule invoked in bad state."),o.quality=T.getQualityForBitrate(f,S,y.id,N),o.reason.state=O.state,o.reason.throughput=S,o.reason.latency=N,O.state=1,p(O)}return o},reset:function(){A(),h.off(l.a.PLAYBACK_SEEKING,m,t),h.off(l.a.MEDIA_FRAGMENT_LOADED,E,t),h.off(l.a.METRIC_ADDED,_,t),h.off(l.a.QUALITY_CHANGE_REQUESTED,T,t)}},s=Object(f.a)(u).getInstance().getLogger(t),A(),h.on(l.a.PLAYBACK_SEEKING,m,t),h.on(l.a.MEDIA_FRAGMENT_LOADED,E,t),h.on(l.a.METRIC_ADDED,_,t),h.on(l.a.QUALITY_CHANGE_REQUESTED,T,t),t}R.__dashjs_factory_name="L2ARule";var w=r.a.getClassFactory(R),S="manual_weight_selection",I="random_weight_selection",N="dynamic_weight_selection";function C(){var e,t,n,r,a,i,o,s,u,c=this.context;function l(){n=null,r=1,a=100,i=0,o=null,s=null,u=N}function d(){var e=0;if(n)for(var t=0;t<n.length;t++){var r=n[t];r.state.throughput>e&&(e=r.state.throughput)}return e}function h(e,t,n){var r=e.map((function(e,r){return n[r]*Math.pow(e-t[r],2)})).reduce((function(e,t){return e+t}));return(r<0?-1:1)*Math.sqrt(Math.abs(r))}function g(e,t,n){for(var r=0;r<t.length;r++){var a=t[r],i=(s=e,h([(o=a).state.throughput,o.state.latency,o.state.rebuffer,o.state.switch],[s.state.throughput,s.state.latency,s.state.rebuffer,s.state.switch],[1,1,1,1]));p(a,n,Math.exp(-1*Math.pow(i,2)/(2*Math.pow(.1,2))))}var o,s}function p(e,t,n){var r=e.state,a=[.01,.01,.01,.01];r.throughput=r.throughput+(t[0]-r.throughput)*a[0]*n,r.latency=r.latency+(t[1]-r.latency)*a[1]*n,r.rebuffer=r.rebuffer+(t[2]-r.rebuffer)*a[2]*n,r.switch=r.switch+(t[3]-r.switch)*a[3]*n}function m(e,t,n,r,a,i,u){o||(o=s[s.length-1]);var c=e.findWeightVector(t,n,r,a,i,u);null!==c&&-1!==c&&(o=c)}return e={getNextQuality:function(e,c,l,f,p,E,_){var y=l,T=f,b=c,v=function(e){if(!n){n=[];var t=e.bitrateList,a=[];i=t[0].bandwidth,t.forEach((function(e){a.push(e.bandwidth),e.bandwidth<i&&(i=e.bandwidth)})),c=a.map((function(e){return Math.pow(e,2)})).reduce((function(e,t){return e+t})),r=Math.sqrt(c);for(var o=0;o<t.length;o++){var u={qualityIndex:o,bitrate:t[o].bandwidth,state:{throughput:t[o].bandwidth/r,latency:0,rebuffer:0,switch:0}};n.push(u)}s=function(e){var t=[],n=function(e){for(var t=[],n=0;n<e;n++){var r=[Math.random()*d(),Math.random(),Math.random(),Math.random()];t.push(r)}return t}(Math.pow(e.length,2));t.push(n[0]);for(var r=[1,1,1,1],a=1;a<e.length;a++){for(var i=null,o=null,s=0;s<n.length;s++){for(var u=n[s],c=null,l=0;l<t.length;l++){var f=h(u,t[l],r);(null===c||f<c)&&(c=f)}(null===o||c>o)&&(i=u,o=c)}t.push(i)}for(var g=null,p=null,m=0;m<t.length;m++){for(var E=0,_=0;_<t.length;_++)m!==_&&(E+=h(t[m],t[_],r));(null===g||E>g)&&(g=E,p=m)}var y=[];y.push(t[p]),t.splice(p,1);for(;t.length>0;){for(var T=null,b=null,v=0;v<t.length;v++){var A=h(y[0],t[v],r);(null===T||A<T)&&(T=A,b=v)}y.push(t[b]),t.splice(b,1)}return y}(n)}var c;return n}(e),A=c/r;A>1&&(A=d()),l/=a,t.debug("getNextQuality called throughput:".concat(A," latency:").concat(l," bufferSize:").concat(f," currentQualityIndex:").concat(E," playbackRate:").concat(p));var R=v[E],w=R.bitrate*_.getSegmentDuration()/b,C=Math.max(0,w-T);if(T-w<_.getMinBuffer())return t.debug("Buffer is low for bitrate= ".concat(R.bitrate," downloadTime=").concat(w," currentBuffer=").concat(T," rebuffer=").concat(C)),function(e,t){var r=0,a=e;if(n)for(var i=0;i<n.length;i++){var o=n[i];o.bitrate<e.bitrate&&o.bitrate>r&&t>o.bitrate&&(r=o.bitrate,a=o)}return a}(R,b).qualityIndex;switch(u){case S:o=[.4,.4,.4,.4];break;case I:!function(e){o=function(e,t){for(var n=[],r=Math.sqrt(2/e),a=0;a<t;a++)n.push(Math.random()*r);return o=n}(e.length,4)}(v);break;case N:m(_,v,y,T,C,b,p);break;default:m(_,v,y,T,C,b,p)}for(var O=null,M=null,D=null,L=0;L<v.length;L++){var P=v[L],B=P.state,F=[B.throughput,B.latency,B.rebuffer,B.switch],x=o.slice(),k=_.getNextBufferWithBitrate(P.bitrate,T,b),U=k<_.getMinBuffer();U&&t.debug("Buffer is low for bitrate=".concat(P.bitrate," downloadTime=").concat(w," currentBuffer=").concat(T," nextBuffer=").concat(k)),(P.bitrate>c-1e4||U)&&P.bitrate!==i&&(x[0]=100);var G=h(F,[A,0,0,0],x);(null===O||G<O)&&(O=G,M=P.qualityIndex,D=P)}var j=Math.abs(R.bitrate-D.bitrate)/r;return g(R,v,[A,l,C,j]),g(D,v,[A,0,0,j]),M},reset:function(){l()}},t=Object(f.a)(c).getInstance().getLogger(e),l(),e}C.__dashjs_factory_name="LearningAbrController";var O=r.a.getClassFactory(C);var M=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=null,this.lastBitrate=null,this.weights={},this.weights.bitrateReward=null,this.weights.bitrateSwitchPenalty=null,this.weights.rebufferPenalty=null,this.weights.latencyPenalty=null,this.weights.playbackSpeedPenalty=null,this.bitrateWSum=0,this.bitrateSwitchWSum=0,this.rebufferWSum=0,this.latencyWSum=0,this.playbackSpeedWSum=0,this.totalQoe=0};function D(){var e,t,n,r,a;function i(){t=null,n=null,r=null,a=null}function o(e,t,n,r){var a=new M;return a.type=e,a.weights.bitrateReward=t||1,a.weights.bitrateSwitchPenalty=1,a.weights.rebufferPenalty=n||1e3,a.weights.latencyPenalty=[],a.weights.latencyPenalty.push({threshold:1.1,penalty:.05*r}),a.weights.latencyPenalty.push({threshold:1e8,penalty:.1*n}),a.weights.playbackSpeedPenalty=r||200,a}function s(e,t,n,r,a){a.bitrateWSum+=a.weights.bitrateReward*e,a.lastBitrate&&(a.bitrateSwitchWSum+=a.weights.bitrateSwitchPenalty*Math.abs(e-a.lastBitrate)),a.lastBitrate=e,a.rebufferWSum+=a.weights.rebufferPenalty*t;for(var i=0;i<a.weights.latencyPenalty.length;i++){var o=a.weights.latencyPenalty[i];if(n<=o.threshold){a.latencyWSum+=o.penalty*n;break}}a.playbackSpeedWSum+=a.weights.playbackSpeedPenalty*Math.abs(1-r),a.totalQoe=a.bitrateWSum-a.bitrateSwitchWSum-a.rebufferWSum-a.latencyWSum-a.playbackSpeedWSum}return e={setupPerSegmentQoe:function(e,i,s){t=o("segment",e,i,s),n=e,r=i,a=s},logSegmentMetrics:function(e,n,r,a){t&&s(e,n,r,a,t)},getPerSegmentQoe:function(){return t},calculateSingleUseQoe:function(e,t,i,u){var c=null;return n&&r&&a&&(c=o("segment",n,r,a)),c?(s(e,t,i,u,c),c.totalQoe):0},reset:function(){i()}},i(),e}D.__dashjs_factory_name="LoLpQoeEvaluator";var L=r.a.getClassFactory(D);function P(e){var t,n,r,a,i,o=e.targetLatency,s=e.bufferMin,u=e.segmentDuration,c=e.qoeEvaluator;function l(){return u}function f(e,t){var n=l();return t>n?e-n:e+n-t}return t={getMinBuffer:function(){return s},getSegmentDuration:l,getNextBufferWithBitrate:function(e,t,n){return f(t,e*u/n)},getNextBuffer:f,findWeightVector:function(e,t,a,i,l,d){var h=null,g=null,p=null,m=Math.abs(t-r);return e.forEach((function(e){n.forEach((function(n){n[0];var r=n[1],i=n[2],E=(n[3],e.bitrate*u/l),_=f(a,E),y=(0===i?10:1/i)*Math.max(1e-5,E-_),T=(0===r?10:1/r)*e.state.latency,b=c.calculateSingleUseQoe(e.bitrate,y,T,d);(null===h||b>h)&&function(e,t,n){if(e>o+n)return!1;return t>=s}(t,_,m)&&(h=b,g=n,p=e.bitrate)}))})),null===g&&null===p&&(g=-1),r=t,g}},a=[.2,.4,.6,.8,1],i=4,n=function e(t,n,r){if(r===n)return t;for(var i=t.length,o=0;o<i;o++)for(var s=t.shift(),u=0;u<a.length;u++)t.push(s.concat(a[u]));return e(t,n,r+1)}(a.map((function(e){return[e]})),i,1),r=0,t}P.__dashjs_factory_name="LoLpWeightSelector";var B=r.a.getClassFactory(P);function F(e){var t,n,r,s,u=(e=e||{}).dashMetrics,c=this.context;return n={getMaxIndex:function(e){try{var n=Object(a.a)(c).create(),l=e.getMediaInfo().type,f=e.getAbrController(),d=e.getStreamInfo(),h=f.getQualityFor(l,d.id),g=e.getMediaInfo(),p=u.getCurrentBufferState(l),m=e.getScheduleController(),E=u.getCurrentBufferLevel(l,!0),_=d&&d.manifestInfo?d.manifestInfo.isDynamic:null,y=m.getPlaybackController(),T=y.getCurrentLiveLatency();if(!e.useLoLPABR()||l===i.a.AUDIO)return n;T||(T=0);var b=y.getPlaybackRate(),v=f.getThroughputHistory().getSafeAverageThroughput(l,_);if(t.debug("Throughput ".concat(Math.round(v)," kbps")),isNaN(v)||!p)return n;if(f.getAbandonmentStateFor(d.id,l)===o.a.ABANDON_LOAD)return n;for(var A=g.bitrateList,R=e.getRepresentationInfo().fragmentDuration,w=A[0].bandwidth/1e3,S=A[A.length-1].bandwidth/1e3,I=0;I<A.length;I++){var N=A[I].bandwidth/1e3;N>S?S=N:N<w&&(w=N)}var C=A[h].bandwidth/1e3,O=u.getCurrentHttpRequest(l,!0),M=(O.tresponse.getTime()-O.trequest.getTime())/1e3,D=M>R?M-R:0;s.setupPerSegmentQoe(R,S,w),s.logSegmentMetrics(C,D,T,b);var L=B(c).create({targetLatency:1.5,bufferMin:.3,segmentDuration:R,qoeEvaluator:s});return n.quality=r.getNextQuality(g,1e3*v,T,E,b,h,L),n.reason={throughput:v,latency:T},n.priority=a.a.PRIORITY.STRONG,m.setTimeToLoadDelay(0),n.quality!==h&&console.log("[TgcLearningRule]["+l+"] requesting switch to index: ",n.quality,"Average throughput",Math.round(v),"kbps"),n}catch(e){throw e}},reset:function(){r.reset(),s.reset()}},t=Object(f.a)(c).getInstance().getLogger(n),r=O(c).create(),s=L(c).create(),n}F.__dashjs_factory_name="LoLPRule";var x=r.a.getClassFactory(F);function k(e){e=e||{};var t,n,r=this.context,o=e.mediaPlayerModel,s=e.customParametersModel,c=e.dashMetrics,l=e.settings;function f(e){return e.filter((function(e){return e.quality>a.a.NO_CHANGE}))}function d(e){var t,n,i,o,s,u={},c=null;if(0!==e.length){for(u[a.a.PRIORITY.STRONG]={quality:a.a.NO_CHANGE,reason:null},u[a.a.PRIORITY.WEAK]={quality:a.a.NO_CHANGE,reason:null},u[a.a.PRIORITY.DEFAULT]={quality:a.a.NO_CHANGE,reason:null},t=0,n=e.length;t<n;t+=1)(i=e[t]).quality!==a.a.NO_CHANGE&&(u[i.priority].quality===a.a.NO_CHANGE||u[i.priority].quality>i.quality)&&(u[i.priority].quality=i.quality,u[i.priority].reason=i.reason||null);return u[a.a.PRIORITY.WEAK].quality!==a.a.NO_CHANGE&&(c=u[a.a.PRIORITY.WEAK]),u[a.a.PRIORITY.DEFAULT].quality!==a.a.NO_CHANGE&&(c=u[a.a.PRIORITY.DEFAULT]),u[a.a.PRIORITY.STRONG].quality!==a.a.NO_CHANGE&&(c=u[a.a.PRIORITY.STRONG]),c&&(o=c.quality,s=c.reason),Object(a.a)(r).create(o,s)}}return{initialize:function(){t=[],n=[],l.get().streaming.abr.useDefaultABRRules&&(l.get().streaming.abr.ABRStrategy===i.a.ABR_STRATEGY_L2A?t.push(w(r).create({dashMetrics:c,settings:l})):l.get().streaming.abr.ABRStrategy===i.a.ABR_STRATEGY_LoLP?t.push(x(r).create({dashMetrics:c})):(t.push(A(r).create({dashMetrics:c,mediaPlayerModel:o,settings:l})),t.push(u(r).create({dashMetrics:c})),l.get().streaming.abr.additionalAbrRules.insufficientBufferRule&&t.push(g(r).create({dashMetrics:c,settings:l})),l.get().streaming.abr.additionalAbrRules.switchHistoryRule&&t.push(T(r).create()),l.get().streaming.abr.additionalAbrRules.droppedFramesRule&&t.push(_(r).create()),l.get().streaming.abr.additionalAbrRules.abandonRequestsRule&&n.push(m(r).create({dashMetrics:c,mediaPlayerModel:o,settings:l})))),s.getAbrCustomRules().forEach((function(e){"qualitySwitchRules"===e.type&&t.push(e.rule(r).create()),"abandonFragmentRules"===e.type&&n.push(e.rule(r).create())}))},reset:function(){[t,n].forEach((function(e){e&&e.length&&e.forEach((function(e){return e.reset&&e.reset()}))})),t=[],n=[]},getMaxQuality:function(e){return d(f(t.map((function(t){return t.getMaxIndex(e)}))))||Object(a.a)(r).create()},getMinSwitchRequest:d,shouldAbandonFragment:function(e,t){return d(f(n.map((function(n){return n.shouldAbandon(e,t)}))))||Object(a.a)(r).create()},getQualitySwitchRules:function(){return t}}}k.__dashjs_factory_name="ABRRulesCollection";var U=r.a.getClassFactory(k);U.QUALITY_SWITCH_RULES="qualitySwitchRules",U.ABANDON_FRAGMENT_RULES="abandonFragmentRules",r.a.updateSingletonFactory(k.__dashjs_factory_name,U);t.a=U},3:function(e,t,n){"use strict";var r=function(){var e,t=[],n={},r={};function a(e,n){for(var r in t){var a=t[r];if(a.context===e&&a.name===n)return a.instance}return null}function i(e,t){return t[e]}function o(e,t,n){e in n&&(n[e]=t)}function s(t,n,r){var a,i=t.__dashjs_factory_name,o=n[i];if(o){var s=o.instance;if(!o.override)return s.apply({context:n,factory:e},r);for(var u in a=t.apply({context:n},r),s=s.apply({context:n,factory:e,parent:a},r))a.hasOwnProperty(u)&&(a[u]=s[u])}else a=t.apply({context:n},r);return a.getClassName=function(){return i},a}return e={extend:function(e,t,n,r){!r[e]&&t&&(r[e]={instance:t,override:n})},getSingletonInstance:a,setSingletonInstance:function(e,n,r){for(var a in t){var i=t[a];if(i.context===e&&i.name===n)return void(t[a].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=i(e.__dashjs_factory_name,n);return r||(r=function(n){var r;return void 0===n&&(n={}),{getInstance:function(){return r||(r=a(n,e.__dashjs_factory_name)),r||(r=s(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 i(e,n)},updateSingletonFactory:function(e,t){o(e,t,n)},getClassFactory:function(e){var t=i(e.__dashjs_factory_name,r);return t||(t=function(t){return void 0===t&&(t={}),{create:function(){return s(e,t,arguments)}}},r[e.__dashjs_factory_name]=t),t},getClassFactoryByName:function(e){return i(e,r)},updateClassFactory:function(e,t){o(e,t,r)}}}();t.a=r},30:function(e,t,n){"use strict";t.a=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value=""}},31:function(e,t,n){"use strict";var r=n(30),a=n(3),i=n(16),o=n(15),s=n(27),u=n(1);function c(){var e,t,n,a,c,l,f,d,h=this.context,g=Object(i.a)(h).getInstance();function p(){a=[],c=[],l=[],d=[],f=null,t=[]}function m(e,t){var n=-1;e.some((function(e,r){if(e===t)return n=r,!0})),n<0||e.splice(n,1)}function E(e){var t;for(t=0;t<d.length;t++)if(d[t].rulename===e)return t;return-1}function _(e,n){y(e,n);var a=new r.a;a.schemeIdUri=e,a.value=n,t.push(a)}function y(e,n){Object(o.b)(e,"string"),Object(o.b)(n,"string"),t.forEach((function(r,a){r.schemeIdUri===e&&r.value===n&&t.splice(a,1)}))}return e={getCustomInitialTrackSelectionFunction:function(){return f},setCustomInitialTrackSelectionFunction:function(e){f=e},resetCustomInitialTrackSelectionFunction:function(){f=null},getLicenseResponseFilters:function(){return c},getLicenseRequestFilters:function(){return a},getCustomCapabilitiesFilters:function(){return l},registerCustomCapabilitiesFilter:function(e){l.push(e)},registerLicenseResponseFilter:function(e){c.push(e)},registerLicenseRequestFilter:function(e){a.push(e)},unregisterCustomCapabilitiesFilter:function(e){m(l,e)},unregisterLicenseResponseFilter:function(e){m(c,e)},unregisterLicenseRequestFilter:function(e){m(a,e)},addAbrCustomRule:function(e,t,n){if("string"!=typeof e||e!==s.a.ABANDON_FRAGMENT_RULES&&e!==s.a.QUALITY_SWITCH_RULES||"string"!=typeof t)throw u.a.BAD_ARGUMENT_ERROR;var r=E(t);-1===r?d.push({type:e,rulename:t,rule:n}):(d[r].type=e,d[r].rule=n)},removeAllAbrCustomRule:function(){d=[]},removeAbrCustomRule:function(e){if(e){var t=E(e);-1!==t&&d.splice(t,1)}else d=[]},getAbrCustomRules:function(){return d},addUTCTimingSource:_,removeUTCTimingSource:y,getUTCTimingSources:function(){return t},clearDefaultUTCTimingSources:function(){t=[]},restoreDefaultUTCTimingSources:function(){var e=g.get().streaming.utcSynchronization.defaultTimingSource;_(e.scheme,e.value)},setXHRWithCredentialsForType:function e(t,r){t?n[t]=!!r:Object.keys(n).forEach((function(t){e(t,r)}))},getXHRWithCredentialsForType:function(e){var t=n[e];return void 0===t?n.default:t},setConfig:function(){},reset:function(){p()}},n={default:!1},p(),e}c.__dashjs_factory_name="CustomParametersModel",t.a=a.a.getSingletonFactory(c)},37:function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var a=e[r];"."===a?e.splice(r,1):".."===a?(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="",a=!1,i=arguments.length-1;i>=-1&&!a;i--){var o=i>=0?arguments[i]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,a="/"===o.charAt(0))}return(a?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!a).join("/"))||"."},t.normalize=function(e){var i=t.isAbsolute(e),o="/"===a(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!i).join("/"))||i||(e="."),e&&o&&(e+="/"),(i?"/":"")+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 a=r(e.split("/")),i=r(n.split("/")),o=Math.min(a.length,i.length),s=o,u=0;u<o;u++)if(a[u]!==i[u]){s=u;break}var c=[];for(u=s;u<a.length;u++)c.push("..");return(c=c.concat(i.slice(s))).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,a=!0,i=e.length-1;i>=1;--i)if(47===(t=e.charCodeAt(i))){if(!a){r=i;break}}else a=!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,a=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!a){n=t+1;break}}else-1===r&&(a=!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,a=!0,i=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===r&&(a=!1,r=o+1),46===s?-1===t?t=o:1!==i&&(i=1):-1!==t&&(i=-1);else if(!a){n=o+1;break}}return-1===t||-1===r||0===i||1===i&&t===r-1&&t===n+1?"":e.slice(t,r)};var a="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(a,i){"use strict";var o="model",s="name",u="type",c="vendor",l="version",f="mobile",d="tablet",h="smarttv",g=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},p=function(e,t){return"string"==typeof e&&-1!==m(t).indexOf(m(e))},m=function(e){return e.toLowerCase()},E=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,a,i,o,s,u=0;u<t.length&&!o;){var c=t[u],l=t[u+1];for(n=r=0;n<c.length&&!o;)if(o=c[n++].exec(e))for(a=0;a<l.length;a++)s=o[++r],"object"==typeof(i=l[a])&&i.length>0?2===i.length?"function"==typeof i[1]?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3===i.length?"function"!=typeof i[1]||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4===i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;u+=2}},y=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(p(t[n][r],e))return"?"===n?void 0:n}else if(p(t[n],e))return"?"===n?void 0:n;return e},T={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"},b={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",m]],[/((?: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/,"",m]],[/(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",m]]],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,[c,"Samsung"],[u,d]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[o,[c,"Samsung"],[u,f]],[/\((ip(?:hone|od)[\w ]*);/i],[o,[c,"Apple"],[u,f]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[o,[c,"Apple"],[u,d]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[o,[c,"Huawei"],[u,d]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}-[atu]?[ln][01259x][012359][an]?)\b(?!.+d\/s)/i],[o,[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],[[o,/_/g," "],[c,"Xiaomi"],[u,f]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[o,/_/g," "],[c,"Xiaomi"],[u,d]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[o,[c,"OPPO"],[u,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[o,[c,"Vivo"],[u,f]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[o,[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],[o,[c,"Motorola"],[u,f]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[o,[c,"Motorola"],[u,d]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[o,[c,"LG"],[u,d]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[o,[c,"LG"],[u,f]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[o,[c,"Lenovo"],[u,d]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[o,/_/g," "],[c,"Nokia"],[u,f]],[/(pixel c)\b/i],[o,[c,"Google"],[u,d]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[o,[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],[o,[c,"Sony"],[u,f]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[o,"Xperia Tablet"],[c,"Sony"],[u,d]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[o,[c,"OnePlus"],[u,f]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[o,[c,"Amazon"],[u,d]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[o,/(.+)/g,"Fire Phone $1"],[c,"Amazon"],[u,f]],[/(playbook);[-\w\),; ]+(rim)/i],[o,c,[u,d]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[o,[c,"BlackBerry"],[u,f]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[o,[c,"ASUS"],[u,d]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[o,[c,"ASUS"],[u,f]],[/(nexus 9)/i],[o,[c,"HTC"],[u,d]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony)[-_ ]?([-\w]*)/i],[c,[o,/_/g," "],[u,f]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[o,[c,"Acer"],[u,d]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[o,[c,"Meizu"],[u,f]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[o,[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,o,[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,o,[u,d]],[/(surface duo)/i],[o,[c,"Microsoft"],[u,d]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[o,[c,"Fairphone"],[u,f]],[/(u304aa)/i],[o,[c,"AT&T"],[u,f]],[/\bsie-(\w*)/i],[o,[c,"Siemens"],[u,f]],[/\b(rct\w+) b/i],[o,[c,"RCA"],[u,d]],[/\b(venue[\d ]{2,7}) b/i],[o,[c,"Dell"],[u,d]],[/\b(q(?:mv|ta)\w+) b/i],[o,[c,"Verizon"],[u,d]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[o,[c,"Barnes & Noble"],[u,d]],[/\b(tm\d{3}\w+) b/i],[o,[c,"NuVision"],[u,d]],[/\b(k88) b/i],[o,[c,"ZTE"],[u,d]],[/\b(nx\d{3}j) b/i],[o,[c,"ZTE"],[u,f]],[/\b(gen\d{3}) b.+49h/i],[o,[c,"Swiss"],[u,f]],[/\b(zur\d{3}) b/i],[o,[c,"Swiss"],[u,d]],[/\b((zeki)?tb.*\b) b/i],[o,[c,"Zeki"],[u,d]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],o,[u,d]],[/\b(ns-?\w{0,9}) b/i],[o,[c,"Insignia"],[u,d]],[/\b((nxa|next)-?\w{0,9}) b/i],[o,[c,"NextBook"],[u,d]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],o,[u,f]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],o,[u,f]],[/\b(ph-1) /i],[o,[c,"Essential"],[u,f]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[o,[c,"Envizen"],[u,d]],[/\b(trio[-\w\. ]+) b/i],[o,[c,"MachSpeed"],[u,d]],[/\btu_(1491) b/i],[o,[c,"Rotor"],[u,d]],[/(shield[\w ]+) b/i],[o,[c,"Nvidia"],[u,d]],[/(sprint) (\w+)/i],[c,o,[u,f]],[/(kin\.[onetw]{3})/i],[[o,/\./g," "],[c,"Microsoft"],[u,f]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[o,[c,"Zebra"],[u,d]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[o,[c,"Zebra"],[u,f]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,o,[u,"console"]],[/droid.+; (shield) bui/i],[o,[c,"Nvidia"],[u,"console"]],[/(playstation [345portablevi]+)/i],[o,[c,"Sony"],[u,"console"]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[o,[c,"Microsoft"],[u,"console"]],[/smart-tv.+(samsung)/i],[c,[u,h]],[/hbbtv.+maple;(\d+)/i],[[o,/^/,"SmartTV"],[c,"Samsung"],[u,h]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,"LG"],[u,h]],[/(apple) ?tv/i],[c,[o,"Apple TV"],[u,h]],[/crkey/i],[[o,"Chromecast"],[c,"Google"],[u,h]],[/droid.+aft(\w)( bui|\))/i],[o,[c,"Amazon"],[u,h]],[/\(dtv[\);].+(aquos)/i],[o,[c,"Sharp"],[u,h]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[c,E],[o,E],[u,h]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,h]],[/((pebble))app/i],[c,o,[u,"wearable"]],[/droid.+; (glass) \d/i],[o,[c,"Google"],[u,"wearable"]],[/droid.+; (wt63?0{2,3})\)/i],[o,[c,"Zebra"],[u,"wearable"]],[/(quest( 2)?)/i],[o,[c,"Facebook"],[u,"wearable"]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,"embedded"]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[o,[u,f]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[o,[u,d]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,d]],[/(phone|mobile(?:[;\/]| safari)|pda(?=.+windows ce))/i],[[u,f]],[/(android[-\w\. ]{0,9});.+buil/i],[o,[c,"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,T]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[s,"Windows"],[l,y,T]],[/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]]},v=function(e,t){if("object"==typeof e&&(t=e,e=void 0),!(this instanceof v))return new v(e,t).getResult();var n=e||(void 0!==a&&a.navigator&&a.navigator.userAgent?a.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}(b,t):b;return this.getBrowser=function(){var e,t={};return t[s]=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?E(e,255):e,this},this.setUA(n),this};v.VERSION="1.0.2",v.BROWSER=g([s,l,"major"]),v.CPU=g(["architecture"]),v.DEVICE=g([o,c,u,"console",f,h,d,"wearable","embedded"]),v.ENGINE=v.OS=g([s,l]),void 0!==t?(void 0!==e&&e.exports&&(t=e.exports=v),t.UAParser=v):n(53)?void 0===(r=function(){return v}.call(t,n,t,e))||(e.exports=r):void 0!==a&&(a.UAParser=v);var A=void 0!==a&&(a.jQuery||a.Zepto);if(A&&!A.ua){var R=new v;A.ua=R.getResult(),A.ua.get=function(){return R.getUA()},A.ua.set=function(e){R.setUA(e);var t=R.getResult();for(var n in t)A.ua[n]=t[n]}}}("object"==typeof window?window:this)},4:function(e,t,n){"use strict";function r(e){return(r="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){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(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=s(e);if(t){var a=s(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}function o(e,t){return!t||"object"!==r(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 s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=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&&a(e,t)}(n,e);var t=i(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)).AST_IN_FUTURE="astInFuture",e.BUFFER_EMPTY="bufferStalled",e.BUFFER_LOADED="bufferLoaded",e.BUFFER_LEVEL_STATE_CHANGED="bufferStateChanged",e.BUFFER_LEVEL_UPDATED="bufferLevelUpdated",e.DYNAMIC_TO_STATIC="dynamicToStatic",e.ERROR="error",e.FRAGMENT_LOADING_COMPLETED="fragmentLoadingCompleted",e.FRAGMENT_LOADING_PROGRESS="fragmentLoadingProgress",e.FRAGMENT_LOADING_STARTED="fragmentLoadingStarted",e.FRAGMENT_LOADING_ABANDONED="fragmentLoadingAbandoned",e.LOG="log",e.MANIFEST_LOADED="manifestLoaded",e.METRICS_CHANGED="metricsChanged",e.METRIC_CHANGED="metricChanged",e.METRIC_ADDED="metricAdded",e.METRIC_UPDATED="metricUpdated",e.PERIOD_SWITCH_STARTED="periodSwitchStarted",e.PERIOD_SWITCH_COMPLETED="periodSwitchCompleted",e.QUALITY_CHANGE_REQUESTED="qualityChangeRequested",e.QUALITY_CHANGE_RENDERED="qualityChangeRendered",e.TRACK_CHANGE_RENDERED="trackChangeRendered",e.STREAM_INITIALIZING="streamInitializing",e.STREAM_UPDATED="streamUpdated",e.STREAM_ACTIVATED="streamActivated",e.STREAM_DEACTIVATED="streamDeactivated",e.STREAM_INITIALIZED="streamInitialized",e.STREAM_TEARDOWN_COMPLETE="streamTeardownComplete",e.TEXT_TRACKS_ADDED="allTextTracksAdded",e.TEXT_TRACK_ADDED="textTrackAdded",e.TTML_PARSED="ttmlParsed",e.TTML_TO_PARSE="ttmlToParse",e.CAPTION_RENDERED="captionRendered",e.CAPTION_CONTAINER_RESIZE="captionContainerResize",e.CAN_PLAY="canPlay",e.CAN_PLAY_THROUGH="canPlayThrough",e.PLAYBACK_ENDED="playbackEnded",e.PLAYBACK_ERROR="playbackError",e.PLAYBACK_NOT_ALLOWED="playbackNotAllowed",e.PLAYBACK_METADATA_LOADED="playbackMetaDataLoaded",e.PLAYBACK_LOADED_DATA="playbackLoadedData",e.PLAYBACK_PAUSED="playbackPaused",e.PLAYBACK_PLAYING="playbackPlaying",e.PLAYBACK_PROGRESS="playbackProgress",e.PLAYBACK_RATE_CHANGED="playbackRateChanged",e.PLAYBACK_SEEKED="playbackSeeked",e.PLAYBACK_SEEKING="playbackSeeking",e.PLAYBACK_STALLED="playbackStalled",e.PLAYBACK_STARTED="playbackStarted",e.PLAYBACK_TIME_UPDATED="playbackTimeUpdated",e.PLAYBACK_VOLUME_CHANGED="playbackVolumeChanged",e.PLAYBACK_WAITING="playbackWaiting",e.MANIFEST_VALIDITY_CHANGED="manifestValidityChanged",e.EVENT_MODE_ON_START="eventModeOnStart",e.EVENT_MODE_ON_RECEIVE="eventModeOnReceive",e.CONFORMANCE_VIOLATION="conformanceViolation",e.REPRESENTATION_SWITCH="representationSwitch",e.ADAPTATION_SET_REMOVED_NO_CAPABILITIES="adaptationSetRemovedNoCapabilities",e.CONTENT_STEERING_REQUEST_COMPLETED="contentSteeringRequestCompleted",e}return n}(n(18).a));t.a=u},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 a})),n.d(t,"b",(function(){return i}));var a=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},i=function e(){r(this,e),this.s=null,this.d=null,this.b=[]};a.GET="GET",a.HEAD="HEAD",a.MPD_TYPE="MPD",a.XLINK_EXPANSION_TYPE="XLinkExpansion",a.INIT_SEGMENT_TYPE="InitializationSegment",a.INDEX_SEGMENT_TYPE="IndexSegment",a.MEDIA_SEGMENT_TYPE="MediaSegment",a.BITSTREAM_SWITCHING_SEGMENT_TYPE="BitstreamSwitchingSegment",a.MSS_FRAGMENT_INFO_SEGMENT_TYPE="FragmentInfoSegment",a.DVB_REPORTING_TYPE="DVBReporting",a.LICENSE="license",a.CONTENT_STEERING_TYPE="ContentSteering",a.OTHER_TYPE="other"},51:function(e,t,n){"use strict";var r=n(3),a=n(15);function i(){return{customTimeRangeArray:[],length:0,add:function(e,t){var n=0;for(n=0;n<this.customTimeRangeArray.length&&e>this.customTimeRangeArray[n].start;n++);for(this.customTimeRangeArray.splice(n,0,{start:e,end:t}),n=0;n<this.customTimeRangeArray.length-1;n++)this.mergeRanges(n,n+1)&&n--;this.length=this.customTimeRangeArray.length},clear:function(){this.customTimeRangeArray=[],this.length=0},remove:function(e,t){for(var n=0;n<this.customTimeRangeArray.length;n++)if(e<=this.customTimeRangeArray[n].start&&t>=this.customTimeRangeArray[n].end)this.customTimeRangeArray.splice(n,1),n--;else{if(e>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end){this.customTimeRangeArray.splice(n+1,0,{start:t,end:this.customTimeRangeArray[n].end}),this.customTimeRangeArray[n].end=e;break}e>this.customTimeRangeArray[n].start&&e<this.customTimeRangeArray[n].end?this.customTimeRangeArray[n].end=e:t>this.customTimeRangeArray[n].start&&t<this.customTimeRangeArray[n].end&&(this.customTimeRangeArray[n].start=t)}this.length=this.customTimeRangeArray.length},mergeRanges:function(e,t){var n=this.customTimeRangeArray[e],r=this.customTimeRangeArray[t];return n.start<=r.start&&r.start<=n.end&&n.end<=r.end?(n.end=r.end,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&r.end<=n.end?(n.start=r.start,this.customTimeRangeArray.splice(t,1),!0):r.start<=n.start&&n.start<=r.end&&n.end<=r.end?(this.customTimeRangeArray.splice(e,1),!0):n.start<=r.start&&r.start<=n.end&&r.end<=n.end&&(this.customTimeRangeArray.splice(t,1),!0)},start:function(e){return Object(a.a)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].start},end:function(e){return Object(a.a)(e),e>=this.customTimeRangeArray.length||e<0?NaN:this.customTimeRangeArray[e].end}}}i.__dashjs_factory_name="CustomTimeRanges",t.a=r.a.getClassFactory(i)},53:function(e,t){(function(t){e.exports=t}).call(this,{})},6:function(e,t,n){"use strict";var r=n(7),a=n(2),i=n(3),o=1,s=2,u=3,c=4,l=5;function f(e){e=e||{};var t,n,i,f,d=this.context,h=Object(r.a)(d).getInstance(),g=e.settings,p=[];function m(e){return e&&e.bind?e.bind(window.console):window.console.log.bind(window.console)}function E(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];v.apply(void 0,[o,this].concat(t))}function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];v.apply(void 0,[s,this].concat(t))}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];v.apply(void 0,[u,this].concat(t))}function T(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];v.apply(void 0,[c,this].concat(t))}function b(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];v.apply(void 0,[l,this].concat(t))}function v(e,t){var r="",o=null;n&&(o=(new Date).getTime(),r+="["+(o-f)+"]"),i&&t&&t.getClassName&&(r+="["+t.getClassName()+"]",t.getType&&(r+="["+t.getType()+"]")),r.length>0&&(r+=" ");for(var s=arguments.length,u=new Array(s>2?s-2:0),c=2;c<s;c++)u[c-2]=arguments[c];Array.apply(null,u).forEach((function(e){r+=e+" "})),p[e]&&g.get().debug.logLevel>=e&&p[e](r),g&&g.get().debug.dispatchEvent&&h.trigger(a.a.LOG,{message:r,level:e})}return t={getLogger:function(e){return{fatal:E.bind(e),error:_.bind(e),warn:y.bind(e),info:T.bind(e),debug:b.bind(e)}},setLogTimestampVisible:function(e){n=e},setCalleeNameVisible:function(e){i=e}},n=!0,i=!0,f=(new Date).getTime(),"undefined"!=typeof window&&window.console&&(p[o]=m(window.console.error),p[s]=m(window.console.error),p[u]=m(window.console.warn),p[c]=m(window.console.info),p[l]=m(window.console.debug)),t}f.__dashjs_factory_name="Debug";var d=i.a.getSingletonFactory(f);d.LOG_LEVEL_NONE=0,d.LOG_LEVEL_FATAL=o,d.LOG_LEVEL_ERROR=s,d.LOG_LEVEL_WARNING=u,d.LOG_LEVEL_INFO=c,d.LOG_LEVEL_DEBUG=l,i.a.updateSingletonFactory(f.__dashjs_factory_name,d),t.a=d},7:function(e,t,n){"use strict";var r=n(3),a=n(4);function i(){var e={};function t(t,n,r){var a=-1;return e[t]?(e[t].some((function(e,t){if(e&&e.callback===n&&(!r||r===e.scope))return a=t,!0})),a):a}return{on:function(n,r,a){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!n)throw new Error("event type cannot be null or undefined");if(!r||"function"!=typeof r)throw new Error("listener must be a function: "+r);var o=i.priority||0;if(!(t(n,r,a)>=0)){e[n]=e[n]||[];var s={callback:r,scope:a,priority:o};a&&a.getStreamId&&(s.streamId=a.getStreamId()),a&&a.getType&&(s.mediaType=a.getType()),i&&i.mode&&(s.mode=i.mode);var u=e[n].some((function(t,r){if(t&&o>t.priority)return e[n].splice(r,0,s),!0}));u||e[n].push(s)}},off:function(n,r,a){if(n&&r&&e[n]){var i=t(n,r,a);i<0||(e[n][i]=null)}},trigger:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t&&e[t]){if((n=n||{}).hasOwnProperty("type"))throw new Error("'type' is a reserved word for event dispatching");n.type=t,r.streamId&&(n.streamId=r.streamId),r.mediaType&&(n.mediaType=r.mediaType),e[t].filter((function(e){return!!e&&((!r.streamId||!e.streamId||e.streamId===r.streamId)&&((!r.mediaType||!e.mediaType||e.mediaType===r.mediaType)&&!(r.mode&&e.mode&&e.mode!==r.mode||!e.mode&&r.mode&&r.mode===a.a.EVENT_MODE_ON_RECEIVE)))})).forEach((function(e){return e&&e.callback.call(e.scope,n)}))}},reset:function(){e={}}}}i.__dashjs_factory_name="EventBus";var o=r.a.getSingletonFactory(i);o.EVENT_PRIORITY_LOW=0,o.EVENT_PRIORITY_HIGH=5e3,r.a.updateSingletonFactory(i.__dashjs_factory_name,o),t.a=o},8:function(e,t,n){"use strict";var r=n(3),a={DEFAULT:.5,STRONG:1,WEAK:0};function i(e,t,n){return{quality:void 0===e?-1:e,reason:void 0===t?null:t,priority:function(e){var t=a.DEFAULT;return e!==a.DEFAULT&&e!==a.STRONG&&e!==a.WEAK||(t=e),t}(n)}}i.__dashjs_factory_name="SwitchRequest";var o=r.a.getClassFactory(i);o.NO_CHANGE=-1,o.PRIORITY=a,r.a.updateClassFactory(i.__dashjs_factory_name,o),t.a=o},9: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 a=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,a;return t=e,(n=[{key:"init",value:function(){this.TCP_CONNECTION="TcpList",this.HTTP_REQUEST="HttpList",this.TRACK_SWITCH="RepSwitchList",this.BUFFER_LEVEL="BufferLevel",this.BUFFER_LOADED="bufferLoaded",this.ABANDON_LOAD="abandonload",this.ALLOW_LOAD="allowload",this.BUFFER_EMPTY="bufferStalled",this.BUFFER_STATE="BufferState",this.DVR_INFO="DVRInfo",this.DROPPED_FRAMES="DroppedFrames",this.SCHEDULING_INFO="SchedulingInfo",this.REQUESTS_QUEUE="RequestsQueue",this.MANIFEST_UPDATE="ManifestUpdate",this.MANIFEST_UPDATE_STREAM_INFO="ManifestUpdatePeriodInfo",this.MANIFEST_UPDATE_TRACK_INFO="ManifestUpdateRepresentationInfo",this.PLAY_LIST="PlayList",this.DVB_ERRORS="DVBErrors",this.HTTP_REQUEST_DVB_REPORTING_TYPE="DVBReporting"}}])&&r(t.prototype,n),a&&r(t,a),e}());t.a=a},93:function(e,t,n){"use strict";n.r(t);var r=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.mpdurl=null,this.errorcode=null,this.terror=null,this.url=null,this.ipaddress=null,this.servicelocation=null};r.SSL_CONNECTION_FAILED_PREFIX="SSL",r.DNS_RESOLUTION_FAILED="C00",r.HOST_UNREACHABLE="C01",r.CONNECTION_REFUSED="C02",r.CONNECTION_ERROR="C03",r.CORRUPT_MEDIA_ISOBMFF="M00",r.CORRUPT_MEDIA_OTHER="M01",r.BASE_URL_CHANGED="F00",r.BECAME_REPORTER="S00";var a=r,i=n(19);function o(e){var t,n,r=(e=e||{}).eventBus,o=e.dashMetrics,s=e.metricsConstants,u=e.events;function c(e){var t=new a;if(n){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.mpdurl||(t.mpdurl=n.originalUrl||n.url),t.terror||(t.terror=new Date),o.addDVBErrors(t)}}function l(e){e.error||(n=e.manifest)}function f(e){c({errorcode:a.BASE_URL_CHANGED,servicelocation:e.entry})}function d(){c({errorcode:a.BECAME_REPORTER})}function h(e){switch(e.metric){case s.HTTP_REQUEST:(0===(t=e.value).responsecode||null==t.responsecode||t.responsecode>=400||t.responsecode<100||t.responsecode>=600)&&c({errorcode:t.responsecode||a.CONNECTION_ERROR,url:t.url,terror:t.tresponse,servicelocation:t._serviceLocation})}var t}function g(e){var t;switch(e.error?e.error.code:0){case MediaError.MEDIA_ERR_NETWORK:t=a.CONNECTION_ERROR;break;case MediaError.MEDIA_ERR_DECODE:t=a.CORRUPT_MEDIA_OTHER;break;default:return}c({errorcode:t})}return t={initialise:function(){r.on(u.MANIFEST_UPDATED,l,t),r.on(u.SERVICE_LOCATION_BLACKLIST_CHANGED,f,t),r.on(u.METRIC_ADDED,h,t),r.on(u.METRIC_UPDATED,h,t),r.on(u.PLAYBACK_ERROR,g,t),r.on(i.a.BECAME_REPORTING_PLAYER,d,t)},reset:function(){r.off(u.MANIFEST_UPDATED,l,t),r.off(u.SERVICE_LOCATION_BLACKLIST_CHANGED,f,t),r.off(u.METRIC_ADDED,h,t),r.off(u.METRIC_UPDATED,h,t),r.off(u.PLAYBACK_ERROR,g,t),r.off(i.a.BECAME_REPORTING_PLAYER,d,t)}}}o.__dashjs_factory_name="DVBErrorsTranslator";var s=dashjs.FactoryMaker.getSingletonFactory(o),u=n(51);function c(e){e=e||{};var t,n,r=!1,a=this.context,i=e.mediaElement;return t={initialize:function(e){e&&e.length&&(e.forEach((function(e){var t=e.starttime,r=t+e.duration;n.add(t,r)})),r=!!e[0]._useWallClockTime)},reset:function(){n.clear()},isEnabled:function(){var e,t=n.length;if(!t)return!0;e=r?(new Date).getTime()/1e3:i.currentTime;for(var a=0;a<t;a+=1){var o=n.start(a),s=n.end(a);if(o<=e&&e<s)return!0}return!1}},n=Object(u.a)(a).create(),t}c.__dashjs_factory_name="RangeController";var l=dashjs.FactoryMaker.getClassFactory(c);function f(){return{serialise:function e(t){var n,r,a=[],i=[];for(n in t)if(t.hasOwnProperty(n)&&0!==n.indexOf("_")){if(null==(r=t[n])&&(r=""),Array.isArray(r)){if(!r.length)continue;i=[],r.forEach((function(t){var n="Object"!==Object.prototype.toString.call(t).slice(8,-1);i.push(n?t:e(t))})),r=i.map(encodeURIComponent).join(",")}else"string"==typeof r?r=encodeURIComponent(r):r instanceof Date?r=r.toISOString():"number"==typeof r&&(r=Math.round(r));a.push(n+"="+r)}return a.join("&")}}}f.__dashjs_factory_name="MetricSerialiser";var d=dashjs.FactoryMaker.getSingletonFactory(f);function h(){var e,t,n,r=window.crypto||window.msCrypto,a=Uint32Array,i=Math.pow(2,8*a.BYTES_PER_ELEMENT)-1;function o(){r&&(e||(e=new a(10)),r.getRandomValues(e),t=0)}return n={random:function(n,a){var s;return n||(n=0),a||(a=1),r?(t===e.length&&o(),s=e[t]/i,t+=1):s=Math.random(),s*(a-n)+n}},o(),n}h.__dashjs_factory_name="RNG";var g=dashjs.FactoryMaker.getSingletonFactory(h),p=n(31);function m(e){var t;e=e||{};var n,r,a,i,o,s,u,c=this.context,l=[],f=e.metricsConstants;function h(){i=!1,o=!1,s=null,u=null}return t={report:function(e,t){Array.isArray(t)||(t=[t]),o&&u.isEnabled()&&t.forEach((function(t){var a=n.serialise(t);e!==f.DVB_ERRORS&&(a="metricname=".concat(e,"&").concat(a)),function(e,t,n){var a=new XMLHttpRequest;a.withCredentials=r.getXHRWithCredentialsForType(f.HTTP_REQUEST_DVB_REPORTING_TYPE);var i=function(){var e=l.indexOf(a);-1!==e&&(l.splice(e,1),a.status>=200&&a.status<300?t&&t():n&&n())};l.push(a);try{a.open("GET",e),a.onloadend=i,a.onerror=i,a.send()}catch(e){a.onerror()}}(a="".concat(s,"?").concat(a),null,(function(){o=!1}))}))},initialize:function(e,t){var n;if(u=t,!(s=e.dvb_reportingUrl))throw new Error("required parameter missing (dvb:reportingUrl)");i||((n=e.dvb_probability)&&(1e3===n||n/1e3>=a.random())&&(o=!0),i=!0)},reset:function(){h()}},n=d(c).getInstance(),a=g(c).getInstance(),r=Object(p.a)(c).getInstance(),h(),t}m.__dashjs_factory_name="DVBReporting";var E=dashjs.FactoryMaker.getClassFactory(m);function _(e){e=e||{};var t,n={"urn:dvb:dash:reporting:2014":E},r=this.context,a=e.debug?e.debug.getLogger(t):{},i=e.metricsConstants,o=e.mediaPlayerModel||{};return t={create:function(e,t){var s;try{(s=n[e.schemeIdUri](r).create({metricsConstants:i,mediaPlayerModel:o})).initialize(e,t)}catch(t){s=null,a.error("ReportingFactory: could not create Reporting with schemeIdUri ".concat(e.schemeIdUri," (").concat(t.message,")"))}return s},register:function(e,t){n[e]=t},unregister:function(e){delete n[e]}}}_.__dashjs_factory_name="ReportingFactory";var y=dashjs.FactoryMaker.getSingletonFactory(_);function T(e){var t=[],n=y(this.context).getInstance(e);return{initialize:function(e,r){e.some((function(e){var a=n.create(e,r);if(a)return t.push(a),!0}))},reset:function(){t.forEach((function(e){return e.reset()})),t=[]},report:function(e,n){t.forEach((function(t){return t.report(e,n)}))}}}T.__dashjs_factory_name="ReportingController";var b=dashjs.FactoryMaker.getClassFactory(T);function v(){return{reconstructFullMetricName:function(e,t,n){var r=e;return t&&(r+="("+t,n&&n.length&&(r+=","+n),r+=")"),r},validateN:function(e){if(!e)throw new Error("missing n");if(isNaN(e))throw new Error("n is NaN");if(e<0)throw new Error("n must be positive");return e}}}v.__dashjs_factory_name="HandlerHelpers";var A=dashjs.FactoryMaker.getSingletonFactory(v);function R(e){var t,n,r,a,i;e=e||{};var o=this.context,s=A(o).getInstance(),u=[],c=e.metricsConstants;function l(){var e=function(){try{return Object.keys(u).map((function(e){return u[e]})).reduce((function(e,t){return e.level<t.level?e:t}))}catch(e){return}}();e&&i!==e.t&&(i=e.t,t.report(r,e))}return{initialize:function(e,i,o){i&&(n=s.validateN(o),t=i,r=s.reconstructFullMetricName(e,o),a=setInterval(l,n))},reset:function(){clearInterval(a),a=null,n=0,t=null,i=null},handleNewMetric:function(e,t,n){e===c.BUFFER_LEVEL&&(u[n]=t)}}}R.__dashjs_factory_name="BufferLevelHandler";var w=dashjs.FactoryMaker.getClassFactory(R);var S=dashjs.FactoryMaker.getClassFactory((function(e){var t,n=(e=e||{}).eventBus,r=e.metricsConstants;function a(){n.off(i.a.METRICS_INITIALISATION_COMPLETE,a,this),n.trigger(i.a.BECAME_REPORTING_PLAYER)}return{initialize:function(e,r){r&&(t=r,n.on(i.a.METRICS_INITIALISATION_COMPLETE,a,this))},reset:function(){t=null},handleNewMetric:function(e,n){e===r.DVB_ERRORS&&t&&t.report(e,n)}}}));function I(e){var t,n,r,a,i;e=e||{};var o=[],s=A(this.context).getInstance(),u=e.metricsConstants;function c(){var e=o;e.length&&t&&t.report(a,e),o=[]}return{initialize:function(e,o,u,l){o&&(n=s.validateN(u),t=o,l&&l.length&&(r=l),a=s.reconstructFullMetricName(e,u,l),i=setInterval(c,n))},reset:function(){clearInterval(i),i=null,n=null,r=null,o=[],t=null},handleNewMetric:function(e,t){e===u.HTTP_REQUEST&&(r&&r!==t.type||o.push(t))}}}I.__dashjs_factory_name="HttpListHandler";var N=dashjs.FactoryMaker.getClassFactory(I);function C(){var e,t;return{initialize:function(n,r){e=n,t=r},reset:function(){t=null,e=void 0},handleNewMetric:function(n,r){n===e&&t&&t.report(e,r)}}}C.__dashjs_factory_name="GenericMetricHandler";var O=dashjs.FactoryMaker.getClassFactory(C);function M(e){var t,n=(e=e||{}).debug?e.debug.getLogger(t):{},r=/([a-zA-Z]*)(\(([0-9]*)(\,\s*([a-zA-Z]*))?\))?/,a=this.context,i={BufferLevel:w,DVBErrors:S,HttpList:N,PlayList:O,RepSwitchList:O,TcpList:O};return t={create:function(t,o){var s,u=t.match(r);if(u){try{(s=i[u[1]](a).create({eventBus:e.eventBus,metricsConstants:e.metricsConstants})).initialize(u[1],o,u[3],u[5])}catch(e){s=null,n.error("MetricsHandlerFactory: Could not create handler for type ".concat(u[1]," with args ").concat(u[3],", ").concat(u[5]," (").concat(e.message,")"))}return s}},register:function(e,t){i[e]=t},unregister:function(e){delete i[e]}}}M.__dashjs_factory_name="MetricsHandlerFactory";var D=dashjs.FactoryMaker.getSingletonFactory(M);function L(e){e=e||{};var t,n=[],r=this.context,a=e.eventBus,i=e.events,o=D(r).getInstance({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants});function s(e){n.forEach((function(t){t.handleNewMetric(e.metric,e.value,e.mediaType)}))}return t={initialize:function(e,r){e.split(",").forEach((function(e,t,a){var i;if(-1!==e.indexOf("(")&&-1===e.indexOf(")")){var s=a[t+1];s&&-1===s.indexOf("(")&&-1!==s.indexOf(")")&&(e+=","+s,delete a[t+1])}(i=o.create(e,r))&&n.push(i)})),a.on(i.METRIC_ADDED,s,t),a.on(i.METRIC_UPDATED,s,t)},reset:function(){a.off(i.METRIC_ADDED,s,t),a.off(i.METRIC_UPDATED,s,t),n.forEach((function(e){return e.reset()})),n=[]}}}L.__dashjs_factory_name="MetricsHandlersController";var P=dashjs.FactoryMaker.getClassFactory(L);function B(e){var t,n,r;e=e||{};var a=this.context;function i(){t&&t.reset(),n&&n.reset(),r&&r.reset()}return{initialize:function(o){try{(r=l(a).create({mediaElement:e.mediaElement})).initialize(o.Range),(n=b(a).create({debug:e.debug,metricsConstants:e.metricsConstants,mediaPlayerModel:e.mediaPlayerModel})).initialize(o.Reporting,r),(t=P(a).create({debug:e.debug,eventBus:e.eventBus,metricsConstants:e.metricsConstants,events:e.events})).initialize(o.metrics,n)}catch(e){throw i(),e}},reset:i}}B.__dashjs_factory_name="MetricsController";var F=dashjs.FactoryMaker.getClassFactory(B);var x=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.metrics="",this.Range=[],this.Reporting=[]};var k=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.starttime=0,this.duration=1/0,this._useWallClockTime=!1};var U=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.schemeIdUri="",this.value="",this.dvb_reportingUrl="",this.dvb_probability=1e3};function G(e){var t=(e=e||{}).adapter,n=e.constants;return{getMetrics:function(e){var r=[];return e&&e.Metrics_asArray&&e.Metrics_asArray.forEach((function(a){var i=new x,o=t.getIsDynamic(e);a.hasOwnProperty("metrics")&&(i.metrics=a.metrics,a.Range_asArray&&a.Range_asArray.forEach((function(r){var a=new k;a.starttime=function(e,r,a){var i,o,s=0;return r?s=t.getAvailabilityStartTime(e)/1e3:(i=t.getRegularPeriods(e)).length&&(s=i[0].start),o=s,a&&a.hasOwnProperty(n.START_TIME)&&(o+=a.starttime),o}(e,o,r),r.hasOwnProperty("duration")?a.duration=r.duration:a.duration=t.getDuration(e),a._useWallClockTime=o,i.Range.push(a)})),a.Reporting_asArray&&(a.Reporting_asArray.forEach((function(e){var t=new U;e.hasOwnProperty(n.SCHEME_ID_URI)&&(t.schemeIdUri=e.schemeIdUri,e.hasOwnProperty("value")&&(t.value=e.value),e.hasOwnProperty(n.DVB_REPORTING_URL)&&(t.dvb_reportingUrl=e[n.DVB_REPORTING_URL]),e.hasOwnProperty(n.DVB_PROBABILITY)&&(t.dvb_probability=e[n.DVB_PROBABILITY]),i.Reporting.push(t))})),r.push(i)))})),r}}}G.__dashjs_factory_name="ManifestParsing";var j=dashjs.FactoryMaker.getSingletonFactory(G);function H(e){var t;e=e||{};var n={},r=this.context,a=e.eventBus,o=e.events;function s(t){if(!t.error){var o=Object.keys(n);j(r).getInstance({adapter:e.adapter,constants:e.constants}).getMetrics(t.manifest).forEach((function(t){var a=JSON.stringify(t);if(n.hasOwnProperty(a))o.splice(a,1);else try{var i=F(r).create(e);i.initialize(t),n[a]=i}catch(e){}})),o.forEach((function(e){n[e].reset(),delete n[e]})),a.trigger(i.a.METRICS_INITIALISATION_COMPLETE)}}function u(){Object.keys(n).forEach((function(e){n[e].reset()})),n={}}return t={reset:function(){a.off(o.MANIFEST_UPDATED,s,t),a.off(o.STREAM_TEARDOWN_COMPLETE,u,t)}},a.on(o.MANIFEST_UPDATED,s,t),a.on(o.STREAM_TEARDOWN_COMPLETE,u,t),t}H.__dashjs_factory_name="MetricsCollectionController";var Y=dashjs.FactoryMaker.getClassFactory(H);function q(){var e=this.context;return{createMetricsReporting:function(t){return s(e).getInstance({eventBus:t.eventBus,dashMetrics:t.dashMetrics,metricsConstants:t.metricsConstants,events:t.events}).initialise(),Y(e).create(t)},getReportingFactory:function(){return y(e).getInstance()},getMetricsHandlerFactory:function(){return D(e).getInstance()}}}q.__dashjs_factory_name="MetricsReporting";var V=dashjs.FactoryMaker.getClassFactory(q);V.events=i.a,dashjs.FactoryMaker.updateClassFactory(q.__dashjs_factory_name,V);t.default=V}}).default}));
//# sourceMappingURL=dash.reporting.min.js.map